[DURACOM-191] add deprecated in jsdocs for decorators

This commit is contained in:
Andrea Barbasso
2024-01-19 17:56:24 +01:00
parent d63caf5242
commit 47a257e7a0
22 changed files with 181 additions and 260 deletions

View File

@@ -15,7 +15,6 @@ import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap';
import { BulkAccessBrowseComponent } from './bulk-access/browse/bulk-access-browse.component'; import { BulkAccessBrowseComponent } from './bulk-access/browse/bulk-access-browse.component';
import { BulkAccessSettingsComponent } from './bulk-access/settings/bulk-access-settings.component'; import { BulkAccessSettingsComponent } from './bulk-access/settings/bulk-access-settings.component';
import { SearchModule } from '../shared/search/search.module'; import { SearchModule } from '../shared/search/search.module';
import { AccessControlFormModule } from '../shared/access-control-form-container/access-control-form.module';
/** /**
* Condition for displaying error messages on email form field * Condition for displaying error messages on email form field
@@ -32,7 +31,6 @@ export const ValidateEmailErrorStateMatcher: DynamicErrorMessagesMatcher =
FormModule, FormModule,
NgbAccordionModule, NgbAccordionModule,
SearchModule, SearchModule,
AccessControlFormModule,
EPeopleRegistryComponent, EPeopleRegistryComponent,
EPersonFormComponent, EPersonFormComponent,
GroupsRegistryComponent, GroupsRegistryComponent,

View File

@@ -40,6 +40,7 @@ export const BROWSE_BY_DECORATOR_MAP =
* Decorator used for rendering Browse-By pages by type * Decorator used for rendering Browse-By pages by type
* @param browseByType The type of page * @param browseByType The type of page
* @param theme The optional theme for the component * @param theme The optional theme for the component
* @deprecated
*/ */
export function rendersBrowseBy(browseByType: BrowseByDataType, theme = DEFAULT_THEME) { export function rendersBrowseBy(browseByType: BrowseByDataType, theme = DEFAULT_THEME) {
return function decorator(component: any) { return function decorator(component: any) {

View File

@@ -16,26 +16,24 @@ import { StatisticsModule } from '../statistics/statistics.module';
import { CollectionFormModule } from './collection-form/collection-form.module'; import { CollectionFormModule } from './collection-form/collection-form.module';
import { ThemedCollectionPageComponent } from './themed-collection-page.component'; import { ThemedCollectionPageComponent } from './themed-collection-page.component';
import { ComcolModule } from '../shared/comcol/comcol.module'; import { ComcolModule } from '../shared/comcol/comcol.module';
import { DsoSharedModule } from '../dso-shared/dso-shared.module';
import { DsoPageModule } from '../shared/dso-page/dso-page.module'; import { DsoPageModule } from '../shared/dso-page/dso-page.module';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
StatisticsModule.forRoot(), StatisticsModule.forRoot(),
EditItemPageModule, EditItemPageModule,
CollectionFormModule, CollectionFormModule,
ComcolModule, ComcolModule,
DsoSharedModule, DsoPageModule,
DsoPageModule, CollectionPageComponent,
CollectionPageComponent, ThemedCollectionPageComponent,
ThemedCollectionPageComponent, CreateCollectionPageComponent,
CreateCollectionPageComponent, DeleteCollectionPageComponent,
DeleteCollectionPageComponent, EditItemTemplatePageComponent,
EditItemTemplatePageComponent, ThemedEditItemTemplatePageComponent,
ThemedEditItemTemplatePageComponent, CollectionItemMapperComponent
CollectionItemMapperComponent ],
],
providers: [ providers: [
SearchService, SearchService,
] ]

View File

@@ -1,32 +0,0 @@
import { NgModule } from '@angular/core';
import { DsoEditMetadataComponent } from './dso-edit-metadata/dso-edit-metadata.component';
import { MetadataFieldSelectorComponent } from './dso-edit-metadata/metadata-field-selector/metadata-field-selector.component';
import { DsoEditMetadataFieldValuesComponent } from './dso-edit-metadata/dso-edit-metadata-field-values/dso-edit-metadata-field-values.component';
import { DsoEditMetadataValueComponent } from './dso-edit-metadata/dso-edit-metadata-value/dso-edit-metadata-value.component';
import { DsoEditMetadataHeadersComponent } from './dso-edit-metadata/dso-edit-metadata-headers/dso-edit-metadata-headers.component';
import { DsoEditMetadataValueHeadersComponent } from './dso-edit-metadata/dso-edit-metadata-value-headers/dso-edit-metadata-value-headers.component';
import { ThemedDsoEditMetadataComponent } from './dso-edit-metadata/themed-dso-edit-metadata.component';
@NgModule({
imports: [
DsoEditMetadataComponent,
ThemedDsoEditMetadataComponent,
MetadataFieldSelectorComponent,
DsoEditMetadataFieldValuesComponent,
DsoEditMetadataValueComponent,
DsoEditMetadataHeadersComponent,
DsoEditMetadataValueHeadersComponent
],
exports: [
DsoEditMetadataComponent,
ThemedDsoEditMetadataComponent,
MetadataFieldSelectorComponent,
DsoEditMetadataFieldValuesComponent,
DsoEditMetadataValueComponent,
DsoEditMetadataHeadersComponent,
DsoEditMetadataValueHeadersComponent,
]
})
export class DsoSharedModule {
}

View File

@@ -1,7 +1,7 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { NgbTooltipModule, NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { NgbModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
import { EditItemPageComponent } from './edit-item-page.component'; import { EditItemPageComponent } from './edit-item-page.component';
import { ItemStatusComponent } from './item-status/item-status.component'; import { ItemStatusComponent } from './item-status/item-status.component';
@@ -18,14 +18,22 @@ import { SearchPageModule } from '../../search-page/search-page.module';
import { ItemCollectionMapperComponent } from './item-collection-mapper/item-collection-mapper.component'; import { ItemCollectionMapperComponent } from './item-collection-mapper/item-collection-mapper.component';
import { ItemRelationshipsComponent } from './item-relationships/item-relationships.component'; import { ItemRelationshipsComponent } from './item-relationships/item-relationships.component';
import { EditRelationshipComponent } from './item-relationships/edit-relationship/edit-relationship.component'; import { EditRelationshipComponent } from './item-relationships/edit-relationship/edit-relationship.component';
import { EditRelationshipListComponent } from './item-relationships/edit-relationship-list/edit-relationship-list.component'; import {
EditRelationshipListComponent
} from './item-relationships/edit-relationship-list/edit-relationship-list.component';
import { AbstractItemUpdateComponent } from './abstract-item-update/abstract-item-update.component'; import { AbstractItemUpdateComponent } from './abstract-item-update/abstract-item-update.component';
import { ItemMoveComponent } from './item-move/item-move.component'; import { ItemMoveComponent } from './item-move/item-move.component';
import { ItemEditBitstreamBundleComponent } from './item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component'; import {
ItemEditBitstreamBundleComponent
} from './item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component';
import { BundleDataService } from '../../core/data/bundle-data.service'; import { BundleDataService } from '../../core/data/bundle-data.service';
import { DragDropModule } from '@angular/cdk/drag-drop'; import { DragDropModule } from '@angular/cdk/drag-drop';
import { ItemEditBitstreamDragHandleComponent } from './item-bitstreams/item-edit-bitstream-drag-handle/item-edit-bitstream-drag-handle.component'; import {
import { PaginatedDragAndDropBitstreamListComponent } from './item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component'; ItemEditBitstreamDragHandleComponent
} from './item-bitstreams/item-edit-bitstream-drag-handle/item-edit-bitstream-drag-handle.component';
import {
PaginatedDragAndDropBitstreamListComponent
} from './item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component';
import { VirtualMetadataComponent } from './virtual-metadata/virtual-metadata.component'; import { VirtualMetadataComponent } from './virtual-metadata/virtual-metadata.component';
import { ItemVersionHistoryComponent } from './item-version-history/item-version-history.component'; import { ItemVersionHistoryComponent } from './item-version-history/item-version-history.component';
import { ItemAuthorizationsComponent } from './item-authorizations/item-authorizations.component'; import { ItemAuthorizationsComponent } from './item-authorizations/item-authorizations.component';
@@ -35,60 +43,52 @@ import { ItemVersionsModule } from '../versions/item-versions.module';
import { IdentifierDataService } from '../../core/data/identifier-data.service'; import { IdentifierDataService } from '../../core/data/identifier-data.service';
import { IdentifierDataComponent } from '../../shared/object-list/identifier-data/identifier-data.component'; import { IdentifierDataComponent } from '../../shared/object-list/identifier-data/identifier-data.component';
import { ItemRegisterDoiComponent } from './item-register-doi/item-register-doi.component'; import { ItemRegisterDoiComponent } from './item-register-doi/item-register-doi.component';
import { DsoSharedModule } from '../../dso-shared/dso-shared.module';
import { ItemCurateComponent } from './item-curate/item-curate.component'; import { ItemCurateComponent } from './item-curate/item-curate.component';
import { ThemedItemStatusComponent } from './item-status/themed-item-status.component'; import { ThemedItemStatusComponent } from './item-status/themed-item-status.component';
import { ItemAccessControlComponent } from './item-access-control/item-access-control.component'; import { ItemAccessControlComponent } from './item-access-control/item-access-control.component';
import { ResultsBackButtonModule } from '../../shared/results-back-button/results-back-button.module';
import {
AccessControlFormModule
} from '../../shared/access-control-form-container/access-control-form.module';
/** /**
* Module that contains all components related to the Edit Item page administrator functionality * Module that contains all components related to the Edit Item page administrator functionality
*/ */
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
NgbTooltipModule, NgbTooltipModule,
SearchPageModule, SearchPageModule,
DragDropModule, DragDropModule,
ResourcePoliciesModule, ResourcePoliciesModule,
NgbModule, NgbModule,
ItemVersionsModule, ItemVersionsModule,
DsoSharedModule, EditItemPageComponent,
ResultsBackButtonModule, ItemOperationComponent,
AccessControlFormModule, AbstractSimpleItemActionComponent,
EditItemPageComponent, AbstractItemUpdateComponent,
ItemOperationComponent, ItemWithdrawComponent,
AbstractSimpleItemActionComponent, ItemReinstateComponent,
AbstractItemUpdateComponent, ItemPrivateComponent,
ItemWithdrawComponent, ItemPublicComponent,
ItemReinstateComponent, ItemDeleteComponent,
ItemPrivateComponent, ItemStatusComponent,
ItemPublicComponent, ThemedItemStatusComponent,
ItemDeleteComponent, ItemRelationshipsComponent,
ItemStatusComponent, ItemBitstreamsComponent,
ThemedItemStatusComponent, ItemVersionHistoryComponent,
ItemRelationshipsComponent, ItemEditBitstreamComponent,
ItemBitstreamsComponent, ItemEditBitstreamBundleComponent,
ItemVersionHistoryComponent, PaginatedDragAndDropBitstreamListComponent,
ItemEditBitstreamComponent, EditRelationshipComponent,
ItemEditBitstreamBundleComponent, EditRelationshipListComponent,
PaginatedDragAndDropBitstreamListComponent, ItemCollectionMapperComponent,
EditRelationshipComponent, ItemMoveComponent,
EditRelationshipListComponent, ItemEditBitstreamDragHandleComponent,
ItemCollectionMapperComponent, VirtualMetadataComponent,
ItemMoveComponent, ItemAuthorizationsComponent,
ItemEditBitstreamDragHandleComponent, IdentifierDataComponent,
VirtualMetadataComponent, ItemRegisterDoiComponent,
ItemAuthorizationsComponent, ItemCurateComponent,
IdentifierDataComponent, ItemAccessControlComponent
ItemRegisterDoiComponent, ],
ItemCurateComponent,
ItemAccessControlComponent
],
providers: [ providers: [
BundleDataService, BundleDataService,
IdentifierDataService, IdentifierDataService,

View File

@@ -43,7 +43,6 @@ import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap';
import { OrcidSyncSettingsComponent } from './orcid-page/orcid-sync-settings/orcid-sync-settings.component'; import { OrcidSyncSettingsComponent } from './orcid-page/orcid-sync-settings/orcid-sync-settings.component';
import { OrcidQueueComponent } from './orcid-page/orcid-queue/orcid-queue.component'; import { OrcidQueueComponent } from './orcid-page/orcid-queue/orcid-queue.component';
import { UploadModule } from '../shared/upload/upload.module'; import { UploadModule } from '../shared/upload/upload.module';
import { ResultsBackButtonModule } from '../shared/results-back-button/results-back-button.module';
import { ItemAlertsComponent } from './alerts/item-alerts.component'; import { ItemAlertsComponent } from './alerts/item-alerts.component';
import { ItemVersionsModule } from './versions/item-versions.module'; import { ItemVersionsModule } from './versions/item-versions.module';
import { import {
@@ -96,18 +95,17 @@ const DECLARATIONS = [
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
EditItemPageModule, EditItemPageModule,
ItemVersionsModule, ItemVersionsModule,
ItemSharedModule, ItemSharedModule,
StatisticsModule.forRoot(), StatisticsModule.forRoot(),
NgxGalleryModule, NgxGalleryModule,
NgbAccordionModule, NgbAccordionModule,
ResultsBackButtonModule, UploadModule,
UploadModule, DsoPageModule,
DsoPageModule, ...DECLARATIONS
...DECLARATIONS ],
],
exports: [ exports: [
...DECLARATIONS, ...DECLARATIONS,
] ]

View File

@@ -1,22 +1,21 @@
import {ComponentFixture, fakeAsync, TestBed} from '@angular/core/testing'; import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
import {NgbDatepickerModule, NgbModal, NgbModalRef} from '@ng-bootstrap/ng-bootstrap'; import { NgbDatepickerModule, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import {Component} from '@angular/core'; import { Component } from '@angular/core';
import {of} from 'rxjs'; import { of } from 'rxjs';
import {AccessControlFormContainerComponent} from './access-control-form-container.component'; import { AccessControlFormContainerComponent } from './access-control-form-container.component';
import {BulkAccessControlService} from './bulk-access-control.service'; import { BulkAccessControlService } from './bulk-access-control.service';
import {BulkAccessConfigDataService} from '../../core/config/bulk-access-config-data.service'; import { BulkAccessConfigDataService } from '../../core/config/bulk-access-config-data.service';
import {Item} from '../../core/shared/item.model'; import { Item } from '../../core/shared/item.model';
import {SelectableListService} from '../object-list/selectable-list/selectable-list.service'; import { SelectableListService } from '../object-list/selectable-list/selectable-list.service';
import {createAccessControlInitialFormState} from './access-control-form-container-intial-state'; import { createAccessControlInitialFormState } from './access-control-form-container-intial-state';
import {CommonModule} from '@angular/common'; import { CommonModule } from '@angular/common';
import {SharedBrowseByModule} from '../browse-by/shared-browse-by.module'; import { SharedBrowseByModule } from '../browse-by/shared-browse-by.module';
import {TranslateModule} from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import {FormsModule} from '@angular/forms'; import { FormsModule } from '@angular/forms';
import {UiSwitchModule} from 'ngx-ui-switch'; import { UiSwitchModule } from 'ngx-ui-switch';
import { import {
ITEM_ACCESS_CONTROL_SELECT_BITSTREAMS_LIST_ID ITEM_ACCESS_CONTROL_SELECT_BITSTREAMS_LIST_ID
} from './item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component'; } from './item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component';
import {AccessControlFormModule} from './access-control-form.module';
describe('AccessControlFormContainerComponent', () => { describe('AccessControlFormContainerComponent', () => {
@@ -31,7 +30,6 @@ describe('AccessControlFormContainerComponent', () => {
imports: [CommonModule, imports: [CommonModule,
FormsModule, FormsModule,
SharedBrowseByModule, SharedBrowseByModule,
AccessControlFormModule,
NgbDatepickerModule, NgbDatepickerModule,
UiSwitchModule] UiSwitchModule]
}) })
@@ -65,7 +63,6 @@ describe('AccessControlFormContainerComponent', () => {
CommonModule, CommonModule,
FormsModule, FormsModule,
SharedBrowseByModule, SharedBrowseByModule,
AccessControlFormModule,
TranslateModule.forRoot(), TranslateModule.forRoot(),
NgbDatepickerModule, NgbDatepickerModule,
UiSwitchModule, UiSwitchModule,

View File

@@ -1,28 +0,0 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {TranslateModule} from '@ngx-translate/core';
import {UiSwitchModule} from 'ngx-ui-switch';
import {AccessControlArrayFormComponent} from './access-control-array-form/access-control-array-form.component';
import {
ItemAccessControlSelectBitstreamsModalComponent
} from './item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component';
import {AccessControlFormContainerComponent} from './access-control-form-container.component';
import {NgbDatepickerModule} from '@ng-bootstrap/ng-bootstrap';
import {ToDatePipe} from './access-control-array-form/to-date.pipe';
@NgModule({
imports: [
CommonModule,
TranslateModule,
UiSwitchModule,
NgbDatepickerModule,
AccessControlFormContainerComponent,
AccessControlArrayFormComponent,
ItemAccessControlSelectBitstreamsModalComponent,
ToDatePipe
],
exports: [AccessControlFormContainerComponent, AccessControlArrayFormComponent]
})
export class AccessControlFormModule {}

View File

@@ -2,7 +2,6 @@ import { NgModule } from '@angular/core';
import { BrowseByComponent } from './browse-by.component'; import { BrowseByComponent } from './browse-by.component';
import { ThemedBrowseByComponent } from './themed-browse-by.component'; import { ThemedBrowseByComponent } from './themed-browse-by.component';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { ResultsBackButtonModule } from '../results-back-button/results-back-button.module';
const DECLARATIONS = [ const DECLARATIONS = [
BrowseByComponent, BrowseByComponent,
@@ -11,10 +10,9 @@ const DECLARATIONS = [
@NgModule({ @NgModule({
imports: [ imports: [
ResultsBackButtonModule, CommonModule,
CommonModule, ...DECLARATIONS
...DECLARATIONS, ],
],
exports: [ exports: [
...DECLARATIONS, ...DECLARATIONS,
] ]

View File

@@ -13,6 +13,9 @@ export const AUTH_METHOD_FOR_DECORATOR_MAP = new Map<AuthMethodType, AuthMethodT
[AuthMethodType.Orcid, LogInExternalProviderComponent] [AuthMethodType.Orcid, LogInExternalProviderComponent]
]); ]);
/**
* @deprecated
*/
export function renderAuthMethodFor(authMethodType: AuthMethodType) { export function renderAuthMethodFor(authMethodType: AuthMethodType) {
return function decorator(objectElement: any) { return function decorator(objectElement: any) {
if (!objectElement) { if (!objectElement) {

View File

@@ -14,6 +14,7 @@ menuMenuItemComponentMap.set(MenuItemType.TEXT, TextMenuItemComponent);
/** /**
* Decorator function to link a MenuItemType to a Component * Decorator function to link a MenuItemType to a Component
* @param {MenuItemType} type The MenuItemType of the MenuSection's model * @param {MenuItemType} type The MenuItemType of the MenuSection's model
* @deprecated
* @returns {(sectionComponent: GenericContructor) => void} * @returns {(sectionComponent: GenericContructor) => void}
*/ */
export function rendersMenuItemForType(type: MenuItemType) { export function rendersMenuItemForType(type: MenuItemType) {

View File

@@ -38,6 +38,7 @@ menuComponentMap.get(MenuID.DSO_EDIT).get(true).set(DEFAULT_THEME, DsoEditMenuEx
* Decorator function to render a MenuSection for a menu * Decorator function to render a MenuSection for a menu
* @param {MenuID} menuID The ID of the Menu in which the section is rendered * @param {MenuID} menuID The ID of the Menu in which the section is rendered
* @param {boolean} expandable True when the section should be expandable, false when if should not * @param {boolean} expandable True when the section should be expandable, false when if should not
* @deprecated
* @returns {(menuSectionWrapperComponent: GenericConstructor) => void} * @returns {(menuSectionWrapperComponent: GenericConstructor) => void}
*/ */
export function rendersSectionForMenu(menuID: MenuID, expandable: boolean, theme = DEFAULT_THEME) { export function rendersSectionForMenu(menuID: MenuID, expandable: boolean, theme = DEFAULT_THEME) {

View File

@@ -74,6 +74,7 @@ export const METADATA_REPRESENTATION_COMPONENT_DECORATOR_MAP =
* @param mdRepresentationType The metadata representation type the component represents * @param mdRepresentationType The metadata representation type the component represents
* @param context The optional context the component represents * @param context The optional context the component represents
* @param theme The optional theme for the component * @param theme The optional theme for the component
* @deprecated
*/ */
export function metadataRepresentationComponent(entityType: string, mdRepresentationType: MetadataRepresentationType, context: Context = DEFAULT_CONTEXT, theme = DEFAULT_THEME) { export function metadataRepresentationComponent(entityType: string, mdRepresentationType: MetadataRepresentationType, context: Context = DEFAULT_CONTEXT, theme = DEFAULT_THEME) {
return function decorator(component: any) { return function decorator(component: any) {

View File

@@ -75,6 +75,7 @@ export function rendersWorkflowTaskOption(option: string) {
/** /**
* Decorator used for rendering AdvancedClaimedTaskActions pages by option type * Decorator used for rendering AdvancedClaimedTaskActions pages by option type
* @deprecated
*/ */
export function rendersAdvancedWorkflowTaskOption(option: string) { export function rendersAdvancedWorkflowTaskOption(option: string) {
return function decorator(component: any) { return function decorator(component: any) {

View File

@@ -1,20 +0,0 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
import { ResultsBackButtonComponent } from './results-back-button.component';
import { ThemedResultsBackButtonComponent } from './themed-results-back-button.component';
@NgModule({
imports: [
CommonModule,
TranslateModule,
ResultsBackButtonComponent,
ThemedResultsBackButtonComponent
],
exports: [
ThemedResultsBackButtonComponent
]
})
export class ResultsBackButtonModule {
}

View File

@@ -19,6 +19,7 @@ filterTypeMap.set(FilterType.range, SearchRangeFilterComponent);
/** /**
* Sets the mapping for a facet component in relation to a filter type * Sets the mapping for a facet component in relation to a filter type
* @param {FilterType} type The type for which the matching component is mapped * @param {FilterType} type The type for which the matching component is mapped
* @deprecated
* @returns Decorator function that performs the actual mapping on initialization of the facet component * @returns Decorator function that performs the actual mapping on initialization of the facet component
*/ */
export function renderFacetFor(type: FilterType) { export function renderFacetFor(type: FilterType) {

View File

@@ -18,6 +18,7 @@ export const STARTS_WITH_DECORATOR_MAP = new Map<StartsWithType, StartsWithCompo
/** /**
* Fetch a decorator to render a StartsWith component for type * Fetch a decorator to render a StartsWith component for type
* @param type * @param type
* @deprecated
*/ */
export function renderStartsWithFor(type: StartsWithType) { export function renderStartsWithFor(type: StartsWithType) {
return function decorator(objectElement: any) { return function decorator(objectElement: any) {

View File

@@ -17,6 +17,9 @@ submissionSectionsMap.set(SectionsType.Upload, SubmissionSectionUploadComponent)
submissionSectionsMap.set(SectionsType.SubmissionForm, SubmissionSectionFormComponent); submissionSectionsMap.set(SectionsType.SubmissionForm, SubmissionSectionFormComponent);
submissionSectionsMap.set(SectionsType.Identifiers, SubmissionSectionIdentifiersComponent); submissionSectionsMap.set(SectionsType.Identifiers, SubmissionSectionIdentifiersComponent);
/**
* @deprecated
*/
export function renderSectionFor(sectionType: SectionsType) { export function renderSectionFor(sectionType: SectionsType) {
return function decorator(objectElement: any) { return function decorator(objectElement: any) {
if (!objectElement) { if (!objectElement) {

View File

@@ -20,28 +20,32 @@ import {
import { UntypedItemComponent } from './app/item-page/simple/item-types/untyped-item/untyped-item.component'; import { UntypedItemComponent } from './app/item-page/simple/item-types/untyped-item/untyped-item.component';
import { ItemSharedModule } from '../../app/item-page/item-shared.module'; import { ItemSharedModule } from '../../app/item-page/item-shared.module';
import { import {
CreateCollectionParentSelectorComponent CreateCollectionParentSelectorComponent
} from './app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component'; } from './app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component';
import { import {
CreateCommunityParentSelectorComponent CreateCommunityParentSelectorComponent
} from './app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component'; } from './app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component';
import { import {
CreateItemParentSelectorComponent CreateItemParentSelectorComponent
} from './app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component'; } from './app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component';
import { import {
EditCollectionSelectorComponent EditCollectionSelectorComponent
} from './app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component'; } from './app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component';
import { import {
EditCommunitySelectorComponent EditCommunitySelectorComponent
} from './app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component'; } from './app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component';
import { import {
EditItemSelectorComponent EditItemSelectorComponent
} 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 {
import { CollectionListElementComponent} from './app/shared/object-list/collection-list-element/collection-list-element.component'; 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 { CollectionDropdownComponent } from './app/shared/collection-dropdown/collection-dropdown.component'; import { CollectionDropdownComponent } from './app/shared/collection-dropdown/collection-dropdown.component';
import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-by.module'; import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-by.module';
import { ResultsBackButtonModule } from '../../app/shared/results-back-button/results-back-button.module';
import { DsoPageModule } from '../../app/shared/dso-page/dso-page.module'; import { DsoPageModule } from '../../app/shared/dso-page/dso-page.module';
import { FileDownloadLinkComponent } from './app/shared/file-download-link/file-download-link.component'; import { FileDownloadLinkComponent } from './app/shared/file-download-link/file-download-link.component';
import { StartsWithDateComponent } from './app/shared/starts-with/date/starts-with-date.component'; import { StartsWithDateComponent } from './app/shared/starts-with/date/starts-with-date.component';
@@ -52,9 +56,13 @@ import {
import { import {
ItemSearchResultListElementComponent ItemSearchResultListElementComponent
} from './app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component'; } from './app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component';
import { TopLevelCommunityListComponent } from './app/home-page/top-level-community-list/top-level-community-list.component'; import {
TopLevelCommunityListComponent
} from './app/home-page/top-level-community-list/top-level-community-list.component';
import { LogInComponent } from './app/shared/log-in/log-in.component'; import { LogInComponent } from './app/shared/log-in/log-in.component';
import { BrowseEntryListElementComponent } from './app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component'; import {
BrowseEntryListElementComponent
} from './app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component';
import { PersonComponent } from './app/entity-groups/research-entities/item-pages/person/person.component'; import { PersonComponent } from './app/entity-groups/research-entities/item-pages/person/person.component';
import { LangSwitchComponent } from './app/shared/lang-switch/lang-switch.component'; import { LangSwitchComponent } from './app/shared/lang-switch/lang-switch.component';
@@ -102,16 +110,15 @@ const DECLARATIONS = [
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
RootModule, RootModule,
NavbarModule, NavbarModule,
SharedBrowseByModule, SharedBrowseByModule,
ResultsBackButtonModule, ItemPageModule,
ItemPageModule, ItemSharedModule,
ItemSharedModule, DsoPageModule,
DsoPageModule, ...DECLARATIONS
...DECLARATIONS ],
],
providers: [ providers: [
...ENTRY_COMPONENTS.map((component) => ({ provide: component })) ...ENTRY_COMPONENTS.map((component) => ({ provide: component }))
] ]

View File

@@ -110,7 +110,6 @@ import {
ExternalSourceEntryImportModalComponent ExternalSourceEntryImportModalComponent
} from './app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component'; } from './app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component';
import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-by.module'; import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-by.module';
import { ResultsBackButtonModule } from '../../app/shared/results-back-button/results-back-button.module';
import { ItemVersionsModule } from '../../app/item-page/versions/item-versions.module'; import { ItemVersionsModule } from '../../app/item-page/versions/item-versions.module';
import { ItemSharedModule } from '../../app/item-page/item-shared.module'; import { ItemSharedModule } from '../../app/item-page/item-shared.module';
import { SearchFiltersComponent } from './app/shared/search/search-filters/search-filters.component'; import { SearchFiltersComponent } from './app/shared/search/search-filters/search-filters.component';
@@ -126,7 +125,6 @@ import {
} from './app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component'; } from './app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component';
import { ResultsBackButtonComponent } from './app/shared/results-back-button/results-back-button.component'; import { ResultsBackButtonComponent } from './app/shared/results-back-button/results-back-button.component';
import { DsoEditMetadataComponent } from './app/dso-shared/dso-edit-metadata/dso-edit-metadata.component'; import { DsoEditMetadataComponent } from './app/dso-shared/dso-edit-metadata/dso-edit-metadata.component';
import { DsoSharedModule } from '../../app/dso-shared/dso-shared.module';
import { SystemWideAlertModule } from '../../app/system-wide-alert/system-wide-alert.module'; import { SystemWideAlertModule } from '../../app/system-wide-alert/system-wide-alert.module';
import { DsoPageModule } from '../../app/shared/dso-page/dso-page.module'; import { DsoPageModule } from '../../app/shared/dso-page/dso-page.module';
import { ItemAlertsComponent } from './app/item-page/alerts/item-alerts.component'; import { ItemAlertsComponent } from './app/item-page/alerts/item-alerts.component';
@@ -260,48 +258,46 @@ const DECLARATIONS = [
@NgModule({ @NgModule({
imports: [ imports: [
AppModule, AppModule,
RootModule, RootModule,
CollectionFormModule, CollectionFormModule,
CollectionPageModule, CollectionPageModule,
CommonModule, CommonModule,
CommunityFormModule, CommunityFormModule,
DragDropModule, DragDropModule,
ItemSharedModule, ItemSharedModule,
ItemPageModule, ItemPageModule,
EditItemPageModule, EditItemPageModule,
ItemVersionsModule, ItemVersionsModule,
FormsModule, FormsModule,
HttpClientModule, HttpClientModule,
IdlePreloadModule, IdlePreloadModule,
InfoModule, InfoModule,
MenuModule, MenuModule,
DsoPageModule, DsoPageModule,
NavbarModule, NavbarModule,
NgbModule, NgbModule,
RegisterEmailFormModule, RegisterEmailFormModule,
RouterModule, RouterModule,
ScrollToModule, ScrollToModule,
SearchPageModule, SearchPageModule,
SharedBrowseByModule, SharedBrowseByModule,
ResultsBackButtonModule, StatisticsModule,
StatisticsModule, StatisticsPageModule,
StatisticsPageModule, StoreModule,
StoreModule, StoreRouterConnectingModule,
StoreRouterConnectingModule, TranslateModule,
TranslateModule, SubmissionModule,
SubmissionModule, MyDSpacePageModule,
MyDSpacePageModule, SearchModule,
SearchModule, FormsModule,
FormsModule, ResourcePoliciesModule,
ResourcePoliciesModule, ComcolModule,
ComcolModule, SystemWideAlertModule,
DsoSharedModule, NgxGalleryModule,
SystemWideAlertModule, FormModule,
NgxGalleryModule, ...DECLARATIONS
FormModule, ],
...DECLARATIONS
],
exports: [ exports: [
CommunityPageSubCollectionListComponent CommunityPageSubCollectionListComponent
] ]

View File

@@ -7,7 +7,6 @@ import { HeaderNavbarWrapperComponent } from './app/header-nav-wrapper/header-na
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 { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-by.module'; import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-by.module';
import { ResultsBackButtonModule } from '../../app/shared/results-back-button/results-back-button.module';
/** /**
* Add components that use a custom decorator to ENTRY_COMPONENTS as well as DECLARATIONS. * Add components that use a custom decorator to ENTRY_COMPONENTS as well as DECLARATIONS.
@@ -25,13 +24,12 @@ const DECLARATIONS = [
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
SharedBrowseByModule, SharedBrowseByModule,
ResultsBackButtonModule, RootModule,
RootModule, NavbarModule,
NavbarModule, ...DECLARATIONS
...DECLARATIONS ],
],
providers: [ providers: [
...ENTRY_COMPONENTS.map((component) => ({ provide: component })) ...ENTRY_COMPONENTS.map((component) => ({ provide: component }))
] ]

View File

@@ -30,7 +30,6 @@ import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resou
import { ComcolModule } from '../../app/shared/comcol/comcol.module'; import { ComcolModule } from '../../app/shared/comcol/comcol.module';
import { RootModule } from '../../app/root.module'; import { RootModule } from '../../app/root.module';
import { BrowseByPageModule } from '../../app/browse-by/browse-by-page.module'; import { BrowseByPageModule } from '../../app/browse-by/browse-by-page.module';
import { ResultsBackButtonModule } from '../../app/shared/results-back-button/results-back-button.module';
import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-by.module'; import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-by.module';
import { ItemVersionsModule } from '../../app/item-page/versions/item-versions.module'; import { ItemVersionsModule } from '../../app/item-page/versions/item-versions.module';
import { ItemSharedModule } from 'src/app/item-page/item-shared.module'; import { ItemSharedModule } from 'src/app/item-page/item-shared.module';
@@ -43,7 +42,6 @@ const DECLARATIONS = [
AppModule, AppModule,
RootModule, RootModule,
BrowseByPageModule, BrowseByPageModule,
ResultsBackButtonModule,
CollectionFormModule, CollectionFormModule,
CollectionPageModule, CollectionPageModule,
CommonModule, CommonModule,
@@ -75,8 +73,8 @@ const DECLARATIONS = [
SearchModule, SearchModule,
FormsModule, FormsModule,
ResourcePoliciesModule, ResourcePoliciesModule,
ComcolModule, ComcolModule
], ],
declarations: DECLARATIONS, declarations: DECLARATIONS,
}) })