@amro93/ngb-select 0.2.0 → 0.3.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/README.md +200 -0
- package/fesm2022/amro93-ngb-select.mjs +324 -37
- package/fesm2022/amro93-ngb-select.mjs.map +1 -1
- package/package.json +1 -1
- package/types/amro93-ngb-select.d.ts +142 -6
|
@@ -1,17 +1,61 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, ChangeDetectorRef, input, booleanAttribute, model, output, contentChild, viewChild, computed, signal, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, ElementRef, ChangeDetectorRef, input, booleanAttribute, model, output, contentChild, viewChild, computed, signal, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/** English defaults used when neither an input nor `provideNgbSelectConfig` sets a text. */
|
|
8
|
+
const NGB_SELECT_DEFAULT_LABELS = Object.freeze({
|
|
9
|
+
clear: 'Clear',
|
|
10
|
+
clearValue: 'Clear value',
|
|
11
|
+
loading: 'Loading...',
|
|
12
|
+
selectAll: 'Select All',
|
|
13
|
+
done: 'Done',
|
|
14
|
+
close: 'Close',
|
|
15
|
+
expand: 'Expand',
|
|
16
|
+
collapse: 'Collapse',
|
|
17
|
+
removeChip: 'Remove {label}',
|
|
18
|
+
addTag: 'Add “{term}”',
|
|
19
|
+
emptyMessage: 'No results found',
|
|
20
|
+
emptyFilterMessage: 'No results found',
|
|
21
|
+
searchPlaceholder: 'Search...',
|
|
22
|
+
popupTitle: 'Select an Option',
|
|
23
|
+
selectedItems: '{0} items selected',
|
|
24
|
+
});
|
|
25
|
+
const NGB_SELECT_VERSION = '0.3.1';
|
|
8
26
|
|
|
9
|
-
|
|
27
|
+
/** Injection token holding the app-wide `ngb-select` configuration. */
|
|
28
|
+
const NGB_SELECT_CONFIG = new InjectionToken('NGB_SELECT_CONFIG');
|
|
29
|
+
/**
|
|
30
|
+
* Sets app-wide defaults (e.g. Arabic texts) for every `ngb-select` instance.
|
|
31
|
+
*
|
|
32
|
+
* ```ts
|
|
33
|
+
* bootstrapApplication(App, {
|
|
34
|
+
* providers: [provideNgbSelectConfig({ labels: { clear: 'مسح', loading: 'جارٍ التحميل...' } })],
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* Per-instance inputs (`clearLabel`, `loadingLabel`, ...) still win over these defaults.
|
|
39
|
+
*/
|
|
40
|
+
function provideNgbSelectConfig(config) {
|
|
41
|
+
return { provide: NGB_SELECT_CONFIG, useValue: config };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const OPTION_ROW_SELECTOR = '.dropdown-item[role="option"], .dropdown-item[role="treeitem"], .ngb-select-add-tag';
|
|
45
|
+
/** Elements a `<label>` would not re-activate when they are the click target. */
|
|
46
|
+
const INTERACTIVE_SELECTOR = 'input, button, select, textarea, a[href], [contenteditable]';
|
|
47
|
+
let nextUniqueId = 0;
|
|
10
48
|
class NgbSelectComponent {
|
|
11
49
|
static VERSION = NGB_SELECT_VERSION;
|
|
12
50
|
// --- Dependency Injection ---
|
|
13
51
|
elementRef = inject(ElementRef);
|
|
14
52
|
cdr = inject(ChangeDetectorRef);
|
|
53
|
+
config = inject(NGB_SELECT_CONFIG, { optional: true });
|
|
54
|
+
/** Effective default texts: English defaults merged with `provideNgbSelectConfig`. */
|
|
55
|
+
labels = {
|
|
56
|
+
...NGB_SELECT_DEFAULT_LABELS,
|
|
57
|
+
...(this.config?.labels ?? {}),
|
|
58
|
+
};
|
|
15
59
|
// --- Basic & Data Inputs ---
|
|
16
60
|
options = input([], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
17
61
|
optionLabel = input('label', ...(ngDevMode ? [{ debugName: "optionLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -27,7 +71,7 @@ class NgbSelectComponent {
|
|
|
27
71
|
display = input('comma', ...(ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []));
|
|
28
72
|
showSelectAll = input(false, ...(ngDevMode ? [{ debugName: "showSelectAll" }] : /* istanbul ignore next */ []));
|
|
29
73
|
maxSelectedLabels = input(3, ...(ngDevMode ? [{ debugName: "maxSelectedLabels" }] : /* istanbul ignore next */ []));
|
|
30
|
-
selectedItemsLabel = input(
|
|
74
|
+
selectedItemsLabel = input(this.labels.selectedItems, ...(ngDevMode ? [{ debugName: "selectedItemsLabel" }] : /* istanbul ignore next */ []));
|
|
31
75
|
selectionLimit = input(undefined, ...(ngDevMode ? [{ debugName: "selectionLimit" }] : /* istanbul ignore next */ []));
|
|
32
76
|
closeOnSelect = input(false, ...(ngDevMode ? [{ debugName: "closeOnSelect" }] : /* istanbul ignore next */ []));
|
|
33
77
|
// --- Filtering Inputs ---
|
|
@@ -40,8 +84,15 @@ class NgbSelectComponent {
|
|
|
40
84
|
searchPlaceholder = input(undefined, ...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
41
85
|
filterInTrigger = input(false, ...(ngDevMode ? [{ debugName: "filterInTrigger" }] : /* istanbul ignore next */ []));
|
|
42
86
|
resetFilterOnHide = input(false, ...(ngDevMode ? [{ debugName: "resetFilterOnHide" }] : /* istanbul ignore next */ []));
|
|
43
|
-
emptyMessage = input(
|
|
44
|
-
emptyFilterMessage = input(
|
|
87
|
+
emptyMessage = input(this.labels.emptyMessage, ...(ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
|
|
88
|
+
emptyFilterMessage = input(this.labels.emptyFilterMessage, ...(ngDevMode ? [{ debugName: "emptyFilterMessage" }] : /* istanbul ignore next */ []));
|
|
89
|
+
// --- Tagging Inputs ---
|
|
90
|
+
/**
|
|
91
|
+
* Lets the user create options from the filter text. `true` creates a plain option
|
|
92
|
+
* (`{ [optionLabel]: term, [optionValue]: term }`, or the string itself for primitive
|
|
93
|
+
* options); a function receives the term and returns the new option (or a Promise).
|
|
94
|
+
*/
|
|
95
|
+
addTag = input(false, ...(ngDevMode ? [{ debugName: "addTag" }] : /* istanbul ignore next */ []));
|
|
45
96
|
// --- State & Form Inputs ---
|
|
46
97
|
disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
47
98
|
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
@@ -53,6 +104,11 @@ class NgbSelectComponent {
|
|
|
53
104
|
autofocus = input(false, ...(ngDevMode ? [{ debugName: "autofocus" }] : /* istanbul ignore next */ []));
|
|
54
105
|
tabindex = input(0, ...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
55
106
|
id = input(undefined, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
107
|
+
/**
|
|
108
|
+
* Id placed on the focusable trigger (the `role="combobox"` element) so that
|
|
109
|
+
* `<label for="...">` focuses and names it. Falls back to `id`.
|
|
110
|
+
*/
|
|
111
|
+
inputId = input(undefined, ...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
|
|
56
112
|
ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
57
113
|
ariaLabelledBy = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
58
114
|
dir = input(undefined, ...(ngDevMode ? [{ debugName: "dir" }] : /* istanbul ignore next */ []));
|
|
@@ -83,6 +139,17 @@ class NgbSelectComponent {
|
|
|
83
139
|
focusOnOpen = input(undefined, ...(ngDevMode ? [{ debugName: "focusOnOpen" }] : /* istanbul ignore next */ []));
|
|
84
140
|
focusOnOpenStrategy = input('always', ...(ngDevMode ? [{ debugName: "focusOnOpenStrategy" }] : /* istanbul ignore next */ []));
|
|
85
141
|
lazy = input(false, ...(ngDevMode ? [{ debugName: "lazy" }] : /* istanbul ignore next */ []));
|
|
142
|
+
// --- i18n Label Inputs (defaults come from provideNgbSelectConfig, then English) ---
|
|
143
|
+
clearLabel = input(this.labels.clear, { ...(ngDevMode ? { debugName: "clearLabel" } : /* istanbul ignore next */ {}), transform: (v) => v ?? this.labels.clear });
|
|
144
|
+
clearValueLabel = input(this.labels.clearValue, { ...(ngDevMode ? { debugName: "clearValueLabel" } : /* istanbul ignore next */ {}), transform: (v) => v ?? this.labels.clearValue });
|
|
145
|
+
loadingLabel = input(this.labels.loading, { ...(ngDevMode ? { debugName: "loadingLabel" } : /* istanbul ignore next */ {}), transform: (v) => v ?? this.labels.loading });
|
|
146
|
+
selectAllLabel = input(this.labels.selectAll, { ...(ngDevMode ? { debugName: "selectAllLabel" } : /* istanbul ignore next */ {}), transform: (v) => v ?? this.labels.selectAll });
|
|
147
|
+
doneLabel = input(this.labels.done, { ...(ngDevMode ? { debugName: "doneLabel" } : /* istanbul ignore next */ {}), transform: (v) => v ?? this.labels.done });
|
|
148
|
+
closeLabel = input(this.labels.close, { ...(ngDevMode ? { debugName: "closeLabel" } : /* istanbul ignore next */ {}), transform: (v) => v ?? this.labels.close });
|
|
149
|
+
expandLabel = input(this.labels.expand, { ...(ngDevMode ? { debugName: "expandLabel" } : /* istanbul ignore next */ {}), transform: (v) => v ?? this.labels.expand });
|
|
150
|
+
collapseLabel = input(this.labels.collapse, { ...(ngDevMode ? { debugName: "collapseLabel" } : /* istanbul ignore next */ {}), transform: (v) => v ?? this.labels.collapse });
|
|
151
|
+
removeChipLabel = input(this.labels.removeChip, { ...(ngDevMode ? { debugName: "removeChipLabel" } : /* istanbul ignore next */ {}), transform: (v) => v ?? this.labels.removeChip });
|
|
152
|
+
addTagLabel = input(this.labels.addTag, { ...(ngDevMode ? { debugName: "addTagLabel" } : /* istanbul ignore next */ {}), transform: (v) => v ?? this.labels.addTag });
|
|
86
153
|
// --- Tree Mode Inputs ---
|
|
87
154
|
tree = input(false, { ...(ngDevMode ? { debugName: "tree" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
88
155
|
optionChildren = input('children', ...(ngDevMode ? [{ debugName: "optionChildren" }] : /* istanbul ignore next */ []));
|
|
@@ -104,6 +171,8 @@ class NgbSelectComponent {
|
|
|
104
171
|
onLazyLoad = output();
|
|
105
172
|
onNodeExpand = output();
|
|
106
173
|
onNodeCollapse = output();
|
|
174
|
+
/** Emitted when a tag is created from the filter text (see `addTag`). */
|
|
175
|
+
onAdd = output();
|
|
107
176
|
// --- Custom Content Templates ---
|
|
108
177
|
itemTemplate = contentChild('item', ...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
109
178
|
selectedItemTemplate = contentChild('selectedItem', ...(ngDevMode ? [{ debugName: "selectedItemTemplate" }] : /* istanbul ignore next */ []));
|
|
@@ -123,8 +192,32 @@ class NgbSelectComponent {
|
|
|
123
192
|
editableInputElement = viewChild('editableInput', ...(ngDevMode ? [{ debugName: "editableInputElement" }] : /* istanbul ignore next */ []));
|
|
124
193
|
dropdownMenuElement = viewChild('dropdownMenu', ...(ngDevMode ? [{ debugName: "dropdownMenuElement" }] : /* istanbul ignore next */ []));
|
|
125
194
|
// --- Computed UI & Accessibility State ---
|
|
195
|
+
uniqueId = `ngb-select-${nextUniqueId++}`;
|
|
196
|
+
/** Id rendered on the focusable trigger (`inputId`, falling back to `id`). */
|
|
197
|
+
triggerId = computed(() => this.inputId() || this.id() || null, ...(ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []));
|
|
198
|
+
/** The host keeps `id` only when `inputId` takes the trigger; otherwise it is removed. */
|
|
199
|
+
hostIdAttr = computed(() => (this.inputId() ? this.id() || null : null), ...(ngDevMode ? [{ debugName: "hostIdAttr" }] : /* istanbul ignore next */ []));
|
|
200
|
+
/** Id of an associated `<label>` (for="triggerId" or a wrapping label), when found. */
|
|
201
|
+
associatedLabelId = signal(null, ...(ngDevMode ? [{ debugName: "associatedLabelId" }] : /* istanbul ignore next */ []));
|
|
202
|
+
/**
|
|
203
|
+
* `aria-labelledby` of the trigger: the `ariaLabelledBy` input wins; an explicit
|
|
204
|
+
* `ariaLabel` suppresses the automatic label association; otherwise the label's id.
|
|
205
|
+
*/
|
|
206
|
+
effectiveAriaLabelledBy = computed(() => {
|
|
207
|
+
const explicit = this.ariaLabelledBy();
|
|
208
|
+
if (explicit)
|
|
209
|
+
return explicit;
|
|
210
|
+
if (this.ariaLabel())
|
|
211
|
+
return null;
|
|
212
|
+
return this.associatedLabelId();
|
|
213
|
+
}, ...(ngDevMode ? [{ debugName: "effectiveAriaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
214
|
+
/** Id of the listbox/tree panel, referenced by the trigger's `aria-controls`. */
|
|
215
|
+
panelId = computed(() => `${this.triggerId() || this.uniqueId}-panel`, ...(ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []));
|
|
126
216
|
effectiveSearchPlaceholder = computed(() => {
|
|
127
|
-
return (this.searchPlaceholder() ||
|
|
217
|
+
return (this.searchPlaceholder() ||
|
|
218
|
+
this.filterPlaceholder() ||
|
|
219
|
+
this.placeholder() ||
|
|
220
|
+
this.labels.searchPlaceholder);
|
|
128
221
|
}, ...(ngDevMode ? [{ debugName: "effectiveSearchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
129
222
|
effectiveDropdownPosition = computed(() => {
|
|
130
223
|
return this.dropdownDirection() || this.direction() || this.dropdownPosition() || 'auto';
|
|
@@ -133,7 +226,7 @@ class NgbSelectComponent {
|
|
|
133
226
|
isDropup = computed(() => this.currentPlacement() === 'top', ...(ngDevMode ? [{ debugName: "isDropup" }] : /* istanbul ignore next */ []));
|
|
134
227
|
isModalMode = computed(() => this.modal() || this.popup() || this.touchUI(), ...(ngDevMode ? [{ debugName: "isModalMode" }] : /* istanbul ignore next */ []));
|
|
135
228
|
effectivePopupTitle = computed(() => {
|
|
136
|
-
return this.popupTitle() || this.modalTitle() || this.placeholder() ||
|
|
229
|
+
return this.popupTitle() || this.modalTitle() || this.placeholder() || this.labels.popupTitle;
|
|
137
230
|
}, ...(ngDevMode ? [{ debugName: "effectivePopupTitle" }] : /* istanbul ignore next */ []));
|
|
138
231
|
effectiveFilterValue = computed(() => {
|
|
139
232
|
return this.overlayVisible()
|
|
@@ -149,7 +242,12 @@ class NgbSelectComponent {
|
|
|
149
242
|
// --- Reactive Option Filtering & Transformation ---
|
|
150
243
|
safeOptions = computed(() => {
|
|
151
244
|
const opts = this.options();
|
|
152
|
-
|
|
245
|
+
const base = Array.isArray(opts) ? opts : [];
|
|
246
|
+
const tagged = this.taggedOptions();
|
|
247
|
+
if (!tagged.length || this.group() || this.tree())
|
|
248
|
+
return base;
|
|
249
|
+
const extra = tagged.filter((t) => !base.some((o) => this.areValuesEqual(this.resolveOptionValue(o), this.resolveOptionValue(t))));
|
|
250
|
+
return extra.length ? [...base, ...extra] : base;
|
|
153
251
|
}, ...(ngDevMode ? [{ debugName: "safeOptions" }] : /* istanbul ignore next */ []));
|
|
154
252
|
filterFields = computed(() => {
|
|
155
253
|
const filterBy = this.filterBy();
|
|
@@ -406,11 +504,34 @@ class NgbSelectComponent {
|
|
|
406
504
|
return undefined;
|
|
407
505
|
return flat[idx];
|
|
408
506
|
}, ...(ngDevMode ? [{ debugName: "focusedOption" }] : /* istanbul ignore next */ []));
|
|
507
|
+
// --- Tagging ---
|
|
508
|
+
/** Options created through `addTag`; kept so their labels resolve and they stay listed. */
|
|
509
|
+
taggedOptions = signal([], ...(ngDevMode ? [{ debugName: "taggedOptions" }] : /* istanbul ignore next */ []));
|
|
510
|
+
/** The trimmed filter text when the "Add {term}" row should be shown, otherwise null. */
|
|
511
|
+
addTagTerm = computed(() => {
|
|
512
|
+
if (!this.addTag() || this.tree() || this.group())
|
|
513
|
+
return null;
|
|
514
|
+
const term = this.filterValue().trim();
|
|
515
|
+
if (!term)
|
|
516
|
+
return null;
|
|
517
|
+
const needle = this.normalizeForMatch(term);
|
|
518
|
+
const exists = this.flatOptions().some((opt) => this.normalizeForMatch(this.resolveOptionLabel(opt)) === needle);
|
|
519
|
+
return exists ? null : term;
|
|
520
|
+
}, ...(ngDevMode ? [{ debugName: "addTagTerm" }] : /* istanbul ignore next */ []));
|
|
521
|
+
/** Text of the tagging row, with `{term}` / `{0}` replaced. */
|
|
522
|
+
addTagText = computed(() => {
|
|
523
|
+
const term = this.addTagTerm() ?? '';
|
|
524
|
+
return this.addTagLabel().replace(/\{term\}|\{0\}/g, term);
|
|
525
|
+
}, ...(ngDevMode ? [{ debugName: "addTagText" }] : /* istanbul ignore next */ []));
|
|
526
|
+
/** Index of the tagging row in keyboard navigation (it follows the options), or -1. */
|
|
527
|
+
addTagIndex = computed(() => this.addTagTerm() !== null ? this.flatFilteredOptions().length : -1, ...(ngDevMode ? [{ debugName: "addTagIndex" }] : /* istanbul ignore next */ []));
|
|
528
|
+
isAddTagFocused = computed(() => this.addTagIndex() !== -1 && this.focusedIndex() === this.addTagIndex(), ...(ngDevMode ? [{ debugName: "isAddTagFocused" }] : /* istanbul ignore next */ []));
|
|
409
529
|
// --- ControlValueAccessor Callbacks ---
|
|
410
530
|
onModelChange = () => { };
|
|
411
531
|
onModelTouched = () => { };
|
|
412
532
|
unlistenWindow;
|
|
413
533
|
unlistenDocumentClick;
|
|
534
|
+
unlistenLabelClick;
|
|
414
535
|
ngOnInit() {
|
|
415
536
|
const handleWindowReposition = () => {
|
|
416
537
|
if (this.overlayVisible()) {
|
|
@@ -428,8 +549,10 @@ class NgbSelectComponent {
|
|
|
428
549
|
window.removeEventListener('scroll', handleWindowReposition, { capture: true });
|
|
429
550
|
};
|
|
430
551
|
}
|
|
552
|
+
this.bindLabelClickListener();
|
|
431
553
|
}
|
|
432
554
|
ngAfterViewInit() {
|
|
555
|
+
this.resolveAssociatedLabel();
|
|
433
556
|
if (this.autofocus()) {
|
|
434
557
|
this.focus();
|
|
435
558
|
}
|
|
@@ -439,8 +562,81 @@ class NgbSelectComponent {
|
|
|
439
562
|
this.unlistenWindow();
|
|
440
563
|
}
|
|
441
564
|
this.unbindDocumentClickListener();
|
|
565
|
+
this.unlistenLabelClick?.();
|
|
442
566
|
this.cleanAppendTo();
|
|
443
567
|
}
|
|
568
|
+
/** Finds the `<label>` naming this select: `label[for=triggerId]`, else a wrapping label. */
|
|
569
|
+
findAssociatedLabel() {
|
|
570
|
+
const host = this.elementRef?.nativeElement;
|
|
571
|
+
if (!host || typeof document === 'undefined')
|
|
572
|
+
return null;
|
|
573
|
+
const id = this.triggerId();
|
|
574
|
+
if (id) {
|
|
575
|
+
const root = host.getRootNode?.();
|
|
576
|
+
const scopes = [document];
|
|
577
|
+
if (root && root !== document && 'querySelectorAll' in root)
|
|
578
|
+
scopes.unshift(root);
|
|
579
|
+
for (const scope of scopes) {
|
|
580
|
+
const labels = Array.from(scope.querySelectorAll('label'));
|
|
581
|
+
const match = labels.find((l) => l.htmlFor === id);
|
|
582
|
+
if (match)
|
|
583
|
+
return match;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
return host.closest?.('label') ?? null;
|
|
587
|
+
}
|
|
588
|
+
/** Points `aria-labelledby` at the associated label, giving it an id when it has none. */
|
|
589
|
+
resolveAssociatedLabel() {
|
|
590
|
+
const label = this.findAssociatedLabel();
|
|
591
|
+
if (!label) {
|
|
592
|
+
this.associatedLabelId.set(null);
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
595
|
+
if (!label.id) {
|
|
596
|
+
label.id = `${this.triggerId() || this.uniqueId}-label`;
|
|
597
|
+
}
|
|
598
|
+
this.associatedLabelId.set(label.id);
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* The trigger is a `div[role=combobox]`, which a native `<label>` cannot focus. Clicking
|
|
602
|
+
* `label[for=triggerId]` (or a label wrapping the select) focuses the trigger instead, and
|
|
603
|
+
* the label's default activation is cancelled so it never "clicks" an option or checkbox.
|
|
604
|
+
*/
|
|
605
|
+
bindLabelClickListener() {
|
|
606
|
+
if (typeof document === 'undefined')
|
|
607
|
+
return;
|
|
608
|
+
const handler = (event) => {
|
|
609
|
+
const target = event.target;
|
|
610
|
+
if (!target || typeof target.closest !== 'function')
|
|
611
|
+
return;
|
|
612
|
+
const label = target.closest('label');
|
|
613
|
+
if (!label)
|
|
614
|
+
return;
|
|
615
|
+
const host = this.elementRef.nativeElement;
|
|
616
|
+
const id = this.triggerId();
|
|
617
|
+
const forThis = !!id && label.htmlFor === id;
|
|
618
|
+
const wrapsThis = !label.htmlFor && label.contains(host);
|
|
619
|
+
if (!forThis && !wrapsThis)
|
|
620
|
+
return;
|
|
621
|
+
const interactive = target.closest(INTERACTIVE_SELECTOR);
|
|
622
|
+
if (host.contains(target)) {
|
|
623
|
+
// Inside the component: only stop the label from re-dispatching the click.
|
|
624
|
+
if (!interactive)
|
|
625
|
+
event.preventDefault();
|
|
626
|
+
return;
|
|
627
|
+
}
|
|
628
|
+
// A control nested in the label handles its own click.
|
|
629
|
+
if (interactive && label.contains(interactive))
|
|
630
|
+
return;
|
|
631
|
+
event.preventDefault();
|
|
632
|
+
if (this.disabled())
|
|
633
|
+
return;
|
|
634
|
+
this.resolveAssociatedLabel();
|
|
635
|
+
this.focus();
|
|
636
|
+
};
|
|
637
|
+
document.addEventListener('click', handler);
|
|
638
|
+
this.unlistenLabelClick = () => document.removeEventListener('click', handler);
|
|
639
|
+
}
|
|
444
640
|
writeValue(obj) {
|
|
445
641
|
if (this.multiple()) {
|
|
446
642
|
this.value.set(Array.isArray(obj) ? [...obj] : []);
|
|
@@ -691,12 +887,14 @@ class NgbSelectComponent {
|
|
|
691
887
|
this.bindDocumentClickListener();
|
|
692
888
|
if (this.tree()) {
|
|
693
889
|
this.expandToSelection();
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
890
|
+
}
|
|
891
|
+
// The panel content is only rendered while the overlay is visible; render it now so
|
|
892
|
+
// the filter input and option rows exist before focusing / scrolling into view.
|
|
893
|
+
try {
|
|
894
|
+
this.cdr.detectChanges();
|
|
895
|
+
}
|
|
896
|
+
catch {
|
|
897
|
+
// ignore: view may not be ready
|
|
700
898
|
}
|
|
701
899
|
const triggerFilterInputEl = this.triggerFilterInputElement();
|
|
702
900
|
const filterInputEl = this.filterInputElement();
|
|
@@ -728,8 +926,7 @@ class NgbSelectComponent {
|
|
|
728
926
|
const clickHandler = (event) => {
|
|
729
927
|
const dropdownMenuEl = this.dropdownMenuElement();
|
|
730
928
|
if (!this.elementRef.nativeElement.contains(event.target) &&
|
|
731
|
-
(!dropdownMenuEl ||
|
|
732
|
-
!dropdownMenuEl.nativeElement.contains(event.target))) {
|
|
929
|
+
(!dropdownMenuEl || !dropdownMenuEl.nativeElement.contains(event.target))) {
|
|
733
930
|
this.closeOverlay(event);
|
|
734
931
|
}
|
|
735
932
|
};
|
|
@@ -761,6 +958,9 @@ class NgbSelectComponent {
|
|
|
761
958
|
else if (this.autoOptionFocus()) {
|
|
762
959
|
targetIndex = selectedIdx !== -1 ? selectedIdx : 0;
|
|
763
960
|
}
|
|
961
|
+
if (flatItems.length === 0) {
|
|
962
|
+
targetIndex = this.addTagIndex();
|
|
963
|
+
}
|
|
764
964
|
const dropdownMenuEl = this.dropdownMenuElement();
|
|
765
965
|
if (targetIndex !== -1 && dropdownMenuEl) {
|
|
766
966
|
this.focusedIndex.set(targetIndex);
|
|
@@ -805,6 +1005,10 @@ class NgbSelectComponent {
|
|
|
805
1005
|
this.closeOverlay(event);
|
|
806
1006
|
}
|
|
807
1007
|
}
|
|
1008
|
+
/** Accessible name of a chip's remove icon (`removeChipLabel` with `{label}` replaced). */
|
|
1009
|
+
removeChipText(val) {
|
|
1010
|
+
return this.removeChipLabel().replace(/\{label\}/g, this.resolveOptionLabelByValue(val));
|
|
1011
|
+
}
|
|
808
1012
|
removeChip(val, event) {
|
|
809
1013
|
event.stopPropagation();
|
|
810
1014
|
if (this.disabled() || this.readonly())
|
|
@@ -865,6 +1069,12 @@ class NgbSelectComponent {
|
|
|
865
1069
|
if (this.tree()) {
|
|
866
1070
|
this.focusedIndex.set(-1);
|
|
867
1071
|
}
|
|
1072
|
+
else if (this.addTag()) {
|
|
1073
|
+
// Keep the active row valid: first enabled option, else the "Add" row.
|
|
1074
|
+
const flat = this.flatFilteredOptions();
|
|
1075
|
+
const first = flat.findIndex((opt) => !this.isOptionDisabled(opt));
|
|
1076
|
+
this.focusedIndex.set(first !== -1 ? first : this.addTagIndex());
|
|
1077
|
+
}
|
|
868
1078
|
this.onFilter.emit({
|
|
869
1079
|
originalEvent: event,
|
|
870
1080
|
filter: this.filterValue(),
|
|
@@ -908,6 +1118,55 @@ class NgbSelectComponent {
|
|
|
908
1118
|
.replace(/[يى]/g, 'ي') // Normalize Yaa & Alef Maksura
|
|
909
1119
|
.replace(/[ة]/g, 'ه'); // Normalize Taa Marbuta
|
|
910
1120
|
}
|
|
1121
|
+
/** Lower-cases (locale-aware) and optionally Arabic-normalizes a string for comparisons. */
|
|
1122
|
+
normalizeForMatch(text) {
|
|
1123
|
+
const locale = this.filterLocale();
|
|
1124
|
+
let out = locale ? text.toLocaleLowerCase(locale) : text.toLowerCase();
|
|
1125
|
+
if (this.filterNormalizeArabic())
|
|
1126
|
+
out = this.normalizeArabicText(out);
|
|
1127
|
+
return out.trim();
|
|
1128
|
+
}
|
|
1129
|
+
/**
|
|
1130
|
+
* Creates an option from the current filter text (see `addTag`), adds it to the selection
|
|
1131
|
+
* and emits `onAdd`. Does nothing when there is no tagging row to activate.
|
|
1132
|
+
*/
|
|
1133
|
+
async addTagFromFilter(event = null) {
|
|
1134
|
+
const term = this.addTagTerm();
|
|
1135
|
+
const addTag = this.addTag();
|
|
1136
|
+
if (term === null || !addTag || this.disabled() || this.readonly())
|
|
1137
|
+
return;
|
|
1138
|
+
let item;
|
|
1139
|
+
if (typeof addTag === 'function') {
|
|
1140
|
+
item = await addTag(term);
|
|
1141
|
+
if (item === null || item === undefined)
|
|
1142
|
+
return;
|
|
1143
|
+
}
|
|
1144
|
+
else {
|
|
1145
|
+
const sample = this.flatOptions().find((o) => o !== null && o !== undefined);
|
|
1146
|
+
const primitive = sample !== undefined ? typeof sample !== 'object' : false;
|
|
1147
|
+
item = primitive
|
|
1148
|
+
? term
|
|
1149
|
+
: { [this.optionLabel() || 'label']: term, [this.optionValue() || 'value']: term };
|
|
1150
|
+
}
|
|
1151
|
+
this.taggedOptions.update((list) => [...list, item]);
|
|
1152
|
+
const wasMultiple = this.multiple();
|
|
1153
|
+
const before = wasMultiple && Array.isArray(this.value()) ? this.value().length : -1;
|
|
1154
|
+
this.onOptionClick(item, event ?? new Event('add'));
|
|
1155
|
+
if (wasMultiple && Array.isArray(this.value()) && this.value().length === before) {
|
|
1156
|
+
// Blocked (e.g. selectionLimit): forget the item again.
|
|
1157
|
+
this.taggedOptions.update((list) => list.filter((t) => t !== item));
|
|
1158
|
+
return;
|
|
1159
|
+
}
|
|
1160
|
+
this.filterValue.set('');
|
|
1161
|
+
const triggerFilterInputEl = this.triggerFilterInputElement();
|
|
1162
|
+
if (triggerFilterInputEl)
|
|
1163
|
+
triggerFilterInputEl.nativeElement.value = '';
|
|
1164
|
+
const filterInputEl = this.filterInputElement();
|
|
1165
|
+
if (filterInputEl)
|
|
1166
|
+
filterInputEl.nativeElement.value = '';
|
|
1167
|
+
this.onAdd.emit({ item, term });
|
|
1168
|
+
this.cdr.markForCheck();
|
|
1169
|
+
}
|
|
911
1170
|
compareStrings(val, query, mode, locale, normalizeArabic = true) {
|
|
912
1171
|
let v = locale ? val.toLocaleLowerCase(locale) : val.toLowerCase();
|
|
913
1172
|
let q = locale ? query.toLocaleLowerCase(locale) : query.toLowerCase();
|
|
@@ -969,7 +1228,10 @@ class NgbSelectComponent {
|
|
|
969
1228
|
else {
|
|
970
1229
|
const flatItems = this.flatFilteredOptions();
|
|
971
1230
|
const focusedIdx = this.focusedIndex();
|
|
972
|
-
if (
|
|
1231
|
+
if (this.isAddTagFocused()) {
|
|
1232
|
+
void this.addTagFromFilter(event);
|
|
1233
|
+
}
|
|
1234
|
+
else if (focusedIdx >= 0 && focusedIdx < flatItems.length) {
|
|
973
1235
|
if (this.tree()) {
|
|
974
1236
|
const entry = this.visibleTreeNodes()[focusedIdx];
|
|
975
1237
|
if (entry)
|
|
@@ -1009,23 +1271,27 @@ class NgbSelectComponent {
|
|
|
1009
1271
|
event.key === 'Enter' ||
|
|
1010
1272
|
event.key === 'Escape') {
|
|
1011
1273
|
this.onKeydown(event);
|
|
1274
|
+
// Handled here: do not let the container's (keydown) handle the same key again.
|
|
1275
|
+
event.stopPropagation();
|
|
1012
1276
|
}
|
|
1013
1277
|
}
|
|
1014
1278
|
navigateOption(step) {
|
|
1015
1279
|
const flatItems = this.flatFilteredOptions();
|
|
1016
|
-
|
|
1280
|
+
// The "Add {term}" row (if any) is the last navigable row.
|
|
1281
|
+
const count = flatItems.length + (this.addTagIndex() !== -1 ? 1 : 0);
|
|
1282
|
+
if (count === 0)
|
|
1017
1283
|
return;
|
|
1018
1284
|
let nextIdx = this.focusedIndex() + step;
|
|
1019
1285
|
if (nextIdx < 0)
|
|
1020
1286
|
nextIdx = 0;
|
|
1021
|
-
if (nextIdx >=
|
|
1022
|
-
nextIdx =
|
|
1287
|
+
if (nextIdx >= count)
|
|
1288
|
+
nextIdx = count - 1;
|
|
1023
1289
|
while (nextIdx >= 0 &&
|
|
1024
1290
|
nextIdx < flatItems.length &&
|
|
1025
1291
|
this.isOptionDisabled(flatItems[nextIdx])) {
|
|
1026
1292
|
nextIdx += step;
|
|
1027
1293
|
}
|
|
1028
|
-
if (nextIdx >= 0 && nextIdx <
|
|
1294
|
+
if (nextIdx >= 0 && nextIdx < count) {
|
|
1029
1295
|
this.focusedIndex.set(nextIdx);
|
|
1030
1296
|
const dropdownMenuEl = this.dropdownMenuElement();
|
|
1031
1297
|
if (dropdownMenuEl) {
|
|
@@ -1078,20 +1344,38 @@ class NgbSelectComponent {
|
|
|
1078
1344
|
this.calculateDropdownPosition();
|
|
1079
1345
|
const triggerRect = this.elementRef.nativeElement.getBoundingClientRect();
|
|
1080
1346
|
const dropdown = dropdownMenuEl.nativeElement;
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1347
|
+
const rtl = this.isRtl();
|
|
1348
|
+
// Inline !important so design-system rules such as
|
|
1349
|
+
// `[dir=rtl] .dropdown-menu { inset-inline-start: 0 !important }` cannot pin the panel.
|
|
1350
|
+
const set = (prop, value) => dropdown.style.setProperty(prop, value, 'important');
|
|
1351
|
+
// The panel leaves its RTL ancestors when appended elsewhere: keep its direction.
|
|
1352
|
+
dropdown.setAttribute('dir', rtl ? 'rtl' : 'ltr');
|
|
1353
|
+
set('position', 'fixed');
|
|
1354
|
+
set('transform', 'none');
|
|
1355
|
+
set('margin', '0');
|
|
1356
|
+
// Align to the trigger's inline-start edge: its left edge in LTR, its right edge in RTL.
|
|
1357
|
+
if (rtl) {
|
|
1358
|
+
const viewportWidth = document.documentElement?.clientWidth || window.innerWidth;
|
|
1359
|
+
set('right', `${viewportWidth - triggerRect.right}px`);
|
|
1360
|
+
set('left', 'auto');
|
|
1361
|
+
}
|
|
1362
|
+
else {
|
|
1363
|
+
set('left', `${triggerRect.left}px`);
|
|
1364
|
+
set('right', 'auto');
|
|
1365
|
+
}
|
|
1366
|
+
// At least the trigger's width, growing to the widest option (capped like the in-place panel, see the stylesheet).
|
|
1367
|
+
dropdown.style.width = 'max-content';
|
|
1084
1368
|
dropdown.style.minWidth = `${triggerRect.width}px`;
|
|
1085
|
-
dropdown.style.maxWidth =
|
|
1369
|
+
dropdown.style.maxWidth = `min(max(${triggerRect.width}px, var(--ngb-select-panel-max-width, 20rem)), calc(100vw - 1rem))`;
|
|
1086
1370
|
dropdown.style.boxSizing = 'border-box';
|
|
1087
1371
|
dropdown.style.zIndex = '1060';
|
|
1088
1372
|
if (this.isDropup()) {
|
|
1089
|
-
|
|
1090
|
-
|
|
1373
|
+
set('top', 'auto');
|
|
1374
|
+
set('bottom', `${window.innerHeight - triggerRect.top + 2}px`);
|
|
1091
1375
|
}
|
|
1092
1376
|
else {
|
|
1093
|
-
|
|
1094
|
-
|
|
1377
|
+
set('top', `${triggerRect.bottom + 2}px`);
|
|
1378
|
+
set('bottom', 'auto');
|
|
1095
1379
|
}
|
|
1096
1380
|
}
|
|
1097
1381
|
cleanAppendTo() {
|
|
@@ -1119,7 +1403,7 @@ class NgbSelectComponent {
|
|
|
1119
1403
|
editableInputEl.nativeElement.focus();
|
|
1120
1404
|
}
|
|
1121
1405
|
else {
|
|
1122
|
-
const trigger = this.elementRef.nativeElement.querySelector('.
|
|
1406
|
+
const trigger = this.elementRef.nativeElement.querySelector('.ngb-select-trigger');
|
|
1123
1407
|
if (trigger)
|
|
1124
1408
|
trigger.focus();
|
|
1125
1409
|
}
|
|
@@ -1336,28 +1620,31 @@ class NgbSelectComponent {
|
|
|
1336
1620
|
}
|
|
1337
1621
|
}
|
|
1338
1622
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: NgbSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1339
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: NgbSelectComponent, isStandalone: true, selector: "ngb-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, showSelectAll: { classPropertyName: "showSelectAll", publicName: "showSelectAll", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedLabels: { classPropertyName: "maxSelectedLabels", publicName: "maxSelectedLabels", isSignal: true, isRequired: false, transformFunction: null }, selectedItemsLabel: { classPropertyName: "selectedItemsLabel", publicName: "selectedItemsLabel", isSignal: true, isRequired: false, transformFunction: null }, selectionLimit: { classPropertyName: "selectionLimit", publicName: "selectionLimit", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, filterMatchMode: { classPropertyName: "filterMatchMode", publicName: "filterMatchMode", isSignal: true, isRequired: false, transformFunction: null }, filterLocale: { classPropertyName: "filterLocale", publicName: "filterLocale", isSignal: true, isRequired: false, transformFunction: null }, filterNormalizeArabic: { classPropertyName: "filterNormalizeArabic", publicName: "filterNormalizeArabic", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filterInTrigger: { classPropertyName: "filterInTrigger", publicName: "filterInTrigger", isSignal: true, isRequired: false, transformFunction: null }, resetFilterOnHide: { classPropertyName: "resetFilterOnHide", publicName: "resetFilterOnHide", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, floatLabelVariant: { classPropertyName: "floatLabelVariant", publicName: "floatLabelVariant", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, dropdownPosition: { classPropertyName: "dropdownPosition", publicName: "dropdownPosition", isSignal: true, isRequired: false, transformFunction: null }, dropdownDirection: { classPropertyName: "dropdownDirection", publicName: "dropdownDirection", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, panelStyle: { classPropertyName: "panelStyle", publicName: "panelStyle", isSignal: true, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, popup: { classPropertyName: "popup", publicName: "popup", isSignal: true, isRequired: false, transformFunction: null }, touchUI: { classPropertyName: "touchUI", publicName: "touchUI", isSignal: true, isRequired: false, transformFunction: null }, popupTitle: { classPropertyName: "popupTitle", publicName: "popupTitle", isSignal: true, isRequired: false, transformFunction: null }, modalTitle: { classPropertyName: "modalTitle", publicName: "modalTitle", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: true, isRequired: false, transformFunction: null }, focusOnOpen: { classPropertyName: "focusOnOpen", publicName: "focusOnOpen", isSignal: true, isRequired: false, transformFunction: null }, focusOnOpenStrategy: { classPropertyName: "focusOnOpenStrategy", publicName: "focusOnOpenStrategy", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, tree: { classPropertyName: "tree", publicName: "tree", isSignal: true, isRequired: false, transformFunction: null }, optionChildren: { classPropertyName: "optionChildren", publicName: "optionChildren", isSignal: true, isRequired: false, transformFunction: null }, treeSelectable: { classPropertyName: "treeSelectable", publicName: "treeSelectable", isSignal: true, isRequired: false, transformFunction: null }, treeExpandAll: { classPropertyName: "treeExpandAll", publicName: "treeExpandAll", isSignal: true, isRequired: false, transformFunction: null }, treeShowPath: { classPropertyName: "treeShowPath", publicName: "treeShowPath", isSignal: true, isRequired: false, transformFunction: null }, overlayVisible: { classPropertyName: "overlayVisible", publicName: "overlayVisible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", overlayVisible: "overlayVisibleChange", onChange: "onChange", onFilter: "onFilter", onFocus: "onFocus", onBlur: "onBlur", onShow: "onShow", onHide: "onHide", onClear: "onClear", onSelectAllChange: "onSelectAllChange", onRemoveChip: "onRemoveChip", onLazyLoad: "onLazyLoad", onNodeExpand: "onNodeExpand", onNodeCollapse: "onNodeCollapse" }, providers: [
|
|
1623
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: NgbSelectComponent, isStandalone: true, selector: "ngb-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, showSelectAll: { classPropertyName: "showSelectAll", publicName: "showSelectAll", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedLabels: { classPropertyName: "maxSelectedLabels", publicName: "maxSelectedLabels", isSignal: true, isRequired: false, transformFunction: null }, selectedItemsLabel: { classPropertyName: "selectedItemsLabel", publicName: "selectedItemsLabel", isSignal: true, isRequired: false, transformFunction: null }, selectionLimit: { classPropertyName: "selectionLimit", publicName: "selectionLimit", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, filterMatchMode: { classPropertyName: "filterMatchMode", publicName: "filterMatchMode", isSignal: true, isRequired: false, transformFunction: null }, filterLocale: { classPropertyName: "filterLocale", publicName: "filterLocale", isSignal: true, isRequired: false, transformFunction: null }, filterNormalizeArabic: { classPropertyName: "filterNormalizeArabic", publicName: "filterNormalizeArabic", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filterInTrigger: { classPropertyName: "filterInTrigger", publicName: "filterInTrigger", isSignal: true, isRequired: false, transformFunction: null }, resetFilterOnHide: { classPropertyName: "resetFilterOnHide", publicName: "resetFilterOnHide", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: true, isRequired: false, transformFunction: null }, addTag: { classPropertyName: "addTag", publicName: "addTag", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, floatLabelVariant: { classPropertyName: "floatLabelVariant", publicName: "floatLabelVariant", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, dropdownPosition: { classPropertyName: "dropdownPosition", publicName: "dropdownPosition", isSignal: true, isRequired: false, transformFunction: null }, dropdownDirection: { classPropertyName: "dropdownDirection", publicName: "dropdownDirection", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, panelStyle: { classPropertyName: "panelStyle", publicName: "panelStyle", isSignal: true, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, popup: { classPropertyName: "popup", publicName: "popup", isSignal: true, isRequired: false, transformFunction: null }, touchUI: { classPropertyName: "touchUI", publicName: "touchUI", isSignal: true, isRequired: false, transformFunction: null }, popupTitle: { classPropertyName: "popupTitle", publicName: "popupTitle", isSignal: true, isRequired: false, transformFunction: null }, modalTitle: { classPropertyName: "modalTitle", publicName: "modalTitle", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: true, isRequired: false, transformFunction: null }, focusOnOpen: { classPropertyName: "focusOnOpen", publicName: "focusOnOpen", isSignal: true, isRequired: false, transformFunction: null }, focusOnOpenStrategy: { classPropertyName: "focusOnOpenStrategy", publicName: "focusOnOpenStrategy", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, clearLabel: { classPropertyName: "clearLabel", publicName: "clearLabel", isSignal: true, isRequired: false, transformFunction: null }, clearValueLabel: { classPropertyName: "clearValueLabel", publicName: "clearValueLabel", isSignal: true, isRequired: false, transformFunction: null }, loadingLabel: { classPropertyName: "loadingLabel", publicName: "loadingLabel", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, doneLabel: { classPropertyName: "doneLabel", publicName: "doneLabel", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, expandLabel: { classPropertyName: "expandLabel", publicName: "expandLabel", isSignal: true, isRequired: false, transformFunction: null }, collapseLabel: { classPropertyName: "collapseLabel", publicName: "collapseLabel", isSignal: true, isRequired: false, transformFunction: null }, removeChipLabel: { classPropertyName: "removeChipLabel", publicName: "removeChipLabel", isSignal: true, isRequired: false, transformFunction: null }, addTagLabel: { classPropertyName: "addTagLabel", publicName: "addTagLabel", isSignal: true, isRequired: false, transformFunction: null }, tree: { classPropertyName: "tree", publicName: "tree", isSignal: true, isRequired: false, transformFunction: null }, optionChildren: { classPropertyName: "optionChildren", publicName: "optionChildren", isSignal: true, isRequired: false, transformFunction: null }, treeSelectable: { classPropertyName: "treeSelectable", publicName: "treeSelectable", isSignal: true, isRequired: false, transformFunction: null }, treeExpandAll: { classPropertyName: "treeExpandAll", publicName: "treeExpandAll", isSignal: true, isRequired: false, transformFunction: null }, treeShowPath: { classPropertyName: "treeShowPath", publicName: "treeShowPath", isSignal: true, isRequired: false, transformFunction: null }, overlayVisible: { classPropertyName: "overlayVisible", publicName: "overlayVisible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", overlayVisible: "overlayVisibleChange", onChange: "onChange", onFilter: "onFilter", onFocus: "onFocus", onBlur: "onBlur", onShow: "onShow", onHide: "onHide", onClear: "onClear", onSelectAllChange: "onSelectAllChange", onRemoveChip: "onRemoveChip", onLazyLoad: "onLazyLoad", onNodeExpand: "onNodeExpand", onNodeCollapse: "onNodeCollapse", onAdd: "onAdd" }, host: { properties: { "attr.id": "hostIdAttr()" } }, providers: [
|
|
1340
1624
|
{
|
|
1341
1625
|
provide: NG_VALUE_ACCESSOR,
|
|
1342
1626
|
useExisting: forwardRef(() => NgbSelectComponent),
|
|
1343
1627
|
multi: true,
|
|
1344
1628
|
},
|
|
1345
|
-
], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "selectedItemTemplate", first: true, predicate: ["selectedItem"], descendants: true, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: ["label"], descendants: true, isSignal: true }, { propertyName: "chipTemplate", first: true, predicate: ["chip"], descendants: true, isSignal: true }, { propertyName: "headerCheckboxTemplate", first: true, predicate: ["headerCheckbox"], descendants: true, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"], descendants: true, isSignal: true }, { propertyName: "clearIconTemplate", first: true, predicate: ["clearIcon"], descendants: true, isSignal: true }, { propertyName: "dropdownIconTemplate", first: true, predicate: ["dropdownIcon"], descendants: true, isSignal: true }, { propertyName: "filterIconTemplate", first: true, predicate: ["filterIcon"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "filterInputElement", first: true, predicate: ["filterInput"], descendants: true, isSignal: true }, { propertyName: "triggerFilterInputElement", first: true, predicate: ["triggerFilterInput"], descendants: true, isSignal: true }, { propertyName: "editableInputElement", first: true, predicate: ["editableInput"], descendants: true, isSignal: true }, { propertyName: "dropdownMenuElement", first: true, predicate: ["dropdownMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"ngb-select-container position-relative\"\n [class.form-floating]=\"floatLabel()\"\n [class.float-variant-on]=\"floatLabel() && floatLabelVariant() === 'on'\"\n [class.float-variant-in]=\"floatLabel() && floatLabelVariant() === 'in'\"\n [class.float-variant-over]=\"floatLabel() && floatLabelVariant() === 'over'\"\n [class.floating-active]=\"hasSelectedValue() || overlayVisible()\"\n [class.dropup]=\"isDropup()\"\n [class.dropdown-up]=\"isDropup()\"\n [class.w-100]=\"fluid()\"\n [attr.dir]=\"dir() || null\"\n [ngStyle]=\"style()\"\n [ngClass]=\"styleClass()\"\n (keydown)=\"onKeydown($event)\"\n>\n <!-- Select Trigger Box -->\n <div\n class=\"form-select d-flex align-items-center justify-content-between\"\n [class.is-invalid]=\"invalid()\"\n [class.disabled]=\"disabled()\"\n [class.form-select-sm]=\"size() === 'small'\"\n [class.form-select-lg]=\"size() === 'large'\"\n [class.bg-light]=\"variant() === 'filled'\"\n [attr.id]=\"id()\"\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-expanded]=\"overlayVisible()\"\n [attr.aria-haspopup]=\"tree() ? 'tree' : 'listbox'\"\n role=\"combobox\"\n (click)=\"onTriggerClick($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n >\n <!-- Selected Value / Input / Chips Area -->\n <span class=\"text-truncate flex-grow-1 me-2 d-flex flex-wrap align-items-center gap-1\">\n <!-- Filter directly in Trigger Box -->\n @if (filterInTrigger()) {\n <!-- Chips in multiple mode when filterInTrigger is active -->\n @if (multiple() && display() === 'chip' && hasSelectedValue()) {\n @for (val of value(); track val) {\n <span\n class=\"badge bg-light text-dark border d-inline-flex align-items-center gap-1 py-1 px-2\"\n >\n @if (chipTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n chipTemplate()!;\n context: { $implicit: findOptionByValue(val) ?? val, value: val }\n \"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabelByValue(val) }}</span>\n }\n @if (!disabled() && !readonly()) {\n <i\n class=\"bi bi-x ms-1 cursor-pointer fw-bold\"\n (click)=\"removeChip(val, $event)\"\n ></i>\n }\n </span>\n }\n }\n <!-- Search Filter Input embedded inside the trigger -->\n <input\n #triggerFilterInput\n type=\"text\"\n class=\"form-control border-0 bg-transparent p-0 shadow-none flex-grow-1\"\n style=\"min-width: 80px\"\n [class.form-control-sm]=\"size() === 'small'\"\n [class.form-control-lg]=\"size() === 'large'\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"effectiveFilterValue()\"\n [placeholder]=\"\n multiple() && hasSelectedValue()\n ? ''\n : hasSelectedValue() && !overlayVisible()\n ? displayLabel()\n : effectiveSearchPlaceholder()\n \"\n (input)=\"onFilterChange($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n (focus)=\"openOverlay($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n <!-- Editable Input (Single mode only) -->\n @if (editable() && !multiple()) {\n <input\n #editableInput\n type=\"text\"\n class=\"form-control border-0 bg-transparent p-0 shadow-none\"\n [class.form-control-sm]=\"size() === 'small'\"\n [class.form-control-lg]=\"size() === 'large'\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.maxlength]=\"maxLength()\"\n [value]=\"displayLabel()\"\n [placeholder]=\"placeholder() || ''\"\n (input)=\"onEditableInput($event)\"\n (focus)=\"onEditableFocus($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n <!-- Multi-Select Chips Display Mode -->\n @if (multiple() && display() === 'chip' && hasSelectedValue()) {\n @for (val of value(); track val) {\n <span\n class=\"badge bg-light text-dark border d-inline-flex align-items-center gap-1 py-1 px-2\"\n >\n @if (chipTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n chipTemplate()!;\n context: { $implicit: findOptionByValue(val) ?? val, value: val }\n \"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabelByValue(val) }}</span>\n }\n @if (!disabled() && !readonly()) {\n <i\n class=\"bi bi-x ms-1 cursor-pointer fw-bold\"\n (click)=\"removeChip(val, $event)\"\n ></i>\n }\n </span>\n }\n } @else {\n @if (hasSelectedValue()) {\n @if (selectedItemTemplate() || labelTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n selectedItemTemplate() || labelTemplate()!;\n context: tree()\n ? selectedItemContext(value())\n : { $implicit: findOptionByValue(value()) ?? value(), value: value() }\n \"\n ></ng-container>\n } @else {\n <span>{{ displayLabel() }}</span>\n }\n } @else {\n <span class=\"text-muted\">{{ floatLabel() ? '' : placeholder() || '' }}</span>\n }\n }\n <!-- Standard Single or Comma Multi-Select Text -->\n }\n }\n </span>\n\n <!-- Icons & Spinners Area -->\n <div class=\"d-flex align-items-center flex-shrink-0 gap-1 ms-auto\">\n <!-- Clear Icon -->\n @if (showClear() && hasSelectedValue() && !disabled() && !readonly()) {\n <span\n class=\"ngb-select-clear-icon text-muted me-1\"\n (click)=\"onClearClick($event)\"\n title=\"Clear\"\n tabindex=\"0\"\n role=\"button\"\n aria-label=\"Clear value\"\n >\n @if (clearIconTemplate()) {\n <ng-container *ngTemplateOutlet=\"clearIconTemplate()!\"></ng-container>\n } @else {\n <i class=\"bi bi-x-circle-fill\"></i>\n }\n </span>\n }\n\n <!-- Loading Spinner -->\n @if (loading()) {\n <div class=\"spinner-border spinner-border-sm text-secondary\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n }\n\n <!-- Dropdown Caret Icon -->\n @if (!loading()) {\n <span class=\"ngb-select-dropdown-icon text-secondary\">\n @if (dropdownIconTemplate()) {\n <ng-container *ngTemplateOutlet=\"dropdownIconTemplate()!\"></ng-container>\n } @else {\n <i class=\"bi bi-chevron-down\" [class.rotate-180]=\"overlayVisible()\"></i>\n }\n </span>\n }\n </div>\n </div>\n\n <!-- Float Label Support -->\n @if (floatLabel() && placeholder()) {\n <label [attr.for]=\"id()\">{{ placeholder() }}</label>\n }\n\n <ng-template #dropdownContent>\n <!-- Header Template -->\n @if (headerTemplate()) {\n <div class=\"p-2 border-bottom\">\n <ng-container *ngTemplateOutlet=\"headerTemplate()!\"></ng-container>\n </div>\n }\n\n <!-- Header: Select All Checkbox & Search / Filter Box -->\n @if ((filter() && !filterInTrigger()) || (multiple() && showSelectAll())) {\n <div class=\"p-2 border-bottom bg-light bg-opacity-50\">\n <!-- Select All Checkbox -->\n @if (multiple() && showSelectAll()) {\n <div class=\"d-flex align-items-center mb-2 px-1\">\n <input\n type=\"checkbox\"\n class=\"form-check-input me-2 mt-0 cursor-pointer\"\n [checked]=\"selectAll()\"\n (change)=\"toggleSelectAll($event)\"\n id=\"selectAllCheckbox\"\n />\n <label\n class=\"form-check-label small fw-semibold cursor-pointer user-select-none\"\n for=\"selectAllCheckbox\"\n >\n @if (headerCheckboxTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"headerCheckboxTemplate()!; context: { $implicit: selectAll() }\"\n ></ng-container>\n } @else {\n Select All\n }\n </label>\n </div>\n }\n <!-- Search Box -->\n @if (filter() && !filterInTrigger()) {\n <div class=\"input-group input-group-sm\">\n <span class=\"input-group-text bg-transparent border-end-0\">\n @if (filterIconTemplate()) {\n <ng-container *ngTemplateOutlet=\"filterIconTemplate()!\"></ng-container>\n } @else {\n <i class=\"bi bi-search text-muted\"></i>\n }\n </span>\n <input\n #filterInput\n type=\"text\"\n class=\"form-control border-start-0\"\n [placeholder]=\"effectiveSearchPlaceholder()\"\n [value]=\"filterValue()\"\n (input)=\"onFilterChange($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n />\n </div>\n }\n </div>\n }\n\n <!-- Tree Mode -->\n @if (tree()) {\n @for (entry of visibleTreeNodes(); track entry.key; let i = $index) {\n <div\n class=\"dropdown-item d-flex align-items-center py-2 ngb-select-tree-row\"\n [style.padding-inline-start]=\"treeIndent(entry.depth)\"\n [class.active]=\"!multiple() && isSelected(entry.node)\"\n [class.bg-light]=\"multiple() && isSelected(entry.node)\"\n [class.fw-semibold]=\"multiple() && isSelected(entry.node)\"\n [class.focus]=\"focusedIndex() === i\"\n [class.bg-body-secondary]=\"focusedIndex() === i && !isSelected(entry.node)\"\n [class.disabled]=\"isOptionDisabled(entry.node)\"\n role=\"treeitem\"\n [attr.aria-level]=\"entry.depth + 1\"\n [attr.aria-expanded]=\"entry.hasChildren ? entry.expanded : null\"\n [attr.aria-selected]=\"isSelected(entry.node)\"\n [attr.aria-disabled]=\"isOptionDisabled(entry.node) || null\"\n (click)=\"onTreeRowClick(entry, $event)\"\n >\n @if (entry.hasChildren) {\n <button\n type=\"button\"\n class=\"btn btn-link btn-sm p-0 text-reset lh-1 ngb-select-tree-toggle\"\n [class.ngb-select-tree-open]=\"entry.expanded\"\n [class.ngb-select-tree-rtl]=\"isRtl()\"\n tabindex=\"-1\"\n [attr.aria-label]=\"entry.expanded ? 'Collapse' : 'Expand'\"\n (click)=\"onTreeToggleClick(entry, $event)\"\n >\n <i class=\"bi\" [class.bi-chevron-right]=\"!isRtl()\" [class.bi-chevron-left]=\"isRtl()\"></i>\n </button>\n } @else {\n <span class=\"ngb-select-tree-spacer\" aria-hidden=\"true\"></span>\n }\n @if (multiple()) {\n <input\n type=\"checkbox\"\n class=\"form-check-input mt-0 ngb-select-tree-check\"\n style=\"pointer-events: none\"\n [checked]=\"isSelected(entry.node)\"\n tabindex=\"-1\"\n />\n }\n @if (itemTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"itemTemplate()!; context: treeItemContext(entry)\"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabel(entry.node) }}</span>\n }\n </div>\n }\n } @else if (group()) {\n @for (\n groupOption of filteredOptions();\n track resolveOptionGroupLabel(groupOption) || $index\n ) {\n <div>\n <!-- Group Header -->\n <h6\n class=\"dropdown-header text-muted py-2 px-3 m-0 bg-light bg-opacity-75 d-flex align-items-center\"\n >\n @if (groupTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"groupTemplate()!; context: { $implicit: groupOption }\"\n ></ng-container>\n } @else {\n {{ resolveOptionGroupLabel(groupOption) }}\n }\n </h6>\n <!-- Group Items -->\n @for (\n option of resolveOptionGroupChildren(groupOption);\n track resolveOptionTrackKey(option, $index)\n ) {\n <button\n type=\"button\"\n class=\"dropdown-item d-flex align-items-center py-2 px-3\"\n [class.active]=\"!multiple() && isSelected(option)\"\n [class.bg-light]=\"multiple() && isSelected(option)\"\n [class.fw-semibold]=\"multiple() && isSelected(option)\"\n [class.focus]=\"isOptionFocused(option)\"\n [class.bg-body-secondary]=\"isOptionFocused(option) && !isSelected(option)\"\n [class.disabled]=\"isOptionDisabled(option)\"\n [disabled]=\"isOptionDisabled(option)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-checked]=\"multiple() ? isSelected(option) : null\"\n (click)=\"onOptionClick(option, $event)\"\n >\n <!-- Checkbox in Multiple Mode synced to selection -->\n @if (multiple()) {\n <input\n type=\"checkbox\"\n class=\"form-check-input me-2 mt-0\"\n style=\"pointer-events: none\"\n [checked]=\"isSelected(option)\"\n tabindex=\"-1\"\n />\n }\n @if (itemTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"itemTemplate()!; context: { $implicit: option }\"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabel(option) }}</span>\n }\n </button>\n }\n </div>\n }\n } @else {\n @for (\n option of filteredOptions();\n track resolveOptionTrackKey(option, $index);\n let i = $index\n ) {\n <button\n type=\"button\"\n class=\"dropdown-item d-flex align-items-center py-2 px-3\"\n [class.active]=\"!multiple() && isSelected(option)\"\n [class.bg-light]=\"multiple() && isSelected(option)\"\n [class.fw-semibold]=\"multiple() && isSelected(option)\"\n [class.focus]=\"isOptionFocused(option)\"\n [class.bg-body-secondary]=\"isOptionFocused(option) && !isSelected(option)\"\n [class.disabled]=\"isOptionDisabled(option)\"\n [disabled]=\"isOptionDisabled(option)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-checked]=\"multiple() ? isSelected(option) : null\"\n (click)=\"onOptionClick(option, $event)\"\n >\n <!-- Checkbox in Multiple Mode synced to selection -->\n @if (multiple()) {\n <input\n type=\"checkbox\"\n class=\"form-check-input me-2 mt-0\"\n style=\"pointer-events: none\"\n [checked]=\"isSelected(option)\"\n tabindex=\"-1\"\n />\n }\n @if (itemTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"itemTemplate()!; context: { $implicit: option }\"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabel(option) }}</span>\n }\n </button>\n }\n }\n\n <!-- Empty State Message -->\n @if (isOptionsEmpty()) {\n <div class=\"dropdown-item text-muted text-center py-3\">\n @if (emptyTemplate()) {\n <ng-container *ngTemplateOutlet=\"emptyTemplate()!\"></ng-container>\n } @else {\n <small>{{\n filterValue()\n ? emptyFilterMessage() || 'No results found'\n : emptyMessage() || 'No results found'\n }}</small>\n }\n </div>\n }\n </ng-template>\n\n @if (isModalMode()) {\n <!-- Bootstrap Modal Overlay -->\n @if (overlayVisible()) {\n <div\n class=\"modal fade show d-block\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-modal=\"true\"\n style=\"background-color: rgba(0, 0, 0, 0.45); z-index: 1075\"\n (click)=\"closeOverlay($event)\"\n >\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n role=\"document\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"modal-content shadow\" [ngClass]=\"panelStyleClass()\" [ngStyle]=\"panelStyle()\">\n <!-- Modal Header -->\n <div class=\"modal-header bg-light bg-opacity-50 py-2 px-3\">\n <h6 class=\"modal-title m-0 fw-semibold text-truncate\">{{ effectivePopupTitle() }}</h6>\n <button\n type=\"button\"\n class=\"btn-close\"\n aria-label=\"Close\"\n (click)=\"closeOverlay($event)\"\n ></button>\n </div>\n\n <!-- Modal Body (Options Content) -->\n <div\n class=\"modal-body p-0\"\n #dropdownMenu\n [attr.role]=\"tree() ? 'tree' : 'listbox'\"\n [attr.aria-multiselectable]=\"tree() && multiple() ? true : null\"\n (scroll)=\"onOverlayScroll($event)\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownContent\"></ng-container>\n </div>\n\n <!-- Modal Footer (Custom Template or Done Button) -->\n @if (footerTemplate() || multiple()) {\n <div\n class=\"modal-footer p-2 bg-light bg-opacity-50 d-flex align-items-center justify-content-end\"\n >\n @if (footerTemplate()) {\n <div class=\"w-100\">\n <ng-container *ngTemplateOutlet=\"footerTemplate()!\"></ng-container>\n </div>\n } @else {\n <button\n type=\"button\"\n class=\"btn btn-sm btn-primary px-3\"\n (click)=\"closeOverlay($event)\"\n >\n Done\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n } @else {\n <!-- Standard Dropdown Menu -->\n <div\n #dropdownMenu\n class=\"dropdown-menu shadow-sm p-0\"\n [class.show]=\"overlayVisible()\"\n [ngStyle]=\"panelStyle()\"\n [ngClass]=\"panelStyleClass()\"\n [style.max-height]=\"scrollHeight()\"\n style=\"overflow-y: auto\"\n [attr.role]=\"tree() ? 'tree' : 'listbox'\"\n [attr.aria-multiselectable]=\"tree() && multiple() ? true : null\"\n (scroll)=\"onOverlayScroll($event)\"\n (click)=\"$event.stopPropagation()\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownContent\"></ng-container>\n\n <!-- Footer Template -->\n @if (footerTemplate()) {\n <div class=\"p-2 border-top\">\n <ng-container *ngTemplateOutlet=\"footerTemplate()!\"></ng-container>\n </div>\n }\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%}:host.inline{display:inline-block;width:auto}.ngb-select-container{position:relative;-webkit-user-select:none;user-select:none;width:100%}.ngb-select-container .form-select{cursor:pointer;min-height:38px;background-image:none;padding-right:.75rem;padding-left:.75rem}.ngb-select-container .form-select.form-select-sm{min-height:31px;padding-right:.5rem;padding-left:.5rem}.ngb-select-container .form-select.form-select-lg{min-height:48px;padding-right:1rem;padding-left:1rem}.ngb-select-container .form-select.disabled,.ngb-select-container .form-select:disabled{cursor:not-allowed;background-color:var(--bs-secondary-bg);opacity:.65}.ngb-select-container.form-floating{display:block;width:100%;position:relative}.ngb-select-container.form-floating.float-variant-on,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over){margin-top:.35rem}.ngb-select-container.form-floating.float-variant-on .form-select,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over) .form-select{min-height:38px;height:auto;padding:.375rem .75rem;align-items:center}.ngb-select-container.form-floating.float-variant-on .form-select.form-select-sm,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over) .form-select.form-select-sm{min-height:31px;padding-top:.25rem;padding-bottom:.25rem}.ngb-select-container.form-floating.float-variant-on .form-select.form-select-lg,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over) .form-select.form-select-lg{min-height:48px;padding-top:.5rem;padding-bottom:.5rem}.ngb-select-container.form-floating.float-variant-on>label,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over)>label{position:absolute;top:50%;left:.75rem;transform:translateY(-50%);height:auto;padding:0 .35rem;margin:0;line-height:1;font-size:.95rem;color:var(--bs-secondary-color);pointer-events:none;border-radius:var(--bs-border-radius);background-color:transparent;transform-origin:left center;transition:transform .2s cubic-bezier(.25,.8,.25,1),top .2s cubic-bezier(.25,.8,.25,1),color .2s ease-in-out,background-color .2s ease-in-out;z-index:5}.ngb-select-container.form-floating.float-variant-on.floating-active>label,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over).floating-active>label{top:0;transform:translateY(-50%) scale(.85);background-color:var(--bs-body-bg);color:var(--bs-primary);font-weight:600}.ngb-select-container.form-floating.float-variant-in .form-select{height:calc(3.5rem + 2px);min-height:calc(3.5rem + 2px);padding:1.625rem .75rem .5rem;align-items:flex-end}.ngb-select-container.form-floating.float-variant-in>label{position:absolute;top:0;left:0;z-index:2;height:100%;padding:1rem .75rem;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:var(--bs-border-width) solid transparent;transform-origin:0 0;transition:opacity .15s ease-in-out,transform .15s ease-in-out,color .15s ease-in-out;color:rgba(var(--bs-body-color-rgb),.65);transform:scale(1) translateY(0)}.ngb-select-container.form-floating.float-variant-in.floating-active>label{transform:scale(.85) translateY(-.65rem) translate(.15rem);color:var(--bs-primary);font-weight:500}.ngb-select-container.form-floating.float-variant-over{margin-top:1.25rem}.ngb-select-container.form-floating.float-variant-over .form-select{min-height:38px;height:auto;padding:.375rem .75rem;align-items:center}.ngb-select-container.form-floating.float-variant-over .form-select.form-select-sm{min-height:31px}.ngb-select-container.form-floating.float-variant-over .form-select.form-select-lg{min-height:48px}.ngb-select-container.form-floating.float-variant-over>label{position:absolute;top:50%;left:.75rem;transform:translateY(-50%);height:auto;padding:0;margin:0;line-height:1;font-size:.95rem;color:var(--bs-secondary-color);pointer-events:none;transform-origin:left center;transition:transform .2s cubic-bezier(.25,.8,.25,1),top .2s cubic-bezier(.25,.8,.25,1),color .2s ease-in-out;z-index:5}.ngb-select-container.form-floating.float-variant-over.floating-active>label{top:-.75rem;transform:scale(.85);color:var(--bs-primary);font-weight:600}.ngb-select-container .ngb-select-clear-icon,.ngb-select-container .ngb-select-dropdown-icon{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;font-size:.875rem}.ngb-select-container .ngb-select-clear-icon i,.ngb-select-container .ngb-select-dropdown-icon i{transition:transform .2s ease-in-out}.ngb-select-container .ngb-select-clear-icon i.rotate-180,.ngb-select-container .ngb-select-dropdown-icon i.rotate-180{transform:rotate(180deg)}.ngb-select-container .ngb-select-clear-icon{opacity:.6;transition:opacity .15s ease}.ngb-select-container .ngb-select-clear-icon:hover{opacity:1}.ngb-select-container.dropup .dropdown-menu,.ngb-select-container.dropdown-up .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropdown-menu{top:100%;left:0;width:100%;min-width:100%;margin-top:.125rem;z-index:1060;box-sizing:border-box;text-align:inherit}.dropdown-menu .dropdown-item{cursor:pointer;white-space:normal;word-break:break-word;text-align:inherit}.dropdown-menu .dropdown-item.disabled,.dropdown-menu .dropdown-item:disabled{cursor:not-allowed;opacity:.5}.dropdown-menu .dropdown-item.focus,.dropdown-menu .dropdown-item.focused,.dropdown-menu .dropdown-item:focus{color:var(--bs-dropdown-link-hover-color, inherit);background-color:var(--bs-dropdown-link-hover-bg, var(--bs-tertiary-bg))!important}.dropdown-menu .dropdown-item.active{color:var(--bs-dropdown-link-active-color)!important;background-color:var(--bs-dropdown-link-active-bg)!important}.dropdown-menu .dropdown-header{font-weight:600;text-transform:uppercase;font-size:.75rem;letter-spacing:.05em;text-align:inherit}.dropdown-menu .ngb-select-tree-row,.ngb-select-tree-row{padding-inline-end:1rem;gap:.25rem}.ngb-select-tree-toggle,.ngb-select-tree-spacer{flex-shrink:0;width:1.25rem;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.ngb-select-tree-toggle i{font-size:.75rem;transition:transform .15s ease-in-out}.ngb-select-tree-toggle.ngb-select-tree-open i{transform:rotate(90deg)}.ngb-select-tree-toggle.ngb-select-tree-rtl.ngb-select-tree-open i{transform:rotate(-90deg)}.ngb-select-tree-check{flex-shrink:0;margin-inline-end:.25rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1629
|
+
], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "selectedItemTemplate", first: true, predicate: ["selectedItem"], descendants: true, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: ["label"], descendants: true, isSignal: true }, { propertyName: "chipTemplate", first: true, predicate: ["chip"], descendants: true, isSignal: true }, { propertyName: "headerCheckboxTemplate", first: true, predicate: ["headerCheckbox"], descendants: true, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"], descendants: true, isSignal: true }, { propertyName: "clearIconTemplate", first: true, predicate: ["clearIcon"], descendants: true, isSignal: true }, { propertyName: "dropdownIconTemplate", first: true, predicate: ["dropdownIcon"], descendants: true, isSignal: true }, { propertyName: "filterIconTemplate", first: true, predicate: ["filterIcon"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "filterInputElement", first: true, predicate: ["filterInput"], descendants: true, isSignal: true }, { propertyName: "triggerFilterInputElement", first: true, predicate: ["triggerFilterInput"], descendants: true, isSignal: true }, { propertyName: "editableInputElement", first: true, predicate: ["editableInput"], descendants: true, isSignal: true }, { propertyName: "dropdownMenuElement", first: true, predicate: ["dropdownMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"ngb-select-container position-relative\"\n [class.form-floating]=\"floatLabel()\"\n [class.float-variant-on]=\"floatLabel() && floatLabelVariant() === 'on'\"\n [class.float-variant-in]=\"floatLabel() && floatLabelVariant() === 'in'\"\n [class.float-variant-over]=\"floatLabel() && floatLabelVariant() === 'over'\"\n [class.floating-active]=\"hasSelectedValue() || overlayVisible()\"\n [class.dropup]=\"isDropup()\"\n [class.dropdown-up]=\"isDropup()\"\n [class.w-100]=\"fluid()\"\n [attr.dir]=\"dir() || null\"\n [ngStyle]=\"style()\"\n [ngClass]=\"styleClass()\"\n (keydown)=\"onKeydown($event)\"\n>\n <!-- Select Trigger Box -->\n <div\n class=\"form-select ngb-select-trigger d-flex align-items-center justify-content-between\"\n [class.is-invalid]=\"invalid()\"\n [class.disabled]=\"disabled()\"\n [class.form-select-sm]=\"size() === 'small'\"\n [class.form-select-lg]=\"size() === 'large'\"\n [class.ngb-select-filled]=\"variant() === 'filled'\"\n [attr.id]=\"triggerId()\"\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"effectiveAriaLabelledBy()\"\n [attr.aria-expanded]=\"overlayVisible()\"\n [attr.aria-haspopup]=\"tree() ? 'tree' : 'listbox'\"\n [attr.aria-controls]=\"overlayVisible() ? panelId() : null\"\n [attr.aria-disabled]=\"disabled() || null\"\n role=\"combobox\"\n (click)=\"onTriggerClick($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n >\n <!-- Selected Value / Input / Chips Area -->\n <span\n class=\"ngb-select-value text-truncate flex-grow-1 d-flex flex-wrap align-items-center gap-1\"\n >\n <!-- Filter directly in Trigger Box -->\n @if (filterInTrigger()) {\n <!-- Chips in multiple mode when filterInTrigger is active -->\n @if (multiple() && display() === 'chip' && hasSelectedValue()) {\n @for (val of value(); track val) {\n <span class=\"badge ngb-select-chip d-inline-flex align-items-center gap-1 py-1 px-2\">\n @if (chipTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n chipTemplate()!;\n context: { $implicit: findOptionByValue(val) ?? val, value: val }\n \"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabelByValue(val) }}</span>\n }\n @if (!disabled() && !readonly()) {\n <i\n class=\"bi bi-x ngb-select-chip-remove\"\n role=\"button\"\n [attr.aria-label]=\"removeChipText(val)\"\n [attr.title]=\"removeChipText(val)\"\n (click)=\"removeChip(val, $event)\"\n ></i>\n }\n </span>\n }\n }\n <!-- Search Filter Input embedded inside the trigger -->\n <input\n #triggerFilterInput\n type=\"text\"\n class=\"form-control ngb-select-inline-input border-0 bg-transparent p-0 shadow-none flex-grow-1\"\n style=\"min-width: 80px\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"effectiveAriaLabelledBy()\"\n [attr.aria-controls]=\"overlayVisible() ? panelId() : null\"\n aria-autocomplete=\"list\"\n [class.form-control-sm]=\"size() === 'small'\"\n [class.form-control-lg]=\"size() === 'large'\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"effectiveFilterValue()\"\n [placeholder]=\"\n multiple() && hasSelectedValue()\n ? ''\n : hasSelectedValue() && !overlayVisible()\n ? displayLabel()\n : effectiveSearchPlaceholder()\n \"\n (input)=\"onFilterChange($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n (focus)=\"openOverlay($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n <!-- Editable Input (Single mode only) -->\n @if (editable() && !multiple()) {\n <input\n #editableInput\n type=\"text\"\n class=\"form-control ngb-select-inline-input border-0 bg-transparent p-0 shadow-none\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"effectiveAriaLabelledBy()\"\n [class.form-control-sm]=\"size() === 'small'\"\n [class.form-control-lg]=\"size() === 'large'\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.maxlength]=\"maxLength()\"\n [value]=\"displayLabel()\"\n [placeholder]=\"placeholder() || ''\"\n (input)=\"onEditableInput($event)\"\n (focus)=\"onEditableFocus($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n <!-- Multi-Select Chips Display Mode -->\n @if (multiple() && display() === 'chip' && hasSelectedValue()) {\n @for (val of value(); track val) {\n <span class=\"badge ngb-select-chip d-inline-flex align-items-center gap-1 py-1 px-2\">\n @if (chipTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n chipTemplate()!;\n context: { $implicit: findOptionByValue(val) ?? val, value: val }\n \"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabelByValue(val) }}</span>\n }\n @if (!disabled() && !readonly()) {\n <i\n class=\"bi bi-x ngb-select-chip-remove\"\n role=\"button\"\n [attr.aria-label]=\"removeChipText(val)\"\n [attr.title]=\"removeChipText(val)\"\n (click)=\"removeChip(val, $event)\"\n ></i>\n }\n </span>\n }\n } @else {\n @if (hasSelectedValue()) {\n @if (selectedItemTemplate() || labelTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n selectedItemTemplate() || labelTemplate()!;\n context: tree()\n ? selectedItemContext(value())\n : { $implicit: findOptionByValue(value()) ?? value(), value: value() }\n \"\n ></ng-container>\n } @else {\n <span>{{ displayLabel() }}</span>\n }\n } @else {\n <span class=\"text-muted ngb-select-placeholder\">{{\n floatLabel() ? '' : placeholder() || ''\n }}</span>\n }\n }\n <!-- Standard Single or Comma Multi-Select Text -->\n }\n }\n </span>\n\n <!-- Icons & Spinners Area -->\n <div class=\"ngb-select-icons d-flex align-items-center flex-shrink-0 gap-1\">\n <!-- Clear Icon -->\n @if (showClear() && hasSelectedValue() && !disabled() && !readonly()) {\n <span\n class=\"ngb-select-clear-icon\"\n (click)=\"onClearClick($event)\"\n (keydown.enter)=\"onClearClick($event)\"\n [attr.title]=\"clearLabel()\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"clearValueLabel()\"\n >\n @if (clearIconTemplate()) {\n <ng-container *ngTemplateOutlet=\"clearIconTemplate()!\"></ng-container>\n } @else {\n <i class=\"bi bi-x-circle-fill\"></i>\n }\n </span>\n }\n\n <!-- Loading Spinner -->\n @if (loading()) {\n <div class=\"spinner-border spinner-border-sm text-secondary\" role=\"status\">\n <span class=\"visually-hidden\">{{ loadingLabel() }}</span>\n </div>\n }\n\n <!-- Dropdown Caret Icon -->\n @if (!loading()) {\n <span class=\"ngb-select-dropdown-icon\">\n @if (dropdownIconTemplate()) {\n <ng-container *ngTemplateOutlet=\"dropdownIconTemplate()!\"></ng-container>\n } @else {\n <i class=\"bi bi-chevron-down\" [class.rotate-180]=\"overlayVisible()\"></i>\n }\n </span>\n }\n </div>\n </div>\n\n <!-- Float Label Support -->\n @if (floatLabel() && placeholder()) {\n <label [attr.for]=\"triggerId()\">{{ placeholder() }}</label>\n }\n\n <ng-template #dropdownContent>\n <!-- Header Template -->\n @if (headerTemplate()) {\n <div class=\"p-2 border-bottom\">\n <ng-container *ngTemplateOutlet=\"headerTemplate()!\"></ng-container>\n </div>\n }\n\n <!-- Header: Select All Checkbox & Search / Filter Box -->\n @if ((filter() && !filterInTrigger()) || (multiple() && showSelectAll())) {\n <div class=\"p-2 border-bottom bg-light bg-opacity-50\">\n <!-- Select All Checkbox -->\n @if (multiple() && showSelectAll()) {\n <div class=\"ngb-select-select-all d-flex align-items-center mb-2 px-1\">\n <input\n type=\"checkbox\"\n class=\"form-check-input ngb-select-check mt-0\"\n [checked]=\"selectAll()\"\n (change)=\"toggleSelectAll($event)\"\n id=\"selectAllCheckbox\"\n />\n <label\n class=\"form-check-label small fw-semibold user-select-none\"\n for=\"selectAllCheckbox\"\n >\n @if (headerCheckboxTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"headerCheckboxTemplate()!; context: { $implicit: selectAll() }\"\n ></ng-container>\n } @else {\n {{ selectAllLabel() }}\n }\n </label>\n </div>\n }\n <!-- Search Box -->\n @if (filter() && !filterInTrigger()) {\n <div class=\"ngb-select-search\">\n <span class=\"ngb-select-search-icon\" aria-hidden=\"true\">\n @if (filterIconTemplate()) {\n <ng-container *ngTemplateOutlet=\"filterIconTemplate()!\"></ng-container>\n } @else {\n <i class=\"bi bi-search\"></i>\n }\n </span>\n <input\n #filterInput\n type=\"text\"\n class=\"form-control form-control-sm ngb-select-search-input\"\n [attr.aria-label]=\"effectiveSearchPlaceholder()\"\n [attr.aria-controls]=\"panelId()\"\n aria-autocomplete=\"list\"\n [placeholder]=\"effectiveSearchPlaceholder()\"\n [value]=\"filterValue()\"\n (input)=\"onFilterChange($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n />\n </div>\n }\n </div>\n }\n\n <!-- Tree Mode -->\n @if (tree()) {\n @for (entry of visibleTreeNodes(); track entry.key; let i = $index) {\n <div\n class=\"dropdown-item ngb-select-option d-flex align-items-center ngb-select-tree-row\"\n [style.padding-inline-start]=\"treeIndent(entry.depth)\"\n [class.active]=\"!multiple() && isSelected(entry.node)\"\n [class.ngb-select-option-checked]=\"multiple() && isSelected(entry.node)\"\n [class.focus]=\"focusedIndex() === i\"\n [class.disabled]=\"isOptionDisabled(entry.node)\"\n role=\"treeitem\"\n [attr.aria-level]=\"entry.depth + 1\"\n [attr.aria-expanded]=\"entry.hasChildren ? entry.expanded : null\"\n [attr.aria-selected]=\"isSelected(entry.node)\"\n [attr.aria-disabled]=\"isOptionDisabled(entry.node) || null\"\n (click)=\"onTreeRowClick(entry, $event)\"\n >\n @if (entry.hasChildren) {\n <button\n type=\"button\"\n class=\"btn btn-link btn-sm p-0 text-reset lh-1 ngb-select-tree-toggle\"\n [class.ngb-select-tree-open]=\"entry.expanded\"\n [class.ngb-select-tree-rtl]=\"isRtl()\"\n tabindex=\"-1\"\n [attr.aria-label]=\"entry.expanded ? collapseLabel() : expandLabel()\"\n (click)=\"onTreeToggleClick(entry, $event)\"\n >\n <i\n class=\"bi\"\n [class.bi-chevron-right]=\"!isRtl()\"\n [class.bi-chevron-left]=\"isRtl()\"\n ></i>\n </button>\n } @else {\n <span class=\"ngb-select-tree-spacer\" aria-hidden=\"true\"></span>\n }\n @if (multiple()) {\n <input\n type=\"checkbox\"\n class=\"form-check-input mt-0 ngb-select-check ngb-select-tree-check\"\n aria-hidden=\"true\"\n style=\"pointer-events: none\"\n [checked]=\"isSelected(entry.node)\"\n tabindex=\"-1\"\n />\n }\n @if (itemTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"itemTemplate()!; context: treeItemContext(entry)\"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabel(entry.node) }}</span>\n }\n </div>\n }\n } @else if (group()) {\n @for (\n groupOption of filteredOptions();\n track resolveOptionGroupLabel(groupOption) || $index\n ) {\n <div>\n <!-- Group Header -->\n <h6\n class=\"dropdown-header text-muted py-2 px-3 m-0 bg-light bg-opacity-75 d-flex align-items-center\"\n >\n @if (groupTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"groupTemplate()!; context: { $implicit: groupOption }\"\n ></ng-container>\n } @else {\n {{ resolveOptionGroupLabel(groupOption) }}\n }\n </h6>\n <!-- Group Items -->\n @for (\n option of resolveOptionGroupChildren(groupOption);\n track resolveOptionTrackKey(option, $index)\n ) {\n <button\n type=\"button\"\n class=\"dropdown-item ngb-select-option d-flex align-items-center\"\n [class.active]=\"!multiple() && isSelected(option)\"\n [class.ngb-select-option-checked]=\"multiple() && isSelected(option)\"\n [class.focus]=\"isOptionFocused(option)\"\n [class.disabled]=\"isOptionDisabled(option)\"\n [disabled]=\"isOptionDisabled(option)\"\n [attr.aria-disabled]=\"isOptionDisabled(option) || null\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-checked]=\"multiple() ? isSelected(option) : null\"\n (click)=\"onOptionClick(option, $event)\"\n >\n <!-- Checkbox in Multiple Mode synced to selection -->\n @if (multiple()) {\n <input\n type=\"checkbox\"\n class=\"form-check-input ngb-select-check mt-0\"\n aria-hidden=\"true\"\n style=\"pointer-events: none\"\n [checked]=\"isSelected(option)\"\n tabindex=\"-1\"\n />\n }\n @if (itemTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"itemTemplate()!; context: { $implicit: option }\"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabel(option) }}</span>\n }\n </button>\n }\n </div>\n }\n } @else {\n @for (\n option of filteredOptions();\n track resolveOptionTrackKey(option, $index);\n let i = $index\n ) {\n <button\n type=\"button\"\n class=\"dropdown-item ngb-select-option d-flex align-items-center\"\n [class.active]=\"!multiple() && isSelected(option)\"\n [class.ngb-select-option-checked]=\"multiple() && isSelected(option)\"\n [class.focus]=\"isOptionFocused(option)\"\n [class.disabled]=\"isOptionDisabled(option)\"\n [disabled]=\"isOptionDisabled(option)\"\n [attr.aria-disabled]=\"isOptionDisabled(option) || null\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-checked]=\"multiple() ? isSelected(option) : null\"\n (click)=\"onOptionClick(option, $event)\"\n >\n <!-- Checkbox in Multiple Mode synced to selection -->\n @if (multiple()) {\n <input\n type=\"checkbox\"\n class=\"form-check-input ngb-select-check mt-0\"\n aria-hidden=\"true\"\n style=\"pointer-events: none\"\n [checked]=\"isSelected(option)\"\n tabindex=\"-1\"\n />\n }\n @if (itemTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"itemTemplate()!; context: { $implicit: option }\"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabel(option) }}</span>\n }\n </button>\n }\n }\n\n <!-- Tagging: \"Add {term}\" row -->\n @if (addTagTerm() !== null) {\n <div\n class=\"dropdown-item ngb-select-option ngb-select-add-tag d-flex align-items-center\"\n [class.focus]=\"isAddTagFocused()\"\n role=\"option\"\n aria-selected=\"false\"\n (click)=\"addTagFromFilter($event)\"\n >\n <i class=\"bi bi-plus-lg ngb-select-add-tag-icon\" aria-hidden=\"true\"></i>\n <span>{{ addTagText() }}</span>\n </div>\n }\n\n <!-- Empty State Message -->\n @if (isOptionsEmpty() && addTagTerm() === null) {\n <div class=\"dropdown-item ngb-select-empty text-muted text-center py-3\">\n @if (emptyTemplate()) {\n <ng-container *ngTemplateOutlet=\"emptyTemplate()!\"></ng-container>\n } @else {\n <small>{{\n filterValue()\n ? emptyFilterMessage() || 'No results found'\n : emptyMessage() || 'No results found'\n }}</small>\n }\n </div>\n }\n </ng-template>\n\n @if (isModalMode()) {\n <!-- Bootstrap Modal Overlay -->\n @if (overlayVisible()) {\n <div\n class=\"modal fade show d-block\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-modal=\"true\"\n style=\"background-color: rgba(0, 0, 0, 0.45); z-index: 1075\"\n (click)=\"closeOverlay($event)\"\n >\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n role=\"document\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"modal-content shadow\" [ngClass]=\"panelStyleClass()\" [ngStyle]=\"panelStyle()\">\n <!-- Modal Header -->\n <div class=\"modal-header bg-light bg-opacity-50 py-2 px-3\">\n <h6 class=\"modal-title m-0 fw-semibold text-truncate\">{{ effectivePopupTitle() }}</h6>\n <button\n type=\"button\"\n class=\"btn-close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"closeOverlay($event)\"\n ></button>\n </div>\n\n <!-- Modal Body (Options Content) -->\n <div\n class=\"modal-body p-0 ngb-select-modal-body\"\n #dropdownMenu\n [attr.id]=\"panelId()\"\n [attr.role]=\"tree() ? 'tree' : 'listbox'\"\n [attr.aria-multiselectable]=\"tree() && multiple() ? true : null\"\n (scroll)=\"onOverlayScroll($event)\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownContent\"></ng-container>\n </div>\n\n <!-- Modal Footer (Custom Template or Done Button) -->\n @if (footerTemplate() || multiple()) {\n <div\n class=\"modal-footer p-2 bg-light bg-opacity-50 d-flex align-items-center justify-content-end\"\n >\n @if (footerTemplate()) {\n <div class=\"w-100\">\n <ng-container *ngTemplateOutlet=\"footerTemplate()!\"></ng-container>\n </div>\n } @else {\n <button\n type=\"button\"\n class=\"btn btn-sm btn-primary px-3\"\n (click)=\"closeOverlay($event)\"\n >\n {{ doneLabel() }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n } @else {\n <!-- Standard Dropdown Menu -->\n <div\n #dropdownMenu\n class=\"dropdown-menu ngb-select-panel p-0\"\n [class.show]=\"overlayVisible()\"\n [attr.id]=\"panelId()\"\n [ngStyle]=\"panelStyle()\"\n [ngClass]=\"panelStyleClass()\"\n [style.max-height]=\"scrollHeight()\"\n style=\"overflow-y: auto\"\n [attr.role]=\"tree() ? 'tree' : 'listbox'\"\n [attr.aria-multiselectable]=\"tree() && multiple() ? true : null\"\n (scroll)=\"onOverlayScroll($event)\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- Content is rendered only while open, so no option exists in the DOM when closed -->\n @if (overlayVisible()) {\n <ng-container *ngTemplateOutlet=\"dropdownContent\"></ng-container>\n\n <!-- Footer Template -->\n @if (footerTemplate()) {\n <div class=\"p-2 border-top\">\n <ng-container *ngTemplateOutlet=\"footerTemplate()!\"></ng-container>\n </div>\n }\n }\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%}:host.inline{display:inline-block;width:auto}.ngb-select-container{position:relative;-webkit-user-select:none;user-select:none;width:100%;font-family:var(--ngb-select-font-family, inherit)}.ngb-select-container.form-floating{display:block;width:100%;position:relative}.ngb-select-container.form-floating.float-variant-on,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over){margin-top:.35rem}.ngb-select-container.form-floating.float-variant-on .form-select,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over) .form-select{min-height:var(--ngb-select-min-height, 38px);height:auto;padding-top:.375rem;padding-bottom:.375rem;padding-inline:var(--ngb-select-padding-x, .75rem);align-items:center}.ngb-select-container.form-floating.float-variant-on .form-select.form-select-sm,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over) .form-select.form-select-sm{min-height:var(--ngb-select-min-height-sm, 31px);padding-top:.25rem;padding-bottom:.25rem}.ngb-select-container.form-floating.float-variant-on .form-select.form-select-lg,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over) .form-select.form-select-lg{min-height:var(--ngb-select-min-height-lg, 48px);padding-top:.5rem;padding-bottom:.5rem}.ngb-select-container.form-floating.float-variant-on>label,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over)>label{position:absolute;top:50%;inset-inline-start:.75rem;inset-inline-end:auto;transform:translateY(-50%);height:auto;padding:0 .35rem;margin:0;line-height:1;font-size:.95rem;color:var(--bs-secondary-color);pointer-events:none;border-radius:var(--bs-border-radius);background-color:transparent;transform-origin:left center;transition:transform .2s cubic-bezier(.25,.8,.25,1),top .2s cubic-bezier(.25,.8,.25,1),color .2s ease-in-out,background-color .2s ease-in-out;z-index:5}.ngb-select-container.form-floating.float-variant-on.floating-active>label,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over).floating-active>label{top:0;transform:translateY(-50%) scale(.85);background-color:var(--ngb-select-bg, var(--bs-body-bg));color:var(--ngb-select-accent-color, var(--bs-primary));font-weight:600}.ngb-select-container.form-floating.float-variant-in .form-select{height:calc(3.5rem + 2px);min-height:calc(3.5rem + 2px);padding-top:1.625rem;padding-bottom:.5rem;padding-inline:var(--ngb-select-padding-x, .75rem);align-items:flex-end}.ngb-select-container.form-floating.float-variant-in>label{position:absolute;top:0;inset-inline-start:0;inset-inline-end:auto;z-index:2;height:100%;padding:1rem .75rem;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:var(--bs-border-width) solid transparent;transform-origin:0 0;transition:opacity .15s ease-in-out,transform .15s ease-in-out,color .15s ease-in-out;color:rgba(var(--bs-body-color-rgb),.65);transform:scale(1) translateY(0)}.ngb-select-container.form-floating.float-variant-in.floating-active>label{transform:scale(.85) translateY(-.65rem) translate(.15rem);color:var(--ngb-select-accent-color, var(--bs-primary));font-weight:500}.ngb-select-container.form-floating.float-variant-over{margin-top:1.25rem}.ngb-select-container.form-floating.float-variant-over .form-select{min-height:var(--ngb-select-min-height, 38px);height:auto;padding-top:.375rem;padding-bottom:.375rem;padding-inline:var(--ngb-select-padding-x, .75rem);align-items:center}.ngb-select-container.form-floating.float-variant-over .form-select.form-select-sm{min-height:var(--ngb-select-min-height-sm, 31px)}.ngb-select-container.form-floating.float-variant-over .form-select.form-select-lg{min-height:var(--ngb-select-min-height-lg, 48px)}.ngb-select-container.form-floating.float-variant-over>label{position:absolute;top:50%;inset-inline-start:.75rem;inset-inline-end:auto;transform:translateY(-50%);height:auto;padding:0;margin:0;line-height:1;font-size:.95rem;color:var(--bs-secondary-color);pointer-events:none;transform-origin:left center;transition:transform .2s cubic-bezier(.25,.8,.25,1),top .2s cubic-bezier(.25,.8,.25,1),color .2s ease-in-out;z-index:5}.ngb-select-container.form-floating.float-variant-over.floating-active>label{top:-.75rem;transform:scale(.85);color:var(--ngb-select-accent-color, var(--bs-primary));font-weight:600}.ngb-select-container.dropup .dropdown-menu,.ngb-select-container.dropdown-up .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}:host-context([dir=rtl]) .ngb-select-container.form-floating>label,.ngb-select-container[dir=rtl].form-floating>label{transform-origin:right center}:host-context([dir=rtl]) .ngb-select-container.form-floating.float-variant-in.floating-active>label,.ngb-select-container[dir=rtl].form-floating.float-variant-in.floating-active>label{transform:scale(.85) translateY(-.65rem) translate(-.15rem)}.ngb-select-trigger{cursor:pointer;min-height:var(--ngb-select-min-height, 38px);padding-inline:var(--ngb-select-padding-x, .75rem);font-family:var(--ngb-select-font-family, inherit);font-size:var(--ngb-select-font-size, inherit);color:var(--ngb-select-color, var(--bs-body-color));background-color:var(--ngb-select-bg, var(--bs-body-bg));background-image:none;border-color:var(--ngb-select-border-color, var(--bs-border-color));border-radius:var(--ngb-select-border-radius, var(--bs-border-radius))}.ngb-select-trigger:where(.form-select-sm){min-height:var(--ngb-select-min-height-sm, 31px);padding-inline:var(--ngb-select-padding-x-sm, .5rem);border-radius:var(--ngb-select-border-radius, var(--bs-border-radius-sm))}.ngb-select-trigger:where(.form-select-lg){min-height:var(--ngb-select-min-height-lg, 48px);padding-inline:var(--ngb-select-padding-x-lg, 1rem);border-radius:var(--ngb-select-border-radius, var(--bs-border-radius-lg))}.ngb-select-trigger:where(.ngb-select-filled){background-color:var(--ngb-select-filled-bg, var(--bs-light))}.ngb-select-trigger:where(:focus,:focus-within){outline:var(--ngb-select-focus-outline, 0);outline-offset:var(--ngb-select-focus-outline-offset, 0);border-color:var(--ngb-select-focus-border-color, #86b7fe);box-shadow:var(--ngb-select-focus-shadow, 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25))}.ngb-select-trigger:where(.is-invalid){border-color:var(--ngb-select-invalid-border-color, var(--bs-form-invalid-border-color))}.ngb-select-trigger:where(.is-invalid):where(:focus,:focus-within){box-shadow:var(--ngb-select-invalid-focus-shadow, 0 0 0 .25rem rgba(var(--bs-danger-rgb), .25))}.ngb-select-trigger:where(.disabled){cursor:not-allowed;background-color:var(--ngb-select-disabled-bg, var(--bs-secondary-bg));opacity:.65}.ngb-select-value{margin-inline-end:.5rem;text-align:start}.ngb-select-icons{margin-inline-start:auto;color:var(--ngb-select-icon-color, var(--bs-secondary-color))}.ngb-select-clear-icon,.ngb-select-dropdown-icon{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;font-size:.875rem;color:inherit}.ngb-select-clear-icon i,.ngb-select-dropdown-icon i{transition:transform .2s ease-in-out}.ngb-select-clear-icon i.rotate-180,.ngb-select-dropdown-icon i.rotate-180{transform:rotate(180deg)}.ngb-select-clear-icon{margin-inline-end:.25rem;opacity:.6;transition:opacity .15s ease}.ngb-select-clear-icon:hover,.ngb-select-clear-icon:focus-visible{opacity:1}.ngb-select-chip{font-family:inherit;font-weight:var(--ngb-select-chip-font-weight, 500);color:var(--ngb-select-chip-color, var(--bs-body-color));background-color:var(--ngb-select-chip-bg, var(--bs-light));border:var(--bs-border-width) solid var(--ngb-select-chip-border-color, var(--bs-border-color));border-radius:var(--ngb-select-chip-border-radius, var(--bs-border-radius))}.ngb-select-chip-remove{cursor:pointer;font-weight:700;margin-inline-start:.25rem}.ngb-select-panel{top:100%;inset-inline-start:0;inset-inline-end:auto;width:max-content;min-width:100%;max-width:min(max(100%,var(--ngb-select-panel-max-width, 20rem)),100vw - 1rem);margin-top:.125rem;z-index:1060;box-sizing:border-box;text-align:start;overflow-y:auto;font-family:var(--ngb-select-font-family, inherit);font-size:var(--ngb-select-font-size, inherit);color:var(--ngb-select-option-color, var(--bs-body-color));background-color:var(--ngb-select-panel-bg, var(--bs-body-bg));border-color:var(--ngb-select-panel-border-color, var(--bs-border-color-translucent));border-radius:var(--ngb-select-panel-border-radius, var(--bs-border-radius));box-shadow:var(--ngb-select-panel-shadow, var(--bs-box-shadow-sm))}.dropdown-header{font-weight:600;text-transform:uppercase;font-size:.75rem;letter-spacing:.05em;text-align:start}.ngb-select-search{position:relative}.ngb-select-search-icon{position:absolute;top:50%;inset-inline-start:.625rem;transform:translateY(-50%);display:inline-flex;pointer-events:none;font-size:.875rem;color:var(--ngb-select-icon-color, var(--bs-secondary-color))}.ngb-select-search-input{padding-inline-start:2rem;font-family:inherit;border-color:var(--ngb-select-border-color, var(--bs-border-color));border-radius:var(--ngb-select-border-radius, var(--bs-border-radius-sm))}.ngb-select-search-input:where(:focus){border-color:var(--ngb-select-focus-border-color, #86b7fe);box-shadow:var(--ngb-select-focus-shadow, 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25))}.ngb-select-option{cursor:pointer;white-space:normal;word-break:break-word;text-align:start;gap:.5rem;padding-block:var(--ngb-select-option-padding-y, .5rem);padding-inline:var(--ngb-select-option-padding-x, 1rem);color:var(--ngb-select-option-color, var(--bs-body-color));background-color:transparent}.ngb-select-option:where(:hover,:focus,:focus-visible,.focus,.focused){color:var(--ngb-select-option-hover-color, var(--ngb-select-option-color, var(--bs-body-color)));background-color:var(--ngb-select-option-hover-bg, var(--bs-tertiary-bg))}.ngb-select-panel .ngb-select-option:where(:hover,:focus-visible,.focus,.focused){color:var(--ngb-select-option-hover-color, var(--ngb-select-option-color, var(--bs-body-color)));background-color:var(--ngb-select-option-hover-bg, var(--bs-tertiary-bg))}.ngb-select-panel .ngb-select-option:where(:active){color:var(--ngb-select-option-pressed-color, var(--ngb-select-option-hover-color, var(--ngb-select-option-color, var(--bs-body-color))));background-color:var(--ngb-select-option-pressed-bg, var(--ngb-select-option-hover-bg, var(--bs-tertiary-bg)))}.ngb-select-option:where(.ngb-select-option-checked){font-weight:var(--ngb-select-option-checked-font-weight, 600);color:var(--ngb-select-option-checked-color, var(--ngb-select-option-color, inherit));background-color:var(--ngb-select-option-checked-bg, var(--bs-light))}.ngb-select-option:where(.active){font-weight:var(--ngb-select-option-selected-font-weight, inherit);color:var(--ngb-select-option-selected-color, var(--bs-dropdown-link-active-color, #fff));background-color:var(--ngb-select-option-selected-bg, var(--bs-dropdown-link-active-bg, var(--bs-primary)))}.ngb-select-option:where(.disabled,:disabled){cursor:not-allowed;opacity:.5;background-color:transparent}.ngb-select-check{flex-shrink:0;margin-inline:0;cursor:pointer}.ngb-select-check:where(:checked){background-color:var(--ngb-select-check-checked-bg, var(--bs-primary));border-color:var(--ngb-select-check-checked-bg, var(--bs-primary))}.ngb-select-select-all{gap:.5rem}.ngb-select-add-tag-icon{flex-shrink:0;font-size:.875rem}.ngb-select-tree-row{padding-inline-end:var(--ngb-select-option-padding-x, 1rem);gap:.25rem}.ngb-select-tree-toggle,.ngb-select-tree-spacer{flex-shrink:0;width:1.25rem;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.ngb-select-tree-toggle i{font-size:.75rem;transition:transform .15s ease-in-out}.ngb-select-tree-toggle.ngb-select-tree-open i{transform:rotate(90deg)}.ngb-select-tree-toggle.ngb-select-tree-rtl.ngb-select-tree-open i{transform:rotate(-90deg)}.ngb-select-tree-check{margin-inline-end:.25rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1346
1630
|
}
|
|
1347
1631
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: NgbSelectComponent, decorators: [{
|
|
1348
1632
|
type: Component,
|
|
1349
|
-
args: [{ selector: 'ngb-select', standalone: true, imports: [CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1633
|
+
args: [{ selector: 'ngb-select', standalone: true, imports: [CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1634
|
+
// The id belongs to the focusable trigger; never duplicate it on the host element.
|
|
1635
|
+
'[attr.id]': 'hostIdAttr()',
|
|
1636
|
+
}, providers: [
|
|
1350
1637
|
{
|
|
1351
1638
|
provide: NG_VALUE_ACCESSOR,
|
|
1352
1639
|
useExisting: forwardRef(() => NgbSelectComponent),
|
|
1353
1640
|
multi: true,
|
|
1354
1641
|
},
|
|
1355
|
-
], template: "<div\n class=\"ngb-select-container position-relative\"\n [class.form-floating]=\"floatLabel()\"\n [class.float-variant-on]=\"floatLabel() && floatLabelVariant() === 'on'\"\n [class.float-variant-in]=\"floatLabel() && floatLabelVariant() === 'in'\"\n [class.float-variant-over]=\"floatLabel() && floatLabelVariant() === 'over'\"\n [class.floating-active]=\"hasSelectedValue() || overlayVisible()\"\n [class.dropup]=\"isDropup()\"\n [class.dropdown-up]=\"isDropup()\"\n [class.w-100]=\"fluid()\"\n [attr.dir]=\"dir() || null\"\n [ngStyle]=\"style()\"\n [ngClass]=\"styleClass()\"\n (keydown)=\"onKeydown($event)\"\n>\n <!-- Select Trigger Box -->\n <div\n class=\"form-select d-flex align-items-center justify-content-between\"\n [class.is-invalid]=\"invalid()\"\n [class.disabled]=\"disabled()\"\n [class.form-select-sm]=\"size() === 'small'\"\n [class.form-select-lg]=\"size() === 'large'\"\n [class.bg-light]=\"variant() === 'filled'\"\n [attr.id]=\"id()\"\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-expanded]=\"overlayVisible()\"\n [attr.aria-haspopup]=\"tree() ? 'tree' : 'listbox'\"\n role=\"combobox\"\n (click)=\"onTriggerClick($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n >\n <!-- Selected Value / Input / Chips Area -->\n <span class=\"text-truncate flex-grow-1 me-2 d-flex flex-wrap align-items-center gap-1\">\n <!-- Filter directly in Trigger Box -->\n @if (filterInTrigger()) {\n <!-- Chips in multiple mode when filterInTrigger is active -->\n @if (multiple() && display() === 'chip' && hasSelectedValue()) {\n @for (val of value(); track val) {\n <span\n class=\"badge bg-light text-dark border d-inline-flex align-items-center gap-1 py-1 px-2\"\n >\n @if (chipTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n chipTemplate()!;\n context: { $implicit: findOptionByValue(val) ?? val, value: val }\n \"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabelByValue(val) }}</span>\n }\n @if (!disabled() && !readonly()) {\n <i\n class=\"bi bi-x ms-1 cursor-pointer fw-bold\"\n (click)=\"removeChip(val, $event)\"\n ></i>\n }\n </span>\n }\n }\n <!-- Search Filter Input embedded inside the trigger -->\n <input\n #triggerFilterInput\n type=\"text\"\n class=\"form-control border-0 bg-transparent p-0 shadow-none flex-grow-1\"\n style=\"min-width: 80px\"\n [class.form-control-sm]=\"size() === 'small'\"\n [class.form-control-lg]=\"size() === 'large'\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"effectiveFilterValue()\"\n [placeholder]=\"\n multiple() && hasSelectedValue()\n ? ''\n : hasSelectedValue() && !overlayVisible()\n ? displayLabel()\n : effectiveSearchPlaceholder()\n \"\n (input)=\"onFilterChange($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n (focus)=\"openOverlay($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n <!-- Editable Input (Single mode only) -->\n @if (editable() && !multiple()) {\n <input\n #editableInput\n type=\"text\"\n class=\"form-control border-0 bg-transparent p-0 shadow-none\"\n [class.form-control-sm]=\"size() === 'small'\"\n [class.form-control-lg]=\"size() === 'large'\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.maxlength]=\"maxLength()\"\n [value]=\"displayLabel()\"\n [placeholder]=\"placeholder() || ''\"\n (input)=\"onEditableInput($event)\"\n (focus)=\"onEditableFocus($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n <!-- Multi-Select Chips Display Mode -->\n @if (multiple() && display() === 'chip' && hasSelectedValue()) {\n @for (val of value(); track val) {\n <span\n class=\"badge bg-light text-dark border d-inline-flex align-items-center gap-1 py-1 px-2\"\n >\n @if (chipTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n chipTemplate()!;\n context: { $implicit: findOptionByValue(val) ?? val, value: val }\n \"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabelByValue(val) }}</span>\n }\n @if (!disabled() && !readonly()) {\n <i\n class=\"bi bi-x ms-1 cursor-pointer fw-bold\"\n (click)=\"removeChip(val, $event)\"\n ></i>\n }\n </span>\n }\n } @else {\n @if (hasSelectedValue()) {\n @if (selectedItemTemplate() || labelTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n selectedItemTemplate() || labelTemplate()!;\n context: tree()\n ? selectedItemContext(value())\n : { $implicit: findOptionByValue(value()) ?? value(), value: value() }\n \"\n ></ng-container>\n } @else {\n <span>{{ displayLabel() }}</span>\n }\n } @else {\n <span class=\"text-muted\">{{ floatLabel() ? '' : placeholder() || '' }}</span>\n }\n }\n <!-- Standard Single or Comma Multi-Select Text -->\n }\n }\n </span>\n\n <!-- Icons & Spinners Area -->\n <div class=\"d-flex align-items-center flex-shrink-0 gap-1 ms-auto\">\n <!-- Clear Icon -->\n @if (showClear() && hasSelectedValue() && !disabled() && !readonly()) {\n <span\n class=\"ngb-select-clear-icon text-muted me-1\"\n (click)=\"onClearClick($event)\"\n title=\"Clear\"\n tabindex=\"0\"\n role=\"button\"\n aria-label=\"Clear value\"\n >\n @if (clearIconTemplate()) {\n <ng-container *ngTemplateOutlet=\"clearIconTemplate()!\"></ng-container>\n } @else {\n <i class=\"bi bi-x-circle-fill\"></i>\n }\n </span>\n }\n\n <!-- Loading Spinner -->\n @if (loading()) {\n <div class=\"spinner-border spinner-border-sm text-secondary\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n }\n\n <!-- Dropdown Caret Icon -->\n @if (!loading()) {\n <span class=\"ngb-select-dropdown-icon text-secondary\">\n @if (dropdownIconTemplate()) {\n <ng-container *ngTemplateOutlet=\"dropdownIconTemplate()!\"></ng-container>\n } @else {\n <i class=\"bi bi-chevron-down\" [class.rotate-180]=\"overlayVisible()\"></i>\n }\n </span>\n }\n </div>\n </div>\n\n <!-- Float Label Support -->\n @if (floatLabel() && placeholder()) {\n <label [attr.for]=\"id()\">{{ placeholder() }}</label>\n }\n\n <ng-template #dropdownContent>\n <!-- Header Template -->\n @if (headerTemplate()) {\n <div class=\"p-2 border-bottom\">\n <ng-container *ngTemplateOutlet=\"headerTemplate()!\"></ng-container>\n </div>\n }\n\n <!-- Header: Select All Checkbox & Search / Filter Box -->\n @if ((filter() && !filterInTrigger()) || (multiple() && showSelectAll())) {\n <div class=\"p-2 border-bottom bg-light bg-opacity-50\">\n <!-- Select All Checkbox -->\n @if (multiple() && showSelectAll()) {\n <div class=\"d-flex align-items-center mb-2 px-1\">\n <input\n type=\"checkbox\"\n class=\"form-check-input me-2 mt-0 cursor-pointer\"\n [checked]=\"selectAll()\"\n (change)=\"toggleSelectAll($event)\"\n id=\"selectAllCheckbox\"\n />\n <label\n class=\"form-check-label small fw-semibold cursor-pointer user-select-none\"\n for=\"selectAllCheckbox\"\n >\n @if (headerCheckboxTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"headerCheckboxTemplate()!; context: { $implicit: selectAll() }\"\n ></ng-container>\n } @else {\n Select All\n }\n </label>\n </div>\n }\n <!-- Search Box -->\n @if (filter() && !filterInTrigger()) {\n <div class=\"input-group input-group-sm\">\n <span class=\"input-group-text bg-transparent border-end-0\">\n @if (filterIconTemplate()) {\n <ng-container *ngTemplateOutlet=\"filterIconTemplate()!\"></ng-container>\n } @else {\n <i class=\"bi bi-search text-muted\"></i>\n }\n </span>\n <input\n #filterInput\n type=\"text\"\n class=\"form-control border-start-0\"\n [placeholder]=\"effectiveSearchPlaceholder()\"\n [value]=\"filterValue()\"\n (input)=\"onFilterChange($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n />\n </div>\n }\n </div>\n }\n\n <!-- Tree Mode -->\n @if (tree()) {\n @for (entry of visibleTreeNodes(); track entry.key; let i = $index) {\n <div\n class=\"dropdown-item d-flex align-items-center py-2 ngb-select-tree-row\"\n [style.padding-inline-start]=\"treeIndent(entry.depth)\"\n [class.active]=\"!multiple() && isSelected(entry.node)\"\n [class.bg-light]=\"multiple() && isSelected(entry.node)\"\n [class.fw-semibold]=\"multiple() && isSelected(entry.node)\"\n [class.focus]=\"focusedIndex() === i\"\n [class.bg-body-secondary]=\"focusedIndex() === i && !isSelected(entry.node)\"\n [class.disabled]=\"isOptionDisabled(entry.node)\"\n role=\"treeitem\"\n [attr.aria-level]=\"entry.depth + 1\"\n [attr.aria-expanded]=\"entry.hasChildren ? entry.expanded : null\"\n [attr.aria-selected]=\"isSelected(entry.node)\"\n [attr.aria-disabled]=\"isOptionDisabled(entry.node) || null\"\n (click)=\"onTreeRowClick(entry, $event)\"\n >\n @if (entry.hasChildren) {\n <button\n type=\"button\"\n class=\"btn btn-link btn-sm p-0 text-reset lh-1 ngb-select-tree-toggle\"\n [class.ngb-select-tree-open]=\"entry.expanded\"\n [class.ngb-select-tree-rtl]=\"isRtl()\"\n tabindex=\"-1\"\n [attr.aria-label]=\"entry.expanded ? 'Collapse' : 'Expand'\"\n (click)=\"onTreeToggleClick(entry, $event)\"\n >\n <i class=\"bi\" [class.bi-chevron-right]=\"!isRtl()\" [class.bi-chevron-left]=\"isRtl()\"></i>\n </button>\n } @else {\n <span class=\"ngb-select-tree-spacer\" aria-hidden=\"true\"></span>\n }\n @if (multiple()) {\n <input\n type=\"checkbox\"\n class=\"form-check-input mt-0 ngb-select-tree-check\"\n style=\"pointer-events: none\"\n [checked]=\"isSelected(entry.node)\"\n tabindex=\"-1\"\n />\n }\n @if (itemTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"itemTemplate()!; context: treeItemContext(entry)\"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabel(entry.node) }}</span>\n }\n </div>\n }\n } @else if (group()) {\n @for (\n groupOption of filteredOptions();\n track resolveOptionGroupLabel(groupOption) || $index\n ) {\n <div>\n <!-- Group Header -->\n <h6\n class=\"dropdown-header text-muted py-2 px-3 m-0 bg-light bg-opacity-75 d-flex align-items-center\"\n >\n @if (groupTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"groupTemplate()!; context: { $implicit: groupOption }\"\n ></ng-container>\n } @else {\n {{ resolveOptionGroupLabel(groupOption) }}\n }\n </h6>\n <!-- Group Items -->\n @for (\n option of resolveOptionGroupChildren(groupOption);\n track resolveOptionTrackKey(option, $index)\n ) {\n <button\n type=\"button\"\n class=\"dropdown-item d-flex align-items-center py-2 px-3\"\n [class.active]=\"!multiple() && isSelected(option)\"\n [class.bg-light]=\"multiple() && isSelected(option)\"\n [class.fw-semibold]=\"multiple() && isSelected(option)\"\n [class.focus]=\"isOptionFocused(option)\"\n [class.bg-body-secondary]=\"isOptionFocused(option) && !isSelected(option)\"\n [class.disabled]=\"isOptionDisabled(option)\"\n [disabled]=\"isOptionDisabled(option)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-checked]=\"multiple() ? isSelected(option) : null\"\n (click)=\"onOptionClick(option, $event)\"\n >\n <!-- Checkbox in Multiple Mode synced to selection -->\n @if (multiple()) {\n <input\n type=\"checkbox\"\n class=\"form-check-input me-2 mt-0\"\n style=\"pointer-events: none\"\n [checked]=\"isSelected(option)\"\n tabindex=\"-1\"\n />\n }\n @if (itemTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"itemTemplate()!; context: { $implicit: option }\"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabel(option) }}</span>\n }\n </button>\n }\n </div>\n }\n } @else {\n @for (\n option of filteredOptions();\n track resolveOptionTrackKey(option, $index);\n let i = $index\n ) {\n <button\n type=\"button\"\n class=\"dropdown-item d-flex align-items-center py-2 px-3\"\n [class.active]=\"!multiple() && isSelected(option)\"\n [class.bg-light]=\"multiple() && isSelected(option)\"\n [class.fw-semibold]=\"multiple() && isSelected(option)\"\n [class.focus]=\"isOptionFocused(option)\"\n [class.bg-body-secondary]=\"isOptionFocused(option) && !isSelected(option)\"\n [class.disabled]=\"isOptionDisabled(option)\"\n [disabled]=\"isOptionDisabled(option)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-checked]=\"multiple() ? isSelected(option) : null\"\n (click)=\"onOptionClick(option, $event)\"\n >\n <!-- Checkbox in Multiple Mode synced to selection -->\n @if (multiple()) {\n <input\n type=\"checkbox\"\n class=\"form-check-input me-2 mt-0\"\n style=\"pointer-events: none\"\n [checked]=\"isSelected(option)\"\n tabindex=\"-1\"\n />\n }\n @if (itemTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"itemTemplate()!; context: { $implicit: option }\"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabel(option) }}</span>\n }\n </button>\n }\n }\n\n <!-- Empty State Message -->\n @if (isOptionsEmpty()) {\n <div class=\"dropdown-item text-muted text-center py-3\">\n @if (emptyTemplate()) {\n <ng-container *ngTemplateOutlet=\"emptyTemplate()!\"></ng-container>\n } @else {\n <small>{{\n filterValue()\n ? emptyFilterMessage() || 'No results found'\n : emptyMessage() || 'No results found'\n }}</small>\n }\n </div>\n }\n </ng-template>\n\n @if (isModalMode()) {\n <!-- Bootstrap Modal Overlay -->\n @if (overlayVisible()) {\n <div\n class=\"modal fade show d-block\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-modal=\"true\"\n style=\"background-color: rgba(0, 0, 0, 0.45); z-index: 1075\"\n (click)=\"closeOverlay($event)\"\n >\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n role=\"document\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"modal-content shadow\" [ngClass]=\"panelStyleClass()\" [ngStyle]=\"panelStyle()\">\n <!-- Modal Header -->\n <div class=\"modal-header bg-light bg-opacity-50 py-2 px-3\">\n <h6 class=\"modal-title m-0 fw-semibold text-truncate\">{{ effectivePopupTitle() }}</h6>\n <button\n type=\"button\"\n class=\"btn-close\"\n aria-label=\"Close\"\n (click)=\"closeOverlay($event)\"\n ></button>\n </div>\n\n <!-- Modal Body (Options Content) -->\n <div\n class=\"modal-body p-0\"\n #dropdownMenu\n [attr.role]=\"tree() ? 'tree' : 'listbox'\"\n [attr.aria-multiselectable]=\"tree() && multiple() ? true : null\"\n (scroll)=\"onOverlayScroll($event)\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownContent\"></ng-container>\n </div>\n\n <!-- Modal Footer (Custom Template or Done Button) -->\n @if (footerTemplate() || multiple()) {\n <div\n class=\"modal-footer p-2 bg-light bg-opacity-50 d-flex align-items-center justify-content-end\"\n >\n @if (footerTemplate()) {\n <div class=\"w-100\">\n <ng-container *ngTemplateOutlet=\"footerTemplate()!\"></ng-container>\n </div>\n } @else {\n <button\n type=\"button\"\n class=\"btn btn-sm btn-primary px-3\"\n (click)=\"closeOverlay($event)\"\n >\n Done\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n } @else {\n <!-- Standard Dropdown Menu -->\n <div\n #dropdownMenu\n class=\"dropdown-menu shadow-sm p-0\"\n [class.show]=\"overlayVisible()\"\n [ngStyle]=\"panelStyle()\"\n [ngClass]=\"panelStyleClass()\"\n [style.max-height]=\"scrollHeight()\"\n style=\"overflow-y: auto\"\n [attr.role]=\"tree() ? 'tree' : 'listbox'\"\n [attr.aria-multiselectable]=\"tree() && multiple() ? true : null\"\n (scroll)=\"onOverlayScroll($event)\"\n (click)=\"$event.stopPropagation()\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownContent\"></ng-container>\n\n <!-- Footer Template -->\n @if (footerTemplate()) {\n <div class=\"p-2 border-top\">\n <ng-container *ngTemplateOutlet=\"footerTemplate()!\"></ng-container>\n </div>\n }\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%}:host.inline{display:inline-block;width:auto}.ngb-select-container{position:relative;-webkit-user-select:none;user-select:none;width:100%}.ngb-select-container .form-select{cursor:pointer;min-height:38px;background-image:none;padding-right:.75rem;padding-left:.75rem}.ngb-select-container .form-select.form-select-sm{min-height:31px;padding-right:.5rem;padding-left:.5rem}.ngb-select-container .form-select.form-select-lg{min-height:48px;padding-right:1rem;padding-left:1rem}.ngb-select-container .form-select.disabled,.ngb-select-container .form-select:disabled{cursor:not-allowed;background-color:var(--bs-secondary-bg);opacity:.65}.ngb-select-container.form-floating{display:block;width:100%;position:relative}.ngb-select-container.form-floating.float-variant-on,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over){margin-top:.35rem}.ngb-select-container.form-floating.float-variant-on .form-select,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over) .form-select{min-height:38px;height:auto;padding:.375rem .75rem;align-items:center}.ngb-select-container.form-floating.float-variant-on .form-select.form-select-sm,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over) .form-select.form-select-sm{min-height:31px;padding-top:.25rem;padding-bottom:.25rem}.ngb-select-container.form-floating.float-variant-on .form-select.form-select-lg,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over) .form-select.form-select-lg{min-height:48px;padding-top:.5rem;padding-bottom:.5rem}.ngb-select-container.form-floating.float-variant-on>label,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over)>label{position:absolute;top:50%;left:.75rem;transform:translateY(-50%);height:auto;padding:0 .35rem;margin:0;line-height:1;font-size:.95rem;color:var(--bs-secondary-color);pointer-events:none;border-radius:var(--bs-border-radius);background-color:transparent;transform-origin:left center;transition:transform .2s cubic-bezier(.25,.8,.25,1),top .2s cubic-bezier(.25,.8,.25,1),color .2s ease-in-out,background-color .2s ease-in-out;z-index:5}.ngb-select-container.form-floating.float-variant-on.floating-active>label,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over).floating-active>label{top:0;transform:translateY(-50%) scale(.85);background-color:var(--bs-body-bg);color:var(--bs-primary);font-weight:600}.ngb-select-container.form-floating.float-variant-in .form-select{height:calc(3.5rem + 2px);min-height:calc(3.5rem + 2px);padding:1.625rem .75rem .5rem;align-items:flex-end}.ngb-select-container.form-floating.float-variant-in>label{position:absolute;top:0;left:0;z-index:2;height:100%;padding:1rem .75rem;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:var(--bs-border-width) solid transparent;transform-origin:0 0;transition:opacity .15s ease-in-out,transform .15s ease-in-out,color .15s ease-in-out;color:rgba(var(--bs-body-color-rgb),.65);transform:scale(1) translateY(0)}.ngb-select-container.form-floating.float-variant-in.floating-active>label{transform:scale(.85) translateY(-.65rem) translate(.15rem);color:var(--bs-primary);font-weight:500}.ngb-select-container.form-floating.float-variant-over{margin-top:1.25rem}.ngb-select-container.form-floating.float-variant-over .form-select{min-height:38px;height:auto;padding:.375rem .75rem;align-items:center}.ngb-select-container.form-floating.float-variant-over .form-select.form-select-sm{min-height:31px}.ngb-select-container.form-floating.float-variant-over .form-select.form-select-lg{min-height:48px}.ngb-select-container.form-floating.float-variant-over>label{position:absolute;top:50%;left:.75rem;transform:translateY(-50%);height:auto;padding:0;margin:0;line-height:1;font-size:.95rem;color:var(--bs-secondary-color);pointer-events:none;transform-origin:left center;transition:transform .2s cubic-bezier(.25,.8,.25,1),top .2s cubic-bezier(.25,.8,.25,1),color .2s ease-in-out;z-index:5}.ngb-select-container.form-floating.float-variant-over.floating-active>label{top:-.75rem;transform:scale(.85);color:var(--bs-primary);font-weight:600}.ngb-select-container .ngb-select-clear-icon,.ngb-select-container .ngb-select-dropdown-icon{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;font-size:.875rem}.ngb-select-container .ngb-select-clear-icon i,.ngb-select-container .ngb-select-dropdown-icon i{transition:transform .2s ease-in-out}.ngb-select-container .ngb-select-clear-icon i.rotate-180,.ngb-select-container .ngb-select-dropdown-icon i.rotate-180{transform:rotate(180deg)}.ngb-select-container .ngb-select-clear-icon{opacity:.6;transition:opacity .15s ease}.ngb-select-container .ngb-select-clear-icon:hover{opacity:1}.ngb-select-container.dropup .dropdown-menu,.ngb-select-container.dropdown-up .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropdown-menu{top:100%;left:0;width:100%;min-width:100%;margin-top:.125rem;z-index:1060;box-sizing:border-box;text-align:inherit}.dropdown-menu .dropdown-item{cursor:pointer;white-space:normal;word-break:break-word;text-align:inherit}.dropdown-menu .dropdown-item.disabled,.dropdown-menu .dropdown-item:disabled{cursor:not-allowed;opacity:.5}.dropdown-menu .dropdown-item.focus,.dropdown-menu .dropdown-item.focused,.dropdown-menu .dropdown-item:focus{color:var(--bs-dropdown-link-hover-color, inherit);background-color:var(--bs-dropdown-link-hover-bg, var(--bs-tertiary-bg))!important}.dropdown-menu .dropdown-item.active{color:var(--bs-dropdown-link-active-color)!important;background-color:var(--bs-dropdown-link-active-bg)!important}.dropdown-menu .dropdown-header{font-weight:600;text-transform:uppercase;font-size:.75rem;letter-spacing:.05em;text-align:inherit}.dropdown-menu .ngb-select-tree-row,.ngb-select-tree-row{padding-inline-end:1rem;gap:.25rem}.ngb-select-tree-toggle,.ngb-select-tree-spacer{flex-shrink:0;width:1.25rem;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.ngb-select-tree-toggle i{font-size:.75rem;transition:transform .15s ease-in-out}.ngb-select-tree-toggle.ngb-select-tree-open i{transform:rotate(90deg)}.ngb-select-tree-toggle.ngb-select-tree-rtl.ngb-select-tree-open i{transform:rotate(-90deg)}.ngb-select-tree-check{flex-shrink:0;margin-inline-end:.25rem}\n"] }]
|
|
1356
|
-
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], showSelectAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSelectAll", required: false }] }], maxSelectedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelectedLabels", required: false }] }], selectedItemsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItemsLabel", required: false }] }], selectionLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionLimit", required: false }] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], filterMatchMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMatchMode", required: false }] }], filterLocale: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLocale", required: false }] }], filterNormalizeArabic: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterNormalizeArabic", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], filterInTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterInTrigger", required: false }] }], resetFilterOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetFilterOnHide", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], emptyFilterMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterMessage", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], floatLabelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabelVariant", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], dir: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], dropdownPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownPosition", required: false }] }], dropdownDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownDirection", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], panelStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyle", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: false }] }], popup: [{ type: i0.Input, args: [{ isSignal: true, alias: "popup", required: false }] }], touchUI: [{ type: i0.Input, args: [{ isSignal: true, alias: "touchUI", required: false }] }], popupTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupTitle", required: false }] }], modalTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalTitle", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], selectOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOnFocus", required: false }] }], autoOptionFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoOptionFocus", required: false }] }], focusOnOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnOpen", required: false }] }], focusOnOpenStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnOpenStrategy", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], tree: [{ type: i0.Input, args: [{ isSignal: true, alias: "tree", required: false }] }], optionChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionChildren", required: false }] }], treeSelectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeSelectable", required: false }] }], treeExpandAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeExpandAll", required: false }] }], treeShowPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeShowPath", required: false }] }], overlayVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayVisible", required: false }] }, { type: i0.Output, args: ["overlayVisibleChange"] }], onChange: [{ type: i0.Output, args: ["onChange"] }], onFilter: [{ type: i0.Output, args: ["onFilter"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onSelectAllChange: [{ type: i0.Output, args: ["onSelectAllChange"] }], onRemoveChip: [{ type: i0.Output, args: ["onRemoveChip"] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], onNodeExpand: [{ type: i0.Output, args: ["onNodeExpand"] }], onNodeCollapse: [{ type: i0.Output, args: ["onNodeCollapse"] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], selectedItemTemplate: [{ type: i0.ContentChild, args: ['selectedItem', { isSignal: true }] }], labelTemplate: [{ type: i0.ContentChild, args: ['label', { isSignal: true }] }], chipTemplate: [{ type: i0.ContentChild, args: ['chip', { isSignal: true }] }], headerCheckboxTemplate: [{ type: i0.ContentChild, args: ['headerCheckbox', { isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], emptyTemplate: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], clearIconTemplate: [{ type: i0.ContentChild, args: ['clearIcon', { isSignal: true }] }], dropdownIconTemplate: [{ type: i0.ContentChild, args: ['dropdownIcon', { isSignal: true }] }], filterIconTemplate: [{ type: i0.ContentChild, args: ['filterIcon', { isSignal: true }] }], filterInputElement: [{ type: i0.ViewChild, args: ['filterInput', { isSignal: true }] }], triggerFilterInputElement: [{ type: i0.ViewChild, args: ['triggerFilterInput', { isSignal: true }] }], editableInputElement: [{ type: i0.ViewChild, args: ['editableInput', { isSignal: true }] }], dropdownMenuElement: [{ type: i0.ViewChild, args: ['dropdownMenu', { isSignal: true }] }] } });
|
|
1642
|
+
], template: "<div\n class=\"ngb-select-container position-relative\"\n [class.form-floating]=\"floatLabel()\"\n [class.float-variant-on]=\"floatLabel() && floatLabelVariant() === 'on'\"\n [class.float-variant-in]=\"floatLabel() && floatLabelVariant() === 'in'\"\n [class.float-variant-over]=\"floatLabel() && floatLabelVariant() === 'over'\"\n [class.floating-active]=\"hasSelectedValue() || overlayVisible()\"\n [class.dropup]=\"isDropup()\"\n [class.dropdown-up]=\"isDropup()\"\n [class.w-100]=\"fluid()\"\n [attr.dir]=\"dir() || null\"\n [ngStyle]=\"style()\"\n [ngClass]=\"styleClass()\"\n (keydown)=\"onKeydown($event)\"\n>\n <!-- Select Trigger Box -->\n <div\n class=\"form-select ngb-select-trigger d-flex align-items-center justify-content-between\"\n [class.is-invalid]=\"invalid()\"\n [class.disabled]=\"disabled()\"\n [class.form-select-sm]=\"size() === 'small'\"\n [class.form-select-lg]=\"size() === 'large'\"\n [class.ngb-select-filled]=\"variant() === 'filled'\"\n [attr.id]=\"triggerId()\"\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"effectiveAriaLabelledBy()\"\n [attr.aria-expanded]=\"overlayVisible()\"\n [attr.aria-haspopup]=\"tree() ? 'tree' : 'listbox'\"\n [attr.aria-controls]=\"overlayVisible() ? panelId() : null\"\n [attr.aria-disabled]=\"disabled() || null\"\n role=\"combobox\"\n (click)=\"onTriggerClick($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n >\n <!-- Selected Value / Input / Chips Area -->\n <span\n class=\"ngb-select-value text-truncate flex-grow-1 d-flex flex-wrap align-items-center gap-1\"\n >\n <!-- Filter directly in Trigger Box -->\n @if (filterInTrigger()) {\n <!-- Chips in multiple mode when filterInTrigger is active -->\n @if (multiple() && display() === 'chip' && hasSelectedValue()) {\n @for (val of value(); track val) {\n <span class=\"badge ngb-select-chip d-inline-flex align-items-center gap-1 py-1 px-2\">\n @if (chipTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n chipTemplate()!;\n context: { $implicit: findOptionByValue(val) ?? val, value: val }\n \"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabelByValue(val) }}</span>\n }\n @if (!disabled() && !readonly()) {\n <i\n class=\"bi bi-x ngb-select-chip-remove\"\n role=\"button\"\n [attr.aria-label]=\"removeChipText(val)\"\n [attr.title]=\"removeChipText(val)\"\n (click)=\"removeChip(val, $event)\"\n ></i>\n }\n </span>\n }\n }\n <!-- Search Filter Input embedded inside the trigger -->\n <input\n #triggerFilterInput\n type=\"text\"\n class=\"form-control ngb-select-inline-input border-0 bg-transparent p-0 shadow-none flex-grow-1\"\n style=\"min-width: 80px\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"effectiveAriaLabelledBy()\"\n [attr.aria-controls]=\"overlayVisible() ? panelId() : null\"\n aria-autocomplete=\"list\"\n [class.form-control-sm]=\"size() === 'small'\"\n [class.form-control-lg]=\"size() === 'large'\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"effectiveFilterValue()\"\n [placeholder]=\"\n multiple() && hasSelectedValue()\n ? ''\n : hasSelectedValue() && !overlayVisible()\n ? displayLabel()\n : effectiveSearchPlaceholder()\n \"\n (input)=\"onFilterChange($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n (focus)=\"openOverlay($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n <!-- Editable Input (Single mode only) -->\n @if (editable() && !multiple()) {\n <input\n #editableInput\n type=\"text\"\n class=\"form-control ngb-select-inline-input border-0 bg-transparent p-0 shadow-none\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"effectiveAriaLabelledBy()\"\n [class.form-control-sm]=\"size() === 'small'\"\n [class.form-control-lg]=\"size() === 'large'\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.maxlength]=\"maxLength()\"\n [value]=\"displayLabel()\"\n [placeholder]=\"placeholder() || ''\"\n (input)=\"onEditableInput($event)\"\n (focus)=\"onEditableFocus($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n <!-- Multi-Select Chips Display Mode -->\n @if (multiple() && display() === 'chip' && hasSelectedValue()) {\n @for (val of value(); track val) {\n <span class=\"badge ngb-select-chip d-inline-flex align-items-center gap-1 py-1 px-2\">\n @if (chipTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n chipTemplate()!;\n context: { $implicit: findOptionByValue(val) ?? val, value: val }\n \"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabelByValue(val) }}</span>\n }\n @if (!disabled() && !readonly()) {\n <i\n class=\"bi bi-x ngb-select-chip-remove\"\n role=\"button\"\n [attr.aria-label]=\"removeChipText(val)\"\n [attr.title]=\"removeChipText(val)\"\n (click)=\"removeChip(val, $event)\"\n ></i>\n }\n </span>\n }\n } @else {\n @if (hasSelectedValue()) {\n @if (selectedItemTemplate() || labelTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n selectedItemTemplate() || labelTemplate()!;\n context: tree()\n ? selectedItemContext(value())\n : { $implicit: findOptionByValue(value()) ?? value(), value: value() }\n \"\n ></ng-container>\n } @else {\n <span>{{ displayLabel() }}</span>\n }\n } @else {\n <span class=\"text-muted ngb-select-placeholder\">{{\n floatLabel() ? '' : placeholder() || ''\n }}</span>\n }\n }\n <!-- Standard Single or Comma Multi-Select Text -->\n }\n }\n </span>\n\n <!-- Icons & Spinners Area -->\n <div class=\"ngb-select-icons d-flex align-items-center flex-shrink-0 gap-1\">\n <!-- Clear Icon -->\n @if (showClear() && hasSelectedValue() && !disabled() && !readonly()) {\n <span\n class=\"ngb-select-clear-icon\"\n (click)=\"onClearClick($event)\"\n (keydown.enter)=\"onClearClick($event)\"\n [attr.title]=\"clearLabel()\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"clearValueLabel()\"\n >\n @if (clearIconTemplate()) {\n <ng-container *ngTemplateOutlet=\"clearIconTemplate()!\"></ng-container>\n } @else {\n <i class=\"bi bi-x-circle-fill\"></i>\n }\n </span>\n }\n\n <!-- Loading Spinner -->\n @if (loading()) {\n <div class=\"spinner-border spinner-border-sm text-secondary\" role=\"status\">\n <span class=\"visually-hidden\">{{ loadingLabel() }}</span>\n </div>\n }\n\n <!-- Dropdown Caret Icon -->\n @if (!loading()) {\n <span class=\"ngb-select-dropdown-icon\">\n @if (dropdownIconTemplate()) {\n <ng-container *ngTemplateOutlet=\"dropdownIconTemplate()!\"></ng-container>\n } @else {\n <i class=\"bi bi-chevron-down\" [class.rotate-180]=\"overlayVisible()\"></i>\n }\n </span>\n }\n </div>\n </div>\n\n <!-- Float Label Support -->\n @if (floatLabel() && placeholder()) {\n <label [attr.for]=\"triggerId()\">{{ placeholder() }}</label>\n }\n\n <ng-template #dropdownContent>\n <!-- Header Template -->\n @if (headerTemplate()) {\n <div class=\"p-2 border-bottom\">\n <ng-container *ngTemplateOutlet=\"headerTemplate()!\"></ng-container>\n </div>\n }\n\n <!-- Header: Select All Checkbox & Search / Filter Box -->\n @if ((filter() && !filterInTrigger()) || (multiple() && showSelectAll())) {\n <div class=\"p-2 border-bottom bg-light bg-opacity-50\">\n <!-- Select All Checkbox -->\n @if (multiple() && showSelectAll()) {\n <div class=\"ngb-select-select-all d-flex align-items-center mb-2 px-1\">\n <input\n type=\"checkbox\"\n class=\"form-check-input ngb-select-check mt-0\"\n [checked]=\"selectAll()\"\n (change)=\"toggleSelectAll($event)\"\n id=\"selectAllCheckbox\"\n />\n <label\n class=\"form-check-label small fw-semibold user-select-none\"\n for=\"selectAllCheckbox\"\n >\n @if (headerCheckboxTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"headerCheckboxTemplate()!; context: { $implicit: selectAll() }\"\n ></ng-container>\n } @else {\n {{ selectAllLabel() }}\n }\n </label>\n </div>\n }\n <!-- Search Box -->\n @if (filter() && !filterInTrigger()) {\n <div class=\"ngb-select-search\">\n <span class=\"ngb-select-search-icon\" aria-hidden=\"true\">\n @if (filterIconTemplate()) {\n <ng-container *ngTemplateOutlet=\"filterIconTemplate()!\"></ng-container>\n } @else {\n <i class=\"bi bi-search\"></i>\n }\n </span>\n <input\n #filterInput\n type=\"text\"\n class=\"form-control form-control-sm ngb-select-search-input\"\n [attr.aria-label]=\"effectiveSearchPlaceholder()\"\n [attr.aria-controls]=\"panelId()\"\n aria-autocomplete=\"list\"\n [placeholder]=\"effectiveSearchPlaceholder()\"\n [value]=\"filterValue()\"\n (input)=\"onFilterChange($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n />\n </div>\n }\n </div>\n }\n\n <!-- Tree Mode -->\n @if (tree()) {\n @for (entry of visibleTreeNodes(); track entry.key; let i = $index) {\n <div\n class=\"dropdown-item ngb-select-option d-flex align-items-center ngb-select-tree-row\"\n [style.padding-inline-start]=\"treeIndent(entry.depth)\"\n [class.active]=\"!multiple() && isSelected(entry.node)\"\n [class.ngb-select-option-checked]=\"multiple() && isSelected(entry.node)\"\n [class.focus]=\"focusedIndex() === i\"\n [class.disabled]=\"isOptionDisabled(entry.node)\"\n role=\"treeitem\"\n [attr.aria-level]=\"entry.depth + 1\"\n [attr.aria-expanded]=\"entry.hasChildren ? entry.expanded : null\"\n [attr.aria-selected]=\"isSelected(entry.node)\"\n [attr.aria-disabled]=\"isOptionDisabled(entry.node) || null\"\n (click)=\"onTreeRowClick(entry, $event)\"\n >\n @if (entry.hasChildren) {\n <button\n type=\"button\"\n class=\"btn btn-link btn-sm p-0 text-reset lh-1 ngb-select-tree-toggle\"\n [class.ngb-select-tree-open]=\"entry.expanded\"\n [class.ngb-select-tree-rtl]=\"isRtl()\"\n tabindex=\"-1\"\n [attr.aria-label]=\"entry.expanded ? collapseLabel() : expandLabel()\"\n (click)=\"onTreeToggleClick(entry, $event)\"\n >\n <i\n class=\"bi\"\n [class.bi-chevron-right]=\"!isRtl()\"\n [class.bi-chevron-left]=\"isRtl()\"\n ></i>\n </button>\n } @else {\n <span class=\"ngb-select-tree-spacer\" aria-hidden=\"true\"></span>\n }\n @if (multiple()) {\n <input\n type=\"checkbox\"\n class=\"form-check-input mt-0 ngb-select-check ngb-select-tree-check\"\n aria-hidden=\"true\"\n style=\"pointer-events: none\"\n [checked]=\"isSelected(entry.node)\"\n tabindex=\"-1\"\n />\n }\n @if (itemTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"itemTemplate()!; context: treeItemContext(entry)\"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabel(entry.node) }}</span>\n }\n </div>\n }\n } @else if (group()) {\n @for (\n groupOption of filteredOptions();\n track resolveOptionGroupLabel(groupOption) || $index\n ) {\n <div>\n <!-- Group Header -->\n <h6\n class=\"dropdown-header text-muted py-2 px-3 m-0 bg-light bg-opacity-75 d-flex align-items-center\"\n >\n @if (groupTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"groupTemplate()!; context: { $implicit: groupOption }\"\n ></ng-container>\n } @else {\n {{ resolveOptionGroupLabel(groupOption) }}\n }\n </h6>\n <!-- Group Items -->\n @for (\n option of resolveOptionGroupChildren(groupOption);\n track resolveOptionTrackKey(option, $index)\n ) {\n <button\n type=\"button\"\n class=\"dropdown-item ngb-select-option d-flex align-items-center\"\n [class.active]=\"!multiple() && isSelected(option)\"\n [class.ngb-select-option-checked]=\"multiple() && isSelected(option)\"\n [class.focus]=\"isOptionFocused(option)\"\n [class.disabled]=\"isOptionDisabled(option)\"\n [disabled]=\"isOptionDisabled(option)\"\n [attr.aria-disabled]=\"isOptionDisabled(option) || null\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-checked]=\"multiple() ? isSelected(option) : null\"\n (click)=\"onOptionClick(option, $event)\"\n >\n <!-- Checkbox in Multiple Mode synced to selection -->\n @if (multiple()) {\n <input\n type=\"checkbox\"\n class=\"form-check-input ngb-select-check mt-0\"\n aria-hidden=\"true\"\n style=\"pointer-events: none\"\n [checked]=\"isSelected(option)\"\n tabindex=\"-1\"\n />\n }\n @if (itemTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"itemTemplate()!; context: { $implicit: option }\"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabel(option) }}</span>\n }\n </button>\n }\n </div>\n }\n } @else {\n @for (\n option of filteredOptions();\n track resolveOptionTrackKey(option, $index);\n let i = $index\n ) {\n <button\n type=\"button\"\n class=\"dropdown-item ngb-select-option d-flex align-items-center\"\n [class.active]=\"!multiple() && isSelected(option)\"\n [class.ngb-select-option-checked]=\"multiple() && isSelected(option)\"\n [class.focus]=\"isOptionFocused(option)\"\n [class.disabled]=\"isOptionDisabled(option)\"\n [disabled]=\"isOptionDisabled(option)\"\n [attr.aria-disabled]=\"isOptionDisabled(option) || null\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-checked]=\"multiple() ? isSelected(option) : null\"\n (click)=\"onOptionClick(option, $event)\"\n >\n <!-- Checkbox in Multiple Mode synced to selection -->\n @if (multiple()) {\n <input\n type=\"checkbox\"\n class=\"form-check-input ngb-select-check mt-0\"\n aria-hidden=\"true\"\n style=\"pointer-events: none\"\n [checked]=\"isSelected(option)\"\n tabindex=\"-1\"\n />\n }\n @if (itemTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"itemTemplate()!; context: { $implicit: option }\"\n ></ng-container>\n } @else {\n <span>{{ resolveOptionLabel(option) }}</span>\n }\n </button>\n }\n }\n\n <!-- Tagging: \"Add {term}\" row -->\n @if (addTagTerm() !== null) {\n <div\n class=\"dropdown-item ngb-select-option ngb-select-add-tag d-flex align-items-center\"\n [class.focus]=\"isAddTagFocused()\"\n role=\"option\"\n aria-selected=\"false\"\n (click)=\"addTagFromFilter($event)\"\n >\n <i class=\"bi bi-plus-lg ngb-select-add-tag-icon\" aria-hidden=\"true\"></i>\n <span>{{ addTagText() }}</span>\n </div>\n }\n\n <!-- Empty State Message -->\n @if (isOptionsEmpty() && addTagTerm() === null) {\n <div class=\"dropdown-item ngb-select-empty text-muted text-center py-3\">\n @if (emptyTemplate()) {\n <ng-container *ngTemplateOutlet=\"emptyTemplate()!\"></ng-container>\n } @else {\n <small>{{\n filterValue()\n ? emptyFilterMessage() || 'No results found'\n : emptyMessage() || 'No results found'\n }}</small>\n }\n </div>\n }\n </ng-template>\n\n @if (isModalMode()) {\n <!-- Bootstrap Modal Overlay -->\n @if (overlayVisible()) {\n <div\n class=\"modal fade show d-block\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-modal=\"true\"\n style=\"background-color: rgba(0, 0, 0, 0.45); z-index: 1075\"\n (click)=\"closeOverlay($event)\"\n >\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n role=\"document\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"modal-content shadow\" [ngClass]=\"panelStyleClass()\" [ngStyle]=\"panelStyle()\">\n <!-- Modal Header -->\n <div class=\"modal-header bg-light bg-opacity-50 py-2 px-3\">\n <h6 class=\"modal-title m-0 fw-semibold text-truncate\">{{ effectivePopupTitle() }}</h6>\n <button\n type=\"button\"\n class=\"btn-close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"closeOverlay($event)\"\n ></button>\n </div>\n\n <!-- Modal Body (Options Content) -->\n <div\n class=\"modal-body p-0 ngb-select-modal-body\"\n #dropdownMenu\n [attr.id]=\"panelId()\"\n [attr.role]=\"tree() ? 'tree' : 'listbox'\"\n [attr.aria-multiselectable]=\"tree() && multiple() ? true : null\"\n (scroll)=\"onOverlayScroll($event)\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownContent\"></ng-container>\n </div>\n\n <!-- Modal Footer (Custom Template or Done Button) -->\n @if (footerTemplate() || multiple()) {\n <div\n class=\"modal-footer p-2 bg-light bg-opacity-50 d-flex align-items-center justify-content-end\"\n >\n @if (footerTemplate()) {\n <div class=\"w-100\">\n <ng-container *ngTemplateOutlet=\"footerTemplate()!\"></ng-container>\n </div>\n } @else {\n <button\n type=\"button\"\n class=\"btn btn-sm btn-primary px-3\"\n (click)=\"closeOverlay($event)\"\n >\n {{ doneLabel() }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n } @else {\n <!-- Standard Dropdown Menu -->\n <div\n #dropdownMenu\n class=\"dropdown-menu ngb-select-panel p-0\"\n [class.show]=\"overlayVisible()\"\n [attr.id]=\"panelId()\"\n [ngStyle]=\"panelStyle()\"\n [ngClass]=\"panelStyleClass()\"\n [style.max-height]=\"scrollHeight()\"\n style=\"overflow-y: auto\"\n [attr.role]=\"tree() ? 'tree' : 'listbox'\"\n [attr.aria-multiselectable]=\"tree() && multiple() ? true : null\"\n (scroll)=\"onOverlayScroll($event)\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- Content is rendered only while open, so no option exists in the DOM when closed -->\n @if (overlayVisible()) {\n <ng-container *ngTemplateOutlet=\"dropdownContent\"></ng-container>\n\n <!-- Footer Template -->\n @if (footerTemplate()) {\n <div class=\"p-2 border-top\">\n <ng-container *ngTemplateOutlet=\"footerTemplate()!\"></ng-container>\n </div>\n }\n }\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%}:host.inline{display:inline-block;width:auto}.ngb-select-container{position:relative;-webkit-user-select:none;user-select:none;width:100%;font-family:var(--ngb-select-font-family, inherit)}.ngb-select-container.form-floating{display:block;width:100%;position:relative}.ngb-select-container.form-floating.float-variant-on,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over){margin-top:.35rem}.ngb-select-container.form-floating.float-variant-on .form-select,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over) .form-select{min-height:var(--ngb-select-min-height, 38px);height:auto;padding-top:.375rem;padding-bottom:.375rem;padding-inline:var(--ngb-select-padding-x, .75rem);align-items:center}.ngb-select-container.form-floating.float-variant-on .form-select.form-select-sm,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over) .form-select.form-select-sm{min-height:var(--ngb-select-min-height-sm, 31px);padding-top:.25rem;padding-bottom:.25rem}.ngb-select-container.form-floating.float-variant-on .form-select.form-select-lg,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over) .form-select.form-select-lg{min-height:var(--ngb-select-min-height-lg, 48px);padding-top:.5rem;padding-bottom:.5rem}.ngb-select-container.form-floating.float-variant-on>label,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over)>label{position:absolute;top:50%;inset-inline-start:.75rem;inset-inline-end:auto;transform:translateY(-50%);height:auto;padding:0 .35rem;margin:0;line-height:1;font-size:.95rem;color:var(--bs-secondary-color);pointer-events:none;border-radius:var(--bs-border-radius);background-color:transparent;transform-origin:left center;transition:transform .2s cubic-bezier(.25,.8,.25,1),top .2s cubic-bezier(.25,.8,.25,1),color .2s ease-in-out,background-color .2s ease-in-out;z-index:5}.ngb-select-container.form-floating.float-variant-on.floating-active>label,.ngb-select-container.form-floating:not(.float-variant-in):not(.float-variant-over).floating-active>label{top:0;transform:translateY(-50%) scale(.85);background-color:var(--ngb-select-bg, var(--bs-body-bg));color:var(--ngb-select-accent-color, var(--bs-primary));font-weight:600}.ngb-select-container.form-floating.float-variant-in .form-select{height:calc(3.5rem + 2px);min-height:calc(3.5rem + 2px);padding-top:1.625rem;padding-bottom:.5rem;padding-inline:var(--ngb-select-padding-x, .75rem);align-items:flex-end}.ngb-select-container.form-floating.float-variant-in>label{position:absolute;top:0;inset-inline-start:0;inset-inline-end:auto;z-index:2;height:100%;padding:1rem .75rem;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:var(--bs-border-width) solid transparent;transform-origin:0 0;transition:opacity .15s ease-in-out,transform .15s ease-in-out,color .15s ease-in-out;color:rgba(var(--bs-body-color-rgb),.65);transform:scale(1) translateY(0)}.ngb-select-container.form-floating.float-variant-in.floating-active>label{transform:scale(.85) translateY(-.65rem) translate(.15rem);color:var(--ngb-select-accent-color, var(--bs-primary));font-weight:500}.ngb-select-container.form-floating.float-variant-over{margin-top:1.25rem}.ngb-select-container.form-floating.float-variant-over .form-select{min-height:var(--ngb-select-min-height, 38px);height:auto;padding-top:.375rem;padding-bottom:.375rem;padding-inline:var(--ngb-select-padding-x, .75rem);align-items:center}.ngb-select-container.form-floating.float-variant-over .form-select.form-select-sm{min-height:var(--ngb-select-min-height-sm, 31px)}.ngb-select-container.form-floating.float-variant-over .form-select.form-select-lg{min-height:var(--ngb-select-min-height-lg, 48px)}.ngb-select-container.form-floating.float-variant-over>label{position:absolute;top:50%;inset-inline-start:.75rem;inset-inline-end:auto;transform:translateY(-50%);height:auto;padding:0;margin:0;line-height:1;font-size:.95rem;color:var(--bs-secondary-color);pointer-events:none;transform-origin:left center;transition:transform .2s cubic-bezier(.25,.8,.25,1),top .2s cubic-bezier(.25,.8,.25,1),color .2s ease-in-out;z-index:5}.ngb-select-container.form-floating.float-variant-over.floating-active>label{top:-.75rem;transform:scale(.85);color:var(--ngb-select-accent-color, var(--bs-primary));font-weight:600}.ngb-select-container.dropup .dropdown-menu,.ngb-select-container.dropdown-up .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}:host-context([dir=rtl]) .ngb-select-container.form-floating>label,.ngb-select-container[dir=rtl].form-floating>label{transform-origin:right center}:host-context([dir=rtl]) .ngb-select-container.form-floating.float-variant-in.floating-active>label,.ngb-select-container[dir=rtl].form-floating.float-variant-in.floating-active>label{transform:scale(.85) translateY(-.65rem) translate(-.15rem)}.ngb-select-trigger{cursor:pointer;min-height:var(--ngb-select-min-height, 38px);padding-inline:var(--ngb-select-padding-x, .75rem);font-family:var(--ngb-select-font-family, inherit);font-size:var(--ngb-select-font-size, inherit);color:var(--ngb-select-color, var(--bs-body-color));background-color:var(--ngb-select-bg, var(--bs-body-bg));background-image:none;border-color:var(--ngb-select-border-color, var(--bs-border-color));border-radius:var(--ngb-select-border-radius, var(--bs-border-radius))}.ngb-select-trigger:where(.form-select-sm){min-height:var(--ngb-select-min-height-sm, 31px);padding-inline:var(--ngb-select-padding-x-sm, .5rem);border-radius:var(--ngb-select-border-radius, var(--bs-border-radius-sm))}.ngb-select-trigger:where(.form-select-lg){min-height:var(--ngb-select-min-height-lg, 48px);padding-inline:var(--ngb-select-padding-x-lg, 1rem);border-radius:var(--ngb-select-border-radius, var(--bs-border-radius-lg))}.ngb-select-trigger:where(.ngb-select-filled){background-color:var(--ngb-select-filled-bg, var(--bs-light))}.ngb-select-trigger:where(:focus,:focus-within){outline:var(--ngb-select-focus-outline, 0);outline-offset:var(--ngb-select-focus-outline-offset, 0);border-color:var(--ngb-select-focus-border-color, #86b7fe);box-shadow:var(--ngb-select-focus-shadow, 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25))}.ngb-select-trigger:where(.is-invalid){border-color:var(--ngb-select-invalid-border-color, var(--bs-form-invalid-border-color))}.ngb-select-trigger:where(.is-invalid):where(:focus,:focus-within){box-shadow:var(--ngb-select-invalid-focus-shadow, 0 0 0 .25rem rgba(var(--bs-danger-rgb), .25))}.ngb-select-trigger:where(.disabled){cursor:not-allowed;background-color:var(--ngb-select-disabled-bg, var(--bs-secondary-bg));opacity:.65}.ngb-select-value{margin-inline-end:.5rem;text-align:start}.ngb-select-icons{margin-inline-start:auto;color:var(--ngb-select-icon-color, var(--bs-secondary-color))}.ngb-select-clear-icon,.ngb-select-dropdown-icon{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;font-size:.875rem;color:inherit}.ngb-select-clear-icon i,.ngb-select-dropdown-icon i{transition:transform .2s ease-in-out}.ngb-select-clear-icon i.rotate-180,.ngb-select-dropdown-icon i.rotate-180{transform:rotate(180deg)}.ngb-select-clear-icon{margin-inline-end:.25rem;opacity:.6;transition:opacity .15s ease}.ngb-select-clear-icon:hover,.ngb-select-clear-icon:focus-visible{opacity:1}.ngb-select-chip{font-family:inherit;font-weight:var(--ngb-select-chip-font-weight, 500);color:var(--ngb-select-chip-color, var(--bs-body-color));background-color:var(--ngb-select-chip-bg, var(--bs-light));border:var(--bs-border-width) solid var(--ngb-select-chip-border-color, var(--bs-border-color));border-radius:var(--ngb-select-chip-border-radius, var(--bs-border-radius))}.ngb-select-chip-remove{cursor:pointer;font-weight:700;margin-inline-start:.25rem}.ngb-select-panel{top:100%;inset-inline-start:0;inset-inline-end:auto;width:max-content;min-width:100%;max-width:min(max(100%,var(--ngb-select-panel-max-width, 20rem)),100vw - 1rem);margin-top:.125rem;z-index:1060;box-sizing:border-box;text-align:start;overflow-y:auto;font-family:var(--ngb-select-font-family, inherit);font-size:var(--ngb-select-font-size, inherit);color:var(--ngb-select-option-color, var(--bs-body-color));background-color:var(--ngb-select-panel-bg, var(--bs-body-bg));border-color:var(--ngb-select-panel-border-color, var(--bs-border-color-translucent));border-radius:var(--ngb-select-panel-border-radius, var(--bs-border-radius));box-shadow:var(--ngb-select-panel-shadow, var(--bs-box-shadow-sm))}.dropdown-header{font-weight:600;text-transform:uppercase;font-size:.75rem;letter-spacing:.05em;text-align:start}.ngb-select-search{position:relative}.ngb-select-search-icon{position:absolute;top:50%;inset-inline-start:.625rem;transform:translateY(-50%);display:inline-flex;pointer-events:none;font-size:.875rem;color:var(--ngb-select-icon-color, var(--bs-secondary-color))}.ngb-select-search-input{padding-inline-start:2rem;font-family:inherit;border-color:var(--ngb-select-border-color, var(--bs-border-color));border-radius:var(--ngb-select-border-radius, var(--bs-border-radius-sm))}.ngb-select-search-input:where(:focus){border-color:var(--ngb-select-focus-border-color, #86b7fe);box-shadow:var(--ngb-select-focus-shadow, 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25))}.ngb-select-option{cursor:pointer;white-space:normal;word-break:break-word;text-align:start;gap:.5rem;padding-block:var(--ngb-select-option-padding-y, .5rem);padding-inline:var(--ngb-select-option-padding-x, 1rem);color:var(--ngb-select-option-color, var(--bs-body-color));background-color:transparent}.ngb-select-option:where(:hover,:focus,:focus-visible,.focus,.focused){color:var(--ngb-select-option-hover-color, var(--ngb-select-option-color, var(--bs-body-color)));background-color:var(--ngb-select-option-hover-bg, var(--bs-tertiary-bg))}.ngb-select-panel .ngb-select-option:where(:hover,:focus-visible,.focus,.focused){color:var(--ngb-select-option-hover-color, var(--ngb-select-option-color, var(--bs-body-color)));background-color:var(--ngb-select-option-hover-bg, var(--bs-tertiary-bg))}.ngb-select-panel .ngb-select-option:where(:active){color:var(--ngb-select-option-pressed-color, var(--ngb-select-option-hover-color, var(--ngb-select-option-color, var(--bs-body-color))));background-color:var(--ngb-select-option-pressed-bg, var(--ngb-select-option-hover-bg, var(--bs-tertiary-bg)))}.ngb-select-option:where(.ngb-select-option-checked){font-weight:var(--ngb-select-option-checked-font-weight, 600);color:var(--ngb-select-option-checked-color, var(--ngb-select-option-color, inherit));background-color:var(--ngb-select-option-checked-bg, var(--bs-light))}.ngb-select-option:where(.active){font-weight:var(--ngb-select-option-selected-font-weight, inherit);color:var(--ngb-select-option-selected-color, var(--bs-dropdown-link-active-color, #fff));background-color:var(--ngb-select-option-selected-bg, var(--bs-dropdown-link-active-bg, var(--bs-primary)))}.ngb-select-option:where(.disabled,:disabled){cursor:not-allowed;opacity:.5;background-color:transparent}.ngb-select-check{flex-shrink:0;margin-inline:0;cursor:pointer}.ngb-select-check:where(:checked){background-color:var(--ngb-select-check-checked-bg, var(--bs-primary));border-color:var(--ngb-select-check-checked-bg, var(--bs-primary))}.ngb-select-select-all{gap:.5rem}.ngb-select-add-tag-icon{flex-shrink:0;font-size:.875rem}.ngb-select-tree-row{padding-inline-end:var(--ngb-select-option-padding-x, 1rem);gap:.25rem}.ngb-select-tree-toggle,.ngb-select-tree-spacer{flex-shrink:0;width:1.25rem;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.ngb-select-tree-toggle i{font-size:.75rem;transition:transform .15s ease-in-out}.ngb-select-tree-toggle.ngb-select-tree-open i{transform:rotate(90deg)}.ngb-select-tree-toggle.ngb-select-tree-rtl.ngb-select-tree-open i{transform:rotate(-90deg)}.ngb-select-tree-check{margin-inline-end:.25rem}\n"] }]
|
|
1643
|
+
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], showSelectAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSelectAll", required: false }] }], maxSelectedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelectedLabels", required: false }] }], selectedItemsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItemsLabel", required: false }] }], selectionLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionLimit", required: false }] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], filterMatchMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMatchMode", required: false }] }], filterLocale: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLocale", required: false }] }], filterNormalizeArabic: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterNormalizeArabic", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], filterInTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterInTrigger", required: false }] }], resetFilterOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetFilterOnHide", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], emptyFilterMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterMessage", required: false }] }], addTag: [{ type: i0.Input, args: [{ isSignal: true, alias: "addTag", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], floatLabelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabelVariant", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], dir: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], dropdownPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownPosition", required: false }] }], dropdownDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownDirection", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], panelStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyle", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: false }] }], popup: [{ type: i0.Input, args: [{ isSignal: true, alias: "popup", required: false }] }], touchUI: [{ type: i0.Input, args: [{ isSignal: true, alias: "touchUI", required: false }] }], popupTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupTitle", required: false }] }], modalTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalTitle", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], selectOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOnFocus", required: false }] }], autoOptionFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoOptionFocus", required: false }] }], focusOnOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnOpen", required: false }] }], focusOnOpenStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnOpenStrategy", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], clearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearLabel", required: false }] }], clearValueLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearValueLabel", required: false }] }], loadingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingLabel", required: false }] }], selectAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllLabel", required: false }] }], doneLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "doneLabel", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], expandLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandLabel", required: false }] }], collapseLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseLabel", required: false }] }], removeChipLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeChipLabel", required: false }] }], addTagLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "addTagLabel", required: false }] }], tree: [{ type: i0.Input, args: [{ isSignal: true, alias: "tree", required: false }] }], optionChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionChildren", required: false }] }], treeSelectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeSelectable", required: false }] }], treeExpandAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeExpandAll", required: false }] }], treeShowPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeShowPath", required: false }] }], overlayVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayVisible", required: false }] }, { type: i0.Output, args: ["overlayVisibleChange"] }], onChange: [{ type: i0.Output, args: ["onChange"] }], onFilter: [{ type: i0.Output, args: ["onFilter"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onSelectAllChange: [{ type: i0.Output, args: ["onSelectAllChange"] }], onRemoveChip: [{ type: i0.Output, args: ["onRemoveChip"] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], onNodeExpand: [{ type: i0.Output, args: ["onNodeExpand"] }], onNodeCollapse: [{ type: i0.Output, args: ["onNodeCollapse"] }], onAdd: [{ type: i0.Output, args: ["onAdd"] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], selectedItemTemplate: [{ type: i0.ContentChild, args: ['selectedItem', { isSignal: true }] }], labelTemplate: [{ type: i0.ContentChild, args: ['label', { isSignal: true }] }], chipTemplate: [{ type: i0.ContentChild, args: ['chip', { isSignal: true }] }], headerCheckboxTemplate: [{ type: i0.ContentChild, args: ['headerCheckbox', { isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], emptyTemplate: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], clearIconTemplate: [{ type: i0.ContentChild, args: ['clearIcon', { isSignal: true }] }], dropdownIconTemplate: [{ type: i0.ContentChild, args: ['dropdownIcon', { isSignal: true }] }], filterIconTemplate: [{ type: i0.ContentChild, args: ['filterIcon', { isSignal: true }] }], filterInputElement: [{ type: i0.ViewChild, args: ['filterInput', { isSignal: true }] }], triggerFilterInputElement: [{ type: i0.ViewChild, args: ['triggerFilterInput', { isSignal: true }] }], editableInputElement: [{ type: i0.ViewChild, args: ['editableInput', { isSignal: true }] }], dropdownMenuElement: [{ type: i0.ViewChild, args: ['dropdownMenu', { isSignal: true }] }] } });
|
|
1357
1644
|
|
|
1358
1645
|
/**
|
|
1359
1646
|
* Generated bundle index. Do not edit.
|
|
1360
1647
|
*/
|
|
1361
1648
|
|
|
1362
|
-
export { NGB_SELECT_VERSION, NgbSelectComponent };
|
|
1649
|
+
export { NGB_SELECT_CONFIG, NGB_SELECT_DEFAULT_LABELS, NGB_SELECT_VERSION, NgbSelectComponent, provideNgbSelectConfig };
|
|
1363
1650
|
//# sourceMappingURL=amro93-ngb-select.mjs.map
|