@ng-matero/ng-select 0.2.0 → 0.4.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.
@@ -98,13 +98,6 @@ function isPromise(value) {
98
98
  function isFunction(value) {
99
99
  return value instanceof Function;
100
100
  }
101
- function newId() {
102
- // First character is an 'a', it's good practice to tag id to begin with a letter
103
- return 'axxxxxxxxxxx'.replace(/[x]/g, () => {
104
- const val = (Math.random() * 16) | 0;
105
- return val.toString(16);
106
- });
107
- }
108
101
  var KeyCode;
109
102
  (function (KeyCode) {
110
103
  KeyCode["Tab"] = "Tab";
@@ -120,12 +113,12 @@ const CSS_POSITIONS = ['top', 'right', 'bottom', 'left'];
120
113
  const SCROLL_SCHEDULER = typeof requestAnimationFrame !== 'undefined' ? animationFrameScheduler : asapScheduler;
121
114
  class NgDropdownPanel {
122
115
  constructor() {
116
+ this.listboxId = '';
123
117
  this.items = [];
124
118
  this.position = 'auto';
125
119
  this.bufferAmount = 4;
126
120
  this.virtualScroll = false;
127
121
  this.filterValue = null;
128
- this.ariaLabelDropdown = null;
129
122
  this.update = new EventEmitter();
130
123
  this.scroll = new EventEmitter();
131
124
  this.scrollToEnd = new EventEmitter();
@@ -163,9 +156,9 @@ class NgDropdownPanel {
163
156
  }
164
157
  ngOnInit() {
165
158
  this._select = this._dropdown.parentElement;
166
- this._virtualPadding = this.paddingElementRef.nativeElement;
167
- this._scrollablePanel = this.scrollElementRef.nativeElement;
168
- this._contentPanel = this.contentElementRef.nativeElement;
159
+ this._scrollHost = this.scrollHostElRef.nativeElement;
160
+ this._scrollContent = this.scrollContentElRef.nativeElement;
161
+ this._scrollSpacer = this.scrollSpacerElRef.nativeElement;
169
162
  this._handleScroll();
170
163
  this._handleOutsideClick();
171
164
  this._appendDropdown();
@@ -204,11 +197,11 @@ class NgDropdownPanel {
204
197
  scrollTo = this._panelUtils.getScrollTo(item.offsetTop, item.clientHeight, lastScroll);
205
198
  }
206
199
  if (isDefined(scrollTo)) {
207
- this._scrollablePanel.scrollTop = scrollTo;
200
+ this._scrollHost.scrollTop = scrollTo;
208
201
  }
209
202
  }
210
203
  scrollToTag() {
211
- const panel = this._scrollablePanel;
204
+ const panel = this._scrollHost;
212
205
  panel.scrollTop = panel.scrollHeight - panel.clientHeight;
213
206
  }
214
207
  adjustPosition() {
@@ -239,7 +232,7 @@ class NgDropdownPanel {
239
232
  }
240
233
  _handleScroll() {
241
234
  this._zone.runOutsideAngular(() => {
242
- fromEvent(this.scrollElementRef.nativeElement, 'scroll')
235
+ fromEvent(this._scrollHost, 'scroll')
243
236
  .pipe(takeUntil(this._destroy$), auditTime(0, SCROLL_SCHEDULER))
244
237
  .subscribe(e => {
245
238
  const path = e.path || (e.composedPath && e.composedPath());
@@ -294,7 +287,7 @@ class NgDropdownPanel {
294
287
  }
295
288
  this._zone.runOutsideAngular(() => {
296
289
  Promise.resolve().then(() => {
297
- const panelHeight = this._scrollablePanel.clientHeight;
290
+ const panelHeight = this._scrollHost.clientHeight;
298
291
  this._panelUtils.setDimensions(0, panelHeight);
299
292
  this._handleDropdownPosition();
300
293
  this.scrollTo(this.markedItem, firstChange);
@@ -323,15 +316,15 @@ class NgDropdownPanel {
323
316
  }
324
317
  _updateVirtualHeight(height) {
325
318
  if (this._updateScrollHeight) {
326
- this._virtualPadding.style.height = `${height}px`;
319
+ this._scrollSpacer.style.height = `${height}px`;
327
320
  this._updateScrollHeight = false;
328
321
  }
329
322
  }
330
323
  _setVirtualHeight() {
331
- if (!this._virtualPadding) {
324
+ if (!this._scrollSpacer) {
332
325
  return;
333
326
  }
334
- this._virtualPadding.style.height = `0px`;
327
+ this._scrollSpacer.style.height = `0px`;
335
328
  }
336
329
  _onItemsLengthChanged() {
337
330
  this._updateScrollHeight = true;
@@ -340,16 +333,16 @@ class NgDropdownPanel {
340
333
  if (scrollTop && this._lastScrollPosition === scrollTop) {
341
334
  return;
342
335
  }
343
- scrollTop = scrollTop || this._scrollablePanel.scrollTop;
336
+ scrollTop = scrollTop || this._scrollHost.scrollTop;
344
337
  const range = this._panelUtils.calculateItems(scrollTop, this.itemsLength, this.bufferAmount);
345
338
  this._updateVirtualHeight(range.scrollHeight);
346
- this._contentPanel.style.transform = `translateY(${range.topPadding}px)`;
339
+ this._scrollContent.style.transform = `translateY(${range.topPadding}px)`;
347
340
  this._zone.run(() => {
348
341
  this.update.emit(this.items.slice(range.start, range.end));
349
342
  this.scroll.emit({ start: range.start, end: range.end });
350
343
  });
351
344
  if (isDefined(scrollTop) && this._lastScrollPosition === 0) {
352
- this._scrollablePanel.scrollTop = scrollTop;
345
+ this._scrollHost.scrollTop = scrollTop;
353
346
  this._lastScrollPosition = scrollTop;
354
347
  }
355
348
  }
@@ -362,8 +355,8 @@ class NgDropdownPanel {
362
355
  return Promise.resolve().then(() => {
363
356
  const option = this._dropdown.querySelector(`#${first.htmlId}`);
364
357
  const optionHeight = option.clientHeight;
365
- this._virtualPadding.style.height = `${optionHeight * this.itemsLength}px`;
366
- const panelHeight = this._scrollablePanel.clientHeight;
358
+ this._scrollSpacer.style.height = `${optionHeight * this.itemsLength}px`;
359
+ const panelHeight = this._scrollHost.clientHeight;
367
360
  this._panelUtils.setDimensions(optionHeight, panelHeight);
368
361
  return this._panelUtils.dimensions;
369
362
  });
@@ -372,7 +365,7 @@ class NgDropdownPanel {
372
365
  if (this._scrollToEndFired || scrollTop === 0) {
373
366
  return;
374
367
  }
375
- const padding = this.virtualScroll ? this._virtualPadding : this._contentPanel;
368
+ const padding = this.virtualScroll ? this._scrollSpacer : this._scrollContent;
376
369
  if (scrollTop + this._dropdown.clientHeight >= padding.clientHeight - 1) {
377
370
  this._zone.run(() => this.scrollToEnd.emit());
378
371
  this._scrollToEndFired = true;
@@ -444,7 +437,7 @@ class NgDropdownPanel {
444
437
  });
445
438
  }
446
439
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: NgDropdownPanel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
447
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: NgDropdownPanel, isStandalone: true, selector: "ng-dropdown-panel", inputs: { items: "items", markedItem: "markedItem", position: "position", appendTo: "appendTo", bufferAmount: "bufferAmount", virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], headerTemplate: "headerTemplate", footerTemplate: "footerTemplate", filterValue: "filterValue", ariaLabelDropdown: "ariaLabelDropdown" }, outputs: { update: "update", scroll: "scroll", scrollToEnd: "scrollToEnd", outsideClick: "outsideClick" }, viewQueries: [{ propertyName: "contentElementRef", first: true, predicate: ["content"], descendants: true, read: ElementRef, static: true }, { propertyName: "scrollElementRef", first: true, predicate: ["scroll"], descendants: true, read: ElementRef, static: true }, { propertyName: "paddingElementRef", first: true, predicate: ["padding"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: `
440
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: NgDropdownPanel, isStandalone: true, selector: "ng-dropdown-panel", inputs: { listboxId: "listboxId", items: "items", markedItem: "markedItem", position: "position", appendTo: "appendTo", bufferAmount: "bufferAmount", virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], headerTemplate: "headerTemplate", footerTemplate: "footerTemplate", filterValue: "filterValue" }, outputs: { update: "update", scroll: "scroll", scrollToEnd: "scrollToEnd", outsideClick: "outsideClick" }, viewQueries: [{ propertyName: "scrollHostElRef", first: true, predicate: ["scrollHost"], descendants: true, read: ElementRef, static: true }, { propertyName: "scrollContentElRef", first: true, predicate: ["scrollContent"], descendants: true, read: ElementRef, static: true }, { propertyName: "scrollSpacerElRef", first: true, predicate: ["scrollSpacer"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: `
448
441
  @if (headerTemplate) {
449
442
  <div class="ng-dropdown-header">
450
443
  <ng-container
@@ -454,13 +447,14 @@ class NgDropdownPanel {
454
447
  </div>
455
448
  }
456
449
  <div
457
- #scroll
458
- class="ng-dropdown-panel-items ng-select-virtual-scroll-host"
459
- [attr.aria-label]="ariaLabelDropdown"
450
+ #scrollHost
451
+ class="ng-dropdown-panel-items"
452
+ [class.ng-select-virtual-scroll-host]="virtualScroll"
453
+ [attr.id]="listboxId"
460
454
  role="listbox"
461
455
  >
462
- <div #padding [class.ng-select-virtual-scroll-spacer]="virtualScroll"></div>
463
- <div #content [class.ng-select-virtual-scroll-content]="virtualScroll && items.length">
456
+ <div #scrollSpacer [class.ng-select-virtual-scroll-spacer]="virtualScroll"></div>
457
+ <div #scrollContent [class.ng-select-virtual-scroll-content]="virtualScroll && items.length">
464
458
  <ng-content />
465
459
  </div>
466
460
  </div>
@@ -488,13 +482,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
488
482
  </div>
489
483
  }
490
484
  <div
491
- #scroll
492
- class="ng-dropdown-panel-items ng-select-virtual-scroll-host"
493
- [attr.aria-label]="ariaLabelDropdown"
485
+ #scrollHost
486
+ class="ng-dropdown-panel-items"
487
+ [class.ng-select-virtual-scroll-host]="virtualScroll"
488
+ [attr.id]="listboxId"
494
489
  role="listbox"
495
490
  >
496
- <div #padding [class.ng-select-virtual-scroll-spacer]="virtualScroll"></div>
497
- <div #content [class.ng-select-virtual-scroll-content]="virtualScroll && items.length">
491
+ <div #scrollSpacer [class.ng-select-virtual-scroll-spacer]="virtualScroll"></div>
492
+ <div #scrollContent [class.ng-select-virtual-scroll-content]="virtualScroll && items.length">
498
493
  <ng-content />
499
494
  </div>
500
495
  </div>
@@ -511,7 +506,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
511
506
  encapsulation: ViewEncapsulation.None,
512
507
  changeDetection: ChangeDetectionStrategy.OnPush,
513
508
  }]
514
- }], propDecorators: { items: [{
509
+ }], propDecorators: { listboxId: [{
510
+ type: Input
511
+ }], items: [{
515
512
  type: Input
516
513
  }], markedItem: [{
517
514
  type: Input
@@ -530,8 +527,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
530
527
  type: Input
531
528
  }], filterValue: [{
532
529
  type: Input
533
- }], ariaLabelDropdown: [{
534
- type: Input
535
530
  }], update: [{
536
531
  type: Output
537
532
  }], scroll: [{
@@ -540,15 +535,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
540
535
  type: Output
541
536
  }], outsideClick: [{
542
537
  type: Output
543
- }], contentElementRef: [{
538
+ }], scrollHostElRef: [{
544
539
  type: ViewChild,
545
- args: ['content', { read: ElementRef, static: true }]
546
- }], scrollElementRef: [{
540
+ args: ['scrollHost', { read: ElementRef, static: true }]
541
+ }], scrollContentElRef: [{
547
542
  type: ViewChild,
548
- args: ['scroll', { read: ElementRef, static: true }]
549
- }], paddingElementRef: [{
543
+ args: ['scrollContent', { read: ElementRef, static: true }]
544
+ }], scrollSpacerElRef: [{
550
545
  type: ViewChild,
551
- args: ['padding', { read: ElementRef, static: true }]
546
+ args: ['scrollSpacer', { read: ElementRef, static: true }]
552
547
  }] } });
553
548
 
554
549
  class NgOption {
@@ -1710,7 +1705,7 @@ class ItemsList {
1710
1705
  label: isDefined(label) ? label.toString() : '',
1711
1706
  value,
1712
1707
  disabled: item.disabled,
1713
- htmlId: `${this._ngSelect.dropdownId}-${index}`,
1708
+ htmlId: `${this._ngSelect._uid}-option-${index}`,
1714
1709
  };
1715
1710
  }
1716
1711
  mapSelectedItems() {
@@ -1779,7 +1774,7 @@ class ItemsList {
1779
1774
  if (this._ngSelect.hideSelected) {
1780
1775
  return -1;
1781
1776
  }
1782
- if (this._markedIndex > -1 && this.markedItem === undefined) {
1777
+ if (this._markedIndex > -1 && this.markedItem == null) {
1783
1778
  return -1;
1784
1779
  }
1785
1780
  const selectedIndex = this._filteredItems.indexOf(this.lastSelectedItem);
@@ -1822,9 +1817,10 @@ class ItemsList {
1822
1817
  _flatten(groups) {
1823
1818
  const isGroupByFn = isFunction(this._ngSelect.groupBy);
1824
1819
  const items = [];
1825
- for (const key of Array.from(groups.keys())) {
1820
+ let groupIndex = 0;
1821
+ for (const key of groups.keys()) {
1826
1822
  let i = items.length;
1827
- if (key === undefined) {
1823
+ if (key == null) {
1828
1824
  const withoutGroup = groups.get(undefined) || [];
1829
1825
  items.push(...withoutGroup.map(x => {
1830
1826
  x.index = i++;
@@ -1835,11 +1831,11 @@ class ItemsList {
1835
1831
  const isObjectKey = isObject(key);
1836
1832
  const parent = {
1837
1833
  label: isObjectKey ? '' : String(key),
1838
- children: undefined,
1834
+ children: null,
1839
1835
  parent: null,
1840
1836
  index: i++,
1841
1837
  disabled: !this._ngSelect.selectableGroup,
1842
- htmlId: newId(),
1838
+ htmlId: `${this._ngSelect._uid}-group-${groupIndex}-heading`,
1843
1839
  };
1844
1840
  const groupKey = isGroupByFn
1845
1841
  ? this._ngSelect.bindLabel
@@ -1853,7 +1849,7 @@ class ItemsList {
1853
1849
  });
1854
1850
  const children = groups.get(key).map(x => {
1855
1851
  x.parent = parent;
1856
- x.children = undefined;
1852
+ x.children = null;
1857
1853
  x.index = i++;
1858
1854
  return x;
1859
1855
  });
@@ -1861,6 +1857,7 @@ class ItemsList {
1861
1857
  parent.value = groupValue(key, children.map(x => x.value));
1862
1858
  items.push(parent);
1863
1859
  items.push(...children);
1860
+ groupIndex++;
1864
1861
  }
1865
1862
  return items;
1866
1863
  }
@@ -1874,11 +1871,9 @@ class NgSelectConfig {
1874
1871
  this.addTagText = 'Add item';
1875
1872
  this.loadingText = 'Loading...';
1876
1873
  this.clearAllText = 'Clear all';
1877
- this.ariaLabelDropdown = 'Options List';
1878
- this.disableVirtualScroll = true;
1874
+ this.virtualScroll = false;
1879
1875
  this.openOnEnter = true;
1880
1876
  this.appearance = 'underline';
1881
- this.tabFocusOnClear = true;
1882
1877
  }
1883
1878
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: NgSelectConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1884
1879
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: NgSelectConfig, providedIn: 'root' }); }
@@ -1894,7 +1889,7 @@ class NgItemLabel {
1894
1889
  this.escape = true;
1895
1890
  this.element = inject(ElementRef);
1896
1891
  }
1897
- ngOnChanges(changes) {
1892
+ ngOnChanges() {
1898
1893
  this.element.nativeElement.innerHTML = this.escape
1899
1894
  ? escapeHTML(this.ngItemLabel)
1900
1895
  : this.ngItemLabel;
@@ -2157,8 +2152,8 @@ class DefaultSelectionModel {
2157
2152
  }
2158
2153
  }
2159
2154
 
2160
- /* eslint-disable @angular-eslint/no-output-rename */
2161
2155
  const SELECTION_MODEL_FACTORY = new InjectionToken('ng-select-selection-model');
2156
+ let nextUniqueId = 0;
2162
2157
  class NgSelect {
2163
2158
  set panelClass(value) {
2164
2159
  const newClassList = {};
@@ -2175,6 +2170,12 @@ class NgSelect {
2175
2170
  this._classList = newClassList;
2176
2171
  this._cdr.markForCheck();
2177
2172
  }
2173
+ get inputId() {
2174
+ return this._inputId || `${this._uid}-input`;
2175
+ }
2176
+ set inputId(value) {
2177
+ this._inputId = value;
2178
+ }
2178
2179
  get items() {
2179
2180
  return this._items;
2180
2181
  }
@@ -2195,25 +2196,13 @@ class NgSelect {
2195
2196
  this._compareWith = fn;
2196
2197
  }
2197
2198
  get clearSearchOnAdd() {
2198
- if (isDefined(this._clearSearchOnAdd)) {
2199
- return this._clearSearchOnAdd;
2200
- }
2201
- else if (isDefined(this._config.clearSearchOnAdd)) {
2202
- return this._config.clearSearchOnAdd;
2203
- }
2204
- return this.closeOnSelect;
2199
+ return this._clearSearchOnAdd ?? this._config.clearSearchOnAdd ?? this.closeOnSelect;
2205
2200
  }
2206
2201
  set clearSearchOnAdd(value) {
2207
2202
  this._clearSearchOnAdd = value;
2208
2203
  }
2209
2204
  get deselectOnClick() {
2210
- if (isDefined(this._deselectOnClick)) {
2211
- return this._deselectOnClick;
2212
- }
2213
- else if (isDefined(this._config.deselectOnClick)) {
2214
- return this._config.deselectOnClick;
2215
- }
2216
- return this.multiple;
2205
+ return this._deselectOnClick ?? this._config.deselectOnClick ?? this.multiple;
2217
2206
  }
2218
2207
  set deselectOnClick(value) {
2219
2208
  this._deselectOnClick = value;
@@ -2257,6 +2246,22 @@ class NgSelect {
2257
2246
  const term = this.searchTerm?.trim();
2258
2247
  return term && term.length >= this.minTermLength;
2259
2248
  }
2249
+ get showClearButton() {
2250
+ return this.clearable && (this.hasValue || this.searchTerm) && !this.disabled;
2251
+ }
2252
+ get showNoItemsFound() {
2253
+ const empty = this.itemsList.filteredItems.length === 0;
2254
+ return (((empty && !this._isTypeahead && !this.loading) ||
2255
+ (empty && this._isTypeahead && this._validTerm && !this.loading)) &&
2256
+ !this.showAddTag);
2257
+ }
2258
+ get showTypeToSearch() {
2259
+ const empty = this.itemsList.filteredItems.length === 0;
2260
+ return empty && this._isTypeahead && !this._validTerm && !this.loading;
2261
+ }
2262
+ get listboxId() {
2263
+ return `${this._uid}-listbox`;
2264
+ }
2260
2265
  constructor() {
2261
2266
  this._cdr = inject(ChangeDetectorRef);
2262
2267
  this._elementRef = inject(ElementRef);
@@ -2265,17 +2270,26 @@ class NgSelect {
2265
2270
  this.autoFocus = inject(new HostAttributeToken('autofocus'), { optional: true });
2266
2271
  this.classes = inject(new HostAttributeToken('class'), { optional: true });
2267
2272
  this._classList = {};
2268
- this.fixedPlaceholder = false;
2269
- this.dropdownPosition = 'auto';
2273
+ this._uid = `ng-select-${nextUniqueId++}`;
2274
+ this.bindLabel = this._config.bindLabel;
2275
+ this.bindValue = this._config.bindValue;
2276
+ this.placeholder = this._config.placeholder;
2277
+ this.fixedPlaceholder = this._config.fixedPlaceholder ?? false;
2278
+ this.appendTo = this._config.appendTo;
2279
+ this.panelPosition = 'auto';
2270
2280
  this.readonly = false;
2271
2281
  this.multiple = false;
2272
2282
  this.searchable = true;
2273
2283
  this.clearable = true;
2284
+ this.clearOnBackspace = true;
2285
+ this.clearAllText = this._config.clearAllText;
2274
2286
  this.loading = false;
2287
+ this.loadingText = this._config.loadingText;
2275
2288
  this.closeOnSelect = true;
2276
- this.clearOnBackspace = true;
2277
2289
  this.hideSelected = false;
2278
2290
  this.selectOnTab = false;
2291
+ this.openOnEnter = this._config.openOnEnter;
2292
+ this.virtualScroll = this._config.virtualScroll;
2279
2293
  this.bufferAmount = 4;
2280
2294
  this.selectableGroup = false;
2281
2295
  this.selectableGroupAsModel = true;
@@ -2286,14 +2300,17 @@ class NgSelect {
2286
2300
  this.markFirst = true;
2287
2301
  this.preventToggleOnRightClick = false;
2288
2302
  this.addTag = false;
2303
+ this.addTagText = this._config.addTagText;
2304
+ this.notFoundText = this._config.notFoundText;
2305
+ this.typeToSearchText = this._config.typeToSearchText;
2289
2306
  this.searchFn = null;
2290
2307
  this.keyDownFn = (_) => true;
2291
2308
  this.trackByFn = null;
2292
- this.labelForId = null;
2309
+ this.appearance = this._config.appearance;
2293
2310
  this.inputAttrs = {};
2294
- this.ariaLabelDropdown = 'Options List';
2295
2311
  // isOpen should allow undefined value, so avoid using booleanAttribute!
2296
2312
  this.isOpen = false;
2313
+ this._inputId = '';
2297
2314
  this._items = [];
2298
2315
  this._disabled = false;
2299
2316
  // output events
@@ -2308,12 +2325,11 @@ class NgSelect {
2308
2325
  this.removeEvent = new EventEmitter();
2309
2326
  this.scroll = new EventEmitter();
2310
2327
  this.scrollToEnd = new EventEmitter();
2311
- this.dropdownId = newId();
2328
+ this.itemsList = new ItemsList(this, this.newSelectionModel?.() ?? DefaultSelectionModelFactory());
2312
2329
  this.element = this._elementRef.nativeElement;
2313
2330
  this.viewPortItems = [];
2314
2331
  this.searchTerm = null;
2315
2332
  this.escapeHTML = true;
2316
- this.tabFocusOnClear = true;
2317
2333
  this._pressedKeys = [];
2318
2334
  this._isComposing = false;
2319
2335
  this._defaultLabel = 'label';
@@ -2331,9 +2347,7 @@ class NgSelect {
2331
2347
  const option = this.selectedItems.find(x => x.value === item);
2332
2348
  this.unselect(option);
2333
2349
  };
2334
- this._mergeGlobalConfig();
2335
2350
  this.classes?.split(/\s+/).forEach(c => (this._classList[c] = true));
2336
- this.itemsList = new ItemsList(this, this.newSelectionModel ? this.newSelectionModel() : DefaultSelectionModelFactory());
2337
2351
  }
2338
2352
  ngOnInit() {
2339
2353
  this._handleKeyPresses();
@@ -2357,7 +2371,6 @@ class NgSelect {
2357
2371
  if (changes['inputAttrs']) {
2358
2372
  this._setInputAttributes();
2359
2373
  }
2360
- this._setTabFocusOnClear();
2361
2374
  }
2362
2375
  ngAfterViewInit() {
2363
2376
  if (!this._itemsAreUsed) {
@@ -2458,7 +2471,7 @@ class NgSelect {
2458
2471
  this.handleArrowClick();
2459
2472
  return;
2460
2473
  }
2461
- if (target.classList.contains('ng-value-icon')) {
2474
+ if (target.classList.contains('ng-value-remove')) {
2462
2475
  return;
2463
2476
  }
2464
2477
  if (!this.focused) {
@@ -2585,7 +2598,7 @@ class NgSelect {
2585
2598
  selectTag() {
2586
2599
  let tag;
2587
2600
  if (isFunction(this.addTag)) {
2588
- tag = this.addTag(this.searchTerm);
2601
+ tag = this.addTag(this.searchTerm || '');
2589
2602
  }
2590
2603
  else {
2591
2604
  tag = this._primitive ? this.searchTerm : { [this.bindLabel]: this.searchTerm };
@@ -2600,25 +2613,6 @@ class NgSelect {
2600
2613
  this.select(handleTag(tag));
2601
2614
  }
2602
2615
  }
2603
- showClear() {
2604
- return this.clearable && (this.hasValue || this.searchTerm) && !this.disabled;
2605
- }
2606
- focusOnClear() {
2607
- this.blur();
2608
- if (this.clearButton) {
2609
- this.clearButton.nativeElement.focus();
2610
- }
2611
- }
2612
- showNoItemsFound() {
2613
- const empty = this.itemsList.filteredItems.length === 0;
2614
- return (((empty && !this._isTypeahead && !this.loading) ||
2615
- (empty && this._isTypeahead && this._validTerm && !this.loading)) &&
2616
- !this.showAddTag);
2617
- }
2618
- showTypeToSearch() {
2619
- const empty = this.itemsList.filteredItems.length === 0;
2620
- return empty && this._isTypeahead && !this._validTerm && !this.loading;
2621
- }
2622
2616
  onCompositionStart() {
2623
2617
  this._isComposing = true;
2624
2618
  }
@@ -2809,23 +2803,16 @@ class NgSelect {
2809
2803
  _setInputAttributes() {
2810
2804
  const input = this.searchInput.nativeElement;
2811
2805
  const attributes = {
2812
- 'type': 'text',
2813
- 'autocorrect': 'off',
2814
- 'autocapitalize': 'off',
2815
- 'autocomplete': 'off',
2816
- 'aria-controls': this.dropdownId,
2806
+ type: 'text',
2807
+ autocorrect: 'off',
2808
+ autocapitalize: 'off',
2809
+ autocomplete: 'off',
2817
2810
  ...this.inputAttrs,
2818
2811
  };
2819
2812
  for (const key of Object.keys(attributes)) {
2820
2813
  input.setAttribute(key, attributes[key]);
2821
2814
  }
2822
2815
  }
2823
- _setTabFocusOnClear() {
2824
- this.tabFocusOnClear = isDefined(this.tabFocusOnClearButton)
2825
- ? !!this.tabFocusOnClearButton
2826
- : this._config.tabFocusOnClear;
2827
- this._cdr.markForCheck();
2828
- }
2829
2816
  _updateNgModel() {
2830
2817
  const model = [];
2831
2818
  for (const item of this.selectedItems) {
@@ -2889,11 +2876,7 @@ class NgSelect {
2889
2876
  }
2890
2877
  _handleTab(e) {
2891
2878
  if (this.isOpen === false) {
2892
- if (this.showClear() && !e.shiftKey && this.tabFocusOnClear) {
2893
- this.focusOnClear();
2894
- e.preventDefault();
2895
- }
2896
- else if (!this.addTag) {
2879
+ if (!this.addTag) {
2897
2880
  return;
2898
2881
  }
2899
2882
  }
@@ -2982,52 +2965,14 @@ class NgSelect {
2982
2965
  this.clearModel();
2983
2966
  }
2984
2967
  }
2985
- _mergeGlobalConfig() {
2986
- this.placeholder = this.placeholder || this._config.placeholder;
2987
- this.fixedPlaceholder = this.fixedPlaceholder || this._config.fixedPlaceholder;
2988
- this.notFoundText = this.notFoundText || this._config.notFoundText;
2989
- this.typeToSearchText = this.typeToSearchText || this._config.typeToSearchText;
2990
- this.addTagText = this.addTagText || this._config.addTagText;
2991
- this.loadingText = this.loadingText || this._config.loadingText;
2992
- this.clearAllText = this.clearAllText || this._config.clearAllText;
2993
- this.virtualScroll = this.getVirtualScroll(this._config);
2994
- this.openOnEnter = isDefined(this.openOnEnter) ? this.openOnEnter : this._config.openOnEnter;
2995
- this.appendTo = this.appendTo || this._config.appendTo;
2996
- this.bindValue = this.bindValue || this._config.bindValue;
2997
- this.bindLabel = this.bindLabel || this._config.bindLabel;
2998
- this.appearance = this.appearance || this._config.appearance;
2999
- this._setTabFocusOnClear();
3000
- }
3001
- /**
3002
- * Gets virtual scroll value from input or from config
3003
- *
3004
- * @param config NgSelectConfig object
3005
- *
3006
- * @returns `true` if virtual scroll is enabled, `false` otherwise
3007
- */
3008
- getVirtualScroll(config) {
3009
- return isDefined(this.virtualScroll)
3010
- ? this.virtualScroll
3011
- : this.isVirtualScrollDisabled(config);
3012
- }
3013
- /**
3014
- * Gets disableVirtualScroll value from input or from config
3015
- *
3016
- * @param config NgSelectConfig object
3017
- *
3018
- * @returns `true` if disableVirtualScroll is enabled, `false` otherwise
3019
- */
3020
- isVirtualScrollDisabled(config) {
3021
- return isDefined(config.disableVirtualScroll) ? !config.disableVirtualScroll : false;
3022
- }
3023
2968
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: NgSelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3024
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: NgSelect, isStandalone: true, selector: "ng-select", inputs: { bindLabel: "bindLabel", bindValue: "bindValue", placeholder: "placeholder", fixedPlaceholder: "fixedPlaceholder", appendTo: "appendTo", dropdownPosition: "dropdownPosition", readonly: ["readonly", "readonly", booleanAttribute], multiple: ["multiple", "multiple", booleanAttribute], searchable: ["searchable", "searchable", booleanAttribute], clearable: ["clearable", "clearable", booleanAttribute], clearAllText: "clearAllText", loading: ["loading", "loading", booleanAttribute], loadingText: "loadingText", closeOnSelect: ["closeOnSelect", "closeOnSelect", booleanAttribute], clearOnBackspace: ["clearOnBackspace", "clearOnBackspace", booleanAttribute], hideSelected: ["hideSelected", "hideSelected", booleanAttribute], selectOnTab: ["selectOnTab", "selectOnTab", booleanAttribute], openOnEnter: ["openOnEnter", "openOnEnter", booleanAttribute], virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], bufferAmount: ["bufferAmount", "bufferAmount", numberAttribute], selectableGroup: ["selectableGroup", "selectableGroup", booleanAttribute], selectableGroupAsModel: ["selectableGroupAsModel", "selectableGroupAsModel", booleanAttribute], searchWhileComposing: ["searchWhileComposing", "searchWhileComposing", booleanAttribute], editableSearchTerm: ["editableSearchTerm", "editableSearchTerm", booleanAttribute], maxSelectedItems: ["maxSelectedItems", "maxSelectedItems", numberAttribute], minTermLength: ["minTermLength", "minTermLength", numberAttribute], markFirst: ["markFirst", "markFirst", booleanAttribute], preventToggleOnRightClick: ["preventToggleOnRightClick", "preventToggleOnRightClick", booleanAttribute], addTag: "addTag", addTagText: "addTagText", notFoundText: "notFoundText", typeahead: "typeahead", typeToSearchText: "typeToSearchText", groupBy: "groupBy", groupValue: "groupValue", searchFn: "searchFn", keyDownFn: "keyDownFn", trackByFn: "trackByFn", labelForId: "labelForId", inputAttrs: "inputAttrs", appearance: "appearance", ariaLabelDropdown: "ariaLabelDropdown", ariaLabel: "ariaLabel", tabIndex: ["tabIndex", "tabIndex", numberAttribute], tabFocusOnClearButton: "tabFocusOnClearButton", isOpen: "isOpen", panelClass: "panelClass", items: "items", compareWith: "compareWith", clearSearchOnAdd: "clearSearchOnAdd", deselectOnClick: "deselectOnClick" }, outputs: { blurEvent: "blur", focusEvent: "focus", changeEvent: "change", openEvent: "open", closeEvent: "close", searchEvent: "search", clearEvent: "clear", addEvent: "add", removeEvent: "remove", scroll: "scroll", scrollToEnd: "scrollToEnd" }, host: { listeners: { "keydown": "handleKeyDown($event)" }, properties: { "class.ng-select-single": "!multiple", "class.ng-select-multiple": "multiple", "class.ng-select-typeahead": "typeahead", "class.ng-select-taggable": "addTag", "class.ng-select-searchable": "searchable", "class.ng-select-clearable": "clearable", "class.ng-select-opened": "isOpen", "class.ng-select-filtered": "filtered", "class.ng-select-disabled": "disabled" }, classAttribute: "ng-select" }, providers: [
2969
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: NgSelect, isStandalone: true, selector: "ng-select", inputs: { bindLabel: "bindLabel", bindValue: "bindValue", placeholder: "placeholder", fixedPlaceholder: "fixedPlaceholder", appendTo: "appendTo", panelPosition: "panelPosition", readonly: ["readonly", "readonly", booleanAttribute], multiple: ["multiple", "multiple", booleanAttribute], searchable: ["searchable", "searchable", booleanAttribute], clearable: ["clearable", "clearable", booleanAttribute], clearOnBackspace: ["clearOnBackspace", "clearOnBackspace", booleanAttribute], clearAllText: "clearAllText", loading: ["loading", "loading", booleanAttribute], loadingText: "loadingText", closeOnSelect: ["closeOnSelect", "closeOnSelect", booleanAttribute], hideSelected: ["hideSelected", "hideSelected", booleanAttribute], selectOnTab: ["selectOnTab", "selectOnTab", booleanAttribute], openOnEnter: ["openOnEnter", "openOnEnter", booleanAttribute], virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], bufferAmount: ["bufferAmount", "bufferAmount", numberAttribute], selectableGroup: ["selectableGroup", "selectableGroup", booleanAttribute], selectableGroupAsModel: ["selectableGroupAsModel", "selectableGroupAsModel", booleanAttribute], searchWhileComposing: ["searchWhileComposing", "searchWhileComposing", booleanAttribute], editableSearchTerm: ["editableSearchTerm", "editableSearchTerm", booleanAttribute], maxSelectedItems: ["maxSelectedItems", "maxSelectedItems", numberAttribute], minTermLength: ["minTermLength", "minTermLength", numberAttribute], markFirst: ["markFirst", "markFirst", booleanAttribute], preventToggleOnRightClick: ["preventToggleOnRightClick", "preventToggleOnRightClick", booleanAttribute], addTag: "addTag", addTagText: "addTagText", notFoundText: "notFoundText", typeahead: "typeahead", typeToSearchText: "typeToSearchText", groupBy: "groupBy", groupValue: "groupValue", searchFn: "searchFn", keyDownFn: "keyDownFn", trackByFn: "trackByFn", appearance: "appearance", tabIndex: ["tabIndex", "tabIndex", numberAttribute], ariaLabel: "ariaLabel", ariaLabelledby: "ariaLabelledby", ariaDescribedby: "ariaDescribedby", inputAttrs: "inputAttrs", isOpen: "isOpen", panelClass: "panelClass", inputId: "inputId", items: "items", compareWith: "compareWith", clearSearchOnAdd: "clearSearchOnAdd", deselectOnClick: "deselectOnClick" }, outputs: { blurEvent: "blur", focusEvent: "focus", changeEvent: "change", openEvent: "open", closeEvent: "close", searchEvent: "search", clearEvent: "clear", addEvent: "add", removeEvent: "remove", scroll: "scroll", scrollToEnd: "scrollToEnd" }, host: { listeners: { "keydown": "handleKeyDown($event)" }, properties: { "class.ng-select-single": "!multiple", "class.ng-select-multiple": "multiple", "class.ng-select-typeahead": "typeahead", "class.ng-select-taggable": "addTag", "class.ng-select-searchable": "searchable", "class.ng-select-clearable": "clearable", "class.ng-select-opened": "isOpen", "class.ng-select-filtered": "filtered", "class.ng-select-disabled": "disabled" }, classAttribute: "ng-select" }, providers: [
3025
2970
  {
3026
2971
  provide: NG_VALUE_ACCESSOR,
3027
2972
  useExisting: forwardRef(() => NgSelect),
3028
2973
  multi: true,
3029
2974
  },
3030
- ], queries: [{ propertyName: "optionTemplate", first: true, predicate: NgOptionTemplate, descendants: true, read: TemplateRef }, { propertyName: "optgroupTemplate", first: true, predicate: NgOptgroupTemplate, descendants: true, read: TemplateRef }, { propertyName: "labelTemplate", first: true, predicate: NgLabelTemplate, descendants: true, read: TemplateRef }, { propertyName: "multiLabelTemplate", first: true, predicate: NgMultiLabelTemplate, descendants: true, read: TemplateRef }, { propertyName: "headerTemplate", first: true, predicate: NgHeaderTemplate, descendants: true, read: TemplateRef }, { propertyName: "footerTemplate", first: true, predicate: NgFooterTemplate, descendants: true, read: TemplateRef }, { propertyName: "notFoundTemplate", first: true, predicate: NgNotFoundTemplate, descendants: true, read: TemplateRef }, { propertyName: "placeholderTemplate", first: true, predicate: NgPlaceholderTemplate, descendants: true, read: TemplateRef }, { propertyName: "typeToSearchTemplate", first: true, predicate: NgTypeToSearchTemplate, descendants: true, read: TemplateRef }, { propertyName: "loadingTextTemplate", first: true, predicate: NgLoadingTextTemplate, descendants: true, read: TemplateRef }, { propertyName: "tagTemplate", first: true, predicate: NgTagTemplate, descendants: true, read: TemplateRef }, { propertyName: "loadingSpinnerTemplate", first: true, predicate: NgLoadingSpinnerTemplate, descendants: true, read: TemplateRef }, { propertyName: "clearButtonTemplate", first: true, predicate: NgClearButtonTemplate, descendants: true, read: TemplateRef }, { propertyName: "ngOptions", predicate: NgOption, descendants: true }], viewQueries: [{ propertyName: "dropdownPanel", first: true, predicate: i0.forwardRef(() => NgDropdownPanel), descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, static: true }, { propertyName: "clearButton", first: true, predicate: ["clearButton"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/role-has-required-aria -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- eslint-disable @angular-eslint/template/mouse-events-have-key-events -->\n<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<div\n class=\"ng-select-container\"\n [class.ng-appearance-outline]=\"appearance === 'outline'\"\n [class.ng-has-value]=\"hasValue\"\n (mousedown)=\"handleMousedown($event)\"\n>\n <div class=\"ng-value-container\">\n @if ((selectedItems.length === 0 && !searchTerm) || fixedPlaceholder) {\n <ng-template #defaultPlaceholderTemplate>\n <div class=\"ng-placeholder\">{{ placeholder }}</div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\" />\n }\n\n @if ((!multiLabelTemplate || !multiple) && selectedItems.length > 0) {\n @for (item of selectedItems; track trackByOption($index, item)) {\n <div class=\"ng-value\" [class.ng-value-disabled]=\"item.disabled\">\n <ng-template #defaultLabelTemplate>\n <span\n class=\"ng-value-label\"\n [ngItemLabel]=\"item.label || ''\"\n [escape]=\"escapeHTML\"\n ></span>\n <span class=\"ng-value-icon\" (click)=\"unselect(item)\" aria-hidden=\"true\">\u00D7</span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"labelTemplate || defaultLabelTemplate\"\n [ngTemplateOutletContext]=\"{ item: item.value, clear: clearItem, label: item.label }\"\n />\n </div>\n }\n }\n\n @if (multiple && multiLabelTemplate && selectedValues.length > 0) {\n <ng-template\n [ngTemplateOutlet]=\"multiLabelTemplate\"\n [ngTemplateOutletContext]=\"{ items: selectedValues, clear: clearItem }\"\n />\n }\n\n <div class=\"ng-input\">\n <input\n #searchInput\n [disabled]=\"disabled\"\n [readOnly]=\"!searchable || itemsList.maxItemsSelected\"\n [value]=\"searchTerm ?? ''\"\n (change)=\"$event.stopPropagation()\"\n (input)=\"filter(searchInput.value)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n (compositionend)=\"onCompositionEnd(searchInput.value)\"\n (compositionstart)=\"onCompositionStart()\"\n [attr.aria-activedescendant]=\"isOpen ? itemsList.markedItem?.htmlId : null\"\n [attr.aria-controls]=\"isOpen ? dropdownId : null\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.id]=\"labelForId\"\n [attr.tabindex]=\"tabIndex\"\n aria-autocomplete=\"list\"\n role=\"combobox\"\n />\n </div>\n </div>\n\n @if (loading) {\n <ng-template #defaultLoadingSpinnerTemplate>\n <div class=\"ng-select-spinner\"></div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate || defaultLoadingSpinnerTemplate\" />\n }\n\n @if (showClear()) {\n @if (clearButtonTemplate) {\n <ng-container [ngTemplateOutlet]=\"clearButtonTemplate\" />\n } @else {\n <span\n #clearButton\n class=\"ng-clear-wrapper\"\n title=\"{{ clearAllText }}\"\n role=\"button\"\n [attr.tabindex]=\"tabFocusOnClear ? 0 : -1\"\n >\n <span class=\"ng-clear\" aria-hidden=\"true\">\u00D7</span>\n </span>\n }\n }\n\n <span class=\"ng-arrow-wrapper\">\n <span class=\"ng-arrow\"></span>\n </span>\n</div>\n\n@if (isOpen) {\n <ng-dropdown-panel\n class=\"ng-dropdown-panel\"\n [class.ng-select-multiple]=\"multiple\"\n [class]=\"appendTo ? _classList : null\"\n [id]=\"dropdownId\"\n [virtualScroll]=\"virtualScroll\"\n [bufferAmount]=\"bufferAmount\"\n [appendTo]=\"appendTo\"\n [position]=\"dropdownPosition\"\n [headerTemplate]=\"headerTemplate\"\n [footerTemplate]=\"footerTemplate\"\n [filterValue]=\"searchTerm\"\n [items]=\"itemsList.filteredItems\"\n [markedItem]=\"itemsList.markedItem\"\n [ariaLabelDropdown]=\"ariaLabelDropdown\"\n (update)=\"viewPortItems = $event\"\n (scroll)=\"scroll.emit($event)\"\n (scrollToEnd)=\"scrollToEnd.emit()\"\n (outsideClick)=\"close()\"\n >\n <ng-container>\n @for (item of viewPortItems; track trackByOption($index, item)) {\n <div\n class=\"ng-option\"\n [class.ng-option-disabled]=\"item.disabled\"\n [class.ng-option-selected]=\"item.selected\"\n [class.ng-optgroup]=\"item.children\"\n [class.ng-option]=\"!item.children\"\n [class.ng-option-child]=\"!!item.parent\"\n [class.ng-option-marked]=\"item === itemsList.markedItem\"\n [attr.id]=\"item?.htmlId\"\n [attr.role]=\"item.children ? 'group' : 'option'\"\n [attr.aria-selected]=\"item.selected\"\n [attr.aria-setsize]=\"itemsList.filteredItems.length\"\n [attr.aria-posinset]=\"item.index! + 1\"\n (click)=\"toggleItem(item)\"\n (mouseover)=\"onItemHover(item)\"\n >\n <ng-template #defaultOptionTemplate>\n <span\n class=\"ng-option-label\"\n [ngItemLabel]=\"item.label || ''\"\n [escape]=\"escapeHTML\"\n ></span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"\n item.children\n ? optgroupTemplate || defaultOptionTemplate\n : optionTemplate || defaultOptionTemplate\n \"\n [ngTemplateOutletContext]=\"{\n item: item.value,\n item$: item,\n index: item.index,\n searchTerm: searchTerm,\n }\"\n />\n </div>\n }\n @if (showAddTag) {\n <div\n class=\"ng-option\"\n [class.ng-option-marked]=\"!itemsList.markedItem\"\n (click)=\"selectTag()\"\n (mouseover)=\"itemsList.unmarkItem()\"\n role=\"option\"\n >\n <ng-template #defaultTagTemplate>\n <span>\n <span class=\"ng-tag-label\">{{ addTagText }}</span>\n \"{{ searchTerm }}\"\n </span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"tagTemplate || defaultTagTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n />\n </div>\n }\n </ng-container>\n @if (showNoItemsFound()) {\n <ng-template #defaultNotFoundTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ notFoundText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"notFoundTemplate || defaultNotFoundTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n />\n }\n @if (showTypeToSearch()) {\n <ng-template #defaultTypeToSearchTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ typeToSearchText }}</div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"typeToSearchTemplate || defaultTypeToSearchTemplate\" />\n }\n @if (loading && itemsList.filteredItems.length === 0) {\n <ng-template #defaultLoadingTextTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ loadingText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"loadingTextTemplate || defaultLoadingTextTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n />\n }\n </ng-dropdown-panel>\n}\n\n<!-- Always present aria-live region -->\n<div class=\"ng-select-visually-hidden\" aria-atomic=\"true\" aria-live=\"polite\" role=\"status\">\n @if (isOpen && showNoItemsFound()) {\n {{ notFoundText }}\n }\n</div>\n", styles: ["@charset \"UTF-8\";.ng-select{position:relative;display:block}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-placeholder,.ng-select.ng-select-disabled .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder,.ng-select .ng-has-value .ng-placeholder{display:none}.ng-select .ng-select-container{box-sizing:border-box;position:relative;display:flex;width:100%;outline:none;overflow:hidden;cursor:default}.ng-select .ng-value-container{display:flex;flex:1}.ng-select .ng-input{box-sizing:border-box;opacity:0}.ng-select .ng-input>input{width:100%;padding:0;background:transparent;border:none;box-shadow:none;outline:none;cursor:default}.ng-select .ng-input>input::-ms-clear{display:none}.ng-select .ng-input>input[readonly]{-webkit-user-select:unset;user-select:unset;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-value-container,.ng-select.ng-select-single .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-value-icon{display:none}.ng-select.ng-select-single .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-placeholder{position:absolute;z-index:1}.ng-select.ng-select-multiple .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-input{flex:1;z-index:2}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-arrow-wrapper{position:relative;text-align:center;-webkit-user-select:none;user-select:none;cursor:pointer}.ng-select .ng-arrow{position:relative;display:inline-block;height:0;width:0;pointer-events:none}.ng-dropdown-panel{box-sizing:border-box;position:absolute;z-index:1050;width:100%;opacity:0;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-optgroup,.ng-dropdown-panel .ng-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-option{display:block;cursor:pointer}.ng-dropdown-panel .ng-option.disabled{cursor:default}.ng-dropdown-panel .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-option-label:empty:before{content:\"\\200b\"}.ng-select-virtual-scroll-host{position:relative;display:block;overflow:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}.ng-select-virtual-scroll-content{position:absolute;top:0;left:0;width:100%;height:100%}.ng-select-virtual-scroll-spacer{width:1px;opacity:0}.ng-select-visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0;clip-path:rect(0 0 0 0);white-space:nowrap}.ng-select-spinner{position:relative;width:16px;height:16px;margin:0 4px;font-size:10px;text-indent:-9999em;border-radius:50%;border:2px solid rgba(66,66,66,.2);border-left-color:#424242;animation:load8 .8s infinite linear}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgItemLabel, selector: "[ngItemLabel]", inputs: ["ngItemLabel", "escape"] }, { kind: "component", type: NgDropdownPanel, selector: "ng-dropdown-panel", inputs: ["items", "markedItem", "position", "appendTo", "bufferAmount", "virtualScroll", "headerTemplate", "footerTemplate", "filterValue", "ariaLabelDropdown"], outputs: ["update", "scroll", "scrollToEnd", "outsideClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2975
+ ], queries: [{ propertyName: "optionTemplate", first: true, predicate: NgOptionTemplate, descendants: true, read: TemplateRef }, { propertyName: "optgroupTemplate", first: true, predicate: NgOptgroupTemplate, descendants: true, read: TemplateRef }, { propertyName: "labelTemplate", first: true, predicate: NgLabelTemplate, descendants: true, read: TemplateRef }, { propertyName: "multiLabelTemplate", first: true, predicate: NgMultiLabelTemplate, descendants: true, read: TemplateRef }, { propertyName: "headerTemplate", first: true, predicate: NgHeaderTemplate, descendants: true, read: TemplateRef }, { propertyName: "footerTemplate", first: true, predicate: NgFooterTemplate, descendants: true, read: TemplateRef }, { propertyName: "notFoundTemplate", first: true, predicate: NgNotFoundTemplate, descendants: true, read: TemplateRef }, { propertyName: "placeholderTemplate", first: true, predicate: NgPlaceholderTemplate, descendants: true, read: TemplateRef }, { propertyName: "typeToSearchTemplate", first: true, predicate: NgTypeToSearchTemplate, descendants: true, read: TemplateRef }, { propertyName: "loadingTextTemplate", first: true, predicate: NgLoadingTextTemplate, descendants: true, read: TemplateRef }, { propertyName: "tagTemplate", first: true, predicate: NgTagTemplate, descendants: true, read: TemplateRef }, { propertyName: "loadingSpinnerTemplate", first: true, predicate: NgLoadingSpinnerTemplate, descendants: true, read: TemplateRef }, { propertyName: "clearButtonTemplate", first: true, predicate: NgClearButtonTemplate, descendants: true, read: TemplateRef }, { propertyName: "ngOptions", predicate: NgOption, descendants: true }], viewQueries: [{ propertyName: "dropdownPanel", first: true, predicate: i0.forwardRef(() => NgDropdownPanel), descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, static: true }, { propertyName: "clearButton", first: true, predicate: ["clearButton"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/role-has-required-aria -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- eslint-disable @angular-eslint/template/mouse-events-have-key-events -->\n<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<div\n class=\"ng-select-container\"\n [class.ng-appearance-outline]=\"appearance === 'outline'\"\n [class.ng-has-value]=\"hasValue\"\n (mousedown)=\"handleMousedown($event)\"\n>\n <div class=\"ng-value-container\">\n @if ((selectedItems.length === 0 && !searchTerm) || fixedPlaceholder) {\n <ng-template #defaultPlaceholderTemplate>\n <div class=\"ng-placeholder\">{{ placeholder }}</div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\" />\n }\n\n @if ((!multiLabelTemplate || !multiple) && selectedItems.length > 0) {\n @for (item of selectedItems; track trackByOption($index, item)) {\n <div class=\"ng-value\" [class.ng-value-disabled]=\"item.disabled\">\n <ng-template #defaultLabelTemplate>\n <span\n class=\"ng-value-label\"\n [ngItemLabel]=\"item.label || ''\"\n [escape]=\"escapeHTML\"\n ></span>\n <span class=\"ng-value-remove\" (click)=\"unselect(item)\" role=\"button\">\u00D7</span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"labelTemplate || defaultLabelTemplate\"\n [ngTemplateOutletContext]=\"{ item: item.value, clear: clearItem, label: item.label }\"\n />\n </div>\n }\n }\n\n @if (multiple && multiLabelTemplate && selectedValues.length > 0) {\n <ng-template\n [ngTemplateOutlet]=\"multiLabelTemplate\"\n [ngTemplateOutletContext]=\"{ items: selectedValues, clear: clearItem }\"\n />\n }\n\n <div class=\"ng-input\">\n <input\n #searchInput\n [disabled]=\"disabled\"\n [readOnly]=\"!searchable || itemsList.maxItemsSelected\"\n [value]=\"searchTerm ?? ''\"\n (change)=\"$event.stopPropagation()\"\n (input)=\"filter(searchInput.value)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n (compositionend)=\"onCompositionEnd(searchInput.value)\"\n (compositionstart)=\"onCompositionStart()\"\n [tabIndex]=\"tabIndex\"\n [attr.id]=\"inputId\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-controls]=\"isOpen ? listboxId : null\"\n [attr.aria-activedescendant]=\"isOpen ? itemsList.markedItem?.htmlId : null\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n role=\"combobox\"\n />\n </div>\n </div>\n\n @if (loading) {\n <ng-template #defaultLoadingSpinnerTemplate>\n <div class=\"ng-select-spinner\"></div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate || defaultLoadingSpinnerTemplate\" />\n }\n\n @if (showClearButton) {\n @if (clearButtonTemplate) {\n <ng-container [ngTemplateOutlet]=\"clearButtonTemplate\" />\n } @else {\n <span #clearButton class=\"ng-clear-wrapper\" [title]=\"clearAllText\" aria-hidden=\"true\">\n <span class=\"ng-clear\">\u00D7</span>\n </span>\n }\n }\n\n <span class=\"ng-arrow-wrapper\" aria-hidden=\"true\">\n <span class=\"ng-arrow\"></span>\n </span>\n</div>\n\n@if (isOpen) {\n <ng-dropdown-panel\n class=\"ng-dropdown-panel\"\n [class.ng-select-multiple]=\"multiple\"\n [class]=\"appendTo ? _classList : null\"\n [listboxId]=\"listboxId\"\n [virtualScroll]=\"virtualScroll\"\n [bufferAmount]=\"bufferAmount\"\n [appendTo]=\"appendTo\"\n [position]=\"panelPosition\"\n [headerTemplate]=\"headerTemplate\"\n [footerTemplate]=\"footerTemplate\"\n [filterValue]=\"searchTerm\"\n [items]=\"itemsList.filteredItems\"\n [markedItem]=\"itemsList.markedItem\"\n (update)=\"viewPortItems = $event\"\n (scroll)=\"scroll.emit($event)\"\n (scrollToEnd)=\"scrollToEnd.emit()\"\n (outsideClick)=\"close()\"\n >\n @for (item of viewPortItems; track trackByOption($index, item)) {\n <div\n class=\"ng-option\"\n [class.ng-option-disabled]=\"item.disabled\"\n [class.ng-option-selected]=\"item.selected\"\n [class.ng-optgroup]=\"item.children\"\n [class.ng-option]=\"!item.children\"\n [class.ng-option-child]=\"!!item.parent\"\n [class.ng-option-marked]=\"item === itemsList.markedItem\"\n [attr.id]=\"item?.htmlId\"\n [attr.role]=\"item.children ? 'group' : 'option'\"\n [attr.aria-selected]=\"item.selected\"\n [attr.aria-setsize]=\"itemsList.filteredItems.length\"\n [attr.aria-posinset]=\"item.index! + 1\"\n (click)=\"toggleItem(item)\"\n (mouseover)=\"onItemHover(item)\"\n >\n <ng-template #defaultOptionTemplate>\n <span\n class=\"ng-option-label\"\n [ngItemLabel]=\"item.label || ''\"\n [escape]=\"escapeHTML\"\n ></span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"\n item.children\n ? optgroupTemplate || defaultOptionTemplate\n : optionTemplate || defaultOptionTemplate\n \"\n [ngTemplateOutletContext]=\"{\n item: item.value,\n item$: item,\n index: item.index,\n searchTerm: searchTerm,\n }\"\n />\n </div>\n }\n\n @if (showAddTag) {\n <div\n class=\"ng-option\"\n [class.ng-option-marked]=\"!itemsList.markedItem\"\n (click)=\"selectTag()\"\n (mouseover)=\"itemsList.unmarkItem()\"\n role=\"option\"\n >\n <ng-template #defaultTagTemplate>\n <span>\n <span class=\"ng-tag-label\">{{ addTagText }}</span>\n \"{{ searchTerm }}\"\n </span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"tagTemplate || defaultTagTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n />\n </div>\n }\n\n @if (showNoItemsFound) {\n <ng-template #defaultNotFoundTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ notFoundText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"notFoundTemplate || defaultNotFoundTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n />\n }\n @if (showTypeToSearch) {\n <ng-template #defaultTypeToSearchTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ typeToSearchText }}</div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"typeToSearchTemplate || defaultTypeToSearchTemplate\" />\n }\n @if (loading && itemsList.filteredItems.length === 0) {\n <ng-template #defaultLoadingTextTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ loadingText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"loadingTextTemplate || defaultLoadingTextTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n />\n }\n </ng-dropdown-panel>\n}\n\n<!-- Always present aria-live region -->\n<div class=\"ng-select-visually-hidden\" aria-atomic=\"true\" aria-live=\"polite\" role=\"status\">\n @if (isOpen && showNoItemsFound) {\n {{ notFoundText }}\n }\n</div>\n", styles: ["@charset \"UTF-8\";.ng-select{position:relative;display:block}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-placeholder,.ng-select.ng-select-disabled .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder,.ng-select .ng-has-value .ng-placeholder{display:none}.ng-select .ng-select-container{box-sizing:border-box;position:relative;display:flex;width:100%;outline:none;overflow:hidden;cursor:default}.ng-select .ng-value-container{display:flex;flex:1}.ng-select .ng-input{box-sizing:border-box;opacity:0}.ng-select .ng-input>input{width:100%;padding:0;background:transparent;border:none;box-shadow:none;outline:none;cursor:default}.ng-select .ng-input>input::-ms-clear{display:none}.ng-select .ng-input>input[readonly]{-webkit-user-select:unset;user-select:unset;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-value-container,.ng-select.ng-select-single .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-value-remove{display:none}.ng-select.ng-select-single .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled .ng-value-remove{display:none}.ng-select.ng-select-multiple .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-placeholder{position:absolute;z-index:1}.ng-select.ng-select-multiple .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-value-remove{cursor:pointer}.ng-select.ng-select-multiple .ng-value-disabled .ng-value-remove{display:none}.ng-select.ng-select-multiple .ng-input{flex:1;z-index:2}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-arrow-wrapper{position:relative;text-align:center;-webkit-user-select:none;user-select:none;cursor:pointer}.ng-select .ng-arrow{position:relative;display:inline-block;height:0;width:0;pointer-events:none}.ng-dropdown-panel{box-sizing:border-box;position:absolute;z-index:1050;width:100%;opacity:0;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-optgroup,.ng-dropdown-panel .ng-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-option{display:block;cursor:pointer}.ng-dropdown-panel .ng-option.disabled{cursor:default}.ng-dropdown-panel .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-option-label:empty:before{content:\"\\200b\"}.ng-select-virtual-scroll-host{position:relative;display:block;overflow:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}.ng-select-virtual-scroll-content{position:absolute;top:0;left:0;width:100%;height:100%}.ng-select-virtual-scroll-spacer{width:1px;opacity:0}.ng-select-visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0;clip-path:rect(0 0 0 0);white-space:nowrap}.ng-select-spinner{position:relative;width:16px;height:16px;margin:0 4px;font-size:10px;text-indent:-9999em;border-radius:50%;border:2px solid rgba(66,66,66,.2);border-left-color:#424242;animation:load8 .8s infinite linear}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgItemLabel, selector: "[ngItemLabel]", inputs: ["ngItemLabel", "escape"] }, { kind: "component", type: NgDropdownPanel, selector: "ng-dropdown-panel", inputs: ["listboxId", "items", "markedItem", "position", "appendTo", "bufferAmount", "virtualScroll", "headerTemplate", "footerTemplate", "filterValue"], outputs: ["update", "scroll", "scrollToEnd", "outsideClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
3031
2976
  }
3032
2977
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: NgSelect, decorators: [{
3033
2978
  type: Component,
@@ -3049,7 +2994,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
3049
2994
  useExisting: forwardRef(() => NgSelect),
3050
2995
  multi: true,
3051
2996
  },
3052
- ], template: "<!-- eslint-disable @angular-eslint/template/role-has-required-aria -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- eslint-disable @angular-eslint/template/mouse-events-have-key-events -->\n<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<div\n class=\"ng-select-container\"\n [class.ng-appearance-outline]=\"appearance === 'outline'\"\n [class.ng-has-value]=\"hasValue\"\n (mousedown)=\"handleMousedown($event)\"\n>\n <div class=\"ng-value-container\">\n @if ((selectedItems.length === 0 && !searchTerm) || fixedPlaceholder) {\n <ng-template #defaultPlaceholderTemplate>\n <div class=\"ng-placeholder\">{{ placeholder }}</div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\" />\n }\n\n @if ((!multiLabelTemplate || !multiple) && selectedItems.length > 0) {\n @for (item of selectedItems; track trackByOption($index, item)) {\n <div class=\"ng-value\" [class.ng-value-disabled]=\"item.disabled\">\n <ng-template #defaultLabelTemplate>\n <span\n class=\"ng-value-label\"\n [ngItemLabel]=\"item.label || ''\"\n [escape]=\"escapeHTML\"\n ></span>\n <span class=\"ng-value-icon\" (click)=\"unselect(item)\" aria-hidden=\"true\">\u00D7</span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"labelTemplate || defaultLabelTemplate\"\n [ngTemplateOutletContext]=\"{ item: item.value, clear: clearItem, label: item.label }\"\n />\n </div>\n }\n }\n\n @if (multiple && multiLabelTemplate && selectedValues.length > 0) {\n <ng-template\n [ngTemplateOutlet]=\"multiLabelTemplate\"\n [ngTemplateOutletContext]=\"{ items: selectedValues, clear: clearItem }\"\n />\n }\n\n <div class=\"ng-input\">\n <input\n #searchInput\n [disabled]=\"disabled\"\n [readOnly]=\"!searchable || itemsList.maxItemsSelected\"\n [value]=\"searchTerm ?? ''\"\n (change)=\"$event.stopPropagation()\"\n (input)=\"filter(searchInput.value)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n (compositionend)=\"onCompositionEnd(searchInput.value)\"\n (compositionstart)=\"onCompositionStart()\"\n [attr.aria-activedescendant]=\"isOpen ? itemsList.markedItem?.htmlId : null\"\n [attr.aria-controls]=\"isOpen ? dropdownId : null\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.id]=\"labelForId\"\n [attr.tabindex]=\"tabIndex\"\n aria-autocomplete=\"list\"\n role=\"combobox\"\n />\n </div>\n </div>\n\n @if (loading) {\n <ng-template #defaultLoadingSpinnerTemplate>\n <div class=\"ng-select-spinner\"></div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate || defaultLoadingSpinnerTemplate\" />\n }\n\n @if (showClear()) {\n @if (clearButtonTemplate) {\n <ng-container [ngTemplateOutlet]=\"clearButtonTemplate\" />\n } @else {\n <span\n #clearButton\n class=\"ng-clear-wrapper\"\n title=\"{{ clearAllText }}\"\n role=\"button\"\n [attr.tabindex]=\"tabFocusOnClear ? 0 : -1\"\n >\n <span class=\"ng-clear\" aria-hidden=\"true\">\u00D7</span>\n </span>\n }\n }\n\n <span class=\"ng-arrow-wrapper\">\n <span class=\"ng-arrow\"></span>\n </span>\n</div>\n\n@if (isOpen) {\n <ng-dropdown-panel\n class=\"ng-dropdown-panel\"\n [class.ng-select-multiple]=\"multiple\"\n [class]=\"appendTo ? _classList : null\"\n [id]=\"dropdownId\"\n [virtualScroll]=\"virtualScroll\"\n [bufferAmount]=\"bufferAmount\"\n [appendTo]=\"appendTo\"\n [position]=\"dropdownPosition\"\n [headerTemplate]=\"headerTemplate\"\n [footerTemplate]=\"footerTemplate\"\n [filterValue]=\"searchTerm\"\n [items]=\"itemsList.filteredItems\"\n [markedItem]=\"itemsList.markedItem\"\n [ariaLabelDropdown]=\"ariaLabelDropdown\"\n (update)=\"viewPortItems = $event\"\n (scroll)=\"scroll.emit($event)\"\n (scrollToEnd)=\"scrollToEnd.emit()\"\n (outsideClick)=\"close()\"\n >\n <ng-container>\n @for (item of viewPortItems; track trackByOption($index, item)) {\n <div\n class=\"ng-option\"\n [class.ng-option-disabled]=\"item.disabled\"\n [class.ng-option-selected]=\"item.selected\"\n [class.ng-optgroup]=\"item.children\"\n [class.ng-option]=\"!item.children\"\n [class.ng-option-child]=\"!!item.parent\"\n [class.ng-option-marked]=\"item === itemsList.markedItem\"\n [attr.id]=\"item?.htmlId\"\n [attr.role]=\"item.children ? 'group' : 'option'\"\n [attr.aria-selected]=\"item.selected\"\n [attr.aria-setsize]=\"itemsList.filteredItems.length\"\n [attr.aria-posinset]=\"item.index! + 1\"\n (click)=\"toggleItem(item)\"\n (mouseover)=\"onItemHover(item)\"\n >\n <ng-template #defaultOptionTemplate>\n <span\n class=\"ng-option-label\"\n [ngItemLabel]=\"item.label || ''\"\n [escape]=\"escapeHTML\"\n ></span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"\n item.children\n ? optgroupTemplate || defaultOptionTemplate\n : optionTemplate || defaultOptionTemplate\n \"\n [ngTemplateOutletContext]=\"{\n item: item.value,\n item$: item,\n index: item.index,\n searchTerm: searchTerm,\n }\"\n />\n </div>\n }\n @if (showAddTag) {\n <div\n class=\"ng-option\"\n [class.ng-option-marked]=\"!itemsList.markedItem\"\n (click)=\"selectTag()\"\n (mouseover)=\"itemsList.unmarkItem()\"\n role=\"option\"\n >\n <ng-template #defaultTagTemplate>\n <span>\n <span class=\"ng-tag-label\">{{ addTagText }}</span>\n \"{{ searchTerm }}\"\n </span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"tagTemplate || defaultTagTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n />\n </div>\n }\n </ng-container>\n @if (showNoItemsFound()) {\n <ng-template #defaultNotFoundTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ notFoundText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"notFoundTemplate || defaultNotFoundTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n />\n }\n @if (showTypeToSearch()) {\n <ng-template #defaultTypeToSearchTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ typeToSearchText }}</div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"typeToSearchTemplate || defaultTypeToSearchTemplate\" />\n }\n @if (loading && itemsList.filteredItems.length === 0) {\n <ng-template #defaultLoadingTextTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ loadingText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"loadingTextTemplate || defaultLoadingTextTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n />\n }\n </ng-dropdown-panel>\n}\n\n<!-- Always present aria-live region -->\n<div class=\"ng-select-visually-hidden\" aria-atomic=\"true\" aria-live=\"polite\" role=\"status\">\n @if (isOpen && showNoItemsFound()) {\n {{ notFoundText }}\n }\n</div>\n", styles: ["@charset \"UTF-8\";.ng-select{position:relative;display:block}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-placeholder,.ng-select.ng-select-disabled .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder,.ng-select .ng-has-value .ng-placeholder{display:none}.ng-select .ng-select-container{box-sizing:border-box;position:relative;display:flex;width:100%;outline:none;overflow:hidden;cursor:default}.ng-select .ng-value-container{display:flex;flex:1}.ng-select .ng-input{box-sizing:border-box;opacity:0}.ng-select .ng-input>input{width:100%;padding:0;background:transparent;border:none;box-shadow:none;outline:none;cursor:default}.ng-select .ng-input>input::-ms-clear{display:none}.ng-select .ng-input>input[readonly]{-webkit-user-select:unset;user-select:unset;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-value-container,.ng-select.ng-select-single .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-value-icon{display:none}.ng-select.ng-select-single .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-placeholder{position:absolute;z-index:1}.ng-select.ng-select-multiple .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-input{flex:1;z-index:2}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-arrow-wrapper{position:relative;text-align:center;-webkit-user-select:none;user-select:none;cursor:pointer}.ng-select .ng-arrow{position:relative;display:inline-block;height:0;width:0;pointer-events:none}.ng-dropdown-panel{box-sizing:border-box;position:absolute;z-index:1050;width:100%;opacity:0;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-optgroup,.ng-dropdown-panel .ng-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-option{display:block;cursor:pointer}.ng-dropdown-panel .ng-option.disabled{cursor:default}.ng-dropdown-panel .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-option-label:empty:before{content:\"\\200b\"}.ng-select-virtual-scroll-host{position:relative;display:block;overflow:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}.ng-select-virtual-scroll-content{position:absolute;top:0;left:0;width:100%;height:100%}.ng-select-virtual-scroll-spacer{width:1px;opacity:0}.ng-select-visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0;clip-path:rect(0 0 0 0);white-space:nowrap}.ng-select-spinner{position:relative;width:16px;height:16px;margin:0 4px;font-size:10px;text-indent:-9999em;border-radius:50%;border:2px solid rgba(66,66,66,.2);border-left-color:#424242;animation:load8 .8s infinite linear}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
2997
+ ], template: "<!-- eslint-disable @angular-eslint/template/role-has-required-aria -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- eslint-disable @angular-eslint/template/mouse-events-have-key-events -->\n<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<div\n class=\"ng-select-container\"\n [class.ng-appearance-outline]=\"appearance === 'outline'\"\n [class.ng-has-value]=\"hasValue\"\n (mousedown)=\"handleMousedown($event)\"\n>\n <div class=\"ng-value-container\">\n @if ((selectedItems.length === 0 && !searchTerm) || fixedPlaceholder) {\n <ng-template #defaultPlaceholderTemplate>\n <div class=\"ng-placeholder\">{{ placeholder }}</div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\" />\n }\n\n @if ((!multiLabelTemplate || !multiple) && selectedItems.length > 0) {\n @for (item of selectedItems; track trackByOption($index, item)) {\n <div class=\"ng-value\" [class.ng-value-disabled]=\"item.disabled\">\n <ng-template #defaultLabelTemplate>\n <span\n class=\"ng-value-label\"\n [ngItemLabel]=\"item.label || ''\"\n [escape]=\"escapeHTML\"\n ></span>\n <span class=\"ng-value-remove\" (click)=\"unselect(item)\" role=\"button\">\u00D7</span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"labelTemplate || defaultLabelTemplate\"\n [ngTemplateOutletContext]=\"{ item: item.value, clear: clearItem, label: item.label }\"\n />\n </div>\n }\n }\n\n @if (multiple && multiLabelTemplate && selectedValues.length > 0) {\n <ng-template\n [ngTemplateOutlet]=\"multiLabelTemplate\"\n [ngTemplateOutletContext]=\"{ items: selectedValues, clear: clearItem }\"\n />\n }\n\n <div class=\"ng-input\">\n <input\n #searchInput\n [disabled]=\"disabled\"\n [readOnly]=\"!searchable || itemsList.maxItemsSelected\"\n [value]=\"searchTerm ?? ''\"\n (change)=\"$event.stopPropagation()\"\n (input)=\"filter(searchInput.value)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n (compositionend)=\"onCompositionEnd(searchInput.value)\"\n (compositionstart)=\"onCompositionStart()\"\n [tabIndex]=\"tabIndex\"\n [attr.id]=\"inputId\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-controls]=\"isOpen ? listboxId : null\"\n [attr.aria-activedescendant]=\"isOpen ? itemsList.markedItem?.htmlId : null\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n role=\"combobox\"\n />\n </div>\n </div>\n\n @if (loading) {\n <ng-template #defaultLoadingSpinnerTemplate>\n <div class=\"ng-select-spinner\"></div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate || defaultLoadingSpinnerTemplate\" />\n }\n\n @if (showClearButton) {\n @if (clearButtonTemplate) {\n <ng-container [ngTemplateOutlet]=\"clearButtonTemplate\" />\n } @else {\n <span #clearButton class=\"ng-clear-wrapper\" [title]=\"clearAllText\" aria-hidden=\"true\">\n <span class=\"ng-clear\">\u00D7</span>\n </span>\n }\n }\n\n <span class=\"ng-arrow-wrapper\" aria-hidden=\"true\">\n <span class=\"ng-arrow\"></span>\n </span>\n</div>\n\n@if (isOpen) {\n <ng-dropdown-panel\n class=\"ng-dropdown-panel\"\n [class.ng-select-multiple]=\"multiple\"\n [class]=\"appendTo ? _classList : null\"\n [listboxId]=\"listboxId\"\n [virtualScroll]=\"virtualScroll\"\n [bufferAmount]=\"bufferAmount\"\n [appendTo]=\"appendTo\"\n [position]=\"panelPosition\"\n [headerTemplate]=\"headerTemplate\"\n [footerTemplate]=\"footerTemplate\"\n [filterValue]=\"searchTerm\"\n [items]=\"itemsList.filteredItems\"\n [markedItem]=\"itemsList.markedItem\"\n (update)=\"viewPortItems = $event\"\n (scroll)=\"scroll.emit($event)\"\n (scrollToEnd)=\"scrollToEnd.emit()\"\n (outsideClick)=\"close()\"\n >\n @for (item of viewPortItems; track trackByOption($index, item)) {\n <div\n class=\"ng-option\"\n [class.ng-option-disabled]=\"item.disabled\"\n [class.ng-option-selected]=\"item.selected\"\n [class.ng-optgroup]=\"item.children\"\n [class.ng-option]=\"!item.children\"\n [class.ng-option-child]=\"!!item.parent\"\n [class.ng-option-marked]=\"item === itemsList.markedItem\"\n [attr.id]=\"item?.htmlId\"\n [attr.role]=\"item.children ? 'group' : 'option'\"\n [attr.aria-selected]=\"item.selected\"\n [attr.aria-setsize]=\"itemsList.filteredItems.length\"\n [attr.aria-posinset]=\"item.index! + 1\"\n (click)=\"toggleItem(item)\"\n (mouseover)=\"onItemHover(item)\"\n >\n <ng-template #defaultOptionTemplate>\n <span\n class=\"ng-option-label\"\n [ngItemLabel]=\"item.label || ''\"\n [escape]=\"escapeHTML\"\n ></span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"\n item.children\n ? optgroupTemplate || defaultOptionTemplate\n : optionTemplate || defaultOptionTemplate\n \"\n [ngTemplateOutletContext]=\"{\n item: item.value,\n item$: item,\n index: item.index,\n searchTerm: searchTerm,\n }\"\n />\n </div>\n }\n\n @if (showAddTag) {\n <div\n class=\"ng-option\"\n [class.ng-option-marked]=\"!itemsList.markedItem\"\n (click)=\"selectTag()\"\n (mouseover)=\"itemsList.unmarkItem()\"\n role=\"option\"\n >\n <ng-template #defaultTagTemplate>\n <span>\n <span class=\"ng-tag-label\">{{ addTagText }}</span>\n \"{{ searchTerm }}\"\n </span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"tagTemplate || defaultTagTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n />\n </div>\n }\n\n @if (showNoItemsFound) {\n <ng-template #defaultNotFoundTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ notFoundText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"notFoundTemplate || defaultNotFoundTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n />\n }\n @if (showTypeToSearch) {\n <ng-template #defaultTypeToSearchTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ typeToSearchText }}</div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"typeToSearchTemplate || defaultTypeToSearchTemplate\" />\n }\n @if (loading && itemsList.filteredItems.length === 0) {\n <ng-template #defaultLoadingTextTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ loadingText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"loadingTextTemplate || defaultLoadingTextTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n />\n }\n </ng-dropdown-panel>\n}\n\n<!-- Always present aria-live region -->\n<div class=\"ng-select-visually-hidden\" aria-atomic=\"true\" aria-live=\"polite\" role=\"status\">\n @if (isOpen && showNoItemsFound) {\n {{ notFoundText }}\n }\n</div>\n", styles: ["@charset \"UTF-8\";.ng-select{position:relative;display:block}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-placeholder,.ng-select.ng-select-disabled .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder,.ng-select .ng-has-value .ng-placeholder{display:none}.ng-select .ng-select-container{box-sizing:border-box;position:relative;display:flex;width:100%;outline:none;overflow:hidden;cursor:default}.ng-select .ng-value-container{display:flex;flex:1}.ng-select .ng-input{box-sizing:border-box;opacity:0}.ng-select .ng-input>input{width:100%;padding:0;background:transparent;border:none;box-shadow:none;outline:none;cursor:default}.ng-select .ng-input>input::-ms-clear{display:none}.ng-select .ng-input>input[readonly]{-webkit-user-select:unset;user-select:unset;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-value-container,.ng-select.ng-select-single .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-value-remove{display:none}.ng-select.ng-select-single .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled .ng-value-remove{display:none}.ng-select.ng-select-multiple .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-placeholder{position:absolute;z-index:1}.ng-select.ng-select-multiple .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-value-remove{cursor:pointer}.ng-select.ng-select-multiple .ng-value-disabled .ng-value-remove{display:none}.ng-select.ng-select-multiple .ng-input{flex:1;z-index:2}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-arrow-wrapper{position:relative;text-align:center;-webkit-user-select:none;user-select:none;cursor:pointer}.ng-select .ng-arrow{position:relative;display:inline-block;height:0;width:0;pointer-events:none}.ng-dropdown-panel{box-sizing:border-box;position:absolute;z-index:1050;width:100%;opacity:0;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-optgroup,.ng-dropdown-panel .ng-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-option{display:block;cursor:pointer}.ng-dropdown-panel .ng-option.disabled{cursor:default}.ng-dropdown-panel .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-option-label:empty:before{content:\"\\200b\"}.ng-select-virtual-scroll-host{position:relative;display:block;overflow:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}.ng-select-virtual-scroll-content{position:absolute;top:0;left:0;width:100%;height:100%}.ng-select-virtual-scroll-spacer{width:1px;opacity:0}.ng-select-visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0;clip-path:rect(0 0 0 0);white-space:nowrap}.ng-select-spinner{position:relative;width:16px;height:16px;margin:0 4px;font-size:10px;text-indent:-9999em;border-radius:50%;border:2px solid rgba(66,66,66,.2);border-left-color:#424242;animation:load8 .8s infinite linear}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
3053
2998
  }], ctorParameters: () => [], propDecorators: { bindLabel: [{
3054
2999
  type: Input
3055
3000
  }], bindValue: [{
@@ -3060,7 +3005,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
3060
3005
  type: Input
3061
3006
  }], appendTo: [{
3062
3007
  type: Input
3063
- }], dropdownPosition: [{
3008
+ }], panelPosition: [{
3064
3009
  type: Input
3065
3010
  }], readonly: [{
3066
3011
  type: Input,
@@ -3074,6 +3019,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
3074
3019
  }], clearable: [{
3075
3020
  type: Input,
3076
3021
  args: [{ transform: booleanAttribute }]
3022
+ }], clearOnBackspace: [{
3023
+ type: Input,
3024
+ args: [{ transform: booleanAttribute }]
3077
3025
  }], clearAllText: [{
3078
3026
  type: Input
3079
3027
  }], loading: [{
@@ -3084,9 +3032,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
3084
3032
  }], closeOnSelect: [{
3085
3033
  type: Input,
3086
3034
  args: [{ transform: booleanAttribute }]
3087
- }], clearOnBackspace: [{
3088
- type: Input,
3089
- args: [{ transform: booleanAttribute }]
3090
3035
  }], hideSelected: [{
3091
3036
  type: Input,
3092
3037
  args: [{ transform: booleanAttribute }]
@@ -3146,25 +3091,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
3146
3091
  type: Input
3147
3092
  }], trackByFn: [{
3148
3093
  type: Input
3149
- }], labelForId: [{
3150
- type: Input
3151
- }], inputAttrs: [{
3152
- type: Input
3153
3094
  }], appearance: [{
3154
3095
  type: Input
3155
- }], ariaLabelDropdown: [{
3156
- type: Input
3157
- }], ariaLabel: [{
3158
- type: Input
3159
3096
  }], tabIndex: [{
3160
3097
  type: Input,
3161
3098
  args: [{ transform: numberAttribute }]
3162
- }], tabFocusOnClearButton: [{
3099
+ }], ariaLabel: [{
3100
+ type: Input
3101
+ }], ariaLabelledby: [{
3102
+ type: Input
3103
+ }], ariaDescribedby: [{
3104
+ type: Input
3105
+ }], inputAttrs: [{
3163
3106
  type: Input
3164
3107
  }], isOpen: [{
3165
3108
  type: Input
3166
3109
  }], panelClass: [{
3167
3110
  type: Input
3111
+ }], inputId: [{
3112
+ type: Input
3168
3113
  }], items: [{
3169
3114
  type: Input
3170
3115
  }], compareWith: [{