96252: Remove unneeded imports from SharedModule

These are no longer required in SharedModule, so we can remove them from main.js
This commit is contained in:
Yury Bondarenko
2023-01-03 17:05:36 +01:00
parent 67616a5d52
commit f6db75f4f8
6 changed files with 13 additions and 19 deletions

View File

@@ -6,6 +6,7 @@ import { CommunityListPageRoutingModule } from './community-list-page.routing.mo
import { CommunityListComponent } from './community-list/community-list.component'; import { CommunityListComponent } from './community-list/community-list.component';
import { ThemedCommunityListPageComponent } from './themed-community-list-page.component'; import { ThemedCommunityListPageComponent } from './themed-community-list-page.component';
import { ThemedCommunityListComponent } from './community-list/themed-community-list.component'; import { ThemedCommunityListComponent } from './community-list/themed-community-list.component';
import { CdkTreeModule } from '@angular/cdk/tree';
const DECLARATIONS = [ const DECLARATIONS = [
@@ -21,13 +22,15 @@ const DECLARATIONS = [
imports: [ imports: [
CommonModule, CommonModule,
SharedModule, SharedModule,
CommunityListPageRoutingModule CommunityListPageRoutingModule,
CdkTreeModule,
], ],
declarations: [ declarations: [
...DECLARATIONS ...DECLARATIONS
], ],
exports: [ exports: [
...DECLARATIONS, ...DECLARATIONS,
CdkTreeModule,
], ],
}) })
export class CommunityListPageModule { export class CommunityListPageModule {

View File

@@ -37,6 +37,8 @@ import { FormBuilderService } from './builder/form-builder.service';
import { DsDynamicTypeBindRelationService } from './builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service'; import { DsDynamicTypeBindRelationService } from './builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service';
import { FormService } from './form.service'; import { FormService } from './form.service';
import { NgxMaskModule } from 'ngx-mask'; import { NgxMaskModule } from 'ngx-mask';
import { NgbDatepickerModule, NgbTimepickerModule } from '@ng-bootstrap/ng-bootstrap';
import { CdkTreeModule } from '@angular/cdk/tree';
const COMPONENTS = [ const COMPONENTS = [
CustomSwitchComponent, CustomSwitchComponent,
@@ -84,6 +86,9 @@ const DIRECTIVES = [
TranslateModule, TranslateModule,
SortablejsModule, SortablejsModule,
NgxMaskModule.forRoot(), NgxMaskModule.forRoot(),
NgbDatepickerModule,
NgbTimepickerModule,
CdkTreeModule,
], ],
exports: [ exports: [
...COMPONENTS, ...COMPONENTS,

View File

@@ -31,6 +31,7 @@ import { SearchComponent } from './search.component';
import { ThemedSearchComponent } from './themed-search.component'; import { ThemedSearchComponent } from './themed-search.component';
import { ThemedSearchResultsComponent } from './search-results/themed-search-results.component'; import { ThemedSearchResultsComponent } from './search-results/themed-search-results.component';
import { ThemedSearchSettingsComponent } from './search-settings/themed-search-settings.component'; import { ThemedSearchSettingsComponent } from './search-settings/themed-search-settings.component';
import { NouisliderModule } from 'ng2-nouislider';
const COMPONENTS = [ const COMPONENTS = [
SearchComponent, SearchComponent,
@@ -91,7 +92,8 @@ export const MODELS = [
missingTranslationHandler: { provide: MissingTranslationHandler, useClass: MissingTranslationHelper }, missingTranslationHandler: { provide: MissingTranslationHandler, useClass: MissingTranslationHelper },
useDefaultLang: true useDefaultLang: true
}), }),
SharedModule.withEntryComponents() SharedModule.withEntryComponents(),
NouisliderModule,
], ],
exports: [ exports: [
...COMPONENTS ...COMPONENTS

View File

@@ -2,21 +2,15 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { CdkTreeModule } from '@angular/cdk/tree';
import { DragDropModule } from '@angular/cdk/drag-drop'; import { DragDropModule } from '@angular/cdk/drag-drop';
import { NouisliderModule } from 'ng2-nouislider';
import { import {
NgbDatepickerModule,
NgbDropdownModule, NgbDropdownModule,
NgbNavModule, NgbNavModule,
NgbPaginationModule, NgbPaginationModule,
NgbTimepickerModule,
NgbTooltipModule, NgbTooltipModule,
NgbTypeaheadModule, NgbTypeaheadModule,
} from '@ng-bootstrap/ng-bootstrap'; } from '@ng-bootstrap/ng-bootstrap';
import { MissingTranslationHandler, TranslateModule } from '@ngx-translate/core'; import { MissingTranslationHandler, TranslateModule } from '@ngx-translate/core';
import { NgxPaginationModule } from 'ngx-pagination';
import { InfiniteScrollModule } from 'ngx-infinite-scroll'; import { InfiniteScrollModule } from 'ngx-infinite-scroll';
import { MomentModule } from 'ngx-moment'; import { MomentModule } from 'ngx-moment';
import { ConfirmationModalComponent } from './confirmation-modal/confirmation-modal.component'; import { ConfirmationModalComponent } from './confirmation-modal/confirmation-modal.component';
@@ -256,19 +250,14 @@ const MODULES = [
FormsModule, FormsModule,
InfiniteScrollModule, InfiniteScrollModule,
NgbNavModule, NgbNavModule,
NgbDatepickerModule,
NgbTimepickerModule,
NgbTypeaheadModule, NgbTypeaheadModule,
NgxPaginationModule,
NgbPaginationModule, NgbPaginationModule,
NgbDropdownModule, NgbDropdownModule,
NgbTooltipModule, NgbTooltipModule,
ReactiveFormsModule, ReactiveFormsModule,
RouterModule, RouterModule,
NouisliderModule,
MomentModule, MomentModule,
DragDropModule, DragDropModule,
CdkTreeModule,
GoogleRecaptchaModule, GoogleRecaptchaModule,
MenuModule, MenuModule,
]; ];

View File

@@ -7,7 +7,6 @@ import { NavbarComponent } from './app/navbar/navbar.component';
import { SearchNavbarComponent } from './app/search-navbar/search-navbar.component'; import { SearchNavbarComponent } from './app/search-navbar/search-navbar.component';
import { HeaderComponent } from './app/header/header.component'; import { HeaderComponent } from './app/header/header.component';
import { HeaderNavbarWrapperComponent } from './app/header-nav-wrapper/header-navbar-wrapper.component'; import { HeaderNavbarWrapperComponent } from './app/header-nav-wrapper/header-navbar-wrapper.component';
import { SearchModule } from '../../app/shared/search/search.module';
import { RootModule } from '../../app/root.module'; import { RootModule } from '../../app/root.module';
import { NavbarModule } from '../../app/navbar/navbar.module'; import { NavbarModule } from '../../app/navbar/navbar.module';
import { PublicationComponent } from './app/item-page/simple/item-types/publication/publication.component'; import { PublicationComponent } from './app/item-page/simple/item-types/publication/publication.component';
@@ -42,7 +41,7 @@ import {
} from './app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component'; } from './app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component';
import { CommunityListElementComponent } from './app/shared/object-list/community-list-element/community-list-element.component'; import { CommunityListElementComponent } from './app/shared/object-list/community-list-element/community-list-element.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';
/** /**
@@ -80,8 +79,6 @@ const DECLARATIONS = [
imports: [ imports: [
CommonModule, CommonModule,
SharedModule, SharedModule,
SearchModule,
FormsModule,
RootModule, RootModule,
NavbarModule, NavbarModule,
ItemPageModule, ItemPageModule,

View File

@@ -29,8 +29,6 @@ const DECLARATIONS = [
imports: [ imports: [
CommonModule, CommonModule,
SharedModule, SharedModule,
SearchModule,
FormsModule,
RootModule, RootModule,
NavbarModule, NavbarModule,
], ],