Skip to content

Commit caa5b1e

Browse files
committed
[CST-18016] Fix import suggestion
1 parent 81ec674 commit caa5b1e

1 file changed

Lines changed: 25 additions & 11 deletions

File tree

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import {
2+
ChangeDetectorRef,
23
Component,
4+
EventEmitter,
35
Input,
6+
Output,
47
} from '@angular/core';
58
import { ThemedComponent } from 'src/app/shared/theme-support/themed.component';
69

710
import { 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
})
1924
export 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

Comments
 (0)