Merge remote-tracking branch 'remotes/origin/master' into submission

# Conflicts:
#	package.json
#	src/app/+admin/admin-registries/metadata-schema/metadata-schema.component.spec.ts
#	src/app/+search-page/search-service/search.service.spec.ts
#	src/app/app.module.ts
#	src/app/core/auth/auth.interceptor.ts
#	src/app/core/cache/response-cache.service.spec.ts
#	src/app/core/data/browse-response-parsing.service.spec.ts
#	src/app/core/data/data.service.spec.ts
#	src/app/core/data/request.service.spec.ts
#	src/app/core/data/request.service.ts
#	src/app/core/dspace-rest-v2/dspace-rest-v2.service.ts
#	src/app/core/integration/integration.service.ts
#	src/app/core/metadata/metadata.service.spec.ts
#	src/app/core/registry/registry.service.spec.ts
#	src/app/core/shared/collection.model.ts
#	src/app/core/shared/item.model.ts
#	src/app/shared/form/builder/ds-dynamic-form-ui/models/dynamic-group/dynamic-group.component.spec.ts
#	src/app/shared/form/builder/ds-dynamic-form-ui/models/dynamic-group/dynamic-group.components.ts
#	src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.ts
#	src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup/dynamic-lookup.component.spec.ts
#	src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup/dynamic-lookup.component.ts
#	src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.ts
#	src/app/shared/form/builder/ds-dynamic-form-ui/models/tag/dynamic-tag.component.spec.ts
#	src/app/shared/form/builder/ds-dynamic-form-ui/models/tag/dynamic-tag.component.ts
#	src/app/shared/form/builder/ds-dynamic-form-ui/models/typeahead/dynamic-typeahead.component.ts
#	src/app/shared/form/builder/form-builder.service.spec.ts
#	src/app/shared/form/form.service.spec.ts
#	src/app/shared/notifications/notification/notification.component.spec.ts
#	src/app/shared/services/route.service.spec.ts
#	src/app/shared/services/route.service.ts
#	src/app/shared/shared.module.ts
#	yarn.lock
This commit is contained in:
Giuseppe Digilio
2018-12-13 20:28:11 +01:00
237 changed files with 6869 additions and 7210 deletions

View File

@@ -1,6 +1,6 @@
import { filter, take } from 'rxjs/operators';
import { distinctUntilChanged, filter, take, first, map } from 'rxjs/operators';
import { of as observableOf, Observable } from 'rxjs';
import { Store } from '@ngrx/store';
import { Observable } from 'rxjs/Observable';
import { hasValue, isNotEmpty } from '../../shared/empty.util';
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
import { ResponseCacheService } from '../cache/response-cache.service';
@@ -30,7 +30,7 @@ export abstract class DataService<TNormalized extends NormalizedObject, TDomain>
let result: Observable<string>;
const args = [];
result = this.getBrowseEndpoint(options).distinctUntilChanged();
result = this.getBrowseEndpoint(options).pipe(distinctUntilChanged());
if (hasValue(options.currentPage) && typeof options.currentPage === 'number') {
/* TODO: this is a temporary fix for the pagination start index (0 or 1) discrepancy between the rest and the frontend respectively */
@@ -50,7 +50,7 @@ export abstract class DataService<TNormalized extends NormalizedObject, TDomain>
}
if (isNotEmpty(args)) {
return result.map((href: string) => new URLCombiner(href, `?${args.join('&')}`).toString());
return result.pipe(map((href: string) => new URLCombiner(href, `?${args.join('&')}`).toString()));
} else {
return result;
}
@@ -111,11 +111,11 @@ export abstract class DataService<TNormalized extends NormalizedObject, TDomain>
}
findById(id: string): Observable<RemoteData<TDomain>> {
const hrefObs = this.halService.getEndpoint(this.linkPath)
.map((endpoint: string) => this.getFindByIDHref(endpoint, id));
const hrefObs = this.halService.getEndpoint(this.linkPath).pipe(
map((endpoint: string) => this.getFindByIDHref(endpoint, id)));
hrefObs
.first((href: string) => hasValue(href))
hrefObs.pipe(
first((href: string) => hasValue(href)))
.subscribe((href: string) => {
const request = new FindByIDRequest(this.requestService.generateRequestId(), href, id);
this.requestService.configure(request, this.forceBypassCache);