From caa5b1e29ab15fe30c1715c85f18e9cb2e3cea26 Mon Sep 17 00:00:00 2001 From: Adamo Date: Thu, 20 Feb 2025 16:50:47 +0100 Subject: [PATCH] [CST-18016] Fix import suggestion --- ...d-create-item-parent-selector.component.ts | 36 +++++++++++++------ 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts index f6cd552629..feac138c49 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts @@ -1,10 +1,15 @@ import { + ChangeDetectorRef, Component, + EventEmitter, Input, + Output, } from '@angular/core'; import { ThemedComponent } from 'src/app/shared/theme-support/themed.component'; import { CreateItemParentSelectorComponent } from './create-item-parent-selector.component'; +import { ThemeService } from '../../../theme-support/theme.service'; +import { DSpaceObject } from '../../../../core/shared/dspace-object.model'; /** * Themed wrapper for CreateItemParentSelectorComponent @@ -18,20 +23,29 @@ import { CreateItemParentSelectorComponent } from './create-item-parent-selector }) export class ThemedCreateItemParentSelectorComponent extends ThemedComponent { - @Input() entityType: string; + @Input() entityType: string; + @Output() select: EventEmitter = new EventEmitter(); + @Input() emitOnly = true; - protected inAndOutputNames: (keyof CreateItemParentSelectorComponent & keyof this)[] = ['entityType']; + protected inAndOutputNames: (keyof CreateItemParentSelectorComponent & keyof this)[] = ['entityType', 'select', 'emitOnly']; - protected getComponentName(): string { - return 'CreateItemParentSelectorComponent'; - } + constructor( + protected cdr: ChangeDetectorRef, + protected themeService: ThemeService, + ) { + super(cdr, themeService); + } - protected importThemedComponent(themeName: string): Promise { - return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component`); - } + protected getComponentName(): string { + return 'CreateItemParentSelectorComponent'; + } - protected importUnthemedComponent(): Promise { - return import('./create-item-parent-selector.component'); - } + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./create-item-parent-selector.component'); + } }