|
@@ -4,12 +4,12 @@ import { EvtIconInfo } from '../../ui-components/icon/icon.component';
|
|
|
|
|
|
export interface LemsSelectItemGroup {
|
|
|
label: string;
|
|
|
- items: LemsSelectItem[];
|
|
|
+ lemitems: LemsSelectItem[];
|
|
|
disabled?: boolean;
|
|
|
}
|
|
|
export interface LemsSelectItem {
|
|
|
label: string;
|
|
|
- value: string; // This will be used to identify the items to be selected, by indicating tag name and attributes (for XML)
|
|
|
+ value: string; // This will be used to identify the lemitems to be selected, by indicating tag name and attributes (for XML)
|
|
|
color?: string;
|
|
|
disabled?: boolean;
|
|
|
}
|
|
@@ -20,11 +20,11 @@ export interface LemsSelectItem {
|
|
|
styleUrls: ['./lems-select.component.scss'],
|
|
|
})
|
|
|
export class LemsSelectComponent {
|
|
|
- @Output() selectionLemChange: EventEmitter<LemsSelectItem[]> = new EventEmitter();
|
|
|
+ @Output() selectionChange: EventEmitter<LemsSelectItem[]> = new EventEmitter();
|
|
|
|
|
|
lemsTypes: Array<LemsSelectItem & { group: string }> = (AppConfig.evtSettings.edition.lemsSelectItems || [])
|
|
|
.filter(g => !g.disabled)
|
|
|
- .reduce((x, y) => [...x, ...y.items.filter(i => !i.disabled).map(i => ({ ...i, group: y.label }))], []);
|
|
|
+ .reduce((x, y) => [...x, ...y.lemitems.filter(i => !i.disabled).map(i => ({ ...i, group: y.label }))], []);
|
|
|
|
|
|
iconColor: EvtIconInfo = {
|
|
|
icon: 'circle',
|
|
@@ -36,7 +36,7 @@ export class LemsSelectComponent {
|
|
|
|
|
|
updateSelectedLemTypes(lemsTypes: LemsSelectItem[]) {
|
|
|
if (Array.isArray(lemsTypes)) { // BUGFIX: There is a bug in ng-select change event and second time the parameter is an event
|
|
|
- this.selectionLemChange.emit(lemsTypes);
|
|
|
+ this.selectionChange.emit(lemsTypes);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -46,6 +46,6 @@ export class LemsSelectComponent {
|
|
|
} else {
|
|
|
this.selectedLemTypes = [];
|
|
|
}
|
|
|
- this.selectionLemChange.emit(this.selectedLemTypes);
|
|
|
+ this.selectionChange.emit(this.selectedLemTypes);
|
|
|
}
|
|
|
}
|