Merge pull request #1451 from 4Science/CST-5033-submission-ssr-issue

Fix SSR issue with submission after migrate to angular 11
This commit is contained in:
Tim Donohue
2021-12-14 09:29:17 -06:00
committed by GitHub
11 changed files with 28 additions and 11 deletions

View File

@@ -36,7 +36,7 @@ const ENTRY_COMPONENTS = [
export class AdminSearchModule {
/**
* NOTE: this method allows to resolve issue with components that using a custom decorator
* which are not loaded during CSR otherwise
* which are not loaded during SSR otherwise
*/
static withEntryComponents() {
return {

View File

@@ -28,7 +28,7 @@ const ENTRY_COMPONENTS = [
export class AdminWorkflowModuleModule {
/**
* NOTE: this method allows to resolve issue with components that using a custom decorator
* which are not loaded during CSR otherwise
* which are not loaded during SSR otherwise
*/
static withEntryComponents() {
return {

View File

@@ -34,7 +34,7 @@ const ENTRY_COMPONENTS = [
export class AdminModule {
/**
* NOTE: this method allows to resolve issue with components that using a custom decorator
* which are not loaded during CSR otherwise
* which are not loaded during SSR otherwise
*/
static withEntryComponents() {
return {

View File

@@ -31,7 +31,7 @@ const ENTRY_COMPONENTS = [
export class BrowseByModule {
/**
* NOTE: this method allows to resolve issue with components that using a custom decorator
* which are not loaded during CSR otherwise
* which are not loaded during SSR otherwise
*/
static withEntryComponents() {
return {

View File

@@ -54,7 +54,7 @@ const ENTRY_COMPONENTS = [
export class JournalEntitiesModule {
/**
* NOTE: this method allows to resolve issue with components that using a custom decorator
* which are not loaded during CSR otherwise
* which are not loaded during SSR otherwise
*/
static withEntryComponents() {
return {

View File

@@ -74,7 +74,7 @@ const COMPONENTS = [
export class ResearchEntitiesModule {
/**
* NOTE: this method allows to resolve issue with components that using a custom decorator
* which are not loaded during CSR otherwise
* which are not loaded during SSR otherwise
*/
static withEntryComponents() {
return {

View File

@@ -33,7 +33,7 @@ import { NgxGalleryModule } from '@kolkov/ngx-gallery';
import { MiradorViewerComponent } from './mirador-viewer/mirador-viewer.component';
import { VersionPageComponent } from './version-page/version-page/version-page.component';
import { VersionedItemComponent } from './simple/item-types/versioned-item/versioned-item.component';
import { ThemedFileSectionComponent} from './simple/field-components/file-section/themed-file-section.component';
import { ThemedFileSectionComponent } from './simple/field-components/file-section/themed-file-section.component';
const ENTRY_COMPONENTS = [
@@ -91,7 +91,7 @@ const DECLARATIONS = [
export class ItemPageModule {
/**
* NOTE: this method allows to resolve issue with components that using a custom decorator
* which are not loaded during CSR otherwise
* which are not loaded during SSR otherwise
*/
static withEntryComponents() {
return {

View File

@@ -50,7 +50,7 @@ const ENTRY_COMPONENTS = [
export class MyDspaceSearchModule {
/**
* NOTE: this method allows to resolve issue with components that using a custom decorator
* which are not loaded during CSR otherwise
* which are not loaded during SSR otherwise
*/
static withEntryComponents() {
return {

View File

@@ -58,7 +58,7 @@ const ENTRY_COMPONENTS = [
export class NavbarModule {
/**
* NOTE: this method allows to resolve issue with components that using a custom decorator
* which are not loaded during CSR otherwise
* which are not loaded during SSR otherwise
*/
static withEntryComponents() {
return {

View File

@@ -623,7 +623,7 @@ const DIRECTIVES = [
export class SharedModule {
/**
* NOTE: this method allows to resolve issue with components that using a custom decorator
* which are not loaded during CSR otherwise
* which are not loaded during SSR otherwise
*/
static withEntryComponents() {
return {

View File

@@ -65,6 +65,13 @@ const DECLARATIONS = [
SubmissionImportExternalCollectionComponent
];
const ENTRY_COMPONENTS = [
SubmissionSectionUploadComponent,
SubmissionSectionformComponent,
SubmissionSectionLicenseComponent,
SubmissionSectionCcLicensesComponent
];
@NgModule({
imports: [
CommonModule,
@@ -88,4 +95,14 @@ const DECLARATIONS = [
* This module handles all components that are necessary for the submission process
*/
export class SubmissionModule {
/**
* NOTE: this method allows to resolve issue with components that using a custom decorator
* which are not loaded during SSR otherwise
*/
static withEntryComponents() {
return {
ngModule: SubmissionModule,
providers: ENTRY_COMPONENTS.map((component) => ({provide: component}))
};
}
}