11import {
2+ ChangeDetectorRef ,
23 Component ,
4+ EventEmitter ,
35 Input ,
6+ Output ,
47} from '@angular/core' ;
58import { ThemedComponent } from 'src/app/shared/theme-support/themed.component' ;
69
710import { CreateItemParentSelectorComponent } from './create-item-parent-selector.component' ;
11+ import { ThemeService } from '../../../theme-support/theme.service' ;
12+ import { DSpaceObject } from '../../../../core/shared/dspace-object.model' ;
813
914/**
1015 * Themed wrapper for CreateItemParentSelectorComponent
@@ -18,20 +23,29 @@ import { CreateItemParentSelectorComponent } from './create-item-parent-selector
1823} )
1924export class ThemedCreateItemParentSelectorComponent
2025 extends ThemedComponent < CreateItemParentSelectorComponent > {
21- @Input ( ) entityType : string ;
26+ @Input ( ) entityType : string ;
27+ @Output ( ) select : EventEmitter < DSpaceObject > = new EventEmitter < DSpaceObject > ( ) ;
28+ @Input ( ) emitOnly = true ;
2229
23- protected inAndOutputNames : ( keyof CreateItemParentSelectorComponent & keyof this) [ ] = [ 'entityType' ] ;
30+ protected inAndOutputNames : ( keyof CreateItemParentSelectorComponent & keyof this) [ ] = [ 'entityType' , 'select' , 'emitOnly '] ;
2431
25- protected getComponentName ( ) : string {
26- return 'CreateItemParentSelectorComponent' ;
27- }
32+ constructor (
33+ protected cdr : ChangeDetectorRef ,
34+ protected themeService : ThemeService ,
35+ ) {
36+ super ( cdr , themeService ) ;
37+ }
2838
29- protected importThemedComponent ( themeName : string ) : Promise < any > {
30- return import ( `../../../../../themes/ ${ themeName } /app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component` ) ;
31- }
39+ protected getComponentName ( ) : string {
40+ return 'CreateItemParentSelectorComponent' ;
41+ }
3242
33- protected importUnthemedComponent ( ) : Promise < any > {
34- return import ( './create-item-parent-selector.component' ) ;
35- }
43+ protected importThemedComponent ( themeName : string ) : Promise < any > {
44+ return import ( `../../../../../themes/${ themeName } /app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component` ) ;
45+ }
46+
47+ protected importUnthemedComponent ( ) : Promise < any > {
48+ return import ( './create-item-parent-selector.component' ) ;
49+ }
3650
3751}
0 commit comments