Skip to content

Commit f6db75f

Browse files
committed
96252: Remove unneeded imports from SharedModule
These are no longer required in SharedModule, so we can remove them from main.js
1 parent 67616a5 commit f6db75f

6 files changed

Lines changed: 13 additions & 19 deletions

File tree

src/app/community-list-page/community-list-page.module.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { CommunityListPageRoutingModule } from './community-list-page.routing.mo
66
import { CommunityListComponent } from './community-list/community-list.component';
77
import { ThemedCommunityListPageComponent } from './themed-community-list-page.component';
88
import { ThemedCommunityListComponent } from './community-list/themed-community-list.component';
9+
import { CdkTreeModule } from '@angular/cdk/tree';
910

1011

1112
const DECLARATIONS = [
@@ -21,13 +22,15 @@ const DECLARATIONS = [
2122
imports: [
2223
CommonModule,
2324
SharedModule,
24-
CommunityListPageRoutingModule
25+
CommunityListPageRoutingModule,
26+
CdkTreeModule,
2527
],
2628
declarations: [
2729
...DECLARATIONS
2830
],
2931
exports: [
3032
...DECLARATIONS,
33+
CdkTreeModule,
3134
],
3235
})
3336
export class CommunityListPageModule {

src/app/shared/form/form.module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ import { FormBuilderService } from './builder/form-builder.service';
3737
import { DsDynamicTypeBindRelationService } from './builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service';
3838
import { FormService } from './form.service';
3939
import { NgxMaskModule } from 'ngx-mask';
40+
import { NgbDatepickerModule, NgbTimepickerModule } from '@ng-bootstrap/ng-bootstrap';
41+
import { CdkTreeModule } from '@angular/cdk/tree';
4042

4143
const COMPONENTS = [
4244
CustomSwitchComponent,
@@ -84,6 +86,9 @@ const DIRECTIVES = [
8486
TranslateModule,
8587
SortablejsModule,
8688
NgxMaskModule.forRoot(),
89+
NgbDatepickerModule,
90+
NgbTimepickerModule,
91+
CdkTreeModule,
8792
],
8893
exports: [
8994
...COMPONENTS,

src/app/shared/search/search.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { SearchComponent } from './search.component';
3131
import { ThemedSearchComponent } from './themed-search.component';
3232
import { ThemedSearchResultsComponent } from './search-results/themed-search-results.component';
3333
import { ThemedSearchSettingsComponent } from './search-settings/themed-search-settings.component';
34+
import { NouisliderModule } from 'ng2-nouislider';
3435

3536
const COMPONENTS = [
3637
SearchComponent,
@@ -91,7 +92,8 @@ export const MODELS = [
9192
missingTranslationHandler: { provide: MissingTranslationHandler, useClass: MissingTranslationHelper },
9293
useDefaultLang: true
9394
}),
94-
SharedModule.withEntryComponents()
95+
SharedModule.withEntryComponents(),
96+
NouisliderModule,
9597
],
9698
exports: [
9799
...COMPONENTS

src/app/shared/shared.module.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,15 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { RouterModule } from '@angular/router';
44
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
5-
import { CdkTreeModule } from '@angular/cdk/tree';
65
import { DragDropModule } from '@angular/cdk/drag-drop';
7-
8-
import { NouisliderModule } from 'ng2-nouislider';
96
import {
10-
NgbDatepickerModule,
117
NgbDropdownModule,
128
NgbNavModule,
139
NgbPaginationModule,
14-
NgbTimepickerModule,
1510
NgbTooltipModule,
1611
NgbTypeaheadModule,
1712
} from '@ng-bootstrap/ng-bootstrap';
1813
import { MissingTranslationHandler, TranslateModule } from '@ngx-translate/core';
19-
import { NgxPaginationModule } from 'ngx-pagination';
2014
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
2115
import { MomentModule } from 'ngx-moment';
2216
import { ConfirmationModalComponent } from './confirmation-modal/confirmation-modal.component';
@@ -256,19 +250,14 @@ const MODULES = [
256250
FormsModule,
257251
InfiniteScrollModule,
258252
NgbNavModule,
259-
NgbDatepickerModule,
260-
NgbTimepickerModule,
261253
NgbTypeaheadModule,
262-
NgxPaginationModule,
263254
NgbPaginationModule,
264255
NgbDropdownModule,
265256
NgbTooltipModule,
266257
ReactiveFormsModule,
267258
RouterModule,
268-
NouisliderModule,
269259
MomentModule,
270260
DragDropModule,
271-
CdkTreeModule,
272261
GoogleRecaptchaModule,
273262
MenuModule,
274263
];

src/themes/custom/eager-theme.module.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { NavbarComponent } from './app/navbar/navbar.component';
77
import { SearchNavbarComponent } from './app/search-navbar/search-navbar.component';
88
import { HeaderComponent } from './app/header/header.component';
99
import { HeaderNavbarWrapperComponent } from './app/header-nav-wrapper/header-navbar-wrapper.component';
10-
import { SearchModule } from '../../app/shared/search/search.module';
1110
import { RootModule } from '../../app/root.module';
1211
import { NavbarModule } from '../../app/navbar/navbar.module';
1312
import { PublicationComponent } from './app/item-page/simple/item-types/publication/publication.component';
@@ -42,7 +41,7 @@ import {
4241
} from './app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component';
4342

4443
import { CommunityListElementComponent } from './app/shared/object-list/community-list-element/community-list-element.component';
45-
import { CollectionListElementComponent} from './app/shared/object-list/collection-list-element/collection-list-element.component';
44+
import { CollectionListElementComponent } from './app/shared/object-list/collection-list-element/collection-list-element.component';
4645

4746

4847
/**
@@ -80,8 +79,6 @@ const DECLARATIONS = [
8079
imports: [
8180
CommonModule,
8281
SharedModule,
83-
SearchModule,
84-
FormsModule,
8582
RootModule,
8683
NavbarModule,
8784
ItemPageModule,

src/themes/dspace/eager-theme.module.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ const DECLARATIONS = [
2929
imports: [
3030
CommonModule,
3131
SharedModule,
32-
SearchModule,
33-
FormsModule,
3432
RootModule,
3533
NavbarModule,
3634
],

0 commit comments

Comments
 (0)