diff --git a/src/app/access-control/epeople-registry/epeople-registry.component.ts b/src/app/access-control/epeople-registry/epeople-registry.component.ts index 2368ccd781..69eda7a60e 100644 --- a/src/app/access-control/epeople-registry/epeople-registry.component.ts +++ b/src/app/access-control/epeople-registry/epeople-registry.component.ts @@ -135,7 +135,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy { initialisePage() { this.searching$.next(true); this.isEPersonFormShown = false; - this.search({scope: this.currentSearchScope, query: this.currentSearchQuery}); + this.search({ scope: this.currentSearchScope, query: this.currentSearchQuery }); this.subs.push(this.epersonService.getActiveEPerson().subscribe((eperson: EPerson) => { if (eperson != null && eperson.id) { this.isEPersonFormShown = true; @@ -260,7 +260,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy { if (hasValue(ePerson.id)) { this.epersonService.deleteEPerson(ePerson).pipe(getFirstCompletedRemoteData()).subscribe((restResponse: RemoteData) => { if (restResponse.hasSucceeded) { - this.notificationsService.success(this.translateService.get(this.labelPrefix + 'notification.deleted.success', {name: this.dsoNameService.getName(ePerson)})); + this.notificationsService.success(this.translateService.get(this.labelPrefix + 'notification.deleted.success', { name: this.dsoNameService.getName(ePerson) })); } else { this.notificationsService.error('Error occured when trying to delete EPerson with id: ' + ePerson.id + ' with code: ' + restResponse.statusCode + ' and message: ' + restResponse.errorMessage); } @@ -301,7 +301,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy { this.searchForm.patchValue({ query: '', }); - this.search({query: ''}); + this.search({ query: '' }); } /** diff --git a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts index f8664de8be..9a8bba9d10 100644 --- a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts +++ b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts @@ -226,7 +226,7 @@ describe('EPersonFormComponent', () => { { provide: AuthService, useValue: authService }, { provide: AuthorizationDataService, useValue: authorizationService }, { provide: PaginationService, useValue: paginationService }, - { provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring'])}, + { provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring']) }, { provide: EpersonRegistrationService, useValue: epersonRegistrationService }, EPeopleRegistryComponent, ], diff --git a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts index c73dd85ce9..72fae049d8 100644 --- a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts +++ b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts @@ -549,10 +549,10 @@ export class EPersonFormComponent implements OnInit, OnDestroy { .subscribe((response: RemoteData) => { if (response.hasSucceeded) { this.notificationsService.success(this.translateService.get('admin.access-control.epeople.actions.reset'), - this.translateService.get('forgot-email.form.success.content', {email: this.epersonInitial.email})); + this.translateService.get('forgot-email.form.success.content', { email: this.epersonInitial.email })); } else { this.notificationsService.error(this.translateService.get('forgot-email.form.error.head'), - this.translateService.get('forgot-email.form.error.content', {email: this.epersonInitial.email})); + this.translateService.get('forgot-email.form.error.content', { email: this.epersonInitial.email })); } }, ); diff --git a/src/app/access-control/group-registry/group-form/validators/group-exists.validator.ts b/src/app/access-control/group-registry/group-form/validators/group-exists.validator.ts index 40fa416ae9..056c54bf6a 100644 --- a/src/app/access-control/group-registry/group-form/validators/group-exists.validator.ts +++ b/src/app/access-control/group-registry/group-form/validators/group-exists.validator.ts @@ -3,7 +3,7 @@ import { ValidationErrors, } from '@angular/forms'; import { Observable } from 'rxjs'; -import { map} from 'rxjs/operators'; +import { map } from 'rxjs/operators'; import { GroupDataService } from '../../../../core/eperson/group-data.service'; import { Group } from '../../../../core/eperson/models/group.model'; diff --git a/src/app/access-control/group-registry/group-page.guard.spec.ts b/src/app/access-control/group-registry/group-page.guard.spec.ts index fcb4882626..b1648f59ec 100644 --- a/src/app/access-control/group-registry/group-page.guard.spec.ts +++ b/src/app/access-control/group-registry/group-page.guard.spec.ts @@ -54,7 +54,7 @@ describe('GroupPageGuard', () => { it('should return true', (done) => { guard.canActivate( - routeSnapshotWithGroupId, { url: 'current-url'} as any, + routeSnapshotWithGroupId, { url: 'current-url' } as any, ).subscribe((result) => { expect(authorizationService.isAuthorized).toHaveBeenCalledWith( FeatureID.CanManageGroup, groupEndpointUrl, undefined, @@ -72,7 +72,7 @@ describe('GroupPageGuard', () => { it('should not return true', (done) => { guard.canActivate( - routeSnapshotWithGroupId, { url: 'current-url'} as any, + routeSnapshotWithGroupId, { url: 'current-url' } as any, ).subscribe((result) => { expect(authorizationService.isAuthorized).toHaveBeenCalledWith( FeatureID.CanManageGroup, groupEndpointUrl, undefined, diff --git a/src/app/access-control/group-registry/groups-registry.component.ts b/src/app/access-control/group-registry/groups-registry.component.ts index f56e710a0e..c5637256f0 100644 --- a/src/app/access-control/group-registry/groups-registry.component.ts +++ b/src/app/access-control/group-registry/groups-registry.component.ts @@ -147,7 +147,7 @@ export class GroupsRegistryComponent implements OnInit, OnDestroy { const query: string = data.query; if (query != null && this.currentSearchQuery !== query) { this.currentSearchQuery = query; - this.paginationService.updateRouteWithUrl(this.config.id, [], {page: 1}); + this.paginationService.updateRouteWithUrl(this.config.id, [], { page: 1 }); } return this.groupService.searchGroups(this.currentSearchQuery.trim(), { currentPage: paginationOptions.currentPage, diff --git a/src/app/admin/admin-registries/admin-registries-routing.module.ts b/src/app/admin/admin-registries/admin-registries-routing.module.ts index 0e4ac7fc95..3134d3285e 100644 --- a/src/app/admin/admin-registries/admin-registries-routing.module.ts +++ b/src/app/admin/admin-registries/admin-registries-routing.module.ts @@ -12,7 +12,7 @@ import { MetadataSchemaComponent } from './metadata-schema/metadata-schema.compo { path: 'metadata', resolve: { breadcrumb: I18nBreadcrumbResolver }, - data: {title: 'admin.registries.metadata.title', breadcrumbKey: 'admin.registries.metadata'}, + data: { title: 'admin.registries.metadata.title', breadcrumbKey: 'admin.registries.metadata' }, children: [ { path: '', @@ -22,7 +22,7 @@ import { MetadataSchemaComponent } from './metadata-schema/metadata-schema.compo path: ':schemaName', resolve: { breadcrumb: I18nBreadcrumbResolver }, component: MetadataSchemaComponent, - data: {title: 'admin.registries.schema.title', breadcrumbKey: 'admin.registries.schema'}, + data: { title: 'admin.registries.schema.title', breadcrumbKey: 'admin.registries.schema' }, }, ], }, @@ -31,7 +31,7 @@ import { MetadataSchemaComponent } from './metadata-schema/metadata-schema.compo resolve: { breadcrumb: I18nBreadcrumbResolver }, loadChildren: () => import('./bitstream-formats/bitstream-formats.module') .then((m) => m.BitstreamFormatsModule), - data: {title: 'admin.registries.bitstream-formats.title', breadcrumbKey: 'admin.registries.bitstream-formats'}, + data: { title: 'admin.registries.bitstream-formats.title', breadcrumbKey: 'admin.registries.bitstream-formats' }, }, ]), ], diff --git a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats-routing.module.ts b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats-routing.module.ts index 78f5fe6bb9..e4a2a36f26 100644 --- a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats-routing.module.ts +++ b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats-routing.module.ts @@ -21,7 +21,7 @@ const BITSTREAMFORMAT_ADD_PATH = 'add'; path: BITSTREAMFORMAT_ADD_PATH, resolve: { breadcrumb: I18nBreadcrumbResolver }, component: AddBitstreamFormatComponent, - data: {breadcrumbKey: 'admin.registries.bitstream-formats.create'}, + data: { breadcrumbKey: 'admin.registries.bitstream-formats.create' }, }, { path: BITSTREAMFORMAT_EDIT_PATH, @@ -30,7 +30,7 @@ const BITSTREAMFORMAT_ADD_PATH = 'add'; bitstreamFormat: BitstreamFormatsResolver, breadcrumb: I18nBreadcrumbResolver, }, - data: {breadcrumbKey: 'admin.registries.bitstream-formats.edit'}, + data: { breadcrumbKey: 'admin.registries.bitstream-formats.edit' }, }, ]), ], diff --git a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.ts b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.ts index 171c8fca8c..522f466735 100644 --- a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.ts +++ b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.ts @@ -141,7 +141,7 @@ export class BitstreamFormatsComponent implements OnInit, OnDestroy { const messages = observableCombineLatest( this.translateService.get(`${prefix}.${suffix}.head`), - this.translateService.get(`${prefix}.${suffix}.amount`, {amount: amount}), + this.translateService.get(`${prefix}.${suffix}.amount`, { amount: amount }), ); messages.subscribe(([head, content]) => { diff --git a/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts b/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts index 624641ff11..42a1e4baff 100644 --- a/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts +++ b/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts @@ -50,9 +50,9 @@ export class FormatFormComponent implements OnInit { /** * The different supported support level of the bitstream format */ - supportLevelOptions = [{label: BitstreamFormatSupportLevel.Known, value: BitstreamFormatSupportLevel.Known}, - {label: BitstreamFormatSupportLevel.Unknown, value: BitstreamFormatSupportLevel.Unknown}, - {label: BitstreamFormatSupportLevel.Supported, value: BitstreamFormatSupportLevel.Supported}]; + supportLevelOptions = [{ label: BitstreamFormatSupportLevel.Known, value: BitstreamFormatSupportLevel.Known }, + { label: BitstreamFormatSupportLevel.Unknown, value: BitstreamFormatSupportLevel.Unknown }, + { label: BitstreamFormatSupportLevel.Supported, value: BitstreamFormatSupportLevel.Supported }]; /** * Styling element for repeatable field 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 7801bda1b4..976ab572cc 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 @@ -173,7 +173,7 @@ export class MetadataRegistryComponent { const suffix = success ? 'success' : 'failure'; const messages = observableCombineLatest( this.translateService.get(success ? `${prefix}.${suffix}` : `${prefix}.${suffix}`), - this.translateService.get(`${prefix}.deleted.${suffix}`, {amount: amount}), + this.translateService.get(`${prefix}.deleted.${suffix}`, { amount: amount }), ); messages.subscribe(([head, content]) => { if (success) { diff --git a/src/app/admin/admin-routing.module.ts b/src/app/admin/admin-routing.module.ts index 6a2e8e8178..8c3a26101c 100644 --- a/src/app/admin/admin-routing.module.ts +++ b/src/app/admin/admin-routing.module.ts @@ -52,7 +52,7 @@ import { AdminWorkflowPageComponent } from './admin-workflow-page/admin-workflow path: 'system-wide-alert', resolve: { breadcrumb: I18nBreadcrumbResolver }, loadChildren: () => import('../system-wide-alert/system-wide-alert.module').then((m) => m.SystemWideAlertModule), - data: {title: 'admin.system-wide-alert.title', breadcrumbKey: 'admin.system-wide-alert'}, + data: { title: 'admin.system-wide-alert.title', breadcrumbKey: 'admin.system-wide-alert' }, }, ]), ], diff --git a/src/app/admin/admin-search-page/admin-search.module.ts b/src/app/admin/admin-search-page/admin-search.module.ts index 01dbf20d30..f8eec908ff 100644 --- a/src/app/admin/admin-search-page/admin-search.module.ts +++ b/src/app/admin/admin-search-page/admin-search.module.ts @@ -44,7 +44,7 @@ export class AdminSearchModule { static withEntryComponents() { return { ngModule: SharedModule, - providers: ENTRY_COMPONENTS.map((component) => ({provide: component})), + providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })), }; } } diff --git a/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.spec.ts b/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.spec.ts index f480e6f31a..ee2354579c 100644 --- a/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.spec.ts +++ b/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.spec.ts @@ -28,9 +28,9 @@ describe('AdminSidebarSectionComponent', () => { imports: [NoopAnimationsModule, RouterTestingModule, TranslateModule.forRoot()], declarations: [AdminSidebarSectionComponent, TestComponent], providers: [ - {provide: 'sectionDataProvider', useValue: {model: {link: 'google.com'}, icon: iconString}}, - {provide: MenuService, useValue: menuService}, - {provide: CSSVariableService, useClass: CSSVariableServiceStub}, + { provide: 'sectionDataProvider', useValue: { model: { link: 'google.com' }, icon: iconString } }, + { provide: MenuService, useValue: menuService }, + { provide: CSSVariableService, useClass: CSSVariableServiceStub }, ], }).overrideComponent(AdminSidebarSectionComponent, { set: { @@ -68,9 +68,9 @@ describe('AdminSidebarSectionComponent', () => { imports: [NoopAnimationsModule, RouterTestingModule, TranslateModule.forRoot()], declarations: [AdminSidebarSectionComponent, TestComponent], providers: [ - {provide: 'sectionDataProvider', useValue: {model: {link: 'google.com', disabled: true}, icon: iconString}}, - {provide: MenuService, useValue: menuService}, - {provide: CSSVariableService, useClass: CSSVariableServiceStub}, + { provide: 'sectionDataProvider', useValue: { model: { link: 'google.com', disabled: true }, icon: iconString } }, + { provide: MenuService, useValue: menuService }, + { provide: CSSVariableService, useClass: CSSVariableServiceStub }, ], }).overrideComponent(AdminSidebarSectionComponent, { set: { diff --git a/src/app/admin/admin-workflow-page/admin-workflow.module.ts b/src/app/admin/admin-workflow-page/admin-workflow.module.ts index 988f0aab5d..97041ee64d 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow.module.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow.module.ts @@ -45,7 +45,7 @@ export class AdminWorkflowModuleModule { static withEntryComponents() { return { ngModule: SharedModule, - providers: ENTRY_COMPONENTS.map((component) => ({provide: component})), + providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })), }; } } diff --git a/src/app/admin/admin.module.ts b/src/app/admin/admin.module.ts index efaed60950..3b04ae5c8e 100644 --- a/src/app/admin/admin.module.ts +++ b/src/app/admin/admin.module.ts @@ -46,7 +46,7 @@ export class AdminModule { static withEntryComponents() { return { ngModule: AdminModule, - providers: ENTRY_COMPONENTS.map((component) => ({provide: component})), + providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })), }; } } diff --git a/src/app/app.reducer.ts b/src/app/app.reducer.ts index 006a3b2c0c..d79a3c1aaa 100644 --- a/src/app/app.reducer.ts +++ b/src/app/app.reducer.ts @@ -38,7 +38,7 @@ import { formReducer, FormState, } from './shared/form/form.reducer'; -import { menusReducer} from './shared/menu/menu.reducer'; +import { menusReducer } from './shared/menu/menu.reducer'; import { MenusState } from './shared/menu/menus-state.model'; import { notificationsReducer, diff --git a/src/app/bitstream-page/bitstream-download-page/bitstream-download-page.component.ts b/src/app/bitstream-page/bitstream-download-page/bitstream-download-page.component.ts index 90f6bd407e..d8d9074f66 100644 --- a/src/app/bitstream-page/bitstream-download-page/bitstream-download-page.component.ts +++ b/src/app/bitstream-page/bitstream-download-page/bitstream-download-page.component.ts @@ -111,7 +111,7 @@ export class BitstreamDownloadPageComponent implements OnInit { } else if (isAuthorized && !isLoggedIn) { this.hardRedirectService.redirect(bitstream._links.content.href); } else if (!isAuthorized && isLoggedIn) { - this.router.navigateByUrl(getForbiddenRoute(), {skipLocationChange: true}); + this.router.navigateByUrl(getForbiddenRoute(), { skipLocationChange: true }); } else if (!isAuthorized && !isLoggedIn) { this.auth.setRedirectUrl(this.router.url); this.router.navigateByUrl('login'); diff --git a/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts b/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts index dff81771bd..6f26d537bc 100644 --- a/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts +++ b/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts @@ -316,7 +316,7 @@ describe('EditBitstreamPageComponent', () => { }); it('should call put with the correct bitstream on the PrimaryBitstreamService', () => { - expect(primaryBitstreamService.put).toHaveBeenCalledWith(jasmine.objectContaining({uuid: currentPrimary}), bundle); + expect(primaryBitstreamService.put).toHaveBeenCalledWith(jasmine.objectContaining({ uuid: currentPrimary }), bundle); }); }); @@ -327,7 +327,7 @@ describe('EditBitstreamPageComponent', () => { }); it('should call create with the correct bitstream on the PrimaryBitstreamService', () => { - expect(primaryBitstreamService.create).toHaveBeenCalledWith(jasmine.objectContaining({uuid: currentPrimary}), bundle); + expect(primaryBitstreamService.create).toHaveBeenCalledWith(jasmine.objectContaining({ uuid: currentPrimary }), bundle); }); }); }); @@ -507,18 +507,18 @@ describe('EditBitstreamPageComponent', () => { imports: [TranslateModule.forRoot(), RouterTestingModule], declarations: [EditBitstreamPageComponent, FileSizePipe, VarDirective], providers: [ - {provide: NotificationsService, useValue: notificationsService}, - {provide: DynamicFormService, useValue: formService}, + { provide: NotificationsService, useValue: notificationsService }, + { provide: DynamicFormService, useValue: formService }, { provide: ActivatedRoute, useValue: { - data: observableOf({bitstream: createSuccessfulRemoteDataObject(bitstream)}), - snapshot: {queryParams: {}}, + data: observableOf({ bitstream: createSuccessfulRemoteDataObject(bitstream) }), + snapshot: { queryParams: {} }, }, }, - {provide: BitstreamDataService, useValue: bitstreamService}, - {provide: DSONameService, useValue: dsoNameService}, - {provide: BitstreamFormatDataService, useValue: bitstreamFormatService}, + { provide: BitstreamDataService, useValue: bitstreamService }, + { provide: DSONameService, useValue: dsoNameService }, + { provide: BitstreamFormatDataService, useValue: bitstreamFormatService }, { provide: PrimaryBitstreamService, useValue: primaryBitstreamService }, ChangeDetectorRef, ], @@ -632,17 +632,17 @@ describe('EditBitstreamPageComponent', () => { imports: [TranslateModule.forRoot(), RouterTestingModule], declarations: [EditBitstreamPageComponent, FileSizePipe, VarDirective], providers: [ - {provide: NotificationsService, useValue: notificationsService}, - {provide: DynamicFormService, useValue: formService}, - {provide: ActivatedRoute, + { provide: NotificationsService, useValue: notificationsService }, + { provide: DynamicFormService, useValue: formService }, + { provide: ActivatedRoute, useValue: { - data: observableOf({bitstream: createSuccessfulRemoteDataObject(bitstream)}), - snapshot: {queryParams: {}}, + data: observableOf({ bitstream: createSuccessfulRemoteDataObject(bitstream) }), + snapshot: { queryParams: {} }, }, }, - {provide: BitstreamDataService, useValue: bitstreamService}, - {provide: DSONameService, useValue: dsoNameService}, - {provide: BitstreamFormatDataService, useValue: bitstreamFormatService}, + { provide: BitstreamDataService, useValue: bitstreamService }, + { provide: DSONameService, useValue: dsoNameService }, + { provide: BitstreamFormatDataService, useValue: bitstreamFormatService }, { provide: PrimaryBitstreamService, useValue: primaryBitstreamService }, ChangeDetectorRef, ], diff --git a/src/app/breadcrumbs/breadcrumbs.service.ts b/src/app/breadcrumbs/breadcrumbs.service.ts index b0611255b5..73ec7da39b 100644 --- a/src/app/breadcrumbs/breadcrumbs.service.ts +++ b/src/app/breadcrumbs/breadcrumbs.service.ts @@ -22,7 +22,7 @@ import { hasValue, isUndefined, } from '../shared/empty.util'; -import {Breadcrumb} from './breadcrumb/breadcrumb.model'; +import { Breadcrumb } from './breadcrumb/breadcrumb.model'; @Injectable({ providedIn: 'root', diff --git a/src/app/browse-by/browse-by-date-page/themed-browse-by-date-page.component.ts b/src/app/browse-by/browse-by-date-page/themed-browse-by-date-page.component.ts index 0ef592bae1..f4a63fbf2d 100644 --- a/src/app/browse-by/browse-by-date-page/themed-browse-by-date-page.component.ts +++ b/src/app/browse-by/browse-by-date-page/themed-browse-by-date-page.component.ts @@ -1,4 +1,4 @@ -import {Component} from '@angular/core'; +import { Component } from '@angular/core'; import { ThemedComponent } from '../../shared/theme-support/themed.component'; import { diff --git a/src/app/browse-by/browse-by-metadata-page/themed-browse-by-metadata-page.component.ts b/src/app/browse-by/browse-by-metadata-page/themed-browse-by-metadata-page.component.ts index 527ad9f80a..fca70631d4 100644 --- a/src/app/browse-by/browse-by-metadata-page/themed-browse-by-metadata-page.component.ts +++ b/src/app/browse-by/browse-by-metadata-page/themed-browse-by-metadata-page.component.ts @@ -1,4 +1,4 @@ -import {Component} from '@angular/core'; +import { Component } from '@angular/core'; import { ThemedComponent } from '../../shared/theme-support/themed.component'; import { diff --git a/src/app/browse-by/browse-by-title-page/themed-browse-by-title-page.component.ts b/src/app/browse-by/browse-by-title-page/themed-browse-by-title-page.component.ts index 196304a499..407e088b80 100644 --- a/src/app/browse-by/browse-by-title-page/themed-browse-by-title-page.component.ts +++ b/src/app/browse-by/browse-by-title-page/themed-browse-by-title-page.component.ts @@ -1,4 +1,4 @@ -import {Component} from '@angular/core'; +import { Component } from '@angular/core'; import { ThemedComponent } from '../../shared/theme-support/themed.component'; import { diff --git a/src/app/browse-by/browse-by.module.ts b/src/app/browse-by/browse-by.module.ts index a7940c8d06..c8a90fe0a1 100644 --- a/src/app/browse-by/browse-by.module.ts +++ b/src/app/browse-by/browse-by.module.ts @@ -54,7 +54,7 @@ export class BrowseByModule { static withEntryComponents() { return { ngModule: SharedBrowseByModule, - providers: ENTRY_COMPONENTS.map((component) => ({provide: component})), + providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })), }; } } 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 8ccb649dd7..1949b345ac 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 @@ -82,7 +82,7 @@ export class CollectionItemMapperComponent implements OnInit { * A view on the tabset element * Used to switch tabs programmatically */ - @ViewChild('tabs', {static: false}) tabs; + @ViewChild('tabs', { static: false }) tabs; /** * The collection to map items to diff --git a/src/app/collection-page/create-collection-page/create-collection-page.component.spec.ts b/src/app/collection-page/create-collection-page/create-collection-page.component.spec.ts index ab54e2bb85..bef2301ce3 100644 --- a/src/app/collection-page/create-collection-page/create-collection-page.component.spec.ts +++ b/src/app/collection-page/create-collection-page/create-collection-page.component.spec.ts @@ -39,7 +39,7 @@ describe('CreateCollectionPageComponent', () => { { provide: RouteService, useValue: { getQueryParameterValue: () => observableOf('1234') } }, { provide: Router, useValue: {} }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, - { provide: RequestService, useValue: {}}, + { provide: RequestService, useValue: {} }, ], schemas: [NO_ERRORS_SCHEMA], }).compileComponents(); diff --git a/src/app/collection-page/edit-collection-page/collection-curate/collection-curate.component.spec.ts b/src/app/collection-page/edit-collection-page/collection-curate/collection-curate.component.spec.ts index b7288b9c09..1925478e3b 100644 --- a/src/app/collection-page/edit-collection-page/collection-curate/collection-curate.component.spec.ts +++ b/src/app/collection-page/edit-collection-page/collection-curate/collection-curate.component.spec.ts @@ -25,7 +25,7 @@ describe('CollectionCurateComponent', () => { let dsoNameService; const collection = Object.assign(new Collection(), { - metadata: {'dc.title': ['Collection Name'], 'dc.identifier.uri': [ { value: '123456789/1'}]}, + metadata: { 'dc.title': ['Collection Name'], 'dc.identifier.uri': [ { value: '123456789/1' }] }, }); beforeEach(waitForAsync(() => { @@ -45,8 +45,8 @@ describe('CollectionCurateComponent', () => { imports: [TranslateModule.forRoot()], declarations: [CollectionCurateComponent], providers: [ - {provide: ActivatedRoute, useValue: routeStub}, - {provide: DSONameService, useValue: dsoNameService}, + { provide: ActivatedRoute, useValue: routeStub }, + { provide: DSONameService, useValue: dsoNameService }, ], schemas: [CUSTOM_ELEMENTS_SCHEMA], }).compileComponents(); diff --git a/src/app/collection-page/edit-collection-page/collection-metadata/collection-metadata.component.spec.ts b/src/app/collection-page/edit-collection-page/collection-metadata/collection-metadata.component.spec.ts index 09dda391ea..3e87f05148 100644 --- a/src/app/collection-page/edit-collection-page/collection-metadata/collection-metadata.component.spec.ts +++ b/src/app/collection-page/edit-collection-page/collection-metadata/collection-metadata.component.spec.ts @@ -80,7 +80,7 @@ describe('CollectionMetadataComponent', () => { { provide: ActivatedRoute, useValue: { parent: { data: observableOf({ dso: createSuccessfulRemoteDataObject(collection) }) } } }, { provide: NotificationsService, useValue: notificationsService }, { provide: RequestService, useValue: requestService }, - { provide: Router, useValue: routerMock}, + { provide: Router, useValue: routerMock }, ], schemas: [NO_ERRORS_SCHEMA], }).compileComponents(); diff --git a/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.spec.ts b/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.spec.ts index ea45690a4b..caac59ac2f 100644 --- a/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.spec.ts +++ b/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.spec.ts @@ -71,18 +71,18 @@ describe('CollectionSourceControlsComponent', () => { ], oaiSource: 'oai-harvest-source', oaiSetId: 'oai-set-id', - _links: {self: {href: 'contentsource-selflink'}}, + _links: { self: { href: 'contentsource-selflink' } }, }); process = Object.assign(new Process(), { processId: 'process-id', processStatus: 'COMPLETED', - _links: {output: {href: 'output-href'}}, + _links: { output: { href: 'output-href' } }, }); - bitstream = Object.assign(new Bitstream(), {_links: {content: {href: 'content-href'}}}); + bitstream = Object.assign(new Bitstream(), { _links: { content: { href: 'content-href' } } }); collection = Object.assign(new Collection(), { uuid: 'fake-collection-id', - _links: {self: {href: 'collection-selflink'}}, + _links: { self: { href: 'collection-selflink' } }, }); notificationsService = new NotificationsServiceStub(); collectionService = jasmine.createSpyObj('collectionService', { @@ -107,13 +107,13 @@ describe('CollectionSourceControlsComponent', () => { imports: [TranslateModule.forRoot(), RouterTestingModule], declarations: [CollectionSourceControlsComponent, VarDirective], providers: [ - {provide: ScriptDataService, useValue: scriptDataService}, - {provide: ProcessDataService, useValue: processDataService}, - {provide: RequestService, useValue: requestService}, - {provide: NotificationsService, useValue: notificationsService}, - {provide: CollectionDataService, useValue: collectionService}, - {provide: HttpClient, useValue: httpClient}, - {provide: BitstreamDataService, useValue: bitstreamService}, + { provide: ScriptDataService, useValue: scriptDataService }, + { provide: ProcessDataService, useValue: processDataService }, + { provide: RequestService, useValue: requestService }, + { provide: NotificationsService, useValue: notificationsService }, + { provide: CollectionDataService, useValue: collectionService }, + { provide: HttpClient, useValue: httpClient }, + { provide: BitstreamDataService, useValue: bitstreamService }, ], schemas: [NO_ERRORS_SCHEMA], }).compileComponents(); @@ -137,9 +137,9 @@ describe('CollectionSourceControlsComponent', () => { scheduler.flush(); expect(scriptDataService.invoke).toHaveBeenCalledWith('harvest', [ - {name: '-g', value: null}, - {name: '-a', value: contentSource.oaiSource}, - {name: '-i', value: new ContentSourceSetSerializer().Serialize(contentSource.oaiSetId)}, + { name: '-g', value: null }, + { name: '-a', value: contentSource.oaiSource }, + { name: '-i', value: new ContentSourceSetSerializer().Serialize(contentSource.oaiSetId) }, ], []); expect(processDataService.findById).toHaveBeenCalledWith(process.processId, false); @@ -153,8 +153,8 @@ describe('CollectionSourceControlsComponent', () => { scheduler.flush(); expect(scriptDataService.invoke).toHaveBeenCalledWith('harvest', [ - {name: '-r', value: null}, - {name: '-c', value: collection.uuid}, + { name: '-r', value: null }, + { name: '-c', value: collection.uuid }, ], []); expect(processDataService.findById).toHaveBeenCalledWith(process.processId, false); expect(notificationsService.success).toHaveBeenCalled(); @@ -166,8 +166,8 @@ describe('CollectionSourceControlsComponent', () => { scheduler.flush(); expect(scriptDataService.invoke).toHaveBeenCalledWith('harvest', [ - {name: '-o', value: null}, - {name: '-c', value: collection.uuid}, + { name: '-o', value: null }, + { name: '-c', value: collection.uuid }, ], []); expect(processDataService.findById).toHaveBeenCalledWith(process.processId, false); expect(notificationsService.success).toHaveBeenCalled(); diff --git a/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.ts b/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.ts index 95c1eb765d..b7cc7549c1 100644 --- a/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.ts +++ b/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.ts @@ -98,9 +98,9 @@ export class CollectionSourceControlsComponent implements OnDestroy { testConfiguration(contentSource) { this.testConfigRunning$.next(true); this.subs.push(this.scriptDataService.invoke('harvest', [ - {name: '-g', value: null}, - {name: '-a', value: contentSource.oaiSource}, - {name: '-i', value: new ContentSourceSetSerializer().Serialize(contentSource.oaiSetId)}, + { name: '-g', value: null }, + { name: '-a', value: contentSource.oaiSource }, + { name: '-i', value: new ContentSourceSetSerializer().Serialize(contentSource.oaiSetId) }, ], []).pipe( getFirstCompletedRemoteData(), tap((rd) => { @@ -131,7 +131,7 @@ export class CollectionSourceControlsComponent implements OnDestroy { } if (process.processStatus.toString() === ProcessStatus[ProcessStatus.COMPLETED].toString()) { this.bitstreamService.findByHref(process._links.output.href).pipe(getFirstSucceededRemoteDataPayload()).subscribe((bitstream) => { - this.httpClient.get(bitstream._links.content.href, {responseType: 'text'}).subscribe((data: any) => { + this.httpClient.get(bitstream._links.content.href, { responseType: 'text' }).subscribe((data: any) => { const output = data.replaceAll(new RegExp('.*\\@(.*)', 'g'), '$1') .replaceAll('The script has started', '') .replaceAll('The script has completed', ''); @@ -150,8 +150,8 @@ export class CollectionSourceControlsComponent implements OnDestroy { importNow() { this.importRunning$.next(true); this.subs.push(this.scriptDataService.invoke('harvest', [ - {name: '-r', value: null}, - {name: '-c', value: this.collection.uuid}, + { name: '-r', value: null }, + { name: '-c', value: this.collection.uuid }, ], []) .pipe( getFirstCompletedRemoteData(), @@ -197,8 +197,8 @@ export class CollectionSourceControlsComponent implements OnDestroy { resetAndReimport() { this.reImportRunning$.next(true); this.subs.push(this.scriptDataService.invoke('harvest', [ - {name: '-o', value: null}, - {name: '-c', value: this.collection.uuid}, + { name: '-o', value: null }, + { name: '-c', value: this.collection.uuid }, ], []) .pipe( getFirstCompletedRemoteData(), diff --git a/src/app/community-list-page/community-list-datasource.ts b/src/app/community-list-page/community-list-datasource.ts index 4790be1fba..95acc9dd86 100644 --- a/src/app/community-list-page/community-list-datasource.ts +++ b/src/app/community-list-page/community-list-datasource.ts @@ -11,7 +11,7 @@ import { finalize } from 'rxjs/operators'; import { FindListOptions } from '../core/data/find-list-options.model'; import { hasValue } from '../shared/empty.util'; -import { CommunityListService} from './community-list-service'; +import { CommunityListService } from './community-list-service'; import { FlatNode } from './flat-node.model'; /** diff --git a/src/app/community-list-page/community-list/community-list.component.ts b/src/app/community-list-page/community-list/community-list.component.ts index 756505159f..c17ed3f069 100644 --- a/src/app/community-list-page/community-list/community-list.component.ts +++ b/src/app/community-list-page/community-list/community-list.component.ts @@ -14,7 +14,7 @@ import { import { FindListOptions } from '../../core/data/find-list-options.model'; import { isEmpty } from '../../shared/empty.util'; import { CommunityListDatasource } from '../community-list-datasource'; -import { CommunityListService} from '../community-list-service'; +import { CommunityListService } from '../community-list-service'; import { FlatNode } from '../flat-node.model'; /** diff --git a/src/app/community-page/community-page.component.ts b/src/app/community-page/community-page.component.ts index 52ffd2c061..6c21f55e54 100644 --- a/src/app/community-page/community-page.component.ts +++ b/src/app/community-page/community-page.component.ts @@ -24,7 +24,7 @@ import { MetadataService } from '../core/metadata/metadata.service'; import { redirectOn4xx } from '../core/shared/authorized.operators'; import { Bitstream } from '../core/shared/bitstream.model'; import { Community } from '../core/shared/community.model'; -import { getAllSucceededRemoteDataPayload} from '../core/shared/operators'; +import { getAllSucceededRemoteDataPayload } from '../core/shared/operators'; import { fadeInOut } from '../shared/animations/fade'; import { hasValue } from '../shared/empty.util'; import { getCommunityPageRoute } from './community-page-routing-paths'; diff --git a/src/app/community-page/delete-community-page/delete-community-page.component.spec.ts b/src/app/community-page/delete-community-page/delete-community-page.component.spec.ts index f823e98f4d..0892c4d66c 100644 --- a/src/app/community-page/delete-community-page/delete-community-page.component.spec.ts +++ b/src/app/community-page/delete-community-page/delete-community-page.component.spec.ts @@ -31,7 +31,7 @@ describe('DeleteCommunityPageComponent', () => { { provide: CommunityDataService, useValue: {} }, { provide: ActivatedRoute, useValue: { data: observableOf({ dso: { payload: {} } }) } }, { provide: NotificationsService, useValue: {} }, - { provide: RequestService, useValue: {}}, + { provide: RequestService, useValue: {} }, ], schemas: [NO_ERRORS_SCHEMA], }).compileComponents(); diff --git a/src/app/community-page/edit-community-page/community-curate/community-curate.component.spec.ts b/src/app/community-page/edit-community-page/community-curate/community-curate.component.spec.ts index 699fa8db9f..8928543a3a 100644 --- a/src/app/community-page/edit-community-page/community-curate/community-curate.component.spec.ts +++ b/src/app/community-page/edit-community-page/community-curate/community-curate.component.spec.ts @@ -25,7 +25,7 @@ describe('CommunityCurateComponent', () => { let dsoNameService; const community = Object.assign(new Community(), { - metadata: {'dc.title': ['Community Name'], 'dc.identifier.uri': [ { value: '123456789/1'}]}, + metadata: { 'dc.title': ['Community Name'], 'dc.identifier.uri': [ { value: '123456789/1' }] }, }); beforeEach(waitForAsync(() => { @@ -45,8 +45,8 @@ describe('CommunityCurateComponent', () => { imports: [TranslateModule.forRoot()], declarations: [CommunityCurateComponent], providers: [ - {provide: ActivatedRoute, useValue: routeStub}, - {provide: DSONameService, useValue: dsoNameService}, + { provide: ActivatedRoute, useValue: routeStub }, + { provide: DSONameService, useValue: dsoNameService }, ], schemas: [CUSTOM_ELEMENTS_SCHEMA], }).compileComponents(); diff --git a/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.ts b/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.ts index e5288c6568..f0c2cabea9 100644 --- a/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.ts +++ b/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.ts @@ -92,7 +92,7 @@ export class CommunityPageSubCollectionListComponent implements OnInit, OnDestro return this.cds.findByParent(this.community.id, { currentPage: currentPagination.currentPage, elementsPerPage: currentPagination.pageSize, - sort: {field: currentSort.field, direction: currentSort.direction}, + sort: { field: currentSort.field, direction: currentSort.direction }, }); }), ).subscribe((results) => { diff --git a/src/app/core/auth/auth.service.ts b/src/app/core/auth/auth.service.ts index 38e5efa05e..8fa078b739 100644 --- a/src/app/core/auth/auth.service.ts +++ b/src/app/core/auth/auth.service.ts @@ -468,7 +468,7 @@ export class AuthService { // Set the cookie expire date const expires = new Date(expireDate); - const options: CookieAttributes = {expires: expires}; + const options: CookieAttributes = { expires: expires }; // Save cookie with the token return this.storage.set(TOKENITEM, token, options); @@ -560,7 +560,7 @@ export class AuthService { // Set the cookie expire date const expires = new Date(expireDate); - const options: CookieAttributes = {expires: expires}; + const options: CookieAttributes = { expires: expires }; this.storage.set(REDIRECT_COOKIE, url, options); this.store.dispatch(new SetRedirectUrlAction(isNotUndefined(url) ? url : '')); } diff --git a/src/app/core/cache/object-cache.service.spec.ts b/src/app/core/cache/object-cache.service.spec.ts index 9e833af084..3d27f7252c 100644 --- a/src/app/core/cache/object-cache.service.spec.ts +++ b/src/app/core/cache/object-cache.service.spec.ts @@ -21,7 +21,7 @@ import { first } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; import { storeModuleConfig } from '../../app.reducer'; -import { coreReducers} from '../core.reducers'; +import { coreReducers } from '../core.reducers'; import { CoreState } from '../core-state.model'; import { RestRequestMethod } from '../data/rest-request-method'; import { RemoveFromIndexBySubstringAction } from '../index/index.actions'; diff --git a/src/app/core/data/base-response-parsing.service.spec.ts b/src/app/core/data/base-response-parsing.service.spec.ts index 41412c2b75..f6707d3582 100644 --- a/src/app/core/data/base-response-parsing.service.spec.ts +++ b/src/app/core/data/base-response-parsing.service.spec.ts @@ -3,7 +3,7 @@ import { CacheableObject } from '../cache/cacheable-object.model'; import { ObjectCacheService } from '../cache/object-cache.service'; import { DSpaceObject } from '../shared/dspace-object.model'; import { BaseResponseParsingService } from './base-response-parsing.service'; -import { GetRequest} from './request.models'; +import { GetRequest } from './request.models'; import { RestRequest } from './rest-request.model'; class TestService extends BaseResponseParsingService { diff --git a/src/app/core/data/feature-authorization/feature-authorization-guard/single-feature-authorization.guard.ts b/src/app/core/data/feature-authorization/feature-authorization-guard/single-feature-authorization.guard.ts index e3a72846bb..cd9f615aa7 100644 --- a/src/app/core/data/feature-authorization/feature-authorization-guard/single-feature-authorization.guard.ts +++ b/src/app/core/data/feature-authorization/feature-authorization-guard/single-feature-authorization.guard.ts @@ -3,7 +3,7 @@ import { RouterStateSnapshot, } from '@angular/router'; import { Observable } from 'rxjs'; -import { map} from 'rxjs/operators'; +import { map } from 'rxjs/operators'; import { FeatureID } from '../feature-id'; import { SomeFeatureAuthorizationGuard } from './some-feature-authorization.guard'; diff --git a/src/app/core/data/identifier-data.service.ts b/src/app/core/data/identifier-data.service.ts index 3a6e355722..bf6172fd47 100644 --- a/src/app/core/data/identifier-data.service.ts +++ b/src/app/core/data/identifier-data.service.ts @@ -18,14 +18,14 @@ import { RemoteDataBuildService } from '../cache/builders/remote-data-build.serv import { ObjectCacheService } from '../cache/object-cache.service'; import { CoreState } from '../core-state.model'; import { HttpOptions } from '../dspace-rest/dspace-rest.service'; -import {ConfigurationProperty} from '../shared/configuration-property.model'; +import { ConfigurationProperty } from '../shared/configuration-property.model'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { Item } from '../shared/item.model'; import { getFirstCompletedRemoteData } from '../shared/operators'; import { sendRequest } from '../shared/request.operators'; import { BaseDataService } from './base/base-data.service'; import { dataService } from './base/data-service.decorator'; -import {ConfigurationDataService} from './configuration-data.service'; +import { ConfigurationDataService } from './configuration-data.service'; import { DefaultChangeAnalyzer } from './default-change-analyzer.service'; import { RemoteData } from './remote-data'; import { PostRequest } from './request.models'; diff --git a/src/app/core/data/object-updates/object-updates.actions.ts b/src/app/core/data/object-updates/object-updates.actions.ts index 8c44cd0218..8a95a7827c 100644 --- a/src/app/core/data/object-updates/object-updates.actions.ts +++ b/src/app/core/data/object-updates/object-updates.actions.ts @@ -114,7 +114,7 @@ export class SelectVirtualMetadataAction implements Action { uuid: string, select: boolean, ) { - this.payload = { url, source, uuid, select: select}; + this.payload = { url, source, uuid, select: select }; } } 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 a0056e1b4c..95ab702261 100644 --- a/src/app/core/data/object-updates/object-updates.reducer.ts +++ b/src/app/core/data/object-updates/object-updates.reducer.ts @@ -181,7 +181,7 @@ function addFieldUpdate(state: any, action: AddFieldUpdateAction) { const url: string = action.payload.url; const field: Identifiable = action.payload.field; const changeType: FieldChangeType = action.payload.changeType; - const pageState: ObjectUpdatesEntry = state[url] || {fieldUpdates: {}}; + const pageState: ObjectUpdatesEntry = state[url] || { fieldUpdates: {} }; let states = pageState.fieldStates; if (changeType === FieldChangeType.ADD) { @@ -234,7 +234,7 @@ function selectVirtualMetadata(state: any, action: SelectVirtualMetadataAction) const newPageState = Object.assign( {}, pageState, - {virtualMetadataSources: virtualMetadataSources}, + { virtualMetadataSources: virtualMetadataSources }, ); return Object.assign( diff --git a/src/app/core/data/primary-bitstream.service.spec.ts b/src/app/core/data/primary-bitstream.service.spec.ts index 6d6f1a03d3..6a9c89f796 100644 --- a/src/app/core/data/primary-bitstream.service.spec.ts +++ b/src/app/core/data/primary-bitstream.service.spec.ts @@ -61,7 +61,7 @@ describe('PrimaryBitstreamService', () => { rdbService = getMockRemoteDataBuildService(); notificationService = new NotificationsServiceStub() as any; - bundleDataService = jasmine.createSpyObj('bundleDataService', {'findByHref': createSuccessfulRemoteDataObject$(bundle)}); + bundleDataService = jasmine.createSpyObj('bundleDataService', { 'findByHref': createSuccessfulRemoteDataObject$(bundle) }); service = new PrimaryBitstreamService(requestService, rdbService, objectCache, halService, notificationService, bundleDataService); }); diff --git a/src/app/core/data/request.reducer.spec.ts b/src/app/core/data/request.reducer.spec.ts index 1a671626c2..bf69bec2b4 100644 --- a/src/app/core/data/request.reducer.spec.ts +++ b/src/app/core/data/request.reducer.spec.ts @@ -11,7 +11,7 @@ import { ResetResponseTimestampsAction, } from './request.actions'; import { GetRequest } from './request.models'; -import { requestReducer} from './request.reducer'; +import { requestReducer } from './request.reducer'; import { RequestEntryState } from './request-entry-state.model'; import { RequestState } from './request-state.model'; diff --git a/src/app/core/data/request.service.spec.ts b/src/app/core/data/request.service.spec.ts index 4f58703c37..1ac2474e04 100644 --- a/src/app/core/data/request.service.spec.ts +++ b/src/app/core/data/request.service.spec.ts @@ -28,7 +28,7 @@ import { getMockUUIDService, } from '../../shared/mocks/uuid.service.mock'; import { ObjectCacheService } from '../cache/object-cache.service'; -import { coreReducers} from '../core.reducers'; +import { coreReducers } from '../core.reducers'; import { CoreState } from '../core-state.model'; import { UUIDService } from '../shared/uuid.service'; import { diff --git a/src/app/core/data/request.service.ts b/src/app/core/data/request.service.ts index 4fa80c3fea..dc6b126b3e 100644 --- a/src/app/core/data/request.service.ts +++ b/src/app/core/data/request.service.ts @@ -40,7 +40,7 @@ import { RequestExecuteAction, RequestStaleAction, } from './request.actions'; -import { GetRequest} from './request.models'; +import { GetRequest } from './request.models'; import { RequestEntry } from './request-entry.model'; import { isLoading, diff --git a/src/app/core/data/version-history-data.service.ts b/src/app/core/data/version-history-data.service.ts index bab7cdab90..e39e12ea29 100644 --- a/src/app/core/data/version-history-data.service.ts +++ b/src/app/core/data/version-history-data.service.ts @@ -131,7 +131,7 @@ export class VersionHistoryDataService extends IdentifiableDataService { const requestOptions = { observe: 'response' as any, - headers: new HttpHeaders({'Content-Type': DEFAULT_CONTENT_TYPE}), + headers: new HttpHeaders({ 'Content-Type': DEFAULT_CONTENT_TYPE }), }; return this.http.get(absoluteURL, requestOptions).pipe( map((res: HttpResponse) => ({ diff --git a/src/app/core/forward-client-ip/forward-client-ip.interceptor.ts b/src/app/core/forward-client-ip/forward-client-ip.interceptor.ts index bdb9465359..67427d4ed1 100644 --- a/src/app/core/forward-client-ip/forward-client-ip.interceptor.ts +++ b/src/app/core/forward-client-ip/forward-client-ip.interceptor.ts @@ -11,7 +11,7 @@ import { import { REQUEST } from '@nguniversal/express-engine/tokens'; import { Observable } from 'rxjs'; -@Injectable({providedIn: 'root'}) +@Injectable({ providedIn: 'root' }) /** * Http Interceptor intercepting Http Requests, adding the client's IP to their X-Forwarded-For header */ diff --git a/src/app/core/google-recaptcha/google-recaptcha.service.ts b/src/app/core/google-recaptcha/google-recaptcha.service.ts index 37f594f674..eb369384fe 100644 --- a/src/app/core/google-recaptcha/google-recaptcha.service.ts +++ b/src/app/core/google-recaptcha/google-recaptcha.service.ts @@ -143,7 +143,7 @@ export class GoogleRecaptchaService { */ public getRecaptchaToken(action) { return this.captchaKey().pipe( - switchMap((key) => grecaptcha.execute(key, {action: action})), + switchMap((key) => grecaptcha.execute(key, { action: action })), ); } diff --git a/src/app/core/index/index.selectors.spec.ts b/src/app/core/index/index.selectors.spec.ts index 03da0def69..bea6290e5a 100644 --- a/src/app/core/index/index.selectors.spec.ts +++ b/src/app/core/index/index.selectors.spec.ts @@ -39,15 +39,15 @@ describe(`index selectors`, () => { const source = 'https://rest.api/core/communities/search/top?page=0&size=50&sort=dc.title,ASC&embed.size=subcommunities=5&embed=subcommunities'; const result = getEmbedSizeParams(source); expect(result).toHaveSize(1); - expect(result[0]).toEqual({name: 'subcommunities', size: 5}); + expect(result[0]).toEqual({ name: 'subcommunities', size: 5 }); }); it(`url with multiple embed size param => should return list with {name, size}`, () => { const source = 'https://rest.api/core/communities/search/top?page=0&size=50&sort=dc.title,ASC&embed.size=subcommunities=5&embed=subcommunities&embed.size=collections=1&embed=collections'; const result = getEmbedSizeParams(source); expect(result).toHaveSize(2); - expect(result[0]).toEqual({name: 'subcommunities', size: 5}); - expect(result[1]).toEqual({name: 'collections', size: 1}); + expect(result[0]).toEqual({ name: 'subcommunities', size: 5 }); + expect(result[1]).toEqual({ name: 'collections', size: 1 }); }); it(`url without params => should return empty list`, () => { diff --git a/src/app/core/json-patch/builder/json-patch-operation-path-combiner.ts b/src/app/core/json-patch/builder/json-patch-operation-path-combiner.ts index d29bf993cc..73677a3384 100644 --- a/src/app/core/json-patch/builder/json-patch-operation-path-combiner.ts +++ b/src/app/core/json-patch/builder/json-patch-operation-path-combiner.ts @@ -52,6 +52,6 @@ export class JsonPatchOperationPathCombiner extends URLCombiner { path += '/' + fragment; } - return {rootElement: this._rootElement, subRootElement: this._subRootElement, path: path}; + return { rootElement: this._rootElement, subRootElement: this._subRootElement, path: path }; } } diff --git a/src/app/core/log/log.interceptor.spec.ts b/src/app/core/log/log.interceptor.spec.ts index 0c48781a2e..7a3c11fccc 100644 --- a/src/app/core/log/log.interceptor.spec.ts +++ b/src/app/core/log/log.interceptor.spec.ts @@ -26,7 +26,7 @@ describe('LogInterceptor', () => { let httpMock: HttpTestingController; let cookieService: CookieService; let correlationIdService: CorrelationIdService; - const router = Object.assign(new RouterStub(),{url : '/statistics'}); + const router = Object.assign(new RouterStub(),{ url : '/statistics' }); // Mock payload/statuses are dummy content as we are not testing the results // of any below requests. We are only testing for X-XSRF-TOKEN header. diff --git a/src/app/core/metadata/metadata.service.spec.ts b/src/app/core/metadata/metadata.service.spec.ts index 481292459d..b48da35a8e 100644 --- a/src/app/core/metadata/metadata.service.spec.ts +++ b/src/app/core/metadata/metadata.service.spec.ts @@ -68,7 +68,7 @@ describe('MetadataService', () => { let appConfig: AppConfig; - const initialState = { 'core': { metaTag: { tagsInUse: ['title', 'description'] }}}; + const initialState = { 'core': { metaTag: { tagsInUse: ['title', 'description'] } } }; beforeEach(() => { @@ -514,8 +514,8 @@ describe('MetadataService', () => { totalElements: bitstreams.length, // announce multiple elements/pages }, _links: index < bitstreams.length - 1 - ? { next: { href: 'not empty' }} // fake link to the next bitstream page - : { next: { href: undefined }}, // last page has no link + ? { next: { href: 'not empty' } } // fake link to the next bitstream page + : { next: { href: undefined } }, // last page has no link })); }; }); diff --git a/src/app/core/pagination/pagination.service.spec.ts b/src/app/core/pagination/pagination.service.spec.ts index d764ddbccc..e9c75703b1 100644 --- a/src/app/core/pagination/pagination.service.spec.ts +++ b/src/app/core/pagination/pagination.service.spec.ts @@ -97,13 +97,13 @@ describe('PaginationService', () => { spyOn(service, 'updateRoute'); service.resetPage('test'); - expect(service.updateRoute).toHaveBeenCalledWith('test', {page: 1}); + expect(service.updateRoute).toHaveBeenCalledWith('test', { page: 1 }); }); }); describe('updateRoute', () => { it('should update the route with the provided page params', () => { - service.updateRoute('test', {page: 2, pageSize: 5, sortField: 'title', sortDirection: SortDirection.DESC}); + service.updateRoute('test', { page: 2, pageSize: 5, sortField: 'title', sortDirection: SortDirection.DESC }); const navigateParams = {}; navigateParams[`test.page`] = `2`; @@ -111,10 +111,10 @@ describe('PaginationService', () => { navigateParams[`test.sf`] = `title`; navigateParams[`test.sd`] = `DESC`; - expect(router.navigate).toHaveBeenCalledWith([], {queryParams: navigateParams, queryParamsHandling: 'merge'}); + expect(router.navigate).toHaveBeenCalledWith([], { queryParams: navigateParams, queryParamsHandling: 'merge' }); }); it('should update the route with the provided page params while keeping the existing non provided ones', () => { - service.updateRoute('test', {page: 2}); + service.updateRoute('test', { page: 2 }); const navigateParams = {}; navigateParams[`test.page`] = `2`; @@ -122,10 +122,10 @@ describe('PaginationService', () => { navigateParams[`test.sf`] = `score`; navigateParams[`test.sd`] = `ASC`; - expect(router.navigate).toHaveBeenCalledWith([], {queryParams: navigateParams, queryParamsHandling: 'merge'}); + expect(router.navigate).toHaveBeenCalledWith([], { queryParams: navigateParams, queryParamsHandling: 'merge' }); }); it('should pass on navigationExtras to router.navigate', () => { - service.updateRoute('test', {page: 2}, undefined, undefined, { queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true }); + service.updateRoute('test', { page: 2 }, undefined, undefined, { queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true }); const navigateParams = {}; navigateParams[`test.page`] = `2`; @@ -133,12 +133,12 @@ describe('PaginationService', () => { navigateParams[`test.sf`] = `score`; navigateParams[`test.sd`] = `ASC`; - expect(router.navigate).toHaveBeenCalledWith([], {queryParams: navigateParams, queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true }); + expect(router.navigate).toHaveBeenCalledWith([], { queryParams: navigateParams, queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true }); }); }); describe('updateRouteWithUrl', () => { it('should update the route with the provided page params and url', () => { - service.updateRouteWithUrl('test', ['someUrl'], {page: 2, pageSize: 5, sortField: 'title', sortDirection: SortDirection.DESC}); + service.updateRouteWithUrl('test', ['someUrl'], { page: 2, pageSize: 5, sortField: 'title', sortDirection: SortDirection.DESC }); const navigateParams = {}; navigateParams[`test.page`] = `2`; @@ -146,10 +146,10 @@ describe('PaginationService', () => { navigateParams[`test.sf`] = `title`; navigateParams[`test.sd`] = `DESC`; - expect(router.navigate).toHaveBeenCalledWith(['someUrl'], {queryParams: navigateParams, queryParamsHandling: 'merge'}); + expect(router.navigate).toHaveBeenCalledWith(['someUrl'], { queryParams: navigateParams, queryParamsHandling: 'merge' }); }); it('should update the route with the provided page params and url while keeping the existing non provided ones', () => { - service.updateRouteWithUrl('test',['someUrl'], {page: 2}); + service.updateRouteWithUrl('test',['someUrl'], { page: 2 }); const navigateParams = {}; navigateParams[`test.page`] = `2`; @@ -157,10 +157,10 @@ describe('PaginationService', () => { navigateParams[`test.sf`] = `score`; navigateParams[`test.sd`] = `ASC`; - expect(router.navigate).toHaveBeenCalledWith(['someUrl'], {queryParams: navigateParams, queryParamsHandling: 'merge'}); + expect(router.navigate).toHaveBeenCalledWith(['someUrl'], { queryParams: navigateParams, queryParamsHandling: 'merge' }); }); it('should pass on navigationExtras to router.navigate', () => { - service.updateRouteWithUrl('test',['someUrl'], {page: 2}, undefined, undefined, { queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true }); + service.updateRouteWithUrl('test',['someUrl'], { page: 2 }, undefined, undefined, { queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true }); const navigateParams = {}; navigateParams[`test.page`] = `2`; @@ -168,7 +168,7 @@ describe('PaginationService', () => { navigateParams[`test.sf`] = `score`; navigateParams[`test.sd`] = `ASC`; - expect(router.navigate).toHaveBeenCalledWith(['someUrl'], {queryParams: navigateParams, queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true }); + expect(router.navigate).toHaveBeenCalledWith(['someUrl'], { queryParams: navigateParams, queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true }); }); }); describe('clearPagination', () => { @@ -190,7 +190,7 @@ describe('PaginationService', () => { service.updateRoute('another-id', {}); - expect(router.navigate).toHaveBeenCalledWith([], {queryParams: Object.assign({}, resetParams, navigateParams), queryParamsHandling: 'merge'}); + expect(router.navigate).toHaveBeenCalledWith([], { queryParams: Object.assign({}, resetParams, navigateParams), queryParamsHandling: 'merge' }); }); }); describe('getPageParam', () => { diff --git a/src/app/core/pagination/pagination.service.ts b/src/app/core/pagination/pagination.service.ts index 6181fee741..0597daa363 100644 --- a/src/app/core/pagination/pagination.service.ts +++ b/src/app/core/pagination/pagination.service.ts @@ -126,7 +126,7 @@ export class PaginationService { * @param paginationId - The pagination id for which to reset the page */ resetPage(paginationId: string) { - this.updateRoute(paginationId, {page: 1}); + this.updateRoute(paginationId, { page: 1 }); } diff --git a/src/app/core/services/browser-hard-redirect.service.ts b/src/app/core/services/browser-hard-redirect.service.ts index 35e4a4d075..7e982e5e71 100644 --- a/src/app/core/services/browser-hard-redirect.service.ts +++ b/src/app/core/services/browser-hard-redirect.service.ts @@ -15,7 +15,7 @@ export function locationProvider(): Location { /** * Service for performing hard redirects within the browser app module */ -@Injectable({providedIn: 'root'}) +@Injectable({ providedIn: 'root' }) export class BrowserHardRedirectService extends HardRedirectService { constructor( diff --git a/src/app/core/services/route.effects.ts b/src/app/core/services/route.effects.ts index bccf0d2aeb..b31008f3c1 100644 --- a/src/app/core/services/route.effects.ts +++ b/src/app/core/services/route.effects.ts @@ -32,7 +32,7 @@ export class RouteEffects { .pipe( ofType(RouteActionTypes.RESET), tap(() => this.service.setCurrentRouteInfo()), - ), {dispatch: false }); + ), { dispatch: false }); constructor(private actions$: Actions, private service: RouteService) { } diff --git a/src/app/core/services/server.referrer.service.spec.ts b/src/app/core/services/server.referrer.service.spec.ts index 4a7f841093..f7c308e418 100644 --- a/src/app/core/services/server.referrer.service.spec.ts +++ b/src/app/core/services/server.referrer.service.spec.ts @@ -7,7 +7,7 @@ describe(`ServerReferrerService`, () => { describe(`getReferrer`, () => { describe(`when the referer header is set`, () => { beforeEach(() => { - service = new ServerReferrerService({ headers: { referer: referrer }}); + service = new ServerReferrerService({ headers: { referer: referrer } }); }); it(`should return the referer header`, (done: DoneFn) => { @@ -20,7 +20,7 @@ describe(`ServerReferrerService`, () => { describe(`when the referer header is not set`, () => { beforeEach(() => { - service = new ServerReferrerService({ headers: {}}); + service = new ServerReferrerService({ headers: {} }); }); it(`should return an empty string`, (done: DoneFn) => { diff --git a/src/app/core/shared/bitstream.model.ts b/src/app/core/shared/bitstream.model.ts index 64c94b90f3..d1b821e8cd 100644 --- a/src/app/core/shared/bitstream.model.ts +++ b/src/app/core/shared/bitstream.model.ts @@ -13,8 +13,8 @@ import { RemoteData } from '../data/remote-data'; import { BITSTREAM } from './bitstream.resource-type'; import { BitstreamFormat } from './bitstream-format.model'; import { BITSTREAM_FORMAT } from './bitstream-format.resource-type'; -import {Bundle} from './bundle.model'; -import {BUNDLE} from './bundle.resource-type'; +import { Bundle } from './bundle.model'; +import { BUNDLE } from './bundle.resource-type'; import { ChildHALResource } from './child-hal-resource.model'; import { DSpaceObject } from './dspace-object.model'; import { HALLink } from './hal-link.model'; diff --git a/src/app/core/shared/community.model.ts b/src/app/core/shared/community.model.ts index 47e574530c..764b15e2ed 100644 --- a/src/app/core/shared/community.model.ts +++ b/src/app/core/shared/community.model.ts @@ -11,7 +11,7 @@ import { } from '../cache/builders/build-decorators'; import { PaginatedList } from '../data/paginated-list.model'; import { RemoteData } from '../data/remote-data'; -import {excludeFromEquals} from '../utilities/equals.decorators'; +import { excludeFromEquals } from '../utilities/equals.decorators'; import { Bitstream } from './bitstream.model'; import { BITSTREAM } from './bitstream.resource-type'; import { ChildHALResource } from './child-hal-resource.model'; diff --git a/src/app/core/shared/file.service.ts b/src/app/core/shared/file.service.ts index d2870294af..2a60dd4196 100644 --- a/src/app/core/shared/file.service.ts +++ b/src/app/core/shared/file.service.ts @@ -20,7 +20,7 @@ import { URLCombiner } from '../url-combiner/url-combiner'; /** * Provides utility methods to save files on the client-side. */ -@Injectable({providedIn: 'root'}) +@Injectable({ providedIn: 'root' }) export class FileService { constructor( @Inject(NativeWindowService) protected _window: NativeWindowRef, diff --git a/src/app/core/shared/search/search-filters/search-config.resource-type.ts b/src/app/core/shared/search/search-filters/search-config.resource-type.ts index 967a654006..2047f52fdb 100644 --- a/src/app/core/shared/search/search-filters/search-config.resource-type.ts +++ b/src/app/core/shared/search/search-filters/search-config.resource-type.ts @@ -1,4 +1,4 @@ -import {ResourceType} from '../../resource-type'; +import { ResourceType } from '../../resource-type'; /** * The resource type for SearchConfig diff --git a/src/app/core/submission/models/workspaceitem-sections.model.ts b/src/app/core/submission/models/workspaceitem-sections.model.ts index a9dce1539f..45f189fc36 100644 --- a/src/app/core/submission/models/workspaceitem-sections.model.ts +++ b/src/app/core/submission/models/workspaceitem-sections.model.ts @@ -1,7 +1,7 @@ import { WorkspaceitemSectionAccessesObject } from './workspaceitem-section-accesses.model'; import { WorkspaceitemSectionCcLicenseObject } from './workspaceitem-section-cc-license.model'; import { WorkspaceitemSectionFormObject } from './workspaceitem-section-form.model'; -import {WorkspaceitemSectionIdentifiersObject} from './workspaceitem-section-identifiers.model'; +import { WorkspaceitemSectionIdentifiersObject } from './workspaceitem-section-identifiers.model'; import { WorkspaceitemSectionLicenseObject } from './workspaceitem-section-license.model'; import { WorkspaceitemSectionSherpaPoliciesObject } from './workspaceitem-section-sherpa-policies.model'; import { WorkspaceitemSectionUploadObject } from './workspaceitem-section-upload.model'; diff --git a/src/app/curation-form/curation-form.component.spec.ts b/src/app/curation-form/curation-form.component.spec.ts index 6f6baf9ed9..6c89f0082c 100644 --- a/src/app/curation-form/curation-form.component.spec.ts +++ b/src/app/curation-form/curation-form.component.spec.ts @@ -39,7 +39,7 @@ describe('CurationFormComponent', () => { let notificationsService; let router; - const process = Object.assign(new Process(), {processId: 'process-id'}); + const process = Object.assign(new Process(), { processId: 'process-id' }); beforeEach(waitForAsync(() => { @@ -79,7 +79,7 @@ describe('CurationFormComponent', () => { { provide: ProcessDataService, useValue: processDataService }, { provide: NotificationsService, useValue: notificationsService }, { provide: HandleService, useValue: handleService }, - { provide: Router, useValue: router}, + { provide: Router, useValue: router }, { provide: ConfigurationDataService, useValue: configurationDataService }, ], schemas: [CUSTOM_ELEMENTS_SCHEMA], @@ -121,8 +121,8 @@ describe('CurationFormComponent', () => { comp.submit(); expect(scriptDataService.invoke).toHaveBeenCalledWith('curate', [ - {name: '-t', value: 'profileformats'}, - {name: '-i', value: 'test-handle'}, + { name: '-t', value: 'profileformats' }, + { name: '-i', value: 'test-handle' }, ], []); expect(notificationsService.success).toHaveBeenCalled(); expect(router.navigateByUrl).toHaveBeenCalledWith(getProcessDetailRoute('process-id')); @@ -134,8 +134,8 @@ describe('CurationFormComponent', () => { comp.submit(); expect(scriptDataService.invoke).toHaveBeenCalledWith('curate', [ - {name: '-t', value: 'profileformats'}, - {name: '-i', value: 'test-handle'}, + { name: '-t', value: 'profileformats' }, + { name: '-i', value: 'test-handle' }, ], []); expect(notificationsService.error).toHaveBeenCalled(); expect(processDataService.findByHref).not.toHaveBeenCalled(); @@ -148,8 +148,8 @@ describe('CurationFormComponent', () => { comp.submit(); expect(scriptDataService.invoke).toHaveBeenCalledWith('curate', [ - {name: '-t', value: 'profileformats'}, - {name: '-i', value: 'form-handle'}, + { name: '-t', value: 'profileformats' }, + { name: '-i', value: 'form-handle' }, ], []); }); it('should use "all" when the handle provided by the form is empty and when no dsoHandle is provided', () => { @@ -157,8 +157,8 @@ describe('CurationFormComponent', () => { comp.submit(); expect(scriptDataService.invoke).toHaveBeenCalledWith('curate', [ - {name: '-t', value: 'profileformats'}, - {name: '-i', value: 'all'}, + { name: '-t', value: 'profileformats' }, + { name: '-i', value: 'all' }, ], []); }); diff --git a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-issue/journal-issue-search-result-list-element.component.spec.ts b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-issue/journal-issue-search-result-list-element.component.spec.ts index 0fa0846e08..c615550cd4 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-issue/journal-issue-search-result-list-element.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-issue/journal-issue-search-result-list-element.component.spec.ts @@ -171,14 +171,14 @@ describe('JournalIssueSearchResultListElementComponent', () => { TestBed.configureTestingModule({ declarations: [JournalIssueSearchResultListElementComponent, TruncatePipe], providers: [ - {provide: TruncatableService, useValue: {}}, - {provide: DSONameService, useClass: DSONameServiceMock}, + { provide: TruncatableService, useValue: {} }, + { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: enviromentNoThumbs }, ], schemas: [NO_ERRORS_SCHEMA], }).overrideComponent(JournalIssueSearchResultListElementComponent, { - set: {changeDetection: ChangeDetectionStrategy.Default}, + set: { changeDetection: ChangeDetectionStrategy.Default }, }).compileComponents(); })); diff --git a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-volume/journal-volume-search-result-list-element.component.spec.ts b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-volume/journal-volume-search-result-list-element.component.spec.ts index 1787fdaf8f..ce90672c6f 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-volume/journal-volume-search-result-list-element.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-volume/journal-volume-search-result-list-element.component.spec.ts @@ -169,14 +169,14 @@ describe('JournalVolumeSearchResultListElementComponent', () => { TestBed.configureTestingModule({ declarations: [JournalVolumeSearchResultListElementComponent, TruncatePipe], providers: [ - {provide: TruncatableService, useValue: {}}, - {provide: DSONameService, useClass: DSONameServiceMock}, + { provide: TruncatableService, useValue: {} }, + { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: enviromentNoThumbs }, ], schemas: [NO_ERRORS_SCHEMA], }).overrideComponent(JournalVolumeSearchResultListElementComponent, { - set: {changeDetection: ChangeDetectionStrategy.Default}, + set: { changeDetection: ChangeDetectionStrategy.Default }, }).compileComponents(); })); diff --git a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal/journal-search-result-list-element.component.spec.ts b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal/journal-search-result-list-element.component.spec.ts index 34a8ef8161..2c7a360e13 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal/journal-search-result-list-element.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal/journal-search-result-list-element.component.spec.ts @@ -141,14 +141,14 @@ describe('JournalSearchResultListElementComponent', () => { TestBed.configureTestingModule({ declarations: [JournalSearchResultListElementComponent, TruncatePipe], providers: [ - {provide: TruncatableService, useValue: {}}, - {provide: DSONameService, useClass: DSONameServiceMock}, + { provide: TruncatableService, useValue: {} }, + { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: enviromentNoThumbs }, ], schemas: [NO_ERRORS_SCHEMA], }).overrideComponent(JournalSearchResultListElementComponent, { - set: {changeDetection: ChangeDetectionStrategy.Default}, + set: { changeDetection: ChangeDetectionStrategy.Default }, }).compileComponents(); })); diff --git a/src/app/entity-groups/journal-entities/journal-entities.module.ts b/src/app/entity-groups/journal-entities/journal-entities.module.ts index b5f096c7b9..a61a96c8f2 100644 --- a/src/app/entity-groups/journal-entities/journal-entities.module.ts +++ b/src/app/entity-groups/journal-entities/journal-entities.module.ts @@ -66,7 +66,7 @@ export class JournalEntitiesModule { static withEntryComponents() { return { ngModule: JournalEntitiesModule, - providers: ENTRY_COMPONENTS.map((component) => ({provide: component})), + providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })), }; } diff --git a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/org-unit/org-unit-search-result-list-element.component.spec.ts b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/org-unit/org-unit-search-result-list-element.component.spec.ts index 4fda604795..3624701952 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/org-unit/org-unit-search-result-list-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/org-unit/org-unit-search-result-list-element.component.spec.ts @@ -158,14 +158,14 @@ describe('OrgUnitSearchResultListElementComponent', () => { )], declarations: [OrgUnitSearchResultListElementComponent, TruncatePipe], providers: [ - {provide: TruncatableService, useValue: {}}, - {provide: DSONameService, useClass: DSONameServiceMock}, + { provide: TruncatableService, useValue: {} }, + { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: enviromentNoThumbs }, ], schemas: [NO_ERRORS_SCHEMA], }).overrideComponent(OrgUnitSearchResultListElementComponent, { - set: {changeDetection: ChangeDetectionStrategy.Default}, + set: { changeDetection: ChangeDetectionStrategy.Default }, }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/person/person-search-result-list-element.component.spec.ts b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/person/person-search-result-list-element.component.spec.ts index c27056c9b8..b454f52543 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/person/person-search-result-list-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/person/person-search-result-list-element.component.spec.ts @@ -158,14 +158,14 @@ describe('PersonSearchResultListElementComponent', () => { )], declarations: [PersonSearchResultListElementComponent, TruncatePipe], providers: [ - {provide: TruncatableService, useValue: {}}, - {provide: DSONameService, useClass: DSONameServiceMock}, + { provide: TruncatableService, useValue: {} }, + { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: enviromentNoThumbs }, ], schemas: [NO_ERRORS_SCHEMA], }).overrideComponent(PersonSearchResultListElementComponent, { - set: {changeDetection: ChangeDetectionStrategy.Default}, + set: { changeDetection: ChangeDetectionStrategy.Default }, }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/project/project-search-result-list-element.component.spec.ts b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/project/project-search-result-list-element.component.spec.ts index 0d581c4517..b2a7c3ffe1 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/project/project-search-result-list-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/project/project-search-result-list-element.component.spec.ts @@ -140,15 +140,15 @@ describe('ProjectSearchResultListElementComponent', () => { TestBed.configureTestingModule({ declarations: [ProjectSearchResultListElementComponent, TruncatePipe], providers: [ - {provide: TruncatableService, useValue: {}}, - {provide: DSONameService, useClass: DSONameServiceMock}, + { provide: TruncatableService, useValue: {} }, + { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: enviromentNoThumbs }, ], schemas: [NO_ERRORS_SCHEMA], }).overrideComponent(ProjectSearchResultListElementComponent, { - set: {changeDetection: ChangeDetectionStrategy.Default}, + set: { changeDetection: ChangeDetectionStrategy.Default }, }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-search-result-list-submission-element.component.spec.ts b/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-search-result-list-submission-element.component.spec.ts index bc66d630d4..25e382f60b 100644 --- a/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-search-result-list-submission-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-search-result-list-submission-element.component.spec.ts @@ -123,7 +123,7 @@ describe('PersonSearchResultListElementSubmissionComponent', () => { { provide: NgbModal, useValue: {} }, { provide: ItemDataService, useValue: {} }, { provide: SelectableListService, useValue: {} }, - { provide: Store, useValue: {}}, + { provide: Store, useValue: {} }, { provide: ObjectCacheService, useValue: {} }, { provide: UUIDService, useValue: {} }, { provide: RemoteDataBuildService, useValue: {} }, @@ -203,7 +203,7 @@ describe('PersonSearchResultListElementSubmissionComponent', () => { { provide: NgbModal, useValue: {} }, { provide: ItemDataService, useValue: {} }, { provide: SelectableListService, useValue: {} }, - { provide: Store, useValue: {}}, + { provide: Store, useValue: {} }, { provide: ObjectCacheService, useValue: {} }, { provide: UUIDService, useValue: {} }, { provide: RemoteDataBuildService, useValue: {} }, diff --git a/src/app/forgot-password/forgot-password-form/forgot-password-form.component.spec.ts b/src/app/forgot-password/forgot-password-form/forgot-password-form.component.spec.ts index fe9a88784d..b7a9ab8978 100644 --- a/src/app/forgot-password/forgot-password-form/forgot-password-form.component.spec.ts +++ b/src/app/forgot-password/forgot-password-form/forgot-password-form.component.spec.ts @@ -51,7 +51,7 @@ describe('ForgotPasswordFormComponent', () => { beforeEach(waitForAsync(() => { - route = {data: observableOf({registration: createSuccessfulRemoteDataObject(registration)})}; + route = { data: observableOf({ registration: createSuccessfulRemoteDataObject(registration) }) }; router = new RouterStub(); notificationsService = new NotificationsServiceStub(); @@ -67,12 +67,12 @@ describe('ForgotPasswordFormComponent', () => { imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), ReactiveFormsModule], declarations: [ForgotPasswordFormComponent], providers: [ - {provide: Router, useValue: router}, - {provide: ActivatedRoute, useValue: route}, - {provide: Store, useValue: store}, - {provide: EPersonDataService, useValue: ePersonDataService}, - {provide: UntypedFormBuilder, useValue: new UntypedFormBuilder()}, - {provide: NotificationsService, useValue: notificationsService}, + { provide: Router, useValue: router }, + { provide: ActivatedRoute, useValue: route }, + { provide: Store, useValue: store }, + { provide: EPersonDataService, useValue: ePersonDataService }, + { provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() }, + { provide: NotificationsService, useValue: notificationsService }, ], schemas: [CUSTOM_ELEMENTS_SCHEMA], }).compileComponents(); diff --git a/src/app/forgot-password/forgot-password-routing.module.ts b/src/app/forgot-password/forgot-password-routing.module.ts index 74029cc275..0d7c493d1c 100644 --- a/src/app/forgot-password/forgot-password-routing.module.ts +++ b/src/app/forgot-password/forgot-password-routing.module.ts @@ -12,7 +12,7 @@ import { ThemedForgotPasswordFormComponent } from './forgot-password-form/themed { path: '', component: ThemedForgotEmailComponent, - data: {title: 'forgot-password.title'}, + data: { title: 'forgot-password.title' }, }, { path: ':token', diff --git a/src/app/home-page/top-level-community-list/top-level-community-list.component.ts b/src/app/home-page/top-level-community-list/top-level-community-list.component.ts index e365ad9144..6c46ccc7a4 100644 --- a/src/app/home-page/top-level-community-list/top-level-community-list.component.ts +++ b/src/app/home-page/top-level-community-list/top-level-community-list.component.ts @@ -95,7 +95,7 @@ export class TopLevelCommunityListComponent implements OnInit, OnDestroy { return this.cds.findTop({ currentPage: currentPagination.currentPage, elementsPerPage: currentPagination.pageSize, - sort: {field: currentSort.field, direction: currentSort.direction}, + sort: { field: currentSort.field, direction: currentSort.direction }, }); }), ).subscribe((results) => { diff --git a/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.spec.ts b/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.spec.ts index e32c4368f1..b9eef37f04 100644 --- a/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.spec.ts +++ b/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.spec.ts @@ -61,8 +61,8 @@ describe('BitstreamRequestACopyPageComponent', () => { eperson = Object.assign(new EPerson(), { email: 'test@mail.org', metadata: { - 'eperson.firstname': [{value: 'Test'}], - 'eperson.lastname': [{value: 'User'}], + 'eperson.firstname': [{ value: 'Test' }], + 'eperson.lastname': [{ value: 'User' }], }, }); authService = jasmine.createSpyObj('authService', { @@ -83,13 +83,13 @@ describe('BitstreamRequestACopyPageComponent', () => { notificationsService = new NotificationsServiceStub(); - item = Object.assign(new Item(), {uuid: 'item-uuid'}); + item = Object.assign(new Item(), { uuid: 'item-uuid' }); bitstream = Object.assign(new Bitstream(), { uuid: 'bitstreamUuid', _links: { - content: {href: 'bitstream-content-link'}, - self: {href: 'bitstream-self-link'}, + content: { href: 'bitstream-content-link' }, + self: { href: 'bitstream-self-link' }, }, }); @@ -116,15 +116,15 @@ describe('BitstreamRequestACopyPageComponent', () => { imports: [CommonModule, TranslateModule.forRoot(), FormsModule, ReactiveFormsModule], declarations: [BitstreamRequestACopyPageComponent], providers: [ - {provide: Location, useValue: location}, - {provide: ActivatedRoute, useValue: activatedRoute}, - {provide: Router, useValue: router}, - {provide: AuthorizationDataService, useValue: authorizationService}, - {provide: AuthService, useValue: authService}, - {provide: ItemRequestDataService, useValue: itemRequestDataService}, - {provide: NotificationsService, useValue: notificationsService}, - {provide: DSONameService, useValue: new DSONameServiceMock()}, - {provide: BitstreamDataService, useValue: bitstreamDataService}, + { provide: Location, useValue: location }, + { provide: ActivatedRoute, useValue: activatedRoute }, + { provide: Router, useValue: router }, + { provide: AuthorizationDataService, useValue: authorizationService }, + { provide: AuthService, useValue: authService }, + { provide: ItemRequestDataService, useValue: itemRequestDataService }, + { provide: NotificationsService, useValue: notificationsService }, + { provide: DSONameService, useValue: new DSONameServiceMock() }, + { provide: BitstreamDataService, useValue: bitstreamDataService }, ], }) .compileComponents(); diff --git a/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.ts b/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.ts index ff73d2e6cc..dec28d4fd7 100644 --- a/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.ts +++ b/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.ts @@ -133,7 +133,7 @@ export class BitstreamRequestACopyPageComponent implements OnInit, OnDestroy { this.subs.push(observableCombineLatest([this.canDownload$, canRequestCopy$]).subscribe(([canDownload, canRequestCopy]) => { if (!canDownload && !canRequestCopy) { - this.router.navigateByUrl(getForbiddenRoute(), {skipLocationChange: true}); + this.router.navigateByUrl(getForbiddenRoute(), { skipLocationChange: true }); } })); this.initValues(); @@ -160,13 +160,13 @@ export class BitstreamRequestACopyPageComponent implements OnInit, OnDestroy { */ private initValues() { this.getCurrentUser().pipe(take(1)).subscribe((user) => { - this.requestCopyForm.patchValue({allfiles: 'true'}); + this.requestCopyForm.patchValue({ allfiles: 'true' }); if (hasValue(user)) { - this.requestCopyForm.patchValue({name: user.name, email: user.email}); + this.requestCopyForm.patchValue({ name: user.name, email: user.email }); } }); this.bitstream$.pipe(take(1)).subscribe((bitstream) => { - this.requestCopyForm.patchValue({allfiles: 'false'}); + this.requestCopyForm.patchValue({ allfiles: 'false' }); }); } diff --git a/src/app/item-page/edit-item-page/edit-item-operators.spec.ts b/src/app/item-page/edit-item-page/edit-item-operators.spec.ts index 85d4e8b9e8..41fbb4a820 100644 --- a/src/app/item-page/edit-item-page/edit-item-operators.spec.ts +++ b/src/app/item-page/edit-item-page/edit-item-operators.spec.ts @@ -1,13 +1,13 @@ -import {hot} from 'jasmine-marbles'; +import { hot } from 'jasmine-marbles'; -import {RemoteData} from '../../core/data/remote-data'; -import {Item} from '../../core/shared/item.model'; +import { RemoteData } from '../../core/data/remote-data'; +import { Item } from '../../core/shared/item.model'; import { isNotEmpty } from '../../shared/empty.util'; import { createFailedRemoteDataObject, createSuccessfulRemoteDataObject, } from '../../shared/remote-data.utils'; -import {findSuccessfulAccordingTo} from './edit-item-operators'; +import { findSuccessfulAccordingTo } from './edit-item-operators'; describe('findSuccessfulAccordingTo', () => { let mockItem1; diff --git a/src/app/item-page/edit-item-page/edit-item-operators.ts b/src/app/item-page/edit-item-page/edit-item-operators.ts index 34a0157f13..dea90d90f1 100644 --- a/src/app/item-page/edit-item-page/edit-item-operators.ts +++ b/src/app/item-page/edit-item-page/edit-item-operators.ts @@ -1,8 +1,8 @@ -import {Observable} from 'rxjs'; -import {first} from 'rxjs/operators'; +import { Observable } from 'rxjs'; +import { first } from 'rxjs/operators'; -import {RemoteData} from '../../core/data/remote-data'; -import {getAllSucceededRemoteData} from '../../core/shared/operators'; +import { RemoteData } from '../../core/data/remote-data'; +import { getAllSucceededRemoteData } from '../../core/shared/operators'; /** * Return first Observable of a RemoteData object that complies to the provided predicate diff --git a/src/app/item-page/edit-item-page/edit-item-page.component.spec.ts b/src/app/item-page/edit-item-page/edit-item-page.component.spec.ts index 875dd4a2e3..e6277385c6 100644 --- a/src/app/item-page/edit-item-page/edit-item-page.component.spec.ts +++ b/src/app/item-page/edit-item-page/edit-item-page.component.spec.ts @@ -75,7 +75,7 @@ describe('ItemPageComponent', () => { }, ], }, - data: observableOf({dso: createSuccessfulRemoteDataObject(new Item())}), + data: observableOf({ dso: createSuccessfulRemoteDataObject(new Item()) }), }; const mockRouter = { diff --git a/src/app/item-page/edit-item-page/item-authorizations/item-authorizations.component.ts b/src/app/item-page/edit-item-page/item-authorizations/item-authorizations.component.ts index 211be50a65..c5b33e1b74 100644 --- a/src/app/item-page/edit-item-page/item-authorizations/item-authorizations.component.ts +++ b/src/app/item-page/edit-item-page/item-authorizations/item-authorizations.component.ts @@ -172,7 +172,7 @@ export class ItemAuthorizationsComponent implements OnInit, OnDestroy { getFirstSucceededRemoteDataWithNotEmptyPayload(), map((item: Item) => this.linkService.resolveLink( item, - followLink('bundles', {findListOptions: {currentPage : page, elementsPerPage: this.bundlesPerPage}}, followLink('bitstreams')), + followLink('bundles', { findListOptions: { currentPage : page, elementsPerPage: this.bundlesPerPage } }, followLink('bitstreams')), )), ) as Observable; diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.ts index c85186bf59..191ba89845 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.ts @@ -121,7 +121,7 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme * Actions to perform after the item has been initialized */ postItemInit(): void { - this.bundles$ = this.itemService.getBundles(this.item.id, new PaginatedSearchOptions({pagination: this.bundlesOptions})).pipe( + this.bundles$ = this.itemService.getBundles(this.item.id, new PaginatedSearchOptions({ pagination: this.bundlesOptions })).pipe( getFirstSucceededRemoteData(), getRemoteDataPayload(), map((bundlePage: PaginatedList) => bundlePage.page), @@ -226,7 +226,7 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme * Shows a notification to remind the user that they can undo this */ discard() { - const undoNotification = this.notificationsService.info(this.getNotificationTitle('discarded'), this.getNotificationContent('discarded'), {timeOut: this.discardTimeOut}); + const undoNotification = this.notificationsService.info(this.getNotificationTitle('discarded'), this.getNotificationContent('discarded'), { timeOut: this.discardTimeOut }); this.objectUpdatesService.discardAllFieldUpdates(this.url, undoNotification); } diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.ts index 3e6209d421..e8791cbe4b 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.ts @@ -30,7 +30,7 @@ export class ItemEditBitstreamBundleComponent implements OnInit { /** * The view on the bundle information and bitstreams */ - @ViewChild('bundleView', {static: true}) bundleView; + @ViewChild('bundleView', { static: true }) bundleView; /** * The bundle to display bitstreams for diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.ts index 1a423fc1b5..bdd64c5376 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.ts @@ -60,7 +60,7 @@ export class PaginatedDragAndDropBitstreamListComponent extends AbstractPaginate initializeObjectsRD(): void { this.objectsRD$ = this.currentPage$.pipe( switchMap((page: PaginationComponentOptions) => { - const paginatedOptions = new PaginatedSearchOptions({pagination: Object.assign({}, page)}); + const paginatedOptions = new PaginatedSearchOptions({ pagination: Object.assign({}, page) }); return this.bundleService.getBitstreamsEndpoint(this.bundle.id, paginatedOptions).pipe( switchMap((href) => this.requestService.hasByHref$(href)), switchMap(() => this.bundleService.getBitstreams( diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-drag-handle/item-edit-bitstream-drag-handle.component.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-drag-handle/item-edit-bitstream-drag-handle.component.ts index 11095888da..8d63c2041d 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-drag-handle/item-edit-bitstream-drag-handle.component.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-drag-handle/item-edit-bitstream-drag-handle.component.ts @@ -19,7 +19,7 @@ export class ItemEditBitstreamDragHandleComponent implements OnInit { /** * The view on the drag-handle */ - @ViewChild('handleView', {static: true}) handleView; + @ViewChild('handleView', { static: true }) handleView; constructor(private viewContainerRef: ViewContainerRef) { } diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.ts index e1c4f81c8a..f405a79a56 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.ts @@ -38,7 +38,7 @@ export class ItemEditBitstreamComponent implements OnChanges, OnInit { /** * The view on the bitstream */ - @ViewChild('bitstreamView', {static: true}) bitstreamView; + @ViewChild('bitstreamView', { static: true }) bitstreamView; /** * The current field, value and state of the bitstream diff --git a/src/app/item-page/edit-item-page/item-curate/item-curate.component.spec.ts b/src/app/item-page/edit-item-page/item-curate/item-curate.component.spec.ts index 362e44f559..a1bc23ee0e 100644 --- a/src/app/item-page/edit-item-page/item-curate/item-curate.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-curate/item-curate.component.spec.ts @@ -26,7 +26,7 @@ describe('ItemCurateComponent', () => { const item = Object.assign(new Item(), { handle: '123456789/1', - metadata: {'dc.title': ['Item Name']}, + metadata: { 'dc.title': ['Item Name'] }, }); beforeEach(waitForAsync(() => { @@ -46,8 +46,8 @@ describe('ItemCurateComponent', () => { imports: [TranslateModule.forRoot()], declarations: [ItemCurateComponent], providers: [ - {provide: ActivatedRoute, useValue: routeStub}, - {provide: DSONameService, useValue: dsoNameService}, + { provide: ActivatedRoute, useValue: routeStub }, + { provide: DSONameService, useValue: dsoNameService }, ], schemas: [CUSTOM_ELEMENTS_SCHEMA], }).compileComponents(); diff --git a/src/app/item-page/edit-item-page/item-operation/item-operation.component.ts b/src/app/item-page/edit-item-page/item-operation/item-operation.component.ts index a3b3a6ac44..1ad20d4d12 100644 --- a/src/app/item-page/edit-item-page/item-operation/item-operation.component.ts +++ b/src/app/item-page/edit-item-page/item-operation/item-operation.component.ts @@ -3,7 +3,7 @@ import { Input, } from '@angular/core'; -import {ItemOperation} from './itemOperation.model'; +import { ItemOperation } from './itemOperation.model'; @Component({ selector: 'ds-item-operation', diff --git a/src/app/item-page/edit-item-page/item-register-doi/item-register-doi.component.spec.ts b/src/app/item-page/edit-item-page/item-register-doi/item-register-doi.component.spec.ts index 90ba8ae8d3..321d40d0d4 100644 --- a/src/app/item-page/edit-item-page/item-register-doi/item-register-doi.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-register-doi/item-register-doi.component.spec.ts @@ -55,9 +55,9 @@ describe('ItemRegisterDoiComponent', () => { }); mockIdentifierDataService = jasmine.createSpyObj('mockIdentifierDataService', { - getIdentifierDataFor: createSuccessfulRemoteDataObject$({'identifiers': []}), + getIdentifierDataFor: createSuccessfulRemoteDataObject$({ 'identifiers': [] }), getIdentifierRegistrationConfiguration: createSuccessfulRemoteDataObject$('true'), - registerIdentifier: createSuccessfulRemoteDataObject$({'identifiers': []}), + registerIdentifier: createSuccessfulRemoteDataObject$({ 'identifiers': [] }), }); mockItemDataService = jasmine.createSpyObj('mockItemDataService', { @@ -81,7 +81,7 @@ describe('ItemRegisterDoiComponent', () => { { provide: ActivatedRoute, useValue: routeStub }, { provide: Router, useValue: routerStub }, { provide: ItemDataService, useValue: mockItemDataService }, - { provide: IdentifierDataService, useValue: mockIdentifierDataService}, + { provide: IdentifierDataService, useValue: mockIdentifierDataService }, { provide: NotificationsService, useValue: notificationsServiceStub }, ], schemas: [ CUSTOM_ELEMENTS_SCHEMA, diff --git a/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.spec.ts b/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.spec.ts index 793aff6b41..d6cf0cbd8c 100644 --- a/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.spec.ts @@ -153,7 +153,7 @@ describe('ItemRelationshipsComponent', () => { fieldUpdate2 = { field: Object.assign( relationships[1], - {keepLeftVirtualMetadata: true, keepRightVirtualMetadata: false}, + { keepLeftVirtualMetadata: true, keepRightVirtualMetadata: false }, ), changeType: FieldChangeType.REMOVE, }; diff --git a/src/app/item-page/edit-item-page/item-status/item-status.component.spec.ts b/src/app/item-page/edit-item-page/item-status/item-status.component.spec.ts index add005e444..7751d72aeb 100644 --- a/src/app/item-page/edit-item-page/item-status/item-status.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-status/item-status.component.spec.ts @@ -43,7 +43,7 @@ describe('ItemStatusComponent', () => { }); mockIdentifierDataService = jasmine.createSpyObj('mockIdentifierDataService', { - getIdentifierDataFor: createSuccessfulRemoteDataObject$({'identifiers': []}), + getIdentifierDataFor: createSuccessfulRemoteDataObject$({ 'identifiers': [] }), getIdentifierRegistrationConfiguration: createSuccessfulRemoteDataObject$('true'), }); diff --git a/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.spec.ts b/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.spec.ts index 699fa62c62..6c997784a8 100644 --- a/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.spec.ts @@ -26,7 +26,7 @@ describe('ItemVersionHistoryComponent', () => { const activatedRoute = { parent: { parent: { - data: observableOf({dso: createSuccessfulRemoteDataObject(item)}), + data: observableOf({ dso: createSuccessfulRemoteDataObject(item) }), }, }, }; diff --git a/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.spec.ts b/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.spec.ts index 894e03ba63..9c59a293ff 100644 --- a/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.spec.ts +++ b/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.spec.ts @@ -3,11 +3,11 @@ import { TestBed, waitForAsync, } from '@angular/core/testing'; -import {By} from '@angular/platform-browser'; -import {TranslateModule} from '@ngx-translate/core'; +import { By } from '@angular/platform-browser'; +import { TranslateModule } from '@ngx-translate/core'; -import {Item} from '../../../core/shared/item.model'; -import {ModifyItemOverviewComponent} from './modify-item-overview.component'; +import { Item } from '../../../core/shared/item.model'; +import { ModifyItemOverviewComponent } from './modify-item-overview.component'; let comp: ModifyItemOverviewComponent; let fixture: ComponentFixture; diff --git a/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.ts b/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.ts index 428f73c849..4dcea7188b 100644 --- a/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.ts +++ b/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.ts @@ -4,8 +4,8 @@ import { OnInit, } from '@angular/core'; -import {Item} from '../../../core/shared/item.model'; -import {MetadataMap} from '../../../core/shared/metadata.models'; +import { Item } from '../../../core/shared/item.model'; +import { MetadataMap } from '../../../core/shared/metadata.models'; @Component({ selector: 'ds-modify-item-overview', 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 c45e1de5aa..48c01eae98 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 @@ -6,15 +6,15 @@ import { OnInit, Output, } from '@angular/core'; -import {Observable} from 'rxjs'; +import { Observable } from 'rxjs'; import { APP_CONFIG, AppConfig, } from '../../../../config/app-config.interface'; -import {ObjectUpdatesService} from '../../../core/data/object-updates/object-updates.service'; -import {Item} from '../../../core/shared/item.model'; -import {MetadataValue} from '../../../core/shared/metadata.models'; +import { ObjectUpdatesService } from '../../../core/data/object-updates/object-updates.service'; +import { Item } from '../../../core/shared/item.model'; +import { MetadataValue } from '../../../core/shared/metadata.models'; @Component({ selector: 'ds-virtual-metadata', diff --git a/src/app/item-page/field-components/collections/collections.component.spec.ts b/src/app/item-page/field-components/collections/collections.component.spec.ts index 039dbe67f7..c7e13811cf 100644 --- a/src/app/item-page/field-components/collections/collections.component.spec.ts +++ b/src/app/item-page/field-components/collections/collections.component.spec.ts @@ -63,7 +63,7 @@ describe('CollectionsComponent', () => { declarations: [ CollectionsComponent ], providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, - { provide: RemoteDataBuildService, useValue: getMockRemoteDataBuildService()}, + { provide: RemoteDataBuildService, useValue: getMockRemoteDataBuildService() }, { provide: CollectionDataService, useValue: collectionDataService }, ], diff --git a/src/app/item-page/field-components/metadata-uri-values/metadata-uri-values.component.spec.ts b/src/app/item-page/field-components/metadata-uri-values/metadata-uri-values.component.spec.ts index 9b6a66ca1b..81d3ae2d27 100644 --- a/src/app/item-page/field-components/metadata-uri-values/metadata-uri-values.component.spec.ts +++ b/src/app/item-page/field-components/metadata-uri-values/metadata-uri-values.component.spec.ts @@ -53,7 +53,7 @@ describe('MetadataUriValuesComponent', () => { declarations: [MetadataUriValuesComponent], schemas: [NO_ERRORS_SCHEMA], }).overrideComponent(MetadataUriValuesComponent, { - set: {changeDetection: ChangeDetectionStrategy.Default}, + set: { changeDetection: ChangeDetectionStrategy.Default }, }).compileComponents(); })); diff --git a/src/app/item-page/field-components/metadata-values/metadata-values.component.spec.ts b/src/app/item-page/field-components/metadata-values/metadata-values.component.spec.ts index 11db71811d..eb076d2c8c 100644 --- a/src/app/item-page/field-components/metadata-values/metadata-values.component.spec.ts +++ b/src/app/item-page/field-components/metadata-values/metadata-values.component.spec.ts @@ -53,7 +53,7 @@ describe('MetadataValuesComponent', () => { declarations: [MetadataValuesComponent], schemas: [NO_ERRORS_SCHEMA], }).overrideComponent(MetadataValuesComponent, { - set: {changeDetection: ChangeDetectionStrategy.Default}, + set: { changeDetection: ChangeDetectionStrategy.Default }, }).compileComponents(); })); @@ -80,7 +80,7 @@ describe('MetadataValuesComponent', () => { }); it('should correctly detect a pattern on string containing "test"', () => { - const mdValue = {value: 'This is a test value'} as MetadataValue; + const mdValue = { value: 'This is a test value' } as MetadataValue; expect(comp.hasLink(mdValue)).toBe(true); }); diff --git a/src/app/item-page/field-components/metadata-values/metadata-values.component.ts b/src/app/item-page/field-components/metadata-values/metadata-values.component.ts index 76da1c149c..0a249d2110 100644 --- a/src/app/item-page/field-components/metadata-values/metadata-values.component.ts +++ b/src/app/item-page/field-components/metadata-values/metadata-values.component.ts @@ -94,9 +94,9 @@ export class MetadataValuesComponent implements OnChanges { * @param value the specific metadata value being linked */ getQueryParams(value) { - const queryParams = {startsWith: value}; + const queryParams = { startsWith: value }; if (this.browseDefinition.getRenderType() === VALUE_LIST_BROWSE_DEFINITION.value) { - return {value: value}; + return { value: value }; } return queryParams; } diff --git a/src/app/item-page/full/field-components/file-section/full-file-section.component.ts b/src/app/item-page/full/field-components/file-section/full-file-section.component.ts index e3ecda4086..bd3ff97278 100644 --- a/src/app/item-page/full/field-components/file-section/full-file-section.component.ts +++ b/src/app/item-page/full/field-components/file-section/full-file-section.component.ts @@ -83,7 +83,7 @@ export class FullFileSectionComponent extends FileSectionComponent implements On switchMap((options: PaginationComponentOptions) => this.bitstreamDataService.findAllByItemAndBundleName( this.item, 'ORIGINAL', - {elementsPerPage: options.pageSize, currentPage: options.currentPage}, + { elementsPerPage: options.pageSize, currentPage: options.currentPage }, true, true, followLink('format'), @@ -101,7 +101,7 @@ export class FullFileSectionComponent extends FileSectionComponent implements On switchMap((options: PaginationComponentOptions) => this.bitstreamDataService.findAllByItemAndBundleName( this.item, 'LICENSE', - {elementsPerPage: options.pageSize, currentPage: options.currentPage}, + { elementsPerPage: options.pageSize, currentPage: options.currentPage }, true, true, followLink('format'), diff --git a/src/app/item-page/full/full-item-page.component.spec.ts b/src/app/item-page/full/full-item-page.component.spec.ts index bdd48aac26..63b0881341 100644 --- a/src/app/item-page/full/full-item-page.component.spec.ts +++ b/src/app/item-page/full/full-item-page.component.spec.ts @@ -173,7 +173,7 @@ describe('FullItemPageComponent', () => { }); it('should not show simple view button when originated from workflow', fakeAsync(() => { - routeData.wfi = createSuccessfulRemoteDataObject$({ id: 'wfiId'}); + routeData.wfi = createSuccessfulRemoteDataObject$({ id: 'wfiId' }); comp.ngOnInit(); fixture.detectChanges(); fixture.whenStable().then(() => { diff --git a/src/app/item-page/item-page.module.ts b/src/app/item-page/item-page.module.ts index 93e6c3b354..abac310b57 100644 --- a/src/app/item-page/item-page.module.ts +++ b/src/app/item-page/item-page.module.ts @@ -127,7 +127,7 @@ export class ItemPageModule { static withEntryComponents() { return { ngModule: ItemPageModule, - providers: ENTRY_COMPONENTS.map((component) => ({provide: component})), + providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })), }; } diff --git a/src/app/item-page/simple/field-components/file-section/themed-file-section.component.ts b/src/app/item-page/simple/field-components/file-section/themed-file-section.component.ts index b51ad0d161..afff29b4b7 100644 --- a/src/app/item-page/simple/field-components/file-section/themed-file-section.component.ts +++ b/src/app/item-page/simple/field-components/file-section/themed-file-section.component.ts @@ -3,7 +3,7 @@ import { Input, } from '@angular/core'; -import {Item} from '../../../../core/shared/item.model'; +import { Item } from '../../../../core/shared/item.model'; import { ThemedComponent } from '../../../../shared/theme-support/themed.component'; import { FileSectionComponent } from './file-section.component'; diff --git a/src/app/item-page/simple/item-types/publication/publication.component.spec.ts b/src/app/item-page/simple/item-types/publication/publication.component.spec.ts index f4bffde1d5..5d3640f833 100644 --- a/src/app/item-page/simple/item-types/publication/publication.component.spec.ts +++ b/src/app/item-page/simple/item-types/publication/publication.component.spec.ts @@ -114,7 +114,7 @@ describe('PublicationComponent', () => { schemas: [NO_ERRORS_SCHEMA], }).overrideComponent(PublicationComponent, { - set: {changeDetection: ChangeDetectionStrategy.Default}, + set: { changeDetection: ChangeDetectionStrategy.Default }, }); })); @@ -195,7 +195,7 @@ describe('PublicationComponent', () => { 'dspace.iiif.enabled': [getIIIFEnabled(true)], 'iiif.search.enabled': [getIIIFSearchEnabled(true)], }; - TestBed.overrideProvider(RouteService, {useValue: localMockRouteService}); + TestBed.overrideProvider(RouteService, { useValue: localMockRouteService }); TestBed.compileComponents(); fixture = TestBed.createComponent(PublicationComponent); comp = fixture.componentInstance; @@ -225,7 +225,7 @@ describe('PublicationComponent', () => { 'dspace.iiif.enabled': [getIIIFEnabled(true)], 'iiif.search.enabled': [getIIIFSearchEnabled(true)], }; - TestBed.overrideProvider(RouteService, {useValue: localMockRouteService}); + TestBed.overrideProvider(RouteService, { useValue: localMockRouteService }); TestBed.compileComponents(); fixture = TestBed.createComponent(PublicationComponent); comp = fixture.componentInstance; 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 586a2b4a51..855c9e6383 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 @@ -112,7 +112,7 @@ export const paginatedRelationsToItems = (thisId: string) => ), distinctUntilChanged(compareArraysUsingIds()), map((relatedItems: Item[]) => - Object.assign(relationshipsRD, { payload: Object.assign(relationshipsRD.payload, { page: relatedItems } )}), + Object.assign(relationshipsRD, { payload: Object.assign(relationshipsRD.payload, { page: relatedItems } ) }), ), ); }), diff --git a/src/app/item-page/simple/item-types/shared/item.component.spec.ts b/src/app/item-page/simple/item-types/shared/item.component.spec.ts index 25fa42cb85..b3b06f22d0 100644 --- a/src/app/item-page/simple/item-types/shared/item.component.spec.ts +++ b/src/app/item-page/simple/item-types/shared/item.component.spec.ts @@ -468,7 +468,7 @@ describe('ItemComponent', () => { ], schemas: [NO_ERRORS_SCHEMA], }).overrideComponent(ItemComponent, { - set: {changeDetection: ChangeDetectionStrategy.Default}, + set: { changeDetection: ChangeDetectionStrategy.Default }, }); })); diff --git a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts index a42cd6c089..667c2a58d0 100644 --- a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts +++ b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts @@ -116,7 +116,7 @@ describe('UntypedItemComponent', () => { ], schemas: [NO_ERRORS_SCHEMA], }).overrideComponent(UntypedItemComponent, { - set: {changeDetection: ChangeDetectionStrategy.Default}, + set: { changeDetection: ChangeDetectionStrategy.Default }, }); })); @@ -201,7 +201,7 @@ describe('UntypedItemComponent', () => { 'dspace.iiif.enabled': [getIIIFEnabled(true)], 'iiif.search.enabled': [getIIIFSearchEnabled(true)], }; - TestBed.overrideProvider(RouteService, {useValue: localMockRouteService}); + TestBed.overrideProvider(RouteService, { useValue: localMockRouteService }); TestBed.compileComponents(); fixture = TestBed.createComponent(UntypedItemComponent); spyOn(localMockRouteService, 'getPreviousUrl').and.callThrough(); @@ -232,7 +232,7 @@ describe('UntypedItemComponent', () => { 'dspace.iiif.enabled': [getIIIFEnabled(true)], 'iiif.search.enabled': [getIIIFSearchEnabled(true)], }; - TestBed.overrideProvider(RouteService, {useValue: localMockRouteService}); + TestBed.overrideProvider(RouteService, { useValue: localMockRouteService }); TestBed.compileComponents(); fixture = TestBed.createComponent(UntypedItemComponent); diff --git a/src/app/item-page/simple/related-items/related-items.component.spec.ts b/src/app/item-page/simple/related-items/related-items.component.spec.ts index 38dd690670..7c3781366e 100644 --- a/src/app/item-page/simple/related-items/related-items.component.spec.ts +++ b/src/app/item-page/simple/related-items/related-items.component.spec.ts @@ -139,12 +139,12 @@ describe('RelatedItemsComponent', () => { imports: [TranslateModule.forRoot()], declarations: [RelatedItemsComponent, VarDirective], providers: [ - {provide: RelationshipDataService, useValue: relationshipService}, - {provide: APP_CONFIG, useValue: enviromentNoThumbs}, + { provide: RelationshipDataService, useValue: relationshipService }, + { provide: APP_CONFIG, useValue: enviromentNoThumbs }, ], schemas: [NO_ERRORS_SCHEMA], }).overrideComponent(RelatedItemsComponent, { - set: {changeDetection: ChangeDetectionStrategy.Default}, + set: { changeDetection: ChangeDetectionStrategy.Default }, }).compileComponents(); })); diff --git a/src/app/item-page/version-page/version-page/version-page.component.spec.ts b/src/app/item-page/version-page/version-page/version-page.component.spec.ts index 9095446e7f..b472187385 100644 --- a/src/app/item-page/version-page/version-page/version-page.component.spec.ts +++ b/src/app/item-page/version-page/version-page/version-page.component.spec.ts @@ -43,7 +43,7 @@ describe('VersionPageComponent', () => { let authService: AuthService; const mockRoute = Object.assign(new ActivatedRouteStub(), { - data: observableOf({dso: createSuccessfulRemoteDataObject(mockVersion)}), + data: observableOf({ dso: createSuccessfulRemoteDataObject(mockVersion) }), }); beforeEach(waitForAsync(() => { diff --git a/src/app/item-page/versions/item-versions-shared.service.ts b/src/app/item-page/versions/item-versions-shared.service.ts index d08cc13dda..dd35434d62 100644 --- a/src/app/item-page/versions/item-versions-shared.service.ts +++ b/src/app/item-page/versions/item-versions-shared.service.ts @@ -29,7 +29,7 @@ export class ItemVersionsSharedService { public notifyCreateNewVersion(newVersionRD: RemoteData): void { const newVersionNumber = newVersionRD?.payload?.version; newVersionRD.hasSucceeded ? - this.notificationsService.success(null, this.translateService.get(ItemVersionsSharedService.msg('success'), {version: newVersionNumber})) : + this.notificationsService.success(null, this.translateService.get(ItemVersionsSharedService.msg('success'), { version: newVersionNumber })) : this.notificationsService.error(null, this.translateService.get(ItemVersionsSharedService.msg(newVersionRD?.statusCode === 422 ? 'inProgress' : 'failure'))); } diff --git a/src/app/item-page/versions/item-versions.component.spec.ts b/src/app/item-page/versions/item-versions.component.spec.ts index 9f5ffa6a02..ed303bf5c4 100644 --- a/src/app/item-page/versions/item-versions.component.spec.ts +++ b/src/app/item-page/versions/item-versions.component.spec.ts @@ -153,17 +153,17 @@ describe('ItemVersionsComponent', () => { declarations: [ItemVersionsComponent, VarDirective], imports: [TranslateModule.forRoot(), CommonModule, FormsModule, ReactiveFormsModule, BrowserModule, ItemSharedModule], providers: [ - {provide: PaginationService, useValue: new PaginationServiceStub()}, - {provide: UntypedFormBuilder, useValue: new UntypedFormBuilder()}, - {provide: NotificationsService, useValue: new NotificationsServiceStub()}, - {provide: AuthService, useValue: authenticationServiceSpy}, - {provide: AuthorizationDataService, useValue: authorizationServiceSpy}, - {provide: VersionHistoryDataService, useValue: versionHistoryServiceSpy}, - {provide: ItemDataService, useValue: itemDataServiceSpy}, - {provide: VersionDataService, useValue: versionServiceSpy}, - {provide: WorkspaceitemDataService, useValue: workspaceItemDataServiceSpy}, - {provide: WorkflowItemDataService, useValue: workflowItemDataServiceSpy}, - {provide: ConfigurationDataService, useValue: configurationServiceSpy}, + { provide: PaginationService, useValue: new PaginationServiceStub() }, + { provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() }, + { provide: NotificationsService, useValue: new NotificationsServiceStub() }, + { provide: AuthService, useValue: authenticationServiceSpy }, + { provide: AuthorizationDataService, useValue: authorizationServiceSpy }, + { provide: VersionHistoryDataService, useValue: versionHistoryServiceSpy }, + { provide: ItemDataService, useValue: itemDataServiceSpy }, + { provide: VersionDataService, useValue: versionServiceSpy }, + { provide: WorkspaceitemDataService, useValue: workspaceItemDataServiceSpy }, + { provide: WorkflowItemDataService, useValue: workflowItemDataServiceSpy }, + { provide: ConfigurationDataService, useValue: configurationServiceSpy }, { provide: Router, useValue: routerSpy }, ], schemas: [NO_ERRORS_SCHEMA], diff --git a/src/app/item-page/versions/item-versions.component.ts b/src/app/item-page/versions/item-versions.component.ts index dc28798b80..a327497bfc 100644 --- a/src/app/item-page/versions/item-versions.component.ts +++ b/src/app/item-page/versions/item-versions.component.ts @@ -254,16 +254,16 @@ export class ItemVersionsComponent implements OnDestroy, OnInit { getFirstSucceededRemoteData(), switchMap((findRes: RemoteData) => { const payload = findRes.payload; - const summary = {summary: this.versionBeingEditedSummary}; + const summary = { summary: this.versionBeingEditedSummary }; const updatedVersion = Object.assign({}, payload, summary); return this.versionService.update(updatedVersion).pipe(getFirstCompletedRemoteData()); }), ).subscribe((updatedVersionRD: RemoteData) => { if (updatedVersionRD.hasSucceeded) { - this.notificationsService.success(null, this.translateService.get(successMessageKey, {'version': this.versionBeingEditedNumber})); + this.notificationsService.success(null, this.translateService.get(successMessageKey, { 'version': this.versionBeingEditedNumber })); this.getAllVersions(this.versionHistory$); } else { - this.notificationsService.warning(null, this.translateService.get(failureMessageKey, {'version': this.versionBeingEditedNumber})); + this.notificationsService.warning(null, this.translateService.get(failureMessageKey, { 'version': this.versionBeingEditedNumber })); } this.disableVersionEditing(); }, @@ -325,9 +325,9 @@ export class ItemVersionsComponent implements OnDestroy, OnInit { ).subscribe(([deleteHasSucceeded, newLatestVersionItem]: [boolean, Item]) => { // Notify operation result and redirect to latest item if (deleteHasSucceeded) { - this.notificationsService.success(null, this.translateService.get(successMessageKey, {'version': versionNumber})); + this.notificationsService.success(null, this.translateService.get(successMessageKey, { 'version': versionNumber })); } else { - this.notificationsService.error(null, this.translateService.get(failureMessageKey, {'version': versionNumber})); + this.notificationsService.error(null, this.translateService.get(failureMessageKey, { 'version': versionNumber })); } if (redirectToLatest) { const path = getItemEditVersionhistoryRoute(newLatestVersionItem); @@ -440,7 +440,7 @@ export class ItemVersionsComponent implements OnDestroy, OnInit { combineLatest([versionHistory$, currentPagination]).pipe( switchMap(([versionHistory, options]: [VersionHistory, PaginationComponentOptions]) => { return this.versionHistoryService.getVersions(versionHistory.id, - new PaginatedSearchOptions({pagination: Object.assign({}, options, {currentPage: options.currentPage})}), + new PaginatedSearchOptions({ pagination: Object.assign({}, options, { currentPage: options.currentPage }) }), false, true, followLink('item'), followLink('eperson')); }), getFirstCompletedRemoteData(), diff --git a/src/app/lookup-by-id/objectnotfound/objectnotfound.component.spec.ts b/src/app/lookup-by-id/objectnotfound/objectnotfound.component.spec.ts index d27ca252a9..da8d5a069b 100644 --- a/src/app/lookup-by-id/objectnotfound/objectnotfound.component.spec.ts +++ b/src/app/lookup-by-id/objectnotfound/objectnotfound.component.spec.ts @@ -19,10 +19,10 @@ describe('ObjectNotFoundComponent', () => { const handlePrefix = '123456789'; const handleId = '22'; const activatedRouteStub = Object.assign(new ActivatedRouteStub(), { - params: observableOf({id: testUUID, idType: uuidType}), + params: observableOf({ id: testUUID, idType: uuidType }), }); const activatedRouteStubHandle = Object.assign(new ActivatedRouteStub(), { - params: observableOf({id: handleId, idType: handlePrefix}), + params: observableOf({ id: handleId, idType: handlePrefix }), }); describe('uuid request', () => { beforeEach(waitForAsync(() => { @@ -30,7 +30,7 @@ describe('ObjectNotFoundComponent', () => { imports: [ TranslateModule.forRoot(), ], providers: [ - {provide: ActivatedRoute, useValue: activatedRouteStub}, + { provide: ActivatedRoute, useValue: activatedRouteStub }, ], declarations: [ObjectNotFoundComponent], schemas: [NO_ERRORS_SCHEMA], @@ -60,7 +60,7 @@ describe('ObjectNotFoundComponent', () => { imports: [ TranslateModule.forRoot(), ], providers: [ - {provide: ActivatedRoute, useValue: activatedRouteStubHandle}, + { provide: ActivatedRoute, useValue: activatedRouteStubHandle }, ], declarations: [ObjectNotFoundComponent], schemas: [NO_ERRORS_SCHEMA], diff --git a/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts b/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts index 4a6390969b..ae0284da17 100644 --- a/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts +++ b/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts @@ -131,10 +131,10 @@ describe('CollectionSelectorComponent', () => { ], declarations: [ CollectionSelectorComponent, CollectionDropdownComponent ], providers: [ - {provide: CollectionDataService, useValue: collectionDataServiceMock}, - {provide: ElementRef, useClass: MockElementRef}, - {provide: NgbActiveModal, useValue: modal}, - {provide: ActivatedRoute, useValue: {}}, + { provide: CollectionDataService, useValue: collectionDataServiceMock }, + { provide: ElementRef, useClass: MockElementRef }, + { provide: NgbActiveModal, useValue: modal }, + { provide: ActivatedRoute, useValue: {} }, ChangeDetectorRef, ], schemas: [NO_ERRORS_SCHEMA], 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 544cf2adb0..953e3c6707 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 @@ -99,7 +99,7 @@ export class MyDSpaceNewSubmissionComponent implements OnDestroy, OnInit { // To avoid confusion and ambiguity, redirect the user on the publication page. this.router.navigateByUrl(link); } else if (workspaceitems.length > 1) { - this.notificationsService.success(null, this.translate.get('mydspace.upload.upload-multiple-successful', {qty: workspaceitems.length})); + this.notificationsService.success(null, this.translate.get('mydspace.upload.upload-multiple-successful', { qty: workspaceitems.length })); } } else { diff --git a/src/app/my-dspace-page/my-dspace-search.module.ts b/src/app/my-dspace-page/my-dspace-search.module.ts index 55273bfa2d..066f144237 100644 --- a/src/app/my-dspace-page/my-dspace-search.module.ts +++ b/src/app/my-dspace-page/my-dspace-search.module.ts @@ -77,7 +77,7 @@ export class MyDspaceSearchModule { static withEntryComponents() { return { ngModule: MyDspaceSearchModule, - providers: ENTRY_COMPONENTS.map((component) => ({provide: component})), + providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })), }; } } diff --git a/src/app/my-dspace-page/my-dspace.guard.ts b/src/app/my-dspace-page/my-dspace.guard.ts index 75c9bd3b44..efc4244a86 100644 --- a/src/app/my-dspace-page/my-dspace.guard.ts +++ b/src/app/my-dspace-page/my-dspace.guard.ts @@ -54,7 +54,7 @@ export class MyDSpaceGuard implements CanActivate { if (isEmpty(configuration) || !configurationList.includes(configuration as MyDSpaceConfigurationValueType)) { // If configuration param is empty or is not included in available configurations redirect to a default configuration value const navigationExtras: NavigationExtras = { - queryParams: {configuration: configurationDefault}, + queryParams: { configuration: configurationDefault }, }; this.router.navigate([MYDSPACE_ROUTE], navigationExtras); diff --git a/src/app/navbar/navbar.module.ts b/src/app/navbar/navbar.module.ts index 75ccadbb90..ddc1bb693f 100644 --- a/src/app/navbar/navbar.module.ts +++ b/src/app/navbar/navbar.module.ts @@ -57,7 +57,7 @@ export class NavbarModule { static withEntryComponents() { return { ngModule: NavbarModule, - providers: ENTRY_COMPONENTS.map((component) => ({provide: component})), + providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })), }; } diff --git a/src/app/process-page/detail/process-detail.component.spec.ts b/src/app/process-page/detail/process-detail.component.spec.ts index 86b9358cd2..ae6b2ce353 100644 --- a/src/app/process-page/detail/process-detail.component.spec.ts +++ b/src/app/process-page/detail/process-detail.component.spec.ts @@ -37,7 +37,7 @@ import { FileSizePipe } from '../../shared/utils/file-size-pipe'; import { VarDirective } from '../../shared/utils/var.directive'; import { getProcessListRoute } from '../process-page-routing.paths'; import { Process } from '../processes/process.model'; -import {ProcessStatus} from '../processes/process-status.model'; +import { ProcessStatus } from '../processes/process-status.model'; import { ProcessDetailComponent } from './process-detail.component'; import { ProcessDetailFieldComponent } from './process-detail-field/process-detail-field.component'; @@ -283,7 +283,7 @@ describe('ProcessDetailComponent', () => { describe('if process is completed', () => { beforeEach(() => { process.processStatus = ProcessStatus.COMPLETED; - route.data = observableOf({process: createSuccessfulRemoteDataObject(process)}); + route.data = observableOf({ process: createSuccessfulRemoteDataObject(process) }); }); it('should not show', () => { @@ -299,7 +299,7 @@ describe('ProcessDetailComponent', () => { describe('if process is not finished', () => { beforeEach(() => { process.processStatus = ProcessStatus.RUNNING; - route.data = observableOf({process: createSuccessfulRemoteDataObject(process)}); + route.data = observableOf({ process: createSuccessfulRemoteDataObject(process) }); fixture.detectChanges(); component.stopRefreshTimer(); }); diff --git a/src/app/process-page/form/script-help/script-help.component.spec.ts b/src/app/process-page/form/script-help/script-help.component.spec.ts index e3f95e066e..20c868d9dc 100644 --- a/src/app/process-page/form/script-help/script-help.component.spec.ts +++ b/src/app/process-page/form/script-help/script-help.component.spec.ts @@ -25,11 +25,11 @@ describe('ScriptHelpComponent', () => { function init() { const param1 = Object.assign( new ScriptParameter(), - {name: '-d', description: 'Lorem ipsum dolor sit amet,', type: ScriptParameterType.DATE}, + { name: '-d', description: 'Lorem ipsum dolor sit amet,', type: ScriptParameterType.DATE }, ); const param2 = Object.assign( new ScriptParameter(), - {name: '-f', description: 'consetetur sadipscing elitr', type: ScriptParameterType.BOOLEAN}, + { name: '-f', description: 'consetetur sadipscing elitr', type: ScriptParameterType.BOOLEAN }, ); script = Object.assign(new Script(), { parameters: [param1, param2] }); } diff --git a/src/app/process-page/overview/process-bulk-delete.service.spec.ts b/src/app/process-page/overview/process-bulk-delete.service.spec.ts index d5643aa7d0..80d780e66b 100644 --- a/src/app/process-page/overview/process-bulk-delete.service.spec.ts +++ b/src/app/process-page/overview/process-bulk-delete.service.spec.ts @@ -124,7 +124,7 @@ describe('ProcessBulkDeleteService', () => { expect(processDataService.delete).toHaveBeenCalledWith('error-id-3'); expect(notificationsService.error).toHaveBeenCalled(); - expect(mockTranslateService.get).toHaveBeenCalledWith('process.bulk.delete.error.body', {processId: 'error-id-3'}); + expect(mockTranslateService.get).toHaveBeenCalledWith('process.bulk.delete.error.body', { processId: 'error-id-3' }); expect(processDataService.delete).toHaveBeenCalledWith('test-id-4'); @@ -132,18 +132,18 @@ describe('ProcessBulkDeleteService', () => { expect(processDataService.delete).toHaveBeenCalledWith('error-id-5'); expect(notificationsService.error).toHaveBeenCalled(); - expect(mockTranslateService.get).toHaveBeenCalledWith('process.bulk.delete.error.body', {processId: 'error-id-5'}); + expect(mockTranslateService.get).toHaveBeenCalledWith('process.bulk.delete.error.body', { processId: 'error-id-5' }); expect(processDataService.delete).toHaveBeenCalledWith('error-id-6'); expect(notificationsService.error).toHaveBeenCalled(); - expect(mockTranslateService.get).toHaveBeenCalledWith('process.bulk.delete.error.body', {processId: 'error-id-6'}); + expect(mockTranslateService.get).toHaveBeenCalledWith('process.bulk.delete.error.body', { processId: 'error-id-6' }); expect(processDataService.delete).toHaveBeenCalledWith('test-id-7'); expect(notificationsService.success).toHaveBeenCalled(); - expect(mockTranslateService.get).toHaveBeenCalledWith('process.bulk.delete.success', {count: 4}); + expect(mockTranslateService.get).toHaveBeenCalledWith('process.bulk.delete.success', { count: 4 }); expect(service.processesToDelete).toEqual(['error-id-3', 'error-id-5', 'error-id-6']); diff --git a/src/app/process-page/overview/process-bulk-delete.service.ts b/src/app/process-page/overview/process-bulk-delete.service.ts index 2b67936a2f..790bec080f 100644 --- a/src/app/process-page/overview/process-bulk-delete.service.ts +++ b/src/app/process-page/overview/process-bulk-delete.service.ts @@ -110,7 +110,7 @@ export class ProcessBulkDeleteService { getFirstCompletedRemoteData(), tap((rd: RemoteData) => { if (rd.hasFailed) { - this.notificationsService.error(this.translateService.get('process.bulk.delete.error.head'), this.translateService.get('process.bulk.delete.error.body', {processId: processId})); + this.notificationsService.error(this.translateService.get('process.bulk.delete.error.head'), this.translateService.get('process.bulk.delete.error.body', { processId: processId })); } else { this.toggleDelete(processId); } @@ -120,7 +120,7 @@ export class ProcessBulkDeleteService { filter((rd: RemoteData) => rd.hasSucceeded), count(), ).subscribe((value) => { - this.notificationsService.success(this.translateService.get('process.bulk.delete.success', {count: value})); + this.notificationsService.success(this.translateService.get('process.bulk.delete.success', { count: value })); this.isProcessingBehaviorSubject.next(false); }); } diff --git a/src/app/process-page/process-breadcrumb.resolver.spec.ts b/src/app/process-page/process-breadcrumb.resolver.spec.ts index b92c2dbab6..e4bdcba537 100644 --- a/src/app/process-page/process-breadcrumb.resolver.spec.ts +++ b/src/app/process-page/process-breadcrumb.resolver.spec.ts @@ -23,8 +23,8 @@ describe('ProcessBreadcrumbResolver', () => { }); it('should resolve the breadcrumb config', (done) => { - const resolvedConfig = resolver.resolve({ data: { breadcrumbKey: process }, params: { id: id} } as any, {url: path} as any); - const expectedConfig = { provider: processBreadcrumbService, key: process, url: path}; + const resolvedConfig = resolver.resolve({ data: { breadcrumbKey: process }, params: { id: id } } as any, { url: path } as any); + const expectedConfig = { provider: processBreadcrumbService, key: process, url: path }; resolvedConfig.subscribe((config) => { expect(config).toEqual(expectedConfig); done(); diff --git a/src/app/process-page/process-breadcrumbs.service.spec.ts b/src/app/process-page/process-breadcrumbs.service.spec.ts index 9fa3a400f6..ad5f846796 100644 --- a/src/app/process-page/process-breadcrumbs.service.spec.ts +++ b/src/app/process-page/process-breadcrumbs.service.spec.ts @@ -18,7 +18,7 @@ describe('ProcessBreadcrumbsService', () => { function init() { exampleId = '12345'; exampleScriptName = 'Example Script'; - exampleProcess = Object.assign(new Process(), {processId: exampleId, scriptName: exampleScriptName}); + exampleProcess = Object.assign(new Process(), { processId: exampleId, scriptName: exampleScriptName }); exampleURL = 'example.com'; } diff --git a/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.ts b/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.ts index 0c28a1038c..ef9665907e 100644 --- a/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.ts +++ b/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.ts @@ -205,7 +205,7 @@ export class ProfilePageMetadataFormComponent implements OnInit { }); if (changed) { - this.epersonService.update(Object.assign(cloneDeep(this.user), {metadata: newMetadata})).pipe( + this.epersonService.update(Object.assign(cloneDeep(this.user), { metadata: newMetadata })).pipe( getFirstSucceededRemoteData(), getRemoteDataPayload(), ).subscribe((user) => { diff --git a/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.spec.ts b/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.spec.ts index 3ba27eafb4..ae80b5351b 100644 --- a/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.spec.ts +++ b/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.spec.ts @@ -41,8 +41,8 @@ describe('ProfilePageSecurityFormComponent', () => { declarations: [ProfilePageSecurityFormComponent, VarDirective], imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], providers: [ - {provide: EPersonDataService, useValue: epersonService}, - {provide: NotificationsService, useValue: notificationsService}, + { provide: EPersonDataService, useValue: epersonService }, + { provide: NotificationsService, useValue: notificationsService }, FormBuilderService, ], schemas: [NO_ERRORS_SCHEMA], @@ -58,14 +58,14 @@ describe('ProfilePageSecurityFormComponent', () => { describe('On value change', () => { describe('when the password has changed', () => { beforeEach(() => { - component.formGroup.patchValue({password: 'password'}); - component.formGroup.patchValue({passwordrepeat: 'password'}); + component.formGroup.patchValue({ password: 'password' }); + component.formGroup.patchValue({ passwordrepeat: 'password' }); }); it('should emit the value and validity on password change with invalid validity', fakeAsync(() => { spyOn(component.passwordValue, 'emit'); spyOn(component.isInvalid, 'emit'); - component.formGroup.patchValue({password: 'new-password'}); + component.formGroup.patchValue({ password: 'new-password' }); tick(300); @@ -75,7 +75,7 @@ describe('ProfilePageSecurityFormComponent', () => { it('should emit the value on password change', fakeAsync(() => { spyOn(component.passwordValue, 'emit'); - component.formGroup.patchValue({password: 'new-password'}); + component.formGroup.patchValue({ password: 'new-password' }); tick(300); @@ -87,8 +87,8 @@ describe('ProfilePageSecurityFormComponent', () => { spyOn(component.currentPasswordValue, 'emit'); component.FORM_PREFIX = 'profile.security.form.'; component.ngOnInit(); - component.formGroup.patchValue({password: 'new-password'}); - component.formGroup.patchValue({'current-password': 'current-password'}); + component.formGroup.patchValue({ password: 'new-password' }); + component.formGroup.patchValue({ 'current-password': 'current-password' }); tick(300); expect(component.passwordValue.emit).toHaveBeenCalledWith('new-password'); diff --git a/src/app/profile-page/profile-page.component.spec.ts b/src/app/profile-page/profile-page.component.spec.ts index cedb7b777e..4d7d91f830 100644 --- a/src/app/profile-page/profile-page.component.spec.ts +++ b/src/app/profile-page/profile-page.component.spec.ts @@ -260,7 +260,7 @@ describe('ProfilePageComponent', () => { component.setInvalid(false); component.setCurrentPasswordValue('current-password'); operations = [ - { 'op': 'add', 'path': '/password', 'value': {'new_password': 'testest', 'current_password': 'current-password' }}, + { 'op': 'add', 'path': '/password', 'value': { 'new_password': 'testest', 'current_password': 'current-password' } }, ]; result = component.updateSecurity(); epersonService.patch(user, operations).subscribe((response) => { diff --git a/src/app/register-email-form/register-email-form.component.spec.ts b/src/app/register-email-form/register-email-form.component.spec.ts index bdf542ffaf..5a5b692c10 100644 --- a/src/app/register-email-form/register-email-form.component.spec.ts +++ b/src/app/register-email-form/register-email-form.component.spec.ts @@ -77,13 +77,13 @@ describe('RegisterEmailFormComponent', () => { imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), ReactiveFormsModule], declarations: [RegisterEmailFormComponent], providers: [ - {provide: Router, useValue: router}, - {provide: EpersonRegistrationService, useValue: epersonRegistrationService}, - {provide: ConfigurationDataService, useValue: configurationDataService}, - {provide: UntypedFormBuilder, useValue: new UntypedFormBuilder()}, - {provide: NotificationsService, useValue: notificationsService}, - {provide: CookieService, useValue: new CookieServiceMock()}, - {provide: GoogleRecaptchaService, useValue: googleRecaptchaService}, + { provide: Router, useValue: router }, + { provide: EpersonRegistrationService, useValue: epersonRegistrationService }, + { provide: ConfigurationDataService, useValue: configurationDataService }, + { provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() }, + { provide: NotificationsService, useValue: notificationsService }, + { provide: CookieService, useValue: new CookieServiceMock() }, + { provide: GoogleRecaptchaService, useValue: googleRecaptchaService }, ], schemas: [CUSTOM_ELEMENTS_SCHEMA], }).compileComponents(); @@ -108,11 +108,11 @@ describe('RegisterEmailFormComponent', () => { expect(comp.form.invalid).toBeTrue(); }); it('should be invalid when no valid email is present', () => { - comp.form.patchValue({email: 'invalid'}); + comp.form.patchValue({ email: 'invalid' }); expect(comp.form.invalid).toBeTrue(); }); it('should be valid when a valid email is present', () => { - comp.form.patchValue({email: 'valid@email.org'}); + comp.form.patchValue({ email: 'valid@email.org' }); expect(comp.form.invalid).toBeFalse(); }); it('should accept email with other domain names on TYPE_REQUEST_FORGOT form', () => { @@ -128,7 +128,7 @@ describe('RegisterEmailFormComponent', () => { expect(comp.form.invalid).toBeFalse(); }); it('should be valid when uppercase letters are used', () => { - comp.form.patchValue({email: 'VALID@email.org'}); + comp.form.patchValue({ email: 'VALID@email.org' }); expect(comp.form.invalid).toBeFalse(); }); it('should not accept email with other domain names', () => { @@ -158,7 +158,7 @@ describe('RegisterEmailFormComponent', () => { }); describe('register', () => { it('should send a registration to the service and on success display a message and return to home', () => { - comp.form.patchValue({email: 'valid@email.org'}); + comp.form.patchValue({ email: 'valid@email.org' }); comp.register(); expect(epersonRegistrationService.registerEmail).toHaveBeenCalledWith('valid@email.org', null, null); @@ -168,7 +168,7 @@ describe('RegisterEmailFormComponent', () => { it('should send a registration to the service and on error display a message', () => { (epersonRegistrationService.registerEmail as jasmine.Spy).and.returnValue(observableOf(new RestResponse(false, 400, 'Bad Request'))); - comp.form.patchValue({email: 'valid@email.org'}); + comp.form.patchValue({ email: 'valid@email.org' }); comp.register(); expect(epersonRegistrationService.registerEmail).toHaveBeenCalledWith('valid@email.org', null, null); @@ -186,7 +186,7 @@ describe('RegisterEmailFormComponent', () => { })); it('should send a registration to the service and on success display a message and return to home', fakeAsync(() => { - comp.form.patchValue({email: 'valid@email.org'}); + comp.form.patchValue({ email: 'valid@email.org' }); comp.register(); tick(); expect(epersonRegistrationService.registerEmail).toHaveBeenCalledWith('valid@email.org', 'googleRecaptchaToken', null); @@ -196,7 +196,7 @@ describe('RegisterEmailFormComponent', () => { it('should send a registration to the service and on error display a message', fakeAsync(() => { (epersonRegistrationService.registerEmail as jasmine.Spy).and.returnValue(observableOf(new RestResponse(false, 400, 'Bad Request'))); - comp.form.patchValue({email: 'valid@email.org'}); + comp.form.patchValue({ email: 'valid@email.org' }); comp.register(); tick(); diff --git a/src/app/register-email-form/register-email-form.component.ts b/src/app/register-email-form/register-email-form.component.ts index e2957bc71b..b71959bc57 100644 --- a/src/app/register-email-form/register-email-form.component.ts +++ b/src/app/register-email-form/register-email-form.component.ts @@ -13,8 +13,8 @@ import { ValidatorFn, Validators, } from '@angular/forms'; -import {Router} from '@angular/router'; -import {TranslateService} from '@ngx-translate/core'; +import { Router } from '@angular/router'; +import { TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, combineLatest, @@ -29,24 +29,24 @@ import { take, } from 'rxjs/operators'; -import {ConfigurationDataService} from '../core/data/configuration-data.service'; -import {EpersonRegistrationService} from '../core/data/eperson-registration.service'; -import {RemoteData} from '../core/data/remote-data'; +import { ConfigurationDataService } from '../core/data/configuration-data.service'; +import { EpersonRegistrationService } from '../core/data/eperson-registration.service'; +import { RemoteData } from '../core/data/remote-data'; import { CAPTCHA_NAME, GoogleRecaptchaService, } from '../core/google-recaptcha/google-recaptcha.service'; -import {CookieService} from '../core/services/cookie.service'; -import {ConfigurationProperty} from '../core/shared/configuration-property.model'; +import { CookieService } from '../core/services/cookie.service'; +import { ConfigurationProperty } from '../core/shared/configuration-property.model'; import { getAllSucceededRemoteDataPayload, getFirstSucceededRemoteDataPayload, } from '../core/shared/operators'; -import {Registration} from '../core/shared/registration.model'; -import {AlertType} from '../shared/alert/aletr-type'; -import {KlaroService} from '../shared/cookies/klaro.service'; -import {isNotEmpty} from '../shared/empty.util'; -import {NotificationsService} from '../shared/notifications/notifications.service'; +import { Registration } from '../core/shared/registration.model'; +import { AlertType } from '../shared/alert/aletr-type'; +import { KlaroService } from '../shared/cookies/klaro.service'; +import { isNotEmpty } from '../shared/empty.util'; +import { NotificationsService } from '../shared/notifications/notifications.service'; export const TYPE_REQUEST_FORGOT = 'forgot'; export const TYPE_REQUEST_REGISTER = 'register'; @@ -219,13 +219,13 @@ export class RegisterEmailFormComponent implements OnDestroy, OnInit { this.subscriptions.push(registerEmail$.subscribe((response: RemoteData) => { if (response.hasSucceeded) { this.notificationService.success(this.translateService.get(`${this.MESSAGE_PREFIX}.success.head`), - this.translateService.get(`${this.MESSAGE_PREFIX}.success.content`, {email: this.email.value})); + this.translateService.get(`${this.MESSAGE_PREFIX}.success.content`, { email: this.email.value })); this.router.navigate(['/home']); } else if (response.statusCode === 422) { - this.notificationService.error(this.translateService.get(`${this.MESSAGE_PREFIX}.error.head`), this.translateService.get(`${this.MESSAGE_PREFIX}.error.maildomain`, {domains: this.validMailDomains.join(', ')})); + this.notificationService.error(this.translateService.get(`${this.MESSAGE_PREFIX}.error.head`), this.translateService.get(`${this.MESSAGE_PREFIX}.error.maildomain`, { domains: this.validMailDomains.join(', ') })); } else { this.notificationService.error(this.translateService.get(`${this.MESSAGE_PREFIX}.error.head`), - this.translateService.get(`${this.MESSAGE_PREFIX}.error.content`, {email: this.email.value})); + this.translateService.get(`${this.MESSAGE_PREFIX}.error.content`, { email: this.email.value })); } })); } diff --git a/src/app/register-email-form/registration.resolver.spec.ts b/src/app/register-email-form/registration.resolver.spec.ts index f62b6a9a73..e286a548de 100644 --- a/src/app/register-email-form/registration.resolver.spec.ts +++ b/src/app/register-email-form/registration.resolver.spec.ts @@ -10,7 +10,7 @@ describe('RegistrationResolver', () => { let epersonRegistrationService: EpersonRegistrationService; const token = 'test-token'; - const registration = Object.assign(new Registration(), {email: 'test@email.org', token: token, user:'user-uuid'}); + const registration = Object.assign(new Registration(), { email: 'test@email.org', token: token, user:'user-uuid' }); beforeEach(() => { epersonRegistrationService = jasmine.createSpyObj('epersonRegistrationService', { @@ -20,7 +20,7 @@ describe('RegistrationResolver', () => { }); describe('resolve', () => { it('should resolve a registration based on the token', (done) => { - resolver.resolve({params: {token: token}} as any, undefined) + resolver.resolve({ params: { token: token } } as any, undefined) .pipe(first()) .subscribe( (resolved) => { diff --git a/src/app/register-page/create-profile/confirmed.validator.ts b/src/app/register-page/create-profile/confirmed.validator.ts index 914d50b540..730e1d00b6 100644 --- a/src/app/register-page/create-profile/confirmed.validator.ts +++ b/src/app/register-page/create-profile/confirmed.validator.ts @@ -11,7 +11,7 @@ export function ConfirmedValidator(controlName: string, matchingControlName: str return; } if (control.value !== matchingControl.value) { - matchingControl.setErrors({confirmedValidator: true}); + matchingControl.setErrors({ confirmedValidator: true }); } else { matchingControl.setErrors(null); } diff --git a/src/app/register-page/create-profile/create-profile.component.spec.ts b/src/app/register-page/create-profile/create-profile.component.spec.ts index a56c08314f..85178318d6 100644 --- a/src/app/register-page/create-profile/create-profile.component.spec.ts +++ b/src/app/register-page/create-profile/create-profile.component.spec.ts @@ -49,7 +49,7 @@ describe('CreateProfileComponent', () => { let store: Store; let endUserAgreementService: EndUserAgreementService; - const registration = Object.assign(new Registration(), {email: 'test@email.org', token: 'test-token'}); + const registration = Object.assign(new Registration(), { email: 'test@email.org', token: 'test-token' }); let values; let eperson: EPerson; @@ -121,7 +121,7 @@ describe('CreateProfileComponent', () => { }; epersonWithAgreement = Object.assign(new EPerson(), valuesWithAgreement); - route = {data: observableOf({registration: createSuccessfulRemoteDataObject(registration)})}; + route = { data: observableOf({ registration: createSuccessfulRemoteDataObject(registration) }) }; router = new RouterStub(); notificationsService = new NotificationsServiceStub(); @@ -142,13 +142,13 @@ describe('CreateProfileComponent', () => { imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), ReactiveFormsModule], declarations: [CreateProfileComponent], providers: [ - {provide: Router, useValue: router}, - {provide: ActivatedRoute, useValue: route}, - {provide: Store, useValue: store}, - {provide: EPersonDataService, useValue: ePersonDataService}, - {provide: UntypedFormBuilder, useValue: new UntypedFormBuilder()}, - {provide: NotificationsService, useValue: notificationsService}, - {provide: EndUserAgreementService, useValue: endUserAgreementService}, + { provide: Router, useValue: router }, + { provide: ActivatedRoute, useValue: route }, + { provide: Store, useValue: store }, + { provide: EPersonDataService, useValue: ePersonDataService }, + { provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() }, + { provide: NotificationsService, useValue: notificationsService }, + { provide: EndUserAgreementService, useValue: endUserAgreementService }, ], schemas: [CUSTOM_ELEMENTS_SCHEMA], }).compileComponents(); diff --git a/src/app/register-page/register-page-routing.module.ts b/src/app/register-page/register-page-routing.module.ts index dd3463a65c..64200a45f4 100644 --- a/src/app/register-page/register-page-routing.module.ts +++ b/src/app/register-page/register-page-routing.module.ts @@ -13,7 +13,7 @@ import { RegistrationGuard } from './registration.guard'; { path: '', component: ThemedRegisterEmailComponent, - data: {title: 'register-email.title'}, + data: { title: 'register-email.title' }, }, { path: ':token', diff --git a/src/app/search-navbar/search-navbar.component.spec.ts b/src/app/search-navbar/search-navbar.component.spec.ts index b8dc3de639..90f966ef61 100644 --- a/src/app/search-navbar/search-navbar.component.spec.ts +++ b/src/app/search-navbar/search-navbar.component.spec.ts @@ -112,7 +112,7 @@ describe('SearchNavbarComponent', () => { fixture.detectChanges(); })); it('to search page with empty query', () => { - const extras: NavigationExtras = {queryParams: { query: '' }, queryParamsHandling: 'merge'}; + const extras: NavigationExtras = { queryParams: { query: '' }, queryParamsHandling: 'merge' }; expect(component.onSubmit).toHaveBeenCalledWith({ query: '' }); expect(router.navigate).toHaveBeenCalledWith(['search'], extras); }); @@ -137,7 +137,7 @@ describe('SearchNavbarComponent', () => { fixture.detectChanges(); })); it('to search page with query', async () => { - const extras: NavigationExtras = { queryParams: { query: 'test' }, queryParamsHandling: 'merge'}; + const extras: NavigationExtras = { queryParams: { query: 'test' }, queryParamsHandling: 'merge' }; expect(component.onSubmit).toHaveBeenCalledWith({ query: 'test' }); expect(router.navigate).toHaveBeenCalledWith(['search'], extras); diff --git a/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.spec.ts b/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.spec.ts index 26af151779..827f749f3d 100644 --- a/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.spec.ts +++ b/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.spec.ts @@ -28,7 +28,7 @@ describe('AccessControlArrayFormComponent', () => { beforeEach(() => { fixture = TestBed.createComponent(AccessControlArrayFormComponent); component = fixture.componentInstance; - component.dropdownOptions = [{name: 'Option1'}, {name: 'Option2'}] as any; + component.dropdownOptions = [{ name: 'Option1' }, { name: 'Option2' }] as any; component.type = 'item'; fixture.detectChanges(); }); diff --git a/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.ts b/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.ts index b3f622ea71..a8248fdb7d 100644 --- a/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.ts +++ b/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.ts @@ -4,10 +4,10 @@ import { OnInit, ViewChild, } from '@angular/core'; -import {NgForm} from '@angular/forms'; +import { NgForm } from '@angular/forms'; -import {AccessesConditionOption} from '../../../core/config/models/config-accesses-conditions-options.model'; -import {dateToISOFormat} from '../../date.util'; +import { AccessesConditionOption } from '../../../core/config/models/config-accesses-conditions-options.model'; +import { dateToISOFormat } from '../../date.util'; @Component({ selector: 'ds-access-control-array-form', @@ -20,7 +20,7 @@ export class AccessControlArrayFormComponent implements OnInit { @Input() mode!: 'add' | 'replace'; @Input() type!: 'item' | 'bitstream'; - @ViewChild('ngForm', {static: true}) ngForm!: NgForm; + @ViewChild('ngForm', { static: true }) ngForm!: NgForm; form: { accessControls: AccessControlItem[] } = { accessControls: [emptyAccessControlItem()], // Start with one empty access control item @@ -49,7 +49,7 @@ export class AccessControlArrayFormComponent implements OnInit { addAccessControlItem(itemName: string = null) { this.form.accessControls = [ ...this.form.accessControls, - {...emptyAccessControlItem(), itemName}, + { ...emptyAccessControlItem(), itemName }, ]; } diff --git a/src/app/shared/access-control-form-container/access-control-array-form/to-date.pipe.ts b/src/app/shared/access-control-form-container/access-control-array-form/to-date.pipe.ts index f9a0ac8203..7c2817c96a 100644 --- a/src/app/shared/access-control-form-container/access-control-array-form/to-date.pipe.ts +++ b/src/app/shared/access-control-form-container/access-control-array-form/to-date.pipe.ts @@ -2,7 +2,7 @@ import { Pipe, PipeTransform, } from '@angular/core'; -import {NgbDateStruct} from '@ng-bootstrap/ng-bootstrap/datepicker/ngb-date-struct'; +import { NgbDateStruct } from '@ng-bootstrap/ng-bootstrap/datepicker/ngb-date-struct'; @Pipe({ // eslint-disable-next-line @angular-eslint/pipe-prefix diff --git a/src/app/shared/access-control-form-container/access-control-form-container-intial-state.ts b/src/app/shared/access-control-form-container/access-control-form-container-intial-state.ts index b5081db6c2..15f4a72e46 100644 --- a/src/app/shared/access-control-form-container/access-control-form-container-intial-state.ts +++ b/src/app/shared/access-control-form-container/access-control-form-container-intial-state.ts @@ -1,4 +1,4 @@ -import {ListableObject} from '../object-collection/shared/listable-object.model'; +import { ListableObject } from '../object-collection/shared/listable-object.model'; export const createAccessControlInitialFormState = (): AccessControlFormState => ({ item: { diff --git a/src/app/shared/access-control-form-container/access-control-form-container.component.spec.ts b/src/app/shared/access-control-form-container/access-control-form-container.component.spec.ts index 730b26b546..cde4d8ecde 100644 --- a/src/app/shared/access-control-form-container/access-control-form-container.component.spec.ts +++ b/src/app/shared/access-control-form-container/access-control-form-container.component.spec.ts @@ -1,28 +1,28 @@ -import {CommonModule} from '@angular/common'; -import {Component} from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { Component } from '@angular/core'; import { ComponentFixture, fakeAsync, TestBed, } from '@angular/core/testing'; -import {FormsModule} from '@angular/forms'; +import { FormsModule } from '@angular/forms'; import { NgbDatepickerModule, NgbModal, NgbModalRef, } from '@ng-bootstrap/ng-bootstrap'; -import {TranslateModule} from '@ngx-translate/core'; -import {UiSwitchModule} from 'ngx-ui-switch'; -import {of} from 'rxjs'; +import { TranslateModule } from '@ngx-translate/core'; +import { UiSwitchModule } from 'ngx-ui-switch'; +import { of } from 'rxjs'; -import {BulkAccessConfigDataService} from '../../core/config/bulk-access-config-data.service'; -import {Item} from '../../core/shared/item.model'; -import {SharedBrowseByModule} from '../browse-by/shared-browse-by.module'; -import {SelectableListService} from '../object-list/selectable-list/selectable-list.service'; -import {AccessControlFormModule} from './access-control-form.module'; -import {AccessControlFormContainerComponent} from './access-control-form-container.component'; -import {createAccessControlInitialFormState} from './access-control-form-container-intial-state'; -import {BulkAccessControlService} from './bulk-access-control.service'; +import { BulkAccessConfigDataService } from '../../core/config/bulk-access-config-data.service'; +import { Item } from '../../core/shared/item.model'; +import { SharedBrowseByModule } from '../browse-by/shared-browse-by.module'; +import { SelectableListService } from '../object-list/selectable-list/selectable-list.service'; +import { AccessControlFormModule } from './access-control-form.module'; +import { AccessControlFormContainerComponent } from './access-control-form-container.component'; +import { createAccessControlInitialFormState } from './access-control-form-container-intial-state'; +import { BulkAccessControlService } from './bulk-access-control.service'; import { ITEM_ACCESS_CONTROL_SELECT_BITSTREAMS_LIST_ID } from './item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component'; @@ -32,28 +32,28 @@ describe('AccessControlFormContainerComponent', () => { // Mock NgbModal - @Component({selector: 'ds-ngb-modal', template: ''}) + @Component({ selector: 'ds-ngb-modal', template: '' }) class MockNgbModalComponent { } // Mock dependencies const mockBulkAccessControlService = { - createPayloadFile: jasmine.createSpy('createPayloadFile').and.returnValue({file: 'mocked-file'}), + createPayloadFile: jasmine.createSpy('createPayloadFile').and.returnValue({ file: 'mocked-file' }), executeScript: jasmine.createSpy('executeScript').and.returnValue(of('success')), }; const mockBulkAccessConfigDataService = { - findByName: jasmine.createSpy('findByName').and.returnValue(of({payload: {options: []}})), + findByName: jasmine.createSpy('findByName').and.returnValue(of({ payload: { options: [] } })), }; const mockSelectableListService = { - getSelectableList: jasmine.createSpy('getSelectableList').and.returnValue(of({selection: []})), + getSelectableList: jasmine.createSpy('getSelectableList').and.returnValue(of({ selection: [] })), deselectAll: jasmine.createSpy('deselectAll'), }; const mockNgbModal = { open: jasmine.createSpy('open').and.returnValue( - { componentInstance: {}, closed: of({})} as NgbModalRef, + { componentInstance: {}, closed: of({}) } as NgbModalRef, ), }; @@ -70,10 +70,10 @@ describe('AccessControlFormContainerComponent', () => { UiSwitchModule, ], providers: [ - {provide: BulkAccessControlService, useValue: mockBulkAccessControlService}, - {provide: BulkAccessConfigDataService, useValue: mockBulkAccessConfigDataService}, - {provide: SelectableListService, useValue: mockSelectableListService}, - {provide: NgbModal, useValue: mockNgbModal}, + { provide: BulkAccessControlService, useValue: mockBulkAccessControlService }, + { provide: BulkAccessConfigDataService, useValue: mockBulkAccessConfigDataService }, + { provide: SelectableListService, useValue: mockSelectableListService }, + { provide: NgbModal, useValue: mockNgbModal }, ], }).compileComponents(); }); @@ -106,7 +106,7 @@ describe('AccessControlFormContainerComponent', () => { const itemAccess = 'itemAccess'; component.bitstreamAccessCmp.getValue = jasmine.createSpy('getValue').and.returnValue(bitstreamAccess); component.itemAccessCmp.getValue = jasmine.createSpy('getValue').and.returnValue(itemAccess); - component.itemRD = {payload: {uuid: 'item-uuid'}} as any; + component.itemRD = { payload: { uuid: 'item-uuid' } } as any; component.submit(); diff --git a/src/app/shared/access-control-form-container/access-control-form.module.ts b/src/app/shared/access-control-form-container/access-control-form.module.ts index 38d4c1b774..075d85d4d1 100644 --- a/src/app/shared/access-control-form-container/access-control-form.module.ts +++ b/src/app/shared/access-control-form-container/access-control-form.module.ts @@ -1,13 +1,13 @@ -import {CommonModule} from '@angular/common'; -import {NgModule} from '@angular/core'; -import {NgbDatepickerModule} from '@ng-bootstrap/ng-bootstrap'; -import {TranslateModule} from '@ngx-translate/core'; -import {UiSwitchModule} from 'ngx-ui-switch'; +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateModule } from '@ngx-translate/core'; +import { UiSwitchModule } from 'ngx-ui-switch'; -import {SharedModule} from '../shared.module'; -import {AccessControlArrayFormComponent} from './access-control-array-form/access-control-array-form.component'; -import {ToDatePipe} from './access-control-array-form/to-date.pipe'; -import {AccessControlFormContainerComponent} from './access-control-form-container.component'; +import { SharedModule } from '../shared.module'; +import { AccessControlArrayFormComponent } from './access-control-array-form/access-control-array-form.component'; +import { ToDatePipe } from './access-control-array-form/to-date.pipe'; +import { AccessControlFormContainerComponent } from './access-control-form-container.component'; import { ItemAccessControlSelectBitstreamsModalComponent } from './item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component'; @NgModule({ diff --git a/src/app/shared/access-control-form-container/item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component.ts b/src/app/shared/access-control-form-container/item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component.ts index f3a938e356..d63232aeff 100644 --- a/src/app/shared/access-control-form-container/item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component.ts +++ b/src/app/shared/access-control-form-container/item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component.ts @@ -57,7 +57,7 @@ export class ItemAccessControlSelectBitstreamsModalComponent implements OnInit { } loadForPage(page: number) { - this.bitstreamService.findAllByItemAndBundleName(this.item, 'ORIGINAL', { currentPage: page}, false) + this.bitstreamService.findAllByItemAndBundleName(this.item, 'ORIGINAL', { currentPage: page }, false) .pipe( getFirstCompletedRemoteData(), ) diff --git a/src/app/shared/animations/fade.ts b/src/app/shared/animations/fade.ts index a16354aab2..1c61fd4624 100644 --- a/src/app/shared/animations/fade.ts +++ b/src/app/shared/animations/fade.ts @@ -6,7 +6,7 @@ import { trigger, } from '@angular/animations'; -export const fadeInState = state('fadeIn', style({opacity: 1})); +export const fadeInState = state('fadeIn', style({ opacity: 1 })); export const fadeInEnter = transition('* => fadeIn', [ style({ opacity: 0 }), animate(300, style({ opacity: 1 })), @@ -16,7 +16,7 @@ const fadeEnter = transition(':enter', [ animate(300, style({ opacity: 1 })), ]); -export const fadeOutState = state('fadeOut', style({opacity: 0})); +export const fadeOutState = state('fadeOut', style({ opacity: 0 })); export const fadeOutLeave = transition('fadeIn => fadeOut', [ style({ opacity: 1 }), animate(400, style({ opacity: 0 })), diff --git a/src/app/shared/animations/fromBottom.ts b/src/app/shared/animations/fromBottom.ts index 4f0517030d..ca6c68299a 100644 --- a/src/app/shared/animations/fromBottom.ts +++ b/src/app/shared/animations/fromBottom.ts @@ -6,15 +6,15 @@ import { trigger, } from '@angular/animations'; -export const fromBottomInState = state('fromBottomIn', style({opacity: 1, transform: 'translateY(0)'})); +export const fromBottomInState = state('fromBottomIn', style({ opacity: 1, transform: 'translateY(0)' })); export const fromBottomEnter = transition('* => fromBottomIn', [ - style({opacity: 0, transform: 'translateY(5%)'}), + style({ opacity: 0, transform: 'translateY(5%)' }), animate('400ms ease-in-out'), ]); -export const fromBottomOutState = state('fromBottomOut', style({opacity: 0, transform: 'translateY(-5%)'})); +export const fromBottomOutState = state('fromBottomOut', style({ opacity: 0, transform: 'translateY(-5%)' })); export const fromBottomLeave = transition('fromBottomIn => fromBottomOut', [ - style({opacity: 1, transform: 'translateY(0)'}), + style({ opacity: 1, transform: 'translateY(0)' }), animate('300ms ease-in-out'), ]); diff --git a/src/app/shared/animations/fromLeft.ts b/src/app/shared/animations/fromLeft.ts index 1c9fc0f0f8..7524c66437 100644 --- a/src/app/shared/animations/fromLeft.ts +++ b/src/app/shared/animations/fromLeft.ts @@ -6,15 +6,15 @@ import { trigger, } from '@angular/animations'; -export const fromLeftInState = state('fromLeftIn', style({opacity: 1, transform: 'translateX(0)'})); +export const fromLeftInState = state('fromLeftIn', style({ opacity: 1, transform: 'translateX(0)' })); export const fromLeftEnter = transition('* => fromLeftIn', [ - style({opacity: 0, transform: 'translateX(-5%)'}), + style({ opacity: 0, transform: 'translateX(-5%)' }), animate('400ms ease-in-out'), ]); -export const fromLeftOutState = state('fromLeftOut', style({opacity: 0, transform: 'translateX(5%)'})); +export const fromLeftOutState = state('fromLeftOut', style({ opacity: 0, transform: 'translateX(5%)' })); export const fromLeftLeave = transition('fromLeftIn => fromLeftOut', [ - style({opacity: 1, transform: 'translateX(0)'}), + style({ opacity: 1, transform: 'translateX(0)' }), animate('300ms ease-in-out'), ]); diff --git a/src/app/shared/animations/fromRight.ts b/src/app/shared/animations/fromRight.ts index f0a96dca1a..d9a20cb76f 100644 --- a/src/app/shared/animations/fromRight.ts +++ b/src/app/shared/animations/fromRight.ts @@ -6,15 +6,15 @@ import { trigger, } from '@angular/animations'; -export const fromRightInState = state('fromRightIn', style({opacity: 1, transform: 'translateX(0)'})); +export const fromRightInState = state('fromRightIn', style({ opacity: 1, transform: 'translateX(0)' })); export const fromRightEnter = transition('* => fromRightIn', [ - style({opacity: 0, transform: 'translateX(5%)'}), + style({ opacity: 0, transform: 'translateX(5%)' }), animate('400ms ease-in-out'), ]); -export const fromRightOutState = state('fromRightOut', style({opacity: 0, transform: 'translateX(-5%)'})); +export const fromRightOutState = state('fromRightOut', style({ opacity: 0, transform: 'translateX(-5%)' })); export const fromRightLeave = transition('fromRightIn => fromRightOut', [ - style({opacity: 1, transform: 'translateX(0)'}), + style({ opacity: 1, transform: 'translateX(0)' }), animate('300ms ease-in-out'), ]); diff --git a/src/app/shared/animations/fromTop.ts b/src/app/shared/animations/fromTop.ts index 9fe59426bc..3a5aa983b4 100644 --- a/src/app/shared/animations/fromTop.ts +++ b/src/app/shared/animations/fromTop.ts @@ -6,15 +6,15 @@ import { trigger, } from '@angular/animations'; -export const fromTopInState = state('fromTopIn', style({opacity: 1, transform: 'translateY(0)'})); +export const fromTopInState = state('fromTopIn', style({ opacity: 1, transform: 'translateY(0)' })); export const fromTopEnter = transition('* => fromTopIn', [ - style({opacity: 0, transform: 'translateY(-5%)'}), + style({ opacity: 0, transform: 'translateY(-5%)' }), animate('400ms ease-in-out'), ]); -export const fromTopOutState = state('fromTopOut', style({opacity: 0, transform: 'translateY(5%)'})); +export const fromTopOutState = state('fromTopOut', style({ opacity: 0, transform: 'translateY(5%)' })); export const fromTopLeave = transition('fromTopIn => fromTopOut', [ - style({opacity: 1, transform: 'translateY(0)'}), + style({ opacity: 1, transform: 'translateY(0)' }), animate('300ms ease-in-out'), ]); diff --git a/src/app/shared/animations/scale.ts b/src/app/shared/animations/scale.ts index 23843f7360..0b317dd8ba 100644 --- a/src/app/shared/animations/scale.ts +++ b/src/app/shared/animations/scale.ts @@ -6,15 +6,15 @@ import { trigger, } from '@angular/animations'; -export const scaleInState = state('scaleIn', style({opacity: 1, transform: 'scale(1)'})); +export const scaleInState = state('scaleIn', style({ opacity: 1, transform: 'scale(1)' })); export const scaleEnter = transition('* => scaleIn', [ - style({opacity: 0, transform: 'scale(0)'}), + style({ opacity: 0, transform: 'scale(0)' }), animate('400ms ease-in-out'), ]); -export const scaleOutState = state('scaleOut', style({opacity: 0, transform: 'scale(0)'})); +export const scaleOutState = state('scaleOut', style({ opacity: 0, transform: 'scale(0)' })); export const scaleLeave = transition('scaleIn => scaleOut', [ - style({opacity: 1, transform: 'scale(1)'}), + style({ opacity: 1, transform: 'scale(1)' }), animate('400ms ease-in-out'), ]); diff --git a/src/app/shared/animations/shrink.ts b/src/app/shared/animations/shrink.ts index 24f0ed1e48..6469a7efda 100644 --- a/src/app/shared/animations/shrink.ts +++ b/src/app/shared/animations/shrink.ts @@ -7,13 +7,13 @@ import { } from '@angular/animations'; export const shrinkInOut = trigger('shrinkInOut', [ - state('in', style({height: '100%', opacity: 1})), + state('in', style({ height: '100%', opacity: 1 })), transition('* => void', [ - style({height: '!', opacity: 1}), - animate(200, style({height: 0, opacity: 0})), + style({ height: '!', opacity: 1 }), + animate(200, style({ height: 0, opacity: 0 })), ]), transition('void => *', [ - style({height: 0, opacity: 0}), - animate(200, style({height: '*', opacity: 1})), + style({ height: 0, opacity: 0 }), + animate(200, style({ height: '*', opacity: 1 })), ]), ]); diff --git a/src/app/shared/browse-by/browse-by.component.spec.ts b/src/app/shared/browse-by/browse-by.component.spec.ts index c44198b966..a62726d290 100644 --- a/src/app/shared/browse-by/browse-by.component.spec.ts +++ b/src/app/shared/browse-by/browse-by.component.spec.ts @@ -149,7 +149,7 @@ describe('BrowseByComponent', () => { { provide: PaginationService, useValue: paginationService }, { provide: MockThemedBrowseEntryListElementComponent }, { provide: ThemeService, useValue: themeService }, - { provide: RouteService, useValue: routeServiceStub}, + { provide: RouteService, useValue: routeServiceStub }, { provide: SelectableListService, useValue: {} }, { provide: HostWindowService, useValue: new HostWindowServiceStub(800) }, ], diff --git a/src/app/shared/browse-by/browse-by.component.ts b/src/app/shared/browse-by/browse-by.component.ts index fce2d7c439..339a67eda0 100644 --- a/src/app/shared/browse-by/browse-by.component.ts +++ b/src/app/shared/browse-by/browse-by.component.ts @@ -164,7 +164,7 @@ export class BrowseByComponent implements OnInit, OnDestroy { */ back = () => { const page = +this.previousPage$.value > 1 ? +this.previousPage$.value : 1; - this.paginationService.updateRoute(this.paginationConfig.id, {page: page}, {[this.paginationConfig.id + '.return']: null, value: null, startsWith: null}); + this.paginationService.updateRoute(this.paginationConfig.id, { page: page }, { [this.paginationConfig.id + '.return']: null, value: null, startsWith: null }); }; /** @@ -186,7 +186,7 @@ export class BrowseByComponent implements OnInit, OnDestroy { * @param size */ doPageSizeChange(size) { - this.paginationService.updateRoute(this.paginationConfig.id,{pageSize: size}); + this.paginationService.updateRoute(this.paginationConfig.id,{ pageSize: size }); } /** @@ -194,7 +194,7 @@ export class BrowseByComponent implements OnInit, OnDestroy { * @param direction */ doSortDirectionChange(direction) { - this.paginationService.updateRoute(this.paginationConfig.id,{sortDirection: direction}); + this.paginationService.updateRoute(this.paginationConfig.id,{ sortDirection: direction }); } /** diff --git a/src/app/shared/comcol/comcol.module.ts b/src/app/shared/comcol/comcol.module.ts index fec79427d9..40cfc19c45 100644 --- a/src/app/shared/comcol/comcol.module.ts +++ b/src/app/shared/comcol/comcol.module.ts @@ -13,7 +13,7 @@ import { ComcolPageBrowseByComponent } from './comcol-page-browse-by/comcol-page import { ThemedComcolPageBrowseByComponent } from './comcol-page-browse-by/themed-comcol-page-browse-by.component'; import { ComcolPageContentComponent } from './comcol-page-content/comcol-page-content.component'; import { ComcolPageHandleComponent } from './comcol-page-handle/comcol-page-handle.component'; -import { ThemedComcolPageHandleComponent} from './comcol-page-handle/themed-comcol-page-handle.component'; +import { ThemedComcolPageHandleComponent } from './comcol-page-handle/themed-comcol-page-handle.component'; import { ComcolPageHeaderComponent } from './comcol-page-header/comcol-page-header.component'; import { ComcolPageLogoComponent } from './comcol-page-logo/comcol-page-logo.component'; diff --git a/src/app/shared/context-help-wrapper/context-help-wrapper.component.spec.ts b/src/app/shared/context-help-wrapper/context-help-wrapper.component.spec.ts index bb5c5912b9..7e481ed574 100644 --- a/src/app/shared/context-help-wrapper/context-help-wrapper.component.spec.ts +++ b/src/app/shared/context-help-wrapper/context-help-wrapper.component.spec.ts @@ -157,7 +157,7 @@ describe('ContextHelpWrapperComponent', () => { it('should display the tooltip', () => { expect(contextHelpService.toggleTooltip).toHaveBeenCalledWith('test-tooltip'); - getContextHelp$.next({...exampleContextHelp, isTooltipVisible: true}); + getContextHelp$.next({ ...exampleContextHelp, isTooltipVisible: true }); fixture.detectChanges(); expect(wrapperComponent.tooltip.open).toHaveBeenCalled(); expect(wrapperComponent.tooltip.close).toHaveBeenCalledTimes(0); @@ -167,7 +167,7 @@ describe('ContextHelpWrapperComponent', () => { it('should correctly display links', () => { templateComponent.content = 'linkTest'; - getContextHelp$.next({...exampleContextHelp, isTooltipVisible: true}); + getContextHelp$.next({ ...exampleContextHelp, isTooltipVisible: true }); fixture.detectChanges(); const nodeList: NodeList = fixture.debugElement.query(By.css('.ds-context-help-content')) .nativeElement @@ -195,7 +195,7 @@ describe('ContextHelpWrapperComponent', () => { it('should not display links if specified not to', () => { templateComponent.dontParseLinks = true; templateComponent.content = 'linkTest'; - getContextHelp$.next({...exampleContextHelp, isTooltipVisible: true}); + getContextHelp$.next({ ...exampleContextHelp, isTooltipVisible: true }); fixture.detectChanges(); @@ -221,7 +221,7 @@ describe('ContextHelpWrapperComponent', () => { it('should close the tooltip', () => { expect(contextHelpService.toggleTooltip).toHaveBeenCalledWith('test-tooltip'); - getContextHelp$.next({...exampleContextHelp, isTooltipVisible: false}); + getContextHelp$.next({ ...exampleContextHelp, isTooltipVisible: false }); fixture.detectChanges(); expect(wrapperComponent.tooltip.close).toHaveBeenCalled(); }); diff --git a/src/app/shared/context-help-wrapper/context-help-wrapper.component.ts b/src/app/shared/context-help-wrapper/context-help-wrapper.component.ts index e87520af43..a8f6925b45 100644 --- a/src/app/shared/context-help-wrapper/context-help-wrapper.component.ts +++ b/src/app/shared/context-help-wrapper/context-help-wrapper.component.ts @@ -170,7 +170,7 @@ export class ContextHelpWrapperComponent implements OnInit, OnDestroy { const match = substring.match(parseRegexp); return match === null ? substring - : ({href: match[2], text: match[1]}); + : ({ href: match[2], text: match[1] }); }); } diff --git a/src/app/shared/context-help.directive.ts b/src/app/shared/context-help.directive.ts index 1597f7afcf..d8573419b2 100644 --- a/src/app/shared/context-help.directive.ts +++ b/src/app/shared/context-help.directive.ts @@ -51,7 +51,7 @@ export class ContextHelpDirective implements OnChanges, OnDestroy { ngOnChanges() { this.clearMostRecentId(); this.mostRecentId = this.dsContextHelp.id; - this.contextHelpService.add({id: this.dsContextHelp.id, isTooltipVisible: false}); + this.contextHelpService.add({ id: this.dsContextHelp.id, isTooltipVisible: false }); if (this.wrapper === undefined) { const factory diff --git a/src/app/shared/context-help.reducer.ts b/src/app/shared/context-help.reducer.ts index 021d35958d..ef0686d2a6 100644 --- a/src/app/shared/context-help.reducer.ts +++ b/src/app/shared/context-help.reducer.ts @@ -13,20 +13,20 @@ export interface ContextHelpState { models: ContextHelpModels; } -const initialState: ContextHelpState = {allIconsVisible: false, models: {}}; +const initialState: ContextHelpState = { allIconsVisible: false, models: {} }; export function contextHelpReducer(state: ContextHelpState = initialState, action: ContextHelpAction): ContextHelpState { switch (action.type) { case ContextHelpActionTypes.CONTEXT_HELP_TOGGLE_ICONS: { - return {...state, allIconsVisible: !state.allIconsVisible}; + return { ...state, allIconsVisible: !state.allIconsVisible }; } case ContextHelpActionTypes.CONTEXT_HELP_ADD: { - const newModels = {...state.models, [action.model.id]: action.model}; - return {...state, models: newModels}; + const newModels = { ...state.models, [action.model.id]: action.model }; + return { ...state, models: newModels }; } case ContextHelpActionTypes.CONTEXT_HELP_REMOVE: { - const {[action.id]: _, ...remainingModels} = state.models; - return {...state, models: remainingModels}; + const { [action.id]: _, ...remainingModels } = state.models; + return { ...state, models: remainingModels }; } case ContextHelpActionTypes.CONTEXT_HELP_TOGGLE_TOOLTIP: { return modifyTooltipVisibility(state, action.id, v => !v); @@ -44,8 +44,8 @@ export function contextHelpReducer(state: ContextHelpState = initialState, actio } function modifyTooltipVisibility(state: ContextHelpState, id: string, modify: (vis: boolean) => boolean): ContextHelpState { - const {[id]: matchingModel, ...otherModels} = state.models; - const modifiedModel = {...matchingModel, isTooltipVisible: modify(matchingModel.isTooltipVisible)}; - const newModels = {...otherModels, [id]: modifiedModel}; - return {...state, models: newModels}; + const { [id]: matchingModel, ...otherModels } = state.models; + const modifiedModel = { ...matchingModel, isTooltipVisible: modify(matchingModel.isTooltipVisible) }; + const newModels = { ...otherModels, [id]: modifiedModel }; + return { ...state, models: newModels }; } diff --git a/src/app/shared/context-help.service.spec.ts b/src/app/shared/context-help.service.spec.ts index 97c46490a0..55bd9c9c38 100644 --- a/src/app/shared/context-help.service.spec.ts +++ b/src/app/shared/context-help.service.spec.ts @@ -16,7 +16,7 @@ describe('ContextHelpService', () => { let store; let testScheduler; const booleans = { f: false, t: true }; - const mkContextHelp = (id: string) => ({ 0: {id, isTooltipVisible: false}, 1: {id, isTooltipVisible: true} }); + const mkContextHelp = (id: string) => ({ 0: { id, isTooltipVisible: false }, 1: { id, isTooltipVisible: true } }); beforeEach(async () => { TestBed.configureTestingModule({ @@ -37,7 +37,7 @@ describe('ContextHelpService', () => { }); it('toggleIcons calls should be observable in shouldShowIcons$', () => { - testScheduler.run(({cold, expectObservable}) => { + testScheduler.run(({ cold, expectObservable }) => { const toggles = cold('-xxxxx'); toggles.subscribe((_) => service.toggleIcons()); expectObservable(service.shouldShowIcons$()).toBe('ftftft', booleans); @@ -45,15 +45,15 @@ describe('ContextHelpService', () => { }); it('add and remove calls should be observable in getContextHelp$', () => { - testScheduler.run(({cold, expectObservable}) => { + testScheduler.run(({ cold, expectObservable }) => { const modifications = cold('-abAcCB', { - a: () => service.add({id: 'a', isTooltipVisible: false}), - b: () => service.add({id: 'b', isTooltipVisible: false}), - c: () => service.add({id: 'c', isTooltipVisible: false}), + a: () => service.add({ id: 'a', isTooltipVisible: false }), + b: () => service.add({ id: 'b', isTooltipVisible: false }), + c: () => service.add({ id: 'c', isTooltipVisible: false }), A: () => service.remove('a'), B: () => service.remove('b'), C: () => service.remove('c'), }); modifications.subscribe(mod => mod()); - const match = (id) => ({ 0: undefined, 1: {id, isTooltipVisible: false} }); + const match = (id) => ({ 0: undefined, 1: { id, isTooltipVisible: false } }); expectObservable(service.getContextHelp$('a')).toBe('01-0---', match('a')); expectObservable(service.getContextHelp$('b')).toBe('0-1---0', match('b')); expectObservable(service.getContextHelp$('c')).toBe('0---10-', match('c')); @@ -61,9 +61,9 @@ describe('ContextHelpService', () => { }); it('toggleTooltip calls should be observable in getContextHelp$', () => { - service.add({id: 'a', isTooltipVisible: false}); - service.add({id: 'b', isTooltipVisible: false}); - testScheduler.run(({cold, expectObservable}) => { + service.add({ id: 'a', isTooltipVisible: false }); + service.add({ id: 'b', isTooltipVisible: false }); + testScheduler.run(({ cold, expectObservable }) => { const toggles = cold('-aaababbabba'); toggles.subscribe(id => service.toggleTooltip(id)); expectObservable(service.getContextHelp$('a')).toBe('0101-0--1--0', mkContextHelp('a')); @@ -72,8 +72,8 @@ describe('ContextHelpService', () => { }); it('hideTooltip and showTooltip calls should be observable in getContextHelp$', () => { - service.add({id: 'a', isTooltipVisible: false}); - testScheduler.run(({cold, expectObservable}) => { + service.add({ id: 'a', isTooltipVisible: false }); + testScheduler.run(({ cold, expectObservable }) => { const hideShowCalls = cold('-shssshhs', { s: () => service.showTooltip('a'), h: () => service.hideTooltip('a'), }); diff --git a/src/app/shared/cookies/browser-klaro.service.ts b/src/app/shared/cookies/browser-klaro.service.ts index 95456ba1f6..f673a41736 100644 --- a/src/app/shared/cookies/browser-klaro.service.ts +++ b/src/app/shared/cookies/browser-klaro.service.ts @@ -250,7 +250,7 @@ export class BrowserKlaroService extends KlaroService { * Show the cookie consent form */ showSettings() { - this.lazyKlaro.then(({show}) => show(this.klaroConfig)); + this.lazyKlaro.then(({ show }) => show(this.klaroConfig)); } /** diff --git a/src/app/shared/dso-page/dso-edit-menu.resolver.spec.ts b/src/app/shared/dso-page/dso-edit-menu.resolver.spec.ts index cf858f3ca6..0a8534201d 100644 --- a/src/app/shared/dso-page/dso-edit-menu.resolver.spec.ts +++ b/src/app/shared/dso-page/dso-edit-menu.resolver.spec.ts @@ -58,14 +58,14 @@ describe('DSOEditMenuResolver', () => { }], }, }, - params: {id: 'test-uuid'}, + params: { id: 'test-uuid' }, }; const state = { url: 'test-url', }; - const testObject = Object.assign(new Item(), {uuid: 'test-uuid', type: 'item', _links: {self: {href: 'self-link'}}}); + const testObject = Object.assign(new Item(), { uuid: 'test-uuid', type: 'item', _links: { self: { href: 'self-link' } } }); const dummySections1 = [{ id: 'dummy-1', @@ -129,13 +129,13 @@ describe('DSOEditMenuResolver', () => { imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule], declarations: [AdminSidebarComponent], providers: [ - {provide: DSpaceObjectDataService, useValue: dSpaceObjectDataService}, - {provide: MenuService, useValue: menuService}, - {provide: AuthorizationDataService, useValue: authorizationService}, - {provide: DsoVersioningModalService, useValue: dsoVersioningModalService}, - {provide: ResearcherProfileDataService, useValue: researcherProfileService}, - {provide: TranslateService, useValue: translate}, - {provide: NotificationsService, useValue: notificationsService}, + { provide: DSpaceObjectDataService, useValue: dSpaceObjectDataService }, + { provide: MenuService, useValue: menuService }, + { provide: AuthorizationDataService, useValue: authorizationService }, + { provide: DsoVersioningModalService, useValue: dsoVersioningModalService }, + { provide: ResearcherProfileDataService, useValue: researcherProfileService }, + { provide: TranslateService, useValue: translate }, + { provide: NotificationsService, useValue: notificationsService }, { provide: NgbModal, useValue: { open: () => {/*comment*/ @@ -164,8 +164,8 @@ describe('DSOEditMenuResolver', () => { { ...route.data.menu, [MenuID.DSO_EDIT]: [ - ...dummySections1.map((menu) => Object.assign(menu, {id: menu.id + '-test-uuid'})), - ...dummySections2.map((menu) => Object.assign(menu, {id: menu.id + '-test-uuid'})), + ...dummySections1.map((menu) => Object.assign(menu, { id: menu.id + '-test-uuid' })), + ...dummySections2.map((menu) => Object.assign(menu, { id: menu.id + '-test-uuid' })), ], }, ); @@ -190,7 +190,7 @@ describe('DSOEditMenuResolver', () => { }, }, params: {}, - queryParams: {scope: 'test-scope-uuid'}, + queryParams: { scope: 'test-scope-uuid' }, }; resolver.resolve(routeWithScope as any, null).subscribe(resolved => { @@ -198,8 +198,8 @@ describe('DSOEditMenuResolver', () => { { ...route.data.menu, [MenuID.DSO_EDIT]: [ - ...dummySections1.map((menu) => Object.assign(menu, {id: menu.id + '-test-scope-uuid'})), - ...dummySections2.map((menu) => Object.assign(menu, {id: menu.id + '-test-scope-uuid'})), + ...dummySections1.map((menu) => Object.assign(menu, { id: menu.id + '-test-scope-uuid' })), + ...dummySections2.map((menu) => Object.assign(menu, { id: menu.id + '-test-scope-uuid' })), ], }, ); diff --git a/src/app/shared/dso-page/dso-edit-menu.resolver.ts b/src/app/shared/dso-page/dso-edit-menu.resolver.ts index 7ded7dcb6b..3adea39734 100644 --- a/src/app/shared/dso-page/dso-edit-menu.resolver.ts +++ b/src/app/shared/dso-page/dso-edit-menu.resolver.ts @@ -87,7 +87,7 @@ export class DSOEditMenuResolver implements Resolve<{ [key: string]: MenuSection }), ); } else { - return observableOf({...route.data?.menu}); + return observableOf({ ...route.data?.menu }); } }), ); diff --git a/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.spec.ts b/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.spec.ts index a3dc05683f..4ad4642804 100644 --- a/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.spec.ts +++ b/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.spec.ts @@ -40,10 +40,10 @@ describe('DsoEditMenuExpandableSectionComponent', () => { imports: [TranslateModule.forRoot()], declarations: [DsoEditMenuExpandableSectionComponent, TestComponent], providers: [ - {provide: 'sectionDataProvider', useValue: dummySection}, - {provide: MenuService, useValue: menuService}, - {provide: CSSVariableService, useClass: CSSVariableServiceStub}, - {provide: Router, useValue: new RouterStub()}, + { provide: 'sectionDataProvider', useValue: dummySection }, + { provide: MenuService, useValue: menuService }, + { provide: CSSVariableService, useClass: CSSVariableServiceStub }, + { provide: Router, useValue: new RouterStub() }, ], }).overrideComponent(DsoEditMenuExpandableSectionComponent, { set: { diff --git a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.spec.ts b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.spec.ts index 9bbb4ecbe9..a929441cfe 100644 --- a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.spec.ts +++ b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.spec.ts @@ -24,10 +24,10 @@ function initAsync(dummySectionText: { visible: boolean; icon: string; active: b imports: [TranslateModule.forRoot()], declarations: [DsoEditMenuSectionComponent, TestComponent], providers: [ - {provide: 'sectionDataProvider', useValue: dummySectionText}, - {provide: MenuService, useValue: menuService}, - {provide: CSSVariableService, useClass: CSSVariableServiceStub}, - {provide: Router, useValue: new RouterStub()}, + { provide: 'sectionDataProvider', useValue: dummySectionText }, + { provide: MenuService, useValue: menuService }, + { provide: CSSVariableService, useClass: CSSVariableServiceStub }, + { provide: Router, useValue: new RouterStub() }, ], }).overrideComponent(DsoEditMenuSectionComponent, { set: { diff --git a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu.component.spec.ts b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu.component.spec.ts index e9be199fe9..3b8adc35ef 100644 --- a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu.component.spec.ts +++ b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu.component.spec.ts @@ -56,11 +56,11 @@ describe('DsoEditMenuComponent', () => { declarations: [DsoEditMenuComponent], providers: [ Injector, - {provide: MenuService, useValue: menuService}, - {provide: AuthService, useClass: AuthServiceStub}, - {provide: ActivatedRoute, useValue: routeStub}, - {provide: AuthorizationDataService, useValue: authorizationService}, - {provide: ThemeService, useValue: getMockThemeService()}, + { provide: MenuService, useValue: menuService }, + { provide: AuthService, useClass: AuthServiceStub }, + { provide: ActivatedRoute, useValue: routeStub }, + { provide: AuthorizationDataService, useValue: authorizationService }, + { provide: ThemeService, useValue: getMockThemeService() }, ], schemas: [NO_ERRORS_SCHEMA], }).compileComponents(); diff --git a/src/app/shared/dso-page/dso-versioning-modal-service/dso-versioning-modal.service.spec.ts b/src/app/shared/dso-page/dso-versioning-modal-service/dso-versioning-modal.service.spec.ts index 754bf5b346..8f011580cf 100644 --- a/src/app/shared/dso-page/dso-versioning-modal-service/dso-versioning-modal.service.spec.ts +++ b/src/app/shared/dso-page/dso-versioning-modal-service/dso-versioning-modal.service.spec.ts @@ -39,7 +39,7 @@ describe('DsoVersioningModalService', () => { beforeEach(waitForAsync(() => { modalService = jasmine.createSpyObj('modalService', { - open: {componentInstance: {firstVersion: {}, versionNumber: {}, createVersionEvent: EMPTY}}, + open: { componentInstance: { firstVersion: {}, versionNumber: {}, createVersionEvent: EMPTY } }, }); versionService = jasmine.createSpyObj('versionService', { findByHref: createSuccessfulRemoteDataObject$(new Version()), diff --git a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/themed-create-collection-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/themed-create-collection-parent-selector.component.ts index f31330ce2b..ced155cdda 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/themed-create-collection-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/themed-create-collection-parent-selector.component.ts @@ -1,7 +1,7 @@ -import {Component} from '@angular/core'; -import {ThemedComponent} from 'src/app/shared/theme-support/themed.component'; +import { Component } from '@angular/core'; +import { ThemedComponent } from 'src/app/shared/theme-support/themed.component'; -import {CreateCollectionParentSelectorComponent} from './create-collection-parent-selector.component'; +import { CreateCollectionParentSelectorComponent } from './create-collection-parent-selector.component'; /** * Themed wrapper for CreateCollectionParentSelectorComponent diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/themed-create-community-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/themed-create-community-parent-selector.component.ts index 8bff44fbd7..bbf9db5247 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/themed-create-community-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/themed-create-community-parent-selector.component.ts @@ -1,7 +1,7 @@ -import {Component} from '@angular/core'; -import {ThemedComponent} from 'src/app/shared/theme-support/themed.component'; +import { Component } from '@angular/core'; +import { ThemedComponent } from 'src/app/shared/theme-support/themed.component'; -import {CreateCommunityParentSelectorComponent} from './create-community-parent-selector.component'; +import { CreateCommunityParentSelectorComponent } from './create-community-parent-selector.component'; /** * Themed wrapper for CreateCommunityParentSelectorComponent diff --git a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts index a2393c0918..271c13b097 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts @@ -2,9 +2,9 @@ import { Component, Input, } from '@angular/core'; -import {ThemedComponent} from 'src/app/shared/theme-support/themed.component'; +import { ThemedComponent } from 'src/app/shared/theme-support/themed.component'; -import {CreateItemParentSelectorComponent} from './create-item-parent-selector.component'; +import { CreateItemParentSelectorComponent } from './create-item-parent-selector.component'; /** * Themed wrapper for CreateItemParentSelectorComponent diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/themed-edit-collection-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/themed-edit-collection-selector.component.ts index 6aba89fa12..f337cf4e8e 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/themed-edit-collection-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/themed-edit-collection-selector.component.ts @@ -1,7 +1,7 @@ -import {Component} from '@angular/core'; -import {ThemedComponent} from 'src/app/shared/theme-support/themed.component'; +import { Component } from '@angular/core'; +import { ThemedComponent } from 'src/app/shared/theme-support/themed.component'; -import {EditCollectionSelectorComponent} from './edit-collection-selector.component'; +import { EditCollectionSelectorComponent } from './edit-collection-selector.component'; /** * Themed wrapper for EditCollectionSelectorComponent diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/themed-edit-community-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/themed-edit-community-selector.component.ts index ee063252b8..86b501ffda 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/themed-edit-community-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/themed-edit-community-selector.component.ts @@ -1,7 +1,7 @@ -import {Component} from '@angular/core'; -import {ThemedComponent} from 'src/app/shared/theme-support/themed.component'; +import { Component } from '@angular/core'; +import { ThemedComponent } from 'src/app/shared/theme-support/themed.component'; -import {EditCommunitySelectorComponent} from './edit-community-selector.component'; +import { EditCommunitySelectorComponent } from './edit-community-selector.component'; /** * Themed wrapper for EditCommunitySelectorComponent diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/themed-edit-item-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/themed-edit-item-selector.component.ts index 687c170fb7..52f7809905 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/themed-edit-item-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/themed-edit-item-selector.component.ts @@ -1,7 +1,7 @@ -import {Component} from '@angular/core'; -import {ThemedComponent} from 'src/app/shared/theme-support/themed.component'; +import { Component } from '@angular/core'; +import { ThemedComponent } from 'src/app/shared/theme-support/themed.component'; -import {EditItemSelectorComponent} from './edit-item-selector.component'; +import { EditItemSelectorComponent } from './edit-item-selector.component'; /** * Themed wrapper for EditItemSelectorComponent diff --git a/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts index 1a2a9169ae..c3b0aac2e1 100644 --- a/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts @@ -110,7 +110,7 @@ export class ExportMetadataSelectorComponent extends DSOSelectorModalWrapperComp return this.authorizationDataService.isAuthorized(FeatureID.AdministratorOf).pipe( switchMap((isAdmin) => { if (isAdmin) { - parameterValues.push(Object.assign(new ProcessParameter(), {name: '-a'})); + parameterValues.push(Object.assign(new ProcessParameter(), { name: '-a' })); } return this.scriptDataService.invoke(METADATA_EXPORT_SCRIPT_NAME, parameterValues, []); }), diff --git a/src/app/shared/file-download-link/file-download-link.component.spec.ts b/src/app/shared/file-download-link/file-download-link.component.spec.ts index f2b921dfae..2517282012 100644 --- a/src/app/shared/file-download-link/file-download-link.component.spec.ts +++ b/src/app/shared/file-download-link/file-download-link.component.spec.ts @@ -31,18 +31,18 @@ describe('FileDownloadLinkComponent', () => { function init() { authorizationService = jasmine.createSpyObj('authorizationService', { - isAuthorized: cold('-a', {a: true}), + isAuthorized: cold('-a', { a: true }), }); bitstream = Object.assign(new Bitstream(), { uuid: 'bitstreamUuid', _links: { - self: {href: 'obj-selflink'}, + self: { href: 'obj-selflink' }, }, }); item = Object.assign(new Item(), { uuid: 'itemUuid', _links: { - self: {href: 'obj-selflink'}, + self: { href: 'obj-selflink' }, }, }); } @@ -51,7 +51,7 @@ describe('FileDownloadLinkComponent', () => { TestBed.configureTestingModule({ declarations: [FileDownloadLinkComponent, RouterLinkDirectiveStub], providers: [ - {provide: AuthorizationDataService, useValue: authorizationService}, + { provide: AuthorizationDataService, useValue: authorizationService }, ], }) .compileComponents(); @@ -74,8 +74,8 @@ describe('FileDownloadLinkComponent', () => { fixture.detectChanges(); }); it('should return the bitstreamPath based on the input bitstream', () => { - expect(component.bitstreamPath$).toBeObservable(cold('-a', {a: { routerLink: new URLCombiner(getBitstreamModuleRoute(), bitstream.uuid, 'download').toString(), queryParams: {} }})); - expect(component.canDownload$).toBeObservable(cold('--a', {a: true})); + expect(component.bitstreamPath$).toBeObservable(cold('-a', { a: { routerLink: new URLCombiner(getBitstreamModuleRoute(), bitstream.uuid, 'download').toString(), queryParams: {} } })); + expect(component.canDownload$).toBeObservable(cold('--a', { a: true })); }); it('should init the component', () => { @@ -93,9 +93,9 @@ describe('FileDownloadLinkComponent', () => { init(); (authorizationService.isAuthorized as jasmine.Spy).and.callFake((featureId, object) => { if (featureId === FeatureID.CanDownload) { - return cold('-a', {a: false}); + return cold('-a', { a: false }); } - return cold('-a', {a: true}); + return cold('-a', { a: true }); }); initTestbed(); })); @@ -107,8 +107,8 @@ describe('FileDownloadLinkComponent', () => { fixture.detectChanges(); }); it('should return the bitstreamPath based on the input bitstream', () => { - expect(component.bitstreamPath$).toBeObservable(cold('-a', {a: { routerLink: new URLCombiner(getItemModuleRoute(), item.uuid, 'request-a-copy').toString(), queryParams: { bitstream: bitstream.uuid } }})); - expect(component.canDownload$).toBeObservable(cold('--a', {a: false})); + expect(component.bitstreamPath$).toBeObservable(cold('-a', { a: { routerLink: new URLCombiner(getItemModuleRoute(), item.uuid, 'request-a-copy').toString(), queryParams: { bitstream: bitstream.uuid } } })); + expect(component.canDownload$).toBeObservable(cold('--a', { a: false })); }); it('should init the component', () => { @@ -124,7 +124,7 @@ describe('FileDownloadLinkComponent', () => { beforeEach(waitForAsync(() => { scheduler = getTestScheduler(); init(); - (authorizationService.isAuthorized as jasmine.Spy).and.returnValue(cold('-a', {a: false})); + (authorizationService.isAuthorized as jasmine.Spy).and.returnValue(cold('-a', { a: false })); initTestbed(); })); beforeEach(() => { @@ -135,8 +135,8 @@ describe('FileDownloadLinkComponent', () => { fixture.detectChanges(); }); it('should return the bitstreamPath based on the input bitstream', () => { - expect(component.bitstreamPath$).toBeObservable(cold('-a', {a: { routerLink: new URLCombiner(getBitstreamModuleRoute(), bitstream.uuid, 'download').toString(), queryParams: {} }})); - expect(component.canDownload$).toBeObservable(cold('--a', {a: false})); + expect(component.bitstreamPath$).toBeObservable(cold('-a', { a: { routerLink: new URLCombiner(getBitstreamModuleRoute(), bitstream.uuid, 'download').toString(), queryParams: {} } })); + expect(component.canDownload$).toBeObservable(cold('--a', { a: false })); }); it('should init the component', () => { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts index ed65bd050b..d0d4af94a7 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts @@ -141,7 +141,7 @@ describe('DsDynamicFormControlContainerComponent test suite', () => { typeBindRelations: [{ match: MATCH_VISIBLE, operator: OR_OPERATOR, - when: [{id: 'dc.type', value: 'Book'}], + when: [{ id: 'dc.type', value: 'Book' }], }], }), new DynamicScrollableDropdownModel({ diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service.spec.ts index c7e18c72ed..a54e379cac 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service.spec.ts @@ -1,4 +1,4 @@ -import {Injector} from '@angular/core'; +import { Injector } from '@angular/core'; import { inject, TestBed, @@ -18,14 +18,14 @@ import { REQUIRED_MATCHER_PROVIDER, } from '@ng-dynamic-forms/core'; -import {getMockFormBuilderService} from '../../../mocks/form-builder-service.mock'; +import { getMockFormBuilderService } from '../../../mocks/form-builder-service.mock'; import { mockInputWithTypeBindModel, MockRelationModel, } from '../../../mocks/form-models.mock'; -import {FormBuilderService} from '../form-builder.service'; -import {FormFieldMetadataValueObject} from '../models/form-field-metadata-value.model'; -import {DsDynamicTypeBindRelationService} from './ds-dynamic-type-bind-relation.service'; +import { FormBuilderService } from '../form-builder.service'; +import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model'; +import { DsDynamicTypeBindRelationService } from './ds-dynamic-type-bind-relation.service'; describe('DSDynamicTypeBindRelationService test suite', () => { let service: DsDynamicTypeBindRelationService; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts index a8d7a0ff61..40cbc38a48 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts @@ -76,7 +76,7 @@ export class DsDynamicFormArrayComponent extends DynamicFormArrayComponent { update(event: any, index: number) { const $event = Object.assign({}, event, { - context: { index: index - 1}, + context: { index: index - 1 }, }); this.onChange($event); diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.model.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.model.ts index 0b78d216a5..1156e8efa1 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.model.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.model.ts @@ -11,7 +11,7 @@ import { Subject, } from 'rxjs'; -import {MetadataValue} from '../../../../../../core/shared/metadata.models'; +import { MetadataValue } from '../../../../../../core/shared/metadata.models'; import { isEmpty, isNotUndefined, diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-input.model.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-input.model.ts index 132ed66a23..e239099bc4 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-input.model.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-input.model.ts @@ -5,10 +5,10 @@ import { DynamicInputModelConfig, serializable, } from '@ng-dynamic-forms/core'; -import {Subject} from 'rxjs'; +import { Subject } from 'rxjs'; import { VocabularyOptions } from '../../../../../core/submission/vocabularies/models/vocabulary-options.model'; -import {hasValue} from '../../../../empty.util'; +import { hasValue } from '../../../../empty.util'; import { LanguageCode } from '../../models/form-field-language-value.model'; import { FormFieldMetadataValueObject } from '../../models/form-field-metadata-value.model'; import { RelationshipOptions } from '../../models/relationship-options.model'; diff --git a/src/app/shared/form/builder/form-builder.service.spec.ts b/src/app/shared/form/builder/form-builder.service.spec.ts index 0b8b264c95..ee629038aa 100644 --- a/src/app/shared/form/builder/form-builder.service.spec.ts +++ b/src/app/shared/form/builder/form-builder.service.spec.ts @@ -34,10 +34,10 @@ import { import { FormRowModel } from '../../../core/config/models/config-submission-form.model'; import { SubmissionFormsModel } from '../../../core/config/models/config-submission-forms.model'; -import {ConfigurationDataService} from '../../../core/data/configuration-data.service'; -import {ConfigurationProperty} from '../../../core/shared/configuration-property.model'; +import { ConfigurationDataService } from '../../../core/data/configuration-data.service'; +import { ConfigurationProperty } from '../../../core/shared/configuration-property.model'; import { VocabularyOptions } from '../../../core/submission/vocabularies/models/vocabulary-options.model'; -import {createSuccessfulRemoteDataObject$} from '../../remote-data.utils'; +import { createSuccessfulRemoteDataObject$ } from '../../remote-data.utils'; import { DynamicDsDatePickerModel } from './ds-dynamic-form-ui/models/date-picker/date-picker.model'; import { DynamicConcatModel } from './ds-dynamic-form-ui/models/ds-dynamic-concat.model'; import { DsDynamicInputModel } from './ds-dynamic-form-ui/models/ds-dynamic-input.model'; @@ -332,7 +332,7 @@ describe('FormBuilderService test suite', () => { metadataFields: ['dc.contributor.author'], hasSelectableMetadata: true, showButtons: true, - typeBindRelations: [{ match: 'VISIBLE', operator: 'OR', when: [{id: 'dc.type', value: 'Book' }]}], + typeBindRelations: [{ match: 'VISIBLE', operator: 'OR', when: [{ id: 'dc.type', value: 'Book' }] }], }, ), diff --git a/src/app/shared/form/builder/form-builder.service.ts b/src/app/shared/form/builder/form-builder.service.ts index 6d13344d1a..f3895b6263 100644 --- a/src/app/shared/form/builder/form-builder.service.ts +++ b/src/app/shared/form/builder/form-builder.service.ts @@ -101,7 +101,7 @@ export class FormBuilderService extends DynamicFormService { autoSave: false, }; const context: DynamicFormArrayGroupModel = (model?.parent instanceof DynamicFormArrayGroupModel) ? model?.parent : null; - return {$event, context, control: control, group: group, model: model, type}; + return { $event, context, control: control, group: group, model: model, type }; } getTypeBindModel() { diff --git a/src/app/shared/form/builder/parsers/concat-field-parser.ts b/src/app/shared/form/builder/parsers/concat-field-parser.ts index 3f35c17e8f..3b29d0eb48 100644 --- a/src/app/shared/form/builder/parsers/concat-field-parser.ts +++ b/src/app/shared/form/builder/parsers/concat-field-parser.ts @@ -1,4 +1,4 @@ -import {Inject} from '@angular/core'; +import { Inject } from '@angular/core'; import { hasNoValue, diff --git a/src/app/shared/form/builder/parsers/dropdown-field-parser.ts b/src/app/shared/form/builder/parsers/dropdown-field-parser.ts index a2deebe41f..1fc28d1274 100644 --- a/src/app/shared/form/builder/parsers/dropdown-field-parser.ts +++ b/src/app/shared/form/builder/parsers/dropdown-field-parser.ts @@ -1,4 +1,4 @@ -import {Inject} from '@angular/core'; +import { Inject } from '@angular/core'; import { DynamicFormControlLayout } from '@ng-dynamic-forms/core'; import { isNotEmpty } from '../../../empty.util'; diff --git a/src/app/shared/form/chips/models/chips.model.ts b/src/app/shared/form/chips/models/chips.model.ts index 988af8a1e0..5b2d3c5da8 100644 --- a/src/app/shared/form/chips/models/chips.model.ts +++ b/src/app/shared/form/chips/models/chips.model.ts @@ -38,7 +38,7 @@ export class Chips { const icons = this.getChipsIcons(item); const chipsItem = new ChipsItem(item, this.displayField, this.displayObj, icons); - const duplicatedIndex = findIndex(this._items, {display: chipsItem.display.trim()}); + const duplicatedIndex = findIndex(this._items, { display: chipsItem.display.trim() }); if (duplicatedIndex === -1 || !isEqual(item, this.getChipByIndex(duplicatedIndex).item)) { this._items.push(chipsItem); this.chipsItems.next(this._items); @@ -46,7 +46,7 @@ export class Chips { } public getChipById(id): ChipsItem { - const index = findIndex(this._items, {id: id}); + const index = findIndex(this._items, { id: id }); return this.getChipByIndex(index); } @@ -87,7 +87,7 @@ export class Chips { } public remove(chipsItem: ChipsItem): void { - const index = findIndex(this._items, {id: chipsItem.id}); + const index = findIndex(this._items, { id: chipsItem.id }); this._items.splice(index, 1); this.chipsItems.next(this._items); } @@ -112,7 +112,7 @@ export class Chips { return icons; } - const defaultConfigIndex: number = findIndex(this.iconsConfig, {name: 'default'}); + const defaultConfigIndex: number = findIndex(this.iconsConfig, { name: 'default' }); const defaultConfig: MetadataIconConfig = (defaultConfigIndex !== -1) ? this.iconsConfig[defaultConfigIndex] : undefined; let config: MetadataIconConfig; let configIndex: number; @@ -122,7 +122,7 @@ export class Chips { .forEach((metadata) => { value = item[metadata]; - configIndex = findIndex(this.iconsConfig, {name: metadata}); + configIndex = findIndex(this.iconsConfig, { name: metadata }); config = (configIndex !== -1) ? this.iconsConfig[configIndex] : defaultConfig; diff --git a/src/app/shared/form/directives/authority-confidence-state.directive.ts b/src/app/shared/form/directives/authority-confidence-state.directive.ts index c229c0fbfa..94f72b05f3 100644 --- a/src/app/shared/form/directives/authority-confidence-state.directive.ts +++ b/src/app/shared/form/directives/authority-confidence-state.directive.ts @@ -148,9 +148,9 @@ export class AuthorityConfidenceStateDirective implements OnChanges, AfterViewIn const confidenceIcons: ConfidenceIconConfig[] = environment.submission.icons.authority.confidence; - const confidenceIndex: number = findIndex(confidenceIcons, {value: confidence}); + const confidenceIndex: number = findIndex(confidenceIcons, { value: confidence }); - const defaultconfidenceIndex: number = findIndex(confidenceIcons, {value: 'default' as any}); + const defaultconfidenceIndex: number = findIndex(confidenceIcons, { value: 'default' as any }); const defaultClass: string = (defaultconfidenceIndex !== -1) ? confidenceIcons[defaultconfidenceIndex].style : ''; return (confidenceIndex !== -1) ? confidenceIcons[confidenceIndex].style : defaultClass; diff --git a/src/app/shared/form/form.actions.ts b/src/app/shared/form/form.actions.ts index 55475d3000..170fa25c11 100644 --- a/src/app/shared/form/form.actions.ts +++ b/src/app/shared/form/form.actions.ts @@ -41,7 +41,7 @@ export class FormInitAction implements Action { * the Form validation status */ constructor(formId: string, formData: any, valid: boolean) { - this.payload = {formId, formData, valid}; + this.payload = { formId, formData, valid }; } } @@ -61,7 +61,7 @@ export class FormChangeAction implements Action { * the FormGroup Object */ constructor(formId: string, formData: any) { - this.payload = {formId, formData}; + this.payload = { formId, formData }; } } @@ -81,7 +81,7 @@ export class FormAddTouchedAction implements Action { * the array containing new touched fields */ constructor(formId: string, touched: string[]) { - this.payload = {formId, touched}; + this.payload = { formId, touched }; } } @@ -98,7 +98,7 @@ export class FormRemoveAction implements Action { * the Form's ID */ constructor(formId: string) { - this.payload = {formId}; + this.payload = { formId }; } } @@ -118,7 +118,7 @@ export class FormStatusChangeAction implements Action { * the Form validation status */ constructor(formId: string, valid: boolean) { - this.payload = {formId, valid}; + this.payload = { formId, valid }; } } @@ -132,7 +132,7 @@ export class FormAddError implements Action { }; constructor(formId: string, fieldId: string, fieldIndex: number, errorMessage: string) { - this.payload = {formId, fieldId, fieldIndex, errorMessage}; + this.payload = { formId, fieldId, fieldIndex, errorMessage }; } } @@ -145,7 +145,7 @@ export class FormRemoveErrorAction implements Action { }; constructor(formId: string, fieldId: string, fieldIndex: number) { - this.payload = {formId, fieldId, fieldIndex}; + this.payload = { formId, fieldId, fieldIndex }; } } @@ -156,7 +156,7 @@ export class FormClearErrorsAction implements Action { }; constructor(formId: string) { - this.payload = {formId}; + this.payload = { formId }; } } diff --git a/src/app/shared/form/form.reducer.ts b/src/app/shared/form/form.reducer.ts index c4947a3cd9..cacb4fd9fe 100644 --- a/src/app/shared/form/form.reducer.ts +++ b/src/app/shared/form/form.reducer.ts @@ -111,7 +111,7 @@ function removeFormError(state: FormState, action: FormRemoveErrorAction) { if (hasValue(state[formId])) { const errors = state[formId].errors.filter((error) => error.fieldId !== fieldId || error.fieldIndex !== fieldIndex); const newState = Object.assign({}, state); - newState[formId] = Object.assign({}, state[formId], {errors}); + newState[formId] = Object.assign({}, state[formId], { errors }); return newState; } else { return state; @@ -123,7 +123,7 @@ function clearsFormErrors(state: FormState, action: FormClearErrorsAction) { if (hasValue(state[formId])) { const errors = []; const newState = Object.assign({}, state); - newState[formId] = Object.assign({}, state[formId], {errors}); + newState[formId] = Object.assign({}, state[formId], { errors }); return newState; } else { return state; @@ -243,7 +243,7 @@ function changeTouchedState(state: FormState, action: FormAddTouchedAction): For const newForm = Object.assign({}, newState[action.payload.formId]); newState[action.payload.formId] = newForm; - newForm.touched = { ... newForm.touched}; + newForm.touched = { ... newForm.touched }; action.payload.touched.forEach((field) => newForm.touched[field] = true); return newState; diff --git a/src/app/shared/form/number-picker/number-picker.component.ts b/src/app/shared/form/number-picker/number-picker.component.ts index 66312a7d69..84eb21d3e2 100644 --- a/src/app/shared/form/number-picker/number-picker.component.ts +++ b/src/app/shared/form/number-picker/number-picker.component.ts @@ -20,7 +20,7 @@ import { isEmpty } from '../../empty.util'; styleUrls: ['./number-picker.component.scss'], templateUrl: './number-picker.component.html', providers: [ - {provide: NG_VALUE_ACCESSOR, useExisting: NumberPickerComponent, multi: true}, + { provide: NG_VALUE_ACCESSOR, useExisting: NumberPickerComponent, multi: true }, ], }) @@ -152,6 +152,6 @@ export class NumberPickerComponent implements OnInit, ControlValueAccessor { } emitChange() { - this.change.emit({field: this.name, value: this.value}); + this.change.emit({ field: this.name, value: this.value }); } } diff --git a/src/app/shared/menu/menu-item/link-menu-item.component.spec.ts b/src/app/shared/menu/menu-item/link-menu-item.component.spec.ts index 21dd2a531f..e92b725101 100644 --- a/src/app/shared/menu/menu-item/link-menu-item.component.spec.ts +++ b/src/app/shared/menu/menu-item/link-menu-item.component.spec.ts @@ -27,7 +27,7 @@ describe('LinkMenuItemComponent', () => { function init() { text = 'HELLO'; link = '/world/hello'; - queryParams = {params: true}; + queryParams = { params: true }; } beforeEach(waitForAsync(() => { diff --git a/src/app/shared/menu/menu.reducer.spec.ts b/src/app/shared/menu/menu.reducer.spec.ts index e2ec28edef..c0bbeff32b 100644 --- a/src/app/shared/menu/menu.reducer.spec.ts +++ b/src/app/shared/menu/menu.reducer.spec.ts @@ -1,7 +1,7 @@ // eslint-disable-next-line import/no-namespace import * as deepFreeze from 'deep-freeze'; -import { initialMenusState} from './initial-menus-state'; +import { initialMenusState } from './initial-menus-state'; import { ActivateMenuSectionAction, AddMenuSectionAction, diff --git a/src/app/shared/menu/menu.reducer.ts b/src/app/shared/menu/menu.reducer.ts index e25cb24acf..0b34ec0ad4 100644 --- a/src/app/shared/menu/menu.reducer.ts +++ b/src/app/shared/menu/menu.reducer.ts @@ -1,5 +1,5 @@ import { hasValue } from '../empty.util'; -import { initialMenusState} from './initial-menus-state'; +import { initialMenusState } from './initial-menus-state'; import { ActivateMenuSectionAction, AddMenuSectionAction, diff --git a/src/app/shared/menu/menu.service.spec.ts b/src/app/shared/menu/menu.service.spec.ts index ea44508bf0..4066ba28a6 100644 --- a/src/app/shared/menu/menu.service.spec.ts +++ b/src/app/shared/menu/menu.service.spec.ts @@ -186,11 +186,11 @@ describe('MenuService', () => { init(); TestBed.configureTestingModule({ imports: [ - StoreModule.forRoot({menus: menusReducer}, storeModuleConfig), + StoreModule.forRoot({ menus: menusReducer }, storeModuleConfig), ], providers: [ - provideMockStore({initialState}), - {provide: MenuService, useValue: service}, + provideMockStore({ initialState }), + { provide: MenuService, useValue: service }, ], }).compileComponents(); })); @@ -359,11 +359,11 @@ describe('MenuService', () => { }); it('should return false when no top-level sections are visible', () => { const noTopLevelVisibleSections = { - section: {id: 's1', visible: false}, - section_2: {id: 's2', visible: false}, - section_3: {id: 's3', visible: false}, - section_4: {id: 's1_1', visible: true, parentID: 's1'}, - section_5: {id: 's2_1', visible: true, parentID: 's2'}, + section: { id: 's1', visible: false }, + section_2: { id: 's2', visible: false }, + section_3: { id: 's3', visible: false }, + section_4: { id: 's1_1', visible: true, parentID: 's1' }, + section_5: { id: 's2_1', visible: true, parentID: 's2' }, }; const testMenu = { id: MenuID.ADMIN, @@ -388,11 +388,11 @@ describe('MenuService', () => { it('should return true when any top-level section is visible', () => { const noTopLevelVisibleSections = { - section: {id: 's1', visible: false}, - section_2: {id: 's2', visible: true}, - section_3: {id: 's3', visible: false}, - section_4: {id: 's1_1', visible: true, parentID: 's1'}, - section_5: {id: 's2_1', visible: true, parentID: 's2'}, + section: { id: 's1', visible: false }, + section_2: { id: 's2', visible: true }, + section_3: { id: 's3', visible: false }, + section_4: { id: 's1_1', visible: true, parentID: 's1' }, + section_5: { id: 's2_1', visible: true, parentID: 's2' }, }; const testMenu = { id: MenuID.ADMIN, diff --git a/src/app/shared/metadata-representation/metadata-representation-loader.component.ts b/src/app/shared/metadata-representation/metadata-representation-loader.component.ts index 2c0325f51f..8b63846643 100644 --- a/src/app/shared/metadata-representation/metadata-representation-loader.component.ts +++ b/src/app/shared/metadata-representation/metadata-representation-loader.component.ts @@ -59,7 +59,7 @@ export class MetadataRepresentationLoaderComponent implements OnInit, OnChanges /** * Directive to determine where the dynamic child component is located */ - @ViewChild(MetadataRepresentationDirective, {static: true}) mdRepDirective: MetadataRepresentationDirective; + @ViewChild(MetadataRepresentationDirective, { static: true }) mdRepDirective: MetadataRepresentationDirective; /** * The reference to the dynamic component diff --git a/src/app/shared/mocks/form-builder-service.mock.ts b/src/app/shared/mocks/form-builder-service.mock.ts index abdbf80053..46845dcb10 100644 --- a/src/app/shared/mocks/form-builder-service.mock.ts +++ b/src/app/shared/mocks/form-builder-service.mock.ts @@ -3,7 +3,7 @@ import { UntypedFormGroup, } from '@angular/forms'; -import {DsDynamicInputModel} from '../form/builder/ds-dynamic-form-ui/models/ds-dynamic-input.model'; +import { DsDynamicInputModel } from '../form/builder/ds-dynamic-form-ui/models/ds-dynamic-input.model'; import { FormBuilderService } from '../form/builder/form-builder.service'; export function getMockFormBuilderService(): FormBuilderService { @@ -40,7 +40,7 @@ export function getMockFormBuilderService(): FormBuilderService { metadataFields: ['dc.type'], hasSelectableMetadata: false, typeBindRelations: [ - {match: 'VISIBLE', operator: 'OR', when: [{id: 'dc.type', value: 'boundType'}]}, + { match: 'VISIBLE', operator: 'OR', when: [{ id: 'dc.type', value: 'boundType' }] }, ], }, ), diff --git a/src/app/shared/mocks/form-models.mock.ts b/src/app/shared/mocks/form-models.mock.ts index 603452e6e0..39fc3823b0 100644 --- a/src/app/shared/mocks/form-models.mock.ts +++ b/src/app/shared/mocks/form-models.mock.ts @@ -337,7 +337,7 @@ export const inputWithTypeBindConfig = { metadataFields: [], hasSelectableMetadata: false, typeBindRelations: [ - {match: 'VISIBLE', operator: 'OR', when: [{'id': 'dc.type', 'value': 'boundType'}]}, + { match: 'VISIBLE', operator: 'OR', when: [{ 'id': 'dc.type', 'value': 'boundType' }] }, ], }, ), diff --git a/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts index 812b1963a8..2350b526d3 100644 --- a/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts @@ -164,7 +164,7 @@ describe('ClaimedTaskActionsRejectComponent', () => { let expectedBody; beforeEach(() => { - spyOn((component.rejectForm as any), 'get').and.returnValue({value: 'required'}); + spyOn((component.rejectForm as any), 'get').and.returnValue({ value: 'required' }); expectedBody = { [component.option]: 'true', reason: 'required', diff --git a/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.ts b/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.ts index dc2493a507..c7cf03d31b 100644 --- a/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.ts @@ -62,7 +62,7 @@ export class ClaimedTaskActionsLoaderComponent implements OnInit, OnChanges { /** * Directive to determine where the dynamic child component is located */ - @ViewChild(ClaimedTaskActionsDirective, {static: true}) claimedTaskActionsDirective: ClaimedTaskActionsDirective; + @ViewChild(ClaimedTaskActionsDirective, { static: true }) claimedTaskActionsDirective: ClaimedTaskActionsDirective; /** * The reference to the dynamic component diff --git a/src/app/shared/mydspace-actions/mydspace-reloadable-actions.spec.ts b/src/app/shared/mydspace-actions/mydspace-reloadable-actions.spec.ts index 9dc308fc22..c408137f70 100644 --- a/src/app/shared/mydspace-actions/mydspace-reloadable-actions.spec.ts +++ b/src/app/shared/mydspace-actions/mydspace-reloadable-actions.spec.ts @@ -237,7 +237,7 @@ describe('MyDSpaceReloadableActionsComponent', () => { it('should emit the reloaded object in case of success', (done) => { component.startActionExecution().subscribe( (result) => { - expect(component.processCompleted.emit).toHaveBeenCalledWith({result: true, reloadedObject: result as any}); + expect(component.processCompleted.emit).toHaveBeenCalledWith({ result: true, reloadedObject: result as any }); done(); }); }); diff --git a/src/app/shared/mydspace-actions/mydspace-reloadable-actions.ts b/src/app/shared/mydspace-actions/mydspace-reloadable-actions.ts index 509c4679e9..28e3ac4040 100644 --- a/src/app/shared/mydspace-actions/mydspace-reloadable-actions.ts +++ b/src/app/shared/mydspace-actions/mydspace-reloadable-actions.ts @@ -104,7 +104,7 @@ export abstract class MyDSpaceReloadableActionsComponent { { provide: SearchService, useValue: searchService }, { provide: RequestService, useValue: requestServce }, { provide: AuthService, useValue: authService }, - { provide: AuthorizationDataService, useValue: authorizationService}, + { provide: AuthorizationDataService, useValue: authorizationService }, NgbModal, ], schemas: [NO_ERRORS_SCHEMA], diff --git a/src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.spec.ts b/src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.spec.ts index 0292eb2ad3..90b2f373a0 100644 --- a/src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.spec.ts +++ b/src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.spec.ts @@ -66,7 +66,7 @@ describe('ItemAccessStatusBadgeComponent', () => { declarations: [AccessStatusBadgeComponent, TruncatePipe], schemas: [NO_ERRORS_SCHEMA], providers: [ - {provide: AccessStatusDataService, useValue: accessStatusDataService}, + { provide: AccessStatusDataService, useValue: accessStatusDataService }, ], }).compileComponents(); } diff --git a/src/app/shared/object-collection/shared/badges/badges.component.spec.ts b/src/app/shared/object-collection/shared/badges/badges.component.spec.ts index ebc5d64d86..4f212f7f57 100644 --- a/src/app/shared/object-collection/shared/badges/badges.component.spec.ts +++ b/src/app/shared/object-collection/shared/badges/badges.component.spec.ts @@ -15,7 +15,7 @@ describe('BadgesComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [ BadgesComponent ], - providers: [{provide: ThemeService, useValue: getMockThemeService()}], + providers: [{ provide: ThemeService, useValue: getMockThemeService() }], schemas: [NO_ERRORS_SCHEMA], }) .compileComponents(); diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-task-search-result/claimed-task-search-result-detail-element.component.spec.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-task-search-result/claimed-task-search-result-detail-element.component.spec.ts index bc31b428b8..de13541916 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-task-search-result/claimed-task-search-result-detail-element.component.spec.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-task-search-result/claimed-task-search-result-detail-element.component.spec.ts @@ -117,7 +117,7 @@ describe('ClaimedTaskSearchResultDetailElementComponent', () => { it('should forward claimed-task-actions processComplete event to reloadObject event emitter', fakeAsync(() => { spyOn(component.reloadedObject, 'emit').and.callThrough(); - const actionPayload: any = { reloadedObject: {}}; + const actionPayload: any = { reloadedObject: {} }; const actionsComponent = fixture.debugElement.query(By.css('ds-claimed-task-actions')); actionsComponent.triggerEventHandler('processCompleted', actionPayload); diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/pool-search-result/pool-search-result-detail-element.component.spec.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/pool-search-result/pool-search-result-detail-element.component.spec.ts index db1d5f2dab..b7b229e6ad 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/pool-search-result/pool-search-result-detail-element.component.spec.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/pool-search-result/pool-search-result-detail-element.component.spec.ts @@ -119,7 +119,7 @@ describe('PoolSearchResultDetailElementComponent', () => { it('should forward pool-task-actions processCompleted event to the reloadedObject event emitter', fakeAsync(() => { spyOn(component.reloadedObject, 'emit').and.callThrough(); - const actionPayload: any = { reloadedObject: {}}; + const actionPayload: any = { reloadedObject: {} }; const actionsComponents = fixture.debugElement.query(By.css('ds-pool-task-actions')); actionsComponents.triggerEventHandler('processCompleted', actionPayload); tick(); diff --git a/src/app/shared/object-list/bitstream-list-item/bitstream-list-item.component.spec.ts b/src/app/shared/object-list/bitstream-list-item/bitstream-list-item.component.spec.ts index 1d70d598cb..fba72f8585 100644 --- a/src/app/shared/object-list/bitstream-list-item/bitstream-list-item.component.spec.ts +++ b/src/app/shared/object-list/bitstream-list-item/bitstream-list-item.component.spec.ts @@ -1,15 +1,15 @@ -import {CommonModule} from '@angular/common'; +import { CommonModule } from '@angular/common'; import { ComponentFixture, TestBed, } from '@angular/core/testing'; -import {RouterTestingModule} from '@angular/router/testing'; -import {TranslateModule} from '@ngx-translate/core'; +import { RouterTestingModule } from '@angular/router/testing'; +import { TranslateModule } from '@ngx-translate/core'; -import {DSONameService} from '../../../core/breadcrumbs/dso-name.service'; -import {DSONameServiceMock} from '../../mocks/dso-name.service.mock'; -import {SharedModule} from '../../shared.module'; -import {BitstreamListItemComponent} from './bitstream-list-item.component'; +import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { DSONameServiceMock } from '../../mocks/dso-name.service.mock'; +import { SharedModule } from '../../shared.module'; +import { BitstreamListItemComponent } from './bitstream-list-item.component'; describe('BitstreamListItemComponent', () => { let component: BitstreamListItemComponent; @@ -28,7 +28,7 @@ describe('BitstreamListItemComponent', () => { fixture = TestBed.createComponent(BitstreamListItemComponent); component = fixture.componentInstance; // @ts-ignore - component.object = {name: 'test'}; + component.object = { name: 'test' }; fixture.detectChanges(); }); diff --git a/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.spec.ts b/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.spec.ts index 5a3a98f86d..1919f6ad78 100644 --- a/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.spec.ts +++ b/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.spec.ts @@ -47,8 +47,8 @@ describe('BrowseEntryListElementComponent', () => { providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: 'objectElementProvider', useValue: { mockValue } }, - {provide: PaginationService, useValue: paginationService}, - {provide: RouteService, useValue: routeService}, + { provide: PaginationService, useValue: paginationService }, + { provide: RouteService, useValue: routeService }, ], schemas: [NO_ERRORS_SCHEMA], diff --git a/src/app/shared/object-list/identifier-data/identifier-data.model.ts b/src/app/shared/object-list/identifier-data/identifier-data.model.ts index b2968b3d78..a9e60c0175 100644 --- a/src/app/shared/object-list/identifier-data/identifier-data.model.ts +++ b/src/app/shared/object-list/identifier-data/identifier-data.model.ts @@ -8,7 +8,7 @@ import { HALLink } from 'src/app/core/shared/hal-link.model'; import { ResourceType } from 'src/app/core/shared/resource-type'; import { excludeFromEquals } from 'src/app/core/utilities/equals.decorators'; -import {Identifier} from './identifier.model'; +import { Identifier } from './identifier.model'; import { IDENTIFIERS } from './identifier-data.resource-type'; @typedObject diff --git a/src/app/shared/object-list/metadata-representation-list-element/browse-link/browse-link-metadata-list-element.component.ts b/src/app/shared/object-list/metadata-representation-list-element/browse-link/browse-link-metadata-list-element.component.ts index 4111130802..d206cbf459 100644 --- a/src/app/shared/object-list/metadata-representation-list-element/browse-link/browse-link-metadata-list-element.component.ts +++ b/src/app/shared/object-list/metadata-representation-list-element/browse-link/browse-link-metadata-list-element.component.ts @@ -22,9 +22,9 @@ export class BrowseLinkMetadataListElementComponent extends MetadataRepresentati * expects 'startsWith' (eg browse by date) or 'value' (eg browse by title) */ getQueryParams() { - const queryParams = {startsWith: this.mdRepresentation.getValue()}; + const queryParams = { startsWith: this.mdRepresentation.getValue() }; if (this.mdRepresentation.browseDefinition.getRenderType() === VALUE_LIST_BROWSE_DEFINITION.value) { - return {value: this.mdRepresentation.getValue()}; + return { value: this.mdRepresentation.getValue() }; } return queryParams; } diff --git a/src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.ts b/src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.ts index e023eb42cc..f6e9ca6930 100644 --- a/src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.ts +++ b/src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.ts @@ -22,9 +22,9 @@ export class PlainTextMetadataListElementComponent extends MetadataRepresentatio * expects 'startsWith' (eg browse by date) or 'value' (eg browse by title) */ getQueryParams() { - const queryParams = {startsWith: this.mdRepresentation.getValue()}; + const queryParams = { startsWith: this.mdRepresentation.getValue() }; if (this.mdRepresentation.browseDefinition.getRenderType() === VALUE_LIST_BROWSE_DEFINITION.value) { - return {value: this.mdRepresentation.getValue()}; + return { value: this.mdRepresentation.getValue() }; } return queryParams; } diff --git a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.spec.ts index d5c3f20898..920e27fefa 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.spec.ts @@ -120,7 +120,7 @@ describe('ClaimedSearchResultListElementComponent', () => { it('should forward claimed-task-actions processComplete event to reloadObject event emitter', fakeAsync(() => { spyOn(component.reloadedObject, 'emit').and.callThrough(); - const actionPayload: any = { reloadedObject: {}}; + const actionPayload: any = { reloadedObject: {} }; const actionsComponent = fixture.debugElement.query(By.css('ds-claimed-task-actions')); actionsComponent.triggerEventHandler('processCompleted', actionPayload); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component.spec.ts index 77af66bb91..ae6c4b46a8 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component.spec.ts @@ -102,7 +102,7 @@ describe('ItemListPreviewComponent', () => { ], declarations: [ItemListPreviewComponent, TruncatePipe], providers: [ - { provide: 'objectElementProvider', useValue: { mockItemWithAuthorAndDate }}, + { provide: 'objectElementProvider', useValue: { mockItemWithAuthorAndDate } }, { provide: APP_CONFIG, useValue: environmentUseThumbs }, ], @@ -208,13 +208,13 @@ describe('ItemListPreviewComponent', () => { ], declarations: [ItemListPreviewComponent, TruncatePipe], providers: [ - {provide: 'objectElementProvider', useValue: {mockItemWithAuthorAndDate}}, - {provide: APP_CONFIG, useValue: enviromentNoThumbs}, + { provide: 'objectElementProvider', useValue: { mockItemWithAuthorAndDate } }, + { provide: APP_CONFIG, useValue: enviromentNoThumbs }, ], schemas: [NO_ERRORS_SCHEMA], }).overrideComponent(ItemListPreviewComponent, { - set: {changeDetection: ChangeDetectionStrategy.Default}, + set: { changeDetection: ChangeDetectionStrategy.Default }, }).compileComponents(); })); beforeEach(waitForAsync(() => { diff --git a/src/app/shared/object-list/my-dspace-result-list-element/item-search-result/item-search-result-list-element-submission.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/item-search-result/item-search-result-list-element-submission.component.spec.ts index 0e757ea234..35165e0639 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/item-search-result/item-search-result-list-element-submission.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/item-search-result/item-search-result-list-element-submission.component.spec.ts @@ -91,7 +91,7 @@ describe('ItemMyDSpaceResultListElementComponent', () => { it('should forward item-actions processComplete event to reloadObject event emitter', fakeAsync(() => { spyOn(component.reloadedObject, 'emit').and.callThrough(); - const actionPayload: any = { reloadedObject: {}}; + const actionPayload: any = { reloadedObject: {} }; const actionsComponent = fixture.debugElement.query(By.css('ds-item-actions')); actionsComponent.triggerEventHandler('processCompleted', actionPayload); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.spec.ts index 168cf8fec2..1e68e61652 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.spec.ts @@ -126,7 +126,7 @@ describe('PoolSearchResultListElementComponent', () => { it('should forward pool-task-actions processCompleted event to the reloadedObject event emitter', fakeAsync(() => { spyOn(component.reloadedObject, 'emit').and.callThrough(); - const actionPayload: any = { reloadedObject: {}}; + const actionPayload: any = { reloadedObject: {} }; const actionsComponents = fixture.debugElement.query(By.css('ds-pool-task-actions')); actionsComponents.triggerEventHandler('processCompleted', actionPayload); tick(); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.spec.ts index 8facd43444..17e286935a 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.spec.ts @@ -119,7 +119,7 @@ describe('WorkflowItemSearchResultListElementComponent', () => { it('should forward workflowitem-actions processCompleted event to the reloadedObject event emitter', fakeAsync(() => { spyOn(component.reloadedObject, 'emit').and.callThrough(); - const actionPayload: any = { reloadedObject: {}}; + const actionPayload: any = { reloadedObject: {} }; const actionsComponent = fixture.debugElement.query(By.css('ds-workflowitem-actions')); actionsComponent.triggerEventHandler('processCompleted', actionPayload); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.spec.ts index 1fd5de3b64..cb585f719d 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.spec.ts @@ -119,7 +119,7 @@ describe('WorkspaceItemSearchResultListElementComponent', () => { it('should forward workspaceitem-actions processCompleted event to the reloadedObject event emitter', fakeAsync(() => { spyOn(component.reloadedObject, 'emit').and.callThrough(); - const actionPayload: any = { reloadedObject: {}}; + const actionPayload: any = { reloadedObject: {} }; const actionsComponent = fixture.debugElement.query(By.css('ds-workspaceitem-actions')); actionsComponent.triggerEventHandler('processCompleted', actionPayload); diff --git a/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.spec.ts b/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.spec.ts index f4145add95..c28d63c79c 100644 --- a/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.spec.ts @@ -383,14 +383,14 @@ describe('ItemSearchResultListElementComponent', () => { TestBed.configureTestingModule({ declarations: [ItemSearchResultListElementComponent, TruncatePipe], providers: [ - {provide: TruncatableService, useValue: {}}, - {provide: DSONameService, useClass: DSONameServiceMock}, + { provide: TruncatableService, useValue: {} }, + { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: enviromentNoThumbs }, ], schemas: [NO_ERRORS_SCHEMA], }).overrideComponent(ItemSearchResultListElementComponent, { - set: {changeDetection: ChangeDetectionStrategy.Default}, + set: { changeDetection: ChangeDetectionStrategy.Default }, }).compileComponents(); })); diff --git a/src/app/shared/page-size-selector/page-size-selector.component.ts b/src/app/shared/page-size-selector/page-size-selector.component.ts index 73dcec1310..fe17095afc 100644 --- a/src/app/shared/page-size-selector/page-size-selector.component.ts +++ b/src/app/shared/page-size-selector/page-size-selector.component.ts @@ -57,7 +57,7 @@ export class PageSizeSelectorComponent implements OnInit { this.paginationOptions$.pipe( take(1), ).subscribe((pagination: PaginationComponentOptions) => { - this.paginationService.updateRoute(pagination.id, {page: 1, pageSize: +value}); + this.paginationService.updateRoute(pagination.id, { page: 1, pageSize: +value }); }) ; } } diff --git a/src/app/shared/pagination/pagination.component.spec.ts b/src/app/shared/pagination/pagination.component.spec.ts index 4b9892e3d7..af15b32039 100644 --- a/src/app/shared/pagination/pagination.component.spec.ts +++ b/src/app/shared/pagination/pagination.component.spec.ts @@ -223,12 +223,12 @@ describe('Pagination component', () => { testFixture.detectChanges(); - currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, {currentPage: 3})); + currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, { currentPage: 3 })); testFixture.detectChanges(); expectPages(testFixture, ['« Previous', '1', '2', '+3', '-» Next']); - currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, {currentPage: 2})); + currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, { currentPage: 2 })); testFixture.detectChanges(); expectPages(testFixture, ['« Previous', '1', '+2', '3', '» Next']); @@ -252,16 +252,16 @@ describe('Pagination component', () => { testFixture.detectChanges(); expectPages(testFixture, ['-« Previous', '+1', '2', '3', '» Next']); - currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, {pageSize: 5})); + currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, { pageSize: 5 })); testFixture.detectChanges(); expectPages(testFixture, ['-« Previous', '+1', '2', '3', '4', '5', '6', '» Next']); - currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, {pageSize: 10})); + currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, { pageSize: 10 })); testFixture.detectChanges(); expectPages(testFixture, ['-« Previous', '+1', '2', '3', '» Next']); - currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, {pageSize: 20})); + currentPagination.next(Object.assign(new PaginationComponentOptions(), pagination, { pageSize: 20 })); testFixture.detectChanges(); expectPages(testFixture, ['-« Previous', '+1', '2', '» Next']); }); @@ -282,11 +282,11 @@ describe('Pagination component', () => { changePage(testFixture, 3); tick(); - expect(paginationService.updateRoute).toHaveBeenCalledWith('test', Object.assign({ page: '3'}), {}, false); + expect(paginationService.updateRoute).toHaveBeenCalledWith('test', Object.assign({ page: '3' }), {}, false); changePage(testFixture, 0); tick(); - expect(paginationService.updateRoute).toHaveBeenCalledWith('test', Object.assign({ page: '2'}), {}, false); + expect(paginationService.updateRoute).toHaveBeenCalledWith('test', Object.assign({ page: '2' }), {}, false); })); it('should set correct pageSize route parameters', fakeAsync(() => { @@ -296,7 +296,7 @@ describe('Pagination component', () => { changePageSize(testFixture, '20'); tick(); - expect(paginationService.updateRoute).toHaveBeenCalledWith('test', Object.assign({ pageId: 'test', page: 1, pageSize: 20}), {}, false); + expect(paginationService.updateRoute).toHaveBeenCalledWith('test', Object.assign({ pageId: 'test', page: 1, pageSize: 20 }), {}, false); })); it('should respond to windows resize', () => { diff --git a/src/app/shared/pagination/pagination.component.ts b/src/app/shared/pagination/pagination.component.ts index 7628dafdb1..d020a4a5d2 100644 --- a/src/app/shared/pagination/pagination.component.ts +++ b/src/app/shared/pagination/pagination.component.ts @@ -283,7 +283,7 @@ export class PaginationComponent implements OnDestroy, OnInit { * The page being navigated to. */ public doPageChange(page: number) { - this.updateParams({page: page}); + this.updateParams({ page: page }); this.emitPaginationChange(); } @@ -352,7 +352,7 @@ export class PaginationComponent implements OnDestroy, OnInit { } else { lastItem = collectionSize; } - return {range: firstItem + ' - ' + lastItem, total: collectionSize}; + return { range: firstItem + ' - ' + lastItem, total: collectionSize }; }), ); } diff --git a/src/app/shared/pagination/paginationChangeEvent.interface.ts b/src/app/shared/pagination/paginationChangeEvent.interface.ts index ec5df1cddc..a6b10f9cff 100644 --- a/src/app/shared/pagination/paginationChangeEvent.interface.ts +++ b/src/app/shared/pagination/paginationChangeEvent.interface.ts @@ -1,5 +1,5 @@ -import {SortOptions} from '../../core/cache/models/sort-options.model'; -import {PaginationComponentOptions} from './pagination-component-options.model'; +import { SortOptions } from '../../core/cache/models/sort-options.model'; +import { PaginationComponentOptions } from './pagination-component-options.model'; /** diff --git a/src/app/shared/sass-helper/css-variable.actions.ts b/src/app/shared/sass-helper/css-variable.actions.ts index 3e00e9062d..f8b135a959 100644 --- a/src/app/shared/sass-helper/css-variable.actions.ts +++ b/src/app/shared/sass-helper/css-variable.actions.ts @@ -26,7 +26,7 @@ export class AddCSSVariableAction implements Action { }; constructor(name: string, value: string) { - this.payload = {name, value}; + this.payload = { name, value }; } } export class AddAllCSSVariablesAction implements Action { diff --git a/src/app/shared/sass-helper/css-variable.reducer.ts b/src/app/shared/sass-helper/css-variable.reducer.ts index 55484ee734..15bb179fb1 100644 --- a/src/app/shared/sass-helper/css-variable.reducer.ts +++ b/src/app/shared/sass-helper/css-variable.reducer.ts @@ -22,7 +22,7 @@ export function cssVariablesReducer(state = initialState, action: CSSVariableAct return Object.assign({}, state, { [variable.name]: variable.value }); } case CSSVariableActionTypes.ADD_ALL: { const variables = action.payload; - return Object.assign({}, state, ...variables.map(({ key, value }: KeyValuePair) => {return {[key]: value};})); + return Object.assign({}, state, ...variables.map(({ key, value }: KeyValuePair) => {return { [key]: value };})); } case CSSVariableActionTypes.CLEAR: { return initialState; } diff --git a/src/app/shared/search/search-export-csv/search-export-csv.component.spec.ts b/src/app/shared/search/search-export-csv/search-export-csv.component.spec.ts index 628ebcd845..1172db80de 100644 --- a/src/app/shared/search/search-export-csv/search-export-csv.component.spec.ts +++ b/src/app/shared/search/search-export-csv/search-export-csv.component.spec.ts @@ -33,8 +33,8 @@ describe('SearchExportCsvComponent', () => { let notificationsService; let router; - const script = Object.assign(new Script(), {id: 'metadata-export-search', name: 'metadata-export-search'}); - const process = Object.assign(new Process(), {processId: 5, scriptName: 'metadata-export-search'}); + const script = Object.assign(new Script(), { id: 'metadata-export-search', name: 'metadata-export-search' }); + const process = Object.assign(new Process(), { processId: 5, scriptName: 'metadata-export-search' }); const searchConfig = new PaginatedSearchOptions({ configuration: 'test-configuration', @@ -63,10 +63,10 @@ describe('SearchExportCsvComponent', () => { declarations: [SearchExportCsvComponent], imports: [TranslateModule.forRoot(), NgbModule], providers: [ - {provide: ScriptDataService, useValue: scriptDataService}, - {provide: AuthorizationDataService, useValue: authorizationDataService}, - {provide: NotificationsService, useValue: notificationsService}, - {provide: Router, useValue: router}, + { provide: ScriptDataService, useValue: scriptDataService }, + { provide: AuthorizationDataService, useValue: authorizationDataService }, + { provide: NotificationsService, useValue: notificationsService }, + { provide: Router, useValue: router }, ], }).compileComponents(); } @@ -140,13 +140,13 @@ describe('SearchExportCsvComponent', () => { component.export(); expect(scriptDataService.invoke).toHaveBeenCalledWith('metadata-export-search', [ - {name: '-q', value: searchConfig.query}, - {name: '-s', value: searchConfig.scope}, - {name: '-c', value: searchConfig.configuration}, - {name: '-f', value: 'filter1,equals=filter1value1'}, - {name: '-f', value: 'filter1,equals=filter1value2'}, - {name: '-f', value: 'filter2,contains=filter2value1'}, - {name: '-f', value: 'filter3,equals=[2000 TO 2001]'}, + { name: '-q', value: searchConfig.query }, + { name: '-s', value: searchConfig.scope }, + { name: '-c', value: searchConfig.configuration }, + { name: '-f', value: 'filter1,equals=filter1value1' }, + { name: '-f', value: 'filter1,equals=filter1value2' }, + { name: '-f', value: 'filter2,contains=filter2value1' }, + { name: '-f', value: 'filter3,equals=[2000 TO 2001]' }, ], []); component.searchConfig = null; diff --git a/src/app/shared/search/search-export-csv/search-export-csv.component.ts b/src/app/shared/search/search-export-csv/search-export-csv.component.ts index e63b59359a..33a1448adf 100644 --- a/src/app/shared/search/search-export-csv/search-export-csv.component.ts +++ b/src/app/shared/search/search-export-csv/search-export-csv.component.ts @@ -78,13 +78,13 @@ export class SearchExportCsvComponent implements OnInit { const parameters = []; if (hasValue(this.searchConfig)) { if (isNotEmpty(this.searchConfig.query)) { - parameters.push({name: '-q', value: this.searchConfig.query}); + parameters.push({ name: '-q', value: this.searchConfig.query }); } if (isNotEmpty(this.searchConfig.scope)) { - parameters.push({name: '-s', value: this.searchConfig.scope}); + parameters.push({ name: '-s', value: this.searchConfig.scope }); } if (isNotEmpty(this.searchConfig.configuration)) { - parameters.push({name: '-c', value: this.searchConfig.configuration}); + parameters.push({ name: '-c', value: this.searchConfig.configuration }); } if (isNotEmpty(this.searchConfig.filters)) { this.searchConfig.filters.forEach((filter) => { @@ -100,7 +100,7 @@ export class SearchExportCsvComponent implements OnInit { filterValue = value.substring(0, value.lastIndexOf(',')); } const valueToAdd = `${filter.key.substring(2)},${operator}=${filterValue}`; - parameters.push({name: '-f', value: valueToAdd}); + parameters.push({ name: '-f', value: valueToAdd }); }); } }); diff --git a/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.spec.ts b/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.spec.ts index 577bc43a55..3a2d2f4e21 100644 --- a/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.spec.ts +++ b/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.spec.ts @@ -38,7 +38,7 @@ import { VocabularyService } from '../../../../../core/submission/vocabularies/v import { SEARCH_CONFIG_SERVICE } from '../../../../../my-dspace-page/my-dspace-page.component'; import { RouterStub } from '../../../../testing/router.stub'; import { SearchConfigurationServiceStub } from '../../../../testing/search-configuration-service.stub'; -import { FacetValue} from '../../../models/facet-value.model'; +import { FacetValue } from '../../../models/facet-value.model'; import { SearchFilterConfig } from '../../../models/search-filter-config.model'; import { SearchHierarchyFilterComponent } from './search-hierarchy-filter.component'; @@ -90,7 +90,7 @@ describe('SearchHierarchyFilterComponent', () => { { provide: SEARCH_CONFIG_SERVICE, useValue: new SearchConfigurationServiceStub() }, { provide: IN_PLACE_SEARCH, useValue: false }, { provide: FILTER_CONFIG, useValue: Object.assign(new SearchFilterConfig(), { name: testSearchFilter }) }, - { provide: REFRESH_FILTER, useValue: new BehaviorSubject(false)}, + { provide: REFRESH_FILTER, useValue: new BehaviorSubject(false) }, ], schemas: [NO_ERRORS_SCHEMA], }).compileComponents(); diff --git a/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.ts b/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.ts index 5fd1c96ca4..4ad88cc72c 100644 --- a/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.ts +++ b/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.ts @@ -118,7 +118,7 @@ export class SearchHierarchyFilterComponent extends SearchFacetFilterComponent i [this.searchService.getSearchLink()], { queryParams: { - [this.filterConfig.paramName]: [...selectedValues, {value: detail.value}] + [this.filterConfig.paramName]: [...selectedValues, { value: detail.value }] .map((facetValue: FacetValue) => getFacetValueForType(facetValue, this.filterConfig)), }, queryParamsHandling: 'merge', diff --git a/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.ts b/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.ts index 7e536b0b48..2493a627cb 100644 --- a/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.ts +++ b/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.ts @@ -70,7 +70,7 @@ export class SearchSwitchConfigurationComponent implements OnDestroy, OnInit { ngOnInit() { this.searchConfigService.getCurrentConfiguration(this.defaultConfiguration) .subscribe((currentConfiguration) => { - const index = findIndex(this.configurationList, {value: currentConfiguration }); + const index = findIndex(this.configurationList, { value: currentConfiguration }); this.selectedOption = this.configurationList[index]; }); } @@ -80,7 +80,7 @@ export class SearchSwitchConfigurationComponent implements OnDestroy, OnInit { */ onSelect() { const navigationExtras: NavigationExtras = { - queryParams: {configuration: this.selectedOption.value}, + queryParams: { configuration: this.selectedOption.value }, }; this.changeConfiguration.emit(this.selectedOption); diff --git a/src/app/shared/search/search.component.spec.ts b/src/app/shared/search/search.component.spec.ts index 29c0095bbc..bbd4f875ab 100644 --- a/src/app/shared/search/search.component.spec.ts +++ b/src/app/shared/search/search.component.spec.ts @@ -212,7 +212,7 @@ export function configureSearchComponentTestingModule(compType, additionalDeclar }), })); }); - searchConfigurationServiceStub.paginatedSearchOptions = new BehaviorSubject(new PaginatedSearchOptions({pagination: {id: 'default'} as any})); + searchConfigurationServiceStub.paginatedSearchOptions = new BehaviorSubject(new PaginatedSearchOptions({ pagination: { id: 'default' } as any })); TestBed.configureTestingModule({ imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, NgbCollapseModule], diff --git a/src/app/shared/starts-with/date/starts-with-date.component.spec.ts b/src/app/shared/starts-with/date/starts-with-date.component.spec.ts index 61197ed47c..0f7e97f1b4 100644 --- a/src/app/shared/starts-with/date/starts-with-date.component.spec.ts +++ b/src/app/shared/starts-with/date/starts-with-date.component.spec.ts @@ -107,7 +107,7 @@ describe('StartsWithDateComponent', () => { }); it('should add a startsWith query parameter', () => { - expect(paginationService.updateRoute).toHaveBeenCalledWith('page-id', {page: 1}, {startsWith: expectedValue}); + expect(paginationService.updateRoute).toHaveBeenCalledWith('page-id', { page: 1 }, { startsWith: expectedValue }); }); it('should automatically fill in the input field', () => { @@ -129,7 +129,7 @@ describe('StartsWithDateComponent', () => { }); it('should add a startsWith query parameter', () => { - expect(paginationService.updateRoute).toHaveBeenCalledWith('page-id', {page: 1}, {startsWith: expectedValue}); + expect(paginationService.updateRoute).toHaveBeenCalledWith('page-id', { page: 1 }, { startsWith: expectedValue }); }); it('should automatically fill in the input field', () => { @@ -153,7 +153,7 @@ describe('StartsWithDateComponent', () => { }); it('should add a startsWith query parameter', () => { - expect(paginationService.updateRoute).toHaveBeenCalledWith('page-id', {page: 1}, {startsWith: expectedValue}); + expect(paginationService.updateRoute).toHaveBeenCalledWith('page-id', { page: 1 }, { startsWith: expectedValue }); }); it('should automatically fill in the input field', () => { @@ -182,7 +182,7 @@ describe('StartsWithDateComponent', () => { }); it('should add a startsWith query parameter', () => { - expect(paginationService.updateRoute).toHaveBeenCalledWith('page-id', {page: 1}, {startsWith: expectedValue}); + expect(paginationService.updateRoute).toHaveBeenCalledWith('page-id', { page: 1 }, { startsWith: expectedValue }); }); }); diff --git a/src/app/shared/starts-with/starts-with-abstract.component.ts b/src/app/shared/starts-with/starts-with-abstract.component.ts index e637036c23..0a4461ac87 100644 --- a/src/app/shared/starts-with/starts-with-abstract.component.ts +++ b/src/app/shared/starts-with/starts-with-abstract.component.ts @@ -92,7 +92,7 @@ export abstract class StartsWithAbstractComponent implements OnInit, OnDestroy { this.startsWith = undefined; } if (resetPage) { - this.paginationService.updateRoute(this.paginationId, {page: 1}, { startsWith: this.startsWith }); + this.paginationService.updateRoute(this.paginationId, { page: 1 }, { startsWith: this.startsWith }); } else { this.router.navigate([], { queryParams: Object.assign({ startsWith: this.startsWith }), diff --git a/src/app/shared/starts-with/text/starts-with-text.component.spec.ts b/src/app/shared/starts-with/text/starts-with-text.component.spec.ts index bafdcd583a..358786a7d3 100644 --- a/src/app/shared/starts-with/text/starts-with-text.component.spec.ts +++ b/src/app/shared/starts-with/text/starts-with-text.component.spec.ts @@ -71,7 +71,7 @@ describe('StartsWithTextComponent', () => { }); it('should add a startsWith query parameter', () => { - expect(paginationService.updateRoute).toHaveBeenCalledWith('page-id', {page: 1}, {startsWith: expectedValue}); + expect(paginationService.updateRoute).toHaveBeenCalledWith('page-id', { page: 1 }, { startsWith: expectedValue }); }); }); diff --git a/src/app/shared/testing/group-mock.ts b/src/app/shared/testing/group-mock.ts index 0c82dd5afa..599afaa20d 100644 --- a/src/app/shared/testing/group-mock.ts +++ b/src/app/shared/testing/group-mock.ts @@ -20,7 +20,7 @@ export const GroupMock2: Group = Object.assign(new Group(), { id: 'testgroupid2', uuid: 'testgroupid2', type: 'group', - object: createSuccessfulRemoteDataObject$({ name: 'testgroupid2objectName'}), + object: createSuccessfulRemoteDataObject$({ name: 'testgroupid2objectName' }), }); export const GroupMock: Group = Object.assign(new Group(), { diff --git a/src/app/shared/testing/pagination-service.stub.ts b/src/app/shared/testing/pagination-service.stub.ts index 57ce101d33..8755adc759 100644 --- a/src/app/shared/testing/pagination-service.stub.ts +++ b/src/app/shared/testing/pagination-service.stub.ts @@ -10,9 +10,9 @@ import { PaginationComponentOptions } from '../pagination/pagination-component-o export class PaginationServiceStub { constructor( - public pagination = Object.assign(new PaginationComponentOptions(), {currentPage: 1, pageSize: 20}), + public pagination = Object.assign(new PaginationComponentOptions(), { currentPage: 1, pageSize: 20 }), public sort = new SortOptions('score', SortDirection.DESC), - public findlistOptions = Object.assign(new FindListOptions(), {currentPage: 1, elementsPerPage: 20}), + public findlistOptions = Object.assign(new FindListOptions(), { currentPage: 1, elementsPerPage: 20 }), ) { } diff --git a/src/app/shared/testing/router.stub.ts b/src/app/shared/testing/router.stub.ts index ac92ae102e..4e7b0e460b 100644 --- a/src/app/shared/testing/router.stub.ts +++ b/src/app/shared/testing/router.stub.ts @@ -2,7 +2,7 @@ import { of as observableOf } from 'rxjs'; export class RouterStub { url: string; - routeReuseStrategy = {shouldReuseRoute: {}}; + routeReuseStrategy = { shouldReuseRoute: {} }; //noinspection TypeScriptUnresolvedFunction navigate = jasmine.createSpy('navigate'); parseUrl = jasmine.createSpy('parseUrl'); diff --git a/src/app/shared/testing/search-configuration-service.stub.ts b/src/app/shared/testing/search-configuration-service.stub.ts index 684e40b44c..57587b1718 100644 --- a/src/app/shared/testing/search-configuration-service.stub.ts +++ b/src/app/shared/testing/search-configuration-service.stub.ts @@ -37,7 +37,7 @@ export class SearchConfigurationServiceStub { } getAvailableConfigurationOptions() { - return observableOf([{value: 'test', label: 'test'}]); + return observableOf([{ value: 'test', label: 'test' }]); } getConfigurationSearchConfigObservable() { diff --git a/src/app/shared/testing/sidebar-service.stub.ts b/src/app/shared/testing/sidebar-service.stub.ts index 8a73532f42..d10eb71227 100644 --- a/src/app/shared/testing/sidebar-service.stub.ts +++ b/src/app/shared/testing/sidebar-service.stub.ts @@ -1,4 +1,4 @@ -import {of as observableOf } from 'rxjs'; +import { of as observableOf } from 'rxjs'; export class SidebarServiceStub { isCollapsed = observableOf(true); diff --git a/src/app/shared/trackable/abstract-trackable.component.ts b/src/app/shared/trackable/abstract-trackable.component.ts index e5015a8d1c..de1bb7a841 100644 --- a/src/app/shared/trackable/abstract-trackable.component.ts +++ b/src/app/shared/trackable/abstract-trackable.component.ts @@ -35,7 +35,7 @@ export class AbstractTrackableComponent { * Shows a notification to remind the user that they can undo this */ discard() { - const undoNotification = this.notificationsService.info(this.getNotificationTitle('discarded'), this.getNotificationContent('discarded'), {timeOut: this.discardTimeOut}); + const undoNotification = this.notificationsService.info(this.getNotificationTitle('discarded'), this.getNotificationContent('discarded'), { timeOut: this.discardTimeOut }); this.objectUpdatesService.discardFieldUpdates(this.url, undoNotification); } diff --git a/src/app/shared/truncatable/truncatable-part/truncatable-part.component.ts b/src/app/shared/truncatable/truncatable-part/truncatable-part.component.ts index f7d62ead37..f07fc9a601 100644 --- a/src/app/shared/truncatable/truncatable-part/truncatable-part.component.ts +++ b/src/app/shared/truncatable/truncatable-part/truncatable-part.component.ts @@ -58,7 +58,7 @@ export class TruncatablePartComponent implements AfterViewChecked, OnInit, OnDes /** * The view on the truncatable part */ - @ViewChild('content', {static: true}) content: ElementRef; + @ViewChild('content', { static: true }) content: ElementRef; /** * Current amount of lines shown of this part diff --git a/src/app/shared/truncatable/truncatable.reducer.ts b/src/app/shared/truncatable/truncatable.reducer.ts index 7cf7fc653f..661e80d830 100644 --- a/src/app/shared/truncatable/truncatable.reducer.ts +++ b/src/app/shared/truncatable/truncatable.reducer.ts @@ -43,7 +43,7 @@ export function truncatableReducer(state = initialState, action: TruncatableActi }); } case TruncatableActionTypes.TOGGLE: { if (!state[action.id]) { - state[action.id] = {collapsed: false}; + state[action.id] = { collapsed: false }; } return Object.assign({}, state, { [action.id]: { diff --git a/src/app/shared/utils/file-value-accessor.directive.ts b/src/app/shared/utils/file-value-accessor.directive.ts index 5cafe86cd9..95c76b2484 100644 --- a/src/app/shared/utils/file-value-accessor.directive.ts +++ b/src/app/shared/utils/file-value-accessor.directive.ts @@ -1,4 +1,4 @@ -import {Directive} from '@angular/core'; +import { Directive } from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR, diff --git a/src/app/shared/utils/object-keys-pipe.ts b/src/app/shared/utils/object-keys-pipe.ts index d016b22e67..095e076b8e 100644 --- a/src/app/shared/utils/object-keys-pipe.ts +++ b/src/app/shared/utils/object-keys-pipe.ts @@ -3,7 +3,7 @@ import { PipeTransform, } from '@angular/core'; -@Pipe({name: 'dsObjectKeys'}) +@Pipe({ name: 'dsObjectKeys' }) /** * Pipe for parsing all keys of an object to an array of key-value pairs */ diff --git a/src/app/shared/utils/object-ngfor.pipe.ts b/src/app/shared/utils/object-ngfor.pipe.ts index 51fcda31a2..0e2d65b43e 100644 --- a/src/app/shared/utils/object-ngfor.pipe.ts +++ b/src/app/shared/utils/object-ngfor.pipe.ts @@ -16,6 +16,6 @@ import { }) export class ObjNgFor implements PipeTransform { transform(value: any, args: any[] = null): any { - return Object.keys(value).map((key) => Object.assign({ key }, {value: value[key]})); + return Object.keys(value).map((key) => Object.assign({ key }, { value: value[key] })); } } diff --git a/src/app/shared/utils/require-file.validator.ts b/src/app/shared/utils/require-file.validator.ts index 24d75d268d..c4ec59e160 100644 --- a/src/app/shared/utils/require-file.validator.ts +++ b/src/app/shared/utils/require-file.validator.ts @@ -1,4 +1,4 @@ -import {Directive} from '@angular/core'; +import { Directive } from '@angular/core'; import { NG_VALIDATORS, UntypedFormControl, diff --git a/src/app/shared/utils/short-number.pipe.ts b/src/app/shared/utils/short-number.pipe.ts index 7f66ac2efc..dc06e7f52a 100644 --- a/src/app/shared/utils/short-number.pipe.ts +++ b/src/app/shared/utils/short-number.pipe.ts @@ -23,11 +23,11 @@ export class ShortNumberPipe implements PipeTransform { let key = ''; const powers = [ - {key: 'Q', value: Math.pow(10, 15)}, - {key: 'T', value: Math.pow(10, 12)}, - {key: 'B', value: Math.pow(10, 9)}, - {key: 'M', value: Math.pow(10, 6)}, - {key: 'K', value: 1000}, + { key: 'Q', value: Math.pow(10, 15) }, + { key: 'T', value: Math.pow(10, 12) }, + { key: 'B', value: Math.pow(10, 9) }, + { key: 'M', value: Math.pow(10, 6) }, + { key: 'K', value: 1000 }, ]; for (let i = 0; i < powers.length; i++) { diff --git a/src/app/statistics/angulartics/dspace-provider.spec.ts b/src/app/statistics/angulartics/dspace-provider.spec.ts index 51bec665b2..80176c3e94 100644 --- a/src/app/statistics/angulartics/dspace-provider.spec.ts +++ b/src/app/statistics/angulartics/dspace-provider.spec.ts @@ -12,13 +12,13 @@ describe('Angulartics2DSpace', () => { beforeEach(() => { angulartics2 = { - eventTrack: observableOf({action: 'page_view', properties: { + eventTrack: observableOf({ action: 'page_view', properties: { object: 'mock-object', referrer: 'https://www.referrer.com', - }}), + } }), filterDeveloperMode: () => filter(() => true), } as any; - statisticsService = jasmine.createSpyObj('statisticsService', {trackViewEvent: null}); + statisticsService = jasmine.createSpyObj('statisticsService', { trackViewEvent: null }); provider = new Angulartics2DSpace(angulartics2, statisticsService); }); diff --git a/src/app/statistics/angulartics/dspace-provider.ts b/src/app/statistics/angulartics/dspace-provider.ts index 6be5bbe5cf..c8cc05e739 100644 --- a/src/app/statistics/angulartics/dspace-provider.ts +++ b/src/app/statistics/angulartics/dspace-provider.ts @@ -6,7 +6,7 @@ import { StatisticsService } from '../statistics.service'; /** * Angulartics2DSpace is a angulartics2 plugin that provides DSpace with the events. */ -@Injectable({providedIn: 'root'}) +@Injectable({ providedIn: 'root' }) export class Angulartics2DSpace { constructor( diff --git a/src/app/statistics/statistics.service.spec.ts b/src/app/statistics/statistics.service.spec.ts index 522e5d0e99..ff57e31970 100644 --- a/src/app/statistics/statistics.service.spec.ts +++ b/src/app/statistics/statistics.service.spec.ts @@ -26,7 +26,7 @@ describe('StatisticsService', () => { service = initTestService(); it('should send a request to track an item view ', () => { - const mockItem: any = {uuid: 'mock-item-uuid', type: 'item'}; + const mockItem: any = { uuid: 'mock-item-uuid', type: 'item' }; service.trackViewEvent(mockItem, 'https://www.referrer.com'); const request: RestRequest = requestService.send.calls.mostRecent().args[0]; expect(request.body).toBeDefined('request.body'); @@ -51,7 +51,7 @@ describe('StatisticsService', () => { totalPages: 25, number: 4, }; - const sort = {by: 'search-field', order: 'ASC'}; + const sort = { by: 'search-field', order: 'ASC' }; service.trackSearchEvent(mockSearch, page, sort); const request: RestRequest = requestService.send.calls.mostRecent().args[0]; const body = JSON.parse(request.body); @@ -94,7 +94,7 @@ describe('StatisticsService', () => { totalPages: 25, number: 4, }; - const sort = {by: 'search-field', order: 'ASC'}; + const sort = { by: 'search-field', order: 'ASC' }; const filters = [ { filter: 'title', diff --git a/src/app/statistics/statistics.service.ts b/src/app/statistics/statistics.service.ts index 6ce927b30e..9c63b67be7 100644 --- a/src/app/statistics/statistics.service.ts +++ b/src/app/statistics/statistics.service.ts @@ -18,7 +18,7 @@ import { TrackRequest } from './track-request.model'; /** * The statistics service */ -@Injectable({providedIn: 'root'}) +@Injectable({ providedIn: 'root' }) export class StatisticsService { constructor( diff --git a/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.spec.ts b/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.spec.ts index 5828c3fd9a..7715835c64 100644 --- a/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.spec.ts +++ b/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.spec.ts @@ -104,9 +104,9 @@ describe('SubmissionImportExternalSearchbarComponent test suite', () => { paginatedListRD = createSuccessfulRemoteDataObject(paginatedList); compAsAny.externalService.searchBy.and.returnValue(observableOf(paginatedListRD)); sourceList = [ - {id: 'orcid', name: 'orcid'}, - {id: 'ciencia', name: 'ciencia'}, - {id: 'my_staff_db', name: 'my_staff_db'}, + { id: 'orcid', name: 'orcid' }, + { id: 'ciencia', name: 'ciencia' }, + { id: 'my_staff_db', name: 'my_staff_db' }, ]; }); @@ -137,7 +137,7 @@ describe('SubmissionImportExternalSearchbarComponent test suite', () => { }); it('Variable \'selectedElement\' should be assigned', () => { - const selectedElement = {id: 'orcid', name: 'orcid'}; + const selectedElement = { id: 'orcid', name: 'orcid' }; comp.makeSourceSelection(selectedElement); expect(comp.selectedElement).toEqual(selectedElement); }); diff --git a/src/app/submission/import-external/submission-import-external.component.spec.ts b/src/app/submission/import-external/submission-import-external.component.spec.ts index e53136ab70..a0955c9ea5 100644 --- a/src/app/submission/import-external/submission-import-external.component.spec.ts +++ b/src/app/submission/import-external/submission-import-external.component.spec.ts @@ -119,17 +119,17 @@ describe('SubmissionImportExternalComponent test suite', () => { it('Should init component properly (without route data)', () => { const expectedEntries = createSuccessfulRemoteDataObject(createPaginatedList([])); - comp.routeData = {entity: '', sourceId: '', query: '' }; + comp.routeData = { entity: '', sourceId: '', query: '' }; spyOn(compAsAny.routeService, 'getQueryParameterValue').and.returnValue(observableOf('')); fixture.detectChanges(); - expect(comp.routeData).toEqual({entity: '', sourceId: '', query: '' }); + expect(comp.routeData).toEqual({ entity: '', sourceId: '', query: '' }); expect(comp.isLoading$.value).toBe(false); expect(comp.entriesRD$.value).toEqual(expectedEntries); }); it('Should init component properly (with route data)', () => { - comp.routeData = {entity: '', sourceId: '', query: '' }; + comp.routeData = { entity: '', sourceId: '', query: '' }; spyOn(compAsAny, 'retrieveExternalSources'); spyOn(compAsAny.routeService, 'getQueryParameterValue').and.returnValues(observableOf('entity'), observableOf('source'), observableOf('dummy')); fixture.detectChanges(); @@ -155,10 +155,10 @@ describe('SubmissionImportExternalComponent test suite', () => { }); it('Should call \'router.navigate\'', () => { - comp.routeData = {entity: 'Person', sourceId: '', query: '' }; + comp.routeData = { entity: 'Person', sourceId: '', query: '' }; spyOn(compAsAny, 'retrieveExternalSources').and.callFake(() => null); compAsAny.router.navigate.and.returnValue( new Promise(() => {return;})); - const event = {entity: 'Person', sourceId: 'orcidV2', query: 'dummy' }; + const event = { entity: 'Person', sourceId: 'orcidV2', query: 'dummy' }; scheduler.schedule(() => comp.getExternalSourceData(event)); scheduler.flush(); @@ -179,7 +179,7 @@ describe('SubmissionImportExternalComponent test suite', () => { ], }, }); - ngbModal.open.and.returnValue({componentInstance: { externalSourceEntry: null}}); + ngbModal.open.and.returnValue({ componentInstance: { externalSourceEntry: null } }); comp.import(entry); expect(compAsAny.modalService.open).toHaveBeenCalledWith(SubmissionImportExternalPreviewComponent, { size: 'lg' }); diff --git a/src/app/submission/import-external/submission-import-external.component.ts b/src/app/submission/import-external/submission-import-external.component.ts index 7e581e4da7..8bba220ab7 100644 --- a/src/app/submission/import-external/submission-import-external.component.ts +++ b/src/app/submission/import-external/submission-import-external.component.ts @@ -136,7 +136,7 @@ export class SubmissionImportExternalComponent implements OnInit, OnDestroy { this.listId = 'list-submission-external-sources'; this.context = Context.EntitySearchModalWithNameVariants; this.repeatable = false; - this.routeData = {entity: '', sourceId: '', query: ''}; + this.routeData = { entity: '', sourceId: '', query: '' }; this.importConfig = { buttonLabel: 'submission.sections.describe.relationship-lookup.external-source.import-button-title.' + this.label, }; @@ -150,7 +150,7 @@ export class SubmissionImportExternalComponent implements OnInit, OnDestroy { ]).pipe( take(1), ).subscribe(([entity, sourceId, query]: [string, string, string]) => { - this.reload$.next({entity: entity || NONE_ENTITY_TYPE, query: query, sourceId: sourceId}); + this.reload$.next({ entity: entity || NONE_ENTITY_TYPE, query: query, sourceId: sourceId }); this.selectLabel(entity); this.retrieveExternalSources(); })); diff --git a/src/app/submission/objects/submission-objects.effects.spec.ts b/src/app/submission/objects/submission-objects.effects.spec.ts index e68c91e9ab..66c6e8316e 100644 --- a/src/app/submission/objects/submission-objects.effects.spec.ts +++ b/src/app/submission/objects/submission-objects.effects.spec.ts @@ -140,7 +140,7 @@ describe('SubmissionObjectEffects test suite', () => { selfUrl: selfUrl, submissionDefinition: submissionDefinition, sections: {}, - item: {metadata: {}}, + item: { metadata: {} }, errors: [], }, }, diff --git a/src/app/submission/objects/submission-objects.reducer.ts b/src/app/submission/objects/submission-objects.reducer.ts index bb220c706d..dff1f7b1bf 100644 --- a/src/app/submission/objects/submission-objects.reducer.ts +++ b/src/app/submission/objects/submission-objects.reducer.ts @@ -796,7 +796,7 @@ function deleteFile(state: SubmissionObjectState, action: DeleteUploadedFileActi if (hasValue(filesData.files)) { const fileIndex: any = findKey( filesData.files, - {uuid: action.payload.fileId}); + { uuid: action.payload.fileId }); if (isNotNull(fileIndex)) { const newData = Array.from(filesData.files); newData.splice(fileIndex, 1); diff --git a/src/app/submission/sections/accesses/section-accesses.component.spec.ts b/src/app/submission/sections/accesses/section-accesses.component.spec.ts index c30afafd05..92fc7eefd7 100644 --- a/src/app/submission/sections/accesses/section-accesses.component.spec.ts +++ b/src/app/submission/sections/accesses/section-accesses.component.spec.ts @@ -148,8 +148,8 @@ describe('SubmissionSectionAccessesComponent', () => { }); it('should have set maxStartDate and maxEndDate properly', () => { - const maxStartDate = {year: 2024, month: 12, day: 20}; - const maxEndDate = {year: 2022, month: 6, day: 20}; + const maxStartDate = { year: 2024, month: 12, day: 20 }; + const maxEndDate = { year: 2022, month: 6, day: 20 }; const startDateModel = formbuilderService.findById('startDate', component.formModel); expect(startDateModel.max).toEqual(maxStartDate); diff --git a/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.spec.ts b/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.spec.ts index 2730bfa765..9048a3d25e 100644 --- a/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.spec.ts +++ b/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.spec.ts @@ -9,9 +9,9 @@ import { TranslateModule } from '@ngx-translate/core'; import { cold } from 'jasmine-marbles'; import { of as observableOf } from 'rxjs'; -import {ConfigurationDataService} from '../../../core/data/configuration-data.service'; +import { ConfigurationDataService } from '../../../core/data/configuration-data.service'; import { JsonPatchOperationsBuilder } from '../../../core/json-patch/builder/json-patch-operations-builder'; -import {ConfigurationProperty} from '../../../core/shared/configuration-property.model'; +import { ConfigurationProperty } from '../../../core/shared/configuration-property.model'; import { SUBMISSION_CC_LICENSE } from '../../../core/submission/models/submission-cc-licence.resource-type'; import { SubmissionCcLicence } from '../../../core/submission/models/submission-cc-license.model'; import { SubmissionCcLicenseDataService } from '../../../core/submission/submission-cc-license-data.service'; diff --git a/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.ts b/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.ts index e2ae288ad1..78feb16f11 100644 --- a/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.ts +++ b/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.ts @@ -18,7 +18,7 @@ import { take, } from 'rxjs/operators'; -import {ConfigurationDataService} from '../../../core/data/configuration-data.service'; +import { ConfigurationDataService } from '../../../core/data/configuration-data.service'; import { JsonPatchOperationPathCombiner } from '../../../core/json-patch/builder/json-patch-operation-path-combiner'; import { JsonPatchOperationsBuilder } from '../../../core/json-patch/builder/json-patch-operations-builder'; import { diff --git a/src/app/submission/sections/form/section-form-operations.service.spec.ts b/src/app/submission/sections/form/section-form-operations.service.spec.ts index fba11cc199..2e0c5cccb5 100644 --- a/src/app/submission/sections/form/section-form-operations.service.spec.ts +++ b/src/app/submission/sections/form/section-form-operations.service.spec.ts @@ -377,7 +377,7 @@ describe('SectionFormOperationsService test suite', () => { event = Object.assign({}, dynamicFormControlChangeEvent, { model: mockInputWithLanguageAndAuthorityModel, }); - expectedValue = Object.assign(new VocabularyEntry(), mockInputWithLanguageAndAuthorityModel.value, {language: mockInputWithLanguageAndAuthorityModel.language}); + expectedValue = Object.assign(new VocabularyEntry(), mockInputWithLanguageAndAuthorityModel.value, { language: mockInputWithLanguageAndAuthorityModel.language }); expect(service.getFieldValueFromChangeEvent(event)).toEqual(expectedValue); diff --git a/src/app/submission/sections/form/section-form.component.ts b/src/app/submission/sections/form/section-form.component.ts index 32fe30846b..6b80c325ef 100644 --- a/src/app/submission/sections/form/section-form.component.ts +++ b/src/app/submission/sections/form/section-form.component.ts @@ -443,7 +443,7 @@ export class SubmissionSectionFormComponent extends SectionModelComponent { } private hasRelatedCustomError(medatata): boolean { - const index = findIndex(this.sectionData.errorsToShow, {path: this.pathCombiner.getPath(medatata).path}); + const index = findIndex(this.sectionData.errorsToShow, { path: this.pathCombiner.getPath(medatata).path }); if (index !== -1) { const error = this.sectionData.errorsToShow[index]; const validator = error.message.replace('error.validation.', ''); diff --git a/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.spec.ts b/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.spec.ts index 8b9bfc27d2..43ea04a4c5 100644 --- a/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.spec.ts +++ b/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.spec.ts @@ -187,8 +187,8 @@ describe('SubmissionSectionUploadFileEditComponent test suite', () => { it('should init form model properly', () => { comp.fileData = fileData; comp.formId = 'testFileForm'; - const maxStartDate = {year: 2022, month: 1, day: 12}; - const maxEndDate = {year: 2019, month: 7, day: 12}; + const maxStartDate = { year: 2022, month: 1, day: 12 }; + const maxEndDate = { year: 2019, month: 7, day: 12 }; comp.ngOnInit(); @@ -209,7 +209,7 @@ describe('SubmissionSectionUploadFileEditComponent test suite', () => { context: null, control: null, group: null, - model: {id: 'name'} as any, + model: { id: 'name' } as any, type: 'change', }; spyOn(comp, 'setOptions'); @@ -257,7 +257,7 @@ describe('SubmissionSectionUploadFileEditComponent test suite', () => { }); it('should save Bitstream File data properly when form is valid', fakeAsync(() => { - compAsAny.formRef = {formGroup: null}; + compAsAny.formRef = { formGroup: null }; compAsAny.fileData = fileData; compAsAny.pathCombiner = pathCombiner; formService.validateAllFormFields.and.callFake(() => null); @@ -309,7 +309,7 @@ describe('SubmissionSectionUploadFileEditComponent test suite', () => { })); it('should not save Bitstream File data properly when form is not valid', fakeAsync(() => { - compAsAny.formRef = {formGroup: null}; + compAsAny.formRef = { formGroup: null }; compAsAny.pathCombiner = pathCombiner; formService.validateAllFormFields.and.callFake(() => null); formService.isValid.and.returnValue(of(false)); diff --git a/src/app/submission/sections/upload/file/section-upload-file.component.spec.ts b/src/app/submission/sections/upload/file/section-upload-file.component.spec.ts index a83fdf6f11..3419a27775 100644 --- a/src/app/submission/sections/upload/file/section-upload-file.component.spec.ts +++ b/src/app/submission/sections/upload/file/section-upload-file.component.spec.ts @@ -53,8 +53,8 @@ const configMetadataFormMock = { rows: [{ fields: [{ selectableMetadata: [ - {metadata: 'dc.title', label: null, closed: false}, - {metadata: 'dc.description', label: null, closed: false}, + { metadata: 'dc.title', label: null, closed: false }, + { metadata: 'dc.description', label: null, closed: false }, ], }], }], diff --git a/src/app/submission/selectors.ts b/src/app/submission/selectors.ts index 5cdeb543ff..432a5377a5 100644 --- a/src/app/submission/selectors.ts +++ b/src/app/submission/selectors.ts @@ -5,7 +5,7 @@ import { } from '@ngrx/store'; import { hasValue } from '../shared/empty.util'; -import { SubmissionObjectEntry} from './objects/submission-objects.reducer'; +import { SubmissionObjectEntry } from './objects/submission-objects.reducer'; import { SubmissionSectionObject } from './objects/submission-section-object.model'; import { submissionSelector, diff --git a/src/app/submission/submission.module.ts b/src/app/submission/submission.module.ts index 84b7e94e65..4eb2a6f71d 100644 --- a/src/app/submission/submission.module.ts +++ b/src/app/submission/submission.module.ts @@ -39,7 +39,7 @@ import { SubmissionSectionCcLicensesComponent } from './sections/cc-license/subm import { SubmissionSectionContainerComponent } from './sections/container/section-container.component'; import { SubmissionSectionFormComponent } from './sections/form/section-form.component'; import { SectionFormOperationsService } from './sections/form/section-form-operations.service'; -import {SubmissionSectionIdentifiersComponent} from './sections/identifiers/section-identifiers.component'; +import { SubmissionSectionIdentifiersComponent } from './sections/identifiers/section-identifiers.component'; import { SubmissionSectionLicenseComponent } from './sections/license/section-license.component'; import { SectionsDirective } from './sections/sections.directive'; import { SectionsService } from './sections/sections.service'; diff --git a/src/app/submission/submit/submission-submit.component.spec.ts b/src/app/submission/submit/submission-submit.component.spec.ts index 71b98a9ccc..6b44714ff8 100644 --- a/src/app/submission/submit/submission-submit.component.spec.ts +++ b/src/app/submission/submit/submission-submit.component.spec.ts @@ -90,11 +90,11 @@ describe('SubmissionSubmitComponent Component', () => { it('should redirect to workspaceitem edit when a not empty SubmissionObject has been retrieved',() => { - submissionServiceStub.createSubmission.and.returnValue(observableOf({ id: '1234'})); + submissionServiceStub.createSubmission.and.returnValue(observableOf({ id: '1234' })); fixture.detectChanges(); - expect(router.navigate).toHaveBeenCalledWith(['/workspaceitems', '1234', 'edit'], { replaceUrl: true}); + expect(router.navigate).toHaveBeenCalledWith(['/workspaceitems', '1234', 'edit'], { replaceUrl: true }); }); diff --git a/src/app/submission/submit/submission-submit.component.ts b/src/app/submission/submit/submission-submit.component.ts index 999d33028e..c76d90a5bc 100644 --- a/src/app/submission/submit/submission-submit.component.ts +++ b/src/app/submission/submit/submission-submit.component.ts @@ -139,7 +139,7 @@ export class SubmissionSubmitComponent implements OnDestroy, OnInit { this.notificationsService.info(null, this.translate.get('submission.general.cannot_submit')); this.router.navigate(['/mydspace']); } else { - this.router.navigate(['/workspaceitems', submissionObject.id, 'edit'], { replaceUrl: true}); + this.router.navigate(['/workspaceitems', submissionObject.id, 'edit'], { replaceUrl: true }); } } }), diff --git a/src/app/submission/utils/parseSectionErrors.ts b/src/app/submission/utils/parseSectionErrors.ts index 4220eefda6..e2e405915d 100644 --- a/src/app/submission/utils/parseSectionErrors.ts +++ b/src/app/submission/utils/parseSectionErrors.ts @@ -16,7 +16,7 @@ const parseSectionErrors = (errors: SubmissionObjectError[] = []): any => { const paths: SectionErrorPath[] = parseSectionErrorPaths(error.paths); paths.forEach((path: SectionErrorPath) => { - const sectionError = {path: path.originalPath, message: error.message}; + const sectionError = { path: path.originalPath, message: error.message }; if (!errorsList[path.sectionId]) { errorsList[path.sectionId] = []; } diff --git a/src/app/system-wide-alert/alert-banner/system-wide-alert-banner.component.spec.ts b/src/app/system-wide-alert/alert-banner/system-wide-alert-banner.component.spec.ts index 40637ce28d..155893f160 100644 --- a/src/app/system-wide-alert/alert-banner/system-wide-alert-banner.component.spec.ts +++ b/src/app/system-wide-alert/alert-banner/system-wide-alert-banner.component.spec.ts @@ -52,8 +52,8 @@ describe('SystemWideAlertBannerComponent', () => { imports: [TranslateModule.forRoot()], declarations: [SystemWideAlertBannerComponent], providers: [ - {provide: SystemWideAlertDataService, useValue: systemWideAlertDataService}, - {provide: NotificationsService, useValue: new NotificationsServiceStub()}, + { provide: SystemWideAlertDataService, useValue: systemWideAlertDataService }, + { provide: NotificationsService, useValue: new NotificationsServiceStub() }, ], }).compileComponents(); })); diff --git a/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.spec.ts b/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.spec.ts index 917f36bfdb..c5beed4439 100644 --- a/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.spec.ts +++ b/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.spec.ts @@ -66,10 +66,10 @@ describe('SystemWideAlertFormComponent', () => { imports: [FormsModule, SystemWideAlertModule, UiSwitchModule, TranslateModule.forRoot()], declarations: [SystemWideAlertFormComponent], providers: [ - {provide: SystemWideAlertDataService, useValue: systemWideAlertDataService}, - {provide: NotificationsService, useValue: notificationsService}, - {provide: Router, useValue: router}, - {provide: RequestService, useValue: requestService}, + { provide: SystemWideAlertDataService, useValue: systemWideAlertDataService }, + { provide: NotificationsService, useValue: notificationsService }, + { provide: Router, useValue: router }, + { provide: RequestService, useValue: requestService }, ], }).compileComponents(); })); @@ -101,8 +101,8 @@ describe('SystemWideAlertFormComponent', () => { comp.createForm(); expect(comp.formMessage.value).toEqual(''); expect(comp.formActive.value).toEqual(false); - expect(comp.time).toEqual({hour: now.getHours(), minute: now.getMinutes()}); - expect(comp.date).toEqual({year: now.getFullYear(), month: now.getMonth() + 1, day: now.getDate()}); + expect(comp.time).toEqual({ hour: now.getHours(), minute: now.getMinutes() }); + expect(comp.date).toEqual({ year: now.getFullYear(), month: now.getMonth() + 1, day: now.getDate() }); }); }); @@ -114,7 +114,7 @@ describe('SystemWideAlertFormComponent', () => { expect(comp.formMessage.value).toEqual(systemWideAlert.message); expect(comp.formActive.value).toEqual(true); - expect(comp.time).toEqual({hour: countDownTo.getHours(), minute: countDownTo.getMinutes()}); + expect(comp.time).toEqual({ hour: countDownTo.getHours(), minute: countDownTo.getMinutes() }); expect(comp.date).toEqual({ year: countDownTo.getFullYear(), month: countDownTo.getMonth() + 1, @@ -149,8 +149,8 @@ describe('SystemWideAlertFormComponent', () => { countDownDate.setHours(countDownDate.getHours() + 1); countDownDate.setMinutes(countDownDate.getMinutes() + 1); - comp.time = {hour: countDownDate.getHours(), minute: countDownDate.getMinutes()}; - comp.date = {year: countDownDate.getFullYear(), month: countDownDate.getMonth() + 1, day: countDownDate.getDate()}; + comp.time = { hour: countDownDate.getHours(), minute: countDownDate.getMinutes() }; + comp.date = { year: countDownDate.getFullYear(), month: countDownDate.getMonth() + 1, day: countDownDate.getDate() }; comp.updatePreviewTime(); @@ -178,8 +178,8 @@ describe('SystemWideAlertFormComponent', () => { comp.formMessage.patchValue('New message'); comp.formActive.patchValue(true); - comp.time = {hour: 4, minute: 26}; - comp.date = {year: 2023, month: 1, day: 25}; + comp.time = { hour: 4, minute: 26 }; + comp.date = { year: 2023, month: 1, day: 25 }; const expectedAlert = new SystemWideAlert(); expectedAlert.alertId = systemWideAlert.alertId; @@ -201,8 +201,8 @@ describe('SystemWideAlertFormComponent', () => { comp.formMessage.patchValue('New message'); comp.formActive.patchValue(true); - comp.time = {hour: 4, minute: 26}; - comp.date = {year: 2023, month: 1, day: 25}; + comp.time = { hour: 4, minute: 26 }; + comp.date = { year: 2023, month: 1, day: 25 }; const expectedAlert = new SystemWideAlert(); expectedAlert.alertId = systemWideAlert.alertId; @@ -224,8 +224,8 @@ describe('SystemWideAlertFormComponent', () => { comp.formMessage.patchValue('New message'); comp.formActive.patchValue(true); - comp.time = {hour: 4, minute: 26}; - comp.date = {year: 2023, month: 1, day: 25}; + comp.time = { hour: 4, minute: 26 }; + comp.date = { year: 2023, month: 1, day: 25 }; comp.counterEnabled$.next(false); const expectedAlert = new SystemWideAlert(); @@ -248,8 +248,8 @@ describe('SystemWideAlertFormComponent', () => { comp.formMessage.patchValue('New message'); comp.formActive.patchValue(true); - comp.time = {hour: 4, minute: 26}; - comp.date = {year: 2023, month: 1, day: 25}; + comp.time = { hour: 4, minute: 26 }; + comp.date = { year: 2023, month: 1, day: 25 }; const expectedAlert = new SystemWideAlert(); expectedAlert.alertId = systemWideAlert.alertId; @@ -271,8 +271,8 @@ describe('SystemWideAlertFormComponent', () => { comp.formMessage.patchValue('New message'); comp.formActive.patchValue(true); - comp.time = {hour: 4, minute: 26}; - comp.date = {year: 2023, month: 1, day: 25}; + comp.time = { hour: 4, minute: 26 }; + comp.date = { year: 2023, month: 1, day: 25 }; const expectedAlert = new SystemWideAlert(); expectedAlert.message = 'New message'; @@ -296,8 +296,8 @@ describe('SystemWideAlertFormComponent', () => { comp.formMessage.patchValue('New message'); comp.formActive.patchValue(true); - comp.time = {hour: 4, minute: 26}; - comp.date = {year: 2023, month: 1, day: 25}; + comp.time = { hour: 4, minute: 26 }; + comp.date = { year: 2023, month: 1, day: 25 }; const expectedAlert = new SystemWideAlert(); expectedAlert.message = 'New message'; diff --git a/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.ts b/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.ts index 7aa4c9f9ab..bfe5e39c5d 100644 --- a/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.ts +++ b/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.ts @@ -124,7 +124,7 @@ export class SystemWideAlertFormComponent implements OnInit { this.createForm(); const currentDate = new Date(); - this.minDate = {year: currentDate.getFullYear(), month: currentDate.getMonth() + 1, day: currentDate.getDate()}; + this.minDate = { year: currentDate.getFullYear(), month: currentDate.getMonth() + 1, day: currentDate.getDate() }; this.systemWideAlert$.subscribe((alert) => { @@ -189,8 +189,8 @@ export class SystemWideAlertFormComponent implements OnInit { private setDateTime(dateToSet) { - this.time = {hour: dateToSet.getHours(), minute: dateToSet.getMinutes()}; - this.date = {year: dateToSet.getFullYear(), month: dateToSet.getMonth() + 1, day: dateToSet.getDate()}; + this.time = { hour: dateToSet.getHours(), minute: dateToSet.getMinutes() }; + this.date = { year: dateToSet.getFullYear(), month: dateToSet.getMonth() + 1, day: dateToSet.getDate() }; this.updatePreviewTime(); } diff --git a/src/app/workspaceitems-edit-page/workspaceitems-delete-page/workspaceitems-delete-page.component.spec.ts b/src/app/workspaceitems-edit-page/workspaceitems-delete-page/workspaceitems-delete-page.component.spec.ts index 43cbb88469..06fa6ddb80 100644 --- a/src/app/workspaceitems-edit-page/workspaceitems-delete-page/workspaceitems-delete-page.component.spec.ts +++ b/src/app/workspaceitems-edit-page/workspaceitems-delete-page/workspaceitems-delete-page.component.spec.ts @@ -104,7 +104,7 @@ describe('WorkspaceitemsDeletePageComponent', () => { }); it('should delete the target workspace item', () => { - spyOn((component as any).modalService, 'open').and.returnValue({result: Promise.resolve('ok')}); + spyOn((component as any).modalService, 'open').and.returnValue({ result: Promise.resolve('ok') }); component.confirmDelete(By.css('#delete-modal')); fixture.detectChanges(); expect((component as any).modalService.open).toHaveBeenCalled(); diff --git a/src/config/default-app-config.ts b/src/config/default-app-config.ts index a3208054f0..87f12c75ab 100644 --- a/src/config/default-app-config.ts +++ b/src/config/default-app-config.ts @@ -235,9 +235,9 @@ export class DefaultAppConfig implements AppConfig { { code: 'vi', label: 'Tiếng Việt', active: true }, { code: 'kk', label: 'Қазақ', active: true }, { code: 'bn', label: 'বাংলা', active: true }, - { code: 'hi', label: 'हिंदी', active: true}, + { code: 'hi', label: 'हिंदी', active: true }, { code: 'el', label: 'Ελληνικά', active: true }, - { code: 'uk', label: 'Yкраї́нська', active: true}, + { code: 'uk', label: 'Yкраї́нська', active: true }, ]; // Browse-By Pages diff --git a/src/themes/custom/app/collection-page/collection-page.component.ts b/src/themes/custom/app/collection-page/collection-page.component.ts index e26d1a7ce2..197cd23420 100644 --- a/src/themes/custom/app/collection-page/collection-page.component.ts +++ b/src/themes/custom/app/collection-page/collection-page.component.ts @@ -3,7 +3,7 @@ import { Component, } from '@angular/core'; -import { CollectionPageComponent as BaseComponent} from '../../../../app/collection-page/collection-page.component'; +import { CollectionPageComponent as BaseComponent } from '../../../../app/collection-page/collection-page.component'; import { fadeIn, fadeInOut, diff --git a/src/themes/custom/app/community-page/community-page.component.ts b/src/themes/custom/app/community-page/community-page.component.ts index e739a2866f..9975544d8c 100644 --- a/src/themes/custom/app/community-page/community-page.component.ts +++ b/src/themes/custom/app/community-page/community-page.component.ts @@ -3,7 +3,7 @@ import { Component, } from '@angular/core'; -import { CommunityPageComponent as BaseComponent} from '../../../../app/community-page/community-page.component'; +import { CommunityPageComponent as BaseComponent } from '../../../../app/community-page/community-page.component'; import { fadeInOut } from '../../../../app/shared/animations/fade'; diff --git a/src/themes/custom/app/logout-page/logout-page.component.ts b/src/themes/custom/app/logout-page/logout-page.component.ts index eda6d5e4e1..bcd53351e9 100644 --- a/src/themes/custom/app/logout-page/logout-page.component.ts +++ b/src/themes/custom/app/logout-page/logout-page.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; -import { LogoutPageComponent as BaseComponent} from '../../../../app/logout-page/logout-page.component'; +import { LogoutPageComponent as BaseComponent } from '../../../../app/logout-page/logout-page.component'; @Component({ selector: 'ds-logout-page', diff --git a/src/themes/custom/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts b/src/themes/custom/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts index 19756f279e..b5af81bab4 100644 --- a/src/themes/custom/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts +++ b/src/themes/custom/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; -import { ComcolPageBrowseByComponent as BaseComponent} from '../../../../../app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component'; +import { ComcolPageBrowseByComponent as BaseComponent } from '../../../../../app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component'; /** * A component to display the "Browse By" section of a Community or Collection page diff --git a/src/themes/custom/app/shared/comcol-page-handle/comcol-page-handle.component.ts b/src/themes/custom/app/shared/comcol-page-handle/comcol-page-handle.component.ts index 31d4901f26..8beb56b596 100644 --- a/src/themes/custom/app/shared/comcol-page-handle/comcol-page-handle.component.ts +++ b/src/themes/custom/app/shared/comcol-page-handle/comcol-page-handle.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; -import { ComcolPageHandleComponent as BaseComponent} from '../../../../../app/shared/comcol/comcol-page-handle/comcol-page-handle.component'; +import { ComcolPageHandleComponent as BaseComponent } from '../../../../../app/shared/comcol/comcol-page-handle/comcol-page-handle.component'; /** diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts b/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts index c59fc97bc6..e84fb2bf98 100644 --- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts +++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts @@ -1,4 +1,4 @@ -import {Component} from '@angular/core'; +import { Component } from '@angular/core'; import { CreateItemParentSelectorComponent as BaseComponent } from '../../../../../../../app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component'; diff --git a/src/themes/custom/app/shared/object-list/collection-list-element/collection-list-element.component.ts b/src/themes/custom/app/shared/object-list/collection-list-element/collection-list-element.component.ts index 4408b9d9b3..1f60200411 100644 --- a/src/themes/custom/app/shared/object-list/collection-list-element/collection-list-element.component.ts +++ b/src/themes/custom/app/shared/object-list/collection-list-element/collection-list-element.component.ts @@ -1,8 +1,8 @@ -import {Component} from '@angular/core'; +import { Component } from '@angular/core'; -import {Collection} from '../../../../../../app/core/shared/collection.model'; -import {Context} from '../../../../../../app/core/shared/context.model'; -import {ViewMode} from '../../../../../../app/core/shared/view-mode.model'; +import { Collection } from '../../../../../../app/core/shared/collection.model'; +import { Context } from '../../../../../../app/core/shared/context.model'; +import { ViewMode } from '../../../../../../app/core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../../../app/shared/object-collection/shared/listable-object/listable-object.decorator'; import { CollectionListElementComponent as BaseComponent } from '../../../../../../app/shared/object-list/collection-list-element/collection-list-element.component'; diff --git a/src/themes/custom/app/shared/object-list/community-list-element/community-list-element.component.ts b/src/themes/custom/app/shared/object-list/community-list-element/community-list-element.component.ts index 190e8bd13c..a5c3f3fc55 100644 --- a/src/themes/custom/app/shared/object-list/community-list-element/community-list-element.component.ts +++ b/src/themes/custom/app/shared/object-list/community-list-element/community-list-element.component.ts @@ -1,7 +1,7 @@ -import {Component} from '@angular/core'; +import { Component } from '@angular/core'; import { Community } from '../../../../../../app/core/shared/community.model'; -import {Context} from '../../../../../../app/core/shared/context.model'; +import { Context } from '../../../../../../app/core/shared/context.model'; import { ViewMode } from '../../../../../../app/core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../../../app/shared/object-collection/shared/listable-object/listable-object.decorator'; import { CommunityListElementComponent as BaseComponent } from '../../../../../../app/shared/object-list/community-list-element/community-list-element.component'; diff --git a/src/themes/custom/app/shared/object-list/object-list.component.ts b/src/themes/custom/app/shared/object-list/object-list.component.ts index a5ffac0ba9..7a52af995b 100644 --- a/src/themes/custom/app/shared/object-list/object-list.component.ts +++ b/src/themes/custom/app/shared/object-list/object-list.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; -import { ObjectListComponent as BaseComponent} from '../../../../../app/shared/object-list/object-list.component'; +import { ObjectListComponent as BaseComponent } from '../../../../../app/shared/object-list/object-list.component'; /** * A component to display the "Browse By" section of a Community or Collection page diff --git a/src/themes/custom/eager-theme.module.ts b/src/themes/custom/eager-theme.module.ts index ca28c2c86a..68347d1179 100644 --- a/src/themes/custom/eager-theme.module.ts +++ b/src/themes/custom/eager-theme.module.ts @@ -29,7 +29,7 @@ import { EditCollectionSelectorComponent } from './app/shared/dso-selector/modal import { EditCommunitySelectorComponent } from './app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component'; import { EditItemSelectorComponent } from './app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component'; import { FileDownloadLinkComponent } from './app/shared/file-download-link/file-download-link.component'; -import { CollectionListElementComponent} from './app/shared/object-list/collection-list-element/collection-list-element.component'; +import { CollectionListElementComponent } from './app/shared/object-list/collection-list-element/collection-list-element.component'; import { CommunityListElementComponent } from './app/shared/object-list/community-list-element/community-list-element.component'; import { ItemSearchResultListElementComponent } from './app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component'; import { PublicationSidebarSearchListElementComponent } from './app/shared/object-list/sidebar-search-list-element/item-types/publication-sidebar-search-list-element.component'; @@ -88,7 +88,7 @@ const DECLARATIONS = [ ], declarations: DECLARATIONS, providers: [ - ...ENTRY_COMPONENTS.map((component) => ({provide: component})), + ...ENTRY_COMPONENTS.map((component) => ({ provide: component })), ], }) /** diff --git a/src/themes/dspace/eager-theme.module.ts b/src/themes/dspace/eager-theme.module.ts index 758502160f..51511ef7d7 100644 --- a/src/themes/dspace/eager-theme.module.ts +++ b/src/themes/dspace/eager-theme.module.ts @@ -36,7 +36,7 @@ const DECLARATIONS = [ ], declarations: DECLARATIONS, providers: [ - ...ENTRY_COMPONENTS.map((component) => ({provide: component})), + ...ENTRY_COMPONENTS.map((component) => ({ provide: component })), ], }) /**