diff --git a/lib/process-services-cloud/src/lib/task/task-cloud.module.ts b/lib/process-services-cloud/src/lib/task/task-cloud.module.ts index 2a168c02f9..49469480a7 100644 --- a/lib/process-services-cloud/src/lib/task/task-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/task/task-cloud.module.ts @@ -17,13 +17,13 @@ import { NgModule } from '@angular/core'; import { TaskListCloudModule } from './task-list/task-list-cloud.module'; -import { TaskFiltersCloudModule } from './task-filters/task-filters-cloud.module'; +import { TASK_FILTERS_CLOUD_DIRECTIVES } from './task-filters/task-filters-cloud.module'; import { TASK_DIRECTIVES } from './directives/task-directive.module'; import { TaskFormModule } from './task-form/task-form.module'; import { TaskHeaderCloudComponent } from './task-header/components/task-header-cloud.component'; @NgModule({ - imports: [TaskListCloudModule, TaskFiltersCloudModule, TaskHeaderCloudComponent, ...TASK_DIRECTIVES, TaskFormModule], - exports: [TaskListCloudModule, TaskFiltersCloudModule, TaskHeaderCloudComponent, ...TASK_DIRECTIVES, TaskFormModule] + imports: [TaskListCloudModule, ...TASK_FILTERS_CLOUD_DIRECTIVES, TaskHeaderCloudComponent, ...TASK_DIRECTIVES, TaskFormModule], + exports: [TaskListCloudModule, ...TASK_FILTERS_CLOUD_DIRECTIVES, TaskHeaderCloudComponent, ...TASK_DIRECTIVES, TaskFormModule] }) export class TaskCloudModule {} diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-service-task-filter/edit-service-task-filter-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-service-task-filter/edit-service-task-filter-cloud.component.spec.ts index 96e8c30ce6..cc451c7401 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-service-task-filter/edit-service-task-filter-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-service-task-filter/edit-service-task-filter-cloud.component.spec.ts @@ -24,7 +24,6 @@ import { LocalPreferenceCloudService } from '../../../../../services/local-prefe import { ProcessServiceCloudTestingModule } from '../../../../../testing/process-service-cloud.testing.module'; import { AppsProcessCloudService } from '../../../../../app/services/apps-process-cloud.service'; import { fakeApplicationInstance, fakeApplicationInstanceWithEnvironment } from '../../../../../app/mock/app-model.mock'; -import { TaskFiltersCloudModule } from '../../../task-filters-cloud.module'; import { ServiceTaskFilterCloudService } from '../../../services/service-task-filter-cloud.service'; import { TaskCloudService } from '../../../../services/task-cloud.service'; import { fakeServiceFilter } from '../../../mock/task-filters-cloud.mock'; @@ -54,7 +53,7 @@ describe('EditServiceTaskFilterCloudComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [ProcessServiceCloudTestingModule, TaskFiltersCloudModule, MatIconTestingModule, EditServiceTaskFilterCloudComponent], + imports: [ProcessServiceCloudTestingModule, MatIconTestingModule, EditServiceTaskFilterCloudComponent], providers: [MatDialog, { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }] }); fixture = TestBed.createComponent(EditServiceTaskFilterCloudComponent); diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter/edit-task-filter-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter/edit-task-filter-cloud.component.spec.ts index c1f3aaa714..642c48fca1 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter/edit-task-filter-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter/edit-task-filter-cloud.component.spec.ts @@ -25,7 +25,6 @@ import { LocalPreferenceCloudService } from '../../../../../services/local-prefe import { ProcessServiceCloudTestingModule } from '../../../../../testing/process-service-cloud.testing.module'; import { AppsProcessCloudService } from '../../../../../app/services/apps-process-cloud.service'; import { fakeApplicationInstance } from '../../../../../app/mock/app-model.mock'; -import { TaskFiltersCloudModule } from '../../../task-filters-cloud.module'; import { EditTaskFilterCloudComponent } from './edit-task-filter-cloud.component'; import { TaskFilterCloudService } from '../../../services/task-filter-cloud.service'; import { TaskCloudService } from '../../../../services/task-cloud.service'; @@ -74,13 +73,7 @@ describe('EditTaskFilterCloudComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [ - ProcessServiceCloudTestingModule, - TaskFiltersCloudModule, - PeopleCloudComponent, - MatIconTestingModule, - EditTaskFilterCloudComponent - ], + imports: [ProcessServiceCloudTestingModule, PeopleCloudComponent, MatIconTestingModule, EditTaskFilterCloudComponent], providers: [MatDialog, { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }] }); fixture = TestBed.createComponent(EditTaskFilterCloudComponent); diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/service-task-filters/service-task-filters-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/service-task-filters/service-task-filters-cloud.component.spec.ts index 33ffb03263..eeb29a7674 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/service-task-filters/service-task-filters-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/service-task-filters/service-task-filters-cloud.component.spec.ts @@ -22,7 +22,6 @@ import { TASK_FILTERS_SERVICE_TOKEN } from '../../../../services/cloud-token.ser import { LocalPreferenceCloudService } from '../../../../services/local-preference-cloud.service'; import { By } from '@angular/platform-browser'; import { ProcessServiceCloudTestingModule } from '../../../../testing/process-service-cloud.testing.module'; -import { TaskFiltersCloudModule } from '../../task-filters-cloud.module'; import { fakeGlobalServiceFilters } from '../../mock/task-filters-cloud.mock'; import { ServiceTaskFilterCloudService } from '../../services/service-task-filter-cloud.service'; import { ServiceTaskFiltersCloudComponent } from './service-task-filters-cloud.component'; @@ -36,7 +35,7 @@ describe('ServiceTaskFiltersCloudComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [ProcessServiceCloudTestingModule, TaskFiltersCloudModule, ServiceTaskFiltersCloudComponent], + imports: [ProcessServiceCloudTestingModule, ServiceTaskFiltersCloudComponent], providers: [{ provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }] }); fixture = TestBed.createComponent(ServiceTaskFiltersCloudComponent); diff --git a/lib/process-services-cloud/src/lib/task/task-filters/task-filters-cloud.module.ts b/lib/process-services-cloud/src/lib/task/task-filters/task-filters-cloud.module.ts index a4bbd23d7e..3e58a5bb64 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/task-filters-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/task-filters-cloud.module.ts @@ -16,43 +16,25 @@ */ import { NgModule } from '@angular/core'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { CommonModule } from '@angular/common'; import { TaskFiltersCloudComponent } from './components/task-filters/task-filters-cloud.component'; -import { MaterialModule } from '../../material.module'; -import { CoreModule } from '@alfresco/adf-core'; -import { HttpClientModule } from '@angular/common/http'; import { EditServiceTaskFilterCloudComponent } from './components/edit-task-filters/edit-service-task-filter/edit-service-task-filter-cloud.component'; import { EditTaskFilterCloudComponent } from './components/edit-task-filters/edit-task-filter/edit-task-filter-cloud.component'; import { TaskFilterDialogCloudComponent } from './components/task-filter-dialog/task-filter-dialog-cloud.component'; import { ServiceTaskFiltersCloudComponent } from './components/service-task-filters/service-task-filters-cloud.component'; import { TaskAssignmentFilterCloudComponent } from './components/task-assignment-filter/task-assignment-filter.component'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { APP_LIST_CLOUD_DIRECTIVES } from '../../app/app-list-cloud.module'; -import { GroupCloudComponent } from '../../group/components/group-cloud.component'; -import { PeopleCloudComponent } from '../../people/components/people-cloud.component'; -import { DateRangeFilterComponent } from '../../common/date-range-filter/date-range-filter.component'; +export const TASK_FILTERS_CLOUD_DIRECTIVES = [ + TaskFilterDialogCloudComponent, + TaskFiltersCloudComponent, + ServiceTaskFiltersCloudComponent, + EditTaskFilterCloudComponent, + TaskAssignmentFilterCloudComponent, + EditServiceTaskFilterCloudComponent +] as const; + +/** @deprecated use ...TASK_FILTERS_CLOUD_DIRECTIVES instead */ @NgModule({ - imports: [ - FormsModule, - ReactiveFormsModule, - HttpClientModule, - CommonModule, - MaterialModule, - ...APP_LIST_CLOUD_DIRECTIVES, - CoreModule, - GroupCloudComponent, - DateRangeFilterComponent, - PeopleCloudComponent, - MatProgressSpinnerModule, - TaskFilterDialogCloudComponent, - TaskFiltersCloudComponent, - ServiceTaskFiltersCloudComponent, - EditTaskFilterCloudComponent, - TaskAssignmentFilterCloudComponent, - EditServiceTaskFilterCloudComponent - ], - exports: [TaskFiltersCloudComponent, ServiceTaskFiltersCloudComponent, EditTaskFilterCloudComponent, EditServiceTaskFilterCloudComponent] + imports: [...TASK_FILTERS_CLOUD_DIRECTIVES], + exports: [...TASK_FILTERS_CLOUD_DIRECTIVES] }) export class TaskFiltersCloudModule {}