@sixbell-telco/sdk 4.9.0 → 4.10.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/CHANGELOG.md +29 -0
- package/components/alert/src/alert.component.d.ts +8 -1
- package/components/data-table/README.md +1 -0
- package/components/file-upload/file-dropzone/file-dropzone.component.d.ts +12 -0
- package/components/file-upload/file-uploader/file-uploader.component.d.ts +6 -0
- package/components/forms/combobox/README.md +41 -1
- package/components/forms/combobox/src/combobox.component.d.ts +134 -3
- package/components/forms/select/README.md +41 -1
- package/components/forms/select/src/select.component.d.ts +119 -3
- package/components/forms/textarea/src/textarea.component.d.ts +6 -1
- package/components/progress/src/progress.component.d.ts +17 -3
- package/components/table/README.md +2 -0
- package/components/table/src/table.component.d.ts +13 -0
- package/fesm2022/sixbell-telco-sdk-components-alert.mjs +12 -5
- package/fesm2022/sixbell-telco-sdk-components-alert.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +32 -6
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +204 -21
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +189 -17
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +11 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs +22 -4
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-table.mjs +39 -5
- package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
- package/i18n/sdk/en.json +7 -1
- package/i18n/sdk/es.json +7 -1
- package/i18n/sdk/pt.json +7 -1
- package/manifest.json +95 -9
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { CdkListbox, CdkOption } from '@angular/cdk/listbox';
|
|
|
2
2
|
import * as i1 from '@angular/cdk/overlay';
|
|
3
3
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
4
4
|
import { PortalModule } from '@angular/cdk/portal';
|
|
5
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
5
6
|
import * as i0 from '@angular/core';
|
|
6
7
|
import { inject, computed, input, booleanAttribute, model, output, signal, viewChild, effect, afterRenderEffect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
7
8
|
import { toObservable, toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
@@ -39,6 +40,11 @@ import { Subject, switchMap, startWith, debounceTime, distinctUntilChanged } fro
|
|
|
39
40
|
// ==============================================================================
|
|
40
41
|
// COMPONENT STYLES
|
|
41
42
|
// ==============================================================================
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
* Classes of an option row; the option sizer uses them too, so it measures what the panel shows
|
|
46
|
+
*/
|
|
47
|
+
const OPTION_ROW_CLASS = 'group-[.cdk-option-active]:bg-base-300 font-body flex w-full items-center justify-between rounded-none px-4 py-2 text-left leading-normal font-normal text-pretty transition-colors duration-150 ease-in-out group-data-disabled:cursor-not-allowed group-data-disabled:bg-transparent group-data-disabled:text-(--color-disabled-content) group-data-disabled:hover:bg-transparent';
|
|
42
48
|
/**
|
|
43
49
|
* Class variance authority configuration for combobox styling
|
|
44
50
|
*/
|
|
@@ -224,6 +230,25 @@ class ComboboxComponent {
|
|
|
224
230
|
* @default true
|
|
225
231
|
*/
|
|
226
232
|
allowClearAll = input(true, { transform: booleanAttribute });
|
|
233
|
+
/**
|
|
234
|
+
* Width of the options panel.
|
|
235
|
+
* - `'trigger'`: as wide as the control; a long option wraps onto more lines.
|
|
236
|
+
* - `'content'`: at least as wide as the control and wider when an option needs it, up to
|
|
237
|
+
* `min(28rem, 100vw - 2rem)`. The width is measured over every option, so searching never resizes the
|
|
238
|
+
* panel. Options stay on one line; past that cap the description, then the label, end in an ellipsis and
|
|
239
|
+
* the row shows its full text as a tooltip. Near the viewport edge the panel aligns to the control's end
|
|
240
|
+
* instead of overflowing.
|
|
241
|
+
* @defaultValue 'trigger'
|
|
242
|
+
*/
|
|
243
|
+
panelWidth = input('trigger');
|
|
244
|
+
/**
|
|
245
|
+
* Size the closed control to its widest option or the placeholder, measured with the option row's own
|
|
246
|
+
* font, padding and check icon for the current `size`. A selected value never truncates and the control
|
|
247
|
+
* keeps its width between selections. The panel then follows its options as with `panelWidth="content"`.
|
|
248
|
+
* The control does not shrink in a flex row (`shrink-0`); `min-w-*` and `w-*` classes on the element still apply.
|
|
249
|
+
* @defaultValue false
|
|
250
|
+
*/
|
|
251
|
+
fitOptions = input(false, { transform: booleanAttribute });
|
|
227
252
|
/**
|
|
228
253
|
* Placeholder text for the search input field
|
|
229
254
|
* @default 'Search...'
|
|
@@ -262,11 +287,26 @@ class ComboboxComponent {
|
|
|
262
287
|
*/
|
|
263
288
|
disabledKey = input('');
|
|
264
289
|
/**
|
|
265
|
-
* The object property holding a secondary text shown
|
|
290
|
+
* The object property holding a secondary text shown right-aligned on the option row
|
|
266
291
|
* (for example why it is disabled: "Already added"). It is part of the
|
|
267
292
|
* option's accessible name.
|
|
268
293
|
*/
|
|
269
294
|
descriptionKey = input('');
|
|
295
|
+
/**
|
|
296
|
+
* The object property naming the group an option belongs to. Options that share a value are listed
|
|
297
|
+
* together under one header showing that value, groups in the order they first appear, each group
|
|
298
|
+
* named by its header for assistive technology. Options without the property are listed first,
|
|
299
|
+
* ungrouped. A group whose options are all filtered out by the search hides its header. Headers
|
|
300
|
+
* cannot be chosen and the arrow keys skip them. Leave empty for a flat list.
|
|
301
|
+
*/
|
|
302
|
+
groupKey = input('');
|
|
303
|
+
/**
|
|
304
|
+
* The object property that marks an option as already taken outside this field when truthy (for
|
|
305
|
+
* example a country added earlier). The option shows the check icon, in the option's own color, but
|
|
306
|
+
* it is not part of the value and never appears in the trigger. Pair it with `disabledKey` so it is
|
|
307
|
+
* dimmed, check included, and cannot be chosen again.
|
|
308
|
+
*/
|
|
309
|
+
checkedKey = input('');
|
|
270
310
|
/**
|
|
271
311
|
* Selection mode: 'single' for single selection, 'multiple' for multi-select
|
|
272
312
|
* @default 'single'
|
|
@@ -368,6 +408,40 @@ class ComboboxComponent {
|
|
|
368
408
|
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },
|
|
369
409
|
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },
|
|
370
410
|
];
|
|
411
|
+
/** @internal Content-width panel positions: a panel wider than the control aligns to its end near the viewport edge */
|
|
412
|
+
contentOverlayPositions = [
|
|
413
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },
|
|
414
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 4 },
|
|
415
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },
|
|
416
|
+
{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -4 },
|
|
417
|
+
];
|
|
418
|
+
/** @internal Whether the panel sizes to its options (`panelWidth="content"` or `fitOptions`) */
|
|
419
|
+
contentPanel = computed(() => this.fitOptions() || this.panelWidth() === 'content');
|
|
420
|
+
/** @internal Positions bound to the overlay */
|
|
421
|
+
activeOverlayPositions = computed(() => (this.contentPanel() ? this.contentOverlayPositions : this.overlayPositions));
|
|
422
|
+
/** @internal Fixed overlay width: the trigger width, or none when the panel sizes to its options */
|
|
423
|
+
overlayWidth = computed(() => (this.contentPanel() ? '' : this.triggerWidth()));
|
|
424
|
+
/** @internal Classes of the panel box */
|
|
425
|
+
panelClass = computed(() => cn('rounded-box shadow-overlay', this.contentPanel() ? 'w-max max-w-[min(28rem,calc(100vw-2rem))] min-w-full' : 'w-full', this.animationClasses()));
|
|
426
|
+
/**
|
|
427
|
+
* @internal
|
|
428
|
+
* Classes of the hidden option sizer: the panel's menu size, so rows measure alike, plus a reserved scrollbar
|
|
429
|
+
* gutter, so a list that scrolls keeps the width of one that does not; capped like the panel, so a long
|
|
430
|
+
* option cannot widen the control past the panel
|
|
431
|
+
*/
|
|
432
|
+
optionSizerClass = computed(() => cn('menu pointer-events-none invisible h-0 max-w-[min(28rem,calc(100vw-2rem))] scrollbar-gutter-stable flex-nowrap overflow-hidden p-0', this.menuSizeClass()));
|
|
433
|
+
/** @internal Classes of an option row */
|
|
434
|
+
optionRowClass = OPTION_ROW_CLASS;
|
|
435
|
+
/** @internal Texts the closed control must fit with `fitOptions`: the placeholder and every option label */
|
|
436
|
+
valueSizerLabels = computed(() => [
|
|
437
|
+
this.translatedPlaceholder(),
|
|
438
|
+
...this.options().map((option) => this.getDisplayValue(option)),
|
|
439
|
+
]);
|
|
440
|
+
/**
|
|
441
|
+
* @internal
|
|
442
|
+
* Every option in sections, ignoring the search, so the content-width panel keeps its width while filtering
|
|
443
|
+
*/
|
|
444
|
+
allOptionSections = computed(() => this.groupOptions(this.options()));
|
|
371
445
|
/** Real placement of the open panel, bound to `data-side` / `data-align`; null until the CDK places it */
|
|
372
446
|
placement = computed(() => {
|
|
373
447
|
const position = this.currentPosition();
|
|
@@ -437,6 +511,16 @@ class ComboboxComponent {
|
|
|
437
511
|
return displayValue.includes(search);
|
|
438
512
|
});
|
|
439
513
|
});
|
|
514
|
+
/**
|
|
515
|
+
* @internal
|
|
516
|
+
* Filtered options in the order they are listed: ungrouped first, then each `groupKey` group
|
|
517
|
+
*/
|
|
518
|
+
optionSections = computed(() => this.groupOptions(this.filteredOptions()));
|
|
519
|
+
/**
|
|
520
|
+
* @internal
|
|
521
|
+
* Filtered options in the order they are listed, which keyboard navigation, `data-option-index` and the option ids follow
|
|
522
|
+
*/
|
|
523
|
+
orderedOptions = computed(() => this.groupKey() ? this.optionSections().flatMap((section) => section.options.map((entry) => entry.option)) : this.filteredOptions());
|
|
440
524
|
/**
|
|
441
525
|
* Whether the overlay is currently open or in the process of opening/closing
|
|
442
526
|
* @returns True if overlay is visible or animating
|
|
@@ -595,13 +679,12 @@ class ComboboxComponent {
|
|
|
595
679
|
* @internal
|
|
596
680
|
*/
|
|
597
681
|
menuClass = computed(() => {
|
|
598
|
-
return cn('menu max-h-72 w-full flex-nowrap overflow-y-auto overscroll-contain p-0 focus-within:outline-hidden focus:outline-hidden focus-visible:outline-hidden',
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
});
|
|
682
|
+
return cn('menu scroll-fade-y max-h-72 w-full flex-nowrap overflow-y-auto overscroll-contain p-0 focus-within:outline-hidden focus:outline-hidden focus-visible:outline-hidden', this.menuSizeClass());
|
|
683
|
+
});
|
|
684
|
+
/** @internal Menu size modifier shared by the options list and the option sizer */
|
|
685
|
+
menuSizeClass = computed(() => {
|
|
686
|
+
const size = this.size();
|
|
687
|
+
return size ? `menu-${size}` : '';
|
|
605
688
|
});
|
|
606
689
|
/**
|
|
607
690
|
* CSS classes for the badge
|
|
@@ -653,7 +736,7 @@ class ComboboxComponent {
|
|
|
653
736
|
*/
|
|
654
737
|
activeOptionId = computed(() => {
|
|
655
738
|
const index = this.activeOptionIndex();
|
|
656
|
-
return index >= 0 && index < this.
|
|
739
|
+
return index >= 0 && index < this.orderedOptions().length ? this.optionId(index) : null;
|
|
657
740
|
});
|
|
658
741
|
/**
|
|
659
742
|
* Current search input value for template binding
|
|
@@ -767,8 +850,8 @@ class ComboboxComponent {
|
|
|
767
850
|
if (this.animationState() !== 'opening' && this.animationState() !== 'open')
|
|
768
851
|
return;
|
|
769
852
|
this.searchInputRef()?.nativeElement?.focus();
|
|
770
|
-
//
|
|
771
|
-
this.setDefaultActiveOption();
|
|
853
|
+
// The selected option starts active in single mode; otherwise the first enabled one
|
|
854
|
+
this.setDefaultActiveOption(true);
|
|
772
855
|
}, 100);
|
|
773
856
|
}
|
|
774
857
|
else if (currentState === 'open') {
|
|
@@ -935,7 +1018,7 @@ class ComboboxComponent {
|
|
|
935
1018
|
const focusedOption = this.optionsList()?.nativeElement.querySelector('.cdk-option-active');
|
|
936
1019
|
if (focusedOption) {
|
|
937
1020
|
const optionIndex = parseInt(focusedOption.getAttribute('data-option-index') || '0');
|
|
938
|
-
const filteredOptions = this.
|
|
1021
|
+
const filteredOptions = this.orderedOptions();
|
|
939
1022
|
if (optionIndex >= 0 && optionIndex < filteredOptions.length) {
|
|
940
1023
|
this.handleOptionSelect(filteredOptions[optionIndex]);
|
|
941
1024
|
}
|
|
@@ -949,7 +1032,7 @@ class ComboboxComponent {
|
|
|
949
1032
|
handleSearchKeydown(event) {
|
|
950
1033
|
if (this.disabled())
|
|
951
1034
|
return;
|
|
952
|
-
const filteredOptions = this.
|
|
1035
|
+
const filteredOptions = this.orderedOptions();
|
|
953
1036
|
const currentIndex = this.activeOptionIndex();
|
|
954
1037
|
switch (event.key) {
|
|
955
1038
|
case 'ArrowDown': {
|
|
@@ -1143,6 +1226,15 @@ class ComboboxComponent {
|
|
|
1143
1226
|
const disabledKey = this.disabledKey();
|
|
1144
1227
|
return !!disabledKey && !!option && typeof option === 'object' && !!option[disabledKey];
|
|
1145
1228
|
}
|
|
1229
|
+
/**
|
|
1230
|
+
* Whether an option is marked as already taken through `checkedKey`
|
|
1231
|
+
* @param option - The option to check
|
|
1232
|
+
* @returns True if the option shows the check without being part of the value
|
|
1233
|
+
*/
|
|
1234
|
+
isOptionChecked(option) {
|
|
1235
|
+
const checkedKey = this.checkedKey();
|
|
1236
|
+
return !!checkedKey && !!option && typeof option === 'object' && !!option[checkedKey];
|
|
1237
|
+
}
|
|
1146
1238
|
/**
|
|
1147
1239
|
* Gets the secondary text for an option through `descriptionKey`
|
|
1148
1240
|
* @param option - The option to read
|
|
@@ -1200,11 +1292,47 @@ class ComboboxComponent {
|
|
|
1200
1292
|
* Updates the trigger button width for overlay positioning
|
|
1201
1293
|
*/
|
|
1202
1294
|
updateTriggerWidth() {
|
|
1203
|
-
|
|
1295
|
+
// Fractional widths round up: rounding down would make an option that exactly fills the control wrap
|
|
1296
|
+
const width = Math.ceil(this.fieldRef()?.nativeElement.getBoundingClientRect().width ?? 0);
|
|
1204
1297
|
if (!width)
|
|
1205
1298
|
return;
|
|
1206
1299
|
this.triggerWidth.set(width);
|
|
1207
1300
|
}
|
|
1301
|
+
/**
|
|
1302
|
+
* @internal
|
|
1303
|
+
* On hover of a single-line option, shows its full text as a tooltip when its label or description is cut off
|
|
1304
|
+
* @param event - The pointer event on the option row
|
|
1305
|
+
* @param option - The option the row shows
|
|
1306
|
+
*/
|
|
1307
|
+
syncOptionTitle(event, option) {
|
|
1308
|
+
this.syncRowTitle(event.currentTarget, option);
|
|
1309
|
+
}
|
|
1310
|
+
/**
|
|
1311
|
+
* Sets the full-text tooltip of an option row when its label or description is cut off, or removes it;
|
|
1312
|
+
* runs on hover and when the row becomes the keyboard-active one
|
|
1313
|
+
* @param row - The option row
|
|
1314
|
+
* @param option - The option the row shows
|
|
1315
|
+
*/
|
|
1316
|
+
syncRowTitle(row, option) {
|
|
1317
|
+
const parts = row.querySelectorAll('[data-st-option-label], [data-st-option-description]');
|
|
1318
|
+
const truncated = Array.from(parts).some((part) => part.scrollWidth > part.clientWidth);
|
|
1319
|
+
if (truncated) {
|
|
1320
|
+
row.setAttribute('title', this.getOptionFullText(option));
|
|
1321
|
+
}
|
|
1322
|
+
else {
|
|
1323
|
+
row.removeAttribute('title');
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
/**
|
|
1327
|
+
* Gets the full text of an option: its label, then its description when it has one
|
|
1328
|
+
* @param option - The option to read
|
|
1329
|
+
* @returns The text shown as the tooltip of a truncated option
|
|
1330
|
+
*/
|
|
1331
|
+
getOptionFullText(option) {
|
|
1332
|
+
const description = this.getOptionDescription(option);
|
|
1333
|
+
const label = this.getDisplayValue(option);
|
|
1334
|
+
return description ? `${label}, ${description}` : label;
|
|
1335
|
+
}
|
|
1208
1336
|
/**
|
|
1209
1337
|
* Gets the value property from an option
|
|
1210
1338
|
* @param option - The option to get value from
|
|
@@ -1235,6 +1363,48 @@ class ComboboxComponent {
|
|
|
1235
1363
|
return optionValue === currentValue || option === value;
|
|
1236
1364
|
});
|
|
1237
1365
|
}
|
|
1366
|
+
/**
|
|
1367
|
+
* Gets the group an option belongs to through `groupKey`
|
|
1368
|
+
* @param option - The option to read
|
|
1369
|
+
* @returns The group name, or null when the option is ungrouped
|
|
1370
|
+
*/
|
|
1371
|
+
getOptionGroup(option) {
|
|
1372
|
+
const groupKey = this.groupKey();
|
|
1373
|
+
if (!groupKey || !option || typeof option !== 'object')
|
|
1374
|
+
return null;
|
|
1375
|
+
const group = option[groupKey];
|
|
1376
|
+
return group === undefined || group === null || group === '' ? null : String(group);
|
|
1377
|
+
}
|
|
1378
|
+
/**
|
|
1379
|
+
* Splits options into the ungrouped run, listed first, and one section per group in first-appearance order.
|
|
1380
|
+
* `index` is the option's position in the listed order; `headerId` is unique per instance.
|
|
1381
|
+
* @param options - The options to list
|
|
1382
|
+
* @returns The sections to render
|
|
1383
|
+
*/
|
|
1384
|
+
groupOptions(options) {
|
|
1385
|
+
const ungrouped = [];
|
|
1386
|
+
const groups = new Map();
|
|
1387
|
+
for (const option of options) {
|
|
1388
|
+
const group = this.getOptionGroup(option);
|
|
1389
|
+
if (group === null) {
|
|
1390
|
+
ungrouped.push(option);
|
|
1391
|
+
}
|
|
1392
|
+
else {
|
|
1393
|
+
groups.set(group, [...(groups.get(group) ?? []), option]);
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
let index = 0;
|
|
1397
|
+
const entries = (list) => list.map((option) => ({ option, index: index++ }));
|
|
1398
|
+
const sections = [];
|
|
1399
|
+
if (ungrouped.length > 0) {
|
|
1400
|
+
sections.push({ label: null, headerId: null, options: entries(ungrouped) });
|
|
1401
|
+
}
|
|
1402
|
+
let groupIndex = 0;
|
|
1403
|
+
for (const [label, list] of groups) {
|
|
1404
|
+
sections.push({ label, headerId: `${this.listboxId}-group-${groupIndex++}`, options: entries(list) });
|
|
1405
|
+
}
|
|
1406
|
+
return sections;
|
|
1407
|
+
}
|
|
1238
1408
|
/**
|
|
1239
1409
|
* Triggers blur event for form validation
|
|
1240
1410
|
*/
|
|
@@ -1292,12 +1462,17 @@ class ComboboxComponent {
|
|
|
1292
1462
|
this.updateActiveOptionVisually();
|
|
1293
1463
|
}
|
|
1294
1464
|
/**
|
|
1295
|
-
* Sets the first option as active
|
|
1465
|
+
* Sets the first enabled option as active; on open in single mode, the selected option, so the highlight and
|
|
1466
|
+
* the check sit on the same row. A search keeps the first match.
|
|
1467
|
+
* @param preferSelected - Whether an enabled selected option wins over the first one
|
|
1296
1468
|
*/
|
|
1297
|
-
setDefaultActiveOption() {
|
|
1298
|
-
const filteredOptions = this.
|
|
1469
|
+
setDefaultActiveOption(preferSelected = false) {
|
|
1470
|
+
const filteredOptions = this.orderedOptions();
|
|
1299
1471
|
if (filteredOptions.length > 0) {
|
|
1300
|
-
this.
|
|
1472
|
+
const selectedIndex = preferSelected && this.selectionType() !== 'multiple'
|
|
1473
|
+
? filteredOptions.findIndex((option) => this.isOptionSelected(option) && !this.isOptionDisabled(option))
|
|
1474
|
+
: -1;
|
|
1475
|
+
this.setActiveOption(selectedIndex >= 0 ? selectedIndex : this.findEnabledIndex(filteredOptions, -1, 1));
|
|
1301
1476
|
}
|
|
1302
1477
|
}
|
|
1303
1478
|
/**
|
|
@@ -1319,6 +1494,9 @@ class ComboboxComponent {
|
|
|
1319
1494
|
const activeOption = this.optionsList()?.nativeElement.querySelector(`[data-option-index="${currentIndex}"]`);
|
|
1320
1495
|
if (activeOption) {
|
|
1321
1496
|
activeOption.classList.add('cdk-option-active');
|
|
1497
|
+
const row = activeOption.querySelector(':scope > button');
|
|
1498
|
+
if (row && this.contentPanel())
|
|
1499
|
+
this.syncRowTitle(row, this.orderedOptions()[currentIndex]);
|
|
1322
1500
|
// Scroll into view if needed
|
|
1323
1501
|
activeOption.scrollIntoView({ block: 'nearest' });
|
|
1324
1502
|
}
|
|
@@ -1337,19 +1515,20 @@ class ComboboxComponent {
|
|
|
1337
1515
|
});
|
|
1338
1516
|
}
|
|
1339
1517
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ComboboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1340
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: ComboboxComponent, isStandalone: true, selector: "st-combobox", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showOptional: { classPropertyName: "showOptional", publicName: "showOptional", isSignal: true, isRequired: false, transformFunction: null }, optionalText: { classPropertyName: "optionalText", publicName: "optionalText", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, ghost: { classPropertyName: "ghost", publicName: "ghost", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, parentForm: { classPropertyName: "parentForm", publicName: "parentForm", isSignal: true, isRequired: false, transformFunction: null }, formControlName: { classPropertyName: "formControlName", publicName: "formControlName", isSignal: true, isRequired: false, transformFunction: null }, allowClear: { classPropertyName: "allowClear", publicName: "allowClear", isSignal: true, isRequired: false, transformFunction: null }, allowClearAll: { classPropertyName: "allowClearAll", publicName: "allowClearAll", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, noResultsText: { classPropertyName: "noResultsText", publicName: "noResultsText", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, displayKey: { classPropertyName: "displayKey", publicName: "displayKey", isSignal: true, isRequired: false, transformFunction: null }, valueKey: { classPropertyName: "valueKey", publicName: "valueKey", isSignal: true, isRequired: false, transformFunction: null }, disabledKey: { classPropertyName: "disabledKey", publicName: "disabledKey", isSignal: true, isRequired: false, transformFunction: null }, descriptionKey: { classPropertyName: "descriptionKey", publicName: "descriptionKey", isSignal: true, isRequired: false, transformFunction: null }, selectionType: { classPropertyName: "selectionType", publicName: "selectionType", isSignal: true, isRequired: false, transformFunction: null }, searchDebounced: { classPropertyName: "searchDebounced", publicName: "searchDebounced", isSignal: true, isRequired: false, transformFunction: null }, searchDebounceTime: { classPropertyName: "searchDebounceTime", publicName: "searchDebounceTime", isSignal: true, isRequired: false, transformFunction: null }, stopPropagation: { classPropertyName: "stopPropagation", publicName: "stopPropagation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", value: "valueChange", blurred: "blurred", valueUpdated: "valueUpdated", clicked: "clicked", keyDownEnter: "keyDownEnter", keyDownSpace: "keyDownSpace", triggered: "triggered", searchQuery: "searchQuery" }, providers: [
|
|
1518
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: ComboboxComponent, isStandalone: true, selector: "st-combobox", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showOptional: { classPropertyName: "showOptional", publicName: "showOptional", isSignal: true, isRequired: false, transformFunction: null }, optionalText: { classPropertyName: "optionalText", publicName: "optionalText", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, ghost: { classPropertyName: "ghost", publicName: "ghost", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, parentForm: { classPropertyName: "parentForm", publicName: "parentForm", isSignal: true, isRequired: false, transformFunction: null }, formControlName: { classPropertyName: "formControlName", publicName: "formControlName", isSignal: true, isRequired: false, transformFunction: null }, allowClear: { classPropertyName: "allowClear", publicName: "allowClear", isSignal: true, isRequired: false, transformFunction: null }, allowClearAll: { classPropertyName: "allowClearAll", publicName: "allowClearAll", isSignal: true, isRequired: false, transformFunction: null }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null }, fitOptions: { classPropertyName: "fitOptions", publicName: "fitOptions", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, noResultsText: { classPropertyName: "noResultsText", publicName: "noResultsText", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, displayKey: { classPropertyName: "displayKey", publicName: "displayKey", isSignal: true, isRequired: false, transformFunction: null }, valueKey: { classPropertyName: "valueKey", publicName: "valueKey", isSignal: true, isRequired: false, transformFunction: null }, disabledKey: { classPropertyName: "disabledKey", publicName: "disabledKey", isSignal: true, isRequired: false, transformFunction: null }, descriptionKey: { classPropertyName: "descriptionKey", publicName: "descriptionKey", isSignal: true, isRequired: false, transformFunction: null }, groupKey: { classPropertyName: "groupKey", publicName: "groupKey", isSignal: true, isRequired: false, transformFunction: null }, checkedKey: { classPropertyName: "checkedKey", publicName: "checkedKey", isSignal: true, isRequired: false, transformFunction: null }, selectionType: { classPropertyName: "selectionType", publicName: "selectionType", isSignal: true, isRequired: false, transformFunction: null }, searchDebounced: { classPropertyName: "searchDebounced", publicName: "searchDebounced", isSignal: true, isRequired: false, transformFunction: null }, searchDebounceTime: { classPropertyName: "searchDebounceTime", publicName: "searchDebounceTime", isSignal: true, isRequired: false, transformFunction: null }, stopPropagation: { classPropertyName: "stopPropagation", publicName: "stopPropagation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", value: "valueChange", blurred: "blurred", valueUpdated: "valueUpdated", clicked: "clicked", keyDownEnter: "keyDownEnter", keyDownSpace: "keyDownSpace", triggered: "triggered", searchQuery: "searchQuery" }, host: { properties: { "class.inline-block": "fitOptions()", "class.align-top": "fitOptions()", "class.shrink-0": "fitOptions()" } }, providers: [
|
|
1341
1519
|
{
|
|
1342
1520
|
provide: NG_VALUE_ACCESSOR,
|
|
1343
1521
|
useExisting: ComboboxComponent,
|
|
1344
1522
|
multi: true,
|
|
1345
1523
|
},
|
|
1346
|
-
], viewQueries: [{ propertyName: "fieldRef", first: true, predicate: ["field"], descendants: true, isSignal: true }, { propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "searchInputRef", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "optionsList", first: true, predicate: ["optionsList"], descendants: true, isSignal: true }, { propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- Field chrome click is pointer-only sugar; keyboard access is the focusable trigger button inside. -->\n@let isOpen = this.isOpen(); @let triggerWidth = this.triggerWidth(); @let dataState = this.dataState();\n@let filteredOptions = this.filteredOptions(); @let displayValue = this.displayValue(); @let multipleDisplayInfo = this.multipleDisplayInfo();\n@let label = this.label();\n\n<fieldset class=\"fieldset p-0\">\n\t@if (label) {\n\t\t<legend class=\"fieldset-legend font-body w-full items-center justify-between gap-2 pt-0 font-normal text-pretty\">\n\t\t\t<span\n\t\t\t\t>{{ label }}\n\t\t\t\t@if (fieldA11y.required()) {\n\t\t\t\t\t<span aria-hidden=\"true\" data-st-required-marker class=\"text-error-strong ms-0.5\">*</span>\n\t\t\t\t}\n\t\t\t</span>\n\t\t\t@if (showOptional()) {\n\t\t\t\t<span class=\"label font-body text-xs font-normal\">{{ optionalText() | translate }}</span>\n\t\t\t}\n\t\t</legend>\n\t}\n\n\t<div\n\t\t#field\n\t\tcdkOverlayOrigin\n\t\t#overlayOrigin=\"cdkOverlayOrigin\"\n\t\t[class]=\"validationClass()\"\n\t\t[attr.data-open]=\"isOpen ? '' : null\"\n\t\t(click)=\"handleFieldChromeClick($event)\"\n\t>\n\t\t<button\n\t\t\t#trigger\n\t\t\t[id]=\"resolvedId()\"\n\t\t\t[attr.aria-required]=\"fieldA11y.required() || null\"\n\t\t\t[attr.aria-invalid]=\"fieldA11y.invalid() || null\"\n\t\t\t[attr.aria-describedby]=\"fieldA11y.describedBy()\"\n\t\t\tclass=\"min-w-0 flex-1 grow cursor-pointer bg-transparent p-0 text-left outline-hidden\"\n\t\t\t(click)=\"handleClick($event)\"\n\t\t\t(keydown)=\"handleTriggerKeydown($event)\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"listbox\"\n\t\t\trole=\"combobox\"\n\t\t\t[attr.aria-controls]=\"listboxId\"\n\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t[disabled]=\"disabled()\"\n\t\t>\n\t\t\t<span class=\"block min-w-0 truncate text-left\">\n\t\t\t\t@if (selectionType() === 'multiple' && multipleDisplayInfo) {\n\t\t\t\t\t<span class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t<span class=\"truncate\">{{ multipleDisplayInfo.firstItem }}</span>\n\t\t\t\t\t\t@if (multipleDisplayInfo.additionalCount > 0) {\n\t\t\t\t\t\t\t<st-badge variant=\"primary\" [soft]=\"true\" [size]=\"badgeClass()\">+{{ multipleDisplayInfo.additionalCount }}</st-badge>\n\t\t\t\t\t\t}\n\t\t\t\t\t</span>\n\t\t\t\t} @else {\n\t\t\t\t\t{{ displayValue }}\n\t\t\t\t}\n\t\t\t</span>\n\t\t</button>\n\t\t@if (showClearButton()) {\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tdata-st-clear\n\t\t\t\tclass=\"btn btn-ghost btn-square shrink-0 cursor-pointer [--fontsize:1em] [--size:1.25em]\"\n\t\t\t\t(click)=\"handleClearSelection($event)\"\n\t\t\t\t(keydown.enter)=\"handleClearSelection($event)\"\n\t\t\t\t(keydown.space)=\"handleClearSelection($event)\"\n\t\t\t\t[attr.aria-label]=\"clearSelectionLabel()\"\n\t\t\t>\n\t\t\t\t<st-icon [icon]=\"iconClose\"></st-icon>\n\t\t\t</button>\n\t\t}\n\t\t<span data-st-chevron class=\"pointer-events-none inline-flex size-[1em] shrink-0 items-center justify-center\" aria-hidden=\"true\">\n\t\t\t<st-icon [icon]=\"iconChevronDown\"></st-icon>\n\t\t</span>\n\t</div>\n\n\t<ng-template\n\t\tcdkConnectedOverlay\n\t\t[cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n\t\t[cdkConnectedOverlayOpen]=\"isOpen\"\n\t\t[cdkConnectedOverlayPositions]=\"overlayPositions\"\n\t\t[cdkConnectedOverlayDisableClose]=\"true\"\n\t\t[cdkConnectedOverlayWidth]=\"triggerWidth\"\n\t\t[cdkConnectedOverlayMinWidth]=\"triggerWidth\"\n\t\t(detach)=\"handleDetach()\"\n\t\t(overlayOutsideClick)=\"handleClickOutside($event)\"\n\t\t(positionChange)=\"onPositionChange($event)\"\n\t>\n\t\t<div class=\"contents\" [attr.data-theme]=\"themeDomService.themeOf(field)\">\n\t\t\t<div\n\t\t\t\t[class]=\"'rounded-box shadow-overlay w-full ' + animationClasses()\"\n\t\t\t\t(animationend)=\"onAnimationEnd($event)\"\n\t\t\t\t[attr.data-state]=\"dataState\"\n\t\t\t\t[attr.data-side]=\"placement()?.side\"\n\t\t\t\t[attr.data-align]=\"placement()?.align\"\n\t\t\t>\n\t\t\t\t<div class=\"bg-base-200 rounded-box border-neutral overflow-hidden border border-solid\">\n\t\t\t\t\t<!-- Search Input -->\n\t\t\t\t\t<div class=\"border-neutral border-b\">\n\t\t\t\t\t\t@let searchInputClass = this.searchInputClass();\n\t\t\t\t\t\t<div [class]=\"searchInputClass\">\n\t\t\t\t\t\t\t<st-icon class=\"text-base-content-muted\" [icon]=\"iconSearch\"></st-icon>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t#searchInput\n\t\t\t\t\t\t\t\tclass=\"placeholder:text-base-content-muted w-full border-transparent py-0 focus-within:outline-hidden focus:border-transparent focus:outline-hidden\"\n\t\t\t\t\t\t\t\t[value]=\"currentSearchValue\"\n\t\t\t\t\t\t\t\t(input)=\"handleSearchInput($event)\"\n\t\t\t\t\t\t\t\t(keydown)=\"handleSearchKeydown($event)\"\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t[placeholder]=\"translatedSearchPlaceholder()\"\n\t\t\t\t\t\t\t\t[attr.aria-label]=\"searchOptionsLabel()\"\n\t\t\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t\t\t\t\t\t[attr.aria-controls]=\"listboxId\"\n\t\t\t\t\t\t\t\t[attr.aria-activedescendant]=\"activeOptionId()\"\n\t\t\t\t\t\t\t\t[disabled]=\"!isOpen\"\n\t\t\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Options List -->\n\t\t\t\t\t@let menuClass = this.menuClass();\n\t\t\t\t\t<ul\n\t\t\t\t\t\t[class]=\"menuClass\"\n\t\t\t\t\t\tcdkListbox\n\t\t\t\t\t\tcdkListboxUseActiveDescendant\n\t\t\t\t\t\t[cdkListboxMultiple]=\"selectionType() === 'multiple'\"\n\t\t\t\t\t\t[id]=\"listboxId\"\n\t\t\t\t\t\t[attr.aria-labelledby]=\"label ? labelId : resolvedId()\"\n\t\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\t\t#optionsList\n\t\t\t\t\t\t[tabindex]=\"-1\"\n\t\t\t\t\t\t(keydown)=\"handleListboxKeydown($event)\"\n\t\t\t\t\t\t(selectionChange)=\"handleSelectionChange($event)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t@for (option of filteredOptions; track $index) {\n\t\t\t\t\t\t\t@let optionDisabled = isOptionDisabled(option);\n\t\t\t\t\t\t\t@let optionDescription = getOptionDescription(option);\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t[cdkOption]=\"option\"\n\t\t\t\t\t\t\t\t[id]=\"optionId($index)\"\n\t\t\t\t\t\t\t\t[cdkOptionDisabled]=\"optionDisabled\"\n\t\t\t\t\t\t\t\tclass=\"group\"\n\t\t\t\t\t\t\t\t[attr.data-option-index]=\"$index\"\n\t\t\t\t\t\t\t\t[attr.data-disabled]=\"optionDisabled ? '' : null\"\n\t\t\t\t\t\t\t\t[class.cdk-option-active]=\"isActiveOption($index)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tclass=\"group-[.cdk-option-active]:bg-base-300 font-body flex w-full items-center justify-between rounded-none px-4 py-2 text-left leading-normal font-normal text-pretty transition-colors duration-150 ease-in-out group-data-disabled:cursor-not-allowed group-data-disabled:bg-transparent group-data-disabled:text-(--color-disabled-content) group-data-disabled:hover:bg-transparent\"\n\t\t\t\t\t\t\t\t\t(click)=\"handleOptionSelect(option)\"\n\t\t\t\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span class=\"min-w-0 flex-1 wrap-break-word whitespace-normal\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"block\">{{ getDisplayValue(option) }}</span>\n\t\t\t\t\t\t\t\t\t\t@if (optionDescription) {\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"sr-only\">, </span>\n\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\tdata-st-option-description\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"text-base-content-muted block text-sm group-data-disabled:text-(--color-disabled-content)\"\n\t\t\t\t\t\t\t\t\t\t\t\t>{{ optionDescription }}</span\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t\t\t@if (isOptionSelected(option)) {\n\t\t\t\t\t\t\t\t\t\t<st-icon class=\"h-4 w-4 shrink-0\" [icon]=\"iconCheck\"></st-icon>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t<!-- Empty state -->\n\t\t\t\t\t\t@if (filteredOptions.length === 0) {\n\t\t\t\t\t\t\t<li class=\"text-base-content-muted px-4 py-2 text-center\">\n\t\t\t\t\t\t\t\t<span>{{ translatedNoResultsText() }}</span>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\t\t\t\t\t</ul>\n\n\t\t\t\t\t<!-- Clear All button for multiple selection -->\n\t\t\t\t\t@if (selectionType() === 'multiple' && allowClearAll() && value() && isArray(value()) && value().length > 0) {\n\t\t\t\t\t\t<div class=\"border-base-300 border-t p-2\">\n\t\t\t\t\t\t\t<st-button\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t[ghost]=\"true\"\n\t\t\t\t\t\t\t\t[block]=\"true\"\n\t\t\t\t\t\t\t\t(clicked)=\"clearSelection()\"\n\t\t\t\t\t\t\t\t(keydown)=\"handleClearButtonKeydown($event)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{{ clearAllLabel() }}\n\t\t\t\t\t\t\t</st-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</ng-template>\n\n\t@if (label) {\n\t\t<label class=\"sr-only\" [id]=\"labelId\" [for]=\"resolvedId()\">{{ label }}</label>\n\t}\n\n\t<!-- Additional content -->\n\t<ng-content></ng-content>\n</fieldset>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: PortalModule }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.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.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "directive", type: CdkOption, selector: "[cdkOption]", inputs: ["id", "cdkOption", "cdkOptionTypeaheadLabel", "cdkOptionDisabled", "tabindex"], exportAs: ["cdkOption"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon", "ariaLabel"] }, { kind: "component", type: BadgeComponent, selector: "st-badge", inputs: ["variant", "size", "outline", "soft", "dash", "ghost", "icon", "iconPosition", "truncate"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation", "ariaLabel", "ariaExpanded", "ariaPressed", "ariaDescribedBy", "ariaControls"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1524
|
+
], viewQueries: [{ propertyName: "fieldRef", first: true, predicate: ["field"], descendants: true, isSignal: true }, { propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "searchInputRef", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "optionsList", first: true, predicate: ["optionsList"], descendants: true, isSignal: true }, { propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- Field chrome click is pointer-only sugar; keyboard access is the focusable trigger button inside. -->\n@let isOpen = this.isOpen(); @let triggerWidth = this.triggerWidth(); @let dataState = this.dataState();\n@let filteredOptions = this.filteredOptions(); @let displayValue = this.displayValue(); @let multipleDisplayInfo = this.multipleDisplayInfo();\n@let label = this.label();\n@let fitOptions = this.fitOptions(); @let contentPanel = this.contentPanel();\n\n<!-- One option on a single line (content-width panel and option sizer): label, description, check slot (always 16px in the sizer) -->\n<ng-template #optionLine let-option let-sizer=\"sizer\">\n\t@let lineDescription = getOptionDescription(option);\n\t<span class=\"flex min-w-0 grow items-center\">\n\t\t<span data-st-option-label [class]=\"lineDescription ? 'max-w-[calc(100%-1.25rem)] shrink-0 truncate' : 'max-w-full shrink-0 truncate'\">{{\n\t\t\tgetDisplayValue(option)\n\t\t}}</span>\n\t\t@if (lineDescription) {\n\t\t\t<span class=\"sr-only\">, </span>\n\t\t\t<span\n\t\t\t\tdata-st-option-description\n\t\t\t\tclass=\"text-base-content-muted ms-3 me-2 min-w-0 grow truncate text-end text-sm group-data-disabled:text-(--color-disabled-content)\"\n\t\t\t\t>{{ lineDescription }}</span\n\t\t\t>\n\t\t}\n\t</span>\n\t@if (sizer) {\n\t\t<span class=\"size-4 shrink-0\"></span>\n\t} @else if (isOptionSelected(option)) {\n\t\t<st-icon class=\"h-4 w-4 shrink-0\" [icon]=\"iconCheck\"></st-icon>\n\t} @else if (isOptionChecked(option)) {\n\t\t<st-icon data-st-option-checked class=\"h-4 w-4 shrink-0 group-data-disabled:text-(--color-disabled-content)\" [icon]=\"iconCheck\"></st-icon>\n\t} @else {\n\t\t<span aria-hidden=\"true\" class=\"size-4 shrink-0\"></span>\n\t}\n</ng-template>\n\n<!-- Hidden stack of every option row (search ignored), so CSS takes the widest as the width -->\n<ng-template #optionSizer let-placement>\n\t<ul aria-hidden=\"true\" data-st-option-sizer [class]=\"optionSizerClass() + ' ' + placement\">\n\t\t@for (section of allOptionSections(); track section.label) {\n\t\t\t@if (section.label) {\n\t\t\t\t<li class=\"menu-title px-4 font-semibold whitespace-nowrap\">{{ section.label }}</li>\n\t\t\t}\n\t\t\t@for (entry of section.options; track entry.index) {\n\t\t\t\t<li>\n\t\t\t\t\t<div [class]=\"optionRowClass + ' whitespace-nowrap'\">\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionLine; context: { $implicit: entry.option, sizer: true }\" />\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t}\n\t\t}\n\t</ul>\n</ng-template>\n\n<fieldset class=\"fieldset p-0\">\n\t@if (label) {\n\t\t<legend class=\"fieldset-legend font-body w-full items-center justify-between gap-2 pt-0 font-normal text-pretty\">\n\t\t\t<span\n\t\t\t\t>{{ label }}\n\t\t\t\t@if (fieldA11y.required()) {\n\t\t\t\t\t<span aria-hidden=\"true\" data-st-required-marker class=\"text-error-strong ms-0.5\">*</span>\n\t\t\t\t}\n\t\t\t</span>\n\t\t\t@if (showOptional()) {\n\t\t\t\t<span class=\"label font-body text-xs font-normal\">{{ optionalText() | translate }}</span>\n\t\t\t}\n\t\t</legend>\n\t}\n\n\t<div [class]=\"fitOptions ? 'grid' : 'contents'\">\n\t\t@if (fitOptions) {\n\t\t\t<ng-container *ngTemplateOutlet=\"optionSizer; context: { $implicit: 'col-start-1 row-start-1 border-x border-solid border-transparent' }\" />\n\t\t}\n\t\t<div\n\t\t\t#field\n\t\t\tcdkOverlayOrigin\n\t\t\t#overlayOrigin=\"cdkOverlayOrigin\"\n\t\t\t[class]=\"validationClass()\"\n\t\t\t[class.col-start-1]=\"fitOptions\"\n\t\t\t[class.row-start-1]=\"fitOptions\"\n\t\t\t[attr.data-open]=\"isOpen ? '' : null\"\n\t\t\t(click)=\"handleFieldChromeClick($event)\"\n\t\t>\n\t\t\t<button\n\t\t\t\t#trigger\n\t\t\t\t[id]=\"resolvedId()\"\n\t\t\t\t[attr.aria-required]=\"fieldA11y.required() || null\"\n\t\t\t\t[attr.aria-invalid]=\"fieldA11y.invalid() || null\"\n\t\t\t\t[attr.aria-describedby]=\"fieldA11y.describedBy()\"\n\t\t\t\tclass=\"min-w-0 flex-1 grow cursor-pointer bg-transparent p-0 text-left outline-hidden\"\n\t\t\t\t(click)=\"handleClick($event)\"\n\t\t\t\t(keydown)=\"handleTriggerKeydown($event)\"\n\t\t\t\ttype=\"button\"\n\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\trole=\"combobox\"\n\t\t\t\t[attr.aria-controls]=\"listboxId\"\n\t\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t\t[disabled]=\"disabled()\"\n\t\t\t>\n\t\t\t\t<ng-template #triggerValue>\n\t\t\t\t\t@if (selectionType() === 'multiple' && multipleDisplayInfo) {\n\t\t\t\t\t\t<span class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t<span class=\"truncate\">{{ multipleDisplayInfo.firstItem }}</span>\n\t\t\t\t\t\t\t@if (multipleDisplayInfo.additionalCount > 0) {\n\t\t\t\t\t\t\t\t<st-badge variant=\"primary\" [soft]=\"true\" [size]=\"badgeClass()\">+{{ multipleDisplayInfo.additionalCount }}</st-badge>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t} @else {\n\t\t\t\t\t\t{{ displayValue }}\n\t\t\t\t\t}\n\t\t\t\t</ng-template>\n\t\t\t\t@if (fitOptions) {\n\t\t\t\t\t<span class=\"grid min-w-0\">\n\t\t\t\t\t\t<span class=\"col-start-1 row-start-1 block min-w-0 truncate text-left\">\n\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"triggerValue\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span aria-hidden=\"true\" data-st-value-sizer class=\"invisible col-start-1 row-start-1 h-0 overflow-hidden\">\n\t\t\t\t\t\t\t@for (text of valueSizerLabels(); track $index) {\n\t\t\t\t\t\t\t\t<span class=\"block whitespace-nowrap\">{{ text }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t} @else {\n\t\t\t\t\t<span class=\"block min-w-0 truncate text-left\">\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"triggerValue\" />\n\t\t\t\t\t</span>\n\t\t\t\t}\n\t\t\t</button>\n\t\t\t@if (showClearButton()) {\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tdata-st-clear\n\t\t\t\t\tclass=\"btn btn-ghost btn-square shrink-0 cursor-pointer [--fontsize:1em] [--size:1.25em]\"\n\t\t\t\t\t(click)=\"handleClearSelection($event)\"\n\t\t\t\t\t(keydown.enter)=\"handleClearSelection($event)\"\n\t\t\t\t\t(keydown.space)=\"handleClearSelection($event)\"\n\t\t\t\t\t[attr.aria-label]=\"clearSelectionLabel()\"\n\t\t\t\t>\n\t\t\t\t\t<st-icon [icon]=\"iconClose\"></st-icon>\n\t\t\t\t</button>\n\t\t\t} @else if (fitOptions && allowClear()) {\n\t\t\t\t<!-- Keeps the clear button's room so the fitted control does not change width when a value is chosen -->\n\t\t\t\t<span aria-hidden=\"true\" data-st-clear-spacer class=\"w-[1.25em] shrink-0\"></span>\n\t\t\t}\n\t\t\t<span data-st-chevron class=\"pointer-events-none inline-flex size-[1em] shrink-0 items-center justify-center\" aria-hidden=\"true\">\n\t\t\t\t<st-icon [icon]=\"iconChevronDown\"></st-icon>\n\t\t\t</span>\n\t\t</div>\n\t</div>\n\n\t<ng-template\n\t\tcdkConnectedOverlay\n\t\t[cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n\t\t[cdkConnectedOverlayOpen]=\"isOpen\"\n\t\t[cdkConnectedOverlayPositions]=\"activeOverlayPositions()\"\n\t\t[cdkConnectedOverlayDisableClose]=\"true\"\n\t\t[cdkConnectedOverlayWidth]=\"overlayWidth()\"\n\t\t[cdkConnectedOverlayMinWidth]=\"triggerWidth\"\n\t\t(detach)=\"handleDetach()\"\n\t\t(overlayOutsideClick)=\"handleClickOutside($event)\"\n\t\t(positionChange)=\"onPositionChange($event)\"\n\t>\n\t\t<div class=\"contents\" [attr.data-theme]=\"themeDomService.themeOf(field)\">\n\t\t\t<div\n\t\t\t\t[class]=\"panelClass()\"\n\t\t\t\t(animationend)=\"onAnimationEnd($event)\"\n\t\t\t\t[attr.data-state]=\"dataState\"\n\t\t\t\t[attr.data-side]=\"placement()?.side\"\n\t\t\t\t[attr.data-align]=\"placement()?.align\"\n\t\t\t>\n\t\t\t\t<div class=\"bg-base-200 rounded-box border-neutral overflow-hidden border border-solid\">\n\t\t\t\t\t@if (contentPanel) {\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionSizer; context: { $implicit: '' }\" />\n\t\t\t\t\t}\n\t\t\t\t\t<!-- Search Input: in a content-width panel it takes the panel's width and never sets it -->\n\t\t\t\t\t<div class=\"border-neutral border-b\" [class.w-0]=\"contentPanel\" [class.min-w-full]=\"contentPanel\">\n\t\t\t\t\t\t@let searchInputClass = this.searchInputClass();\n\t\t\t\t\t\t<div [class]=\"searchInputClass\">\n\t\t\t\t\t\t\t<st-icon class=\"text-base-content-muted\" [icon]=\"iconSearch\"></st-icon>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t#searchInput\n\t\t\t\t\t\t\t\tclass=\"placeholder:text-base-content-muted w-full border-transparent py-0 focus-within:outline-hidden focus:border-transparent focus:outline-hidden\"\n\t\t\t\t\t\t\t\t[value]=\"currentSearchValue\"\n\t\t\t\t\t\t\t\t(input)=\"handleSearchInput($event)\"\n\t\t\t\t\t\t\t\t(keydown)=\"handleSearchKeydown($event)\"\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t[placeholder]=\"translatedSearchPlaceholder()\"\n\t\t\t\t\t\t\t\t[attr.aria-label]=\"searchOptionsLabel()\"\n\t\t\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t\t\t\t\t\t[attr.aria-controls]=\"listboxId\"\n\t\t\t\t\t\t\t\t[attr.aria-activedescendant]=\"activeOptionId()\"\n\t\t\t\t\t\t\t\t[disabled]=\"!isOpen\"\n\t\t\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Options List -->\n\t\t\t\t\t@let menuClass = this.menuClass();\n\t\t\t\t\t<ul\n\t\t\t\t\t\t[class]=\"menuClass\"\n\t\t\t\t\t\tcdkListbox\n\t\t\t\t\t\tcdkListboxUseActiveDescendant\n\t\t\t\t\t\t[cdkListboxMultiple]=\"selectionType() === 'multiple'\"\n\t\t\t\t\t\t[id]=\"listboxId\"\n\t\t\t\t\t\t[attr.aria-labelledby]=\"label ? labelId : resolvedId()\"\n\t\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\t\t#optionsList\n\t\t\t\t\t\t[tabindex]=\"-1\"\n\t\t\t\t\t\t(keydown)=\"handleListboxKeydown($event)\"\n\t\t\t\t\t\t(selectionChange)=\"handleSelectionChange($event)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ng-template #optionTemplate let-option let-index=\"index\">\n\t\t\t\t\t\t\t@let optionDisabled = isOptionDisabled(option);\n\t\t\t\t\t\t\t@let optionDescription = getOptionDescription(option);\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t[cdkOption]=\"option\"\n\t\t\t\t\t\t\t\t[id]=\"optionId(index)\"\n\t\t\t\t\t\t\t\t[cdkOptionDisabled]=\"optionDisabled\"\n\t\t\t\t\t\t\t\tclass=\"group\"\n\t\t\t\t\t\t\t\t[attr.data-option-index]=\"index\"\n\t\t\t\t\t\t\t\t[attr.data-disabled]=\"optionDisabled ? '' : null\"\n\t\t\t\t\t\t\t\t[class.cdk-option-active]=\"isActiveOption(index)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t@if (contentPanel) {\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t[class]=\"optionRowClass + ' whitespace-nowrap'\"\n\t\t\t\t\t\t\t\t\t\t(click)=\"handleOptionSelect(option)\"\n\t\t\t\t\t\t\t\t\t\t(mouseenter)=\"syncOptionTitle($event, option)\"\n\t\t\t\t\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionLine; context: { $implicit: option }\" />\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t<button type=\"button\" [class]=\"optionRowClass\" (click)=\"handleOptionSelect(option)\" tabindex=\"-1\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"min-w-min flex-1 wrap-break-word whitespace-normal\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"block\">{{ getDisplayValue(option) }}</span>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t@if (optionDescription) {\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"sr-only\">, </span>\n\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\tdata-st-option-description\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"text-base-content-muted ms-3 min-w-0 truncate text-end text-sm not-last:me-2 group-data-disabled:text-(--color-disabled-content)\"\n\t\t\t\t\t\t\t\t\t\t\t\t>{{ optionDescription }}</span\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t@if (isOptionSelected(option)) {\n\t\t\t\t\t\t\t\t\t\t\t<st-icon class=\"h-4 w-4 shrink-0\" [icon]=\"iconCheck\"></st-icon>\n\t\t\t\t\t\t\t\t\t\t} @else if (isOptionChecked(option)) {\n\t\t\t\t\t\t\t\t\t\t\t<st-icon\n\t\t\t\t\t\t\t\t\t\t\t\tdata-st-option-checked\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"h-4 w-4 shrink-0 group-data-disabled:text-(--color-disabled-content)\"\n\t\t\t\t\t\t\t\t\t\t\t\t[icon]=\"iconCheck\"\n\t\t\t\t\t\t\t\t\t\t\t></st-icon>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ng-template>\n\n\t\t\t\t\t\t@for (section of optionSections(); track section.label; let firstSection = $first) {\n\t\t\t\t\t\t\t@if (section.headerId) {\n\t\t\t\t\t\t\t\t@if (!firstSection) {\n\t\t\t\t\t\t\t\t\t<li role=\"none\" data-st-option-group-separator class=\"pointer-events-none top-0 left-0 mx-0 my-1 w-full p-0\"></li>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t<li role=\"none\" data-st-option-group>\n\t\t\t\t\t\t\t\t\t<ul role=\"group\" class=\"ms-0 ps-0 whitespace-normal before:hidden\" [attr.aria-labelledby]=\"section.headerId\">\n\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\t\t\t\t\t\tdata-st-option-group-header\n\t\t\t\t\t\t\t\t\t\t\tclass=\"menu-title text-base-content-secondary px-4 font-semibold\"\n\t\t\t\t\t\t\t\t\t\t\t[id]=\"section.headerId\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{{ section.label }}\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t@for (entry of section.options; track entry.index) {\n\t\t\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: entry.option, index: entry.index }\" />\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t@for (entry of section.options; track entry.index) {\n\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: entry.option, index: entry.index }\" />\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t<!-- Empty state -->\n\t\t\t\t\t\t@if (filteredOptions.length === 0) {\n\t\t\t\t\t\t\t<li class=\"text-base-content-muted px-4 py-2 text-center\" [class.w-0]=\"contentPanel\" [class.min-w-full]=\"contentPanel\">\n\t\t\t\t\t\t\t\t<span>{{ translatedNoResultsText() }}</span>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\t\t\t\t\t</ul>\n\n\t\t\t\t\t<!-- Clear All button for multiple selection -->\n\t\t\t\t\t@if (selectionType() === 'multiple' && allowClearAll() && value() && isArray(value()) && value().length > 0) {\n\t\t\t\t\t\t<div class=\"border-base-300 border-t p-2\" [class.w-0]=\"contentPanel\" [class.min-w-full]=\"contentPanel\">\n\t\t\t\t\t\t\t<st-button\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t[ghost]=\"true\"\n\t\t\t\t\t\t\t\t[block]=\"true\"\n\t\t\t\t\t\t\t\t(clicked)=\"clearSelection()\"\n\t\t\t\t\t\t\t\t(keydown)=\"handleClearButtonKeydown($event)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{{ clearAllLabel() }}\n\t\t\t\t\t\t\t</st-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</ng-template>\n\n\t@if (label) {\n\t\t<label class=\"sr-only\" [id]=\"labelId\" [for]=\"resolvedId()\">{{ label }}</label>\n\t}\n\n\t<!-- Additional content -->\n\t<ng-content></ng-content>\n</fieldset>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: PortalModule }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.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.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "directive", type: CdkOption, selector: "[cdkOption]", inputs: ["id", "cdkOption", "cdkOptionTypeaheadLabel", "cdkOptionDisabled", "tabindex"], exportAs: ["cdkOption"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon", "ariaLabel"] }, { kind: "component", type: BadgeComponent, selector: "st-badge", inputs: ["variant", "size", "outline", "soft", "dash", "ghost", "icon", "iconPosition", "truncate"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation", "ariaLabel", "ariaExpanded", "ariaPressed", "ariaDescribedBy", "ariaControls"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1347
1525
|
}
|
|
1348
1526
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ComboboxComponent, decorators: [{
|
|
1349
1527
|
type: Component,
|
|
1350
1528
|
args: [{ selector: 'st-combobox', imports: [
|
|
1351
1529
|
FormsModule,
|
|
1352
1530
|
ReactiveFormsModule,
|
|
1531
|
+
NgTemplateOutlet,
|
|
1353
1532
|
PortalModule,
|
|
1354
1533
|
OverlayModule,
|
|
1355
1534
|
CdkListbox,
|
|
@@ -1364,7 +1543,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1364
1543
|
useExisting: ComboboxComponent,
|
|
1365
1544
|
multi: true,
|
|
1366
1545
|
},
|
|
1367
|
-
], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1546
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1547
|
+
'[class.inline-block]': 'fitOptions()',
|
|
1548
|
+
'[class.align-top]': 'fitOptions()',
|
|
1549
|
+
'[class.shrink-0]': 'fitOptions()',
|
|
1550
|
+
}, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- Field chrome click is pointer-only sugar; keyboard access is the focusable trigger button inside. -->\n@let isOpen = this.isOpen(); @let triggerWidth = this.triggerWidth(); @let dataState = this.dataState();\n@let filteredOptions = this.filteredOptions(); @let displayValue = this.displayValue(); @let multipleDisplayInfo = this.multipleDisplayInfo();\n@let label = this.label();\n@let fitOptions = this.fitOptions(); @let contentPanel = this.contentPanel();\n\n<!-- One option on a single line (content-width panel and option sizer): label, description, check slot (always 16px in the sizer) -->\n<ng-template #optionLine let-option let-sizer=\"sizer\">\n\t@let lineDescription = getOptionDescription(option);\n\t<span class=\"flex min-w-0 grow items-center\">\n\t\t<span data-st-option-label [class]=\"lineDescription ? 'max-w-[calc(100%-1.25rem)] shrink-0 truncate' : 'max-w-full shrink-0 truncate'\">{{\n\t\t\tgetDisplayValue(option)\n\t\t}}</span>\n\t\t@if (lineDescription) {\n\t\t\t<span class=\"sr-only\">, </span>\n\t\t\t<span\n\t\t\t\tdata-st-option-description\n\t\t\t\tclass=\"text-base-content-muted ms-3 me-2 min-w-0 grow truncate text-end text-sm group-data-disabled:text-(--color-disabled-content)\"\n\t\t\t\t>{{ lineDescription }}</span\n\t\t\t>\n\t\t}\n\t</span>\n\t@if (sizer) {\n\t\t<span class=\"size-4 shrink-0\"></span>\n\t} @else if (isOptionSelected(option)) {\n\t\t<st-icon class=\"h-4 w-4 shrink-0\" [icon]=\"iconCheck\"></st-icon>\n\t} @else if (isOptionChecked(option)) {\n\t\t<st-icon data-st-option-checked class=\"h-4 w-4 shrink-0 group-data-disabled:text-(--color-disabled-content)\" [icon]=\"iconCheck\"></st-icon>\n\t} @else {\n\t\t<span aria-hidden=\"true\" class=\"size-4 shrink-0\"></span>\n\t}\n</ng-template>\n\n<!-- Hidden stack of every option row (search ignored), so CSS takes the widest as the width -->\n<ng-template #optionSizer let-placement>\n\t<ul aria-hidden=\"true\" data-st-option-sizer [class]=\"optionSizerClass() + ' ' + placement\">\n\t\t@for (section of allOptionSections(); track section.label) {\n\t\t\t@if (section.label) {\n\t\t\t\t<li class=\"menu-title px-4 font-semibold whitespace-nowrap\">{{ section.label }}</li>\n\t\t\t}\n\t\t\t@for (entry of section.options; track entry.index) {\n\t\t\t\t<li>\n\t\t\t\t\t<div [class]=\"optionRowClass + ' whitespace-nowrap'\">\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionLine; context: { $implicit: entry.option, sizer: true }\" />\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t}\n\t\t}\n\t</ul>\n</ng-template>\n\n<fieldset class=\"fieldset p-0\">\n\t@if (label) {\n\t\t<legend class=\"fieldset-legend font-body w-full items-center justify-between gap-2 pt-0 font-normal text-pretty\">\n\t\t\t<span\n\t\t\t\t>{{ label }}\n\t\t\t\t@if (fieldA11y.required()) {\n\t\t\t\t\t<span aria-hidden=\"true\" data-st-required-marker class=\"text-error-strong ms-0.5\">*</span>\n\t\t\t\t}\n\t\t\t</span>\n\t\t\t@if (showOptional()) {\n\t\t\t\t<span class=\"label font-body text-xs font-normal\">{{ optionalText() | translate }}</span>\n\t\t\t}\n\t\t</legend>\n\t}\n\n\t<div [class]=\"fitOptions ? 'grid' : 'contents'\">\n\t\t@if (fitOptions) {\n\t\t\t<ng-container *ngTemplateOutlet=\"optionSizer; context: { $implicit: 'col-start-1 row-start-1 border-x border-solid border-transparent' }\" />\n\t\t}\n\t\t<div\n\t\t\t#field\n\t\t\tcdkOverlayOrigin\n\t\t\t#overlayOrigin=\"cdkOverlayOrigin\"\n\t\t\t[class]=\"validationClass()\"\n\t\t\t[class.col-start-1]=\"fitOptions\"\n\t\t\t[class.row-start-1]=\"fitOptions\"\n\t\t\t[attr.data-open]=\"isOpen ? '' : null\"\n\t\t\t(click)=\"handleFieldChromeClick($event)\"\n\t\t>\n\t\t\t<button\n\t\t\t\t#trigger\n\t\t\t\t[id]=\"resolvedId()\"\n\t\t\t\t[attr.aria-required]=\"fieldA11y.required() || null\"\n\t\t\t\t[attr.aria-invalid]=\"fieldA11y.invalid() || null\"\n\t\t\t\t[attr.aria-describedby]=\"fieldA11y.describedBy()\"\n\t\t\t\tclass=\"min-w-0 flex-1 grow cursor-pointer bg-transparent p-0 text-left outline-hidden\"\n\t\t\t\t(click)=\"handleClick($event)\"\n\t\t\t\t(keydown)=\"handleTriggerKeydown($event)\"\n\t\t\t\ttype=\"button\"\n\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\trole=\"combobox\"\n\t\t\t\t[attr.aria-controls]=\"listboxId\"\n\t\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t\t[disabled]=\"disabled()\"\n\t\t\t>\n\t\t\t\t<ng-template #triggerValue>\n\t\t\t\t\t@if (selectionType() === 'multiple' && multipleDisplayInfo) {\n\t\t\t\t\t\t<span class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t<span class=\"truncate\">{{ multipleDisplayInfo.firstItem }}</span>\n\t\t\t\t\t\t\t@if (multipleDisplayInfo.additionalCount > 0) {\n\t\t\t\t\t\t\t\t<st-badge variant=\"primary\" [soft]=\"true\" [size]=\"badgeClass()\">+{{ multipleDisplayInfo.additionalCount }}</st-badge>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t} @else {\n\t\t\t\t\t\t{{ displayValue }}\n\t\t\t\t\t}\n\t\t\t\t</ng-template>\n\t\t\t\t@if (fitOptions) {\n\t\t\t\t\t<span class=\"grid min-w-0\">\n\t\t\t\t\t\t<span class=\"col-start-1 row-start-1 block min-w-0 truncate text-left\">\n\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"triggerValue\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span aria-hidden=\"true\" data-st-value-sizer class=\"invisible col-start-1 row-start-1 h-0 overflow-hidden\">\n\t\t\t\t\t\t\t@for (text of valueSizerLabels(); track $index) {\n\t\t\t\t\t\t\t\t<span class=\"block whitespace-nowrap\">{{ text }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t} @else {\n\t\t\t\t\t<span class=\"block min-w-0 truncate text-left\">\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"triggerValue\" />\n\t\t\t\t\t</span>\n\t\t\t\t}\n\t\t\t</button>\n\t\t\t@if (showClearButton()) {\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tdata-st-clear\n\t\t\t\t\tclass=\"btn btn-ghost btn-square shrink-0 cursor-pointer [--fontsize:1em] [--size:1.25em]\"\n\t\t\t\t\t(click)=\"handleClearSelection($event)\"\n\t\t\t\t\t(keydown.enter)=\"handleClearSelection($event)\"\n\t\t\t\t\t(keydown.space)=\"handleClearSelection($event)\"\n\t\t\t\t\t[attr.aria-label]=\"clearSelectionLabel()\"\n\t\t\t\t>\n\t\t\t\t\t<st-icon [icon]=\"iconClose\"></st-icon>\n\t\t\t\t</button>\n\t\t\t} @else if (fitOptions && allowClear()) {\n\t\t\t\t<!-- Keeps the clear button's room so the fitted control does not change width when a value is chosen -->\n\t\t\t\t<span aria-hidden=\"true\" data-st-clear-spacer class=\"w-[1.25em] shrink-0\"></span>\n\t\t\t}\n\t\t\t<span data-st-chevron class=\"pointer-events-none inline-flex size-[1em] shrink-0 items-center justify-center\" aria-hidden=\"true\">\n\t\t\t\t<st-icon [icon]=\"iconChevronDown\"></st-icon>\n\t\t\t</span>\n\t\t</div>\n\t</div>\n\n\t<ng-template\n\t\tcdkConnectedOverlay\n\t\t[cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n\t\t[cdkConnectedOverlayOpen]=\"isOpen\"\n\t\t[cdkConnectedOverlayPositions]=\"activeOverlayPositions()\"\n\t\t[cdkConnectedOverlayDisableClose]=\"true\"\n\t\t[cdkConnectedOverlayWidth]=\"overlayWidth()\"\n\t\t[cdkConnectedOverlayMinWidth]=\"triggerWidth\"\n\t\t(detach)=\"handleDetach()\"\n\t\t(overlayOutsideClick)=\"handleClickOutside($event)\"\n\t\t(positionChange)=\"onPositionChange($event)\"\n\t>\n\t\t<div class=\"contents\" [attr.data-theme]=\"themeDomService.themeOf(field)\">\n\t\t\t<div\n\t\t\t\t[class]=\"panelClass()\"\n\t\t\t\t(animationend)=\"onAnimationEnd($event)\"\n\t\t\t\t[attr.data-state]=\"dataState\"\n\t\t\t\t[attr.data-side]=\"placement()?.side\"\n\t\t\t\t[attr.data-align]=\"placement()?.align\"\n\t\t\t>\n\t\t\t\t<div class=\"bg-base-200 rounded-box border-neutral overflow-hidden border border-solid\">\n\t\t\t\t\t@if (contentPanel) {\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionSizer; context: { $implicit: '' }\" />\n\t\t\t\t\t}\n\t\t\t\t\t<!-- Search Input: in a content-width panel it takes the panel's width and never sets it -->\n\t\t\t\t\t<div class=\"border-neutral border-b\" [class.w-0]=\"contentPanel\" [class.min-w-full]=\"contentPanel\">\n\t\t\t\t\t\t@let searchInputClass = this.searchInputClass();\n\t\t\t\t\t\t<div [class]=\"searchInputClass\">\n\t\t\t\t\t\t\t<st-icon class=\"text-base-content-muted\" [icon]=\"iconSearch\"></st-icon>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t#searchInput\n\t\t\t\t\t\t\t\tclass=\"placeholder:text-base-content-muted w-full border-transparent py-0 focus-within:outline-hidden focus:border-transparent focus:outline-hidden\"\n\t\t\t\t\t\t\t\t[value]=\"currentSearchValue\"\n\t\t\t\t\t\t\t\t(input)=\"handleSearchInput($event)\"\n\t\t\t\t\t\t\t\t(keydown)=\"handleSearchKeydown($event)\"\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t[placeholder]=\"translatedSearchPlaceholder()\"\n\t\t\t\t\t\t\t\t[attr.aria-label]=\"searchOptionsLabel()\"\n\t\t\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t\t\t\t\t\t[attr.aria-controls]=\"listboxId\"\n\t\t\t\t\t\t\t\t[attr.aria-activedescendant]=\"activeOptionId()\"\n\t\t\t\t\t\t\t\t[disabled]=\"!isOpen\"\n\t\t\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Options List -->\n\t\t\t\t\t@let menuClass = this.menuClass();\n\t\t\t\t\t<ul\n\t\t\t\t\t\t[class]=\"menuClass\"\n\t\t\t\t\t\tcdkListbox\n\t\t\t\t\t\tcdkListboxUseActiveDescendant\n\t\t\t\t\t\t[cdkListboxMultiple]=\"selectionType() === 'multiple'\"\n\t\t\t\t\t\t[id]=\"listboxId\"\n\t\t\t\t\t\t[attr.aria-labelledby]=\"label ? labelId : resolvedId()\"\n\t\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\t\t#optionsList\n\t\t\t\t\t\t[tabindex]=\"-1\"\n\t\t\t\t\t\t(keydown)=\"handleListboxKeydown($event)\"\n\t\t\t\t\t\t(selectionChange)=\"handleSelectionChange($event)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ng-template #optionTemplate let-option let-index=\"index\">\n\t\t\t\t\t\t\t@let optionDisabled = isOptionDisabled(option);\n\t\t\t\t\t\t\t@let optionDescription = getOptionDescription(option);\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t[cdkOption]=\"option\"\n\t\t\t\t\t\t\t\t[id]=\"optionId(index)\"\n\t\t\t\t\t\t\t\t[cdkOptionDisabled]=\"optionDisabled\"\n\t\t\t\t\t\t\t\tclass=\"group\"\n\t\t\t\t\t\t\t\t[attr.data-option-index]=\"index\"\n\t\t\t\t\t\t\t\t[attr.data-disabled]=\"optionDisabled ? '' : null\"\n\t\t\t\t\t\t\t\t[class.cdk-option-active]=\"isActiveOption(index)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t@if (contentPanel) {\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t[class]=\"optionRowClass + ' whitespace-nowrap'\"\n\t\t\t\t\t\t\t\t\t\t(click)=\"handleOptionSelect(option)\"\n\t\t\t\t\t\t\t\t\t\t(mouseenter)=\"syncOptionTitle($event, option)\"\n\t\t\t\t\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionLine; context: { $implicit: option }\" />\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t<button type=\"button\" [class]=\"optionRowClass\" (click)=\"handleOptionSelect(option)\" tabindex=\"-1\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"min-w-min flex-1 wrap-break-word whitespace-normal\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"block\">{{ getDisplayValue(option) }}</span>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t@if (optionDescription) {\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"sr-only\">, </span>\n\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\tdata-st-option-description\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"text-base-content-muted ms-3 min-w-0 truncate text-end text-sm not-last:me-2 group-data-disabled:text-(--color-disabled-content)\"\n\t\t\t\t\t\t\t\t\t\t\t\t>{{ optionDescription }}</span\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t@if (isOptionSelected(option)) {\n\t\t\t\t\t\t\t\t\t\t\t<st-icon class=\"h-4 w-4 shrink-0\" [icon]=\"iconCheck\"></st-icon>\n\t\t\t\t\t\t\t\t\t\t} @else if (isOptionChecked(option)) {\n\t\t\t\t\t\t\t\t\t\t\t<st-icon\n\t\t\t\t\t\t\t\t\t\t\t\tdata-st-option-checked\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"h-4 w-4 shrink-0 group-data-disabled:text-(--color-disabled-content)\"\n\t\t\t\t\t\t\t\t\t\t\t\t[icon]=\"iconCheck\"\n\t\t\t\t\t\t\t\t\t\t\t></st-icon>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ng-template>\n\n\t\t\t\t\t\t@for (section of optionSections(); track section.label; let firstSection = $first) {\n\t\t\t\t\t\t\t@if (section.headerId) {\n\t\t\t\t\t\t\t\t@if (!firstSection) {\n\t\t\t\t\t\t\t\t\t<li role=\"none\" data-st-option-group-separator class=\"pointer-events-none top-0 left-0 mx-0 my-1 w-full p-0\"></li>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t<li role=\"none\" data-st-option-group>\n\t\t\t\t\t\t\t\t\t<ul role=\"group\" class=\"ms-0 ps-0 whitespace-normal before:hidden\" [attr.aria-labelledby]=\"section.headerId\">\n\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\t\t\t\t\t\tdata-st-option-group-header\n\t\t\t\t\t\t\t\t\t\t\tclass=\"menu-title text-base-content-secondary px-4 font-semibold\"\n\t\t\t\t\t\t\t\t\t\t\t[id]=\"section.headerId\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{{ section.label }}\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t@for (entry of section.options; track entry.index) {\n\t\t\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: entry.option, index: entry.index }\" />\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t@for (entry of section.options; track entry.index) {\n\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: entry.option, index: entry.index }\" />\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t<!-- Empty state -->\n\t\t\t\t\t\t@if (filteredOptions.length === 0) {\n\t\t\t\t\t\t\t<li class=\"text-base-content-muted px-4 py-2 text-center\" [class.w-0]=\"contentPanel\" [class.min-w-full]=\"contentPanel\">\n\t\t\t\t\t\t\t\t<span>{{ translatedNoResultsText() }}</span>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\t\t\t\t\t</ul>\n\n\t\t\t\t\t<!-- Clear All button for multiple selection -->\n\t\t\t\t\t@if (selectionType() === 'multiple' && allowClearAll() && value() && isArray(value()) && value().length > 0) {\n\t\t\t\t\t\t<div class=\"border-base-300 border-t p-2\" [class.w-0]=\"contentPanel\" [class.min-w-full]=\"contentPanel\">\n\t\t\t\t\t\t\t<st-button\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t[ghost]=\"true\"\n\t\t\t\t\t\t\t\t[block]=\"true\"\n\t\t\t\t\t\t\t\t(clicked)=\"clearSelection()\"\n\t\t\t\t\t\t\t\t(keydown)=\"handleClearButtonKeydown($event)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{{ clearAllLabel() }}\n\t\t\t\t\t\t\t</st-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</ng-template>\n\n\t@if (label) {\n\t\t<label class=\"sr-only\" [id]=\"labelId\" [for]=\"resolvedId()\">{{ label }}</label>\n\t}\n\n\t<!-- Additional content -->\n\t<ng-content></ng-content>\n</fieldset>\n" }]
|
|
1368
1551
|
}], ctorParameters: () => [] });
|
|
1369
1552
|
|
|
1370
1553
|
/**
|