@agorapulse/ui-components 22.7.0 → 22.7.2-beta.1
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/agorapulse-ui-components-22.7.2-beta.1.tgz +0 -0
- package/fesm2022/agorapulse-ui-components-i18n.mjs +7 -0
- package/fesm2022/agorapulse-ui-components-i18n.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs +77 -71
- package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs.map +1 -1
- package/package.json +1 -1
- package/types/agorapulse-ui-components-i18n.d.ts +7 -0
- package/types/agorapulse-ui-components-selection-dropdown.d.ts +56 -40
- package/agorapulse-ui-components-22.7.0.tgz +0 -0
|
@@ -3,6 +3,7 @@ import { inject, ElementRef, input, HostListener, Directive, viewChild, viewChil
|
|
|
3
3
|
import { CheckboxComponent } from '@agorapulse/ui-components/checkbox';
|
|
4
4
|
import { DropdownOptionDirective } from '@agorapulse/ui-components/dropdown-base';
|
|
5
5
|
import { DropdownPanelComponent, DropdownContentDirective } from '@agorapulse/ui-components/dropdown-panel';
|
|
6
|
+
import { injectTranslate, injectResolveTexts } from '@agorapulse/ui-components/i18n';
|
|
6
7
|
import { InputSearchComponent } from '@agorapulse/ui-components/input-search';
|
|
7
8
|
import { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';
|
|
8
9
|
import { DropdownItemMultipleOneLineComponent, DropdownItemSingleOneLineComponent } from '@agorapulse/ui-components/select';
|
|
@@ -70,27 +71,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
70
71
|
|
|
71
72
|
/** The only keys a search field hands to the list: Home and End belong to the caret, not the options. */
|
|
72
73
|
const NAVIGATION_FROM_SEARCH = new Set(['ArrowUp', 'ArrowDown']);
|
|
74
|
+
const ITEM_ROLES = {
|
|
75
|
+
label: null,
|
|
76
|
+
disabledTooltip: null,
|
|
77
|
+
badge: null,
|
|
78
|
+
symbolTooltip: null,
|
|
79
|
+
group: null,
|
|
80
|
+
};
|
|
81
|
+
const ROLES = {
|
|
82
|
+
title: null,
|
|
83
|
+
ariaLabel: null,
|
|
84
|
+
headerButton: null,
|
|
85
|
+
footerButton: null,
|
|
86
|
+
searchPlaceholder: 'ui-components.search.placeholder',
|
|
87
|
+
noResults: 'ui-components.search.no-results',
|
|
88
|
+
selectedSection: 'ui-components.selection.selected-section',
|
|
89
|
+
optionsSection: 'ui-components.selection.options-section',
|
|
90
|
+
selectAll: 'ui-components.selection.select-all',
|
|
91
|
+
};
|
|
73
92
|
/**
|
|
74
93
|
* Rebuilds items into one ordered list: standalone items and groups appear in the order their first
|
|
75
94
|
* item is encountered; later items of an already-seen group join that existing group entry.
|
|
76
95
|
*/
|
|
77
|
-
function inEncounterOrder(
|
|
96
|
+
function inEncounterOrder(rows) {
|
|
78
97
|
const entries = [];
|
|
79
98
|
const groupsByLabel = new Map();
|
|
80
|
-
for (const
|
|
81
|
-
const label =
|
|
99
|
+
for (const row of rows) {
|
|
100
|
+
const label = row.texts.group;
|
|
82
101
|
if (!label) {
|
|
83
|
-
entries.push({ kind: 'item',
|
|
102
|
+
entries.push({ kind: 'item', row });
|
|
84
103
|
continue;
|
|
85
104
|
}
|
|
86
105
|
const existing = groupsByLabel.get(label);
|
|
87
106
|
if (existing) {
|
|
88
107
|
// `existing` is the same object reference already pushed into `entries`,
|
|
89
|
-
// so mutating its
|
|
90
|
-
existing.
|
|
108
|
+
// so mutating its rows array updates the rendered group in place.
|
|
109
|
+
existing.rows.push(row);
|
|
91
110
|
}
|
|
92
111
|
else {
|
|
93
|
-
const group = { kind: 'group', label,
|
|
112
|
+
const group = { kind: 'group', label, rows: [row] };
|
|
94
113
|
groupsByLabel.set(label, group);
|
|
95
114
|
entries.push(group);
|
|
96
115
|
}
|
|
@@ -109,16 +128,14 @@ class SelectionDropdownComponent {
|
|
|
109
128
|
activeIndex = signal(-1, /* @ts-ignore */
|
|
110
129
|
...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
111
130
|
injector = inject(Injector);
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
...(ngDevMode ? [{ debugName: "optionsSectionText" }] : /* istanbul ignore next */ []));
|
|
121
|
-
panelLabel = computed(() => this.ariaLabel() ?? this.title() ?? 'Selection', /* @ts-ignore */
|
|
131
|
+
t = injectTranslate();
|
|
132
|
+
resolveTexts = injectResolveTexts();
|
|
133
|
+
/** Texts of the dropdown, keys or `raw()` texts; see {@link SelectionDropdownI18n}. */
|
|
134
|
+
i18n = input({}, /* @ts-ignore */
|
|
135
|
+
...(ngDevMode ? [{ debugName: "i18n" }] : /* istanbul ignore next */ []));
|
|
136
|
+
texts = computed(() => this.resolveTexts(this.i18n(), ROLES), /* @ts-ignore */
|
|
137
|
+
...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
|
|
138
|
+
panelLabel = computed(() => this.texts().ariaLabel ?? this.texts().title ?? this.t('ui-components.selection.label'), /* @ts-ignore */
|
|
122
139
|
...(ngDevMode ? [{ debugName: "panelLabel" }] : /* istanbul ignore next */ []));
|
|
123
140
|
listboxId = `ap-selection-dropdown-list-${SelectionDropdownComponent.nextId++}`;
|
|
124
141
|
keyManager = null;
|
|
@@ -140,39 +157,15 @@ class SelectionDropdownComponent {
|
|
|
140
157
|
/** Shows the search field. Ignored in `multiple` mode, which always searches. */
|
|
141
158
|
searchEnabled = input(false, /* @ts-ignore */
|
|
142
159
|
...(ngDevMode ? [{ debugName: "searchEnabled" }] : /* istanbul ignore next */ []));
|
|
143
|
-
/** Title to display in the header */
|
|
144
|
-
title = input(/* @ts-ignore */
|
|
145
|
-
...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
|
|
146
|
-
/** Text for the footer button */
|
|
147
|
-
footerButtonText = input(/* @ts-ignore */
|
|
148
|
-
...(ngDevMode ? [undefined, { debugName: "footerButtonText" }] : /* istanbul ignore next */ []));
|
|
149
160
|
/** Symbol ID for the footer button */
|
|
150
161
|
footerButtonSymbolId = input(/* @ts-ignore */
|
|
151
162
|
...(ngDevMode ? [undefined, { debugName: "footerButtonSymbolId" }] : /* istanbul ignore next */ []));
|
|
152
|
-
/** Text for the header button */
|
|
153
|
-
headerButtonText = input(/* @ts-ignore */
|
|
154
|
-
...(ngDevMode ? [undefined, { debugName: "headerButtonText" }] : /* istanbul ignore next */ []));
|
|
155
163
|
/** Symbol ID for the header button */
|
|
156
164
|
headerButtonSymbolId = input(/* @ts-ignore */
|
|
157
165
|
...(ngDevMode ? [undefined, { debugName: "headerButtonSymbolId" }] : /* istanbul ignore next */ []));
|
|
158
166
|
/** Adds a "Select all" row above the options, acting on every visible option across groups. Multiple mode only. */
|
|
159
167
|
selectAllEnabled = input(false, /* @ts-ignore */
|
|
160
168
|
...(ngDevMode ? [{ debugName: "selectAllEnabled" }] : /* istanbul ignore next */ []));
|
|
161
|
-
/** Label of the "Select all" row */
|
|
162
|
-
selectAllText = input('Select all', /* @ts-ignore */
|
|
163
|
-
...(ngDevMode ? [{ debugName: "selectAllText" }] : /* istanbul ignore next */ []));
|
|
164
|
-
/** Count after the "Select all" label. `{selected}` and `{total}` are replaced; empty hides it. */
|
|
165
|
-
selectAllCountText = input('({selected} of {total})', /* @ts-ignore */
|
|
166
|
-
...(ngDevMode ? [{ debugName: "selectAllCountText" }] : /* istanbul ignore next */ []));
|
|
167
|
-
/** Placeholder text for the search input */
|
|
168
|
-
searchPlaceholderText = input('Search', /* @ts-ignore */
|
|
169
|
-
...(ngDevMode ? [{ debugName: "searchPlaceholderText" }] : /* istanbul ignore next */ []));
|
|
170
|
-
/** Text to display when no search results are found */
|
|
171
|
-
noSearchResultsText = input('No results found', /* @ts-ignore */
|
|
172
|
-
...(ngDevMode ? [{ debugName: "noSearchResultsText" }] : /* istanbul ignore next */ []));
|
|
173
|
-
/** Announced once a search settles. `{count}` is replaced by how many options matched. */
|
|
174
|
-
searchResultsText = input('{count} results', /* @ts-ignore */
|
|
175
|
-
...(ngDevMode ? [{ debugName: "searchResultsText" }] : /* istanbul ignore next */ []));
|
|
176
169
|
/** Whether to show a backdrop that closes the dropdown when clicked */
|
|
177
170
|
showBackdrop = input(true, /* @ts-ignore */
|
|
178
171
|
...(ngDevMode ? [{ debugName: "showBackdrop" }] : /* istanbul ignore next */ []));
|
|
@@ -237,7 +230,7 @@ class SelectionDropdownComponent {
|
|
|
237
230
|
/** Always true in `multiple` mode, leaving that layout untouched; only `single` collapses the header. */
|
|
238
231
|
searchVisible = computed(() => !this.isSingleSelect() || this.searchEnabled(), /* @ts-ignore */
|
|
239
232
|
...(ngDevMode ? [{ debugName: "searchVisible" }] : /* istanbul ignore next */ []));
|
|
240
|
-
headerTopVisible = computed(() => !this.isSingleSelect() || !!this.
|
|
233
|
+
headerTopVisible = computed(() => !this.isSingleSelect() || !!this.texts().title || !!this.texts().headerButton, /* @ts-ignore */
|
|
241
234
|
...(ngDevMode ? [{ debugName: "headerTopVisible" }] : /* istanbul ignore next */ []));
|
|
242
235
|
headerVisible = computed(() => this.headerTopVisible() || this.searchVisible(), /* @ts-ignore */
|
|
243
236
|
...(ngDevMode ? [{ debugName: "headerVisible" }] : /* istanbul ignore next */ []));
|
|
@@ -245,27 +238,37 @@ class SelectionDropdownComponent {
|
|
|
245
238
|
...(ngDevMode ? [{ debugName: "internalItems" }] : /* istanbul ignore next */ []));
|
|
246
239
|
filteredItems = signal([], /* @ts-ignore */
|
|
247
240
|
...(ngDevMode ? [{ debugName: "filteredItems" }] : /* istanbul ignore next */ []));
|
|
241
|
+
filteredRows = computed(() => this.filteredItems().map(item => ({ item, texts: this.itemTexts(item) })), /* @ts-ignore */
|
|
242
|
+
...(ngDevMode ? [{ debugName: "filteredRows" }] : /* istanbul ignore next */ []));
|
|
243
|
+
searchResultCount = signal(null, /* @ts-ignore */
|
|
244
|
+
...(ngDevMode ? [{ debugName: "searchResultCount" }] : /* istanbul ignore next */ []));
|
|
248
245
|
/** What the live region holds. Empty outside a search: the list is on screen, unchanged. */
|
|
249
|
-
resultsAnnouncement =
|
|
246
|
+
resultsAnnouncement = computed(() => {
|
|
247
|
+
const count = this.searchResultCount();
|
|
248
|
+
if (count === null) {
|
|
249
|
+
return '';
|
|
250
|
+
}
|
|
251
|
+
return count === 0 ? this.texts().noResults : this.t(this.i18n().results ?? 'ui-components.search.results', { count });
|
|
252
|
+
}, /* @ts-ignore */
|
|
250
253
|
...(ngDevMode ? [{ debugName: "resultsAnnouncement" }] : /* istanbul ignore next */ []));
|
|
251
254
|
initiallySelectedItems = signal([], /* @ts-ignore */
|
|
252
255
|
...(ngDevMode ? [{ debugName: "initiallySelectedItems" }] : /* istanbul ignore next */ []));
|
|
253
256
|
// Computed properties for template usage
|
|
254
|
-
|
|
257
|
+
selectedRows = computed(() => {
|
|
255
258
|
const initiallySelectedIds = this.initiallySelectedItems().map(item => item.htmlId);
|
|
256
|
-
return this.
|
|
259
|
+
return this.filteredRows().filter(row => initiallySelectedIds.includes(row.item.htmlId));
|
|
257
260
|
}, /* @ts-ignore */
|
|
258
|
-
...(ngDevMode ? [{ debugName: "
|
|
259
|
-
|
|
261
|
+
...(ngDevMode ? [{ debugName: "selectedRows" }] : /* istanbul ignore next */ []));
|
|
262
|
+
unselectedRows = computed(() => {
|
|
260
263
|
const initiallySelectedIds = this.initiallySelectedItems().map(item => item.htmlId);
|
|
261
|
-
return this.
|
|
264
|
+
return this.filteredRows().filter(row => !initiallySelectedIds.includes(row.item.htmlId));
|
|
262
265
|
}, /* @ts-ignore */
|
|
263
|
-
...(ngDevMode ? [{ debugName: "
|
|
266
|
+
...(ngDevMode ? [{ debugName: "unselectedRows" }] : /* istanbul ignore next */ []));
|
|
264
267
|
/** Multiple mode's unselected zone, grouped. */
|
|
265
|
-
displayEntries = computed(() => inEncounterOrder(this.
|
|
268
|
+
displayEntries = computed(() => inEncounterOrder(this.unselectedRows()), /* @ts-ignore */
|
|
266
269
|
...(ngDevMode ? [{ debugName: "displayEntries" }] : /* istanbul ignore next */ []));
|
|
267
270
|
/** Single mode has no selected zone: the picked option stays in its group. */
|
|
268
|
-
singleEntries = computed(() => inEncounterOrder(this.
|
|
271
|
+
singleEntries = computed(() => inEncounterOrder(this.filteredRows()), /* @ts-ignore */
|
|
269
272
|
...(ngDevMode ? [{ debugName: "singleEntries" }] : /* istanbul ignore next */ []));
|
|
270
273
|
/**
|
|
271
274
|
* A listbox owns only options, so a group's checkbox cannot sit inside one: each group gets its own
|
|
@@ -280,10 +283,10 @@ class SelectionDropdownComponent {
|
|
|
280
283
|
}
|
|
281
284
|
const last = runs[runs.length - 1];
|
|
282
285
|
if (last?.kind === 'items') {
|
|
283
|
-
last.
|
|
286
|
+
last.rows.push(entry.row);
|
|
284
287
|
}
|
|
285
288
|
else {
|
|
286
|
-
runs.push({ kind: 'items',
|
|
289
|
+
runs.push({ kind: 'items', rows: [entry.row] });
|
|
287
290
|
}
|
|
288
291
|
}
|
|
289
292
|
return runs;
|
|
@@ -297,7 +300,9 @@ class SelectionDropdownComponent {
|
|
|
297
300
|
continue;
|
|
298
301
|
}
|
|
299
302
|
const groupLabel = entry.label;
|
|
300
|
-
const groupItems = this.
|
|
303
|
+
const groupItems = this.filteredRows()
|
|
304
|
+
.filter(row => row.texts.group === groupLabel)
|
|
305
|
+
.map(row => row.item);
|
|
301
306
|
// Selection is counted across all members: a disabled item can still be selected, and
|
|
302
307
|
// excluding it would wrongly drop the group to "unselected" despite a live selection.
|
|
303
308
|
const hasSelection = groupItems.some(item => item.selected);
|
|
@@ -324,10 +329,11 @@ class SelectionDropdownComponent {
|
|
|
324
329
|
...(ngDevMode ? [{ debugName: "selectAllVisible" }] : /* istanbul ignore next */ []));
|
|
325
330
|
selectAllLabel = computed(() => {
|
|
326
331
|
const targets = this.selectAllTargets();
|
|
327
|
-
const count = this.
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
332
|
+
const count = this.t(this.i18n().selectAllCount ?? 'ui-components.selection.select-all-count', {
|
|
333
|
+
selected: targets.filter(item => item.selected).length,
|
|
334
|
+
total: targets.length,
|
|
335
|
+
});
|
|
336
|
+
return count ? `${this.texts().selectAll} ${count}` : this.texts().selectAll;
|
|
331
337
|
}, /* @ts-ignore */
|
|
332
338
|
...(ngDevMode ? [{ debugName: "selectAllLabel" }] : /* istanbul ignore next */ []));
|
|
333
339
|
selectAllState = computed(() => {
|
|
@@ -449,7 +455,7 @@ class SelectionDropdownComponent {
|
|
|
449
455
|
}
|
|
450
456
|
/** `@for` gives a per-loop index, and the options span several listboxes, so identity decides. */
|
|
451
457
|
runKey(run) {
|
|
452
|
-
return run.kind === 'items' ? `items:${run.
|
|
458
|
+
return run.kind === 'items' ? `items:${run.rows[0]?.item.htmlId ?? ''}` : `group:${run.label}`;
|
|
453
459
|
}
|
|
454
460
|
/** With a search field the list is no tab stop at all: the field owns it and reaches it by arrow. */
|
|
455
461
|
optionTabIndex(carriesIt) {
|
|
@@ -524,7 +530,7 @@ class SelectionDropdownComponent {
|
|
|
524
530
|
/** Handles group toggle events, selecting/deselecting all items within the group */
|
|
525
531
|
onGroupToggle(groupLabel, checked) {
|
|
526
532
|
const updatedItems = this.internalItems().map(item => {
|
|
527
|
-
if (item.
|
|
533
|
+
if (this.itemTexts(item).group === groupLabel && !item.disabled && !item.isFeatureLocked) {
|
|
528
534
|
return { ...item, selected: checked, indeterminate: false };
|
|
529
535
|
}
|
|
530
536
|
return item;
|
|
@@ -543,21 +549,21 @@ class SelectionDropdownComponent {
|
|
|
543
549
|
this.filteredItems.update(items => items.map(resolve));
|
|
544
550
|
this.selectionChange.emit(updatedItems);
|
|
545
551
|
}
|
|
552
|
+
/** Read in a reactive context, the texts follow language changes. */
|
|
553
|
+
itemTexts(item) {
|
|
554
|
+
const texts = this.resolveTexts(item.i18n, ITEM_ROLES);
|
|
555
|
+
return { ...texts, label: texts.label ?? '' };
|
|
556
|
+
}
|
|
546
557
|
/** Stable track key for a render entry (item or group). */
|
|
547
558
|
entryKey(entry) {
|
|
548
|
-
return entry.kind === 'item' ? `item:${entry.item.htmlId}` : `group:${entry.label}`;
|
|
559
|
+
return entry.kind === 'item' ? `item:${entry.row.item.htmlId}` : `group:${entry.label}`;
|
|
549
560
|
}
|
|
550
561
|
/**
|
|
551
562
|
* A filtered list changes under a screen reader with nothing said, and the field keeps the focus,
|
|
552
563
|
* so there is no new focus to read either. Announced after the debounce, once the count is final.
|
|
553
564
|
*/
|
|
554
565
|
announceResults(term) {
|
|
555
|
-
|
|
556
|
-
this.resultsAnnouncement.set('');
|
|
557
|
-
return;
|
|
558
|
-
}
|
|
559
|
-
const count = this.filteredItems().length;
|
|
560
|
-
this.resultsAnnouncement.set(count === 0 ? this.noSearchResultsText() : this.searchResultsText().replace('{count}', String(count)));
|
|
566
|
+
this.searchResultCount.set(term ? this.filteredItems().length : null);
|
|
561
567
|
}
|
|
562
568
|
/** Updates the filtered items based on search term */
|
|
563
569
|
updateFilteredItems(searchTerm, items) {
|
|
@@ -565,11 +571,11 @@ class SelectionDropdownComponent {
|
|
|
565
571
|
this.filteredItems.set(items);
|
|
566
572
|
return;
|
|
567
573
|
}
|
|
568
|
-
const filtered = items.filter(item => item.
|
|
574
|
+
const filtered = items.filter(item => this.itemTexts(item).label.toLowerCase().includes(searchTerm));
|
|
569
575
|
this.filteredItems.set(filtered);
|
|
570
576
|
}
|
|
571
577
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SelectionDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
572
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SelectionDropdownComponent, isStandalone: true, selector: "ap-selection-dropdown", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, selectedSectionText: { classPropertyName: "selectedSectionText", publicName: "selectedSectionText", isSignal: true, isRequired: false, transformFunction: null }, optionsSectionText: { classPropertyName: "optionsSectionText", publicName: "optionsSectionText", isSignal: true, isRequired: false, transformFunction: null }, headerButtonId: { classPropertyName: "headerButtonId", publicName: "headerButtonId", isSignal: true, isRequired: false, transformFunction: null }, footerButtonId: { classPropertyName: "footerButtonId", publicName: "footerButtonId", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, searchEnabled: { classPropertyName: "searchEnabled", publicName: "searchEnabled", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, footerButtonText: { classPropertyName: "footerButtonText", publicName: "footerButtonText", isSignal: true, isRequired: false, transformFunction: null }, footerButtonSymbolId: { classPropertyName: "footerButtonSymbolId", publicName: "footerButtonSymbolId", isSignal: true, isRequired: false, transformFunction: null }, headerButtonText: { classPropertyName: "headerButtonText", publicName: "headerButtonText", isSignal: true, isRequired: false, transformFunction: null }, headerButtonSymbolId: { classPropertyName: "headerButtonSymbolId", publicName: "headerButtonSymbolId", isSignal: true, isRequired: false, transformFunction: null }, selectAllEnabled: { classPropertyName: "selectAllEnabled", publicName: "selectAllEnabled", isSignal: true, isRequired: false, transformFunction: null }, selectAllText: { classPropertyName: "selectAllText", publicName: "selectAllText", isSignal: true, isRequired: false, transformFunction: null }, selectAllCountText: { classPropertyName: "selectAllCountText", publicName: "selectAllCountText", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholderText: { classPropertyName: "searchPlaceholderText", publicName: "searchPlaceholderText", isSignal: true, isRequired: false, transformFunction: null }, noSearchResultsText: { classPropertyName: "noSearchResultsText", publicName: "noSearchResultsText", isSignal: true, isRequired: false, transformFunction: null }, searchResultsText: { classPropertyName: "searchResultsText", publicName: "searchResultsText", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null }, searchTerm: { classPropertyName: "searchTerm", publicName: "searchTerm", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed", selectionChange: "selectionChange", footerButtonClick: "footerButtonClick", headerButtonClick: "headerButtonClick", searchInputChange: "searchInputChange", searchTerm: "searchTermChange" }, queries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "panel", first: true, predicate: DropdownPanelComponent, descendants: true, isSignal: true }, { propertyName: "options", predicate: DropdownOptionDirective, descendants: true, isSignal: true }, { propertyName: "inputSearchComponent", first: true, predicate: ["inputSearchElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<ap-dropdown-panel\n [placement]=\"placement()\"\n [showBackdrop]=\"showBackdrop()\"\n (closed)=\"onPanelClosed()\">\n <!-- `dialog`, not a combobox: a combobox must close when focus leaves it, and this panel holds a\n search field, a header, a footer and group checkboxes beside its lists \u2014 closing on Tab left\n every one of them unreachable. -->\n <div\n *apDropdownContent\n class=\"ap-selection-dropdown__content\"\n role=\"dialog\"\n tabindex=\"-1\"\n [attr.aria-label]=\"panelLabel()\"\n (keydown)=\"onOptionsKeyDown($event)\"\n [class.ap-selection-dropdown__content--single]=\"isSingleSelect()\"\n [style.width]=\"panelWidth()\">\n <!-- Header -->\n @if (headerVisible()) {\n <div\n class=\"ap-selection-dropdown__header\"\n [class.ap-selection-dropdown__header--select-all]=\"selectAllVisible()\">\n @if (headerTopVisible()) {\n <div class=\"ap-selection-dropdown__header-top\">\n @if (title()) {\n <h3 class=\"ap-selection-dropdown__title\">\n {{ title() }}\n </h3>\n }\n @if (headerButtonText()) {\n <button\n type=\"button\"\n class=\"ap-link standalone\"\n [id]=\"headerButtonId()\"\n (click)=\"onHeaderButtonClick()\">\n <ap-symbol [symbolId]=\"headerButtonSymbolId()\" />\n {{ headerButtonText() }}\n </button>\n }\n </div>\n }\n @if (searchVisible()) {\n <ap-input-search\n #inputSearchElement\n [placeholder]=\"searchPlaceholderText()\"\n [clearable]=\"true\"\n [ariaControls]=\"listboxId\"\n [ariaActiveDescendant]=\"activeDescendantId()\"\n [ngModel]=\"searchTerm()\"\n (blur)=\"onSearchBlur()\"\n (ngModelChange)=\"onSearchTermChange($event)\" />\n }\n @if (selectAllVisible()) {\n <div class=\"ap-selection-dropdown__select-all\">\n <ap-checkbox\n class=\"centered\"\n name=\"ap-selection-dropdown-select-all\"\n [checked]=\"selectAllState() === 'selected'\"\n [indeterminate]=\"selectAllState() === 'partial'\"\n (change)=\"onSelectAllToggle($event)\">\n {{ selectAllLabel() }}\n </ap-checkbox>\n </div>\n }\n </div>\n }\n\n <!-- Selection dropdown items -->\n <div\n class=\"ap-selection-dropdown__items\"\n [id]=\"listboxId\"\n [attr.role]=\"isSingleSelect() ? 'listbox' : null\"\n [attr.aria-label]=\"isSingleSelect() ? (title() ?? null) : null\">\n @if (filteredItems().length === 0 && searchTerm()) {\n <div class=\"ap-selection-dropdown__no-results\">\n {{ noSearchResultsText() }}\n </div>\n } @else if (isSingleSelect()) {\n <!-- One listbox: a group holds only options and its presentational header (WAI-ARIA APG grouped listbox). -->\n @for (entry of singleEntries(); track entry.kind === 'group' ? 'group:' + entry.label : entry.item.htmlId) {\n @if (entry.kind === 'group') {\n <div\n role=\"group\"\n class=\"ap-selection-dropdown__group\"\n [attr.aria-labelledby]=\"groupHeaderId($index)\">\n <div\n role=\"presentation\"\n class=\"ap-selection-dropdown__group-title\"\n [id]=\"groupHeaderId($index)\">\n {{ entry.label }}\n </div>\n @for (item of entry.items; track item.htmlId) {\n <ng-container *ngTemplateOutlet=\"singleOption; context: { $implicit: item }\" />\n }\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"singleOption; context: { $implicit: entry.item }\" />\n }\n }\n\n <ng-template\n #singleOption\n let-item>\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__option\"\n [id]=\"optionId(item)\"\n [apDropdownOption]=\"item.text\"\n [apDropdownOptionDisabled]=\"!!(item.disabled || item.isFeatureLocked)\"\n [tabindex]=\"optionTabIndex(tabbableOption(item))\"\n [attr.aria-selected]=\"item.selected\"\n [attr.aria-disabled]=\"item.disabled || item.isFeatureLocked\"\n [attr.data-track]=\"item.dataTrack\"\n [apTooltip]=\"item.disabled ? (item.disabledTooltip ?? null) : null\"\n apTooltipPosition=\"right\"\n (click)=\"onItemToggle(item)\">\n <ap-dropdown-item-single-one-line\n [text]=\"item.text\"\n [selected]=\"item.selected\"\n [disabled]=\"item.disabled || false\"\n [avatarUrl]=\"item.avatarUrl\"\n [symbolId]=\"item.symbolId\"\n [badgeText]=\"item.badgeText\"\n [isFeatureLocked]=\"item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!item.roundedAvatar\"\n [network]=\"item.network\"\n [standaloneModeEnabled]=\"true\" />\n </button>\n </ng-template>\n } @else {\n <!-- A listbox owns only options, so each section is its own, and a group's checkbox sits beside it. -->\n @if (selectedItems().length > 0) {\n <div\n role=\"listbox\"\n aria-multiselectable=\"true\"\n class=\"ap-selection-dropdown__selected-section\"\n [attr.aria-label]=\"selectedSectionText()\">\n @for (item of selectedItems(); track item.htmlId) {\n @let grouped = false;\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__item-button\"\n [id]=\"optionId(item)\"\n [tabindex]=\"optionTabIndex(tabbableOption(item))\"\n [apDropdownOption]=\"item.text\"\n [apDropdownOptionDisabled]=\"!!(item.disabled || item.isFeatureLocked)\"\n [attr.aria-selected]=\"item.selected\"\n [class.ap-selection-dropdown__item-button--disabled]=\"item.disabled || item.isFeatureLocked\"\n [apTooltip]=\"item.disabledTooltip\"\n (click)=\"onItemToggle(item)\">\n <ap-dropdown-item-multiple-one-line\n presentational\n class=\"ap-selection-dropdown__item\"\n [class.ap-selection-dropdown__item--grouped]=\"grouped\"\n [text]=\"item.text\"\n [selected]=\"item.selected\"\n [indeterminate]=\"item.indeterminate ?? false\"\n [htmlId]=\"item.htmlId\"\n [disabled]=\"item.disabled || false\"\n [avatarUrl]=\"item.avatarUrl\"\n [symbolId]=\"item.symbolId\"\n [badgeText]=\"item.badgeText\"\n [isFeatureLocked]=\"item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!item.roundedAvatar\"\n [network]=\"item.network\"\n [symbolColor]=\"item.symbolColor\"\n [symbolTooltipText]=\"item.symbolTooltipText\" />\n </button>\n }\n </div>\n }\n\n <!-- Unselected zone: items & groups in first-encounter order -->\n @for (run of displayRuns(); track runKey(run)) {\n @if (run.kind === 'items') {\n <div\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [attr.aria-label]=\"title() ?? optionsSectionText()\">\n @for (item of run.items; track item.htmlId) {\n @let grouped = false;\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__item-button\"\n [id]=\"optionId(item)\"\n [tabindex]=\"optionTabIndex(tabbableOption(item))\"\n [apDropdownOption]=\"item.text\"\n [apDropdownOptionDisabled]=\"!!(item.disabled || item.isFeatureLocked)\"\n [attr.aria-selected]=\"item.selected\"\n [class.ap-selection-dropdown__item-button--disabled]=\"item.disabled || item.isFeatureLocked\"\n [apTooltip]=\"item.disabledTooltip\"\n (click)=\"onItemToggle(item)\">\n <ap-dropdown-item-multiple-one-line\n presentational\n class=\"ap-selection-dropdown__item\"\n [class.ap-selection-dropdown__item--grouped]=\"grouped\"\n [text]=\"item.text\"\n [selected]=\"item.selected\"\n [indeterminate]=\"item.indeterminate ?? false\"\n [htmlId]=\"item.htmlId\"\n [disabled]=\"item.disabled || false\"\n [avatarUrl]=\"item.avatarUrl\"\n [symbolId]=\"item.symbolId\"\n [badgeText]=\"item.badgeText\"\n [isFeatureLocked]=\"item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!item.roundedAvatar\"\n [network]=\"item.network\"\n [symbolColor]=\"item.symbolColor\"\n [symbolTooltipText]=\"item.symbolTooltipText\" />\n </button>\n }\n </div>\n } @else {\n <div class=\"ap-selection-dropdown__group\">\n <!-- Group header with checkbox -->\n <div class=\"ap-selection-dropdown__group-header\">\n <div class=\"ap-selection-dropdown__group-label\">\n <ap-checkbox\n class=\"centered\"\n [name]=\"run.label\"\n [checked]=\"groupSelectionStates()[run.label] === 'selected'\"\n [indeterminate]=\"groupSelectionStates()[run.label] === 'partial'\"\n (change)=\"onGroupToggle(run.label, $event)\">\n {{ run.label }}\n </ap-checkbox>\n </div>\n </div>\n\n <div\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [attr.aria-label]=\"run.label\">\n @for (item of run.items; track item.htmlId) {\n @let grouped = true;\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__item-button\"\n [id]=\"optionId(item)\"\n [tabindex]=\"optionTabIndex(tabbableOption(item))\"\n [apDropdownOption]=\"item.text\"\n [apDropdownOptionDisabled]=\"!!(item.disabled || item.isFeatureLocked)\"\n [attr.aria-selected]=\"item.selected\"\n [class.ap-selection-dropdown__item-button--disabled]=\"item.disabled || item.isFeatureLocked\"\n [apTooltip]=\"item.disabledTooltip\"\n (click)=\"onItemToggle(item)\">\n <ap-dropdown-item-multiple-one-line\n presentational\n class=\"ap-selection-dropdown__item\"\n [class.ap-selection-dropdown__item--grouped]=\"grouped\"\n [text]=\"item.text\"\n [selected]=\"item.selected\"\n [indeterminate]=\"item.indeterminate ?? false\"\n [htmlId]=\"item.htmlId\"\n [disabled]=\"item.disabled || false\"\n [avatarUrl]=\"item.avatarUrl\"\n [symbolId]=\"item.symbolId\"\n [badgeText]=\"item.badgeText\"\n [isFeatureLocked]=\"item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!item.roundedAvatar\"\n [network]=\"item.network\"\n [symbolColor]=\"item.symbolColor\"\n [symbolTooltipText]=\"item.symbolTooltipText\" />\n </button>\n }\n </div>\n </div>\n }\n }\n }\n </div>\n\n <div\n class=\"ap-selection-dropdown__status\"\n role=\"status\"\n aria-atomic=\"true\">\n {{ resultsAnnouncement() }}\n </div>\n\n <!-- Footer -->\n @if (footerButtonText()) {\n <div class=\"ap-selection-dropdown__footer\">\n <button\n type=\"button\"\n class=\"ap-link standalone\"\n [id]=\"footerButtonId()\"\n (click)=\"onFooterButtonClick()\">\n <ap-symbol [symbolId]=\"footerButtonSymbolId()\" />\n {{ footerButtonText() }}\n </button>\n </div>\n }\n </div>\n</ap-dropdown-panel>\n", styles: [":host{display:none}.ap-selection-dropdown__content{border-radius:inherit;overflow:hidden;z-index:1000;width:370px;display:flex;flex-direction:column;max-height:min(400px,var(--ap-floating-available-height, 100vh))}.ap-selection-dropdown__content--single{width:auto;min-width:160px}.ap-selection-dropdown__option{display:block;width:100%;padding:0;border:none;background:none;font:inherit;text-align:inherit}.ap-selection-dropdown__item-button{display:block;width:100%;padding:0;margin:0;border:none;background:transparent;text-align:left;cursor:pointer;outline:none}.ap-selection-dropdown__item-button:hover,.ap-selection-dropdown__item-button.ap-dropdown-option--active{background-color:var(--ref-color-electric-blue-10)}.ap-selection-dropdown__item-button:active{background-color:var(--ref-color-electric-blue-20)}.ap-selection-dropdown__item-button:focus{outline:none}.ap-selection-dropdown__item-button:focus-visible{outline:none}.ap-selection-dropdown__item-button.ap-selection-dropdown__item-button--disabled{pointer-events:none}.ap-selection-dropdown__item{display:flex;align-items:center;width:100%;min-height:40px;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);background:transparent;cursor:pointer;font-family:Averta}.ap-selection-dropdown__group-header{display:flex;align-items:center;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);border-top:1px solid var(--ref-color-grey-10);background:var(--ref-color-grey-bg)}.ap-selection-dropdown__group-title{padding:var(--comp-select-group-padding-vertical) var(--ref-spacing-sm);border-top:1px solid var(--comp-select-group-border-top-color);background:var(--comp-select-group-background-color);font-family:var(--comp-select-group-text-font-family);font-size:var(--comp-select-group-text-size);font-weight:var(--comp-select-group-text-font-weight);line-height:var(--comp-select-group-text-line-height);color:var(--comp-select-group-text-color)}.ap-selection-dropdown__group-label{display:flex;align-items:center;flex:1;font-weight:700;color:var(--ref-color-grey-100)}.ap-selection-dropdown__group-label ap-checkbox{--comp-forms-label-font-weight: 700}.ap-selection-dropdown__header{border-bottom:1px solid var(--ref-color-grey-10);flex-shrink:0;display:flex;flex-direction:column}.ap-selection-dropdown__header .ap-selection-dropdown__header-top{display:flex;align-items:center;justify-content:space-between;padding:var(--ref-spacing-xs) var(--ref-spacing-sm)}.ap-selection-dropdown__header .ap-selection-dropdown__title{margin:0;font-size:var(--ref-font-size-md);font-weight:var(--ref-font-weight-bold);color:var(--ref-color-grey-100);flex:1}.ap-selection-dropdown__header ap-input-search{width:100%;padding:0 var(--ref-spacing-xxs) var(--ref-spacing-xxs)}.ap-selection-dropdown__header.ap-selection-dropdown__header--select-all ap-input-search{padding-bottom:0}.ap-selection-dropdown__header .ap-selection-dropdown__select-all{display:flex;align-items:center;height:var(--comp-select-one-line-height);padding:0 var(--ref-spacing-sm)}.ap-selection-dropdown__header .ap-selection-dropdown__select-all ap-checkbox{--comp-forms-label-font-weight: var(--ref-font-weight-bold)}.ap-selection-dropdown__items{padding:var(--ref-spacing-xxs) 0;flex:1;overflow-y:auto;min-height:0}.ap-selection-dropdown__no-results{padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);color:var(--ref-color-grey-80);font-size:var(--ref-font-size-sm);font-style:italic}.ap-selection-dropdown__footer{height:40px;padding:var(--ref-spacing-xs) var(--ref-spacing-sm);border-top:1px solid var(--ref-color-grey-10);flex-shrink:0;display:flex;align-items:center;justify-content:flex-start}.ap-selection-dropdown__selected-section{margin-bottom:var(--ref-spacing-xxs);border-bottom:1px solid var(--ref-color-grey-10);padding-bottom:var(--ref-spacing-xxs)}.ap-selection-dropdown__selected-section ::ng-deep ap-checkbox{--comp-forms-label-font-weight: 700}.ap-selection-dropdown__status{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}\n"], dependencies: [{ kind: "component", type: CheckboxComponent, selector: "ap-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "indeterminate", "checked", "fullyControlled", "presentational", "required", "name"], outputs: ["change"] }, { kind: "directive", type: DropdownContentDirective, selector: "ng-template[apDropdownContent]" }, { kind: "directive", type: DropdownOptionDirective, selector: "[apDropdownOption]", inputs: ["apDropdownOption", "apDropdownOptionDisabled"] }, { kind: "component", type: DropdownItemMultipleOneLineComponent, selector: "ap-dropdown-item-multiple-one-line", inputs: ["text", "selected", "indeterminate", "htmlId", "disabled", "avatarUrl", "symbolId", "disabledTooltip", "badgeText", "dividerEnabled", "presentational", "onlyEnabled", "onlyText", "isFeatureLocked", "roundedAvatar", "network", "symbolColor", "symbolTooltipText"], outputs: ["selectOnly", "lockedFeatureClicked"] }, { kind: "component", type: DropdownItemSingleOneLineComponent, selector: "ap-dropdown-item-single-one-line", inputs: ["text", "selected", "disabled", "avatarUrl", "showAvatarInitials", "symbolId", "disabledTooltip", "badgeText", "dividerEnabled", "network", "roundedAvatar", "isFeatureLocked", "standaloneModeEnabled"], outputs: ["lockedFeatureClicked"] }, { kind: "component", type: DropdownPanelComponent, selector: "ap-dropdown-panel", inputs: ["placement", "showBackdrop", "panelClass", "canDismiss"], outputs: ["opened", "closed"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: InputSearchComponent, selector: "ap-input-search", inputs: ["id", "placeholder", "clearable", "ariaControls", "ariaActiveDescendant"], outputs: ["focus", "blur", "keyup"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipArrow", "apTooltipAnchor", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
578
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SelectionDropdownComponent, isStandalone: true, selector: "ap-selection-dropdown", inputs: { i18n: { classPropertyName: "i18n", publicName: "i18n", isSignal: true, isRequired: false, transformFunction: null }, headerButtonId: { classPropertyName: "headerButtonId", publicName: "headerButtonId", isSignal: true, isRequired: false, transformFunction: null }, footerButtonId: { classPropertyName: "footerButtonId", publicName: "footerButtonId", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, searchEnabled: { classPropertyName: "searchEnabled", publicName: "searchEnabled", isSignal: true, isRequired: false, transformFunction: null }, footerButtonSymbolId: { classPropertyName: "footerButtonSymbolId", publicName: "footerButtonSymbolId", isSignal: true, isRequired: false, transformFunction: null }, headerButtonSymbolId: { classPropertyName: "headerButtonSymbolId", publicName: "headerButtonSymbolId", isSignal: true, isRequired: false, transformFunction: null }, selectAllEnabled: { classPropertyName: "selectAllEnabled", publicName: "selectAllEnabled", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null }, searchTerm: { classPropertyName: "searchTerm", publicName: "searchTerm", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed", selectionChange: "selectionChange", footerButtonClick: "footerButtonClick", headerButtonClick: "headerButtonClick", searchInputChange: "searchInputChange", searchTerm: "searchTermChange" }, queries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "panel", first: true, predicate: DropdownPanelComponent, descendants: true, isSignal: true }, { propertyName: "options", predicate: DropdownOptionDirective, descendants: true, isSignal: true }, { propertyName: "inputSearchComponent", first: true, predicate: ["inputSearchElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<ap-dropdown-panel\n [placement]=\"placement()\"\n [showBackdrop]=\"showBackdrop()\"\n (closed)=\"onPanelClosed()\">\n <!-- `dialog`, not a combobox: a combobox must close when focus leaves it, and this panel holds a\n search field, a header, a footer and group checkboxes beside its lists \u2014 closing on Tab left\n every one of them unreachable. -->\n <div\n *apDropdownContent\n class=\"ap-selection-dropdown__content\"\n role=\"dialog\"\n tabindex=\"-1\"\n [attr.aria-label]=\"panelLabel()\"\n (keydown)=\"onOptionsKeyDown($event)\"\n [class.ap-selection-dropdown__content--single]=\"isSingleSelect()\"\n [style.width]=\"panelWidth()\">\n <!-- Header -->\n @if (headerVisible()) {\n <div\n class=\"ap-selection-dropdown__header\"\n [class.ap-selection-dropdown__header--select-all]=\"selectAllVisible()\">\n @if (headerTopVisible()) {\n <div class=\"ap-selection-dropdown__header-top\">\n @if (texts().title) {\n <h3 class=\"ap-selection-dropdown__title\">\n {{ texts().title }}\n </h3>\n }\n @if (texts().headerButton) {\n <button\n type=\"button\"\n class=\"ap-link standalone\"\n [id]=\"headerButtonId()\"\n (click)=\"onHeaderButtonClick()\">\n <ap-symbol [symbolId]=\"headerButtonSymbolId()\" />\n {{ texts().headerButton }}\n </button>\n }\n </div>\n }\n @if (searchVisible()) {\n <ap-input-search\n #inputSearchElement\n [placeholder]=\"texts().searchPlaceholder\"\n [clearable]=\"true\"\n [ariaControls]=\"listboxId\"\n [ariaActiveDescendant]=\"activeDescendantId()\"\n [ngModel]=\"searchTerm()\"\n (blur)=\"onSearchBlur()\"\n (ngModelChange)=\"onSearchTermChange($event)\" />\n }\n @if (selectAllVisible()) {\n <div class=\"ap-selection-dropdown__select-all\">\n <ap-checkbox\n class=\"centered\"\n name=\"ap-selection-dropdown-select-all\"\n [checked]=\"selectAllState() === 'selected'\"\n [indeterminate]=\"selectAllState() === 'partial'\"\n (change)=\"onSelectAllToggle($event)\">\n {{ selectAllLabel() }}\n </ap-checkbox>\n </div>\n }\n </div>\n }\n\n <!-- Selection dropdown items -->\n <div\n class=\"ap-selection-dropdown__items\"\n [id]=\"listboxId\"\n [attr.role]=\"isSingleSelect() ? 'listbox' : null\"\n [attr.aria-label]=\"isSingleSelect() ? (texts().title ?? null) : null\">\n @if (filteredItems().length === 0 && searchTerm()) {\n <div class=\"ap-selection-dropdown__no-results\">\n {{ texts().noResults }}\n </div>\n } @else if (isSingleSelect()) {\n <!-- One listbox: a group holds only options and its presentational header (WAI-ARIA APG grouped listbox). -->\n @for (entry of singleEntries(); track entry.kind === 'group' ? 'group:' + entry.label : entry.row.item.htmlId) {\n @if (entry.kind === 'group') {\n <div\n role=\"group\"\n class=\"ap-selection-dropdown__group\"\n [attr.aria-labelledby]=\"groupHeaderId($index)\">\n <div\n role=\"presentation\"\n class=\"ap-selection-dropdown__group-title\"\n [id]=\"groupHeaderId($index)\">\n {{ entry.label }}\n </div>\n @for (row of entry.rows; track row.item.htmlId) {\n <ng-container *ngTemplateOutlet=\"singleOption; context: { $implicit: row }\" />\n }\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"singleOption; context: { $implicit: entry.row }\" />\n }\n }\n\n <ng-template\n #singleOption\n let-row>\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__option\"\n [id]=\"optionId(row.item)\"\n [apDropdownOption]=\"row.texts.label\"\n [apDropdownOptionDisabled]=\"!!(row.item.disabled || row.item.isFeatureLocked)\"\n [tabindex]=\"optionTabIndex(tabbableOption(row.item))\"\n [attr.aria-selected]=\"row.item.selected\"\n [attr.aria-disabled]=\"row.item.disabled || row.item.isFeatureLocked\"\n [attr.data-track]=\"row.item.dataTrack\"\n [apTooltip]=\"row.item.disabled ? (row.texts.disabledTooltip ?? null) : null\"\n apTooltipPosition=\"right\"\n (click)=\"onItemToggle(row.item)\">\n <ap-dropdown-item-single-one-line\n [text]=\"row.texts.label\"\n [selected]=\"row.item.selected\"\n [disabled]=\"row.item.disabled || false\"\n [avatarUrl]=\"row.item.avatarUrl\"\n [symbolId]=\"row.item.symbolId\"\n [badgeText]=\"row.texts.badge\"\n [isFeatureLocked]=\"row.item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!row.item.roundedAvatar\"\n [network]=\"row.item.network\"\n [standaloneModeEnabled]=\"true\" />\n </button>\n </ng-template>\n } @else {\n <!-- A listbox owns only options, so each section is its own, and a group's checkbox sits beside it. -->\n @if (selectedRows().length > 0) {\n <div\n role=\"listbox\"\n aria-multiselectable=\"true\"\n class=\"ap-selection-dropdown__selected-section\"\n [attr.aria-label]=\"texts().selectedSection\">\n @for (row of selectedRows(); track row.item.htmlId) {\n @let grouped = false;\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__item-button\"\n [id]=\"optionId(row.item)\"\n [tabindex]=\"optionTabIndex(tabbableOption(row.item))\"\n [apDropdownOption]=\"row.texts.label\"\n [apDropdownOptionDisabled]=\"!!(row.item.disabled || row.item.isFeatureLocked)\"\n [attr.aria-selected]=\"row.item.selected\"\n [class.ap-selection-dropdown__item-button--disabled]=\"row.item.disabled || row.item.isFeatureLocked\"\n [apTooltip]=\"row.texts.disabledTooltip\"\n (click)=\"onItemToggle(row.item)\">\n <ap-dropdown-item-multiple-one-line\n presentational\n class=\"ap-selection-dropdown__item\"\n [class.ap-selection-dropdown__item--grouped]=\"grouped\"\n [text]=\"row.texts.label\"\n [selected]=\"row.item.selected\"\n [indeterminate]=\"row.item.indeterminate ?? false\"\n [htmlId]=\"row.item.htmlId\"\n [disabled]=\"row.item.disabled || false\"\n [avatarUrl]=\"row.item.avatarUrl\"\n [symbolId]=\"row.item.symbolId\"\n [badgeText]=\"row.texts.badge\"\n [isFeatureLocked]=\"row.item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!row.item.roundedAvatar\"\n [network]=\"row.item.network\"\n [symbolColor]=\"row.item.symbolColor\"\n [symbolTooltipText]=\"row.texts.symbolTooltip\" />\n </button>\n }\n </div>\n }\n\n <!-- Unselected zone: items & groups in first-encounter order -->\n @for (run of displayRuns(); track runKey(run)) {\n @if (run.kind === 'items') {\n <div\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [attr.aria-label]=\"texts().title ?? texts().optionsSection\">\n @for (row of run.rows; track row.item.htmlId) {\n @let grouped = false;\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__item-button\"\n [id]=\"optionId(row.item)\"\n [tabindex]=\"optionTabIndex(tabbableOption(row.item))\"\n [apDropdownOption]=\"row.texts.label\"\n [apDropdownOptionDisabled]=\"!!(row.item.disabled || row.item.isFeatureLocked)\"\n [attr.aria-selected]=\"row.item.selected\"\n [class.ap-selection-dropdown__item-button--disabled]=\"row.item.disabled || row.item.isFeatureLocked\"\n [apTooltip]=\"row.texts.disabledTooltip\"\n (click)=\"onItemToggle(row.item)\">\n <ap-dropdown-item-multiple-one-line\n presentational\n class=\"ap-selection-dropdown__item\"\n [class.ap-selection-dropdown__item--grouped]=\"grouped\"\n [text]=\"row.texts.label\"\n [selected]=\"row.item.selected\"\n [indeterminate]=\"row.item.indeterminate ?? false\"\n [htmlId]=\"row.item.htmlId\"\n [disabled]=\"row.item.disabled || false\"\n [avatarUrl]=\"row.item.avatarUrl\"\n [symbolId]=\"row.item.symbolId\"\n [badgeText]=\"row.texts.badge\"\n [isFeatureLocked]=\"row.item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!row.item.roundedAvatar\"\n [network]=\"row.item.network\"\n [symbolColor]=\"row.item.symbolColor\"\n [symbolTooltipText]=\"row.texts.symbolTooltip\" />\n </button>\n }\n </div>\n } @else {\n <div class=\"ap-selection-dropdown__group\">\n <!-- Group header with checkbox -->\n <div class=\"ap-selection-dropdown__group-header\">\n <div class=\"ap-selection-dropdown__group-label\">\n <ap-checkbox\n class=\"centered\"\n [name]=\"run.label\"\n [checked]=\"groupSelectionStates()[run.label] === 'selected'\"\n [indeterminate]=\"groupSelectionStates()[run.label] === 'partial'\"\n (change)=\"onGroupToggle(run.label, $event)\">\n {{ run.label }}\n </ap-checkbox>\n </div>\n </div>\n\n <div\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [attr.aria-label]=\"run.label\">\n @for (row of run.rows; track row.item.htmlId) {\n @let grouped = true;\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__item-button\"\n [id]=\"optionId(row.item)\"\n [tabindex]=\"optionTabIndex(tabbableOption(row.item))\"\n [apDropdownOption]=\"row.texts.label\"\n [apDropdownOptionDisabled]=\"!!(row.item.disabled || row.item.isFeatureLocked)\"\n [attr.aria-selected]=\"row.item.selected\"\n [class.ap-selection-dropdown__item-button--disabled]=\"row.item.disabled || row.item.isFeatureLocked\"\n [apTooltip]=\"row.texts.disabledTooltip\"\n (click)=\"onItemToggle(row.item)\">\n <ap-dropdown-item-multiple-one-line\n presentational\n class=\"ap-selection-dropdown__item\"\n [class.ap-selection-dropdown__item--grouped]=\"grouped\"\n [text]=\"row.texts.label\"\n [selected]=\"row.item.selected\"\n [indeterminate]=\"row.item.indeterminate ?? false\"\n [htmlId]=\"row.item.htmlId\"\n [disabled]=\"row.item.disabled || false\"\n [avatarUrl]=\"row.item.avatarUrl\"\n [symbolId]=\"row.item.symbolId\"\n [badgeText]=\"row.texts.badge\"\n [isFeatureLocked]=\"row.item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!row.item.roundedAvatar\"\n [network]=\"row.item.network\"\n [symbolColor]=\"row.item.symbolColor\"\n [symbolTooltipText]=\"row.texts.symbolTooltip\" />\n </button>\n }\n </div>\n </div>\n }\n }\n }\n </div>\n\n <div\n class=\"ap-selection-dropdown__status\"\n role=\"status\"\n aria-atomic=\"true\">\n {{ resultsAnnouncement() }}\n </div>\n\n <!-- Footer -->\n @if (texts().footerButton) {\n <div class=\"ap-selection-dropdown__footer\">\n <button\n type=\"button\"\n class=\"ap-link standalone\"\n [id]=\"footerButtonId()\"\n (click)=\"onFooterButtonClick()\">\n <ap-symbol [symbolId]=\"footerButtonSymbolId()\" />\n {{ texts().footerButton }}\n </button>\n </div>\n }\n </div>\n</ap-dropdown-panel>\n", styles: [":host{display:none}.ap-selection-dropdown__content{border-radius:inherit;overflow:hidden;z-index:1000;width:370px;display:flex;flex-direction:column;max-height:min(400px,var(--ap-floating-available-height, 100vh))}.ap-selection-dropdown__content--single{width:auto;min-width:160px}.ap-selection-dropdown__option{display:block;width:100%;padding:0;border:none;background:none;font:inherit;text-align:inherit}.ap-selection-dropdown__item-button{display:block;width:100%;padding:0;margin:0;border:none;background:transparent;text-align:left;cursor:pointer;outline:none}.ap-selection-dropdown__item-button:hover,.ap-selection-dropdown__item-button.ap-dropdown-option--active{background-color:var(--ref-color-electric-blue-10)}.ap-selection-dropdown__item-button:active{background-color:var(--ref-color-electric-blue-20)}.ap-selection-dropdown__item-button:focus{outline:none}.ap-selection-dropdown__item-button:focus-visible{outline:none}.ap-selection-dropdown__item-button.ap-selection-dropdown__item-button--disabled{pointer-events:none}.ap-selection-dropdown__item{display:flex;align-items:center;width:100%;min-height:40px;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);background:transparent;cursor:pointer;font-family:Averta}.ap-selection-dropdown__group-header{display:flex;align-items:center;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);border-top:1px solid var(--ref-color-grey-10);background:var(--ref-color-grey-bg)}.ap-selection-dropdown__group-title{padding:var(--comp-select-group-padding-vertical) var(--ref-spacing-sm);border-top:1px solid var(--comp-select-group-border-top-color);background:var(--comp-select-group-background-color);font-family:var(--comp-select-group-text-font-family);font-size:var(--comp-select-group-text-size);font-weight:var(--comp-select-group-text-font-weight);line-height:var(--comp-select-group-text-line-height);color:var(--comp-select-group-text-color)}.ap-selection-dropdown__group-label{display:flex;align-items:center;flex:1;font-weight:700;color:var(--ref-color-grey-100)}.ap-selection-dropdown__group-label ap-checkbox{--comp-forms-label-font-weight: 700}.ap-selection-dropdown__header{border-bottom:1px solid var(--ref-color-grey-10);flex-shrink:0;display:flex;flex-direction:column}.ap-selection-dropdown__header .ap-selection-dropdown__header-top{display:flex;align-items:center;justify-content:space-between;padding:var(--ref-spacing-xs) var(--ref-spacing-sm)}.ap-selection-dropdown__header .ap-selection-dropdown__title{margin:0;font-size:var(--ref-font-size-md);font-weight:var(--ref-font-weight-bold);color:var(--ref-color-grey-100);flex:1}.ap-selection-dropdown__header ap-input-search{width:100%;padding:0 var(--ref-spacing-xxs) var(--ref-spacing-xxs)}.ap-selection-dropdown__header.ap-selection-dropdown__header--select-all ap-input-search{padding-bottom:0}.ap-selection-dropdown__header .ap-selection-dropdown__select-all{display:flex;align-items:center;height:var(--comp-select-one-line-height);padding:0 var(--ref-spacing-sm)}.ap-selection-dropdown__header .ap-selection-dropdown__select-all ap-checkbox{--comp-forms-label-font-weight: var(--ref-font-weight-bold)}.ap-selection-dropdown__items{padding:var(--ref-spacing-xxs) 0;flex:1;overflow-y:auto;min-height:0}.ap-selection-dropdown__no-results{padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);color:var(--ref-color-grey-80);font-size:var(--ref-font-size-sm);font-style:italic}.ap-selection-dropdown__footer{height:40px;padding:var(--ref-spacing-xs) var(--ref-spacing-sm);border-top:1px solid var(--ref-color-grey-10);flex-shrink:0;display:flex;align-items:center;justify-content:flex-start}.ap-selection-dropdown__selected-section{margin-bottom:var(--ref-spacing-xxs);border-bottom:1px solid var(--ref-color-grey-10);padding-bottom:var(--ref-spacing-xxs)}.ap-selection-dropdown__selected-section ::ng-deep ap-checkbox{--comp-forms-label-font-weight: 700}.ap-selection-dropdown__status{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}\n"], dependencies: [{ kind: "component", type: CheckboxComponent, selector: "ap-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "indeterminate", "checked", "fullyControlled", "presentational", "required", "name"], outputs: ["change"] }, { kind: "directive", type: DropdownContentDirective, selector: "ng-template[apDropdownContent]" }, { kind: "directive", type: DropdownOptionDirective, selector: "[apDropdownOption]", inputs: ["apDropdownOption", "apDropdownOptionDisabled"] }, { kind: "component", type: DropdownItemMultipleOneLineComponent, selector: "ap-dropdown-item-multiple-one-line", inputs: ["text", "selected", "indeterminate", "htmlId", "disabled", "avatarUrl", "symbolId", "disabledTooltip", "badgeText", "dividerEnabled", "presentational", "onlyEnabled", "onlyText", "isFeatureLocked", "roundedAvatar", "network", "symbolColor", "symbolTooltipText"], outputs: ["selectOnly", "lockedFeatureClicked"] }, { kind: "component", type: DropdownItemSingleOneLineComponent, selector: "ap-dropdown-item-single-one-line", inputs: ["text", "selected", "disabled", "avatarUrl", "showAvatarInitials", "symbolId", "disabledTooltip", "badgeText", "dividerEnabled", "network", "roundedAvatar", "isFeatureLocked", "standaloneModeEnabled"], outputs: ["lockedFeatureClicked"] }, { kind: "component", type: DropdownPanelComponent, selector: "ap-dropdown-panel", inputs: ["placement", "showBackdrop", "panelClass", "canDismiss"], outputs: ["opened", "closed"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: InputSearchComponent, selector: "ap-input-search", inputs: ["id", "placeholder", "clearable", "ariaControls", "ariaActiveDescendant"], outputs: ["focus", "blur", "keyup"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipArrow", "apTooltipAnchor", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
573
579
|
}
|
|
574
580
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SelectionDropdownComponent, decorators: [{
|
|
575
581
|
type: Component,
|
|
@@ -585,8 +591,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
585
591
|
InputSearchComponent,
|
|
586
592
|
SymbolComponent,
|
|
587
593
|
TooltipDirective,
|
|
588
|
-
], template: "<ap-dropdown-panel\n [placement]=\"placement()\"\n [showBackdrop]=\"showBackdrop()\"\n (closed)=\"onPanelClosed()\">\n <!-- `dialog`, not a combobox: a combobox must close when focus leaves it, and this panel holds a\n search field, a header, a footer and group checkboxes beside its lists \u2014 closing on Tab left\n every one of them unreachable. -->\n <div\n *apDropdownContent\n class=\"ap-selection-dropdown__content\"\n role=\"dialog\"\n tabindex=\"-1\"\n [attr.aria-label]=\"panelLabel()\"\n (keydown)=\"onOptionsKeyDown($event)\"\n [class.ap-selection-dropdown__content--single]=\"isSingleSelect()\"\n [style.width]=\"panelWidth()\">\n <!-- Header -->\n @if (headerVisible()) {\n <div\n class=\"ap-selection-dropdown__header\"\n [class.ap-selection-dropdown__header--select-all]=\"selectAllVisible()\">\n @if (headerTopVisible()) {\n <div class=\"ap-selection-dropdown__header-top\">\n @if (title()) {\n <h3 class=\"ap-selection-dropdown__title\">\n {{ title() }}\n </h3>\n }\n @if (headerButtonText()) {\n <button\n type=\"button\"\n class=\"ap-link standalone\"\n [id]=\"headerButtonId()\"\n (click)=\"onHeaderButtonClick()\">\n <ap-symbol [symbolId]=\"headerButtonSymbolId()\" />\n {{ headerButtonText() }}\n </button>\n }\n </div>\n }\n @if (searchVisible()) {\n <ap-input-search\n #inputSearchElement\n [placeholder]=\"searchPlaceholderText()\"\n [clearable]=\"true\"\n [ariaControls]=\"listboxId\"\n [ariaActiveDescendant]=\"activeDescendantId()\"\n [ngModel]=\"searchTerm()\"\n (blur)=\"onSearchBlur()\"\n (ngModelChange)=\"onSearchTermChange($event)\" />\n }\n @if (selectAllVisible()) {\n <div class=\"ap-selection-dropdown__select-all\">\n <ap-checkbox\n class=\"centered\"\n name=\"ap-selection-dropdown-select-all\"\n [checked]=\"selectAllState() === 'selected'\"\n [indeterminate]=\"selectAllState() === 'partial'\"\n (change)=\"onSelectAllToggle($event)\">\n {{ selectAllLabel() }}\n </ap-checkbox>\n </div>\n }\n </div>\n }\n\n <!-- Selection dropdown items -->\n <div\n class=\"ap-selection-dropdown__items\"\n [id]=\"listboxId\"\n [attr.role]=\"isSingleSelect() ? 'listbox' : null\"\n [attr.aria-label]=\"isSingleSelect() ? (title() ?? null) : null\">\n @if (filteredItems().length === 0 && searchTerm()) {\n <div class=\"ap-selection-dropdown__no-results\">\n {{ noSearchResultsText() }}\n </div>\n } @else if (isSingleSelect()) {\n <!-- One listbox: a group holds only options and its presentational header (WAI-ARIA APG grouped listbox). -->\n @for (entry of singleEntries(); track entry.kind === 'group' ? 'group:' + entry.label : entry.item.htmlId) {\n @if (entry.kind === 'group') {\n <div\n role=\"group\"\n class=\"ap-selection-dropdown__group\"\n [attr.aria-labelledby]=\"groupHeaderId($index)\">\n <div\n role=\"presentation\"\n class=\"ap-selection-dropdown__group-title\"\n [id]=\"groupHeaderId($index)\">\n {{ entry.label }}\n </div>\n @for (item of entry.items; track item.htmlId) {\n <ng-container *ngTemplateOutlet=\"singleOption; context: { $implicit: item }\" />\n }\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"singleOption; context: { $implicit: entry.item }\" />\n }\n }\n\n <ng-template\n #singleOption\n let-item>\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__option\"\n [id]=\"optionId(item)\"\n [apDropdownOption]=\"item.text\"\n [apDropdownOptionDisabled]=\"!!(item.disabled || item.isFeatureLocked)\"\n [tabindex]=\"optionTabIndex(tabbableOption(item))\"\n [attr.aria-selected]=\"item.selected\"\n [attr.aria-disabled]=\"item.disabled || item.isFeatureLocked\"\n [attr.data-track]=\"item.dataTrack\"\n [apTooltip]=\"item.disabled ? (item.disabledTooltip ?? null) : null\"\n apTooltipPosition=\"right\"\n (click)=\"onItemToggle(item)\">\n <ap-dropdown-item-single-one-line\n [text]=\"item.text\"\n [selected]=\"item.selected\"\n [disabled]=\"item.disabled || false\"\n [avatarUrl]=\"item.avatarUrl\"\n [symbolId]=\"item.symbolId\"\n [badgeText]=\"item.badgeText\"\n [isFeatureLocked]=\"item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!item.roundedAvatar\"\n [network]=\"item.network\"\n [standaloneModeEnabled]=\"true\" />\n </button>\n </ng-template>\n } @else {\n <!-- A listbox owns only options, so each section is its own, and a group's checkbox sits beside it. -->\n @if (selectedItems().length > 0) {\n <div\n role=\"listbox\"\n aria-multiselectable=\"true\"\n class=\"ap-selection-dropdown__selected-section\"\n [attr.aria-label]=\"selectedSectionText()\">\n @for (item of selectedItems(); track item.htmlId) {\n @let grouped = false;\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__item-button\"\n [id]=\"optionId(item)\"\n [tabindex]=\"optionTabIndex(tabbableOption(item))\"\n [apDropdownOption]=\"item.text\"\n [apDropdownOptionDisabled]=\"!!(item.disabled || item.isFeatureLocked)\"\n [attr.aria-selected]=\"item.selected\"\n [class.ap-selection-dropdown__item-button--disabled]=\"item.disabled || item.isFeatureLocked\"\n [apTooltip]=\"item.disabledTooltip\"\n (click)=\"onItemToggle(item)\">\n <ap-dropdown-item-multiple-one-line\n presentational\n class=\"ap-selection-dropdown__item\"\n [class.ap-selection-dropdown__item--grouped]=\"grouped\"\n [text]=\"item.text\"\n [selected]=\"item.selected\"\n [indeterminate]=\"item.indeterminate ?? false\"\n [htmlId]=\"item.htmlId\"\n [disabled]=\"item.disabled || false\"\n [avatarUrl]=\"item.avatarUrl\"\n [symbolId]=\"item.symbolId\"\n [badgeText]=\"item.badgeText\"\n [isFeatureLocked]=\"item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!item.roundedAvatar\"\n [network]=\"item.network\"\n [symbolColor]=\"item.symbolColor\"\n [symbolTooltipText]=\"item.symbolTooltipText\" />\n </button>\n }\n </div>\n }\n\n <!-- Unselected zone: items & groups in first-encounter order -->\n @for (run of displayRuns(); track runKey(run)) {\n @if (run.kind === 'items') {\n <div\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [attr.aria-label]=\"title() ?? optionsSectionText()\">\n @for (item of run.items; track item.htmlId) {\n @let grouped = false;\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__item-button\"\n [id]=\"optionId(item)\"\n [tabindex]=\"optionTabIndex(tabbableOption(item))\"\n [apDropdownOption]=\"item.text\"\n [apDropdownOptionDisabled]=\"!!(item.disabled || item.isFeatureLocked)\"\n [attr.aria-selected]=\"item.selected\"\n [class.ap-selection-dropdown__item-button--disabled]=\"item.disabled || item.isFeatureLocked\"\n [apTooltip]=\"item.disabledTooltip\"\n (click)=\"onItemToggle(item)\">\n <ap-dropdown-item-multiple-one-line\n presentational\n class=\"ap-selection-dropdown__item\"\n [class.ap-selection-dropdown__item--grouped]=\"grouped\"\n [text]=\"item.text\"\n [selected]=\"item.selected\"\n [indeterminate]=\"item.indeterminate ?? false\"\n [htmlId]=\"item.htmlId\"\n [disabled]=\"item.disabled || false\"\n [avatarUrl]=\"item.avatarUrl\"\n [symbolId]=\"item.symbolId\"\n [badgeText]=\"item.badgeText\"\n [isFeatureLocked]=\"item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!item.roundedAvatar\"\n [network]=\"item.network\"\n [symbolColor]=\"item.symbolColor\"\n [symbolTooltipText]=\"item.symbolTooltipText\" />\n </button>\n }\n </div>\n } @else {\n <div class=\"ap-selection-dropdown__group\">\n <!-- Group header with checkbox -->\n <div class=\"ap-selection-dropdown__group-header\">\n <div class=\"ap-selection-dropdown__group-label\">\n <ap-checkbox\n class=\"centered\"\n [name]=\"run.label\"\n [checked]=\"groupSelectionStates()[run.label] === 'selected'\"\n [indeterminate]=\"groupSelectionStates()[run.label] === 'partial'\"\n (change)=\"onGroupToggle(run.label, $event)\">\n {{ run.label }}\n </ap-checkbox>\n </div>\n </div>\n\n <div\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [attr.aria-label]=\"run.label\">\n @for (item of run.items; track item.htmlId) {\n @let grouped = true;\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__item-button\"\n [id]=\"optionId(item)\"\n [tabindex]=\"optionTabIndex(tabbableOption(item))\"\n [apDropdownOption]=\"item.text\"\n [apDropdownOptionDisabled]=\"!!(item.disabled || item.isFeatureLocked)\"\n [attr.aria-selected]=\"item.selected\"\n [class.ap-selection-dropdown__item-button--disabled]=\"item.disabled || item.isFeatureLocked\"\n [apTooltip]=\"item.disabledTooltip\"\n (click)=\"onItemToggle(item)\">\n <ap-dropdown-item-multiple-one-line\n presentational\n class=\"ap-selection-dropdown__item\"\n [class.ap-selection-dropdown__item--grouped]=\"grouped\"\n [text]=\"item.text\"\n [selected]=\"item.selected\"\n [indeterminate]=\"item.indeterminate ?? false\"\n [htmlId]=\"item.htmlId\"\n [disabled]=\"item.disabled || false\"\n [avatarUrl]=\"item.avatarUrl\"\n [symbolId]=\"item.symbolId\"\n [badgeText]=\"item.badgeText\"\n [isFeatureLocked]=\"item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!item.roundedAvatar\"\n [network]=\"item.network\"\n [symbolColor]=\"item.symbolColor\"\n [symbolTooltipText]=\"item.symbolTooltipText\" />\n </button>\n }\n </div>\n </div>\n }\n }\n }\n </div>\n\n <div\n class=\"ap-selection-dropdown__status\"\n role=\"status\"\n aria-atomic=\"true\">\n {{ resultsAnnouncement() }}\n </div>\n\n <!-- Footer -->\n @if (footerButtonText()) {\n <div class=\"ap-selection-dropdown__footer\">\n <button\n type=\"button\"\n class=\"ap-link standalone\"\n [id]=\"footerButtonId()\"\n (click)=\"onFooterButtonClick()\">\n <ap-symbol [symbolId]=\"footerButtonSymbolId()\" />\n {{ footerButtonText() }}\n </button>\n </div>\n }\n </div>\n</ap-dropdown-panel>\n", styles: [":host{display:none}.ap-selection-dropdown__content{border-radius:inherit;overflow:hidden;z-index:1000;width:370px;display:flex;flex-direction:column;max-height:min(400px,var(--ap-floating-available-height, 100vh))}.ap-selection-dropdown__content--single{width:auto;min-width:160px}.ap-selection-dropdown__option{display:block;width:100%;padding:0;border:none;background:none;font:inherit;text-align:inherit}.ap-selection-dropdown__item-button{display:block;width:100%;padding:0;margin:0;border:none;background:transparent;text-align:left;cursor:pointer;outline:none}.ap-selection-dropdown__item-button:hover,.ap-selection-dropdown__item-button.ap-dropdown-option--active{background-color:var(--ref-color-electric-blue-10)}.ap-selection-dropdown__item-button:active{background-color:var(--ref-color-electric-blue-20)}.ap-selection-dropdown__item-button:focus{outline:none}.ap-selection-dropdown__item-button:focus-visible{outline:none}.ap-selection-dropdown__item-button.ap-selection-dropdown__item-button--disabled{pointer-events:none}.ap-selection-dropdown__item{display:flex;align-items:center;width:100%;min-height:40px;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);background:transparent;cursor:pointer;font-family:Averta}.ap-selection-dropdown__group-header{display:flex;align-items:center;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);border-top:1px solid var(--ref-color-grey-10);background:var(--ref-color-grey-bg)}.ap-selection-dropdown__group-title{padding:var(--comp-select-group-padding-vertical) var(--ref-spacing-sm);border-top:1px solid var(--comp-select-group-border-top-color);background:var(--comp-select-group-background-color);font-family:var(--comp-select-group-text-font-family);font-size:var(--comp-select-group-text-size);font-weight:var(--comp-select-group-text-font-weight);line-height:var(--comp-select-group-text-line-height);color:var(--comp-select-group-text-color)}.ap-selection-dropdown__group-label{display:flex;align-items:center;flex:1;font-weight:700;color:var(--ref-color-grey-100)}.ap-selection-dropdown__group-label ap-checkbox{--comp-forms-label-font-weight: 700}.ap-selection-dropdown__header{border-bottom:1px solid var(--ref-color-grey-10);flex-shrink:0;display:flex;flex-direction:column}.ap-selection-dropdown__header .ap-selection-dropdown__header-top{display:flex;align-items:center;justify-content:space-between;padding:var(--ref-spacing-xs) var(--ref-spacing-sm)}.ap-selection-dropdown__header .ap-selection-dropdown__title{margin:0;font-size:var(--ref-font-size-md);font-weight:var(--ref-font-weight-bold);color:var(--ref-color-grey-100);flex:1}.ap-selection-dropdown__header ap-input-search{width:100%;padding:0 var(--ref-spacing-xxs) var(--ref-spacing-xxs)}.ap-selection-dropdown__header.ap-selection-dropdown__header--select-all ap-input-search{padding-bottom:0}.ap-selection-dropdown__header .ap-selection-dropdown__select-all{display:flex;align-items:center;height:var(--comp-select-one-line-height);padding:0 var(--ref-spacing-sm)}.ap-selection-dropdown__header .ap-selection-dropdown__select-all ap-checkbox{--comp-forms-label-font-weight: var(--ref-font-weight-bold)}.ap-selection-dropdown__items{padding:var(--ref-spacing-xxs) 0;flex:1;overflow-y:auto;min-height:0}.ap-selection-dropdown__no-results{padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);color:var(--ref-color-grey-80);font-size:var(--ref-font-size-sm);font-style:italic}.ap-selection-dropdown__footer{height:40px;padding:var(--ref-spacing-xs) var(--ref-spacing-sm);border-top:1px solid var(--ref-color-grey-10);flex-shrink:0;display:flex;align-items:center;justify-content:flex-start}.ap-selection-dropdown__selected-section{margin-bottom:var(--ref-spacing-xxs);border-bottom:1px solid var(--ref-color-grey-10);padding-bottom:var(--ref-spacing-xxs)}.ap-selection-dropdown__selected-section ::ng-deep ap-checkbox{--comp-forms-label-font-weight: 700}.ap-selection-dropdown__status{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}\n"] }]
|
|
589
|
-
}], ctorParameters: () => [], propDecorators: { panel: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DropdownPanelComponent), { isSignal: true }] }], options: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => DropdownOptionDirective), { isSignal: true }] }],
|
|
594
|
+
], template: "<ap-dropdown-panel\n [placement]=\"placement()\"\n [showBackdrop]=\"showBackdrop()\"\n (closed)=\"onPanelClosed()\">\n <!-- `dialog`, not a combobox: a combobox must close when focus leaves it, and this panel holds a\n search field, a header, a footer and group checkboxes beside its lists \u2014 closing on Tab left\n every one of them unreachable. -->\n <div\n *apDropdownContent\n class=\"ap-selection-dropdown__content\"\n role=\"dialog\"\n tabindex=\"-1\"\n [attr.aria-label]=\"panelLabel()\"\n (keydown)=\"onOptionsKeyDown($event)\"\n [class.ap-selection-dropdown__content--single]=\"isSingleSelect()\"\n [style.width]=\"panelWidth()\">\n <!-- Header -->\n @if (headerVisible()) {\n <div\n class=\"ap-selection-dropdown__header\"\n [class.ap-selection-dropdown__header--select-all]=\"selectAllVisible()\">\n @if (headerTopVisible()) {\n <div class=\"ap-selection-dropdown__header-top\">\n @if (texts().title) {\n <h3 class=\"ap-selection-dropdown__title\">\n {{ texts().title }}\n </h3>\n }\n @if (texts().headerButton) {\n <button\n type=\"button\"\n class=\"ap-link standalone\"\n [id]=\"headerButtonId()\"\n (click)=\"onHeaderButtonClick()\">\n <ap-symbol [symbolId]=\"headerButtonSymbolId()\" />\n {{ texts().headerButton }}\n </button>\n }\n </div>\n }\n @if (searchVisible()) {\n <ap-input-search\n #inputSearchElement\n [placeholder]=\"texts().searchPlaceholder\"\n [clearable]=\"true\"\n [ariaControls]=\"listboxId\"\n [ariaActiveDescendant]=\"activeDescendantId()\"\n [ngModel]=\"searchTerm()\"\n (blur)=\"onSearchBlur()\"\n (ngModelChange)=\"onSearchTermChange($event)\" />\n }\n @if (selectAllVisible()) {\n <div class=\"ap-selection-dropdown__select-all\">\n <ap-checkbox\n class=\"centered\"\n name=\"ap-selection-dropdown-select-all\"\n [checked]=\"selectAllState() === 'selected'\"\n [indeterminate]=\"selectAllState() === 'partial'\"\n (change)=\"onSelectAllToggle($event)\">\n {{ selectAllLabel() }}\n </ap-checkbox>\n </div>\n }\n </div>\n }\n\n <!-- Selection dropdown items -->\n <div\n class=\"ap-selection-dropdown__items\"\n [id]=\"listboxId\"\n [attr.role]=\"isSingleSelect() ? 'listbox' : null\"\n [attr.aria-label]=\"isSingleSelect() ? (texts().title ?? null) : null\">\n @if (filteredItems().length === 0 && searchTerm()) {\n <div class=\"ap-selection-dropdown__no-results\">\n {{ texts().noResults }}\n </div>\n } @else if (isSingleSelect()) {\n <!-- One listbox: a group holds only options and its presentational header (WAI-ARIA APG grouped listbox). -->\n @for (entry of singleEntries(); track entry.kind === 'group' ? 'group:' + entry.label : entry.row.item.htmlId) {\n @if (entry.kind === 'group') {\n <div\n role=\"group\"\n class=\"ap-selection-dropdown__group\"\n [attr.aria-labelledby]=\"groupHeaderId($index)\">\n <div\n role=\"presentation\"\n class=\"ap-selection-dropdown__group-title\"\n [id]=\"groupHeaderId($index)\">\n {{ entry.label }}\n </div>\n @for (row of entry.rows; track row.item.htmlId) {\n <ng-container *ngTemplateOutlet=\"singleOption; context: { $implicit: row }\" />\n }\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"singleOption; context: { $implicit: entry.row }\" />\n }\n }\n\n <ng-template\n #singleOption\n let-row>\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__option\"\n [id]=\"optionId(row.item)\"\n [apDropdownOption]=\"row.texts.label\"\n [apDropdownOptionDisabled]=\"!!(row.item.disabled || row.item.isFeatureLocked)\"\n [tabindex]=\"optionTabIndex(tabbableOption(row.item))\"\n [attr.aria-selected]=\"row.item.selected\"\n [attr.aria-disabled]=\"row.item.disabled || row.item.isFeatureLocked\"\n [attr.data-track]=\"row.item.dataTrack\"\n [apTooltip]=\"row.item.disabled ? (row.texts.disabledTooltip ?? null) : null\"\n apTooltipPosition=\"right\"\n (click)=\"onItemToggle(row.item)\">\n <ap-dropdown-item-single-one-line\n [text]=\"row.texts.label\"\n [selected]=\"row.item.selected\"\n [disabled]=\"row.item.disabled || false\"\n [avatarUrl]=\"row.item.avatarUrl\"\n [symbolId]=\"row.item.symbolId\"\n [badgeText]=\"row.texts.badge\"\n [isFeatureLocked]=\"row.item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!row.item.roundedAvatar\"\n [network]=\"row.item.network\"\n [standaloneModeEnabled]=\"true\" />\n </button>\n </ng-template>\n } @else {\n <!-- A listbox owns only options, so each section is its own, and a group's checkbox sits beside it. -->\n @if (selectedRows().length > 0) {\n <div\n role=\"listbox\"\n aria-multiselectable=\"true\"\n class=\"ap-selection-dropdown__selected-section\"\n [attr.aria-label]=\"texts().selectedSection\">\n @for (row of selectedRows(); track row.item.htmlId) {\n @let grouped = false;\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__item-button\"\n [id]=\"optionId(row.item)\"\n [tabindex]=\"optionTabIndex(tabbableOption(row.item))\"\n [apDropdownOption]=\"row.texts.label\"\n [apDropdownOptionDisabled]=\"!!(row.item.disabled || row.item.isFeatureLocked)\"\n [attr.aria-selected]=\"row.item.selected\"\n [class.ap-selection-dropdown__item-button--disabled]=\"row.item.disabled || row.item.isFeatureLocked\"\n [apTooltip]=\"row.texts.disabledTooltip\"\n (click)=\"onItemToggle(row.item)\">\n <ap-dropdown-item-multiple-one-line\n presentational\n class=\"ap-selection-dropdown__item\"\n [class.ap-selection-dropdown__item--grouped]=\"grouped\"\n [text]=\"row.texts.label\"\n [selected]=\"row.item.selected\"\n [indeterminate]=\"row.item.indeterminate ?? false\"\n [htmlId]=\"row.item.htmlId\"\n [disabled]=\"row.item.disabled || false\"\n [avatarUrl]=\"row.item.avatarUrl\"\n [symbolId]=\"row.item.symbolId\"\n [badgeText]=\"row.texts.badge\"\n [isFeatureLocked]=\"row.item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!row.item.roundedAvatar\"\n [network]=\"row.item.network\"\n [symbolColor]=\"row.item.symbolColor\"\n [symbolTooltipText]=\"row.texts.symbolTooltip\" />\n </button>\n }\n </div>\n }\n\n <!-- Unselected zone: items & groups in first-encounter order -->\n @for (run of displayRuns(); track runKey(run)) {\n @if (run.kind === 'items') {\n <div\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [attr.aria-label]=\"texts().title ?? texts().optionsSection\">\n @for (row of run.rows; track row.item.htmlId) {\n @let grouped = false;\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__item-button\"\n [id]=\"optionId(row.item)\"\n [tabindex]=\"optionTabIndex(tabbableOption(row.item))\"\n [apDropdownOption]=\"row.texts.label\"\n [apDropdownOptionDisabled]=\"!!(row.item.disabled || row.item.isFeatureLocked)\"\n [attr.aria-selected]=\"row.item.selected\"\n [class.ap-selection-dropdown__item-button--disabled]=\"row.item.disabled || row.item.isFeatureLocked\"\n [apTooltip]=\"row.texts.disabledTooltip\"\n (click)=\"onItemToggle(row.item)\">\n <ap-dropdown-item-multiple-one-line\n presentational\n class=\"ap-selection-dropdown__item\"\n [class.ap-selection-dropdown__item--grouped]=\"grouped\"\n [text]=\"row.texts.label\"\n [selected]=\"row.item.selected\"\n [indeterminate]=\"row.item.indeterminate ?? false\"\n [htmlId]=\"row.item.htmlId\"\n [disabled]=\"row.item.disabled || false\"\n [avatarUrl]=\"row.item.avatarUrl\"\n [symbolId]=\"row.item.symbolId\"\n [badgeText]=\"row.texts.badge\"\n [isFeatureLocked]=\"row.item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!row.item.roundedAvatar\"\n [network]=\"row.item.network\"\n [symbolColor]=\"row.item.symbolColor\"\n [symbolTooltipText]=\"row.texts.symbolTooltip\" />\n </button>\n }\n </div>\n } @else {\n <div class=\"ap-selection-dropdown__group\">\n <!-- Group header with checkbox -->\n <div class=\"ap-selection-dropdown__group-header\">\n <div class=\"ap-selection-dropdown__group-label\">\n <ap-checkbox\n class=\"centered\"\n [name]=\"run.label\"\n [checked]=\"groupSelectionStates()[run.label] === 'selected'\"\n [indeterminate]=\"groupSelectionStates()[run.label] === 'partial'\"\n (change)=\"onGroupToggle(run.label, $event)\">\n {{ run.label }}\n </ap-checkbox>\n </div>\n </div>\n\n <div\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [attr.aria-label]=\"run.label\">\n @for (row of run.rows; track row.item.htmlId) {\n @let grouped = true;\n <button\n type=\"button\"\n role=\"option\"\n class=\"ap-selection-dropdown__item-button\"\n [id]=\"optionId(row.item)\"\n [tabindex]=\"optionTabIndex(tabbableOption(row.item))\"\n [apDropdownOption]=\"row.texts.label\"\n [apDropdownOptionDisabled]=\"!!(row.item.disabled || row.item.isFeatureLocked)\"\n [attr.aria-selected]=\"row.item.selected\"\n [class.ap-selection-dropdown__item-button--disabled]=\"row.item.disabled || row.item.isFeatureLocked\"\n [apTooltip]=\"row.texts.disabledTooltip\"\n (click)=\"onItemToggle(row.item)\">\n <ap-dropdown-item-multiple-one-line\n presentational\n class=\"ap-selection-dropdown__item\"\n [class.ap-selection-dropdown__item--grouped]=\"grouped\"\n [text]=\"row.texts.label\"\n [selected]=\"row.item.selected\"\n [indeterminate]=\"row.item.indeterminate ?? false\"\n [htmlId]=\"row.item.htmlId\"\n [disabled]=\"row.item.disabled || false\"\n [avatarUrl]=\"row.item.avatarUrl\"\n [symbolId]=\"row.item.symbolId\"\n [badgeText]=\"row.texts.badge\"\n [isFeatureLocked]=\"row.item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!row.item.roundedAvatar\"\n [network]=\"row.item.network\"\n [symbolColor]=\"row.item.symbolColor\"\n [symbolTooltipText]=\"row.texts.symbolTooltip\" />\n </button>\n }\n </div>\n </div>\n }\n }\n }\n </div>\n\n <div\n class=\"ap-selection-dropdown__status\"\n role=\"status\"\n aria-atomic=\"true\">\n {{ resultsAnnouncement() }}\n </div>\n\n <!-- Footer -->\n @if (texts().footerButton) {\n <div class=\"ap-selection-dropdown__footer\">\n <button\n type=\"button\"\n class=\"ap-link standalone\"\n [id]=\"footerButtonId()\"\n (click)=\"onFooterButtonClick()\">\n <ap-symbol [symbolId]=\"footerButtonSymbolId()\" />\n {{ texts().footerButton }}\n </button>\n </div>\n }\n </div>\n</ap-dropdown-panel>\n", styles: [":host{display:none}.ap-selection-dropdown__content{border-radius:inherit;overflow:hidden;z-index:1000;width:370px;display:flex;flex-direction:column;max-height:min(400px,var(--ap-floating-available-height, 100vh))}.ap-selection-dropdown__content--single{width:auto;min-width:160px}.ap-selection-dropdown__option{display:block;width:100%;padding:0;border:none;background:none;font:inherit;text-align:inherit}.ap-selection-dropdown__item-button{display:block;width:100%;padding:0;margin:0;border:none;background:transparent;text-align:left;cursor:pointer;outline:none}.ap-selection-dropdown__item-button:hover,.ap-selection-dropdown__item-button.ap-dropdown-option--active{background-color:var(--ref-color-electric-blue-10)}.ap-selection-dropdown__item-button:active{background-color:var(--ref-color-electric-blue-20)}.ap-selection-dropdown__item-button:focus{outline:none}.ap-selection-dropdown__item-button:focus-visible{outline:none}.ap-selection-dropdown__item-button.ap-selection-dropdown__item-button--disabled{pointer-events:none}.ap-selection-dropdown__item{display:flex;align-items:center;width:100%;min-height:40px;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);background:transparent;cursor:pointer;font-family:Averta}.ap-selection-dropdown__group-header{display:flex;align-items:center;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);border-top:1px solid var(--ref-color-grey-10);background:var(--ref-color-grey-bg)}.ap-selection-dropdown__group-title{padding:var(--comp-select-group-padding-vertical) var(--ref-spacing-sm);border-top:1px solid var(--comp-select-group-border-top-color);background:var(--comp-select-group-background-color);font-family:var(--comp-select-group-text-font-family);font-size:var(--comp-select-group-text-size);font-weight:var(--comp-select-group-text-font-weight);line-height:var(--comp-select-group-text-line-height);color:var(--comp-select-group-text-color)}.ap-selection-dropdown__group-label{display:flex;align-items:center;flex:1;font-weight:700;color:var(--ref-color-grey-100)}.ap-selection-dropdown__group-label ap-checkbox{--comp-forms-label-font-weight: 700}.ap-selection-dropdown__header{border-bottom:1px solid var(--ref-color-grey-10);flex-shrink:0;display:flex;flex-direction:column}.ap-selection-dropdown__header .ap-selection-dropdown__header-top{display:flex;align-items:center;justify-content:space-between;padding:var(--ref-spacing-xs) var(--ref-spacing-sm)}.ap-selection-dropdown__header .ap-selection-dropdown__title{margin:0;font-size:var(--ref-font-size-md);font-weight:var(--ref-font-weight-bold);color:var(--ref-color-grey-100);flex:1}.ap-selection-dropdown__header ap-input-search{width:100%;padding:0 var(--ref-spacing-xxs) var(--ref-spacing-xxs)}.ap-selection-dropdown__header.ap-selection-dropdown__header--select-all ap-input-search{padding-bottom:0}.ap-selection-dropdown__header .ap-selection-dropdown__select-all{display:flex;align-items:center;height:var(--comp-select-one-line-height);padding:0 var(--ref-spacing-sm)}.ap-selection-dropdown__header .ap-selection-dropdown__select-all ap-checkbox{--comp-forms-label-font-weight: var(--ref-font-weight-bold)}.ap-selection-dropdown__items{padding:var(--ref-spacing-xxs) 0;flex:1;overflow-y:auto;min-height:0}.ap-selection-dropdown__no-results{padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);color:var(--ref-color-grey-80);font-size:var(--ref-font-size-sm);font-style:italic}.ap-selection-dropdown__footer{height:40px;padding:var(--ref-spacing-xs) var(--ref-spacing-sm);border-top:1px solid var(--ref-color-grey-10);flex-shrink:0;display:flex;align-items:center;justify-content:flex-start}.ap-selection-dropdown__selected-section{margin-bottom:var(--ref-spacing-xxs);border-bottom:1px solid var(--ref-color-grey-10);padding-bottom:var(--ref-spacing-xxs)}.ap-selection-dropdown__selected-section ::ng-deep ap-checkbox{--comp-forms-label-font-weight: 700}.ap-selection-dropdown__status{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}\n"] }]
|
|
595
|
+
}], ctorParameters: () => [], propDecorators: { panel: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DropdownPanelComponent), { isSignal: true }] }], options: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => DropdownOptionDirective), { isSignal: true }] }], i18n: [{ type: i0.Input, args: [{ isSignal: true, alias: "i18n", required: false }] }], trigger: [{ type: i0.ContentChild, args: ['trigger', { isSignal: true }] }], headerButtonId: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerButtonId", required: false }] }], footerButtonId: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerButtonId", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], searchEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchEnabled", required: false }] }], footerButtonSymbolId: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerButtonSymbolId", required: false }] }], headerButtonSymbolId: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerButtonSymbolId", required: false }] }], selectAllEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllEnabled", required: false }] }], showBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBackdrop", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], panelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelWidth", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], footerButtonClick: [{ type: i0.Output, args: ["footerButtonClick"] }], headerButtonClick: [{ type: i0.Output, args: ["headerButtonClick"] }], searchInputChange: [{ type: i0.Output, args: ["searchInputChange"] }], searchTerm: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchTerm", required: false }] }, { type: i0.Output, args: ["searchTermChange"] }], inputSearchComponent: [{ type: i0.ViewChild, args: ['inputSearchElement', { isSignal: true }] }] } });
|
|
590
596
|
|
|
591
597
|
/**
|
|
592
598
|
* Generated bundle index. Do not edit.
|