mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
Merge remote-tracking branch 'upstream/main' into #885-media-viewer
# Conflicts: # package.json # src/app/+item-page/item-page.module.ts # src/app/+item-page/simple/item-types/shared/item.component.ts # yarn.lock
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
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 { SharedModule } from '../shared/shared.module';
|
||||
|
||||
import { ItemPageComponent } from './simple/item-page.component';
|
||||
import { ItemPageRoutingModule } from './item-page-routing.module';
|
||||
@@ -17,20 +16,21 @@ 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';
|
||||
import { JournalEntitiesModule } from '../entity-groups/journal-entities/journal-entities.module';
|
||||
import { ResearchEntitiesModule } from '../entity-groups/research-entities/research-entities.module';
|
||||
|
||||
const ENTRY_COMPONENTS = [
|
||||
// put only entry components that use custom decorator
|
||||
PublicationComponent,
|
||||
UntypedItemComponent
|
||||
];
|
||||
|
||||
import { MediaViewerComponent } from './media-viewer/media-viewer.component';
|
||||
import { MediaViewerVideoComponent } from './media-viewer/media-viewer-video/media-viewer-video.component';
|
||||
@@ -40,12 +40,13 @@ import { NgxGalleryModule } from '@kolkov/ngx-gallery';
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
SharedModule,
|
||||
SharedModule.withEntryComponents(),
|
||||
ItemPageRoutingModule,
|
||||
EditItemPageModule,
|
||||
SearchPageModule,
|
||||
StatisticsModule.forRoot(),
|
||||
NgxGalleryModule,
|
||||
JournalEntitiesModule.withEntryComponents(),
|
||||
ResearchEntitiesModule.withEntryComponents(),
|
||||
NgxGalleryModule,
|
||||
],
|
||||
declarations: [
|
||||
ItemPageComponent,
|
||||
@@ -62,32 +63,24 @@ import { NgxGalleryModule } from '@kolkov/ngx-gallery';
|
||||
FullFileSectionComponent,
|
||||
PublicationComponent,
|
||||
UntypedItemComponent,
|
||||
RelatedItemsComponent,
|
||||
ItemComponent,
|
||||
GenericItemPageFieldComponent,
|
||||
MetadataRepresentationListComponent,
|
||||
RelatedEntitiesSearchComponent,
|
||||
UploadBitstreamComponent,
|
||||
TabbedRelatedEntitiesSearchComponent,
|
||||
AbstractIncrementalListComponent,
|
||||
MediaViewerComponent,
|
||||
MediaViewerComponent,
|
||||
MediaViewerVideoComponent,
|
||||
MediaViewerImageComponent,
|
||||
],
|
||||
exports: [
|
||||
ItemComponent,
|
||||
MetadataValuesComponent,
|
||||
MetadataFieldWrapperComponent,
|
||||
GenericItemPageFieldComponent,
|
||||
RelatedEntitiesSearchComponent,
|
||||
RelatedItemsComponent,
|
||||
MetadataRepresentationListComponent,
|
||||
ItemPageTitleFieldComponent,
|
||||
TabbedRelatedEntitiesSearchComponent,
|
||||
],
|
||||
entryComponents: [
|
||||
PublicationComponent,
|
||||
UntypedItemComponent
|
||||
]
|
||||
})
|
||||
export class ItemPageModule {}
|
||||
export class ItemPageModule {
|
||||
/**
|
||||
* NOTE: this method allows to resolve issue with components that using a custom decorator
|
||||
* which are not loaded during CSR otherwise
|
||||
*/
|
||||
static withEntryComponents() {
|
||||
return {
|
||||
ngModule: ItemPageModule,
|
||||
providers: ENTRY_COMPONENTS.map((component) => ({provide: component}))
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user