import modules optimization

This commit is contained in:
Giuseppe Digilio
2021-01-14 19:44:46 +01:00
parent 3192d190bb
commit 44454ec378
5 changed files with 20 additions and 34 deletions

View File

@@ -2,7 +2,6 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SharedModule } from '../shared/shared.module';
import { GenericItemPageFieldComponent } from './simple/field-components/specific-field/generic/generic-item-page-field.component';
import { ItemPageComponent } from './simple/item-page.component';
import { ItemPageRoutingModule } from './item-page-routing.module';
@@ -17,17 +16,10 @@ import { FileSectionComponent } from './simple/field-components/file-section/fil
import { CollectionsComponent } from './field-components/collections/collections.component';
import { FullItemPageComponent } from './full/full-item-page.component';
import { FullFileSectionComponent } from './full/field-components/file-section/full-file-section.component';
import { RelatedItemsComponent } from './simple/related-items/related-items-component';
import { SearchPageModule } from '../+search-page/search-page.module';
import { PublicationComponent } from './simple/item-types/publication/publication.component';
import { ItemComponent } from './simple/item-types/shared/item.component';
import { EditItemPageModule } from './edit-item-page/edit-item-page.module';
import { MetadataRepresentationListComponent } from './simple/metadata-representation-list/metadata-representation-list.component';
import { RelatedEntitiesSearchComponent } from './simple/related-entities/related-entities-search/related-entities-search.component';
import { MetadataValuesComponent } from './field-components/metadata-values/metadata-values.component';
import { MetadataFieldWrapperComponent } from './field-components/metadata-field-wrapper/metadata-field-wrapper.component';
import { UploadBitstreamComponent } from './bitstreams/upload/upload-bitstream.component';
import { TabbedRelatedEntitiesSearchComponent } from './simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component';
import { StatisticsModule } from '../statistics/statistics.module';
import { AbstractIncrementalListComponent } from './simple/abstract-incremental-list/abstract-incremental-list.component';
import { UntypedItemComponent } from './simple/item-types/untyped-item/untyped-item.component';
@@ -38,7 +30,6 @@ import { UntypedItemComponent } from './simple/item-types/untyped-item/untyped-i
SharedModule,
ItemPageRoutingModule,
EditItemPageModule,
SearchPageModule,
StatisticsModule.forRoot()
],
declarations: [
@@ -56,25 +47,9 @@ import { UntypedItemComponent } from './simple/item-types/untyped-item/untyped-i
FullFileSectionComponent,
PublicationComponent,
UntypedItemComponent,
RelatedItemsComponent,
ItemComponent,
GenericItemPageFieldComponent,
MetadataRepresentationListComponent,
RelatedEntitiesSearchComponent,
UploadBitstreamComponent,
TabbedRelatedEntitiesSearchComponent,
AbstractIncrementalListComponent,
],
exports: [
ItemComponent,
MetadataValuesComponent,
MetadataFieldWrapperComponent,
GenericItemPageFieldComponent,
RelatedEntitiesSearchComponent,
RelatedItemsComponent,
MetadataRepresentationListComponent,
ItemPageTitleFieldComponent,
TabbedRelatedEntitiesSearchComponent
]
})
export class ItemPageModule {

View File

@@ -4,7 +4,6 @@ import { CoreModule } from '../core/core.module';
import { SharedModule } from '../shared/shared.module';
import { SearchComponent } from './search.component';
import { SidebarService } from '../shared/sidebar/sidebar.service';
import { ConfigurationSearchPageComponent } from './configuration-search-page.component';
import { ConfigurationSearchPageGuard } from './configuration-search-page.guard';
import { SearchTrackerComponent } from './search-tracker.component';
import { StatisticsModule } from '../statistics/statistics.module';
@@ -16,7 +15,6 @@ import { SearchConfigurationService } from '../core/shared/search/search-configu
const components = [
SearchPageComponent,
SearchComponent,
ConfigurationSearchPageComponent,
SearchTrackerComponent
];

View File

@@ -1,7 +1,6 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SharedModule } from '../../shared/shared.module';
import { ItemPageModule } from '../../+item-page/item-page.module';
import { JournalComponent } from './item-pages/journal/journal.component';
import { JournalIssueComponent } from './item-pages/journal-issue/journal-issue.component';
import { JournalVolumeComponent } from './item-pages/journal-volume/journal-volume.component';
@@ -45,8 +44,7 @@ const COMPONENTS = [
@NgModule({
imports: [
CommonModule,
SharedModule,
ItemPageModule
SharedModule
],
declarations: [
...COMPONENTS

View File

@@ -1,7 +1,6 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SharedModule } from '../../shared/shared.module';
import { ItemPageModule } from '../../+item-page/item-page.module';
import { OrgUnitComponent } from './item-pages/org-unit/org-unit.component';
import { PersonComponent } from './item-pages/person/person.component';
import { ProjectComponent } from './item-pages/project/project.component';
@@ -61,8 +60,7 @@ const COMPONENTS = [
@NgModule({
imports: [
CommonModule,
SharedModule,
ItemPageModule
SharedModule
],
declarations: [
...COMPONENTS,

View File

@@ -223,6 +223,12 @@ import { SearchObjects } from './search/search-objects.model';
import { SearchResult } from './search/search-result.model';
import { FacetConfigResponse } from './search/facet-config-response.model';
import { FacetValues } from './search/facet-values.model';
import { GenericItemPageFieldComponent } from '../+item-page/simple/field-components/specific-field/generic/generic-item-page-field.component';
import { MetadataRepresentationListComponent } from '../+item-page/simple/metadata-representation-list/metadata-representation-list.component';
import { RelatedItemsComponent } from '../+item-page/simple/related-items/related-items-component';
import { TabbedRelatedEntitiesSearchComponent } from '../+item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component';
import { RelatedEntitiesSearchComponent } from '../+item-page/simple/related-entities/related-entities-search/related-entities-search.component';
import { ConfigurationSearchPageComponent } from '../+search-page/configuration-search-page.component';
/**
* Declaration needed to make sure all decorator functions are called in time
@@ -452,11 +458,20 @@ const COMPONENTS = [
CommunitySidebarSearchListElementComponent,
];
const SHARED_SEARCH_PAGE_COMPONENTS = [
ConfigurationSearchPageComponent
];
const SHARED_ITEM_PAGE_COMPONENTS = [
MetadataFieldWrapperComponent,
MetadataValuesComponent,
DsoPageEditButtonComponent,
ItemAlertsComponent,
GenericItemPageFieldComponent,
MetadataRepresentationListComponent,
RelatedItemsComponent,
RelatedEntitiesSearchComponent,
TabbedRelatedEntitiesSearchComponent
];
const PROVIDERS = [
@@ -500,7 +515,8 @@ const DIRECTIVES = [
...PIPES,
...COMPONENTS,
...DIRECTIVES,
...SHARED_ITEM_PAGE_COMPONENTS
...SHARED_ITEM_PAGE_COMPONENTS,
...SHARED_SEARCH_PAGE_COMPONENTS
],
providers: [
...PROVIDERS
@@ -510,6 +526,7 @@ const DIRECTIVES = [
...PIPES,
...COMPONENTS,
...SHARED_ITEM_PAGE_COMPONENTS,
...SHARED_SEARCH_PAGE_COMPONENTS,
...DIRECTIVES,
TranslateModule
]