diff --git a/e2e/src/app.po.ts b/e2e/src/app.po.ts index 09a7990a77..0fd016ec68 100644 --- a/e2e/src/app.po.ts +++ b/e2e/src/app.po.ts @@ -15,7 +15,7 @@ export class ProtractorPage { } waitUntilNotLoading(): promise.Promise { - const loading = element(by.css('.loader')) + const loading = element(by.css('.loader')); const EC = protractor.ExpectedConditions; const notLoading = EC.not(EC.presenceOf(loading)); return browser.wait(notLoading, 10000); diff --git a/package.json b/package.json index c47ed37269..62d95a3b52 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "test": "npm run ng-high-memory -- test --sourceMap=true --watch=true", "test:headless": "npm run ng-high-memory -- test --watch=false --sourceMap=true --browsers=ChromeHeadless --code-coverage", "lint": "ng lint", + "lint-fix": "npm run ng-high-memory lint --fix=true", "e2e": "ng e2e", "e2e:ci": "ng e2e --protractor-config=./e2e/protractor-ci.conf.js", "compile:server": "webpack --config webpack.server.config.js --progress --color", diff --git a/src/app/+admin/admin-access-control/epeople-registry/epeople-registry.actions.ts b/src/app/+admin/admin-access-control/epeople-registry/epeople-registry.actions.ts index 4fd6ecbf5e..000dc48263 100644 --- a/src/app/+admin/admin-access-control/epeople-registry/epeople-registry.actions.ts +++ b/src/app/+admin/admin-access-control/epeople-registry/epeople-registry.actions.ts @@ -46,4 +46,4 @@ export class EPeopleRegistryCancelEPersonAction implements Action { */ export type EPeopleRegistryAction = EPeopleRegistryEditEPersonAction - | EPeopleRegistryCancelEPersonAction + | EPeopleRegistryCancelEPersonAction; diff --git a/src/app/+admin/admin-access-control/epeople-registry/epeople-registry.component.ts b/src/app/+admin/admin-access-control/epeople-registry/epeople-registry.component.ts index 585bbe24d5..4bf42f3654 100644 --- a/src/app/+admin/admin-access-control/epeople-registry/epeople-registry.component.ts +++ b/src/app/+admin/admin-access-control/epeople-registry/epeople-registry.component.ts @@ -114,7 +114,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy { onPageChange(event) { if (this.config.currentPage !== event) { this.config.currentPage = event; - this.search({ scope: this.currentSearchScope, query: this.currentSearchQuery }) + this.search({ scope: this.currentSearchScope, query: this.currentSearchQuery }); } } @@ -139,7 +139,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy { currentPage: this.config.currentPage, elementsPerPage: this.config.pageSize }).subscribe((peopleRD) => { - this.ePeople$.next(peopleRD) + this.ePeople$.next(peopleRD); } )); @@ -157,7 +157,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy { ); })).pipe(map((dtos: EpersonDtoModel[]) => { return new PaginatedList(epeople.pageInfo, dtos); - })) + })); })).subscribe((value) => { this.ePeopleDto$.next(value); this.pageInfoState$.next(value.pageInfo); @@ -195,7 +195,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy { this.isEPersonFormShown = true; } }); - this.scrollToTop() + this.scrollToTop(); } /** @@ -220,7 +220,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy { const errorResponse = restResponse as ErrorResponse; this.notificationsService.error('Error occured when trying to delete EPerson with id: ' + ePerson.id + ' with code: ' + errorResponse.statusCode + ' and message: ' + errorResponse.errorMessage); } - }) + }); }} }); } diff --git a/src/app/+admin/admin-access-control/epeople-registry/eperson-form/eperson-form.component.ts b/src/app/+admin/admin-access-control/epeople-registry/eperson-form/eperson-form.component.ts index 428fa4ca90..186c7ba554 100644 --- a/src/app/+admin/admin-access-control/epeople-registry/eperson-form/eperson-form.component.ts +++ b/src/app/+admin/admin-access-control/epeople-registry/eperson-form/eperson-form.component.ts @@ -441,10 +441,10 @@ export class EPersonFormComponent implements OnInit, OnDestroy { this.notificationsService.error('Error occured when trying to delete EPerson with id: ' + eperson.id + ' with code: ' + restResponse.statusCode + ' and message: ' + restResponse.statusText); } this.cancelForm.emit(); - }) + }); }} }); - }) + }); } /** diff --git a/src/app/+admin/admin-access-control/group-registry/group-form/group-form.component.ts b/src/app/+admin/admin-access-control/group-registry/group-form/group-form.component.ts index 0ee64a1cbe..439937ab2b 100644 --- a/src/app/+admin/admin-access-control/group-registry/group-form/group-form.component.ts +++ b/src/app/+admin/admin-access-control/group-registry/group-form/group-form.component.ts @@ -99,7 +99,7 @@ export class GroupFormComponent implements OnInit, OnDestroy { ngOnInit() { this.subs.push(this.route.params.subscribe((params) => { - this.setActiveGroup(params.groupId) + this.setActiveGroup(params.groupId); })); combineLatest( this.translateService.get(`${this.messagePrefix}.groupName`), @@ -263,7 +263,7 @@ export class GroupFormComponent implements OnInit, OnDestroy { getRemoteDataPayload()) .subscribe((group: Group) => { this.groupDataService.editGroup(group); - }) + }); } }); } diff --git a/src/app/+admin/admin-access-control/group-registry/group-form/members-list/members-list.component.ts b/src/app/+admin/admin-access-control/group-registry/group-form/members-list/members-list.component.ts index b2e9ea75d6..3e6998f863 100644 --- a/src/app/+admin/admin-access-control/group-registry/group-form/members-list/members-list.component.ts +++ b/src/app/+admin/admin-access-control/group-registry/group-form/members-list/members-list.component.ts @@ -112,7 +112,7 @@ export class MembersListComponent implements OnInit, OnDestroy { this.ePeopleMembersOfGroup = this.ePersonDataService.findAllByHref(this.groupBeingEdited._links.epersons.href, { currentPage: event, elementsPerPage: this.config.pageSize - }) + }); } /** @@ -163,11 +163,11 @@ export class MembersListComponent implements OnInit, OnDestroy { getSucceededRemoteData(), getRemoteDataPayload(), map((listEPeopleInGroup: PaginatedList) => listEPeopleInGroup.page.filter((ePersonInList: EPerson) => ePersonInList.id === possibleMember.id)), - map((epeople: EPerson[]) => epeople.length > 0)) + map((epeople: EPerson[]) => epeople.length > 0)); } else { return observableOf(false); } - })) + })); } /** @@ -208,7 +208,7 @@ export class MembersListComponent implements OnInit, OnDestroy { this.ePeopleMembersOfGroup = this.ePersonDataService.findAllByHref(activeGroup._links.epersons.href, { currentPage: this.configSearch.currentPage, elementsPerPage: this.configSearch.pageSize - }) + }); } /** @@ -232,7 +232,7 @@ export class MembersListComponent implements OnInit, OnDestroy { } else { this.notificationsService.error(this.translateService.get(this.messagePrefix + '.notification.failure.' + messageSuffix, { name: nameObject })); } - }) + }); } /** diff --git a/src/app/+admin/admin-access-control/group-registry/group-form/subgroup-list/subgroups-list.component.ts b/src/app/+admin/admin-access-control/group-registry/group-form/subgroup-list/subgroups-list.component.ts index 62927b74aa..79fbb9db90 100644 --- a/src/app/+admin/admin-access-control/group-registry/group-form/subgroup-list/subgroups-list.component.ts +++ b/src/app/+admin/admin-access-control/group-registry/group-form/subgroup-list/subgroups-list.component.ts @@ -128,7 +128,7 @@ export class SubgroupsListComponent implements OnInit, OnDestroy { getSucceededRemoteData(), getRemoteDataPayload(), map((listTotalGroups: PaginatedList) => listTotalGroups.page.filter((groupInList: Group) => groupInList.id === possibleSubgroup.id)), - map((groups: Group[]) => groups.length > 0)) + map((groups: Group[]) => groups.length > 0)); } } else { return observableOf(false); @@ -238,7 +238,7 @@ export class SubgroupsListComponent implements OnInit, OnDestroy { } else { this.notificationsService.error(this.translateService.get(this.messagePrefix + '.notification.failure.' + messageSuffix, { name: nameObject })); } - }) + }); } /** diff --git a/src/app/+admin/admin-access-control/group-registry/group-registry.actions.ts b/src/app/+admin/admin-access-control/group-registry/group-registry.actions.ts index 3a0f3bc5c5..b5ba3bc4b5 100644 --- a/src/app/+admin/admin-access-control/group-registry/group-registry.actions.ts +++ b/src/app/+admin/admin-access-control/group-registry/group-registry.actions.ts @@ -46,4 +46,4 @@ export class GroupRegistryCancelGroupAction implements Action { */ export type GroupRegistryAction = GroupRegistryEditGroupAction - | GroupRegistryCancelGroupAction + | GroupRegistryCancelGroupAction; diff --git a/src/app/+admin/admin-access-control/group-registry/groups-registry.component.ts b/src/app/+admin/admin-access-control/group-registry/groups-registry.component.ts index 6f606b6801..3063bd5a35 100644 --- a/src/app/+admin/admin-access-control/group-registry/groups-registry.component.ts +++ b/src/app/+admin/admin-access-control/group-registry/groups-registry.component.ts @@ -70,7 +70,7 @@ export class GroupsRegistryComponent implements OnInit { */ onPageChange(event) { this.config.currentPage = event; - this.search({ query: this.currentSearchQuery }) + this.search({ query: this.currentSearchQuery }); } /** @@ -105,7 +105,7 @@ export class GroupsRegistryComponent implements OnInit { } else { this.notificationsService.error(this.translateService.get(this.messagePrefix + 'notification.deleted.failure', { name: group.name })); } - }) + }); } } @@ -114,7 +114,7 @@ export class GroupsRegistryComponent implements OnInit { */ public forceUpdateGroup() { this.groupService.clearGroupsRequests(); - this.search({ query: this.currentSearchQuery }) + this.search({ query: this.currentSearchQuery }); } /** diff --git a/src/app/+admin/admin-registries/bitstream-formats/bitstream-format.actions.ts b/src/app/+admin/admin-registries/bitstream-formats/bitstream-format.actions.ts index 58b0686dfd..84917905d3 100644 --- a/src/app/+admin/admin-registries/bitstream-formats/bitstream-format.actions.ts +++ b/src/app/+admin/admin-registries/bitstream-formats/bitstream-format.actions.ts @@ -61,4 +61,4 @@ export class BitstreamFormatsRegistryDeselectAllAction implements Action { export type BitstreamFormatsRegistryAction = BitstreamFormatsRegistrySelectAction | BitstreamFormatsRegistryDeselectAction - | BitstreamFormatsRegistryDeselectAllAction + | BitstreamFormatsRegistryDeselectAllAction; diff --git a/src/app/+admin/admin-registries/metadata-registry/metadata-registry.component.ts b/src/app/+admin/admin-registries/metadata-registry/metadata-registry.component.ts index 5fb9b4adb4..2cf15084ed 100644 --- a/src/app/+admin/admin-registries/metadata-registry/metadata-registry.component.ts +++ b/src/app/+admin/admin-registries/metadata-registry/metadata-registry.component.ts @@ -155,7 +155,7 @@ export class MetadataRegistryComponent { this.forceUpdateSchemas(); }); } - ) + ); } /** @@ -172,9 +172,9 @@ export class MetadataRegistryComponent { ); messages.subscribe(([head, content]) => { if (success) { - this.notificationsService.success(head, content) + this.notificationsService.success(head, content); } else { - this.notificationsService.error(head, content) + this.notificationsService.error(head, content); } }); } diff --git a/src/app/+admin/admin-registries/metadata-schema/metadata-schema.component.ts b/src/app/+admin/admin-registries/metadata-schema/metadata-schema.component.ts index 3f82a7525c..dbd7be6b3b 100644 --- a/src/app/+admin/admin-registries/metadata-schema/metadata-schema.component.ts +++ b/src/app/+admin/admin-registries/metadata-schema/metadata-schema.component.ts @@ -182,7 +182,7 @@ export class MetadataSchemaComponent implements OnInit { this.forceUpdateFields(); }); } - ) + ); } /** @@ -199,9 +199,9 @@ export class MetadataSchemaComponent implements OnInit { ); messages.subscribe(([head, content]) => { if (success) { - this.notificationsService.success(head, content) + this.notificationsService.success(head, content); } else { - this.notificationsService.error(head, content) + this.notificationsService.error(head, content); } }); } diff --git a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/item-search-result/item-admin-search-result-grid-element.component.ts b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/item-search-result/item-admin-search-result-grid-element.component.ts index 3fcb33502d..c26c9d6407 100644 --- a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/item-search-result/item-admin-search-result-grid-element.component.ts +++ b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/item-search-result/item-admin-search-result-grid-element.component.ts @@ -60,6 +60,6 @@ export class ItemAdminSearchResultGridElementComponent extends SearchResultGridE * @returns {GenericConstructor} */ private getComponent(): GenericConstructor { - return getListableObjectComponent(this.object.getRenderTypes(), ViewMode.GridElement, undefined) + return getListableObjectComponent(this.object.getRenderTypes(), ViewMode.GridElement, undefined); } } diff --git a/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.ts b/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.ts index d3cbc025c2..3142f5b11a 100644 --- a/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.ts +++ b/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.ts @@ -34,7 +34,7 @@ export class ItemAdminSearchResultActionsComponent { * Returns the path to the edit page of this item */ getEditRoute(): string { - return getItemEditRoute(this.item.uuid) + return getItemEditRoute(this.item.uuid); } /** diff --git a/src/app/+admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workflow-item/workflow-item-search-result-admin-workflow-grid-element.component.ts b/src/app/+admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workflow-item/workflow-item-search-result-admin-workflow-grid-element.component.ts index 7abe99cf52..67a961b330 100644 --- a/src/app/+admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workflow-item/workflow-item-search-result-admin-workflow-grid-element.component.ts +++ b/src/app/+admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workflow-item/workflow-item-search-result-admin-workflow-grid-element.component.ts @@ -84,7 +84,7 @@ export class WorkflowItemSearchResultAdminWorkflowGridElementComponent extends S (componentRef.instance as any).listID = this.listID; componentRef.changeDetectorRef.detectChanges(); } - ) + ); } /** @@ -92,7 +92,7 @@ export class WorkflowItemSearchResultAdminWorkflowGridElementComponent extends S * @returns {GenericConstructor} */ private getComponent(item: Item): GenericConstructor { - return getListableObjectComponent(item.getRenderTypes(), ViewMode.GridElement, undefined) + return getListableObjectComponent(item.getRenderTypes(), ViewMode.GridElement, undefined); } } diff --git a/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.ts b/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.ts index 9dba0e9fd4..fbda9f1b29 100644 --- a/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.ts +++ b/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.ts @@ -30,7 +30,7 @@ export class WorkflowItemAdminWorkflowActionsComponent { */ getDeleteRoute(): string { - return getWorkflowItemDeleteRoute(this.wfi.id) + return getWorkflowItemDeleteRoute(this.wfi.id); } /** diff --git a/src/app/+bitstream-page/bitstream-page.resolver.ts b/src/app/+bitstream-page/bitstream-page.resolver.ts index 1608c53d83..04c6891765 100644 --- a/src/app/+bitstream-page/bitstream-page.resolver.ts +++ b/src/app/+bitstream-page/bitstream-page.resolver.ts @@ -34,7 +34,7 @@ export class BitstreamPageResolver implements Resolve> { * The self links defined in this list are expected to be requested somewhere in the near future * Requesting them as embeds will limit the number of requests */ - get followLinks(): Array> { + get followLinks(): FollowLinkConfig[] { return [ followLink('bundle', undefined, true, followLink('item')), followLink('format') diff --git a/src/app/+bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts b/src/app/+bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts index 9c1e669172..de3c006f8e 100644 --- a/src/app/+bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts +++ b/src/app/+bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts @@ -326,7 +326,7 @@ export class EditBitstreamPageComponent implements OnInit, OnDestroy { this.updateFieldTranslations(); }) ); - }; + } /** * Update the current form values with bitstream properties diff --git a/src/app/+browse-by/+browse-by-title-page/browse-by-title-page.component.ts b/src/app/+browse-by/+browse-by-title-page/browse-by-title-page.component.ts index 91713cd219..e13a3d509c 100644 --- a/src/app/+browse-by/+browse-by-title-page/browse-by-title-page.component.ts +++ b/src/app/+browse-by/+browse-by-title-page/browse-by-title-page.component.ts @@ -44,7 +44,7 @@ export class BrowseByTitlePageComponent extends BrowseByMetadataPageComponent { .subscribe((params) => { this.browseId = params.id || this.defaultBrowseId; this.updatePageWithItems(browseParamsToOptions(params, this.paginationConfig, this.sortConfig, this.browseId), undefined); - this.updateParent(params.scope) + this.updateParent(params.scope); })); this.updateStartsWithTextOptions(); } diff --git a/src/app/+collection-page/collection-item-mapper/collection-item-mapper.component.ts b/src/app/+collection-page/collection-item-mapper/collection-item-mapper.component.ts index eb27d7f887..55e6c58cf4 100644 --- a/src/app/+collection-page/collection-item-mapper/collection-item-mapper.component.ts +++ b/src/app/+collection-page/collection-item-mapper/collection-item-mapper.component.ts @@ -122,7 +122,7 @@ export class CollectionItemMapperComponent implements OnInit { if (shouldUpdate) { return this.collectionDataService.getMappedItems(collectionRD.payload.id, Object.assign(options, { sort: this.defaultSortOptions - }),followLink('owningCollection')) + }),followLink('owningCollection')); } }) ); @@ -249,7 +249,7 @@ export class CollectionItemMapperComponent implements OnInit { getRemoteDataPayload(), take(1) ).subscribe((collection: Collection) => { - this.router.navigate(['/collections/', collection.id]) + this.router.navigate(['/collections/', collection.id]); }); } diff --git a/src/app/+collection-page/collection-page-routing-paths.ts b/src/app/+collection-page/collection-page-routing-paths.ts index 7a1b2923bf..bb5c2ce73d 100644 --- a/src/app/+collection-page/collection-page-routing-paths.ts +++ b/src/app/+collection-page/collection-page-routing-paths.ts @@ -13,11 +13,11 @@ export function getCollectionPageRoute(collectionId: string) { } export function getCollectionEditRoute(id: string) { - return new URLCombiner(getCollectionModuleRoute(), id, COLLECTION_EDIT_PATH).toString() + return new URLCombiner(getCollectionModuleRoute(), id, COLLECTION_EDIT_PATH).toString(); } export function getCollectionCreateRoute() { - return new URLCombiner(getCollectionModuleRoute(), COLLECTION_CREATE_PATH).toString() + return new URLCombiner(getCollectionModuleRoute(), COLLECTION_CREATE_PATH).toString(); } export const COLLECTION_CREATE_PATH = 'create'; diff --git a/src/app/+collection-page/collection-page.component.ts b/src/app/+collection-page/collection-page.component.ts index 026b78bd10..2b9fadb3b9 100644 --- a/src/app/+collection-page/collection-page.component.ts +++ b/src/app/+collection-page/collection-page.component.ts @@ -84,7 +84,7 @@ export class CollectionPageComponent implements OnInit { pagination: dto.paginationConfig, sort: dto.sortConfig, dsoTypes: [DSpaceObjectType.ITEM] - })).pipe(toDSpaceObjectListRD()) as Observable>> + })).pipe(toDSpaceObjectListRD()) as Observable>>; }), startWith(undefined) // Make sure switching pages shows loading component ) @@ -94,7 +94,7 @@ export class CollectionPageComponent implements OnInit { this.route.queryParams.pipe(take(1)).subscribe((params) => { this.metadata.processRemoteData(this.collectionRD$); this.onPaginationChange(params); - }) + }); } isNotEmpty(object: any) { diff --git a/src/app/+collection-page/edit-collection-page/collection-roles/collection-roles.component.ts b/src/app/+collection-page/edit-collection-page/collection-roles/collection-roles.component.ts index 996933e43d..5b53015e3c 100644 --- a/src/app/+collection-page/edit-collection-page/collection-roles/collection-roles.component.ts +++ b/src/app/+collection-page/edit-collection-page/collection-roles/collection-roles.component.ts @@ -25,7 +25,7 @@ export class CollectionRolesComponent implements OnInit { return this.dsoRD$.pipe( getSucceededRemoteData(), getRemoteDataPayload(), - ) + ); } /** diff --git a/src/app/+collection-page/edit-collection-page/collection-source/collection-source.component.ts b/src/app/+collection-page/edit-collection-page/collection-source/collection-source.component.ts index 9b7e1427c9..cafd2124a2 100644 --- a/src/app/+collection-page/edit-collection-page/collection-source/collection-source.component.ts +++ b/src/app/+collection-page/edit-collection-page/collection-source/collection-source.component.ts @@ -432,7 +432,7 @@ export class CollectionSourceComponent extends AbstractTrackableComponent implem updateContentSource(updateHarvestType: boolean) { this.inputModels.forEach( (fieldModel: DynamicInputModel) => { - this.updateContentSourceField(fieldModel, updateHarvestType) + this.updateContentSourceField(fieldModel, updateHarvestType); } ); this.saveFieldUpdate(); diff --git a/src/app/+collection-page/edit-collection-page/edit-collection-page.component.ts b/src/app/+collection-page/edit-collection-page/edit-collection-page.component.ts index f225fc3e97..aff1995a14 100644 --- a/src/app/+collection-page/edit-collection-page/edit-collection-page.component.ts +++ b/src/app/+collection-page/edit-collection-page/edit-collection-page.component.ts @@ -26,6 +26,6 @@ export class EditCollectionPageComponent extends EditComColPageComponent> + bitstreams: Observable>; } @Component({ @@ -89,7 +89,7 @@ export class ItemAuthorizationsComponent implements OnInit, OnDestroy { getFirstSucceededRemoteDataWithNotEmptyPayload(), catchError((error) => { console.error(error); - return observableOf(new PaginatedList(null, [])) + return observableOf(new PaginatedList(null, [])); }) ); @@ -105,9 +105,9 @@ export class ItemAuthorizationsComponent implements OnInit, OnDestroy { mergeMap((list: PaginatedList) => list.page), map((bundle: Bundle) => ({ id: bundle.id, bitstreams: this.getBundleBitstreams(bundle) })) ).subscribe((entry: BundleBitstreamsMapEntry) => { - this.bundleBitstreamsMap.set(entry.id, entry.bitstreams) + this.bundleBitstreamsMap.set(entry.id, entry.bitstreams); }) - ) + ); } /** @@ -117,7 +117,7 @@ export class ItemAuthorizationsComponent implements OnInit, OnDestroy { return this.item$.pipe( map((item: Item) => item.id), first((UUID: string) => isNotEmpty(UUID)) - ) + ); } /** @@ -139,9 +139,9 @@ export class ItemAuthorizationsComponent implements OnInit, OnDestroy { getFirstSucceededRemoteDataPayload(), catchError((error) => { console.error(error); - return observableOf(new PaginatedList(null, [])) + return observableOf(new PaginatedList(null, [])); }) - ) + ); } /** @@ -150,6 +150,6 @@ export class ItemAuthorizationsComponent implements OnInit, OnDestroy { ngOnDestroy(): void { this.subs .filter((subscription) => hasValue(subscription)) - .forEach((subscription) => subscription.unsubscribe()) + .forEach((subscription) => subscription.unsubscribe()); } } diff --git a/src/app/+item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts b/src/app/+item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts index a79809905a..57a66b51b8 100644 --- a/src/app/+item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts +++ b/src/app/+item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts @@ -105,7 +105,7 @@ export class ItemCollectionMapperComponent implements OnInit { this.itemCollectionsRD$ = observableCombineLatest(this.itemRD$, this.shouldUpdate$).pipe( map(([itemRD, shouldUpdate]) => { if (shouldUpdate) { - return itemRD.payload + return itemRD.payload; } }), switchMap((item: Item) => this.itemDataService.getMappedCollections(item.id)) @@ -283,7 +283,7 @@ export class ItemCollectionMapperComponent implements OnInit { getRemoteDataPayload(), take(1) ).subscribe((item: Item) => { - this.router.navigate(['/items/', item.id]) + this.router.navigate(['/items/', item.id]); }); } diff --git a/src/app/+item-page/edit-item-page/item-delete/item-delete.component.ts b/src/app/+item-page/edit-item-page/item-delete/item-delete.component.ts index ac73c561b2..250b90b4cb 100644 --- a/src/app/+item-page/edit-item-page/item-delete/item-delete.component.ts +++ b/src/app/+item-page/edit-item-page/item-delete/item-delete.component.ts @@ -158,7 +158,7 @@ export class ItemDeleteComponent */ getRelationshipMessageKey(label: string): string { if (hasValue(label) && label.indexOf('Of') > -1) { - return `relationships.${label.substring(0, label.indexOf('Of') + 2)}` + return `relationships.${label.substring(0, label.indexOf('Of') + 2)}`; } else { return label; } @@ -176,7 +176,7 @@ export class ItemDeleteComponent map((isLeftItem) => isLeftItem ? relationshipType.leftwardType : relationshipType.rightwardType), ) ), - ) + ); } /** @@ -267,7 +267,7 @@ export class ItemDeleteComponent return { metadataField: key, metadataValue: metadata, - } + }; })) .reduce((previous, current) => previous.concat(current)) ), diff --git a/src/app/+item-page/edit-item-page/item-metadata/edit-in-place-field/edit-in-place-field.component.ts b/src/app/+item-page/edit-item-page/item-metadata/edit-in-place-field/edit-in-place-field.component.ts index 8543bbef42..f08c3e9674 100644 --- a/src/app/+item-page/edit-item-page/item-metadata/edit-in-place-field/edit-in-place-field.component.ts +++ b/src/app/+item-page/edit-item-page/item-metadata/edit-in-place-field/edit-in-place-field.component.ts @@ -129,7 +129,7 @@ export class EditInPlaceFieldComponent implements OnInit, OnChanges { take(1)) .subscribe((fieldNames: string[]) => { this.setInputSuggestions(fieldNames); - }) + }); } else { this.metadataFieldSuggestions.next([]); } diff --git a/src/app/+item-page/edit-item-page/item-metadata/item-metadata.component.ts b/src/app/+item-page/edit-item-page/item-metadata/item-metadata.component.ts index 5ad6254459..95c5952f4c 100644 --- a/src/app/+item-page/edit-item-page/item-metadata/item-metadata.component.ts +++ b/src/app/+item-page/edit-item-page/item-metadata/item-metadata.component.ts @@ -122,7 +122,7 @@ export class ItemMetadataComponent extends AbstractItemUpdateComponent { this.updates$ = this.objectUpdatesService.getFieldUpdates(this.url, this.item.metadataAsList); this.notificationsService.success(this.getNotificationTitle('saved'), this.getNotificationContent('saved')); } - ) + ); } else { this.notificationsService.error(this.getNotificationTitle('invalid'), this.getNotificationContent('invalid')); } diff --git a/src/app/+item-page/edit-item-page/item-move/item-move.component.ts b/src/app/+item-page/edit-item-page/item-move/item-move.component.ts index abadd2ec4a..b02f60e314 100644 --- a/src/app/+item-page/edit-item-page/item-move/item-move.component.ts +++ b/src/app/+item-page/edit-item-page/item-move/item-move.component.ts @@ -85,8 +85,8 @@ export class ItemMoveComponent implements OnInit { first(), map((rd: RemoteData>>) => { return rd.payload.page.map((searchResult) => { - return searchResult.indexableObject - }) + return searchResult.indexableObject; + }); }) , ); diff --git a/src/app/+item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts b/src/app/+item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts index 86c4eb102c..89c52d6bc5 100644 --- a/src/app/+item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts +++ b/src/app/+item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts @@ -64,7 +64,7 @@ export class EditRelationshipListComponent implements OnInit { return this.getLabel().pipe( map((label) => { if (hasValue(label) && label.indexOf('Of') > -1) { - return `relationships.${label.substring(0, label.indexOf('Of') + 2)}` + return `relationships.${label.substring(0, label.indexOf('Of') + 2)}`; } else { return label; } diff --git a/src/app/+item-page/edit-item-page/item-relationships/edit-relationship/edit-relationship.component.ts b/src/app/+item-page/edit-item-page/item-relationships/edit-relationship/edit-relationship.component.ts index 2badaf80b0..a2626420c7 100644 --- a/src/app/+item-page/edit-item-page/item-relationships/edit-relationship/edit-relationship.component.ts +++ b/src/app/+item-page/edit-item-page/item-relationships/edit-relationship/edit-relationship.component.ts @@ -109,7 +109,7 @@ export class EditRelationshipComponent implements OnChanges { keepLeftVirtualMetadata: selection[0] === true, keepRightVirtualMetadata: selection[1] === true, } - ) as DeleteRelationship + ) as DeleteRelationship; }), take(1), ).subscribe((deleteRelationship: DeleteRelationship) => diff --git a/src/app/+item-page/edit-item-page/item-relationships/item-relationships.component.ts b/src/app/+item-page/edit-item-page/item-relationships/item-relationships.component.ts index b5ca60055b..872ac9fe53 100644 --- a/src/app/+item-page/edit-item-page/item-relationships/item-relationships.component.ts +++ b/src/app/+item-page/edit-item-page/item-relationships/item-relationships.component.ts @@ -133,7 +133,7 @@ export class ItemRelationshipsComponent extends AbstractItemUpdateComponent impl Object.assign(new Relationship(), relationship, {uuid: relationship.id}) )), switchMap((relationships: Relationship[]) => { - return this.objectUpdatesService.getFieldUpdatesExclusive(this.url, relationships) as Observable + return this.objectUpdatesService.getFieldUpdatesExclusive(this.url, relationships) as Observable; }), map((fieldUpdates: FieldUpdates) => Object.values(fieldUpdates) diff --git a/src/app/+item-page/edit-item-page/item-status/item-status.component.ts b/src/app/+item-page/edit-item-page/item-status/item-status.component.ts index e9be3585cd..2adf8df64c 100644 --- a/src/app/+item-page/edit-item-page/item-status/item-status.component.ts +++ b/src/app/+item-page/edit-item-page/item-status/item-status.component.ts @@ -117,7 +117,7 @@ export class ItemStatusComponent implements OnInit { * @returns {string} url */ getItemPage(item: Item): string { - return getItemPageRoute(item.id) + return getItemPageRoute(item.id); } /** diff --git a/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.ts b/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.ts index ca347e1298..77a02afc3c 100644 --- a/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.ts +++ b/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.ts @@ -62,7 +62,7 @@ export class AbstractSimpleItemActionComponent implements OnInit { */ performAction() { // Overwrite in subclasses - }; + } /** * Process the response obtained during the performAction method and navigate back to the edit page diff --git a/src/app/+item-page/edit-item-page/virtual-metadata/virtual-metadata.component.ts b/src/app/+item-page/edit-item-page/virtual-metadata/virtual-metadata.component.ts index a8b59da9a4..f86630e0e4 100644 --- a/src/app/+item-page/edit-item-page/virtual-metadata/virtual-metadata.component.ts +++ b/src/app/+item-page/edit-item-page/virtual-metadata/virtual-metadata.component.ts @@ -74,7 +74,7 @@ export class VirtualMetadataComponent implements OnInit { return { metadataField: key, metadataValue: metadata, - } + }; }) ) .reduce((previous, current) => previous.concat(current), []); @@ -115,6 +115,6 @@ export class VirtualMetadataComponent implements OnInit { * Represents a virtual metadata entry. */ export interface VirtualMetadata { - metadataField: string, - metadataValue: MetadataValue, + metadataField: string; + metadataValue: MetadataValue; } diff --git a/src/app/+item-page/item-page-routing-paths.ts b/src/app/+item-page/item-page-routing-paths.ts index bb8f052eda..1a7c23c430 100644 --- a/src/app/+item-page/item-page-routing-paths.ts +++ b/src/app/+item-page/item-page-routing-paths.ts @@ -11,7 +11,7 @@ export function getItemPageRoute(itemId: string) { } export function getItemEditRoute(id: string) { - return new URLCombiner(getItemModuleRoute(), id, ITEM_EDIT_PATH).toString() + return new URLCombiner(getItemModuleRoute(), id, ITEM_EDIT_PATH).toString(); } export const ITEM_EDIT_PATH = 'edit'; diff --git a/src/app/+item-page/simple/item-types/shared/item-relationships-utils.ts b/src/app/+item-page/simple/item-types/shared/item-relationships-utils.ts index 6adbb90ba2..6d3e73e9f0 100644 --- a/src/app/+item-page/simple/item-types/shared/item-relationships-utils.ts +++ b/src/app/+item-page/simple/item-types/shared/item-relationships-utils.ts @@ -17,7 +17,7 @@ import { hasValue } from '../../../../shared/empty.util'; export const compareArraysUsing = (mapFn: (t: T) => any) => (a: T[], b: T[]): boolean => { if (!Array.isArray(a) || ! Array.isArray(b)) { - return false + return false; } const aIds = a.map(mapFn); @@ -95,6 +95,6 @@ export const paginatedRelationsToItems = (thisId: string) => map((relatedItems: Item[]) => Object.assign(relationshipsRD, { payload: Object.assign(relationshipsRD.payload, { page: relatedItems } )}) ) - ) + ); }) ); diff --git a/src/app/+item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component.ts b/src/app/+item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component.ts index 8efd5227ab..116c8c2d79 100644 --- a/src/app/+item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component.ts +++ b/src/app/+item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component.ts @@ -18,11 +18,11 @@ export class TabbedRelatedEntitiesSearchComponent implements OnInit { * The types of relationships to fetch items for * e.g. 'isAuthorOfPublication' */ - @Input() relationTypes: Array<{ + @Input() relationTypes: { label: string, filter: string, configuration?: string - }>; + }[]; /** * The item to render relationships for diff --git a/src/app/+login-page/login-page.component.ts b/src/app/+login-page/login-page.component.ts index 6a8508eb45..f618f5329e 100644 --- a/src/app/+login-page/login-page.component.ts +++ b/src/app/+login-page/login-page.component.ts @@ -66,7 +66,7 @@ export class LoginPageComponent implements OnDestroy, OnInit { this.store.dispatch(new AuthenticationSuccessAction(authToken)); } } - }) + }); } /** diff --git a/src/app/+lookup-by-id/objectnotfound/objectnotfound.component.ts b/src/app/+lookup-by-id/objectnotfound/objectnotfound.component.ts index 813b56920a..bbab90f39d 100644 --- a/src/app/+lookup-by-id/objectnotfound/objectnotfound.component.ts +++ b/src/app/+lookup-by-id/objectnotfound/objectnotfound.component.ts @@ -29,7 +29,7 @@ export class ObjectNotFoundComponent implements OnInit { route.params.subscribe((params) => { this.idType = params.idType; this.id = params.id; - }) + }); } ngOnInit(): void { diff --git a/src/app/+my-dspace-page/my-dspace-configuration.service.ts b/src/app/+my-dspace-page/my-dspace-configuration.service.ts index 10ca580d3c..58946c9c16 100644 --- a/src/app/+my-dspace-page/my-dspace-configuration.service.ts +++ b/src/app/+my-dspace-page/my-dspace-configuration.service.ts @@ -111,7 +111,7 @@ export class MyDSpaceConfigurationService extends SearchConfigurationService { }); return configurationOptions; }) - ) + ); } } diff --git a/src/app/+my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts b/src/app/+my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts index ce64bc9fd8..c1e67561b2 100644 --- a/src/app/+my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts +++ b/src/app/+my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts @@ -31,7 +31,7 @@ export class MyDSpaceNewSubmissionComponent implements OnDestroy, OnInit { /** * Output that emits the workspace item when the upload has completed */ - @Output() uploadEnd = new EventEmitter>>(); + @Output() uploadEnd = new EventEmitter[]>(); /** * The UploaderOptions object diff --git a/src/app/+my-dspace-page/my-dspace-page.component.ts b/src/app/+my-dspace-page/my-dspace-page.component.ts index 6556eaaf1f..e2d4ab6757 100644 --- a/src/app/+my-dspace-page/my-dspace-page.component.ts +++ b/src/app/+my-dspace-page/my-dspace-page.component.ts @@ -139,9 +139,9 @@ export class MyDSpacePageComponent implements OnInit { .pipe( map((configuration: string) => { if (configuration === 'workspace') { - return Context.Workspace + return Context.Workspace; } else { - return Context.Workflow + return Context.Workflow; } }) ); @@ -152,7 +152,7 @@ export class MyDSpacePageComponent implements OnInit { * Set the sidebar to a collapsed state */ public closeSidebar(): void { - this.sidebarService.collapse() + this.sidebarService.collapse(); } /** diff --git a/src/app/+search-page/search-tracker.component.ts b/src/app/+search-page/search-tracker.component.ts index 7e5aa49165..51e9804ae1 100644 --- a/src/app/+search-page/search-tracker.component.ts +++ b/src/app/+search-page/search-tracker.component.ts @@ -62,7 +62,7 @@ export class SearchTrackerComponent extends SearchComponent implements OnInit { .subscribe((entry) => { const config: PaginatedSearchOptions = entry.searchOptions; const searchQueryResponse: SearchQueryResponse = entry.response; - const filters: Array<{ filter: string, operator: string, value: string, label: string; }> = []; + const filters: { filter: string, operator: string, value: string, label: string; }[] = []; const appliedFilters = searchQueryResponse.appliedFilters || []; for (let i = 0, filtersLength = appliedFilters.length; i < filtersLength; i++) { const appliedFilter = appliedFilters[i]; @@ -84,7 +84,7 @@ export class SearchTrackerComponent extends SearchComponent implements OnInit { }, filters: filters, }, - }) + }); }); } } diff --git a/src/app/+search-page/search.component.ts b/src/app/+search-page/search.component.ts index bbbfdba513..4c9f6676e6 100644 --- a/src/app/+search-page/search.component.ts +++ b/src/app/+search-page/search.component.ts @@ -146,7 +146,7 @@ export class SearchComponent implements OnInit { * Set the sidebar to a collapsed state */ public closeSidebar(): void { - this.sidebarService.collapse() + this.sidebarService.collapse(); } /** diff --git a/src/app/+workflowitems-edit-page/workflow-item-action-page.component.ts b/src/app/+workflowitems-edit-page/workflow-item-action-page.component.ts index 87f46aeb39..7f09f3a3d2 100644 --- a/src/app/+workflowitems-edit-page/workflow-item-action-page.component.ts +++ b/src/app/+workflowitems-edit-page/workflow-item-action-page.component.ts @@ -52,14 +52,14 @@ export abstract class WorkflowItemActionPageComponent implements OnInit { if (successful) { const title = this.translationService.get('workflow-item.' + this.type + '.notification.success.title'); const content = this.translationService.get('workflow-item.' + this.type + '.notification.success.content'); - this.notificationsService.success(title, content) + this.notificationsService.success(title, content); } else { const title = this.translationService.get('workflow-item.' + this.type + '.notification.error.title'); const content = this.translationService.get('workflow-item.' + this.type + '.notification.error.content'); - this.notificationsService.error(title, content) + this.notificationsService.error(title, content); } this.previousPage(); - }) + }); } /** diff --git a/src/app/+workflowitems-edit-page/workflowitems-edit-page-routing-paths.ts b/src/app/+workflowitems-edit-page/workflowitems-edit-page-routing-paths.ts index 7d09a6915e..a8802e7a2f 100644 --- a/src/app/+workflowitems-edit-page/workflowitems-edit-page-routing-paths.ts +++ b/src/app/+workflowitems-edit-page/workflowitems-edit-page-routing-paths.ts @@ -6,15 +6,15 @@ export function getWorkflowItemPageRoute(wfiId: string) { } export function getWorkflowItemEditRoute(wfiId: string) { - return new URLCombiner(getWorkflowItemModuleRoute(), wfiId, WORKFLOW_ITEM_EDIT_PATH).toString() + return new URLCombiner(getWorkflowItemModuleRoute(), wfiId, WORKFLOW_ITEM_EDIT_PATH).toString(); } export function getWorkflowItemDeleteRoute(wfiId: string) { - return new URLCombiner(getWorkflowItemModuleRoute(), wfiId, WORKFLOW_ITEM_DELETE_PATH).toString() + return new URLCombiner(getWorkflowItemModuleRoute(), wfiId, WORKFLOW_ITEM_DELETE_PATH).toString(); } export function getWorkflowItemSendBackRoute(wfiId: string) { - return new URLCombiner(getWorkflowItemModuleRoute(), wfiId, WORKFLOW_ITEM_SEND_BACK_PATH).toString() + return new URLCombiner(getWorkflowItemModuleRoute(), wfiId, WORKFLOW_ITEM_SEND_BACK_PATH).toString(); } export const WORKFLOW_ITEM_EDIT_PATH = 'edit'; diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 43ae0534ad..10cda90755 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -169,7 +169,7 @@ export class AppComponent implements OnInit, AfterViewInit { private initializeKlaro() { if (hasValue(this.cookiesService)) { - this.cookiesService.initialize() + this.cookiesService.initialize(); } } } diff --git a/src/app/app.metareducers.ts b/src/app/app.metareducers.ts index 131d240b79..4cdecdc797 100644 --- a/src/app/app.metareducers.ts +++ b/src/app/app.metareducers.ts @@ -11,7 +11,7 @@ export function debugMetaReducer(reducer) { console.log('action', JSON.stringify(action)); console.log('------------------------------------'); return reducer(state, action); - } + }; } export function universalMetaReducer(reducer) { @@ -25,7 +25,7 @@ export function universalMetaReducer(reducer) { break; } return reducer(state, action); - } + }; } export const debugMetaReducers = [ diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 7483f74093..0aa243ca4d 100755 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -47,7 +47,7 @@ export function getBase() { return environment.ui.nameSpace; } -export function getMetaReducers(): Array> { +export function getMetaReducers(): MetaReducer[] { return environment.debug ? [...appMetaReducers, ...debugMetaReducers] : appMetaReducers; } diff --git a/src/app/community-list-page/community-list-service.ts b/src/app/community-list-page/community-list-service.ts index 1ec0482ae9..b6f042d0ef 100644 --- a/src/app/community-list-page/community-list-service.ts +++ b/src/app/community-list-page/community-list-service.ts @@ -44,7 +44,7 @@ export class ShowMoreFlatNode { } // Helper method to combine an flatten an array of observables of flatNode arrays -export const combineAndFlatten = (obsList: Array>): Observable => +export const combineAndFlatten = (obsList: Observable[]): Observable => observableCombineLatest([...obsList]).pipe( map((matrix: any[][]) => [].concat(...matrix)) ); @@ -138,18 +138,18 @@ export class CommunityListService { topCommunities.push(this.getTopCommunities(pagination)); } const topComs$ = observableCombineLatest([...topCommunities]).pipe( - map((coms: Array>) => { + map((coms: PaginatedList[]) => { const newPages: Community[][] = coms.map((unit: PaginatedList) => unit.page); const newPage: Community[] = [].concat(...newPages); let newPageInfo = new PageInfo(); if (coms && coms.length > 0) { - newPageInfo = Object.assign({}, coms[0].pageInfo, { currentPage }) + newPageInfo = Object.assign({}, coms[0].pageInfo, { currentPage }); } return new PaginatedList(newPageInfo, newPage); }) ); return topComs$.pipe(mergeMap((topComs: PaginatedList) => this.transformListOfCommunities(topComs, 0, null, expandedNodes))); - }; + } /** * Puts the initial top level communities in a list to be called upon @@ -185,7 +185,7 @@ export class CommunityListService { } let obsList = listOfPaginatedCommunities.page .map((community: Community) => { - return this.transformCommunity(community, level, parent, expandedNodes) + return this.transformCommunity(community, level, parent, expandedNodes); }); if (currentPage < listOfPaginatedCommunities.totalPages && currentPage === listOfPaginatedCommunities.currentPage) { obsList = [...obsList, observableOf([showMoreFlatNode('community', level, parent)])]; diff --git a/src/app/community-list-page/community-list.actions.ts b/src/app/community-list-page/community-list.actions.ts index bfce6fba34..1d2f732ac4 100644 --- a/src/app/community-list-page/community-list.actions.ts +++ b/src/app/community-list-page/community-list.actions.ts @@ -23,9 +23,9 @@ export class CommunityListSaveAction implements Action { }; constructor(expandedNodes: FlatNode[], loadingNode: FlatNode) { - this.payload = { expandedNodes, loadingNode } + this.payload = { expandedNodes, loadingNode }; } -}; +} /** * Export a type alias of all actions in this action group diff --git a/src/app/community-list-page/community-list.reducer.ts b/src/app/community-list-page/community-list.reducer.ts index b455fc496a..236201b353 100644 --- a/src/app/community-list-page/community-list.reducer.ts +++ b/src/app/community-list-page/community-list.reducer.ts @@ -27,7 +27,7 @@ export function CommunityListReducer(state = initialState, action: CommunityList return Object.assign({}, state, { expandedNodes: (action as CommunityListSaveAction).payload.expandedNodes, loadingNode: (action as CommunityListSaveAction).payload.loadingNode, - }) + }); } default: { return state; diff --git a/src/app/core/auth/auth.effects.ts b/src/app/core/auth/auth.effects.ts index ab18dcb508..9452af1fb8 100644 --- a/src/app/core/auth/auth.effects.ts +++ b/src/app/core/auth/auth.effects.ts @@ -238,7 +238,7 @@ export class AuthEffects { .pipe( map((authMethodModels: AuthMethod[]) => new RetrieveAuthMethodsSuccessAction(authMethodModels)), catchError((error) => observableOf(new RetrieveAuthMethodsErrorAction())) - ) + ); }) ); diff --git a/src/app/core/auth/auth.interceptor.ts b/src/app/core/auth/auth.interceptor.ts index 3366cdb3d8..31de304665 100644 --- a/src/app/core/auth/auth.interceptor.ts +++ b/src/app/core/auth/auth.interceptor.ts @@ -73,7 +73,7 @@ export class AuthInterceptor implements HttpInterceptor { * @param http */ private isLoginResponse(http: HttpRequest | HttpResponseBase): boolean { - return http.url && http.url.endsWith('/authn/login') + return http.url && http.url.endsWith('/authn/login'); } /** @@ -270,7 +270,7 @@ export class AuthInterceptor implements HttpInterceptor { body: Object.assign(response.body, { authMethods: this.parseAuthMethodsFromHeaders(response.headers) }) - }) + }); } else { // logout successfully authRes = response.clone({ diff --git a/src/app/core/auth/models/auth-error.model.ts b/src/app/core/auth/models/auth-error.model.ts index d68d04748e..1d791e676c 100644 --- a/src/app/core/auth/models/auth-error.model.ts +++ b/src/app/core/auth/models/auth-error.model.ts @@ -1,7 +1,7 @@ export interface AuthError { - error: string, - message: string, - path: string, - status: number - timestamp: number + error: string; + message: string; + path: string; + status: number; + timestamp: number; } diff --git a/src/app/core/auth/token-response-parsing.service.ts b/src/app/core/auth/token-response-parsing.service.ts index a1b1e23aa4..6b07400908 100644 --- a/src/app/core/auth/token-response-parsing.service.ts +++ b/src/app/core/auth/token-response-parsing.service.ts @@ -16,7 +16,7 @@ export class TokenResponseParsingService implements ResponseParsingService { if (isNotEmpty(data.payload) && isNotEmpty(data.payload.token) && (data.statusCode === 200)) { return new TokenResponse(data.payload.token, true, data.statusCode, data.statusText); } else { - return new TokenResponse(null, false, data.statusCode, data.statusText) + return new TokenResponse(null, false, data.statusCode, data.statusText); } } diff --git a/src/app/core/breadcrumbs/collection-breadcrumb.resolver.ts b/src/app/core/breadcrumbs/collection-breadcrumb.resolver.ts index 80d7563637..46c9d2fcc5 100644 --- a/src/app/core/breadcrumbs/collection-breadcrumb.resolver.ts +++ b/src/app/core/breadcrumbs/collection-breadcrumb.resolver.ts @@ -21,7 +21,7 @@ export class CollectionBreadcrumbResolver extends DSOBreadcrumbResolver> { + get followLinks(): FollowLinkConfig[] { return [ followLink('parentCommunity', undefined, true, followLink('parentCommunity') diff --git a/src/app/core/breadcrumbs/community-breadcrumb.resolver.ts b/src/app/core/breadcrumbs/community-breadcrumb.resolver.ts index 298d69133f..e9d8b9879c 100644 --- a/src/app/core/breadcrumbs/community-breadcrumb.resolver.ts +++ b/src/app/core/breadcrumbs/community-breadcrumb.resolver.ts @@ -21,7 +21,7 @@ export class CommunityBreadcrumbResolver extends DSOBreadcrumbResolver> { + get followLinks(): FollowLinkConfig[] { return [ followLink('parentCommunity') ]; diff --git a/src/app/core/breadcrumbs/dso-breadcrumb.resolver.ts b/src/app/core/breadcrumbs/dso-breadcrumb.resolver.ts index 03d4db3f5d..3b4b55ac58 100644 --- a/src/app/core/breadcrumbs/dso-breadcrumb.resolver.ts +++ b/src/app/core/breadcrumbs/dso-breadcrumb.resolver.ts @@ -50,5 +50,5 @@ export abstract class DSOBreadcrumbResolver>; + abstract get followLinks(): FollowLinkConfig[]; } diff --git a/src/app/core/breadcrumbs/dso-breadcrumbs.service.ts b/src/app/core/breadcrumbs/dso-breadcrumbs.service.ts index fc1bb9e770..cfc04ff513 100644 --- a/src/app/core/breadcrumbs/dso-breadcrumbs.service.ts +++ b/src/app/core/breadcrumbs/dso-breadcrumbs.service.ts @@ -41,7 +41,7 @@ export class DSOBreadcrumbsService implements BreadcrumbsService) => { if (hasValue(parentRD.payload)) { const parent = parentRD.payload; - return this.getBreadcrumbs(parent, getDSORoute(parent)) + return this.getBreadcrumbs(parent, getDSORoute(parent)); } return observableOf([]); diff --git a/src/app/core/breadcrumbs/i18n-breadcrumb.resolver.ts b/src/app/core/breadcrumbs/i18n-breadcrumb.resolver.ts index cce36f590a..b3fadbbaa9 100644 --- a/src/app/core/breadcrumbs/i18n-breadcrumb.resolver.ts +++ b/src/app/core/breadcrumbs/i18n-breadcrumb.resolver.ts @@ -24,7 +24,7 @@ export class I18nBreadcrumbResolver implements Resolve> resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): BreadcrumbConfig { const key = route.data.breadcrumbKey; if (hasNoValue(key)) { - throw new Error('You provided an i18nBreadcrumbResolver for url \"' + route.url + '\" but no breadcrumbKey in the route\'s data') + throw new Error('You provided an i18nBreadcrumbResolver for url \"' + route.url + '\" but no breadcrumbKey in the route\'s data'); } const fullPath = currentPathFromSnapshot(route); return { provider: this.breadcrumbService, key: key, url: fullPath }; diff --git a/src/app/core/breadcrumbs/item-breadcrumb.resolver.ts b/src/app/core/breadcrumbs/item-breadcrumb.resolver.ts index 8e13eda01d..ceabf5b4f3 100644 --- a/src/app/core/breadcrumbs/item-breadcrumb.resolver.ts +++ b/src/app/core/breadcrumbs/item-breadcrumb.resolver.ts @@ -21,7 +21,7 @@ export class ItemBreadcrumbResolver extends DSOBreadcrumbResolver { * The self links defined in this list are expected to be requested somewhere in the near future * Requesting them as embeds will limit the number of requests */ - get followLinks(): Array> { + get followLinks(): FollowLinkConfig[] { return [ followLink('owningCollection', undefined, true, followLink('parentCommunity', undefined, true, diff --git a/src/app/core/browse/browse.service.ts b/src/app/core/browse/browse.service.ts index 78e63e8540..999ae56762 100644 --- a/src/app/core/browse/browse.service.ts +++ b/src/app/core/browse/browse.service.ts @@ -77,7 +77,7 @@ export class BrowseService { ensureArrayHasValue(), map((definitions: BrowseDefinition[]) => definitions .map((definition: BrowseDefinition) => { - return Object.assign(new BrowseDefinition(), definition) + return Object.assign(new BrowseDefinition(), definition); })), distinctUntilChanged(), ); diff --git a/src/app/core/cache/builders/build-decorators.ts b/src/app/core/cache/builders/build-decorators.ts index 06a955cb00..d38e37fc11 100644 --- a/src/app/core/cache/builders/build-decorators.ts +++ b/src/app/core/cache/builders/build-decorators.ts @@ -111,7 +111,7 @@ export const link = ( }); linkMap.set(target.constructor, targetMap); - } + }; }; /** @@ -155,5 +155,5 @@ export function inheritLinkAnnotations(parent: any): any { }); linkMap.set(child, childMap); - } + }; } diff --git a/src/app/core/cache/builders/link.service.ts b/src/app/core/cache/builders/link.service.ts index dc65eab68f..24dc77d1d8 100644 --- a/src/app/core/cache/builders/link.service.ts +++ b/src/app/core/cache/builders/link.service.ts @@ -25,7 +25,7 @@ export class LinkService { * @param model the {@link HALResource} to resolve the links for * @param linksToFollow the {@link FollowLinkConfig}s to resolve */ - public resolveLinks(model: T, ...linksToFollow: Array>): T { + public resolveLinks(model: T, ...linksToFollow: FollowLinkConfig[]): T { linksToFollow.forEach((linkToFollow: FollowLinkConfig) => { this.resolveLink(model, linkToFollow); }); diff --git a/src/app/core/cache/builders/remote-data-build.service.ts b/src/app/core/cache/builders/remote-data-build.service.ts index 83cecca502..82eebabb2c 100644 --- a/src/app/core/cache/builders/remote-data-build.service.ts +++ b/src/app/core/cache/builders/remote-data-build.service.ts @@ -29,7 +29,7 @@ export class RemoteDataBuildService { * @param href$ Observable href of object we want to retrieve * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - buildSingle(href$: string | Observable, ...linksToFollow: Array>): Observable> { + buildSingle(href$: string | Observable, ...linksToFollow: FollowLinkConfig[]): Observable> { if (typeof href$ === 'string') { href$ = observableOf(href$); } @@ -117,7 +117,7 @@ export class RemoteDataBuildService { * @param href$ Observable href of objects we want to retrieve * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - buildList(href$: string | Observable, ...linksToFollow: Array>): Observable>> { + buildList(href$: string | Observable, ...linksToFollow: FollowLinkConfig[]): Observable>> { if (typeof href$ === 'string') { href$ = observableOf(href$); } @@ -154,7 +154,7 @@ export class RemoteDataBuildService { return this.toRemoteDataObservable(requestEntry$, payload$); } - aggregate(input: Array>>): Observable> { + aggregate(input: Observable>[]): Observable> { if (isEmpty(input)) { return createSuccessfulRemoteDataObject$([]); @@ -223,7 +223,7 @@ export class RemoteDataBuildService { error, payload ); - })) + })); } private toPaginatedList(input: Observable>>, pageInfo: PageInfo): Observable>> { @@ -232,7 +232,7 @@ export class RemoteDataBuildService { const rdAny = rd as any; const newRD = new RemoteData(rdAny.requestPending, rdAny.responsePending, rdAny.isSuccessful, rd.error, undefined); if (Array.isArray(rd.payload)) { - return Object.assign(newRD, { payload: new PaginatedList(pageInfo, rd.payload) }) + return Object.assign(newRD, { payload: new PaginatedList(pageInfo, rd.payload) }); } else if (isNotUndefined(rd.payload)) { return Object.assign(newRD, { payload: new PaginatedList(pageInfo, rd.payload.page) }); } else { diff --git a/src/app/core/cache/object-cache.reducer.ts b/src/app/core/cache/object-cache.reducer.ts index 38b52ad8c5..32fdd53da9 100644 --- a/src/app/core/cache/object-cache.reducer.ts +++ b/src/app/core/cache/object-cache.reducer.ts @@ -45,7 +45,7 @@ export class CacheableObject extends TypedObject implements HALResource { _links: { self: HALLink; - } + }; // isNew: boolean; // dirtyType: DirtyType; // hasDirtyAttributes: boolean; @@ -74,7 +74,7 @@ export class ObjectCacheEntry implements CacheEntry { * and ObjectCacheEntries as values */ export interface ObjectCacheState { - [href: string]: ObjectCacheEntry + [href: string]: ObjectCacheEntry; } // Object.create(null) ensures the object has no default js properties (e.g. `__proto__`) @@ -98,11 +98,11 @@ export function objectCacheReducer(state = initialState, action: ObjectCacheActi } case ObjectCacheActionTypes.REMOVE: { - return removeFromObjectCache(state, action as RemoveFromObjectCacheAction) + return removeFromObjectCache(state, action as RemoveFromObjectCacheAction); } case ObjectCacheActionTypes.RESET_TIMESTAMPS: { - return resetObjectCacheTimestamps(state, action as ResetObjectCacheTimestampsAction) + return resetObjectCacheTimestamps(state, action as ResetObjectCacheTimestampsAction); } case ObjectCacheActionTypes.ADD_PATCH: { diff --git a/src/app/core/cache/object-cache.service.ts b/src/app/core/cache/object-cache.service.ts index 745133373d..cb72a03896 100644 --- a/src/app/core/cache/object-cache.service.ts +++ b/src/app/core/cache/object-cache.service.ts @@ -90,7 +90,7 @@ export class ObjectCacheService { select(selfLinkFromUuidSelector(uuid)), mergeMap((selfLink: string) => this.getObjectBySelfLink(selfLink) ) - ) + ); } /** @@ -118,7 +118,7 @@ export class ObjectCacheService { if (typeof type !== 'function') { throw new Error(`${type} is not a valid constructor for ${JSON.stringify(entry.data)}`); } - return Object.assign(new type(), entry.data) as T + return Object.assign(new type(), entry.data) as T; }) ); } diff --git a/src/app/core/cache/response.models.ts b/src/app/core/cache/response.models.ts index b33080b641..53ed8e6d11 100644 --- a/src/app/core/cache/response.models.ts +++ b/src/app/core/cache/response.models.ts @@ -193,7 +193,7 @@ export class PostPatchSuccessResponse extends RestResponse { export class SubmissionSuccessResponse extends RestResponse { constructor( - public dataDefinition: Array, + public dataDefinition: (SubmissionObject | ConfigObject | string)[], public statusCode: number, public statusText: string, public pageInfo?: PageInfo diff --git a/src/app/core/cache/server-sync-buffer.actions.ts b/src/app/core/cache/server-sync-buffer.actions.ts index fd7e04ef8a..6095083a6c 100644 --- a/src/app/core/cache/server-sync-buffer.actions.ts +++ b/src/app/core/cache/server-sync-buffer.actions.ts @@ -79,4 +79,4 @@ export class EmptySSBAction implements Action { export type ServerSyncBufferAction = AddToSSBAction | CommitSSBAction - | EmptySSBAction + | EmptySSBAction; diff --git a/src/app/core/cache/server-sync-buffer.effects.ts b/src/app/core/cache/server-sync-buffer.effects.ts index 45ed3788c9..0a6b62ef9c 100644 --- a/src/app/core/cache/server-sync-buffer.effects.ts +++ b/src/app/core/cache/server-sync-buffer.effects.ts @@ -39,7 +39,7 @@ export class ServerSyncBufferEffects { const timeoutInSeconds = autoSyncConfig.timePerMethod[action.payload.method] || autoSyncConfig.defaultTime; return observableOf(new CommitSSBAction(action.payload.method)).pipe( delay(timeoutInSeconds * 1000), - ) + ); }) ); @@ -57,7 +57,7 @@ export class ServerSyncBufferEffects { select(serverSyncBufferSelector()), take(1), /* necessary, otherwise delay will not have any effect after the first run */ switchMap((bufferState: ServerSyncBufferState) => { - const actions: Array> = bufferState.buffer + const actions: Observable[] = bufferState.buffer .filter((entry: ServerSyncBufferEntry) => { /* If there's a request method, filter If there's no filter, commit everything */ diff --git a/src/app/core/cache/server-sync-buffer.reducer.ts b/src/app/core/cache/server-sync-buffer.reducer.ts index 7b65db0fbb..3e8944aa73 100644 --- a/src/app/core/cache/server-sync-buffer.reducer.ts +++ b/src/app/core/cache/server-sync-buffer.reducer.ts @@ -42,7 +42,7 @@ export function serverSyncBufferReducer(state = initialState, action: ServerSync switch (action.type) { case ServerSyncBufferActionTypes.ADD: { - return addToServerSyncQueue(state, action as AddToSSBAction) + return addToServerSyncQueue(state, action as AddToSSBAction); } case ServerSyncBufferActionTypes.EMPTY: { diff --git a/src/app/core/config/models/config-submission-section.model.ts b/src/app/core/config/models/config-submission-section.model.ts index d8249297b1..44f1fac820 100644 --- a/src/app/core/config/models/config-submission-section.model.ts +++ b/src/app/core/config/models/config-submission-section.model.ts @@ -9,8 +9,8 @@ import { ConfigObject } from './config.model'; * An interface that define section visibility and its properties. */ export interface SubmissionSectionVisibility { - main: any, - other: any + main: any; + other: any; } @typedObject @@ -49,6 +49,6 @@ export class SubmissionSectionModel extends ConfigObject { _links: { self: HALLink; config: HALLink; - } + }; } diff --git a/src/app/core/core.reducers.ts b/src/app/core/core.reducers.ts index 78391eee3f..077aa3dc95 100644 --- a/src/app/core/core.reducers.ts +++ b/src/app/core/core.reducers.ts @@ -16,15 +16,15 @@ import { historyReducer, HistoryState } from './history/history.reducer'; export interface CoreState { 'bitstreamFormats': BitstreamFormatRegistryState; - 'cache/object': ObjectCacheState, - 'cache/syncbuffer': ServerSyncBufferState, - 'cache/object-updates': ObjectUpdatesState - 'data/request': RequestState, + 'cache/object': ObjectCacheState; + 'cache/syncbuffer': ServerSyncBufferState; + 'cache/object-updates': ObjectUpdatesState; + 'data/request': RequestState; 'history': HistoryState; - 'index': MetaIndexState, - 'auth': AuthState, - 'json/patch': JsonPatchOperationsState, - 'route': RouteState + 'index': MetaIndexState; + 'auth': AuthState; + 'json/patch': JsonPatchOperationsState; + 'route': RouteState; } export const coreReducers: ActionReducerMap = { diff --git a/src/app/core/data/array-move-change-analyzer.service.ts b/src/app/core/data/array-move-change-analyzer.service.ts index 39d22fc463..855b7e07e1 100644 --- a/src/app/core/data/array-move-change-analyzer.service.ts +++ b/src/app/core/data/array-move-change-analyzer.service.ts @@ -28,7 +28,7 @@ export class ArrayMoveChangeAnalyzer { op: 'move', from: '/' + movedIndex, path: '/' + otherIndex - }) as MoveOperation) + }) as MoveOperation); } } }); diff --git a/src/app/core/data/base-response-parsing.service.ts b/src/app/core/data/base-response-parsing.service.ts index d69ebfbed5..1cfaa3881c 100644 --- a/src/app/core/data/base-response-parsing.service.ts +++ b/src/app/core/data/base-response-parsing.service.ts @@ -63,7 +63,7 @@ export abstract class BaseResponseParsingService { } else if (isRestDataObject(data._embedded[property])) { object[property] = this.retrieveObjectOrUrl(parsedObj); } else if (Array.isArray(parsedObj)) { - object[property] = parsedObj.map((obj) => this.retrieveObjectOrUrl(obj)) + object[property] = parsedObj.map((obj) => this.retrieveObjectOrUrl(obj)); } } }); diff --git a/src/app/core/data/bitstream-data.service.ts b/src/app/core/data/bitstream-data.service.ts index 46a6996e44..99e289ea36 100644 --- a/src/app/core/data/bitstream-data.service.ts +++ b/src/app/core/data/bitstream-data.service.ts @@ -68,7 +68,7 @@ export class BitstreamDataService extends DataService { * @param bundle the bundle to retrieve bitstreams from * @param options options for the find all request */ - findAllByBundle(bundle: Bundle, options?: FindListOptions, ...linksToFollow: Array>): Observable>> { + findAllByBundle(bundle: Bundle, options?: FindListOptions, ...linksToFollow: FollowLinkConfig[]): Observable>> { return this.findAllByHref(bundle._links.bitstreams.href, options, ...linksToFollow); } @@ -163,13 +163,13 @@ export class BitstreamDataService extends DataService { * @param options the {@link FindListOptions} for the request * @param linksToFollow the {@link FollowLinkConfig}s for the request */ - public findAllByItemAndBundleName(item: Item, bundleName: string, options?: FindListOptions, ...linksToFollow: Array>): Observable>> { + public findAllByItemAndBundleName(item: Item, bundleName: string, options?: FindListOptions, ...linksToFollow: FollowLinkConfig[]): Observable>> { return this.bundleService.findByItemAndName(item, bundleName).pipe( switchMap((bundleRD: RemoteData) => { if (bundleRD.hasSucceeded && hasValue(bundleRD.payload)) { return this.findAllByBundle(bundleRD.payload, options, ...linksToFollow); } else if (!bundleRD.hasSucceeded && bundleRD.error.statusCode === 404) { - return createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])) + return createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])); } else { return [bundleRD as any]; } diff --git a/src/app/core/data/bundle-data.service.ts b/src/app/core/data/bundle-data.service.ts index c79c6b4e76..db7df83068 100644 --- a/src/app/core/data/bundle-data.service.ts +++ b/src/app/core/data/bundle-data.service.ts @@ -54,7 +54,7 @@ export class BundleDataService extends DataService { * @param options the {@link FindListOptions} for the request * @param linksToFollow the {@link FollowLinkConfig}s for the request */ - findAllByItem(item: Item, options?: FindListOptions, ...linksToFollow: Array>): Observable>> { + findAllByItem(item: Item, options?: FindListOptions, ...linksToFollow: FollowLinkConfig[]): Observable>> { return this.findAllByHref(item._links.bundles.href, options, ...linksToFollow); } @@ -66,7 +66,7 @@ export class BundleDataService extends DataService { * @param linksToFollow the {@link FollowLinkConfig}s for the request */ // TODO should be implemented rest side - findByItemAndName(item: Item, bundleName: string, ...linksToFollow: Array>): Observable> { + findByItemAndName(item: Item, bundleName: string, ...linksToFollow: FollowLinkConfig[]): Observable> { return this.findAllByItem(item, { elementsPerPage: Number.MAX_SAFE_INTEGER }, ...linksToFollow).pipe( map((rd: RemoteData>) => { if (hasValue(rd.payload) && hasValue(rd.payload.page)) { @@ -81,7 +81,7 @@ export class BundleDataService extends DataService { matchingBundle ); } else { - return new RemoteData(false, false, false, new RemoteDataError(404, 'Not found', `The bundle with name ${bundleName} was not found.` )) + return new RemoteData(false, false, false, new RemoteDataError(404, 'Not found', `The bundle with name ${bundleName} was not found.` )); } } else { return rd as any; @@ -108,7 +108,7 @@ export class BundleDataService extends DataService { * @param searchOptions The search options to use * @param linksToFollow The {@link FollowLinkConfig}s for the request */ - getBitstreams(bundleId: string, searchOptions?: PaginatedSearchOptions, ...linksToFollow: Array>): Observable>> { + getBitstreams(bundleId: string, searchOptions?: PaginatedSearchOptions, ...linksToFollow: FollowLinkConfig[]): Observable>> { const hrefObs = this.getBitstreamsEndpoint(bundleId, searchOptions); hrefObs.pipe( diff --git a/src/app/core/data/collection-data.service.ts b/src/app/core/data/collection-data.service.ts index 510832e733..38e3b3b86b 100644 --- a/src/app/core/data/collection-data.service.ts +++ b/src/app/core/data/collection-data.service.ts @@ -77,7 +77,7 @@ export class CollectionDataService extends ComColDataService { * @return Observable>> * collection list */ - getAuthorizedCollection(query: string, options: FindListOptions = {}, ...linksToFollow: Array>): Observable>> { + getAuthorizedCollection(query: string, options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig[]): Observable>> { const searchHref = 'findSubmitAuthorized'; options = Object.assign({}, options, { searchParams: [new RequestParam('query', query)] @@ -219,7 +219,7 @@ export class CollectionDataService extends ComColDataService { * @param searchOptions Search options to sort or filter out items * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - getMappedItems(collectionId: string, searchOptions?: PaginatedSearchOptions, ...linksToFollow: Array>): Observable>> { + getMappedItems(collectionId: string, searchOptions?: PaginatedSearchOptions, ...linksToFollow: FollowLinkConfig[]): Observable>> { const requestUuid = this.requestService.generateRequestId(); const href$ = this.getMappedItemsEndpoint(collectionId).pipe( diff --git a/src/app/core/data/comcol-data.service.ts b/src/app/core/data/comcol-data.service.ts index d83518a3b0..7fa8f31d4f 100644 --- a/src/app/core/data/comcol-data.service.ts +++ b/src/app/core/data/comcol-data.service.ts @@ -97,7 +97,7 @@ export abstract class ComColDataService extends DataS public getLogoEndpoint(id: string): Observable { return this.halService.getEndpoint(this.linkPath).pipe( switchMap((href: string) => this.halService.getEndpoint('logo', `${href}/${id}`)) - ) + ); } /** diff --git a/src/app/core/data/data.service.ts b/src/app/core/data/data.service.ts index e3f367c8bf..101a829937 100644 --- a/src/app/core/data/data.service.ts +++ b/src/app/core/data/data.service.ts @@ -71,7 +71,7 @@ export abstract class DataService implements UpdateDa * Return an observable that emits created HREF * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - public getFindAllHref(options: FindListOptions = {}, linkPath?: string, ...linksToFollow: Array>): Observable { + public getFindAllHref(options: FindListOptions = {}, linkPath?: string, ...linksToFollow: FollowLinkConfig[]): Observable { let endpoint$: Observable; const args = []; @@ -93,7 +93,7 @@ export abstract class DataService implements UpdateDa * Return an observable that emits created HREF * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - public getSearchByHref(searchMethod: string, options: FindListOptions = {}, ...linksToFollow: Array>): Observable { + public getSearchByHref(searchMethod: string, options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig[]): Observable { let result$: Observable; const args = []; @@ -112,7 +112,7 @@ export abstract class DataService implements UpdateDa * Return an observable that emits created HREF * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - public buildHrefFromFindOptions(href: string, options: FindListOptions, extraArgs: string[] = [], ...linksToFollow: Array>): string { + public buildHrefFromFindOptions(href: string, options: FindListOptions, extraArgs: string[] = [], ...linksToFollow: FollowLinkConfig[]): string { let args = [...extraArgs]; if (hasValue(options.currentPage) && typeof options.currentPage === 'number') { @@ -131,7 +131,7 @@ export abstract class DataService implements UpdateDa if (hasValue(options.searchParams)) { options.searchParams.forEach((param: RequestParam) => { args = [...args, `${param.fieldName}=${param.fieldValue}`]; - }) + }); } args = this.addEmbedParams(args, ...linksToFollow); if (isNotEmpty(args)) { @@ -151,13 +151,13 @@ export abstract class DataService implements UpdateDa * @return {Observable} * Return an observable that emits created HREF */ - protected buildHrefWithParams(href: string, params: RequestParam[], ...linksToFollow: Array>): string { + protected buildHrefWithParams(href: string, params: RequestParam[], ...linksToFollow: FollowLinkConfig[]): string { let args = []; if (hasValue(params)) { params.forEach((param: RequestParam) => { args.push(`${param.fieldName}=${param.fieldValue}`); - }) + }); } args = this.addEmbedParams(args, ...linksToFollow); @@ -173,7 +173,7 @@ export abstract class DataService implements UpdateDa * @param args params for the query string * @param linksToFollow links we want to embed in query string if shouldEmbed is true */ - protected addEmbedParams(args: string[], ...linksToFollow: Array>) { + protected addEmbedParams(args: string[], ...linksToFollow: FollowLinkConfig[]) { linksToFollow.forEach((linkToFollow: FollowLinkConfig) => { if (linkToFollow !== undefined && linkToFollow.shouldEmbed) { const embedString = 'embed=' + String(linkToFollow.name); @@ -189,7 +189,7 @@ export abstract class DataService implements UpdateDa * @param embedString embedString so far (recursive) * @param linksToFollow links we want to embed in query string if shouldEmbed is true */ - protected addNestedEmbeds(embedString: string, ...linksToFollow: Array>): string { + protected addNestedEmbeds(embedString: string, ...linksToFollow: FollowLinkConfig[]): string { let nestEmbed = embedString; linksToFollow.forEach((linkToFollow: FollowLinkConfig) => { if (linkToFollow !== undefined && linkToFollow.shouldEmbed) { @@ -211,7 +211,7 @@ export abstract class DataService implements UpdateDa * @return {Observable>>} * Return an observable that emits object list */ - findAll(options: FindListOptions = {}, ...linksToFollow: Array>): Observable>> { + findAll(options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig[]): Observable>> { return this.findList(this.getFindAllHref(options), options, ...linksToFollow); } @@ -222,7 +222,7 @@ export abstract class DataService implements UpdateDa * @param options Find list options object * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - protected findList(href$, options: FindListOptions, ...linksToFollow: Array>) { + protected findList(href$, options: FindListOptions, ...linksToFollow: FollowLinkConfig[]) { href$.pipe( first((href: string) => hasValue(href))) .subscribe((href: string) => { @@ -242,7 +242,7 @@ export abstract class DataService implements UpdateDa * @param resourceID The identifier for the object * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - getIDHref(endpoint, resourceID, ...linksToFollow: Array>): string { + getIDHref(endpoint, resourceID, ...linksToFollow: FollowLinkConfig[]): string { return this.buildHrefFromFindOptions(endpoint + '/' + resourceID, {}, [], ...linksToFollow); } @@ -251,7 +251,7 @@ export abstract class DataService implements UpdateDa * @param resourceID The identifier for the object * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - getIDHrefObs(resourceID: string, ...linksToFollow: Array>): Observable { + getIDHrefObs(resourceID: string, ...linksToFollow: FollowLinkConfig[]): Observable { return this.getEndpoint().pipe( map((endpoint: string) => this.getIDHref(endpoint, resourceID, ...linksToFollow))); } @@ -262,7 +262,7 @@ export abstract class DataService implements UpdateDa * @param id ID of object we want to retrieve * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - findById(id: string, ...linksToFollow: Array>): Observable> { + findById(id: string, ...linksToFollow: FollowLinkConfig[]): Observable> { const hrefObs = this.getIDHrefObs(encodeURIComponent(id), ...linksToFollow); hrefObs.pipe( @@ -284,7 +284,7 @@ export abstract class DataService implements UpdateDa * @param href The url of object we want to retrieve * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - findByHref(href: string, ...linksToFollow: Array>): Observable> { + findByHref(href: string, ...linksToFollow: FollowLinkConfig[]): Observable> { const requestHref = this.buildHrefFromFindOptions(href, {}, [], ...linksToFollow); const request = new GetRequest(this.requestService.generateRequestId(), requestHref); if (hasValue(this.responseMsToLive)) { @@ -301,7 +301,7 @@ export abstract class DataService implements UpdateDa * @param findListOptions Find list options object * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - findAllByHref(href: string, findListOptions: FindListOptions = {}, ...linksToFollow: Array>): Observable>> { + findAllByHref(href: string, findListOptions: FindListOptions = {}, ...linksToFollow: FollowLinkConfig[]): Observable>> { const requestHref = this.buildHrefFromFindOptions(href, findListOptions, [], ...linksToFollow); const request = new GetRequest(this.requestService.generateRequestId(), requestHref); if (hasValue(this.responseMsToLive)) { @@ -331,7 +331,7 @@ export abstract class DataService implements UpdateDa * @return {Observable>} * Return an observable that emits response from the server */ - searchBy(searchMethod: string, options: FindListOptions = {}, ...linksToFollow: Array>): Observable>> { + searchBy(searchMethod: string, options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig[]): Observable>> { const requestId = this.requestService.generateRequestId(); const hrefObs = this.getSearchByHref(searchMethod, options, ...linksToFollow); @@ -456,7 +456,7 @@ export abstract class DataService implements UpdateDa if (hasValue(this.responseMsToLive)) { request.responseMsToLive = this.responseMsToLive; } - return request + return request; }) ); @@ -485,7 +485,7 @@ export abstract class DataService implements UpdateDa return selfLink$.pipe( switchMap((selfLink: string) => this.findByHref(selfLink)), - ) + ); } /** @@ -511,7 +511,7 @@ export abstract class DataService implements UpdateDa if (hasValue(this.responseMsToLive)) { request.responseMsToLive = this.responseMsToLive; } - return request + return request; }) ); diff --git a/src/app/core/data/dso-redirect-data.service.ts b/src/app/core/data/dso-redirect-data.service.ts index 87259a4279..18b63e8937 100644 --- a/src/app/core/data/dso-redirect-data.service.ts +++ b/src/app/core/data/dso-redirect-data.service.ts @@ -46,7 +46,7 @@ export class DsoRedirectDataService extends DataService { } } - getIDHref(endpoint, resourceID, ...linksToFollow: Array>): string { + getIDHref(endpoint, resourceID, ...linksToFollow: FollowLinkConfig[]): string { // Supporting both identifier (pid) and uuid (dso) endpoints return this.buildHrefFromFindOptions( endpoint.replace(/\{\?id\}/, `?id=${resourceID}`) .replace(/\{\?uuid\}/, `?uuid=${resourceID}`), @@ -73,11 +73,11 @@ export class DsoRedirectDataService extends DataService { getEndpointFromDSOType(dsoType: string): string { // Are there other types to consider? if (dsoType.startsWith('item')) { - return 'items' + return 'items'; } else if (dsoType.startsWith('community')) { return 'communities'; } else if (dsoType.startsWith('collection')) { - return 'collections' + return 'collections'; } else { return ''; } diff --git a/src/app/core/data/dso-response-parsing.service.ts b/src/app/core/data/dso-response-parsing.service.ts index a4d4941bc8..419ddcc2af 100644 --- a/src/app/core/data/dso-response-parsing.service.ts +++ b/src/app/core/data/dso-response-parsing.service.ts @@ -31,7 +31,7 @@ export class DSOResponseParsingService extends BaseResponseParsingService implem let objectList = processRequestDTO; if (hasNoValue(processRequestDTO)) { - return new DSOSuccessResponse([], data.statusCode, data.statusText, undefined) + return new DSOSuccessResponse([], data.statusCode, data.statusText, undefined); } if (hasValue(processRequestDTO.page)) { objectList = processRequestDTO.page; @@ -39,7 +39,7 @@ export class DSOResponseParsingService extends BaseResponseParsingService implem objectList = [processRequestDTO]; } const selfLinks = objectList.map((no) => no._links.self.href); - return new DSOSuccessResponse(selfLinks, data.statusCode, data.statusText, this.processPageInfo(data.payload)) + return new DSOSuccessResponse(selfLinks, data.statusCode, data.statusText, this.processPageInfo(data.payload)); } } diff --git a/src/app/core/data/dspace-object-data.service.ts b/src/app/core/data/dspace-object-data.service.ts index 61cc98281e..cf4ec62ea0 100644 --- a/src/app/core/data/dspace-object-data.service.ts +++ b/src/app/core/data/dspace-object-data.service.ts @@ -32,7 +32,7 @@ class DataServiceImpl extends DataService { super(); } - getIDHref(endpoint, resourceID, ...linksToFollow: Array>): string { + getIDHref(endpoint, resourceID, ...linksToFollow: FollowLinkConfig[]): string { return this.buildHrefFromFindOptions( endpoint.replace(/\{\?uuid\}/, `?uuid=${resourceID}`), {}, [], ...linksToFollow); } diff --git a/src/app/core/data/entity-type-data.service.ts b/src/app/core/data/entity-type-data.service.ts index 87de69b935..598b7789c3 100644 --- a/src/app/core/data/entity-type-data.service.ts +++ b/src/app/core/data/entity-type-data.service.ts @@ -68,7 +68,7 @@ export class ItemTypeDataService { * @param href The url of {@link ItemType} we want to retrieve * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - findByHref(href: string, ...linksToFollow: Array>): Observable> { + findByHref(href: string, ...linksToFollow: FollowLinkConfig[]): Observable> { return this.dataService.findByHref(href, ...linksToFollow); } @@ -78,7 +78,7 @@ export class ItemTypeDataService { * @param href The url of the {@link ItemType} we want to retrieve * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - findByAllHref(href: string, findListOptions: FindListOptions = {}, ...linksToFollow: Array>): Observable>> { + findByAllHref(href: string, findListOptions: FindListOptions = {}, ...linksToFollow: FollowLinkConfig[]): Observable>> { return this.dataService.findAllByHref(href, findListOptions, ...linksToFollow); } } diff --git a/src/app/core/data/entity-type.service.ts b/src/app/core/data/entity-type.service.ts index 350e6a0de5..cc68b6f240 100644 --- a/src/app/core/data/entity-type.service.ts +++ b/src/app/core/data/entity-type.service.ts @@ -56,7 +56,7 @@ export class EntityTypeService extends DataService { * @param entityTypeId * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - getEntityTypeRelationships(entityTypeId: string, ...linksToFollow: Array>): Observable>> { + getEntityTypeRelationships(entityTypeId: string, ...linksToFollow: FollowLinkConfig[]): Observable>> { const href$ = this.getRelationshipTypesEndpoint(entityTypeId); diff --git a/src/app/core/data/feature-authorization/authorization-data.service.ts b/src/app/core/data/feature-authorization/authorization-data.service.ts index c782d6975b..b7fc2cde79 100644 --- a/src/app/core/data/feature-authorization/authorization-data.service.ts +++ b/src/app/core/data/feature-authorization/authorization-data.service.ts @@ -82,7 +82,7 @@ export class AuthorizationDataService extends DataService { * @param options {@link FindListOptions} to provide pagination and/or additional arguments * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - searchByObject(featureId?: FeatureID, objectUrl?: string, ePersonUuid?: string, options: FindListOptions = {}, ...linksToFollow: Array>): Observable>> { + searchByObject(featureId?: FeatureID, objectUrl?: string, ePersonUuid?: string, options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig[]): Observable>> { return observableOf(new AuthorizationSearchParams(objectUrl, ePersonUuid, featureId)).pipe( addSiteObjectUrlIfEmpty(this.siteService), switchMap((params: AuthorizationSearchParams) => { @@ -100,7 +100,7 @@ export class AuthorizationDataService extends DataService { * @return {Observable>} * Return an observable that emits response from the server */ - searchBy(searchMethod: string, options: FindListOptions = {}, ...linksToFollow: Array>): Observable>> { + searchBy(searchMethod: string, options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig[]): Observable>> { const hrefObs = this.getSearchByHref(searchMethod, options, ...linksToFollow); return hrefObs.pipe( @@ -130,7 +130,7 @@ export class AuthorizationDataService extends DataService { if (isNotEmpty(options.searchParams)) { params = [...options.searchParams]; } - params.push(new RequestParam('uri', objectUrl)) + params.push(new RequestParam('uri', objectUrl)); if (hasValue(featureId)) { params.push(new RequestParam('feature', featureId)); } diff --git a/src/app/core/data/feature-authorization/authorization-utils.ts b/src/app/core/data/feature-authorization/authorization-utils.ts index 0c229d2eac..d1b65f6123 100644 --- a/src/app/core/data/feature-authorization/authorization-utils.ts +++ b/src/app/core/data/feature-authorization/authorization-utils.ts @@ -45,7 +45,7 @@ export const addAuthenticatedUserUuidIfEmpty = (authService: AuthService) => map((ePerson) => Object.assign({}, params, { ePersonUuid: ePerson.uuid })) ); } else { - return observableOf(params) + return observableOf(params); } }) ); diff --git a/src/app/core/data/feature-authorization/feature-data.service.ts b/src/app/core/data/feature-authorization/feature-data.service.ts index 386b74731f..7e39165673 100644 --- a/src/app/core/data/feature-authorization/feature-data.service.ts +++ b/src/app/core/data/feature-authorization/feature-data.service.ts @@ -50,7 +50,7 @@ export class FeatureDataService extends DataService { * @return {Observable>} * Return an observable that emits response from the server */ - searchBy(searchMethod: string, options: FindListOptions = {}, ...linksToFollow: Array>): Observable>> { + searchBy(searchMethod: string, options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig[]): Observable>> { const hrefObs = this.getSearchByHref(searchMethod, options, ...linksToFollow); return hrefObs.pipe( diff --git a/src/app/core/data/item-template-data.service.ts b/src/app/core/data/item-template-data.service.ts index 233c3c5608..0e85237ec9 100644 --- a/src/app/core/data/item-template-data.service.ts +++ b/src/app/core/data/item-template-data.service.ts @@ -101,7 +101,7 @@ class DataServiceImpl extends ItemDataService { * @param collectionID * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - findByCollectionID(collectionID: string, ...linksToFollow: Array>): Observable> { + findByCollectionID(collectionID: string, ...linksToFollow: FollowLinkConfig[]): Observable> { this.setCollectionEndpoint(collectionID); return super.findById(collectionID, ...linksToFollow); } @@ -175,7 +175,7 @@ export class ItemTemplateDataService implements UpdateDataService { * @param collectionID * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - findByCollectionID(collectionID: string, ...linksToFollow: Array>): Observable> { + findByCollectionID(collectionID: string, ...linksToFollow: FollowLinkConfig[]): Observable> { return this.dataService.findByCollectionID(collectionID, ...linksToFollow); } diff --git a/src/app/core/data/license-data.service.ts b/src/app/core/data/license-data.service.ts index 23637be596..16fb2ee050 100644 --- a/src/app/core/data/license-data.service.ts +++ b/src/app/core/data/license-data.service.ts @@ -68,7 +68,7 @@ export class LicenseDataService { * @param href The URL of object we want to retrieve * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - findByHref(href: string, ...linksToFollow: Array>): Observable> { + findByHref(href: string, ...linksToFollow: FollowLinkConfig[]): Observable> { return this.dataService.findByHref(href, ...linksToFollow); } @@ -78,7 +78,7 @@ export class LicenseDataService { * @param href The URL of object we want to retrieve * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - findByAllHref(href: string, findListOptions: FindListOptions = {}, ...linksToFollow: Array>): Observable>> { + findByAllHref(href: string, findListOptions: FindListOptions = {}, ...linksToFollow: FollowLinkConfig[]): Observable>> { return this.dataService.findAllByHref(href, findListOptions, ...linksToFollow); } } diff --git a/src/app/core/data/metadata-field-data.service.ts b/src/app/core/data/metadata-field-data.service.ts index 1c3cf6b65b..fb222e0a77 100644 --- a/src/app/core/data/metadata-field-data.service.ts +++ b/src/app/core/data/metadata-field-data.service.ts @@ -50,7 +50,7 @@ export class MetadataFieldDataService extends DataService { * @param options The options info used to retrieve the fields * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - findBySchema(schema: MetadataSchema, options: FindListOptions = {}, ...linksToFollow: Array>) { + findBySchema(schema: MetadataSchema, options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig[]) { const optionsWithSchema = Object.assign(new FindListOptions(), options, { searchParams: [new RequestParam('schema', schema.prefix)] }); @@ -71,7 +71,7 @@ export class MetadataFieldDataService extends DataService { * @param options The options info used to retrieve the fields * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved */ - searchByFieldNameParams(schema: string, element: string, qualifier: string, query: string, exactName: string, options: FindListOptions = {}, ...linksToFollow: Array>): Observable>> { + searchByFieldNameParams(schema: string, element: string, qualifier: string, query: string, exactName: string, options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig[]): Observable>> { const optionParams = Object.assign(new FindListOptions(), options, { searchParams: [ new RequestParam('schema', hasValue(schema) ? schema : ''), diff --git a/src/app/core/data/object-updates/object-updates.effects.ts b/src/app/core/data/object-updates/object-updates.effects.ts index 239fee9477..169fa89cd3 100644 --- a/src/app/core/data/object-updates/object-updates.effects.ts +++ b/src/app/core/data/object-updates/object-updates.effects.ts @@ -111,10 +111,10 @@ export class ObjectUpdatesEffects { map((updateAction: ObjectUpdatesAction) => { if (updateAction.type === ObjectUpdatesActionTypes.REINSTATE) { // If someone reinstated, do nothing, just let the reinstating happen - return { type: 'NO_ACTION' } + return { type: 'NO_ACTION' }; } // If someone performed another action, assume the user does not want to reinstate and remove all changes - return removeAction + return removeAction; }) ), this.notificationActionMap$[notification.id].pipe( @@ -129,7 +129,7 @@ export class ObjectUpdatesEffects { return removeAction; }) ) - ) + ); } ) ); diff --git a/src/app/core/data/object-updates/object-updates.reducer.ts b/src/app/core/data/object-updates/object-updates.reducer.ts index 94bb845aa8..f5f415918a 100644 --- a/src/app/core/data/object-updates/object-updates.reducer.ts +++ b/src/app/core/data/object-updates/object-updates.reducer.ts @@ -26,9 +26,9 @@ export const OBJECT_UPDATES_TRASH_PATH = '/trash'; * The state for a single field */ export interface FieldState { - editable: boolean, - isNew: boolean, - isValid: boolean + editable: boolean; + isNew: boolean; + isValid: boolean; } /** @@ -42,15 +42,15 @@ export interface FieldStates { * Represents every object that has a UUID */ export interface Identifiable { - uuid: string + uuid: string; } /** * The state of a single field update */ export interface FieldUpdate { - field: Identifiable, - changeType: FieldChangeType, + field: Identifiable; + changeType: FieldChangeType; } /** @@ -64,14 +64,14 @@ export interface FieldUpdates { * The states of all virtual metadata selections available for a single page, mapped by the relationship uuid */ export interface VirtualMetadataSources { - [source: string]: VirtualMetadataSource + [source: string]: VirtualMetadataSource; } /** * The selection of virtual metadata for a relationship, mapped by the uuid of either the item or the relationship type */ export interface VirtualMetadataSource { - [uuid: string]: boolean, + [uuid: string]: boolean; } /** @@ -79,8 +79,8 @@ export interface VirtualMetadataSource { * along with a selection of the virtual metadata to keep */ export interface DeleteRelationship extends Relationship { - keepLeftVirtualMetadata: boolean, - keepRightVirtualMetadata: boolean, + keepLeftVirtualMetadata: boolean; + keepRightVirtualMetadata: boolean; } /** @@ -193,7 +193,7 @@ function addFieldUpdate(state: any, action: AddFieldUpdateAction) { let states = pageState.fieldStates; if (changeType === FieldChangeType.ADD) { - states = Object.assign({}, { [field.uuid]: initialNewFieldState }, pageState.fieldStates) + states = Object.assign({}, { [field.uuid]: initialNewFieldState }, pageState.fieldStates); } let fieldUpdate: any = pageState.fieldUpdates[field.uuid] || {}; diff --git a/src/app/core/data/object-updates/object-updates.service.ts b/src/app/core/data/object-updates/object-updates.service.ts index 8bd32e54e2..7f10af10a3 100644 --- a/src/app/core/data/object-updates/object-updates.service.ts +++ b/src/app/core/data/object-updates/object-updates.service.ts @@ -72,7 +72,7 @@ export class ObjectUpdatesService { * @param changeType The last type of change applied to this field */ private saveFieldUpdate(url: string, field: Identifiable, changeType: FieldChangeType) { - this.store.dispatch(new AddFieldUpdateAction(url, field, changeType)) + this.store.dispatch(new AddFieldUpdateAction(url, field, changeType)); } /** @@ -139,7 +139,7 @@ export class ObjectUpdatesService { fieldUpdates[object.uuid] = fieldUpdate; } return fieldUpdates; - })) + })); } /** @@ -153,7 +153,7 @@ export class ObjectUpdatesService { filter((fieldState) => hasValue(fieldState)), map((fieldState) => fieldState.editable), distinctUntilChanged() - ) + ); } /** @@ -167,7 +167,7 @@ export class ObjectUpdatesService { filter((fieldState) => hasValue(fieldState)), map((fieldState) => fieldState.isValid), distinctUntilChanged() - ) + ); } /** @@ -178,10 +178,10 @@ export class ObjectUpdatesService { const objectUpdates = this.getObjectEntry(url); return objectUpdates.pipe( map((entry: ObjectUpdatesEntry) => { - return Object.values(entry.fieldStates).findIndex((state: FieldState) => !state.isValid) < 0 + return Object.values(entry.fieldStates).findIndex((state: FieldState) => !state.isValid) < 0; }), distinctUntilChanged() - ) + ); } /** @@ -317,7 +317,7 @@ export class ObjectUpdatesService { } }); return fields; - })) + })); } /** @@ -333,7 +333,7 @@ export class ObjectUpdatesService { * @param url The page's url to check for in the store */ isReinstatable(url: string): Observable { - return this.hasUpdates(url + OBJECT_UPDATES_TRASH_PATH) + return this.hasUpdates(url + OBJECT_UPDATES_TRASH_PATH); } /** diff --git a/src/app/core/data/object-updates/patch-operation-service/metadata-patch-operation.service.ts b/src/app/core/data/object-updates/patch-operation-service/metadata-patch-operation.service.ts index 3b590cf58c..4b894445de 100644 --- a/src/app/core/data/object-updates/patch-operation-service/metadata-patch-operation.service.ts +++ b/src/app/core/data/object-updates/patch-operation-service/metadata-patch-operation.service.ts @@ -82,7 +82,7 @@ export class MetadataPatchOperationService implements PatchOperationService { const val = { value: metadatum.value, language: metadatum.language - } + }; let operation: MetadataPatchOperation; switch (update.changeType) { diff --git a/src/app/core/data/processes/script-data.service.ts b/src/app/core/data/processes/script-data.service.ts index cecfeabf18..5f1fd73a8f 100644 --- a/src/app/core/data/processes/script-data.service.ts +++ b/src/app/core/data/processes/script-data.service.ts @@ -47,7 +47,7 @@ export class ScriptDataService extends DataService