@siemens/element-ng 47.2.0 → 47.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -6
- package/autocomplete/index.d.ts +8 -0
- package/autocomplete/package.json +3 -0
- package/autocomplete/si-autocomplete-listbox.directive.d.ts +31 -0
- package/autocomplete/si-autocomplete-option.directive.d.ts +31 -0
- package/autocomplete/si-autocomplete.directive.d.ts +14 -0
- package/autocomplete/si-autocomplete.model.d.ts +7 -0
- package/autocomplete/si-autocomplete.module.d.ts +9 -0
- package/badge/index.d.ts +5 -0
- package/badge/package.json +3 -0
- package/badge/si-badge.component.d.ts +17 -0
- package/content-action-bar/index.d.ts +7 -0
- package/content-action-bar/package.json +3 -0
- package/content-action-bar/si-content-action-bar-toggle.component.d.ts +6 -0
- package/content-action-bar/si-content-action-bar.component.d.ts +72 -0
- package/content-action-bar/si-content-action-bar.model.d.ts +9 -0
- package/content-action-bar/si-content-action-bar.module.d.ts +7 -0
- package/fesm2022/siemens-element-ng-application-header.mjs +2 -2
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-autocomplete.mjs +235 -0
- package/fesm2022/siemens-element-ng-autocomplete.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-badge.mjs +59 -0
- package/fesm2022/siemens-element-ng-badge.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-common.mjs +1 -1
- package/fesm2022/siemens-element-ng-common.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +200 -0
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-form.mjs +827 -0
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-icon-status.mjs +65 -0
- package/fesm2022/siemens-element-ng-icon-status.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-icon.mjs +12 -2
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-language-switcher.mjs +90 -0
- package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-number-input.mjs +267 -0
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-password-strength.mjs +177 -0
- package/fesm2022/siemens-element-ng-password-strength.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-pills-input.mjs +397 -0
- package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-popover-next.mjs +259 -0
- package/fesm2022/siemens-element-ng-popover-next.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-popover.mjs +256 -0
- package/fesm2022/siemens-element-ng-popover.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-progressbar.mjs +83 -0
- package/fesm2022/siemens-element-ng-progressbar.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-select.mjs +1166 -0
- package/fesm2022/siemens-element-ng-select.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-skip-links.mjs +117 -0
- package/fesm2022/siemens-element-ng-skip-links.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-summary-widget.mjs +77 -0
- package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-toast-notification.mjs +227 -0
- package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +746 -0
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-wizard.mjs +465 -0
- package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -0
- package/form/form-fieldset/si-form-fieldset.component.d.ts +40 -0
- package/form/index.d.ts +14 -0
- package/form/package.json +3 -0
- package/form/si-form-container/si-form-container.component.d.ts +155 -0
- package/form/si-form-item/si-form-field-native.control.d.ts +22 -0
- package/form/si-form-item/si-form-item.component.d.ts +90 -0
- package/form/si-form-item-control-input.directive.d.ts +18 -0
- package/form/si-form-item.control.d.ts +35 -0
- package/form/si-form-validation-error.model.d.ts +55 -0
- package/form/si-form-validation-error.provider.d.ts +11 -0
- package/form/si-form-validation-error.service.d.ts +42 -0
- package/form/si-form-validation-tooltip/si-form-validation-tooltip.component.d.ts +13 -0
- package/form/si-form-validation-tooltip/si-form-validation-tooltip.directive.d.ts +42 -0
- package/form/si-form.module.d.ts +25 -0
- package/icon/element-icons.d.ts +10 -0
- package/icon-status/index.d.ts +6 -0
- package/icon-status/package.json +3 -0
- package/icon-status/si-icon-status.component.d.ts +24 -0
- package/icon-status/si-icon-status.module.d.ts +7 -0
- package/language-switcher/index.d.ts +7 -0
- package/language-switcher/iso-language-value.d.ts +14 -0
- package/language-switcher/package.json +3 -0
- package/language-switcher/si-language-switcher.component.d.ts +32 -0
- package/language-switcher/si-language-switcher.module.d.ts +7 -0
- package/number-input/index.d.ts +6 -0
- package/number-input/package.json +3 -0
- package/number-input/si-number-input.component.d.ts +106 -0
- package/number-input/si-number-input.module.d.ts +7 -0
- package/package.json +75 -3
- package/password-strength/index.d.ts +7 -0
- package/password-strength/package.json +3 -0
- package/password-strength/si-password-strength.component.d.ts +25 -0
- package/password-strength/si-password-strength.directive.d.ts +54 -0
- package/password-strength/si-password-strength.module.d.ts +8 -0
- package/pills-input/index.d.ts +9 -0
- package/pills-input/package.json +3 -0
- package/pills-input/si-input-pill.component.d.ts +9 -0
- package/pills-input/si-pills-input-csv.directive.d.ts +8 -0
- package/pills-input/si-pills-input-email.directive.d.ts +10 -0
- package/pills-input/si-pills-input-pattern-base.d.ts +19 -0
- package/pills-input/si-pills-input-value-handler.d.ts +12 -0
- package/pills-input/si-pills-input.component.d.ts +87 -0
- package/pills-input/si-pills-input.module.d.ts +9 -0
- package/popover/index.d.ts +6 -0
- package/popover/package.json +3 -0
- package/popover/si-popover.component.d.ts +26 -0
- package/popover/si-popover.directive.d.ts +89 -0
- package/popover/si-popover.module.d.ts +7 -0
- package/popover-next/index.d.ts +7 -0
- package/popover-next/package.json +3 -0
- package/popover-next/si-popover-description.directive.d.ts +7 -0
- package/popover-next/si-popover-next.directive.d.ts +61 -0
- package/popover-next/si-popover-title.directive.d.ts +7 -0
- package/popover-next/si-popover.component.d.ts +27 -0
- package/progressbar/index.d.ts +6 -0
- package/progressbar/package.json +3 -0
- package/progressbar/si-progressbar.component.d.ts +43 -0
- package/progressbar/si-progressbar.module.d.ts +7 -0
- package/select/index.d.ts +18 -0
- package/select/options/si-select-complex-options.directive.d.ts +69 -0
- package/select/options/si-select-lazy-options.directive.d.ts +38 -0
- package/select/options/si-select-option.source.d.ts +49 -0
- package/select/options/si-select-options-strategy.base.d.ts +35 -0
- package/select/options/si-select-options-strategy.d.ts +37 -0
- package/select/options/si-select-simple-options.directive.d.ts +34 -0
- package/select/package.json +3 -0
- package/select/select-input/si-select-input.component.d.ts +43 -0
- package/select/select-list/si-select-list-has-filter.component.d.ts +20 -0
- package/select/select-list/si-select-list.base.d.ts +37 -0
- package/select/select-list/si-select-list.component.d.ts +15 -0
- package/select/select-option/si-select-option-row.component.d.ts +16 -0
- package/select/select-option/si-select-option.component.d.ts +9 -0
- package/select/selection/si-select-multi-value.directive.d.ts +26 -0
- package/select/selection/si-select-selection-strategy.d.ts +58 -0
- package/select/selection/si-select-single-value.directive.d.ts +26 -0
- package/select/si-select-action.directive.d.ts +12 -0
- package/select/si-select-actions.directive.d.ts +5 -0
- package/select/si-select-group-template.directive.d.ts +20 -0
- package/select/si-select-option-row-template.directive.d.ts +9 -0
- package/select/si-select-option-template.directive.d.ts +21 -0
- package/select/si-select.component.d.ts +96 -0
- package/select/si-select.module.d.ts +15 -0
- package/select/si-select.types.d.ts +65 -0
- package/skip-links/index.d.ts +5 -0
- package/skip-links/package.json +3 -0
- package/skip-links/si-skip-link-target.directive.d.ts +27 -0
- package/skip-links/si-skip-links.component.d.ts +9 -0
- package/skip-links/skip-link.service.d.ts +14 -0
- package/summary-widget/index.d.ts +5 -0
- package/summary-widget/package.json +3 -0
- package/summary-widget/si-summary-widget.component.d.ts +44 -0
- package/template-i18n.json +29 -1
- package/toast-notification/index.d.ts +6 -0
- package/toast-notification/package.json +3 -0
- package/toast-notification/si-toast-notification/si-toast-notification.component.d.ts +17 -0
- package/toast-notification/si-toast-notification-drawer/si-toast-notification-drawer.component.d.ts +9 -0
- package/toast-notification/si-toast-notification.service.d.ts +41 -0
- package/toast-notification/si-toast.model.d.ts +25 -0
- package/translate/si-translatable-keys.interface.d.ts +28 -0
- package/typeahead/index.d.ts +8 -0
- package/typeahead/package.json +3 -0
- package/typeahead/si-typeahead-item-template.directive.d.ts +7 -0
- package/typeahead/si-typeahead.component.d.ts +22 -0
- package/typeahead/si-typeahead.directive.d.ts +196 -0
- package/typeahead/si-typeahead.model.d.ts +60 -0
- package/typeahead/si-typeahead.module.d.ts +8 -0
- package/typeahead/si-typeahead.sorting.d.ts +10 -0
- package/wizard/index.d.ts +7 -0
- package/wizard/package.json +3 -0
- package/wizard/si-wizard-step.component.d.ts +21 -0
- package/wizard/si-wizard.component.d.ts +196 -0
- package/wizard/si-wizard.module.d.ts +8 -0
|
@@ -0,0 +1,1166 @@
|
|
|
1
|
+
import * as i1$3 from '@angular/cdk/overlay';
|
|
2
|
+
import { CdkOverlayOrigin, OverlayModule } from '@angular/cdk/overlay';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { InjectionToken, signal, computed, Directive, input, ChangeDetectionStrategy, Component, booleanAttribute, output, inject, Input, HostListener, ElementRef, HostBinding, viewChild, contentChild, TemplateRef, NgModule } from '@angular/core';
|
|
5
|
+
import { SI_FORM_ITEM_CONTROL } from '@siemens/element-ng/form';
|
|
6
|
+
import { buildTrackByIdentity } from '@siemens/element-ng/common';
|
|
7
|
+
import * as i1$1 from '@siemens/element-ng/auto-collapsable-list';
|
|
8
|
+
import { SiAutoCollapsableListModule } from '@siemens/element-ng/auto-collapsable-list';
|
|
9
|
+
import { SiIconNextComponent, addIcons, elementDown2, elementOk, elementSearch } from '@siemens/element-ng/icon';
|
|
10
|
+
import * as i1 from '@siemens/element-translate-ng/translate';
|
|
11
|
+
import { SiTranslateModule } from '@siemens/element-translate-ng/translate';
|
|
12
|
+
import * as i1$2 from '@angular/common';
|
|
13
|
+
import { NgClass, NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
14
|
+
import * as i2 from '@siemens/element-ng/autocomplete';
|
|
15
|
+
import { SiAutocompleteDirective, SiAutocompleteModule } from '@siemens/element-ng/autocomplete';
|
|
16
|
+
import { SiLoadingSpinnerComponent } from '@siemens/element-ng/loading-spinner';
|
|
17
|
+
import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
|
18
|
+
import { CdkListbox, CdkOption } from '@angular/cdk/listbox';
|
|
19
|
+
import { Subject, switchMap, of } from 'rxjs';
|
|
20
|
+
import { debounceTime, takeUntil } from 'rxjs/operators';
|
|
21
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Copyright Siemens 2016 - 2025.
|
|
25
|
+
* SPDX-License-Identifier: MIT
|
|
26
|
+
*/
|
|
27
|
+
const SI_SELECT_OPTIONS_STRATEGY = new InjectionToken('si-select.options-strategy');
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Copyright Siemens 2016 - 2025.
|
|
31
|
+
* SPDX-License-Identifier: MIT
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Input options strategy base class, for eagerly fetched options.
|
|
35
|
+
*/
|
|
36
|
+
class SiSelectOptionsStrategyBase {
|
|
37
|
+
/**
|
|
38
|
+
* Rows that should be shown.
|
|
39
|
+
*
|
|
40
|
+
* @defaultValue []
|
|
41
|
+
*/
|
|
42
|
+
rows = signal([]);
|
|
43
|
+
value = signal([]);
|
|
44
|
+
selectedRows = computed(() => {
|
|
45
|
+
const values = this.value();
|
|
46
|
+
return this.allRows()
|
|
47
|
+
.map(row => (row.type === 'group' ? row.options : row))
|
|
48
|
+
.flat()
|
|
49
|
+
.filter(option => values.some(value => this.optionsEqual()(value, option.value)));
|
|
50
|
+
});
|
|
51
|
+
onValueChange(value) {
|
|
52
|
+
this.value.set(value);
|
|
53
|
+
}
|
|
54
|
+
onFilter(filterValue) {
|
|
55
|
+
if (filterValue) {
|
|
56
|
+
const filterValueLC = filterValue.toLowerCase();
|
|
57
|
+
const checkRow = (row) => (row.typeaheadLabel ?? row.label).toLowerCase().includes(filterValueLC);
|
|
58
|
+
this.rows.set(this.allRows().reduce((rows, row) => {
|
|
59
|
+
if (row.type === 'option' && checkRow(row)) {
|
|
60
|
+
rows.push(row);
|
|
61
|
+
}
|
|
62
|
+
else if (row.type === 'group') {
|
|
63
|
+
if (row.label.toLowerCase().includes(filterValueLC)) {
|
|
64
|
+
rows.push(row);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
const options = row.options.filter(checkRow);
|
|
68
|
+
if (options.length) {
|
|
69
|
+
rows.push({ ...row, options });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return rows;
|
|
74
|
+
}, []));
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
this.rows.set(this.allRows());
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectOptionsStrategyBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
81
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: SiSelectOptionsStrategyBase, isStandalone: true, ngImport: i0 });
|
|
82
|
+
}
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectOptionsStrategyBase, decorators: [{
|
|
84
|
+
type: Directive
|
|
85
|
+
}] });
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Copyright Siemens 2016 - 2025.
|
|
89
|
+
* SPDX-License-Identifier: MIT
|
|
90
|
+
*/
|
|
91
|
+
/**
|
|
92
|
+
* The directive allows passing custom options.
|
|
93
|
+
* Otherwise, use the {@link SiSelectSimpleOptionsDirective} directive.
|
|
94
|
+
*
|
|
95
|
+
* @deprecated Use {@link SiSelectSimpleOptionsDirective} instead.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```html
|
|
99
|
+
* <si-select [complexOptions]="['v1', 'v2', 'v3']"></si-select>
|
|
100
|
+
* <si-select [complexOptions]="{ g1: ['g1.i1', 'g1.i2'], g2: ['g2.i1']}"></si-select>
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
class SiSelectComplexOptionsDirective extends SiSelectOptionsStrategyBase {
|
|
104
|
+
/** Options to be shown in select dropdown. */
|
|
105
|
+
complexOptions = input();
|
|
106
|
+
/**
|
|
107
|
+
* @deprecated Property has no effect and can be removed.
|
|
108
|
+
*
|
|
109
|
+
* @defaultValue
|
|
110
|
+
* ```
|
|
111
|
+
* buildTrackByIdentity<T>()
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
trackBy = input(buildTrackByIdentity());
|
|
115
|
+
/**
|
|
116
|
+
* By default, values are check on equality by reference. Override to customize the behavior.
|
|
117
|
+
*
|
|
118
|
+
* @defaultValue
|
|
119
|
+
* ```
|
|
120
|
+
* (a: T, b: T): boolean => a === b
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
optionsEqual = input((a, b) => a === b, {
|
|
124
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
125
|
+
alias: 'optionEqualCheckFn'
|
|
126
|
+
});
|
|
127
|
+
/**
|
|
128
|
+
* The valueProvider is used to extract the display text of a value.
|
|
129
|
+
*/
|
|
130
|
+
valueProvider = input();
|
|
131
|
+
/**
|
|
132
|
+
* Provides Value for the display text of the dropdown group
|
|
133
|
+
*
|
|
134
|
+
* @defaultValue
|
|
135
|
+
* ```
|
|
136
|
+
* () => undefined
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
groupProvider = input(() => undefined);
|
|
140
|
+
/**
|
|
141
|
+
* The disabledProvider is used to display menu items as disabled.
|
|
142
|
+
*
|
|
143
|
+
* @defaultValue
|
|
144
|
+
* ```
|
|
145
|
+
* () => false
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
disabledProvider = input(() => false);
|
|
149
|
+
allRows = computed(() => {
|
|
150
|
+
const complexOptions = this.complexOptions();
|
|
151
|
+
if (complexOptions instanceof Array) {
|
|
152
|
+
return this.convertOptionsArray(complexOptions);
|
|
153
|
+
}
|
|
154
|
+
else if (complexOptions) {
|
|
155
|
+
const groupProvider = this.groupProvider();
|
|
156
|
+
return Object.entries(complexOptions).map(([key, value]) => ({
|
|
157
|
+
type: 'group',
|
|
158
|
+
key,
|
|
159
|
+
label: groupProvider(key) ?? key,
|
|
160
|
+
options: this.convertOptionsArray(value)
|
|
161
|
+
}));
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
return [];
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
ngOnChanges() {
|
|
168
|
+
this.onFilter();
|
|
169
|
+
}
|
|
170
|
+
convertOptionsArray(options) {
|
|
171
|
+
const provide = this.valueProvider();
|
|
172
|
+
return options.map(option => {
|
|
173
|
+
return {
|
|
174
|
+
type: 'option',
|
|
175
|
+
value: option,
|
|
176
|
+
label: (provide ? provide(option) : undefined) ?? option + '',
|
|
177
|
+
typeaheadLabel: provide ? provide(option) : undefined,
|
|
178
|
+
disabled: this.disabledProvider()(option)
|
|
179
|
+
};
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectComplexOptionsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
183
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: SiSelectComplexOptionsDirective, isStandalone: true, selector: "si-select[complexOptions]", inputs: { complexOptions: { classPropertyName: "complexOptions", publicName: "complexOptions", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null }, optionsEqual: { classPropertyName: "optionsEqual", publicName: "optionEqualCheckFn", isSignal: true, isRequired: false, transformFunction: null }, valueProvider: { classPropertyName: "valueProvider", publicName: "valueProvider", isSignal: true, isRequired: false, transformFunction: null }, groupProvider: { classPropertyName: "groupProvider", publicName: "groupProvider", isSignal: true, isRequired: false, transformFunction: null }, disabledProvider: { classPropertyName: "disabledProvider", publicName: "disabledProvider", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: SI_SELECT_OPTIONS_STRATEGY, useExisting: SiSelectComplexOptionsDirective }], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
184
|
+
}
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectComplexOptionsDirective, decorators: [{
|
|
186
|
+
type: Directive,
|
|
187
|
+
args: [{
|
|
188
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
189
|
+
selector: 'si-select[complexOptions]',
|
|
190
|
+
providers: [{ provide: SI_SELECT_OPTIONS_STRATEGY, useExisting: SiSelectComplexOptionsDirective }]
|
|
191
|
+
}]
|
|
192
|
+
}] });
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Copyright Siemens 2016 - 2025.
|
|
196
|
+
* SPDX-License-Identifier: MIT
|
|
197
|
+
*/
|
|
198
|
+
/**
|
|
199
|
+
* The directive allows to template/customize the value option rendering.
|
|
200
|
+
* This requires using the {@link SiSelectComplexOptionsDirective} to specify complex options as input.
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```html
|
|
204
|
+
* <si-select [options]="[{ id: 'good', title: 'Good' }, { id: 'fair', title: 'Fair' }, { id: 'bad', title: 'Bad' }]" >
|
|
205
|
+
* <ng-template siSelectOptionTemplate let-option>{{ option.value | uppercase }}</ng-template>
|
|
206
|
+
* </si-select>
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
class SiSelectOptionTemplateDirective {
|
|
210
|
+
/** @internal */
|
|
211
|
+
static ngTemplateContextGuard(directive, context) {
|
|
212
|
+
return true;
|
|
213
|
+
}
|
|
214
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectOptionTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
215
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: SiSelectOptionTemplateDirective, isStandalone: true, selector: "[siSelectOptionTemplate]", ngImport: i0 });
|
|
216
|
+
}
|
|
217
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectOptionTemplateDirective, decorators: [{
|
|
218
|
+
type: Directive,
|
|
219
|
+
args: [{
|
|
220
|
+
selector: '[siSelectOptionTemplate]'
|
|
221
|
+
}]
|
|
222
|
+
}] });
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Copyright Siemens 2016 - 2025.
|
|
226
|
+
* SPDX-License-Identifier: MIT
|
|
227
|
+
*/
|
|
228
|
+
class SiSelectOptionComponent {
|
|
229
|
+
option = input.required();
|
|
230
|
+
optionTemplate = input();
|
|
231
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
232
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: SiSelectOptionComponent, isStandalone: true, selector: "si-select-option", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: true, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "d-flex align-items-center overflow-hidden" }, ngImport: i0, template: "<ng-container\n [ngTemplateOutlet]=\"optionTemplate() ?? defaultOptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: option() }\"\n/>\n\n<ng-template #defaultOptionTemplate let-item siSelectOptionTemplate>\n @if (item.icon) {\n <i class=\"icon-stack\">\n <si-icon-next\n class=\"icon me-2\"\n [icon]=\"item.icon\"\n [ngClass]=\"[(!item.disabled && item.iconColor) || '']\"\n />\n @if (item.stackedIcon) {\n <si-icon-next\n class=\"icon me-2\"\n [icon]=\"item.stackedIcon\"\n [ngClass]=\"item.stackedIconColor\"\n />\n }\n </i>\n }\n @if (item.label) {\n <span class=\"text-truncate\">{{ item.label | translate }}</span>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SiIconNextComponent, selector: "si-icon-next", inputs: ["icon"] }, { kind: "ngmodule", type: SiTranslateModule }, { kind: "pipe", type: i1.SiTranslatePipe, name: "translate" }, { kind: "directive", type: SiSelectOptionTemplateDirective, selector: "[siSelectOptionTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
233
|
+
}
|
|
234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectOptionComponent, decorators: [{
|
|
235
|
+
type: Component,
|
|
236
|
+
args: [{ selector: 'si-select-option', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
237
|
+
NgClass,
|
|
238
|
+
NgTemplateOutlet,
|
|
239
|
+
SiIconNextComponent,
|
|
240
|
+
SiTranslateModule,
|
|
241
|
+
SiSelectOptionTemplateDirective
|
|
242
|
+
], host: {
|
|
243
|
+
class: 'd-flex align-items-center overflow-hidden'
|
|
244
|
+
}, template: "<ng-container\n [ngTemplateOutlet]=\"optionTemplate() ?? defaultOptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: option() }\"\n/>\n\n<ng-template #defaultOptionTemplate let-item siSelectOptionTemplate>\n @if (item.icon) {\n <i class=\"icon-stack\">\n <si-icon-next\n class=\"icon me-2\"\n [icon]=\"item.icon\"\n [ngClass]=\"[(!item.disabled && item.iconColor) || '']\"\n />\n @if (item.stackedIcon) {\n <si-icon-next\n class=\"icon me-2\"\n [icon]=\"item.stackedIcon\"\n [ngClass]=\"item.stackedIconColor\"\n />\n }\n </i>\n }\n @if (item.label) {\n <span class=\"text-truncate\">{{ item.label | translate }}</span>\n }\n</ng-template>\n" }]
|
|
245
|
+
}] });
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Copyright Siemens 2016 - 2025.
|
|
249
|
+
* SPDX-License-Identifier: MIT
|
|
250
|
+
*/
|
|
251
|
+
/**
|
|
252
|
+
* Selection strategy base class.
|
|
253
|
+
*/
|
|
254
|
+
class SiSelectSelectionStrategy {
|
|
255
|
+
/**
|
|
256
|
+
* Whether the select input is disabled.
|
|
257
|
+
*
|
|
258
|
+
* @defaultValue false
|
|
259
|
+
*/
|
|
260
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
261
|
+
disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });
|
|
262
|
+
/**
|
|
263
|
+
* The selected value(s).
|
|
264
|
+
*/
|
|
265
|
+
set value(value) {
|
|
266
|
+
this.updateFromInput(this.toArrayValue(value));
|
|
267
|
+
}
|
|
268
|
+
/** Emitted when the selection is changed */
|
|
269
|
+
valueChange = output();
|
|
270
|
+
/**
|
|
271
|
+
* Provides the internal value always as an array
|
|
272
|
+
* @internal
|
|
273
|
+
*/
|
|
274
|
+
arrayValue = computed(() => this.selectOptions.selectedRows().map(option => option.value));
|
|
275
|
+
/**
|
|
276
|
+
* Registered form callback which shall be called on blur.
|
|
277
|
+
* @internal
|
|
278
|
+
*/
|
|
279
|
+
onTouched = () => { };
|
|
280
|
+
/** @internal */
|
|
281
|
+
disabled = computed(() => this.disabledInput() || this.disabledNgControl());
|
|
282
|
+
onChange = () => { };
|
|
283
|
+
disabledNgControl = signal(false);
|
|
284
|
+
selectOptions = inject(SI_SELECT_OPTIONS_STRATEGY);
|
|
285
|
+
registerOnTouched(fn) {
|
|
286
|
+
this.onTouched = fn;
|
|
287
|
+
}
|
|
288
|
+
registerOnChange(fn) {
|
|
289
|
+
this.onChange = fn;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* CDK Listbox value changed handler.
|
|
293
|
+
* @internal
|
|
294
|
+
*/
|
|
295
|
+
updateFromUser(values) {
|
|
296
|
+
const parsedValue = this.fromArrayValue(values);
|
|
297
|
+
this.onChange(parsedValue);
|
|
298
|
+
this.valueChange.emit(parsedValue);
|
|
299
|
+
this.selectOptions.onValueChange(values);
|
|
300
|
+
}
|
|
301
|
+
setDisabledState(isDisabled) {
|
|
302
|
+
this.disabledNgControl.set(isDisabled);
|
|
303
|
+
}
|
|
304
|
+
writeValue(obj) {
|
|
305
|
+
this.updateFromInput(this.toArrayValue(obj));
|
|
306
|
+
}
|
|
307
|
+
updateFromInput(values) {
|
|
308
|
+
this.selectOptions.onValueChange(values);
|
|
309
|
+
}
|
|
310
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectSelectionStrategy, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
311
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: SiSelectSelectionStrategy, isStandalone: true, inputs: { disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { properties: { "class.disabled": "disabled()" } }, ngImport: i0 });
|
|
312
|
+
}
|
|
313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectSelectionStrategy, decorators: [{
|
|
314
|
+
type: Directive,
|
|
315
|
+
args: [{
|
|
316
|
+
host: {
|
|
317
|
+
'[class.disabled]': 'disabled()'
|
|
318
|
+
}
|
|
319
|
+
}]
|
|
320
|
+
}], propDecorators: { value: [{
|
|
321
|
+
type: Input
|
|
322
|
+
}] } });
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Copyright Siemens 2016 - 2025.
|
|
326
|
+
* SPDX-License-Identifier: MIT
|
|
327
|
+
*/
|
|
328
|
+
class SiSelectInputComponent {
|
|
329
|
+
baseId = input.required();
|
|
330
|
+
/**
|
|
331
|
+
* Aria labelledby of the select.
|
|
332
|
+
*
|
|
333
|
+
* @defaultValue null
|
|
334
|
+
*/
|
|
335
|
+
labelledby = input(null);
|
|
336
|
+
/**
|
|
337
|
+
* Aria label of the select.
|
|
338
|
+
*
|
|
339
|
+
* @defaultValue null
|
|
340
|
+
*/
|
|
341
|
+
ariaLabel = input(null);
|
|
342
|
+
/** @defaultValue false */
|
|
343
|
+
open = input(false, { transform: booleanAttribute });
|
|
344
|
+
placeholder = input();
|
|
345
|
+
controls = input.required();
|
|
346
|
+
optionTemplate = input();
|
|
347
|
+
/** @defaultValue false */
|
|
348
|
+
readonly = input(false, { transform: booleanAttribute });
|
|
349
|
+
openListbox = output();
|
|
350
|
+
selectionStrategy = inject((SiSelectSelectionStrategy));
|
|
351
|
+
selectOptions = inject(SI_SELECT_OPTIONS_STRATEGY);
|
|
352
|
+
selectedRows = this.selectOptions.selectedRows;
|
|
353
|
+
labeledBy = computed(() => `${this.baseId()}-aria-label ${this.labelledby()}`);
|
|
354
|
+
icons = addIcons({ elementDown2 });
|
|
355
|
+
blur() {
|
|
356
|
+
if (!this.open()) {
|
|
357
|
+
this.selectionStrategy.onTouched();
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
click(event) {
|
|
361
|
+
event?.preventDefault();
|
|
362
|
+
this.openListbox.emit();
|
|
363
|
+
}
|
|
364
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
365
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: SiSelectInputComponent, isStandalone: true, selector: "si-select-input", inputs: { baseId: { classPropertyName: "baseId", publicName: "baseId", isSignal: true, isRequired: true, transformFunction: null }, labelledby: { classPropertyName: "labelledby", publicName: "labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: true, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openListbox: "openListbox" }, host: { attributes: { "role": "combobox", "aria-autocomplete": "none", "aria-haspopup": "listbox" }, listeners: { "blur": "blur()", "click": "click()", "keydown.arrowDown": "click($event)", "keydown.alt.arrowDown": "click($event)", "keydown.arrowUp": "click($event)", "keydown.enter": "click()", "keydown.space": "click()" }, properties: { "attr.aria-expanded": "open()", "attr.aria-readonly": "readonly()", "attr.aria-controls": "controls()", "attr.aria-labelledby": "labeledBy()", "attr.aria-disabled": "selectionStrategy.disabled()", "attr.tabindex": "selectionStrategy.disabled() ? \"-1\" : \"0\"", "class.disabled": "selectionStrategy.disabled()", "class.active": "open()" }, classAttribute: "select focus-none dropdown-toggle d-flex align-items-center ps-4" }, ngImport: i0, template: "@if (ariaLabel()) {\n <span class=\"visually-hidden\" [id]=\"baseId() + '-aria-label'\">{{ ariaLabel() }}</span>\n}\n<div\n class=\"d-flex align-items-center flex-grow-1\"\n [class.overflow-hidden]=\"!selectionStrategy.allowMultiple\"\n [id]=\"baseId() + '-content'\"\n [siAutoCollapsableList]=\"selectionStrategy.allowMultiple\"\n>\n @for (activeOption of selectedRows(); track activeOption) {\n @if (activeOption) {\n <si-select-option\n siAutoCollapsableListItem\n [option]=\"activeOption\"\n [optionTemplate]=\"optionTemplate()\"\n [class.overflow-hidden]=\"!selectionStrategy.allowMultiple\"\n />\n }\n } @empty {\n <div class=\"text-secondary\">{{ placeholder() | translate }}</div>\n }\n @if (selectionStrategy.allowMultiple) {\n <div #overflowItem=\"siAutoCollapsableListOverflowItem\" siAutoCollapsableListOverflowItem>\n <div class=\"overflow-item\"> {{ overflowItem.hiddenItemCount }}+</div>\n </div>\n }\n</div>\n<si-icon-next\n class=\"dropdown-caret icon flip-rtl\"\n [class.text-muted]=\"readonly()\"\n [icon]=\"icons.elementDown2\"\n/>\n", styles: ["@charset \"UTF-8\";:host{cursor:pointer;font-weight:700;min-inline-size:72px;block-size:100%;color:var(--element-text-primary);padding-block:4px;padding-inline-end:calc(12px + var(--si-feedback-icon-offset, 0px))}:host.disabled{color:var(--element-text-disabled)}:host-context(.form-control) :host{font-weight:400;padding-block:3px}:host-context(.dropdown:not(.form-control)) :host:not(.disabled):hover{background:var(--element-base-1-hover)}:host-context(.dropdown:not(.form-control)) :host:not(.disabled).active{background:var(--element-base-1-selected)}si-select-option+si-select-option:before{content:\",\\a0\"}.overflow-item{border-radius:var(--element-radius-3);background:var(--element-base-0);margin-inline-start:4px;padding-inline:8px}.dropdown-caret{transform:translate(var(--si-feedback-icon-offset, 0))}\n"], dependencies: [{ kind: "ngmodule", type: SiAutoCollapsableListModule }, { kind: "directive", type: i1$1.SiAutoCollapsableListDirective, selector: "[siAutoCollapsableList]", inputs: ["siAutoCollapsableList", "gap", "siAutoCollapsableListContainerElement"], exportAs: ["siAutoCollapsableList"] }, { kind: "directive", type: i1$1.SiAutoCollapsableListItemDirective, selector: "[siAutoCollapsableListItem]", inputs: ["forceHide"], exportAs: ["siAutoCollapsableListItem"] }, { kind: "directive", type: i1$1.SiAutoCollapsableListOverflowItemDirective, selector: "[siAutoCollapsableListOverflowItem]", exportAs: ["siAutoCollapsableListOverflowItem"] }, { kind: "component", type: SiIconNextComponent, selector: "si-icon-next", inputs: ["icon"] }, { kind: "component", type: SiSelectOptionComponent, selector: "si-select-option", inputs: ["option", "optionTemplate"] }, { kind: "ngmodule", type: SiTranslateModule }, { kind: "pipe", type: i1.SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
366
|
+
}
|
|
367
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectInputComponent, decorators: [{
|
|
368
|
+
type: Component,
|
|
369
|
+
args: [{ selector: 'si-select-input', imports: [
|
|
370
|
+
SiAutoCollapsableListModule,
|
|
371
|
+
SiIconNextComponent,
|
|
372
|
+
SiSelectOptionComponent,
|
|
373
|
+
SiTranslateModule
|
|
374
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
375
|
+
role: 'combobox',
|
|
376
|
+
class: 'select focus-none dropdown-toggle d-flex align-items-center ps-4',
|
|
377
|
+
'aria-autocomplete': 'none',
|
|
378
|
+
'aria-haspopup': 'listbox',
|
|
379
|
+
'[attr.aria-expanded]': 'open()',
|
|
380
|
+
'[attr.aria-readonly]': 'readonly()',
|
|
381
|
+
'[attr.aria-controls]': 'controls()',
|
|
382
|
+
'[attr.aria-labelledby]': 'labeledBy()',
|
|
383
|
+
'[attr.aria-disabled]': 'selectionStrategy.disabled()',
|
|
384
|
+
'[attr.tabindex]': 'selectionStrategy.disabled() ? "-1" : "0"',
|
|
385
|
+
'[class.disabled]': 'selectionStrategy.disabled()',
|
|
386
|
+
'[class.active]': 'open()'
|
|
387
|
+
}, template: "@if (ariaLabel()) {\n <span class=\"visually-hidden\" [id]=\"baseId() + '-aria-label'\">{{ ariaLabel() }}</span>\n}\n<div\n class=\"d-flex align-items-center flex-grow-1\"\n [class.overflow-hidden]=\"!selectionStrategy.allowMultiple\"\n [id]=\"baseId() + '-content'\"\n [siAutoCollapsableList]=\"selectionStrategy.allowMultiple\"\n>\n @for (activeOption of selectedRows(); track activeOption) {\n @if (activeOption) {\n <si-select-option\n siAutoCollapsableListItem\n [option]=\"activeOption\"\n [optionTemplate]=\"optionTemplate()\"\n [class.overflow-hidden]=\"!selectionStrategy.allowMultiple\"\n />\n }\n } @empty {\n <div class=\"text-secondary\">{{ placeholder() | translate }}</div>\n }\n @if (selectionStrategy.allowMultiple) {\n <div #overflowItem=\"siAutoCollapsableListOverflowItem\" siAutoCollapsableListOverflowItem>\n <div class=\"overflow-item\"> {{ overflowItem.hiddenItemCount }}+</div>\n </div>\n }\n</div>\n<si-icon-next\n class=\"dropdown-caret icon flip-rtl\"\n [class.text-muted]=\"readonly()\"\n [icon]=\"icons.elementDown2\"\n/>\n", styles: ["@charset \"UTF-8\";:host{cursor:pointer;font-weight:700;min-inline-size:72px;block-size:100%;color:var(--element-text-primary);padding-block:4px;padding-inline-end:calc(12px + var(--si-feedback-icon-offset, 0px))}:host.disabled{color:var(--element-text-disabled)}:host-context(.form-control) :host{font-weight:400;padding-block:3px}:host-context(.dropdown:not(.form-control)) :host:not(.disabled):hover{background:var(--element-base-1-hover)}:host-context(.dropdown:not(.form-control)) :host:not(.disabled).active{background:var(--element-base-1-selected)}si-select-option+si-select-option:before{content:\",\\a0\"}.overflow-item{border-radius:var(--element-radius-3);background:var(--element-base-0);margin-inline-start:4px;padding-inline:8px}.dropdown-caret{transform:translate(var(--si-feedback-icon-offset, 0))}\n"] }]
|
|
388
|
+
}], propDecorators: { blur: [{
|
|
389
|
+
type: HostListener,
|
|
390
|
+
args: ['blur']
|
|
391
|
+
}], click: [{
|
|
392
|
+
type: HostListener,
|
|
393
|
+
args: ['click']
|
|
394
|
+
}, {
|
|
395
|
+
type: HostListener,
|
|
396
|
+
args: ['keydown.arrowDown', ['$event']]
|
|
397
|
+
}, {
|
|
398
|
+
type: HostListener,
|
|
399
|
+
args: ['keydown.alt.arrowDown', ['$event']]
|
|
400
|
+
}, {
|
|
401
|
+
type: HostListener,
|
|
402
|
+
args: ['keydown.arrowUp', ['$event']]
|
|
403
|
+
}, {
|
|
404
|
+
type: HostListener,
|
|
405
|
+
args: ['keydown.enter']
|
|
406
|
+
}, {
|
|
407
|
+
type: HostListener,
|
|
408
|
+
args: ['keydown.space']
|
|
409
|
+
}] } });
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Copyright Siemens 2016 - 2025.
|
|
413
|
+
* SPDX-License-Identifier: MIT
|
|
414
|
+
*/
|
|
415
|
+
class SiSelectOptionRowComponent {
|
|
416
|
+
option = input.required();
|
|
417
|
+
optionTemplate = input();
|
|
418
|
+
/** @defaultValue false */
|
|
419
|
+
selected = input(false, { transform: booleanAttribute });
|
|
420
|
+
icons = addIcons({ elementOk });
|
|
421
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectOptionRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
422
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: SiSelectOptionRowComponent, isStandalone: true, selector: "si-select-option-row", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: true, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.disabled": "!!this.option().disabled", "attr.aria-selected": "selected()", "attr.data-id": "this.option().value" }, classAttribute: "dropdown-item focus-none pe-4 gap-4" }, ngImport: i0, template: "<span\n class=\"form-check-input si-form-checkbox\"\n [class.checked]=\"selected()\"\n [class.disabled]=\"option().disabled\"\n></span>\n<si-select-option [option]=\"option()\" [optionTemplate]=\"optionTemplate()\" />\n@if (selected()) {\n <span class=\"ms-auto selected-marker\" aria-hidden=\"true\">\n <si-icon-next [icon]=\"icons.elementOk\" />\n </span>\n}\n", styles: [".selected-marker>span{font-size:1.5rem;margin-inline-end:-.25rem}.form-check-input{display:none}:host-context(.si-multi-select) .selected-marker{display:none}:host-context(.si-multi-select) .form-check-input{display:block}\n"], dependencies: [{ kind: "component", type: SiIconNextComponent, selector: "si-icon-next", inputs: ["icon"] }, { kind: "component", type: SiSelectOptionComponent, selector: "si-select-option", inputs: ["option", "optionTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
423
|
+
}
|
|
424
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectOptionRowComponent, decorators: [{
|
|
425
|
+
type: Component,
|
|
426
|
+
args: [{ selector: 'si-select-option-row', imports: [SiIconNextComponent, SiSelectOptionComponent], host: {
|
|
427
|
+
class: 'dropdown-item focus-none pe-4 gap-4',
|
|
428
|
+
'[class.disabled]': '!!this.option().disabled',
|
|
429
|
+
'[attr.aria-selected]': 'selected()',
|
|
430
|
+
'[attr.data-id]': 'this.option().value'
|
|
431
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n class=\"form-check-input si-form-checkbox\"\n [class.checked]=\"selected()\"\n [class.disabled]=\"option().disabled\"\n></span>\n<si-select-option [option]=\"option()\" [optionTemplate]=\"optionTemplate()\" />\n@if (selected()) {\n <span class=\"ms-auto selected-marker\" aria-hidden=\"true\">\n <si-icon-next [icon]=\"icons.elementOk\" />\n </span>\n}\n", styles: [".selected-marker>span{font-size:1.5rem;margin-inline-end:-.25rem}.form-check-input{display:none}:host-context(.si-multi-select) .selected-marker{display:none}:host-context(.si-multi-select) .form-check-input{display:block}\n"] }]
|
|
432
|
+
}] });
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Copyright Siemens 2016 - 2025.
|
|
436
|
+
* SPDX-License-Identifier: MIT
|
|
437
|
+
*/
|
|
438
|
+
/**
|
|
439
|
+
* The directive allows to template/customize the group option rendering.
|
|
440
|
+
* This requires using the {@link SiSelectComplexOptionsDirective} to specify complex options as input.
|
|
441
|
+
*
|
|
442
|
+
* @example
|
|
443
|
+
* ```html
|
|
444
|
+
* <si-select [complexOptions]="{ g1: ['g1.i1', 'g1.i2'], g2: ['g2.i1'] }" >
|
|
445
|
+
* <ng-template siSelectGroupTemplate let-group>{{ group.key | uppercase }}</ng-template>
|
|
446
|
+
* </si-select>
|
|
447
|
+
* ```
|
|
448
|
+
*/
|
|
449
|
+
class SiSelectGroupTemplateDirective {
|
|
450
|
+
static ngTemplateContextGuard(directive, context) {
|
|
451
|
+
return true;
|
|
452
|
+
}
|
|
453
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectGroupTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
454
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: SiSelectGroupTemplateDirective, isStandalone: true, selector: "[siSelectGroupTemplate]", ngImport: i0 });
|
|
455
|
+
}
|
|
456
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectGroupTemplateDirective, decorators: [{
|
|
457
|
+
type: Directive,
|
|
458
|
+
args: [{
|
|
459
|
+
selector: '[siSelectGroupTemplate]'
|
|
460
|
+
}]
|
|
461
|
+
}] });
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Copyright Siemens 2016 - 2025.
|
|
465
|
+
* SPDX-License-Identifier: MIT
|
|
466
|
+
*/
|
|
467
|
+
class SiSelectOptionRowTemplateDirective {
|
|
468
|
+
static ngTemplateContextGuard(directive, context) {
|
|
469
|
+
return true;
|
|
470
|
+
}
|
|
471
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectOptionRowTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
472
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: SiSelectOptionRowTemplateDirective, isStandalone: true, selector: "[siSelectOptionRowTemplate]", ngImport: i0 });
|
|
473
|
+
}
|
|
474
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectOptionRowTemplateDirective, decorators: [{
|
|
475
|
+
type: Directive,
|
|
476
|
+
args: [{
|
|
477
|
+
selector: '[siSelectOptionRowTemplate]'
|
|
478
|
+
}]
|
|
479
|
+
}] });
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Copyright Siemens 2016 - 2025.
|
|
483
|
+
* SPDX-License-Identifier: MIT
|
|
484
|
+
*/
|
|
485
|
+
class SiSelectListBase {
|
|
486
|
+
baseId = input.required();
|
|
487
|
+
optionTemplate = input();
|
|
488
|
+
groupTemplate = input();
|
|
489
|
+
/** @defaultValue null */
|
|
490
|
+
labelledby = input(null);
|
|
491
|
+
actionsTemplate = input();
|
|
492
|
+
closeOverlay = output();
|
|
493
|
+
selectionStrategy = inject(SiSelectSelectionStrategy);
|
|
494
|
+
selectOptions = inject(SI_SELECT_OPTIONS_STRATEGY);
|
|
495
|
+
focusTrapFactory = inject(ConfigurableFocusTrapFactory);
|
|
496
|
+
elementRef = inject(ElementRef);
|
|
497
|
+
rows = this.selectOptions.rows;
|
|
498
|
+
focusTrap;
|
|
499
|
+
multiSelect = this.selectionStrategy.allowMultiple;
|
|
500
|
+
ngOnInit() {
|
|
501
|
+
this.focusTrap = this.focusTrapFactory.create(this.elementRef.nativeElement);
|
|
502
|
+
}
|
|
503
|
+
ngOnDestroy() {
|
|
504
|
+
this.focusTrap.destroy();
|
|
505
|
+
}
|
|
506
|
+
keydownTab() {
|
|
507
|
+
// Ignore tab key if actions are displayed.
|
|
508
|
+
if (!this.actionsTemplate()) {
|
|
509
|
+
this.closeOverlayAlways();
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
closeOverlayAlways() {
|
|
513
|
+
this.closeOverlay.emit();
|
|
514
|
+
}
|
|
515
|
+
closeOverlayIfSingle() {
|
|
516
|
+
if (!this.selectionStrategy.allowMultiple) {
|
|
517
|
+
this.closeOverlayAlways();
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectListBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
521
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: SiSelectListBase, isStandalone: true, inputs: { baseId: { classPropertyName: "baseId", publicName: "baseId", isSignal: true, isRequired: true, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, groupTemplate: { classPropertyName: "groupTemplate", publicName: "groupTemplate", isSignal: true, isRequired: false, transformFunction: null }, labelledby: { classPropertyName: "labelledby", publicName: "labelledby", isSignal: true, isRequired: false, transformFunction: null }, actionsTemplate: { classPropertyName: "actionsTemplate", publicName: "actionsTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closeOverlay: "closeOverlay" }, host: { listeners: { "keydown.tab": "keydownTab()" }, properties: { "class.si-multi-select": "this.multiSelect" }, classAttribute: "dropdown-menu position-static w-100 py-4 d-flex flex-column" }, ngImport: i0 });
|
|
522
|
+
}
|
|
523
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectListBase, decorators: [{
|
|
524
|
+
type: Directive,
|
|
525
|
+
args: [{
|
|
526
|
+
host: {
|
|
527
|
+
class: 'dropdown-menu position-static w-100 py-4 d-flex flex-column'
|
|
528
|
+
}
|
|
529
|
+
}]
|
|
530
|
+
}], propDecorators: { multiSelect: [{
|
|
531
|
+
type: HostBinding,
|
|
532
|
+
args: ['class.si-multi-select']
|
|
533
|
+
}], keydownTab: [{
|
|
534
|
+
type: HostListener,
|
|
535
|
+
args: ['keydown.tab']
|
|
536
|
+
}] } });
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Copyright Siemens 2016 - 2025.
|
|
540
|
+
* SPDX-License-Identifier: MIT
|
|
541
|
+
*/
|
|
542
|
+
class SiSelectListHasFilterComponent extends SiSelectListBase {
|
|
543
|
+
/** Placeholder for search input field. */
|
|
544
|
+
filterPlaceholder = input.required();
|
|
545
|
+
/** Label if no item can be found. */
|
|
546
|
+
noResultsFoundLabel = input.required();
|
|
547
|
+
filterInput = viewChild.required('filter');
|
|
548
|
+
initIndex;
|
|
549
|
+
id = computed(() => `${this.baseId()}-listbox`);
|
|
550
|
+
icons = addIcons({ elementSearch });
|
|
551
|
+
constructor() {
|
|
552
|
+
super();
|
|
553
|
+
if (!this.selectOptions.onFilter) {
|
|
554
|
+
console.error('Missing implementation for `onFilter`');
|
|
555
|
+
}
|
|
556
|
+
const firstValue = this.selectionStrategy.arrayValue()[0];
|
|
557
|
+
if (firstValue) {
|
|
558
|
+
this.initIndex = computed(() => this.rows().findIndex(row => row.type === 'option' && row.value === firstValue));
|
|
559
|
+
}
|
|
560
|
+
else {
|
|
561
|
+
this.initIndex = signal(0);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
ngOnInit() {
|
|
565
|
+
super.ngOnInit();
|
|
566
|
+
this.selectOptions.onFilter();
|
|
567
|
+
setTimeout(() => this.filterInput().nativeElement.focus());
|
|
568
|
+
}
|
|
569
|
+
input() {
|
|
570
|
+
this.selectOptions.onFilter(this.filterInput().nativeElement.value);
|
|
571
|
+
}
|
|
572
|
+
select(newValue) {
|
|
573
|
+
if (this.selectionStrategy.allowMultiple) {
|
|
574
|
+
if (this.selectionStrategy.arrayValue().includes(newValue)) {
|
|
575
|
+
this.selectionStrategy.updateFromUser(this.selectionStrategy.arrayValue().filter(value => value !== newValue));
|
|
576
|
+
}
|
|
577
|
+
else {
|
|
578
|
+
this.selectionStrategy.updateFromUser([...this.selectionStrategy.arrayValue(), newValue]);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
else {
|
|
582
|
+
this.selectionStrategy.updateFromUser([newValue]);
|
|
583
|
+
}
|
|
584
|
+
this.closeOverlayIfSingle();
|
|
585
|
+
}
|
|
586
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectListHasFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
587
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: SiSelectListHasFilterComponent, isStandalone: true, selector: "si-select-list-has-filter", inputs: { filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: true, transformFunction: null }, noResultsFoundLabel: { classPropertyName: "noResultsFoundLabel", publicName: "noResultsFoundLabel", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "attr.id": "id()" }, classAttribute: "pt-0" }, viewQueries: [{ propertyName: "filterInput", first: true, predicate: ["filter"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"pt-5 pb-5 px-5 top-0\">\n <div class=\"position-relative\">\n <input\n #filter\n #siAutocomplete=\"siAutocomplete\"\n siAutocomplete\n class=\"form-control ps-9 border-0 rounded-2 bg-base-0\"\n [placeholder]=\"filterPlaceholder() | translate\"\n [id]=\"baseId() + 'filter-input'\"\n [attr.aria-labelledby]=\"baseId() + '-aria-label' + ' ' + labelledby()\"\n (input)=\"input()\"\n />\n <si-icon-next\n class=\"icon text-secondary position-absolute top-0 bottom-0 d-flex align-items-center ps-2\"\n [icon]=\"icons.elementSearch\"\n />\n @if (selectOptions.loading?.()) {\n <si-loading-spinner class=\"position-absolute end-0 bottom-0 d-flex align-items-center p-2\" />\n }\n </div>\n</div>\n<div\n class=\"si-select-filtered-items\"\n tabindex=\"-1\"\n [siAutocompleteListboxFor]=\"siAutocomplete\"\n [siAutocompleteDefaultIndex]=\"initIndex()\"\n [attr.aria-labelledby]=\"baseId() + '-aria-label' + ' ' + labelledby()\"\n (siAutocompleteOptionSubmitted)=\"select($event)\"\n>\n @if (!rows().length) {\n <div\n role=\"option\"\n aria-disabled=\"true\"\n aria-selected=\"false\"\n class=\"dropdown-item disabled text-secondary justify-content-center mb-2\"\n >\n <span>{{ noResultsFoundLabel() | translate }}</span>\n </div>\n }\n @for (item of rows(); track item; let index = $index) {\n @if (item.type === 'group') {\n <div\n role=\"group\"\n class=\"ps-0\"\n aria-disabled=\"false\"\n [attr.aria-labelledby]=\"baseId() + '-' + index + '-group-header'\"\n >\n <div class=\"dropdown-header\" [id]=\"baseId() + '-' + index + '-group-header'\">\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate() ?? defaultGroupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </div>\n @for (optionRow of item.options; track optionRow) {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: optionRow }\"\n />\n }\n </div>\n }\n @if (item.type === 'option') {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n }\n }\n\n <ng-template #optionRowTemplate let-option siSelectOptionRowTemplate>\n <si-select-option-row\n [option]=\"option\"\n [optionTemplate]=\"optionTemplate()\"\n [siAutocompleteOption]=\"option.value\"\n [disabled]=\"option.disabled\"\n [selected]=\"selectionStrategy.arrayValue().includes(option.value)\"\n />\n </ng-template>\n</div>\n@if (actionsTemplate()) {\n <div class=\"dropdown-divider\"></div>\n <div class=\"d-flex flex-column align-items-start\">\n <ng-container\n [ngTemplateOutlet]=\"actionsTemplate()!\"\n [ngTemplateOutletContext]=\"{\n searchText: filter.value,\n visibleOptionsCount: rows().length\n }\"\n />\n </div>\n}\n\n<ng-template #defaultGroupTemplate let-group siSelectGroupTemplate>\n {{ group.label | translate }}\n</ng-template>\n", styles: [".si-select-filtered-items{max-block-size:min(100vh - 56px,266px);overflow-y:auto}si-loading-spinner{--loading-spinner-size: 1.5rem}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SiAutocompleteDirective, selector: "input[siAutocomplete]", exportAs: ["siAutocomplete"] }, { kind: "component", type: SiIconNextComponent, selector: "si-icon-next", inputs: ["icon"] }, { kind: "directive", type: SiSelectGroupTemplateDirective, selector: "[siSelectGroupTemplate]" }, { kind: "component", type: SiSelectOptionRowComponent, selector: "si-select-option-row", inputs: ["option", "optionTemplate", "selected"] }, { kind: "directive", type: SiSelectOptionRowTemplateDirective, selector: "[siSelectOptionRowTemplate]" }, { kind: "ngmodule", type: SiTranslateModule }, { kind: "pipe", type: i1.SiTranslatePipe, name: "translate" }, { kind: "ngmodule", type: SiAutocompleteModule }, { kind: "directive", type: i2.SiAutocompleteListboxDirective, selector: "[siAutocompleteListboxFor]", inputs: ["id", "siAutocompleteListboxFor", "siAutocompleteDefaultIndex"], outputs: ["siAutocompleteOptionSubmitted"], exportAs: ["siAutocompleteListbox"] }, { kind: "directive", type: i2.SiAutocompleteOptionDirective, selector: "[siAutocompleteOption]", inputs: ["id", "disabled", "siAutocompleteOption"], exportAs: ["siAutocompleteOption"] }, { kind: "component", type: SiLoadingSpinnerComponent, selector: "si-loading-spinner", inputs: ["isBlockingSpinner", "isSpinnerOverlay", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
588
|
+
}
|
|
589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectListHasFilterComponent, decorators: [{
|
|
590
|
+
type: Component,
|
|
591
|
+
args: [{ selector: 'si-select-list-has-filter', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
592
|
+
NgTemplateOutlet,
|
|
593
|
+
SiAutocompleteDirective,
|
|
594
|
+
SiIconNextComponent,
|
|
595
|
+
SiSelectGroupTemplateDirective,
|
|
596
|
+
SiSelectOptionRowComponent,
|
|
597
|
+
SiSelectOptionRowTemplateDirective,
|
|
598
|
+
SiTranslateModule,
|
|
599
|
+
SiAutocompleteModule,
|
|
600
|
+
SiLoadingSpinnerComponent
|
|
601
|
+
], host: {
|
|
602
|
+
class: 'pt-0',
|
|
603
|
+
'[attr.id]': 'id()'
|
|
604
|
+
}, template: "<div class=\"pt-5 pb-5 px-5 top-0\">\n <div class=\"position-relative\">\n <input\n #filter\n #siAutocomplete=\"siAutocomplete\"\n siAutocomplete\n class=\"form-control ps-9 border-0 rounded-2 bg-base-0\"\n [placeholder]=\"filterPlaceholder() | translate\"\n [id]=\"baseId() + 'filter-input'\"\n [attr.aria-labelledby]=\"baseId() + '-aria-label' + ' ' + labelledby()\"\n (input)=\"input()\"\n />\n <si-icon-next\n class=\"icon text-secondary position-absolute top-0 bottom-0 d-flex align-items-center ps-2\"\n [icon]=\"icons.elementSearch\"\n />\n @if (selectOptions.loading?.()) {\n <si-loading-spinner class=\"position-absolute end-0 bottom-0 d-flex align-items-center p-2\" />\n }\n </div>\n</div>\n<div\n class=\"si-select-filtered-items\"\n tabindex=\"-1\"\n [siAutocompleteListboxFor]=\"siAutocomplete\"\n [siAutocompleteDefaultIndex]=\"initIndex()\"\n [attr.aria-labelledby]=\"baseId() + '-aria-label' + ' ' + labelledby()\"\n (siAutocompleteOptionSubmitted)=\"select($event)\"\n>\n @if (!rows().length) {\n <div\n role=\"option\"\n aria-disabled=\"true\"\n aria-selected=\"false\"\n class=\"dropdown-item disabled text-secondary justify-content-center mb-2\"\n >\n <span>{{ noResultsFoundLabel() | translate }}</span>\n </div>\n }\n @for (item of rows(); track item; let index = $index) {\n @if (item.type === 'group') {\n <div\n role=\"group\"\n class=\"ps-0\"\n aria-disabled=\"false\"\n [attr.aria-labelledby]=\"baseId() + '-' + index + '-group-header'\"\n >\n <div class=\"dropdown-header\" [id]=\"baseId() + '-' + index + '-group-header'\">\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate() ?? defaultGroupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </div>\n @for (optionRow of item.options; track optionRow) {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: optionRow }\"\n />\n }\n </div>\n }\n @if (item.type === 'option') {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n }\n }\n\n <ng-template #optionRowTemplate let-option siSelectOptionRowTemplate>\n <si-select-option-row\n [option]=\"option\"\n [optionTemplate]=\"optionTemplate()\"\n [siAutocompleteOption]=\"option.value\"\n [disabled]=\"option.disabled\"\n [selected]=\"selectionStrategy.arrayValue().includes(option.value)\"\n />\n </ng-template>\n</div>\n@if (actionsTemplate()) {\n <div class=\"dropdown-divider\"></div>\n <div class=\"d-flex flex-column align-items-start\">\n <ng-container\n [ngTemplateOutlet]=\"actionsTemplate()!\"\n [ngTemplateOutletContext]=\"{\n searchText: filter.value,\n visibleOptionsCount: rows().length\n }\"\n />\n </div>\n}\n\n<ng-template #defaultGroupTemplate let-group siSelectGroupTemplate>\n {{ group.label | translate }}\n</ng-template>\n", styles: [".si-select-filtered-items{max-block-size:min(100vh - 56px,266px);overflow-y:auto}si-loading-spinner{--loading-spinner-size: 1.5rem}\n"] }]
|
|
605
|
+
}], ctorParameters: () => [] });
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Copyright Siemens 2016 - 2025.
|
|
609
|
+
* SPDX-License-Identifier: MIT
|
|
610
|
+
*/
|
|
611
|
+
class SiSelectListComponent extends SiSelectListBase {
|
|
612
|
+
listbox = viewChild.required(CdkListbox, {
|
|
613
|
+
read: ElementRef
|
|
614
|
+
});
|
|
615
|
+
ngOnInit() {
|
|
616
|
+
super.ngOnInit();
|
|
617
|
+
setTimeout(() => this.listbox().nativeElement.focus());
|
|
618
|
+
}
|
|
619
|
+
listBoxValueChange(changeEvent) {
|
|
620
|
+
this.selectionStrategy.updateFromUser(changeEvent.value.slice());
|
|
621
|
+
}
|
|
622
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
623
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: SiSelectListComponent, isStandalone: true, selector: "si-select-list", viewQueries: [{ propertyName: "listbox", first: true, predicate: CdkListbox, descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n cdkListbox\n class=\"si-select-filtered-items focus-none\"\n [id]=\"baseId() + '-listbox'\"\n [cdkListboxMultiple]=\"selectionStrategy.allowMultiple\"\n [cdkListboxValue]=\"selectionStrategy.arrayValue()\"\n [attr.aria-labelledby]=\"baseId() + '-aria-label' + ' ' + labelledby()\"\n (cdkListboxValueChange)=\"listBoxValueChange($event)\"\n (click)=\"closeOverlayIfSingle()\"\n (keydown.enter)=\"closeOverlayIfSingle()\"\n (keydown.space)=\"closeOverlayIfSingle()\"\n>\n @for (item of rows(); track item; let index = $index) {\n @if (item.type === 'group') {\n <div\n role=\"group\"\n class=\"ps-0\"\n aria-disabled=\"false\"\n [attr.aria-labelledby]=\"baseId() + '-' + index + '-group-header'\"\n >\n <span class=\"dropdown-header\" [id]=\"baseId() + '-' + index + '-group-header'\">\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate() ?? defaultGroupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </span>\n @for (optionRow of item.options; track optionRow) {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: optionRow }\"\n />\n }\n </div>\n }\n @if (item.type === 'option') {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n }\n }\n <ng-template #optionRowTemplate let-option siSelectOptionRowTemplate>\n <si-select-option-row\n #cdkOption=\"cdkOption\"\n [option]=\"option\"\n [optionTemplate]=\"optionTemplate()\"\n [cdkOption]=\"option.value\"\n [cdkOptionDisabled]=\"!!option.disabled\"\n [cdkOptionTypeaheadLabel]=\"(option.typeaheadLabel | translate)!\"\n [class.active]=\"cdkOption.isActive()\"\n [selected]=\"cdkOption.isSelected()\"\n />\n </ng-template>\n</div>\n@if (actionsTemplate()) {\n <div class=\"dropdown-divider\"></div>\n <div class=\"d-flex flex-column align-items-start\">\n <ng-container [ngTemplateOutlet]=\"actionsTemplate()!\" />\n </div>\n}\n\n<ng-template #defaultGroupTemplate let-group siSelectGroupTemplate>\n {{ group.label | translate }}\n</ng-template>\n", styles: [".si-select-filtered-items{max-block-size:min(100vh,266px);overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "ngmodule", type: SiTranslateModule }, { kind: "pipe", type: i1.SiTranslatePipe, name: "translate" }, { kind: "directive", type: CdkOption, selector: "[cdkOption]", inputs: ["id", "cdkOption", "cdkOptionTypeaheadLabel", "cdkOptionDisabled", "tabindex"], exportAs: ["cdkOption"] }, { kind: "directive", type: SiSelectOptionRowTemplateDirective, selector: "[siSelectOptionRowTemplate]" }, { kind: "directive", type: SiSelectGroupTemplateDirective, selector: "[siSelectGroupTemplate]" }, { kind: "component", type: SiSelectOptionRowComponent, selector: "si-select-option-row", inputs: ["option", "optionTemplate", "selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
624
|
+
}
|
|
625
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectListComponent, decorators: [{
|
|
626
|
+
type: Component,
|
|
627
|
+
args: [{ selector: 'si-select-list', imports: [
|
|
628
|
+
CommonModule,
|
|
629
|
+
CdkListbox,
|
|
630
|
+
SiTranslateModule,
|
|
631
|
+
CdkOption,
|
|
632
|
+
SiSelectOptionRowTemplateDirective,
|
|
633
|
+
SiSelectGroupTemplateDirective,
|
|
634
|
+
SiSelectOptionRowComponent
|
|
635
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n cdkListbox\n class=\"si-select-filtered-items focus-none\"\n [id]=\"baseId() + '-listbox'\"\n [cdkListboxMultiple]=\"selectionStrategy.allowMultiple\"\n [cdkListboxValue]=\"selectionStrategy.arrayValue()\"\n [attr.aria-labelledby]=\"baseId() + '-aria-label' + ' ' + labelledby()\"\n (cdkListboxValueChange)=\"listBoxValueChange($event)\"\n (click)=\"closeOverlayIfSingle()\"\n (keydown.enter)=\"closeOverlayIfSingle()\"\n (keydown.space)=\"closeOverlayIfSingle()\"\n>\n @for (item of rows(); track item; let index = $index) {\n @if (item.type === 'group') {\n <div\n role=\"group\"\n class=\"ps-0\"\n aria-disabled=\"false\"\n [attr.aria-labelledby]=\"baseId() + '-' + index + '-group-header'\"\n >\n <span class=\"dropdown-header\" [id]=\"baseId() + '-' + index + '-group-header'\">\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate() ?? defaultGroupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </span>\n @for (optionRow of item.options; track optionRow) {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: optionRow }\"\n />\n }\n </div>\n }\n @if (item.type === 'option') {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n }\n }\n <ng-template #optionRowTemplate let-option siSelectOptionRowTemplate>\n <si-select-option-row\n #cdkOption=\"cdkOption\"\n [option]=\"option\"\n [optionTemplate]=\"optionTemplate()\"\n [cdkOption]=\"option.value\"\n [cdkOptionDisabled]=\"!!option.disabled\"\n [cdkOptionTypeaheadLabel]=\"(option.typeaheadLabel | translate)!\"\n [class.active]=\"cdkOption.isActive()\"\n [selected]=\"cdkOption.isSelected()\"\n />\n </ng-template>\n</div>\n@if (actionsTemplate()) {\n <div class=\"dropdown-divider\"></div>\n <div class=\"d-flex flex-column align-items-start\">\n <ng-container [ngTemplateOutlet]=\"actionsTemplate()!\" />\n </div>\n}\n\n<ng-template #defaultGroupTemplate let-group siSelectGroupTemplate>\n {{ group.label | translate }}\n</ng-template>\n", styles: [".si-select-filtered-items{max-block-size:min(100vh,266px);overflow-y:auto}\n"] }]
|
|
636
|
+
}] });
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Copyright Siemens 2016 - 2025.
|
|
640
|
+
* SPDX-License-Identifier: MIT
|
|
641
|
+
*/
|
|
642
|
+
class SiSelectActionsDirective {
|
|
643
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
644
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: SiSelectActionsDirective, isStandalone: true, selector: "[siSelectActions]", exportAs: ["si-select-actions"], ngImport: i0 });
|
|
645
|
+
}
|
|
646
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectActionsDirective, decorators: [{
|
|
647
|
+
type: Directive,
|
|
648
|
+
args: [{
|
|
649
|
+
selector: '[siSelectActions]',
|
|
650
|
+
exportAs: 'si-select-actions'
|
|
651
|
+
}]
|
|
652
|
+
}] });
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Copyright Siemens 2016 - 2025.
|
|
656
|
+
* SPDX-License-Identifier: MIT
|
|
657
|
+
*/
|
|
658
|
+
class SiSelectComponent {
|
|
659
|
+
static idCounter = 0;
|
|
660
|
+
/**
|
|
661
|
+
* Unique identifier.
|
|
662
|
+
*
|
|
663
|
+
* @defaultValue
|
|
664
|
+
* ```
|
|
665
|
+
* `__si-select-${SiSelectComponent.idCounter++}`
|
|
666
|
+
* ```
|
|
667
|
+
*/
|
|
668
|
+
id = input(`__si-select-${SiSelectComponent.idCounter++}`);
|
|
669
|
+
/**
|
|
670
|
+
* Aria label of the select.
|
|
671
|
+
*
|
|
672
|
+
* @defaultValue null
|
|
673
|
+
*/
|
|
674
|
+
ariaLabel = input(null);
|
|
675
|
+
/**
|
|
676
|
+
* Aria labelledby of the select.
|
|
677
|
+
* @defaultValue undefined
|
|
678
|
+
*/
|
|
679
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
680
|
+
labelledbyInput = input(undefined, { alias: 'labelledby' });
|
|
681
|
+
/**
|
|
682
|
+
* Placeholder for search input field.
|
|
683
|
+
*
|
|
684
|
+
* @defaultValue
|
|
685
|
+
* ```
|
|
686
|
+
* $localize`:@@SI_SELECT.SEARCH-PLACEHOLDER:Search...`
|
|
687
|
+
* ```
|
|
688
|
+
*/
|
|
689
|
+
filterPlaceholder = input($localize `:@@SI_SELECT.SEARCH-PLACEHOLDER:Search...`);
|
|
690
|
+
/**
|
|
691
|
+
* Label if no item can be found.
|
|
692
|
+
*
|
|
693
|
+
* @defaultValue
|
|
694
|
+
* ```
|
|
695
|
+
* $localize`:@@SI_SELECT.NO-RESULTS-FOUND:No results found`
|
|
696
|
+
* ```
|
|
697
|
+
*/
|
|
698
|
+
noResultsFoundLabel = input($localize `:@@SI_SELECT.NO-RESULTS-FOUND:No results found`);
|
|
699
|
+
/** Placeholder text to display when no options are selected. */
|
|
700
|
+
placeholder = input();
|
|
701
|
+
/**
|
|
702
|
+
* Readonly state. Similar to disabled but with higher contrast *
|
|
703
|
+
*
|
|
704
|
+
* @defaultValue false
|
|
705
|
+
*/
|
|
706
|
+
readonly = input(false, { transform: booleanAttribute });
|
|
707
|
+
/**
|
|
708
|
+
* Emits on selection dropdown close.
|
|
709
|
+
* @deprecated Use {@link openChange} instead.
|
|
710
|
+
*/
|
|
711
|
+
dropdownClose = output();
|
|
712
|
+
/** Emits when the dropdown open state changes. */
|
|
713
|
+
openChange = output();
|
|
714
|
+
isOpen = signal(false);
|
|
715
|
+
optionTemplate = contentChild(SiSelectOptionTemplateDirective, { read: TemplateRef });
|
|
716
|
+
groupTemplate = contentChild(SiSelectGroupTemplateDirective, { read: TemplateRef });
|
|
717
|
+
actionsTemplate = contentChild(SiSelectActionsDirective, { read: TemplateRef });
|
|
718
|
+
trigger = viewChild.required(CdkOverlayOrigin, {
|
|
719
|
+
read: ElementRef
|
|
720
|
+
});
|
|
721
|
+
/** @internal */
|
|
722
|
+
labelledby = computed(() => this.labelledbyInput() ?? this.id() + '-label');
|
|
723
|
+
/** @internal */
|
|
724
|
+
errormessageId = `${this.id()}-errormessage`;
|
|
725
|
+
rows = [];
|
|
726
|
+
overlayWidth = 0;
|
|
727
|
+
selectionStrategy = inject((SiSelectSelectionStrategy));
|
|
728
|
+
backdropClicked = false;
|
|
729
|
+
selectOptions = inject(SI_SELECT_OPTIONS_STRATEGY);
|
|
730
|
+
/**
|
|
731
|
+
* Enables the filter input
|
|
732
|
+
* @defaultValue false
|
|
733
|
+
* @defaultref {@link SiSelectComponent#_hasFilter}
|
|
734
|
+
*/
|
|
735
|
+
hasFilter = input(false, { transform: booleanAttribute });
|
|
736
|
+
ngOnChanges(changes) {
|
|
737
|
+
if (changes.hasFilter && this.hasFilter()) {
|
|
738
|
+
this.verifyValueProvider();
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
ngAfterContentInit() {
|
|
742
|
+
this.verifyValueProvider();
|
|
743
|
+
}
|
|
744
|
+
/** Opens the `si-select`. */
|
|
745
|
+
open() {
|
|
746
|
+
if (this.readonly() || this.selectionStrategy.disabled()) {
|
|
747
|
+
return;
|
|
748
|
+
}
|
|
749
|
+
this.overlayWidth = this.trigger().nativeElement.getBoundingClientRect().width + 2; // 2px border
|
|
750
|
+
this.isOpen.set(true);
|
|
751
|
+
this.openChange.emit(true);
|
|
752
|
+
}
|
|
753
|
+
/** Closes the `si-select`. */
|
|
754
|
+
close() {
|
|
755
|
+
this.isOpen.set(false);
|
|
756
|
+
if (!this.backdropClicked) {
|
|
757
|
+
this.trigger().nativeElement.focus();
|
|
758
|
+
}
|
|
759
|
+
else {
|
|
760
|
+
this.backdropClicked = false;
|
|
761
|
+
this.selectionStrategy.onTouched();
|
|
762
|
+
}
|
|
763
|
+
this.dropdownClose.emit();
|
|
764
|
+
this.openChange.emit(false);
|
|
765
|
+
}
|
|
766
|
+
backdropClick() {
|
|
767
|
+
this.backdropClicked = true;
|
|
768
|
+
this.isOpen.set(false);
|
|
769
|
+
}
|
|
770
|
+
verifyValueProvider() {
|
|
771
|
+
if (this.hasFilter() &&
|
|
772
|
+
this.optionTemplate() &&
|
|
773
|
+
this.selectOptions instanceof SiSelectComplexOptionsDirective &&
|
|
774
|
+
!this.selectOptions.valueProvider()) {
|
|
775
|
+
console.error('A valueProvider is required when [hasFilter]="true" and having custom option template on si-select');
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
779
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: SiSelectComponent, isStandalone: true, selector: "si-select", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, labelledbyInput: { classPropertyName: "labelledbyInput", publicName: "labelledby", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, noResultsFoundLabel: { classPropertyName: "noResultsFoundLabel", publicName: "noResultsFoundLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, hasFilter: { classPropertyName: "hasFilter", publicName: "hasFilter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dropdownClose: "dropdownClose", openChange: "openChange" }, host: { properties: { "class.readonly": "readonly()", "class.open": "isOpen()", "class.si-select-has-filter": "hasFilter()" }, classAttribute: "dropdown" }, providers: [{ provide: SI_FORM_ITEM_CONTROL, useExisting: SiSelectComponent }], queries: [{ propertyName: "optionTemplate", first: true, predicate: SiSelectOptionTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: SiSelectGroupTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "actionsTemplate", first: true, predicate: SiSelectActionsDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "trigger", first: true, predicate: CdkOverlayOrigin, descendants: true, read: ElementRef, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<si-select-input\n #trigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n [baseId]=\"id()\"\n [labelledby]=\"labelledby()\"\n [optionTemplate]=\"optionTemplate()\"\n [ariaLabel]=\"ariaLabel()\"\n [controls]=\"id() + '-listbox'\"\n [open]=\"isOpen()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [attr.aria-describedby]=\"errormessageId\"\n (openListbox)=\"open()\"\n/>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayOffsetX]=\"-1\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n (backdropClick)=\"backdropClick()\"\n (detach)=\"close()\"\n>\n @if (!hasFilter()) {\n <si-select-list\n [baseId]=\"id()\"\n [optionTemplate]=\"optionTemplate()\"\n [groupTemplate]=\"groupTemplate()\"\n [labelledby]=\"labelledby()\"\n [actionsTemplate]=\"actionsTemplate()\"\n (closeOverlay)=\"close()\"\n />\n } @else {\n <si-select-list-has-filter\n [baseId]=\"id()\"\n [filterPlaceholder]=\"filterPlaceholder()\"\n [noResultsFoundLabel]=\"noResultsFoundLabel()\"\n [optionTemplate]=\"optionTemplate()\"\n [groupTemplate]=\"groupTemplate()\"\n [labelledby]=\"labelledby()\"\n [actionsTemplate]=\"actionsTemplate()\"\n (closeOverlay)=\"close()\"\n />\n }\n</ng-template>\n", styles: [":host{display:inline-block;padding:0;block-size:2rem;--si-action-icon-offset: 20px}:host:focus-within,:host.open:not(.si-select-has-filter){outline:var(--element-button-focus-width) solid var(--element-focus-default);outline-offset:var(--element-button-focus-overlay-width)}:host.readonly,:host.disabled{pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$3.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1$3.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: SiSelectInputComponent, selector: "si-select-input", inputs: ["baseId", "labelledby", "ariaLabel", "open", "placeholder", "controls", "optionTemplate", "readonly"], outputs: ["openListbox"] }, { kind: "component", type: SiSelectListComponent, selector: "si-select-list" }, { kind: "component", type: SiSelectListHasFilterComponent, selector: "si-select-list-has-filter", inputs: ["filterPlaceholder", "noResultsFoundLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
780
|
+
}
|
|
781
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectComponent, decorators: [{
|
|
782
|
+
type: Component,
|
|
783
|
+
args: [{ selector: 'si-select', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
784
|
+
OverlayModule,
|
|
785
|
+
SiSelectInputComponent,
|
|
786
|
+
SiSelectListComponent,
|
|
787
|
+
SiSelectListHasFilterComponent
|
|
788
|
+
], host: {
|
|
789
|
+
class: 'dropdown',
|
|
790
|
+
'[class.readonly]': 'readonly()',
|
|
791
|
+
'[class.open]': 'isOpen()',
|
|
792
|
+
'[class.si-select-has-filter]': 'hasFilter()'
|
|
793
|
+
}, providers: [{ provide: SI_FORM_ITEM_CONTROL, useExisting: SiSelectComponent }], template: "<si-select-input\n #trigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n [baseId]=\"id()\"\n [labelledby]=\"labelledby()\"\n [optionTemplate]=\"optionTemplate()\"\n [ariaLabel]=\"ariaLabel()\"\n [controls]=\"id() + '-listbox'\"\n [open]=\"isOpen()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [attr.aria-describedby]=\"errormessageId\"\n (openListbox)=\"open()\"\n/>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayOffsetX]=\"-1\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n (backdropClick)=\"backdropClick()\"\n (detach)=\"close()\"\n>\n @if (!hasFilter()) {\n <si-select-list\n [baseId]=\"id()\"\n [optionTemplate]=\"optionTemplate()\"\n [groupTemplate]=\"groupTemplate()\"\n [labelledby]=\"labelledby()\"\n [actionsTemplate]=\"actionsTemplate()\"\n (closeOverlay)=\"close()\"\n />\n } @else {\n <si-select-list-has-filter\n [baseId]=\"id()\"\n [filterPlaceholder]=\"filterPlaceholder()\"\n [noResultsFoundLabel]=\"noResultsFoundLabel()\"\n [optionTemplate]=\"optionTemplate()\"\n [groupTemplate]=\"groupTemplate()\"\n [labelledby]=\"labelledby()\"\n [actionsTemplate]=\"actionsTemplate()\"\n (closeOverlay)=\"close()\"\n />\n }\n</ng-template>\n", styles: [":host{display:inline-block;padding:0;block-size:2rem;--si-action-icon-offset: 20px}:host:focus-within,:host.open:not(.si-select-has-filter){outline:var(--element-button-focus-width) solid var(--element-focus-default);outline-offset:var(--element-button-focus-overlay-width)}:host.readonly,:host.disabled{pointer-events:none}\n"] }]
|
|
794
|
+
}] });
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Copyright Siemens 2016 - 2025.
|
|
798
|
+
* SPDX-License-Identifier: MIT
|
|
799
|
+
*/
|
|
800
|
+
class SiSelectLazyOptionsDirective {
|
|
801
|
+
/**
|
|
802
|
+
* {@inheritDoc SiSelectOptionsStrategy#loading}
|
|
803
|
+
* @defaultValue false
|
|
804
|
+
*/
|
|
805
|
+
loading = signal(false);
|
|
806
|
+
/**
|
|
807
|
+
* {@inheritDoc SiSelectOptionsStrategy#rows}
|
|
808
|
+
* @defaultValue []
|
|
809
|
+
*/
|
|
810
|
+
rows = signal([]);
|
|
811
|
+
/**
|
|
812
|
+
* {@inheritDoc SiSelectOptionsStrategy#selectedRows}
|
|
813
|
+
* @defaultValue []
|
|
814
|
+
*/
|
|
815
|
+
selectedRows = signal([]);
|
|
816
|
+
optionSource = input.required();
|
|
817
|
+
valueChange = new Subject();
|
|
818
|
+
filterChange = new Subject();
|
|
819
|
+
constructor() {
|
|
820
|
+
this.filterChange
|
|
821
|
+
.pipe(debounceTime(100), switchMap(filterInput => {
|
|
822
|
+
if (filterInput) {
|
|
823
|
+
return this.optionSource().getOptionsForSearch(filterInput);
|
|
824
|
+
}
|
|
825
|
+
else {
|
|
826
|
+
const optionSource = this.optionSource();
|
|
827
|
+
if (optionSource.getAllOptions) {
|
|
828
|
+
return optionSource.getAllOptions();
|
|
829
|
+
}
|
|
830
|
+
else {
|
|
831
|
+
return of(this.selectedRows());
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
}))
|
|
835
|
+
.subscribe(rows => {
|
|
836
|
+
this.loading.set(false);
|
|
837
|
+
this.rows.set(rows);
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
ngOnDestroy() {
|
|
841
|
+
this.valueChange.next();
|
|
842
|
+
this.valueChange.complete();
|
|
843
|
+
this.filterChange.complete();
|
|
844
|
+
}
|
|
845
|
+
/** {@inheritDoc SiSelectOptionsStrategy.onValueChange} */
|
|
846
|
+
onValueChange(value) {
|
|
847
|
+
this.valueChange.next();
|
|
848
|
+
// To prevent flickering, we need to check if we already got all the requested options.
|
|
849
|
+
// This should always be the case if the user selects one
|
|
850
|
+
const knownSelectedOptions = value
|
|
851
|
+
.map(valueEntry => this.selectedRows().find(selected => this.valueEqual(selected.value, valueEntry)) ??
|
|
852
|
+
this.rows().find(selected => selected.type === 'option' && this.valueEqual(selected.value, valueEntry)))
|
|
853
|
+
.filter(v => !!v);
|
|
854
|
+
const optionSource = this.optionSource();
|
|
855
|
+
if (knownSelectedOptions.length === value.length) {
|
|
856
|
+
if (optionSource.compareOptions) {
|
|
857
|
+
knownSelectedOptions.sort(optionSource.compareOptions);
|
|
858
|
+
}
|
|
859
|
+
this.selectedRows.set(knownSelectedOptions);
|
|
860
|
+
}
|
|
861
|
+
else {
|
|
862
|
+
// We don't have all options, so we need to fetch them.
|
|
863
|
+
optionSource
|
|
864
|
+
.getOptionsForValues(value)
|
|
865
|
+
.pipe(takeUntil(this.valueChange))
|
|
866
|
+
.subscribe(selectedOptions => this.selectedRows.set(selectedOptions));
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
/** {@inheritDoc SiSelectOptionsStrategy.onFilter} */
|
|
870
|
+
onFilter(filterInput) {
|
|
871
|
+
this.filterChange.next(filterInput);
|
|
872
|
+
this.loading.set(true);
|
|
873
|
+
}
|
|
874
|
+
valueEqual(a, b) {
|
|
875
|
+
if (a === b) {
|
|
876
|
+
return true;
|
|
877
|
+
}
|
|
878
|
+
if (!a || !b) {
|
|
879
|
+
return false;
|
|
880
|
+
}
|
|
881
|
+
const optionSource = this.optionSource();
|
|
882
|
+
if (optionSource.valuesEqual) {
|
|
883
|
+
return optionSource.valuesEqual(a, b);
|
|
884
|
+
}
|
|
885
|
+
return false;
|
|
886
|
+
}
|
|
887
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectLazyOptionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
888
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: SiSelectLazyOptionsDirective, isStandalone: true, selector: "si-select[optionSource]", inputs: { optionSource: { classPropertyName: "optionSource", publicName: "optionSource", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: SI_SELECT_OPTIONS_STRATEGY, useExisting: SiSelectLazyOptionsDirective }], ngImport: i0 });
|
|
889
|
+
}
|
|
890
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectLazyOptionsDirective, decorators: [{
|
|
891
|
+
type: Directive,
|
|
892
|
+
args: [{
|
|
893
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
894
|
+
selector: 'si-select[optionSource]',
|
|
895
|
+
providers: [{ provide: SI_SELECT_OPTIONS_STRATEGY, useExisting: SiSelectLazyOptionsDirective }]
|
|
896
|
+
}]
|
|
897
|
+
}], ctorParameters: () => [] });
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* Copyright Siemens 2016 - 2025.
|
|
901
|
+
* SPDX-License-Identifier: MIT
|
|
902
|
+
*/
|
|
903
|
+
/**
|
|
904
|
+
* This directive allows passing {@link SelectItem} to the {@link SiSelectComponent}.
|
|
905
|
+
*
|
|
906
|
+
* @example
|
|
907
|
+
* ```html
|
|
908
|
+
* <si-select [options]="[{ type: 'option', value: 'one', label: 'One' }, { type: 'option', value: 'two', label: 'Two' }]"></si-select>
|
|
909
|
+
* <si-select [options]="[{ type: 'group', label: 'Group', options [{ type: 'option', value: 1, label: 'One' }, { type: 'option', value: 2, label: 'Two' }] }]"></si-select>
|
|
910
|
+
* ```
|
|
911
|
+
*/
|
|
912
|
+
class SiSelectSimpleOptionsDirective extends SiSelectOptionsStrategyBase {
|
|
913
|
+
/** Options to be shown in select dropdown */
|
|
914
|
+
options = input();
|
|
915
|
+
/**
|
|
916
|
+
* By default, values are check on referential equality. Provide a function to customize the behavior.
|
|
917
|
+
*
|
|
918
|
+
* @defaultValue
|
|
919
|
+
* ```
|
|
920
|
+
* (a: T, b: T): boolean => a === b
|
|
921
|
+
* ```
|
|
922
|
+
*/
|
|
923
|
+
optionsEqual = input((a, b) => a === b, {
|
|
924
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
925
|
+
alias: 'optionEqualCheckFn'
|
|
926
|
+
});
|
|
927
|
+
allRows = computed(() => {
|
|
928
|
+
const options = this.options();
|
|
929
|
+
if (options) {
|
|
930
|
+
return options?.map(option => option.type
|
|
931
|
+
? option
|
|
932
|
+
: {
|
|
933
|
+
type: 'option',
|
|
934
|
+
value: option.id,
|
|
935
|
+
label: option.title,
|
|
936
|
+
iconColor: option.color,
|
|
937
|
+
icon: option.icon,
|
|
938
|
+
disabled: option.disabled
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
else {
|
|
942
|
+
return [];
|
|
943
|
+
}
|
|
944
|
+
});
|
|
945
|
+
ngOnChanges() {
|
|
946
|
+
this.onFilter();
|
|
947
|
+
}
|
|
948
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectSimpleOptionsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
949
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: SiSelectSimpleOptionsDirective, isStandalone: true, selector: "si-select[options]", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionsEqual: { classPropertyName: "optionsEqual", publicName: "optionEqualCheckFn", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: SI_SELECT_OPTIONS_STRATEGY, useExisting: SiSelectSimpleOptionsDirective }], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
950
|
+
}
|
|
951
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectSimpleOptionsDirective, decorators: [{
|
|
952
|
+
type: Directive,
|
|
953
|
+
args: [{
|
|
954
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
955
|
+
selector: 'si-select[options]',
|
|
956
|
+
providers: [{ provide: SI_SELECT_OPTIONS_STRATEGY, useExisting: SiSelectSimpleOptionsDirective }]
|
|
957
|
+
}]
|
|
958
|
+
}] });
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* Copyright Siemens 2016 - 2025.
|
|
962
|
+
* SPDX-License-Identifier: MIT
|
|
963
|
+
*/
|
|
964
|
+
/**
|
|
965
|
+
* The directive enables the single-select behavior.
|
|
966
|
+
* Otherwise, use the {@link SiSelectMultiValueDirective} directive.
|
|
967
|
+
*
|
|
968
|
+
* @example
|
|
969
|
+
* ```html
|
|
970
|
+
* <si-select [(value)]="selectedValue" [options]="[
|
|
971
|
+
* { id: 'good', title: 'Good' },
|
|
972
|
+
* { id: 'average', title: 'Average' },
|
|
973
|
+
* { id: 'poor', title: 'Poor' }
|
|
974
|
+
* ]"></si-select>
|
|
975
|
+
* ```
|
|
976
|
+
*/
|
|
977
|
+
class SiSelectSingleValueDirective extends SiSelectSelectionStrategy {
|
|
978
|
+
/**
|
|
979
|
+
* {@inheritDoc SiSelectSelectionStrategy#allowMultiple}
|
|
980
|
+
* @defaultValue false
|
|
981
|
+
*/
|
|
982
|
+
allowMultiple = false;
|
|
983
|
+
toArrayValue(value) {
|
|
984
|
+
return value !== undefined ? [value] : [];
|
|
985
|
+
}
|
|
986
|
+
fromArrayValue([value]) {
|
|
987
|
+
return value;
|
|
988
|
+
}
|
|
989
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectSingleValueDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
990
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: SiSelectSingleValueDirective, isStandalone: true, selector: "si-select:not([multi])", providers: [
|
|
991
|
+
{ provide: SiSelectSelectionStrategy, useExisting: SiSelectSingleValueDirective },
|
|
992
|
+
{
|
|
993
|
+
provide: NG_VALUE_ACCESSOR,
|
|
994
|
+
useExisting: SiSelectSingleValueDirective,
|
|
995
|
+
multi: true
|
|
996
|
+
}
|
|
997
|
+
], usesInheritance: true, ngImport: i0 });
|
|
998
|
+
}
|
|
999
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectSingleValueDirective, decorators: [{
|
|
1000
|
+
type: Directive,
|
|
1001
|
+
args: [{
|
|
1002
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
1003
|
+
selector: 'si-select:not([multi])',
|
|
1004
|
+
providers: [
|
|
1005
|
+
{ provide: SiSelectSelectionStrategy, useExisting: SiSelectSingleValueDirective },
|
|
1006
|
+
{
|
|
1007
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1008
|
+
useExisting: SiSelectSingleValueDirective,
|
|
1009
|
+
multi: true
|
|
1010
|
+
}
|
|
1011
|
+
]
|
|
1012
|
+
}]
|
|
1013
|
+
}] });
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Copyright Siemens 2016 - 2025.
|
|
1017
|
+
* SPDX-License-Identifier: MIT
|
|
1018
|
+
*/
|
|
1019
|
+
/**
|
|
1020
|
+
* The directive enables the multi-select behavior.
|
|
1021
|
+
* Otherwise, use the {@link SiSelectSingleValueDirective} directive.
|
|
1022
|
+
*
|
|
1023
|
+
* @example
|
|
1024
|
+
* ```html
|
|
1025
|
+
* <si-select multi [(value)]="multiValue" [options]="[
|
|
1026
|
+
* { id: 'good', title: 'Good' },
|
|
1027
|
+
* { id: 'average', title: 'Average' },
|
|
1028
|
+
* { id: 'poor', title: 'Poor' }
|
|
1029
|
+
* ]"></si-select>
|
|
1030
|
+
* ```
|
|
1031
|
+
*/
|
|
1032
|
+
class SiSelectMultiValueDirective extends SiSelectSelectionStrategy {
|
|
1033
|
+
/**
|
|
1034
|
+
* {@inheritDoc SiSelectSelectionStrategy#allowMultiple}
|
|
1035
|
+
* @defaultValue true
|
|
1036
|
+
*/
|
|
1037
|
+
allowMultiple = true;
|
|
1038
|
+
fromArrayValue(value) {
|
|
1039
|
+
return value;
|
|
1040
|
+
}
|
|
1041
|
+
toArrayValue(value) {
|
|
1042
|
+
return value ?? [];
|
|
1043
|
+
}
|
|
1044
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectMultiValueDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1045
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: SiSelectMultiValueDirective, isStandalone: true, selector: "si-select[multi]", providers: [
|
|
1046
|
+
{ provide: SiSelectSelectionStrategy, useExisting: SiSelectMultiValueDirective },
|
|
1047
|
+
{
|
|
1048
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1049
|
+
useExisting: SiSelectMultiValueDirective,
|
|
1050
|
+
multi: true
|
|
1051
|
+
}
|
|
1052
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1053
|
+
}
|
|
1054
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectMultiValueDirective, decorators: [{
|
|
1055
|
+
type: Directive,
|
|
1056
|
+
args: [{
|
|
1057
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
1058
|
+
selector: 'si-select[multi]',
|
|
1059
|
+
providers: [
|
|
1060
|
+
{ provide: SiSelectSelectionStrategy, useExisting: SiSelectMultiValueDirective },
|
|
1061
|
+
{
|
|
1062
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1063
|
+
useExisting: SiSelectMultiValueDirective,
|
|
1064
|
+
multi: true
|
|
1065
|
+
}
|
|
1066
|
+
]
|
|
1067
|
+
}]
|
|
1068
|
+
}] });
|
|
1069
|
+
|
|
1070
|
+
/**
|
|
1071
|
+
* Copyright Siemens 2016 - 2025.
|
|
1072
|
+
* SPDX-License-Identifier: MIT
|
|
1073
|
+
*/
|
|
1074
|
+
class SiSelectActionDirective {
|
|
1075
|
+
select = inject(SiSelectComponent);
|
|
1076
|
+
/**
|
|
1077
|
+
* Close the select drop down on click.
|
|
1078
|
+
* @defaultValue false
|
|
1079
|
+
*/
|
|
1080
|
+
selectActionAutoClose = input(false, { transform: booleanAttribute });
|
|
1081
|
+
close() {
|
|
1082
|
+
if (this.selectActionAutoClose()) {
|
|
1083
|
+
this.select.close();
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1087
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: SiSelectActionDirective, isStandalone: true, selector: "[siSelectAction]", inputs: { selectActionAutoClose: { classPropertyName: "selectActionAutoClose", publicName: "selectActionAutoClose", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "close()" }, classAttribute: "mx-5 my-4" }, exportAs: ["si-select-action"], ngImport: i0 });
|
|
1088
|
+
}
|
|
1089
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectActionDirective, decorators: [{
|
|
1090
|
+
type: Directive,
|
|
1091
|
+
args: [{
|
|
1092
|
+
selector: '[siSelectAction]',
|
|
1093
|
+
exportAs: 'si-select-action',
|
|
1094
|
+
host: {
|
|
1095
|
+
class: 'mx-5 my-4'
|
|
1096
|
+
}
|
|
1097
|
+
}]
|
|
1098
|
+
}], propDecorators: { close: [{
|
|
1099
|
+
type: HostListener,
|
|
1100
|
+
args: ['click']
|
|
1101
|
+
}] } });
|
|
1102
|
+
|
|
1103
|
+
/**
|
|
1104
|
+
* Copyright Siemens 2016 - 2025.
|
|
1105
|
+
* SPDX-License-Identifier: MIT
|
|
1106
|
+
*/
|
|
1107
|
+
class SiSelectModule {
|
|
1108
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1109
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: SiSelectModule, imports: [SiSelectActionDirective,
|
|
1110
|
+
SiSelectActionsDirective,
|
|
1111
|
+
SiSelectComplexOptionsDirective,
|
|
1112
|
+
SiSelectComponent,
|
|
1113
|
+
SiSelectGroupTemplateDirective,
|
|
1114
|
+
SiSelectMultiValueDirective,
|
|
1115
|
+
SiSelectOptionTemplateDirective,
|
|
1116
|
+
SiSelectSimpleOptionsDirective,
|
|
1117
|
+
SiSelectSingleValueDirective], exports: [SiSelectActionDirective,
|
|
1118
|
+
SiSelectActionsDirective,
|
|
1119
|
+
SiSelectComplexOptionsDirective,
|
|
1120
|
+
SiSelectComponent,
|
|
1121
|
+
SiSelectGroupTemplateDirective,
|
|
1122
|
+
SiSelectMultiValueDirective,
|
|
1123
|
+
SiSelectOptionTemplateDirective,
|
|
1124
|
+
SiSelectSimpleOptionsDirective,
|
|
1125
|
+
SiSelectSingleValueDirective] });
|
|
1126
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectModule, imports: [SiSelectComponent] });
|
|
1127
|
+
}
|
|
1128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiSelectModule, decorators: [{
|
|
1129
|
+
type: NgModule,
|
|
1130
|
+
args: [{
|
|
1131
|
+
imports: [
|
|
1132
|
+
SiSelectActionDirective,
|
|
1133
|
+
SiSelectActionsDirective,
|
|
1134
|
+
SiSelectComplexOptionsDirective,
|
|
1135
|
+
SiSelectComponent,
|
|
1136
|
+
SiSelectGroupTemplateDirective,
|
|
1137
|
+
SiSelectMultiValueDirective,
|
|
1138
|
+
SiSelectOptionTemplateDirective,
|
|
1139
|
+
SiSelectSimpleOptionsDirective,
|
|
1140
|
+
SiSelectSingleValueDirective
|
|
1141
|
+
],
|
|
1142
|
+
exports: [
|
|
1143
|
+
SiSelectActionDirective,
|
|
1144
|
+
SiSelectActionsDirective,
|
|
1145
|
+
SiSelectComplexOptionsDirective,
|
|
1146
|
+
SiSelectComponent,
|
|
1147
|
+
SiSelectGroupTemplateDirective,
|
|
1148
|
+
SiSelectMultiValueDirective,
|
|
1149
|
+
SiSelectOptionTemplateDirective,
|
|
1150
|
+
SiSelectSimpleOptionsDirective,
|
|
1151
|
+
SiSelectSingleValueDirective
|
|
1152
|
+
]
|
|
1153
|
+
}]
|
|
1154
|
+
}] });
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Copyright Siemens 2016 - 2025.
|
|
1158
|
+
* SPDX-License-Identifier: MIT
|
|
1159
|
+
*/
|
|
1160
|
+
|
|
1161
|
+
/**
|
|
1162
|
+
* Generated bundle index. Do not edit.
|
|
1163
|
+
*/
|
|
1164
|
+
|
|
1165
|
+
export { SiSelectActionDirective, SiSelectActionsDirective, SiSelectComplexOptionsDirective, SiSelectComponent, SiSelectGroupTemplateDirective, SiSelectLazyOptionsDirective, SiSelectListHasFilterComponent, SiSelectModule, SiSelectMultiValueDirective, SiSelectOptionTemplateDirective, SiSelectSimpleOptionsDirective, SiSelectSingleValueDirective };
|
|
1166
|
+
//# sourceMappingURL=siemens-element-ng-select.mjs.map
|