@amro93/ngb-select 0.1.7 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,61 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, ChangeDetectorRef, input, 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
- const NGB_SELECT_VERSION = '0.1.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.0';
8
26
 
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;
9
48
  class NgbSelectComponent {
10
49
  static VERSION = NGB_SELECT_VERSION;
11
50
  // --- Dependency Injection ---
12
51
  elementRef = inject(ElementRef);
13
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
+ };
14
59
  // --- Basic & Data Inputs ---
15
60
  options = input([], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
16
61
  optionLabel = input('label', ...(ngDevMode ? [{ debugName: "optionLabel" }] : /* istanbul ignore next */ []));
@@ -26,11 +71,11 @@ class NgbSelectComponent {
26
71
  display = input('comma', ...(ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []));
27
72
  showSelectAll = input(false, ...(ngDevMode ? [{ debugName: "showSelectAll" }] : /* istanbul ignore next */ []));
28
73
  maxSelectedLabels = input(3, ...(ngDevMode ? [{ debugName: "maxSelectedLabels" }] : /* istanbul ignore next */ []));
29
- selectedItemsLabel = input('{0} items selected', ...(ngDevMode ? [{ debugName: "selectedItemsLabel" }] : /* istanbul ignore next */ []));
74
+ selectedItemsLabel = input(this.labels.selectedItems, ...(ngDevMode ? [{ debugName: "selectedItemsLabel" }] : /* istanbul ignore next */ []));
30
75
  selectionLimit = input(undefined, ...(ngDevMode ? [{ debugName: "selectionLimit" }] : /* istanbul ignore next */ []));
31
76
  closeOnSelect = input(false, ...(ngDevMode ? [{ debugName: "closeOnSelect" }] : /* istanbul ignore next */ []));
32
77
  // --- Filtering Inputs ---
33
- filter = input(false, ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
78
+ filter = input(false, { ...(ngDevMode ? { debugName: "filter" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
34
79
  filterBy = input(undefined, ...(ngDevMode ? [{ debugName: "filterBy" }] : /* istanbul ignore next */ []));
35
80
  filterMatchMode = input('contains', ...(ngDevMode ? [{ debugName: "filterMatchMode" }] : /* istanbul ignore next */ []));
36
81
  filterLocale = input(undefined, ...(ngDevMode ? [{ debugName: "filterLocale" }] : /* istanbul ignore next */ []));
@@ -39,19 +84,31 @@ class NgbSelectComponent {
39
84
  searchPlaceholder = input(undefined, ...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
40
85
  filterInTrigger = input(false, ...(ngDevMode ? [{ debugName: "filterInTrigger" }] : /* istanbul ignore next */ []));
41
86
  resetFilterOnHide = input(false, ...(ngDevMode ? [{ debugName: "resetFilterOnHide" }] : /* istanbul ignore next */ []));
42
- emptyMessage = input('No results found', ...(ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
43
- emptyFilterMessage = input('No results found', ...(ngDevMode ? [{ debugName: "emptyFilterMessage" }] : /* istanbul ignore next */ []));
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 */ []));
44
96
  // --- State & Form Inputs ---
45
97
  disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
46
98
  readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
47
99
  loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
48
- showClear = input(false, ...(ngDevMode ? [{ debugName: "showClear" }] : /* istanbul ignore next */ []));
100
+ showClear = input(false, { ...(ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
49
101
  invalid = input(false, ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
50
102
  floatLabel = input(false, ...(ngDevMode ? [{ debugName: "floatLabel" }] : /* istanbul ignore next */ []));
51
103
  floatLabelVariant = input('on', ...(ngDevMode ? [{ debugName: "floatLabelVariant" }] : /* istanbul ignore next */ []));
52
104
  autofocus = input(false, ...(ngDevMode ? [{ debugName: "autofocus" }] : /* istanbul ignore next */ []));
53
105
  tabindex = input(0, ...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
54
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 */ []));
55
112
  ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
56
113
  ariaLabelledBy = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
57
114
  dir = input(undefined, ...(ngDevMode ? [{ debugName: "dir" }] : /* istanbul ignore next */ []));
@@ -82,6 +139,23 @@ class NgbSelectComponent {
82
139
  focusOnOpen = input(undefined, ...(ngDevMode ? [{ debugName: "focusOnOpen" }] : /* istanbul ignore next */ []));
83
140
  focusOnOpenStrategy = input('always', ...(ngDevMode ? [{ debugName: "focusOnOpenStrategy" }] : /* istanbul ignore next */ []));
84
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 });
153
+ // --- Tree Mode Inputs ---
154
+ tree = input(false, { ...(ngDevMode ? { debugName: "tree" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
155
+ optionChildren = input('children', ...(ngDevMode ? [{ debugName: "optionChildren" }] : /* istanbul ignore next */ []));
156
+ treeSelectable = input('all', ...(ngDevMode ? [{ debugName: "treeSelectable" }] : /* istanbul ignore next */ []));
157
+ treeExpandAll = input(false, { ...(ngDevMode ? { debugName: "treeExpandAll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
158
+ treeShowPath = input(false, { ...(ngDevMode ? { debugName: "treeShowPath" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
85
159
  // --- Two-way Overlay Visibility Binding ---
86
160
  overlayVisible = model(false, ...(ngDevMode ? [{ debugName: "overlayVisible" }] : /* istanbul ignore next */ []));
87
161
  // --- Event Outputs ---
@@ -95,6 +169,10 @@ class NgbSelectComponent {
95
169
  onSelectAllChange = output();
96
170
  onRemoveChip = output();
97
171
  onLazyLoad = output();
172
+ onNodeExpand = output();
173
+ onNodeCollapse = output();
174
+ /** Emitted when a tag is created from the filter text (see `addTag`). */
175
+ onAdd = output();
98
176
  // --- Custom Content Templates ---
99
177
  itemTemplate = contentChild('item', ...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
100
178
  selectedItemTemplate = contentChild('selectedItem', ...(ngDevMode ? [{ debugName: "selectedItemTemplate" }] : /* istanbul ignore next */ []));
@@ -114,8 +192,32 @@ class NgbSelectComponent {
114
192
  editableInputElement = viewChild('editableInput', ...(ngDevMode ? [{ debugName: "editableInputElement" }] : /* istanbul ignore next */ []));
115
193
  dropdownMenuElement = viewChild('dropdownMenu', ...(ngDevMode ? [{ debugName: "dropdownMenuElement" }] : /* istanbul ignore next */ []));
116
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 */ []));
117
216
  effectiveSearchPlaceholder = computed(() => {
118
- return (this.searchPlaceholder() || this.filterPlaceholder() || this.placeholder() || 'Search...');
217
+ return (this.searchPlaceholder() ||
218
+ this.filterPlaceholder() ||
219
+ this.placeholder() ||
220
+ this.labels.searchPlaceholder);
119
221
  }, ...(ngDevMode ? [{ debugName: "effectiveSearchPlaceholder" }] : /* istanbul ignore next */ []));
120
222
  effectiveDropdownPosition = computed(() => {
121
223
  return this.dropdownDirection() || this.direction() || this.dropdownPosition() || 'auto';
@@ -124,7 +226,7 @@ class NgbSelectComponent {
124
226
  isDropup = computed(() => this.currentPlacement() === 'top', ...(ngDevMode ? [{ debugName: "isDropup" }] : /* istanbul ignore next */ []));
125
227
  isModalMode = computed(() => this.modal() || this.popup() || this.touchUI(), ...(ngDevMode ? [{ debugName: "isModalMode" }] : /* istanbul ignore next */ []));
126
228
  effectivePopupTitle = computed(() => {
127
- return this.popupTitle() || this.modalTitle() || this.placeholder() || 'Select an Option';
229
+ return this.popupTitle() || this.modalTitle() || this.placeholder() || this.labels.popupTitle;
128
230
  }, ...(ngDevMode ? [{ debugName: "effectivePopupTitle" }] : /* istanbul ignore next */ []));
129
231
  effectiveFilterValue = computed(() => {
130
232
  return this.overlayVisible()
@@ -140,7 +242,12 @@ class NgbSelectComponent {
140
242
  // --- Reactive Option Filtering & Transformation ---
141
243
  safeOptions = computed(() => {
142
244
  const opts = this.options();
143
- return Array.isArray(opts) ? opts : [];
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;
144
251
  }, ...(ngDevMode ? [{ debugName: "safeOptions" }] : /* istanbul ignore next */ []));
145
252
  filterFields = computed(() => {
146
253
  const filterBy = this.filterBy();
@@ -149,7 +256,108 @@ class NgbSelectComponent {
149
256
  }
150
257
  return [this.optionLabel() || 'label'];
151
258
  }, ...(ngDevMode ? [{ debugName: "filterFields" }] : /* istanbul ignore next */ []));
259
+ // --- Tree Mode State ---
260
+ /** User expansion state (null = not touched yet; falls back to treeExpandAll). */
261
+ treeExpandedKeys = signal(null, ...(ngDevMode ? [{ debugName: "treeExpandedKeys" }] : /* istanbul ignore next */ []));
262
+ /** Keys toggled by the user while a filter is active (XOR with auto-expanded ancestors). */
263
+ treeFilterToggleState = signal({
264
+ query: '',
265
+ keys: new Set(),
266
+ }, ...(ngDevMode ? [{ debugName: "treeFilterToggleState" }] : /* istanbul ignore next */ []));
267
+ /** Toggles only apply to the filter query they were made under. */
268
+ treeFilterToggles = computed(() => {
269
+ const state = this.treeFilterToggleState();
270
+ return state.query === this.filterValue() ? state.keys : new Set();
271
+ }, ...(ngDevMode ? [{ debugName: "treeFilterToggles" }] : /* istanbul ignore next */ []));
272
+ /** Parent lookup and full flat list of every node in the tree. */
273
+ treeIndex = computed(() => {
274
+ const parents = new Map();
275
+ const depths = new Map();
276
+ const all = [];
277
+ const parentKeys = [];
278
+ if (!this.tree())
279
+ return { parents, depths, all, parentKeys };
280
+ const walk = (nodes, parent, depth) => {
281
+ for (const node of nodes) {
282
+ parents.set(node, parent);
283
+ depths.set(node, depth);
284
+ all.push(node);
285
+ const children = this.resolveTreeChildren(node);
286
+ if (children.length) {
287
+ parentKeys.push(this.treeNodeKey(node));
288
+ walk(children, node, depth + 1);
289
+ }
290
+ }
291
+ };
292
+ walk(this.safeOptions(), null, 0);
293
+ return { parents, depths, all, parentKeys };
294
+ }, ...(ngDevMode ? [{ debugName: "treeIndex" }] : /* istanbul ignore next */ []));
295
+ effectiveTreeExpanded = computed(() => {
296
+ const keys = this.treeExpandedKeys();
297
+ if (keys)
298
+ return keys;
299
+ return this.treeExpandAll() ? new Set(this.treeIndex().parentKeys) : new Set();
300
+ }, ...(ngDevMode ? [{ debugName: "effectiveTreeExpanded" }] : /* istanbul ignore next */ []));
301
+ /** Filter result in tree mode: nodes to include and ancestors to auto-expand. */
302
+ treeFilterResult = computed(() => {
303
+ if (!this.tree())
304
+ return null;
305
+ const query = this.filterValue();
306
+ if (!query)
307
+ return null;
308
+ const mode = this.filterMatchMode();
309
+ const locale = this.filterLocale();
310
+ const normalizeArabic = this.filterNormalizeArabic();
311
+ const fields = this.filterFields();
312
+ const include = new Set();
313
+ const autoExpand = new Set();
314
+ const visit = (node, underMatch) => {
315
+ const self = this.matchesFilter(node, query, fields, mode, locale, normalizeArabic);
316
+ let descendantHit = false;
317
+ for (const child of this.resolveTreeChildren(node)) {
318
+ if (visit(child, underMatch || self))
319
+ descendantHit = true;
320
+ }
321
+ if (descendantHit)
322
+ autoExpand.add(this.treeNodeKey(node));
323
+ const hit = self || descendantHit;
324
+ if (hit || underMatch)
325
+ include.add(node);
326
+ return hit;
327
+ };
328
+ for (const root of this.safeOptions())
329
+ visit(root, false);
330
+ return { include, autoExpand };
331
+ }, ...(ngDevMode ? [{ debugName: "treeFilterResult" }] : /* istanbul ignore next */ []));
332
+ /** Flattened list of currently visible tree rows. */
333
+ visibleTreeNodes = computed(() => {
334
+ if (!this.tree())
335
+ return [];
336
+ const filterRes = this.treeFilterResult();
337
+ const expanded = this.effectiveTreeExpanded();
338
+ const toggles = this.treeFilterToggles();
339
+ const rows = [];
340
+ const walk = (nodes, parent, depth) => {
341
+ for (const node of nodes) {
342
+ if (filterRes && !filterRes.include.has(node))
343
+ continue;
344
+ const key = this.treeNodeKey(node);
345
+ const children = this.resolveTreeChildren(node);
346
+ const hasChildren = children.length > 0;
347
+ const isExpanded = hasChildren &&
348
+ (filterRes ? filterRes.autoExpand.has(key) !== toggles.has(key) : expanded.has(key));
349
+ rows.push({ node, key, depth, hasChildren, expanded: isExpanded, parent });
350
+ if (isExpanded)
351
+ walk(children, node, depth + 1);
352
+ }
353
+ };
354
+ walk(this.safeOptions(), null, 0);
355
+ return rows;
356
+ }, ...(ngDevMode ? [{ debugName: "visibleTreeNodes" }] : /* istanbul ignore next */ []));
152
357
  filteredOptions = computed(() => {
358
+ if (this.tree()) {
359
+ return this.visibleTreeNodes().map((r) => r.node);
360
+ }
153
361
  const opts = this.safeOptions();
154
362
  const query = this.filterValue();
155
363
  if (!query) {
@@ -179,7 +387,7 @@ class NgbSelectComponent {
179
387
  }, ...(ngDevMode ? [{ debugName: "filteredOptions" }] : /* istanbul ignore next */ []));
180
388
  flatFilteredOptions = computed(() => {
181
389
  const filtered = this.filteredOptions();
182
- if (this.group()) {
390
+ if (this.group() && !this.tree()) {
183
391
  const flat = [];
184
392
  for (const grp of filtered) {
185
393
  flat.push(...this.resolveOptionGroupChildren(grp));
@@ -192,13 +400,16 @@ class NgbSelectComponent {
192
400
  const filtered = this.filteredOptions();
193
401
  if (filtered.length === 0)
194
402
  return true;
195
- if (this.group()) {
403
+ if (this.group() && !this.tree()) {
196
404
  return filtered.every((grp) => this.resolveOptionGroupChildren(grp).length === 0);
197
405
  }
198
406
  return false;
199
407
  }, ...(ngDevMode ? [{ debugName: "isOptionsEmpty" }] : /* istanbul ignore next */ []));
200
408
  // Flat list of all available options for fast lookup
201
409
  flatOptions = computed(() => {
410
+ if (this.tree()) {
411
+ return this.treeIndex().all;
412
+ }
202
413
  const opts = this.safeOptions();
203
414
  if (this.group()) {
204
415
  const flat = [];
@@ -293,11 +504,34 @@ class NgbSelectComponent {
293
504
  return undefined;
294
505
  return flat[idx];
295
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 */ []));
296
529
  // --- ControlValueAccessor Callbacks ---
297
530
  onModelChange = () => { };
298
531
  onModelTouched = () => { };
299
532
  unlistenWindow;
300
533
  unlistenDocumentClick;
534
+ unlistenLabelClick;
301
535
  ngOnInit() {
302
536
  const handleWindowReposition = () => {
303
537
  if (this.overlayVisible()) {
@@ -315,8 +549,10 @@ class NgbSelectComponent {
315
549
  window.removeEventListener('scroll', handleWindowReposition, { capture: true });
316
550
  };
317
551
  }
552
+ this.bindLabelClickListener();
318
553
  }
319
554
  ngAfterViewInit() {
555
+ this.resolveAssociatedLabel();
320
556
  if (this.autofocus()) {
321
557
  this.focus();
322
558
  }
@@ -326,8 +562,81 @@ class NgbSelectComponent {
326
562
  this.unlistenWindow();
327
563
  }
328
564
  this.unbindDocumentClickListener();
565
+ this.unlistenLabelClick?.();
329
566
  this.cleanAppendTo();
330
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
+ }
331
640
  writeValue(obj) {
332
641
  if (this.multiple()) {
333
642
  this.value.set(Array.isArray(obj) ? [...obj] : []);
@@ -366,6 +675,11 @@ class NgbSelectComponent {
366
675
  resolveOptionLabelByValue(val) {
367
676
  const selectedOpt = this.findOptionByValue(val);
368
677
  if (selectedOpt !== undefined && selectedOpt !== null) {
678
+ if (this.tree() && this.treeShowPath()) {
679
+ return this.getTreePath(selectedOpt)
680
+ .map((n) => this.resolveOptionLabel(n))
681
+ .join(' › ');
682
+ }
369
683
  return this.resolveOptionLabel(selectedOpt);
370
684
  }
371
685
  return this.resolveOptionLabel(val);
@@ -455,6 +769,9 @@ class NgbSelectComponent {
455
769
  return map.get(lookupKey);
456
770
  }
457
771
  // Fallback scan
772
+ if (this.tree()) {
773
+ return this.flatOptions().find((opt) => this.areValuesEqual(this.resolveOptionValue(opt), val));
774
+ }
458
775
  if (this.group()) {
459
776
  for (const grp of this.safeOptions()) {
460
777
  const children = this.resolveOptionGroupChildren(grp);
@@ -568,6 +885,17 @@ class NgbSelectComponent {
568
885
  this.onShow.emit(event || null);
569
886
  this.onModelTouched();
570
887
  this.bindDocumentClickListener();
888
+ if (this.tree()) {
889
+ this.expandToSelection();
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
898
+ }
571
899
  const triggerFilterInputEl = this.triggerFilterInputElement();
572
900
  const filterInputEl = this.filterInputElement();
573
901
  if (this.filterInTrigger() && triggerFilterInputEl) {
@@ -598,8 +926,7 @@ class NgbSelectComponent {
598
926
  const clickHandler = (event) => {
599
927
  const dropdownMenuEl = this.dropdownMenuElement();
600
928
  if (!this.elementRef.nativeElement.contains(event.target) &&
601
- (!dropdownMenuEl ||
602
- !dropdownMenuEl.nativeElement.contains(event.target))) {
929
+ (!dropdownMenuEl || !dropdownMenuEl.nativeElement.contains(event.target))) {
603
930
  this.closeOverlay(event);
604
931
  }
605
932
  };
@@ -631,10 +958,13 @@ class NgbSelectComponent {
631
958
  else if (this.autoOptionFocus()) {
632
959
  targetIndex = selectedIdx !== -1 ? selectedIdx : 0;
633
960
  }
961
+ if (flatItems.length === 0) {
962
+ targetIndex = this.addTagIndex();
963
+ }
634
964
  const dropdownMenuEl = this.dropdownMenuElement();
635
965
  if (targetIndex !== -1 && dropdownMenuEl) {
636
966
  this.focusedIndex.set(targetIndex);
637
- const elements = dropdownMenuEl.nativeElement.querySelectorAll('.dropdown-item[role="option"]');
967
+ const elements = dropdownMenuEl.nativeElement.querySelectorAll(OPTION_ROW_SELECTOR);
638
968
  const targetElement = elements[targetIndex];
639
969
  if (targetElement && typeof targetElement.scrollIntoView === 'function') {
640
970
  targetElement.scrollIntoView({ block: 'nearest', inline: 'start' });
@@ -675,6 +1005,10 @@ class NgbSelectComponent {
675
1005
  this.closeOverlay(event);
676
1006
  }
677
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
+ }
678
1012
  removeChip(val, event) {
679
1013
  event.stopPropagation();
680
1014
  if (this.disabled() || this.readonly())
@@ -732,6 +1066,15 @@ class NgbSelectComponent {
732
1066
  onFilterChange(event) {
733
1067
  const raw = event.target.value || '';
734
1068
  this.filterValue.set(raw);
1069
+ if (this.tree()) {
1070
+ this.focusedIndex.set(-1);
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
+ }
735
1078
  this.onFilter.emit({
736
1079
  originalEvent: event,
737
1080
  filter: this.filterValue(),
@@ -775,6 +1118,55 @@ class NgbSelectComponent {
775
1118
  .replace(/[يى]/g, 'ي') // Normalize Yaa & Alef Maksura
776
1119
  .replace(/[ة]/g, 'ه'); // Normalize Taa Marbuta
777
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
+ }
778
1170
  compareStrings(val, query, mode, locale, normalizeArabic = true) {
779
1171
  let v = locale ? val.toLocaleLowerCase(locale) : val.toLowerCase();
780
1172
  let q = locale ? query.toLocaleLowerCase(locale) : query.toLowerCase();
@@ -836,11 +1228,30 @@ class NgbSelectComponent {
836
1228
  else {
837
1229
  const flatItems = this.flatFilteredOptions();
838
1230
  const focusedIdx = this.focusedIndex();
839
- if (focusedIdx >= 0 && focusedIdx < flatItems.length) {
840
- this.onOptionClick(flatItems[focusedIdx], event);
1231
+ if (this.isAddTagFocused()) {
1232
+ void this.addTagFromFilter(event);
1233
+ }
1234
+ else if (focusedIdx >= 0 && focusedIdx < flatItems.length) {
1235
+ if (this.tree()) {
1236
+ const entry = this.visibleTreeNodes()[focusedIdx];
1237
+ if (entry)
1238
+ this.activateTreeEntry(entry, event);
1239
+ }
1240
+ else {
1241
+ this.onOptionClick(flatItems[focusedIdx], event);
1242
+ }
841
1243
  }
842
1244
  }
843
1245
  break;
1246
+ case 'ArrowRight':
1247
+ case 'ArrowLeft':
1248
+ case 'Home':
1249
+ case 'End':
1250
+ if (this.tree() && this.overlayVisible() && !this.isTextInputTarget(event)) {
1251
+ event.preventDefault();
1252
+ this.handleTreeKey(event);
1253
+ }
1254
+ break;
844
1255
  case 'Escape':
845
1256
  if (this.overlayVisible()) {
846
1257
  event.preventDefault();
@@ -860,27 +1271,31 @@ class NgbSelectComponent {
860
1271
  event.key === 'Enter' ||
861
1272
  event.key === 'Escape') {
862
1273
  this.onKeydown(event);
1274
+ // Handled here: do not let the container's (keydown) handle the same key again.
1275
+ event.stopPropagation();
863
1276
  }
864
1277
  }
865
1278
  navigateOption(step) {
866
1279
  const flatItems = this.flatFilteredOptions();
867
- if (flatItems.length === 0)
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)
868
1283
  return;
869
1284
  let nextIdx = this.focusedIndex() + step;
870
1285
  if (nextIdx < 0)
871
1286
  nextIdx = 0;
872
- if (nextIdx >= flatItems.length)
873
- nextIdx = flatItems.length - 1;
1287
+ if (nextIdx >= count)
1288
+ nextIdx = count - 1;
874
1289
  while (nextIdx >= 0 &&
875
1290
  nextIdx < flatItems.length &&
876
1291
  this.isOptionDisabled(flatItems[nextIdx])) {
877
1292
  nextIdx += step;
878
1293
  }
879
- if (nextIdx >= 0 && nextIdx < flatItems.length) {
1294
+ if (nextIdx >= 0 && nextIdx < count) {
880
1295
  this.focusedIndex.set(nextIdx);
881
1296
  const dropdownMenuEl = this.dropdownMenuElement();
882
1297
  if (dropdownMenuEl) {
883
- const elements = dropdownMenuEl.nativeElement.querySelectorAll('.dropdown-item[role="option"]');
1298
+ const elements = dropdownMenuEl.nativeElement.querySelectorAll(OPTION_ROW_SELECTOR);
884
1299
  const targetElement = elements[nextIdx];
885
1300
  if (targetElement && typeof targetElement.scrollIntoView === 'function') {
886
1301
  targetElement.scrollIntoView({ block: 'nearest', inline: 'start' });
@@ -929,20 +1344,37 @@ class NgbSelectComponent {
929
1344
  this.calculateDropdownPosition();
930
1345
  const triggerRect = this.elementRef.nativeElement.getBoundingClientRect();
931
1346
  const dropdown = dropdownMenuEl.nativeElement;
932
- dropdown.style.position = 'fixed';
933
- dropdown.style.left = `${triggerRect.left}px`;
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
+ }
934
1366
  dropdown.style.width = `${triggerRect.width}px`;
935
1367
  dropdown.style.minWidth = `${triggerRect.width}px`;
936
1368
  dropdown.style.maxWidth = `${triggerRect.width}px`;
937
1369
  dropdown.style.boxSizing = 'border-box';
938
1370
  dropdown.style.zIndex = '1060';
939
1371
  if (this.isDropup()) {
940
- dropdown.style.top = 'auto';
941
- dropdown.style.bottom = `${window.innerHeight - triggerRect.top + 2}px`;
1372
+ set('top', 'auto');
1373
+ set('bottom', `${window.innerHeight - triggerRect.top + 2}px`);
942
1374
  }
943
1375
  else {
944
- dropdown.style.top = `${triggerRect.bottom + 2}px`;
945
- dropdown.style.bottom = 'auto';
1376
+ set('top', `${triggerRect.bottom + 2}px`);
1377
+ set('bottom', 'auto');
946
1378
  }
947
1379
  }
948
1380
  cleanAppendTo() {
@@ -970,34 +1402,248 @@ class NgbSelectComponent {
970
1402
  editableInputEl.nativeElement.focus();
971
1403
  }
972
1404
  else {
973
- const trigger = this.elementRef.nativeElement.querySelector('.form-select');
1405
+ const trigger = this.elementRef.nativeElement.querySelector('.ngb-select-trigger');
974
1406
  if (trigger)
975
1407
  trigger.focus();
976
1408
  }
977
1409
  }
1410
+ // ==========================================
1411
+ // Tree Mode
1412
+ // ==========================================
1413
+ resolveTreeChildren(node) {
1414
+ if (!node || typeof node !== 'object')
1415
+ return [];
1416
+ const key = this.optionChildren() || 'children';
1417
+ return Array.isArray(node[key]) ? node[key] : [];
1418
+ }
1419
+ treeNodeKey(node) {
1420
+ return this.resolveOptionTrackKey(node, -1);
1421
+ }
1422
+ /** Ancestors (root first) followed by the node itself. */
1423
+ getTreePath(node) {
1424
+ const parents = this.treeIndex().parents;
1425
+ const path = [];
1426
+ let current = node;
1427
+ let guard = 0;
1428
+ while (current !== null && current !== undefined && guard++ < 1000) {
1429
+ path.unshift(current);
1430
+ current = parents.get(current) ?? null;
1431
+ }
1432
+ return path;
1433
+ }
1434
+ isTreeNodeExpanded(node) {
1435
+ const key = this.treeNodeKey(node);
1436
+ const filterRes = this.treeFilterResult();
1437
+ if (filterRes) {
1438
+ return filterRes.autoExpand.has(key) !== this.treeFilterToggles().has(key);
1439
+ }
1440
+ return this.effectiveTreeExpanded().has(key);
1441
+ }
1442
+ isRtl() {
1443
+ const dir = this.dir();
1444
+ if (dir === 'rtl')
1445
+ return true;
1446
+ if (dir === 'ltr')
1447
+ return false;
1448
+ const el = this.elementRef?.nativeElement;
1449
+ if (el && typeof el.closest === 'function') {
1450
+ const host = el.closest('[dir]');
1451
+ return !!host && host.getAttribute('dir') === 'rtl';
1452
+ }
1453
+ return false;
1454
+ }
1455
+ treeIndent(depth) {
1456
+ return `calc(0.75rem + ${depth} * 1.25rem)`;
1457
+ }
1458
+ /** Template context for the option/item template in tree mode. */
1459
+ treeItemContext(entry) {
1460
+ return {
1461
+ $implicit: entry.node,
1462
+ node: entry.node,
1463
+ depth: entry.depth,
1464
+ expanded: entry.expanded,
1465
+ hasChildren: entry.hasChildren,
1466
+ };
1467
+ }
1468
+ /** Template context for the selected item/label template. */
1469
+ selectedItemContext(val) {
1470
+ const option = this.findOptionByValue(val);
1471
+ const ctx = { $implicit: option ?? val, value: val };
1472
+ if (this.tree() && option !== undefined) {
1473
+ const path = this.getTreePath(option);
1474
+ ctx.node = option;
1475
+ ctx.depth = path.length - 1;
1476
+ ctx.path = path;
1477
+ ctx.hasChildren = this.resolveTreeChildren(option).length > 0;
1478
+ }
1479
+ return ctx;
1480
+ }
1481
+ isTreeNodeSelectable(entry) {
1482
+ return !(this.treeSelectable() === 'leaf' && entry.hasChildren);
1483
+ }
1484
+ setTreeNodeExpanded(node, expand, event = null) {
1485
+ const key = this.treeNodeKey(node);
1486
+ if (this.resolveTreeChildren(node).length === 0)
1487
+ return;
1488
+ if (this.isTreeNodeExpanded(node) === expand)
1489
+ return;
1490
+ if (this.treeFilterResult()) {
1491
+ const toggles = new Set(this.treeFilterToggles());
1492
+ if (toggles.has(key))
1493
+ toggles.delete(key);
1494
+ else
1495
+ toggles.add(key);
1496
+ this.treeFilterToggleState.set({ query: this.filterValue(), keys: toggles });
1497
+ }
1498
+ else {
1499
+ const next = new Set(this.effectiveTreeExpanded());
1500
+ if (expand)
1501
+ next.add(key);
1502
+ else
1503
+ next.delete(key);
1504
+ this.treeExpandedKeys.set(next);
1505
+ }
1506
+ if (expand)
1507
+ this.onNodeExpand.emit(node);
1508
+ else
1509
+ this.onNodeCollapse.emit(node);
1510
+ void event;
1511
+ this.cdr.markForCheck();
1512
+ }
1513
+ toggleTreeNode(node, event = null) {
1514
+ this.setTreeNodeExpanded(node, !this.isTreeNodeExpanded(node), event);
1515
+ }
1516
+ onTreeToggleClick(entry, event) {
1517
+ event.stopPropagation();
1518
+ event.preventDefault();
1519
+ this.focusedIndex.set(this.visibleTreeNodes().indexOf(entry));
1520
+ this.toggleTreeNode(entry.node, event);
1521
+ }
1522
+ onTreeRowClick(entry, event) {
1523
+ this.focusedIndex.set(this.visibleTreeNodes().indexOf(entry));
1524
+ this.activateTreeEntry(entry, event);
1525
+ }
1526
+ activateTreeEntry(entry, event) {
1527
+ if (this.isOptionDisabled(entry.node))
1528
+ return;
1529
+ if (!this.isTreeNodeSelectable(entry)) {
1530
+ this.toggleTreeNode(entry.node, event);
1531
+ return;
1532
+ }
1533
+ this.onOptionClick(entry.node, event);
1534
+ }
1535
+ /** Expands the ancestors of the selected value(s) so they are visible. */
1536
+ expandToSelection() {
1537
+ if (this.treeFilterResult())
1538
+ return;
1539
+ const val = this.value();
1540
+ const values = this.multiple() ? (Array.isArray(val) ? val : []) : [val];
1541
+ const parents = this.treeIndex().parents;
1542
+ const next = new Set(this.effectiveTreeExpanded());
1543
+ let changed = false;
1544
+ for (const v of values) {
1545
+ if (v === null || v === undefined || v === '')
1546
+ continue;
1547
+ const opt = this.findOptionByValue(v);
1548
+ if (opt === undefined)
1549
+ continue;
1550
+ let p = parents.get(opt);
1551
+ while (p) {
1552
+ const key = this.treeNodeKey(p);
1553
+ if (!next.has(key)) {
1554
+ next.add(key);
1555
+ changed = true;
1556
+ }
1557
+ p = parents.get(p);
1558
+ }
1559
+ }
1560
+ if (changed || this.treeExpandedKeys() === null) {
1561
+ this.treeExpandedKeys.set(next);
1562
+ }
1563
+ }
1564
+ isTextInputTarget(event) {
1565
+ const t = event.target;
1566
+ return !!t && (t.tagName === 'INPUT' || t.tagName === 'TEXTAREA');
1567
+ }
1568
+ focusTreeIndex(idx) {
1569
+ const rows = this.visibleTreeNodes();
1570
+ if (idx < 0 || idx >= rows.length)
1571
+ return;
1572
+ this.focusedIndex.set(idx);
1573
+ const menu = this.dropdownMenuElement();
1574
+ if (menu) {
1575
+ const el = menu.nativeElement.querySelectorAll(OPTION_ROW_SELECTOR)[idx];
1576
+ if (el && typeof el.scrollIntoView === 'function') {
1577
+ el.scrollIntoView({ block: 'nearest', inline: 'start' });
1578
+ }
1579
+ }
1580
+ }
1581
+ handleTreeKey(event) {
1582
+ const rows = this.visibleTreeNodes();
1583
+ if (rows.length === 0)
1584
+ return;
1585
+ const idx = this.focusedIndex();
1586
+ if (event.key === 'Home' || event.key === 'End') {
1587
+ const step = event.key === 'Home' ? 1 : -1;
1588
+ let i = event.key === 'Home' ? 0 : rows.length - 1;
1589
+ while (i >= 0 && i < rows.length && this.isOptionDisabled(rows[i].node))
1590
+ i += step;
1591
+ this.focusTreeIndex(i);
1592
+ return;
1593
+ }
1594
+ const entry = rows[idx];
1595
+ if (!entry) {
1596
+ this.focusTreeIndex(0);
1597
+ return;
1598
+ }
1599
+ const rtl = this.isRtl();
1600
+ const isExpandKey = event.key === (rtl ? 'ArrowLeft' : 'ArrowRight');
1601
+ if (isExpandKey) {
1602
+ if (!entry.hasChildren)
1603
+ return;
1604
+ if (!entry.expanded) {
1605
+ this.setTreeNodeExpanded(entry.node, true, event);
1606
+ }
1607
+ else {
1608
+ this.focusTreeIndex(idx + 1);
1609
+ }
1610
+ }
1611
+ else {
1612
+ if (entry.hasChildren && entry.expanded) {
1613
+ this.setTreeNodeExpanded(entry.node, false, event);
1614
+ }
1615
+ else if (entry.parent) {
1616
+ const parentIdx = rows.findIndex((r) => r.node === entry.parent);
1617
+ this.focusTreeIndex(parentIdx);
1618
+ }
1619
+ }
1620
+ }
978
1621
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: NgbSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
979
- 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 }, 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" }, providers: [
1622
+ 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: [
980
1623
  {
981
1624
  provide: NG_VALUE_ACCESSOR,
982
1625
  useExisting: forwardRef(() => NgbSelectComponent),
983
1626
  multi: true,
984
1627
  },
985
- ], 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]=\"'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: { $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 <!-- Grouped Options Mode -->\n @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 role=\"listbox\"\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 role=\"listbox\"\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}\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 });
1628
+ ], 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:100%;min-width:100%;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 });
986
1629
  }
987
1630
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: NgbSelectComponent, decorators: [{
988
1631
  type: Component,
989
- args: [{ selector: 'ngb-select', standalone: true, imports: [CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
1632
+ args: [{ selector: 'ngb-select', standalone: true, imports: [CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
1633
+ // The id belongs to the focusable trigger; never duplicate it on the host element.
1634
+ '[attr.id]': 'hostIdAttr()',
1635
+ }, providers: [
990
1636
  {
991
1637
  provide: NG_VALUE_ACCESSOR,
992
1638
  useExisting: forwardRef(() => NgbSelectComponent),
993
1639
  multi: true,
994
1640
  },
995
- ], 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]=\"'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: { $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 <!-- Grouped Options Mode -->\n @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 role=\"listbox\"\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 role=\"listbox\"\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}\n"] }]
996
- }], 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 }] }], 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"] }], 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 }] }] } });
1641
+ ], 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:100%;min-width:100%;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"] }]
1642
+ }], 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 }] }] } });
997
1643
 
998
1644
  /**
999
1645
  * Generated bundle index. Do not edit.
1000
1646
  */
1001
1647
 
1002
- export { NGB_SELECT_VERSION, NgbSelectComponent };
1648
+ export { NGB_SELECT_CONFIG, NGB_SELECT_DEFAULT_LABELS, NGB_SELECT_VERSION, NgbSelectComponent, provideNgbSelectConfig };
1003
1649
  //# sourceMappingURL=amro93-ngb-select.mjs.map