diff --git a/src/app/collection-page/collection-form/collection-form.module.ts b/src/app/collection-page/collection-form/collection-form.module.ts deleted file mode 100644 index c7e284230a..0000000000 --- a/src/app/collection-page/collection-form/collection-form.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { CollectionFormComponent } from './collection-form.component'; -import { ComcolModule } from '../../shared/comcol/comcol.module'; -import { FormModule } from '../../shared/form/form.module'; - -@NgModule({ - imports: [ - ComcolModule, - FormModule, - CollectionFormComponent - ], - exports: [ - CollectionFormComponent - ] -}) -export class CollectionFormModule { - -} diff --git a/src/app/collection-page/collection-page-routes.ts b/src/app/collection-page/collection-page-routes.ts index 9b9d82a93b..9ff7a424c1 100644 --- a/src/app/collection-page/collection-page-routes.ts +++ b/src/app/collection-page/collection-page-routes.ts @@ -24,6 +24,7 @@ import { import { ComcolBrowseByComponent } from '../shared/comcol/sections/comcol-browse-by/comcol-browse-by.component'; import { BrowseByGuard } from '../browse-by/browse-by-guard'; import { BrowseByI18nBreadcrumbResolver } from '../browse-by/browse-by-i18n-breadcrumb.resolver'; +import { SearchService } from '../core/shared/search/search.service'; export const ROUTES: Route[] = [ @@ -39,6 +40,7 @@ export const ROUTES: Route[] = [ LinkService, CreateCollectionPageGuard, CollectionPageAdministratorGuard, + SearchService ] }, { @@ -56,6 +58,7 @@ export const ROUTES: Route[] = [ LinkService, CreateCollectionPageGuard, CollectionPageAdministratorGuard, + SearchService ], runGuardsAndResolvers: 'always', children: [ diff --git a/src/app/collection-page/collection-page.module.ts b/src/app/collection-page/collection-page.module.ts deleted file mode 100644 index f565aef155..0000000000 --- a/src/app/collection-page/collection-page.module.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - - -import { CollectionPageComponent } from './collection-page.component'; -import { CreateCollectionPageComponent } from './create-collection-page/create-collection-page.component'; -import { DeleteCollectionPageComponent } from './delete-collection-page/delete-collection-page.component'; -import { EditItemTemplatePageComponent } from './edit-item-template-page/edit-item-template-page.component'; -import { - ThemedEditItemTemplatePageComponent -} from './edit-item-template-page/themed-edit-item-template-page.component'; -import { EditItemPageModule } from '../item-page/edit-item-page/edit-item-page.module'; -import { CollectionItemMapperComponent } from './collection-item-mapper/collection-item-mapper.component'; -import { SearchService } from '../core/shared/search/search.service'; -import { StatisticsModule } from '../statistics/statistics.module'; -import { CollectionFormModule } from './collection-form/collection-form.module'; -import { ThemedCollectionPageComponent } from './themed-collection-page.component'; -import { ComcolModule } from '../shared/comcol/comcol.module'; -import { DsoPageModule } from '../shared/dso-page/dso-page.module'; -import { BrowseByPageModule } from '../browse-by/browse-by-page.module'; - -@NgModule({ - imports: [ - CommonModule, - StatisticsModule.forRoot(), - EditItemPageModule, - CollectionFormModule, - ComcolModule, - DsoPageModule, - BrowseByPageModule, - CollectionPageComponent, - ThemedCollectionPageComponent, - CreateCollectionPageComponent, - DeleteCollectionPageComponent, - EditItemTemplatePageComponent, - ThemedEditItemTemplatePageComponent, - CollectionItemMapperComponent, - CollectionPageComponent, - ThemedCollectionPageComponent, - CreateCollectionPageComponent, - DeleteCollectionPageComponent, - EditItemTemplatePageComponent, - ThemedEditItemTemplatePageComponent, - CollectionItemMapperComponent, - ], - providers: [ - SearchService, - ] -}) -export class CollectionPageModule { - -} diff --git a/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.spec.ts b/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.spec.ts index fbfb1036d6..5f9fc54b0b 100644 --- a/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.spec.ts +++ b/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.spec.ts @@ -11,7 +11,6 @@ import { RequestService } from '../../../core/data/request.service'; import { RouterTestingModule } from '@angular/router/testing'; import { createSuccessfulRemoteDataObject, createSuccessfulRemoteDataObject$ } from '../../../shared/remote-data.utils'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; -import { ComcolModule } from '../../../shared/comcol/comcol.module'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { NotificationsServiceStub } from '../../../shared/testing/notifications-service.stub'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; @@ -69,7 +68,6 @@ describe('CollectionRolesComponent', () => { TestBed.configureTestingModule({ imports: [ - ComcolModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NoopAnimationsModule, diff --git a/src/app/community-page/community-form/community-form.module.ts b/src/app/community-page/community-form/community-form.module.ts deleted file mode 100644 index 43de3e66d4..0000000000 --- a/src/app/community-page/community-form/community-form.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { CommunityFormComponent } from './community-form.component'; -import { ComcolModule } from '../../shared/comcol/comcol.module'; -import { FormModule } from '../../shared/form/form.module'; - -@NgModule({ - imports: [ - ComcolModule, - FormModule, - CommunityFormComponent - ], - exports: [ - CommunityFormComponent - ] -}) -export class CommunityFormModule { - -} diff --git a/src/app/community-page/edit-community-page/community-roles/community-roles.component.spec.ts b/src/app/community-page/edit-community-page/community-roles/community-roles.component.spec.ts index 0e0bc02b11..687c4c60e8 100644 --- a/src/app/community-page/edit-community-page/community-roles/community-roles.component.spec.ts +++ b/src/app/community-page/edit-community-page/community-roles/community-roles.component.spec.ts @@ -11,7 +11,6 @@ import { GroupDataService } from '../../../core/eperson/group-data.service'; import { RouterTestingModule } from '@angular/router/testing'; import { createSuccessfulRemoteDataObject, createSuccessfulRemoteDataObject$ } from '../../../shared/remote-data.utils'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; -import { ComcolModule } from '../../../shared/comcol/comcol.module'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { NotificationsServiceStub } from '../../../shared/testing/notifications-service.stub'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; @@ -54,7 +53,6 @@ describe('CommunityRolesComponent', () => { TestBed.configureTestingModule({ imports: [ - ComcolModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NoopAnimationsModule, diff --git a/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.spec.ts b/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.spec.ts index 00efc3ccaa..b781d0bc12 100644 --- a/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.spec.ts +++ b/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.spec.ts @@ -9,7 +9,6 @@ import { of as observableOf } from 'rxjs'; import { RouterTestingModule } from '@angular/router/testing'; import { createFailedRemoteDataObject$, createSuccessfulRemoteDataObject$ } from '../../../../remote-data.utils'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; -import { ComcolModule } from '../../../comcol.module'; import { NotificationsService } from '../../../../notifications/notifications.service'; import { NotificationsServiceStub } from '../../../../testing/notifications-service.stub'; import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; @@ -37,7 +36,6 @@ describe('ComcolRoleComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ - ComcolModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NoopAnimationsModule diff --git a/src/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component.ts b/src/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component.ts index a42aab3814..bbdcbb18bc 100644 --- a/src/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component.ts +++ b/src/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component.ts @@ -1,7 +1,7 @@ -import { Component, Input, OnInit, OnDestroy } from '@angular/core'; +import { Component, Input, OnDestroy, OnInit } from '@angular/core'; import { BehaviorSubject, combineLatest, Observable, Subscription } from 'rxjs'; import { map, take } from 'rxjs/operators'; -import { Router, EventType, Scroll, ActivatedRoute, Params, Router, RouterLink, RouterLinkActive } from '@angular/router'; +import { EventType, Router, RouterLink, RouterLinkActive, Scroll } from '@angular/router'; import { getCommunityPageRoute } from '../../../community-page/community-page-routing-paths'; import { getCollectionPageRoute } from '../../../collection-page/collection-page-routing-paths'; import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; diff --git a/src/app/shared/comcol/comcol.module.ts b/src/app/shared/comcol/comcol.module.ts deleted file mode 100644 index 906153808d..0000000000 --- a/src/app/shared/comcol/comcol.module.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -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 { ComcolPageHeaderComponent } from './comcol-page-header/comcol-page-header.component'; -import { ComcolPageLogoComponent } from './comcol-page-logo/comcol-page-logo.component'; -import { ComColFormComponent } from './comcol-forms/comcol-form/comcol-form.component'; -import { CreateComColPageComponent } from './comcol-forms/create-comcol-page/create-comcol-page.component'; -import { EditComColPageComponent } from './comcol-forms/edit-comcol-page/edit-comcol-page.component'; -import { DeleteComColPageComponent } from './comcol-forms/delete-comcol-page/delete-comcol-page.component'; -import { ComcolPageBrowseByComponent } from './comcol-page-browse-by/comcol-page-browse-by.component'; -import { ThemedComcolPageBrowseByComponent } from './comcol-page-browse-by/themed-comcol-page-browse-by.component'; -import { ComcolRoleComponent } from './comcol-forms/edit-comcol-page/comcol-role/comcol-role.component'; -import { FormModule } from '../form/form.module'; -import { UploadModule } from '../upload/upload.module'; -import { ComcolBrowseByComponent } from './sections/comcol-browse-by/comcol-browse-by.component'; -import { BrowseByModule } from '../../browse-by/browse-by.module'; -import { SearchModule } from '../search/search.module'; -import { ComcolSearchSectionComponent } from './sections/comcol-search-section/comcol-search-section.component'; - -const COMPONENTS = [ - ComcolPageContentComponent, - ComcolPageHandleComponent, - ComcolPageHeaderComponent, - ComcolPageLogoComponent, - ComColFormComponent, - CreateComColPageComponent, - EditComColPageComponent, - DeleteComColPageComponent, - ComcolPageBrowseByComponent, - ThemedComcolPageBrowseByComponent, - ComcolRoleComponent, - ThemedComcolPageHandleComponent, - ComcolBrowseByComponent, - ComcolSearchSectionComponent, -]; - -@NgModule({ - imports: [ - CommonModule, - FormModule, - UploadModule, - BrowseByModule, - SearchModule, - ...COMPONENTS - ], - exports: [ - ...COMPONENTS, - UploadModule, - ] -}) -export class ComcolModule { -} diff --git a/src/themes/custom/lazy-theme.module.ts b/src/themes/custom/lazy-theme.module.ts index c3b9ec0e8d..86d26763a1 100644 --- a/src/themes/custom/lazy-theme.module.ts +++ b/src/themes/custom/lazy-theme.module.ts @@ -1,7 +1,5 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { CollectionFormModule } from '../../app/collection-page/collection-form/collection-form.module'; -import { CommunityFormModule } from '../../app/community-page/community-form/community-form.module'; import { DragDropModule } from '@angular/cdk/drag-drop'; import { EditItemPageModule } from '../../app/item-page/edit-item-page/edit-item-page.module'; import { FormsModule } from '@angular/forms'; @@ -22,12 +20,10 @@ import { ItemPageModule } from '../../app/item-page/item-page.module'; import { RouterModule } from '@angular/router'; import { InfoModule } from '../../app/info/info.module'; import { StatisticsPageModule } from '../../app/statistics-page/statistics-page.module'; -import { CollectionPageModule } from '../../app/collection-page/collection-page.module'; import { SubmissionModule } from '../../app/submission/submission.module'; import { MyDSpacePageModule } from '../../app/my-dspace-page/my-dspace-page.module'; import { SearchModule } from '../../app/shared/search/search.module'; import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module'; -import { ComcolModule } from '../../app/shared/comcol/comcol.module'; import { RootModule } from '../../app/root.module'; import { FileSectionComponent } from './app/item-page/simple/field-components/file-section/file-section.component'; import { HomePageComponent } from './app/home-page/home-page.component'; @@ -259,10 +255,7 @@ const DECLARATIONS = [ imports: [ AppModule, RootModule, - CollectionFormModule, - CollectionPageModule, CommonModule, - CommunityFormModule, DragDropModule, ItemSharedModule, ItemPageModule, @@ -291,7 +284,6 @@ const DECLARATIONS = [ SearchModule, FormsModule, ResourcePoliciesModule, - ComcolModule, SystemWideAlertModule, NgxGalleryModule, FormModule, diff --git a/src/themes/dspace/lazy-theme.module.ts b/src/themes/dspace/lazy-theme.module.ts index 57a1104897..c75d9fecb0 100644 --- a/src/themes/dspace/lazy-theme.module.ts +++ b/src/themes/dspace/lazy-theme.module.ts @@ -1,7 +1,5 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { CollectionFormModule } from '../../app/collection-page/collection-form/collection-form.module'; -import { CommunityFormModule } from '../../app/community-page/community-form/community-form.module'; import { DragDropModule } from '@angular/cdk/drag-drop'; import { EditItemPageModule } from '../../app/item-page/edit-item-page/edit-item-page.module'; import { FormsModule } from '@angular/forms'; @@ -22,12 +20,10 @@ import { ItemPageModule } from '../../app/item-page/item-page.module'; import { RouterModule } from '@angular/router'; import { InfoModule } from '../../app/info/info.module'; import { StatisticsPageModule } from '../../app/statistics-page/statistics-page.module'; -import { CollectionPageModule } from '../../app/collection-page/collection-page.module'; import { SubmissionModule } from '../../app/submission/submission.module'; import { MyDSpacePageModule } from '../../app/my-dspace-page/my-dspace-page.module'; import { SearchModule } from '../../app/shared/search/search.module'; import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module'; -import { ComcolModule } from '../../app/shared/comcol/comcol.module'; import { RootModule } from '../../app/root.module'; import { BrowseByPageModule } from '../../app/browse-by/browse-by-page.module'; import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-by.module'; @@ -42,10 +38,7 @@ const DECLARATIONS = [ AppModule, RootModule, BrowseByPageModule, - CollectionFormModule, - CollectionPageModule, CommonModule, - CommunityFormModule, DragDropModule, ItemSharedModule, ItemPageModule, @@ -73,7 +66,6 @@ const DECLARATIONS = [ SearchModule, FormsModule, ResourcePoliciesModule, - ComcolModule ], declarations: DECLARATIONS, })