@ng-select/ng-select 15.1.2 → 15.2.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,9 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Input, Injectable, input, EventEmitter, DOCUMENT, booleanAttribute, ElementRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Inject, Output, ViewChild, InjectionToken, signal, numberAttribute, forwardRef, TemplateRef, Attribute, HostBinding, ContentChild, ContentChildren, HostListener, NgModule } from '@angular/core';
2
+ import { inject, ElementRef, input, effect, Directive, TemplateRef, Injectable, Renderer2, NgZone, booleanAttribute, output, viewChild, computed, Component, ChangeDetectionStrategy, ViewEncapsulation, signal, afterNextRender, InjectionToken, HostAttributeToken, ChangeDetectorRef, model, numberAttribute, contentChild, forwardRef, contentChildren, HostBinding, HostListener, NgModule } from '@angular/core';
3
3
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
4
  import { animationFrameScheduler, asapScheduler, Subject, fromEvent, merge } from 'rxjs';
5
- import { takeUntil, auditTime, startWith, tap, debounceTime, filter, map } from 'rxjs/operators';
6
- import { NgTemplateOutlet, NgClass } from '@angular/common';
5
+ import { takeUntil, auditTime, tap, startWith, switchMap, debounceTime, filter, map } from 'rxjs/operators';
6
+ import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
7
+ import { toObservable } from '@angular/core/rxjs-interop';
7
8
 
8
9
  const unescapedHTMLExp = /[&<>"']/g;
9
10
  const hasUnescapedHTMLExp = RegExp(unescapedHTMLExp.source);
@@ -31,15 +32,18 @@ function isFunction(value) {
31
32
  }
32
33
 
33
34
  class NgItemLabelDirective {
34
- constructor(element) {
35
- this.element = element;
36
- this.escape = true;
37
- }
38
- ngOnChanges(changes) {
39
- this.element.nativeElement.innerHTML = this.escape ? escapeHTML(this.ngItemLabel) : this.ngItemLabel;
35
+ constructor() {
36
+ this.element = inject(ElementRef);
37
+ this.ngItemLabel = input();
38
+ this.escape = input(true);
39
+ effect(() => {
40
+ this.element.nativeElement.innerHTML = this.escape()
41
+ ? escapeHTML(this.ngItemLabel())
42
+ : this.ngItemLabel();
43
+ });
40
44
  }
41
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgItemLabelDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
42
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: NgItemLabelDirective, isStandalone: true, selector: "[ngItemLabel]", inputs: { ngItemLabel: "ngItemLabel", escape: "escape" }, usesOnChanges: true, ngImport: i0 }); }
45
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgItemLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
46
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.0", type: NgItemLabelDirective, isStandalone: true, selector: "[ngItemLabel]", inputs: { ngItemLabel: { classPropertyName: "ngItemLabel", publicName: "ngItemLabel", isSignal: true, isRequired: false, transformFunction: null }, escape: { classPropertyName: "escape", publicName: "escape", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
43
47
  }
44
48
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgItemLabelDirective, decorators: [{
45
49
  type: Directive,
@@ -47,16 +51,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
47
51
  selector: '[ngItemLabel]',
48
52
  standalone: true,
49
53
  }]
50
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { ngItemLabel: [{
51
- type: Input
52
- }], escape: [{
53
- type: Input
54
- }] } });
54
+ }], ctorParameters: () => [] });
55
55
  class NgOptionTemplateDirective {
56
- constructor(template) {
57
- this.template = template;
56
+ constructor() {
57
+ this.template = inject((TemplateRef));
58
58
  }
59
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgOptionTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
59
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgOptionTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
60
60
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: NgOptionTemplateDirective, isStandalone: true, selector: "[ng-option-tmp]", ngImport: i0 }); }
61
61
  }
62
62
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgOptionTemplateDirective, decorators: [{
@@ -66,12 +66,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
66
66
  selector: '[ng-option-tmp]',
67
67
  standalone: true,
68
68
  }]
69
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
69
+ }] });
70
70
  class NgOptgroupTemplateDirective {
71
- constructor(template) {
72
- this.template = template;
71
+ constructor() {
72
+ this.template = inject((TemplateRef));
73
73
  }
74
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgOptgroupTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
74
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgOptgroupTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
75
75
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: NgOptgroupTemplateDirective, isStandalone: true, selector: "[ng-optgroup-tmp]", ngImport: i0 }); }
76
76
  }
77
77
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgOptgroupTemplateDirective, decorators: [{
@@ -81,12 +81,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
81
81
  selector: '[ng-optgroup-tmp]',
82
82
  standalone: true,
83
83
  }]
84
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
84
+ }] });
85
85
  class NgLabelTemplateDirective {
86
- constructor(template) {
87
- this.template = template;
86
+ constructor() {
87
+ this.template = inject((TemplateRef));
88
88
  }
89
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgLabelTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
89
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgLabelTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
90
90
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: NgLabelTemplateDirective, isStandalone: true, selector: "[ng-label-tmp]", ngImport: i0 }); }
91
91
  }
92
92
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgLabelTemplateDirective, decorators: [{
@@ -96,12 +96,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
96
96
  selector: '[ng-label-tmp]',
97
97
  standalone: true,
98
98
  }]
99
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
99
+ }] });
100
100
  class NgMultiLabelTemplateDirective {
101
- constructor(template) {
102
- this.template = template;
101
+ constructor() {
102
+ this.template = inject((TemplateRef));
103
103
  }
104
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgMultiLabelTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
104
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgMultiLabelTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
105
105
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: NgMultiLabelTemplateDirective, isStandalone: true, selector: "[ng-multi-label-tmp]", ngImport: i0 }); }
106
106
  }
107
107
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgMultiLabelTemplateDirective, decorators: [{
@@ -111,12 +111,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
111
111
  selector: '[ng-multi-label-tmp]',
112
112
  standalone: true,
113
113
  }]
114
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
114
+ }] });
115
115
  class NgHeaderTemplateDirective {
116
- constructor(template) {
117
- this.template = template;
116
+ constructor() {
117
+ this.template = inject((TemplateRef));
118
118
  }
119
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgHeaderTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
119
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgHeaderTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
120
120
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: NgHeaderTemplateDirective, isStandalone: true, selector: "[ng-header-tmp]", ngImport: i0 }); }
121
121
  }
122
122
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgHeaderTemplateDirective, decorators: [{
@@ -126,12 +126,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
126
126
  selector: '[ng-header-tmp]',
127
127
  standalone: true,
128
128
  }]
129
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
129
+ }] });
130
130
  class NgFooterTemplateDirective {
131
- constructor(template) {
132
- this.template = template;
131
+ constructor() {
132
+ this.template = inject((TemplateRef));
133
133
  }
134
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgFooterTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
134
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgFooterTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
135
135
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: NgFooterTemplateDirective, isStandalone: true, selector: "[ng-footer-tmp]", ngImport: i0 }); }
136
136
  }
137
137
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgFooterTemplateDirective, decorators: [{
@@ -141,12 +141,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
141
141
  selector: '[ng-footer-tmp]',
142
142
  standalone: true,
143
143
  }]
144
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
144
+ }] });
145
145
  class NgNotFoundTemplateDirective {
146
- constructor(template) {
147
- this.template = template;
146
+ constructor() {
147
+ this.template = inject((TemplateRef));
148
148
  }
149
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgNotFoundTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
149
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgNotFoundTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
150
150
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: NgNotFoundTemplateDirective, isStandalone: true, selector: "[ng-notfound-tmp]", ngImport: i0 }); }
151
151
  }
152
152
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgNotFoundTemplateDirective, decorators: [{
@@ -156,12 +156,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
156
156
  selector: '[ng-notfound-tmp]',
157
157
  standalone: true,
158
158
  }]
159
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
159
+ }] });
160
160
  class NgPlaceholderTemplateDirective {
161
- constructor(template) {
162
- this.template = template;
161
+ constructor() {
162
+ this.template = inject((TemplateRef));
163
163
  }
164
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgPlaceholderTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
164
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgPlaceholderTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
165
165
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: NgPlaceholderTemplateDirective, isStandalone: true, selector: "[ng-placeholder-tmp]", ngImport: i0 }); }
166
166
  }
167
167
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgPlaceholderTemplateDirective, decorators: [{
@@ -171,12 +171,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
171
171
  selector: '[ng-placeholder-tmp]',
172
172
  standalone: true,
173
173
  }]
174
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
174
+ }] });
175
175
  class NgTypeToSearchTemplateDirective {
176
- constructor(template) {
177
- this.template = template;
176
+ constructor() {
177
+ this.template = inject((TemplateRef));
178
178
  }
179
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgTypeToSearchTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
179
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgTypeToSearchTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
180
180
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: NgTypeToSearchTemplateDirective, isStandalone: true, selector: "[ng-typetosearch-tmp]", ngImport: i0 }); }
181
181
  }
182
182
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgTypeToSearchTemplateDirective, decorators: [{
@@ -186,12 +186,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
186
186
  selector: '[ng-typetosearch-tmp]',
187
187
  standalone: true,
188
188
  }]
189
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
189
+ }] });
190
190
  class NgLoadingTextTemplateDirective {
191
- constructor(template) {
192
- this.template = template;
191
+ constructor() {
192
+ this.template = inject((TemplateRef));
193
193
  }
194
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgLoadingTextTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
194
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgLoadingTextTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
195
195
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: NgLoadingTextTemplateDirective, isStandalone: true, selector: "[ng-loadingtext-tmp]", ngImport: i0 }); }
196
196
  }
197
197
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgLoadingTextTemplateDirective, decorators: [{
@@ -201,12 +201,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
201
201
  selector: '[ng-loadingtext-tmp]',
202
202
  standalone: true,
203
203
  }]
204
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
204
+ }] });
205
205
  class NgTagTemplateDirective {
206
- constructor(template) {
207
- this.template = template;
206
+ constructor() {
207
+ this.template = inject((TemplateRef));
208
208
  }
209
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgTagTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
209
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgTagTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
210
210
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: NgTagTemplateDirective, isStandalone: true, selector: "[ng-tag-tmp]", ngImport: i0 }); }
211
211
  }
212
212
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgTagTemplateDirective, decorators: [{
@@ -216,12 +216,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
216
216
  selector: '[ng-tag-tmp]',
217
217
  standalone: true,
218
218
  }]
219
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
219
+ }] });
220
220
  class NgLoadingSpinnerTemplateDirective {
221
- constructor(template) {
222
- this.template = template;
221
+ constructor() {
222
+ this.template = inject((TemplateRef));
223
223
  }
224
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgLoadingSpinnerTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
224
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgLoadingSpinnerTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
225
225
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: NgLoadingSpinnerTemplateDirective, isStandalone: true, selector: "[ng-loadingspinner-tmp]", ngImport: i0 }); }
226
226
  }
227
227
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgLoadingSpinnerTemplateDirective, decorators: [{
@@ -231,19 +231,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
231
231
  selector: '[ng-loadingspinner-tmp]',
232
232
  standalone: true,
233
233
  }]
234
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
234
+ }] });
235
235
  // eslint-disable-next-line @angular-eslint/directive-selector
236
236
  class NgClearButtonTemplateDirective {
237
- constructor(template) {
238
- this.template = template;
237
+ constructor() {
238
+ this.template = inject((TemplateRef));
239
239
  }
240
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgClearButtonTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
240
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgClearButtonTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
241
241
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: NgClearButtonTemplateDirective, isStandalone: true, selector: "[ng-clearbutton-tmp]", ngImport: i0 }); }
242
242
  }
243
243
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgClearButtonTemplateDirective, decorators: [{
244
244
  type: Directive,
245
245
  args: [{ selector: '[ng-clearbutton-tmp]', standalone: true }]
246
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
246
+ }] });
247
+
248
+ class NgSelectConfig {
249
+ constructor() {
250
+ this.fixedPlaceholder = true;
251
+ this.notFoundText = 'No items found';
252
+ this.typeToSearchText = 'Type to search';
253
+ this.addTagText = 'Add item';
254
+ this.loadingText = 'Loading...';
255
+ this.clearAllText = 'Clear all';
256
+ this.disableVirtualScroll = true;
257
+ this.openOnEnter = true;
258
+ this.appearance = 'underline';
259
+ this.tabFocusOnClear = true;
260
+ }
261
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgSelectConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
262
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgSelectConfig, providedIn: 'root' }); }
263
+ }
264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgSelectConfig, decorators: [{
265
+ type: Injectable,
266
+ args: [{ providedIn: 'root' }]
267
+ }] });
268
+
269
+ class ConsoleService {
270
+ warn(message) {
271
+ console.warn(message);
272
+ }
273
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ConsoleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
274
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ConsoleService, providedIn: 'root' }); }
275
+ }
276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ConsoleService, decorators: [{
277
+ type: Injectable,
278
+ args: [{ providedIn: 'root' }]
279
+ }] });
247
280
 
248
281
  function newId() {
249
282
  // First character is an 'a', it's good practice to tag id to begin with a letter
@@ -1124,10 +1157,10 @@ class ItemsList {
1124
1157
  return this._filteredItems[this._markedIndex];
1125
1158
  }
1126
1159
  get noItemsToSelect() {
1127
- return this._ngSelect.hideSelected && this._items.length === this.selectedItems.length;
1160
+ return this._ngSelect.hideSelected() && this._items.length === this.selectedItems.length;
1128
1161
  }
1129
1162
  get maxItemsSelected() {
1130
- return this._ngSelect.multiple && this._ngSelect.maxSelectedItems <= this.selectedItems.length;
1163
+ return this._ngSelect.multiple() && this._ngSelect.maxSelectedItems() <= this.selectedItems.length;
1131
1164
  }
1132
1165
  get lastSelectedItem() {
1133
1166
  let i = this.selectedItems.length - 1;
@@ -1141,8 +1174,9 @@ class ItemsList {
1141
1174
  }
1142
1175
  setItems(items) {
1143
1176
  this._items = items.map((item, index) => this.mapItem(item, index));
1144
- if (this._ngSelect.groupBy) {
1145
- this._groups = this._groupBy(this._items, this._ngSelect.groupBy);
1177
+ const groupBy = this._ngSelect.groupBy();
1178
+ if (groupBy) {
1179
+ this._groups = this._groupBy(this._items, groupBy);
1146
1180
  this._items = this._flatten(this._groups);
1147
1181
  }
1148
1182
  else {
@@ -1155,12 +1189,12 @@ class ItemsList {
1155
1189
  if (item.selected || this.maxItemsSelected) {
1156
1190
  return;
1157
1191
  }
1158
- const multiple = this._ngSelect.multiple;
1192
+ const multiple = this._ngSelect.multiple();
1159
1193
  if (!multiple) {
1160
1194
  this.clearSelected();
1161
1195
  }
1162
- this._selectionModel.select(item, multiple, this._ngSelect.selectableGroupAsModel);
1163
- if (this._ngSelect.hideSelected) {
1196
+ this._selectionModel.select(item, multiple, this._ngSelect.selectableGroupAsModel());
1197
+ if (this._ngSelect.hideSelected()) {
1164
1198
  this._hideSelected(item);
1165
1199
  }
1166
1200
  }
@@ -1168,21 +1202,22 @@ class ItemsList {
1168
1202
  if (!item.selected) {
1169
1203
  return;
1170
1204
  }
1171
- this._selectionModel.unselect(item, this._ngSelect.multiple);
1172
- if (this._ngSelect.hideSelected && isDefined(item.index) && this._ngSelect.multiple) {
1205
+ const multiple = this._ngSelect.multiple();
1206
+ this._selectionModel.unselect(item, multiple);
1207
+ if (this._ngSelect.hideSelected() && isDefined(item.index) && multiple) {
1173
1208
  this._showSelected(item);
1174
1209
  }
1175
1210
  }
1176
1211
  findItem(value) {
1177
1212
  let findBy;
1178
- if (this._ngSelect.compareWith) {
1179
- findBy = (item) => this._ngSelect.compareWith(item.value, value);
1213
+ if (this._ngSelect.compareWith()) {
1214
+ findBy = (item) => this._ngSelect.compareWith()(item.value, value);
1180
1215
  }
1181
- else if (this._ngSelect.bindValue) {
1182
- findBy = (item) => !item.children && this.resolveNested(item.value, this._ngSelect.bindValue) === value;
1216
+ else if (this._ngSelect.bindValue()) {
1217
+ findBy = (item) => !item.children && this.resolveNested(item.value, this._ngSelect.bindValue()) === value;
1183
1218
  }
1184
1219
  else {
1185
- findBy = (item) => item.value === value || (!item.children && item.label && item.label === this.resolveNested(value, this._ngSelect.bindLabel));
1220
+ findBy = (item) => item.value === value || (!item.children && item.label && item.label === this.resolveNested(value, this._ngSelect.bindLabel()));
1186
1221
  }
1187
1222
  return this._items.find((item) => findBy(item));
1188
1223
  }
@@ -1198,7 +1233,7 @@ class ItemsList {
1198
1233
  item.selected = keepDisabled && item.selected && item.disabled;
1199
1234
  item.marked = false;
1200
1235
  });
1201
- if (this._ngSelect.hideSelected) {
1236
+ if (this._ngSelect.hideSelected()) {
1202
1237
  this.resetFilteredItems();
1203
1238
  }
1204
1239
  }
@@ -1215,16 +1250,16 @@ class ItemsList {
1215
1250
  return;
1216
1251
  }
1217
1252
  this._filteredItems = [];
1218
- term = this._ngSelect.searchFn ? term : stripSpecialChars(term).toLocaleLowerCase();
1219
- const match = this._ngSelect.searchFn || this._defaultSearchFn;
1220
- const hideSelected = this._ngSelect.hideSelected;
1253
+ term = this._ngSelect.searchFn() ? term : stripSpecialChars(term).toLocaleLowerCase();
1254
+ const match = this._ngSelect.searchFn() || this._defaultSearchFn;
1255
+ const hideSelected = this._ngSelect.hideSelected();
1221
1256
  for (const key of Array.from(this._groups.keys())) {
1222
1257
  const matchedItems = [];
1223
1258
  for (const item of this._groups.get(key)) {
1224
1259
  if (hideSelected && ((item.parent && item.parent.selected) || item.selected)) {
1225
1260
  continue;
1226
1261
  }
1227
- const searchItem = this._ngSelect.searchFn ? item.value : item;
1262
+ const searchItem = this._ngSelect.searchFn() ? item.value : item;
1228
1263
  if (match(term, searchItem)) {
1229
1264
  matchedItems.push(item);
1230
1265
  }
@@ -1243,7 +1278,7 @@ class ItemsList {
1243
1278
  if (this._filteredItems.length === this._items.length) {
1244
1279
  return;
1245
1280
  }
1246
- if (this._ngSelect.hideSelected && this.selectedItems.length > 0) {
1281
+ if (this._ngSelect.hideSelected() && this.selectedItems.length > 0) {
1247
1282
  this._filteredItems = this._items.filter((x) => !x.selected);
1248
1283
  }
1249
1284
  else {
@@ -1294,7 +1329,7 @@ class ItemsList {
1294
1329
  }
1295
1330
  }
1296
1331
  mapItem(item, index) {
1297
- const label = isDefined(item.$ngOptionLabel) ? item.$ngOptionLabel : this.resolveNested(item, this._ngSelect.bindLabel);
1332
+ const label = isDefined(item.$ngOptionLabel) ? item.$ngOptionLabel : this.resolveNested(item, this._ngSelect.bindLabel());
1298
1333
  const value = isDefined(item.$ngOptionValue) ? item.$ngOptionValue : item;
1299
1334
  return {
1300
1335
  index,
@@ -1305,14 +1340,15 @@ class ItemsList {
1305
1340
  };
1306
1341
  }
1307
1342
  mapSelectedItems() {
1308
- const multiple = this._ngSelect.multiple;
1343
+ const multiple = this._ngSelect.multiple();
1309
1344
  for (const selected of this.selectedItems) {
1310
- const value = this._ngSelect.bindValue ? this.resolveNested(selected.value, this._ngSelect.bindValue) : selected.value;
1345
+ const bindValue = this._ngSelect.bindValue();
1346
+ const value = bindValue ? this.resolveNested(selected.value, bindValue) : selected.value;
1311
1347
  const item = isDefined(value) ? this.findItem(value) : null;
1312
1348
  this._selectionModel.unselect(selected, multiple);
1313
- this._selectionModel.select(item || selected, multiple, this._ngSelect.selectableGroupAsModel);
1349
+ this._selectionModel.select(item || selected, multiple, this._ngSelect.selectableGroupAsModel());
1314
1350
  }
1315
- if (this._ngSelect.hideSelected) {
1351
+ if (this._ngSelect.hideSelected()) {
1316
1352
  this._filteredItems = this.filteredItems.filter((x) => this.selectedItems.indexOf(x) === -1);
1317
1353
  }
1318
1354
  }
@@ -1365,7 +1401,7 @@ class ItemsList {
1365
1401
  }
1366
1402
  }
1367
1403
  _getLastMarkedIndex() {
1368
- if (this._ngSelect.hideSelected) {
1404
+ if (this._ngSelect.hideSelected()) {
1369
1405
  return -1;
1370
1406
  }
1371
1407
  if (this._markedIndex > -1 && this.markedItem === undefined) {
@@ -1390,7 +1426,7 @@ class ItemsList {
1390
1426
  }
1391
1427
  return groups;
1392
1428
  }
1393
- const isFnKey = isFunction(this._ngSelect.groupBy);
1429
+ const isFnKey = isFunction(this._ngSelect.groupBy());
1394
1430
  const keyFn = (item) => {
1395
1431
  const key = isFnKey ? prop(item.value) : item.value[prop];
1396
1432
  return isDefined(key) ? key : undefined;
@@ -1409,7 +1445,7 @@ class ItemsList {
1409
1445
  return groups;
1410
1446
  }
1411
1447
  _flatten(groups) {
1412
- const isGroupByFn = isFunction(this._ngSelect.groupBy);
1448
+ const isGroupByFn = isFunction(this._ngSelect.groupBy());
1413
1449
  const items = [];
1414
1450
  for (const key of Array.from(groups.keys())) {
1415
1451
  let i = items.length;
@@ -1427,11 +1463,11 @@ class ItemsList {
1427
1463
  children: undefined,
1428
1464
  parent: null,
1429
1465
  index: i++,
1430
- disabled: !this._ngSelect.selectableGroup,
1466
+ disabled: !this._ngSelect.selectableGroup(),
1431
1467
  htmlId: newId(),
1432
1468
  };
1433
- const groupKey = isGroupByFn ? this._ngSelect.bindLabel : this._ngSelect.groupBy;
1434
- const groupValue = this._ngSelect.groupValue ||
1469
+ const groupKey = isGroupByFn ? this._ngSelect.bindLabel() : this._ngSelect.groupBy();
1470
+ const groupValue = this._ngSelect.groupValue() ||
1435
1471
  (() => {
1436
1472
  if (isObjectKey) {
1437
1473
  return key.value;
@@ -1522,25 +1558,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
1522
1558
  const CSS_POSITIONS = ['top', 'right', 'bottom', 'left'];
1523
1559
  const SCROLL_SCHEDULER = typeof requestAnimationFrame !== 'undefined' ? animationFrameScheduler : asapScheduler;
1524
1560
  class NgDropdownPanelComponent {
1525
- constructor(_renderer, _zone, _panelService, _elementRef, _document) {
1526
- this._renderer = _renderer;
1527
- this._zone = _zone;
1528
- this._panelService = _panelService;
1529
- this._document = _document;
1530
- this.items = [];
1531
- this.position = 'auto';
1532
- this.virtualScroll = false;
1533
- this.filterValue = null;
1561
+ constructor() {
1562
+ this._renderer = inject(Renderer2);
1563
+ this._zone = inject(NgZone);
1564
+ this._panelService = inject(NgDropdownPanelService);
1565
+ this._document = inject(DOCUMENT, { optional: true });
1566
+ this._dropdown = inject((ElementRef)).nativeElement;
1567
+ this.items = input([]);
1568
+ this.markedItem = input(undefined);
1569
+ this.position = input('auto');
1570
+ this.appendTo = input(undefined);
1571
+ this.bufferAmount = input(undefined);
1572
+ this.virtualScroll = input(false, { transform: booleanAttribute });
1573
+ this.headerTemplate = input(undefined);
1574
+ this.footerTemplate = input(undefined);
1575
+ this.filterValue = input(null);
1534
1576
  this.ariaLabelDropdown = input(null);
1535
- this.update = new EventEmitter();
1536
- this.scroll = new EventEmitter();
1537
- this.scrollToEnd = new EventEmitter();
1538
- this.outsideClick = new EventEmitter();
1577
+ this.update = output();
1578
+ this.scroll = output();
1579
+ this.scrollToEnd = output();
1580
+ this.outsideClick = output();
1581
+ this.contentElementRef = viewChild('content', { read: ElementRef });
1582
+ this.scrollElementRef = viewChild('scroll', { read: ElementRef });
1583
+ this.paddingElementRef = viewChild('padding', { read: ElementRef });
1539
1584
  this._destroy$ = new Subject();
1585
+ this._virtualPadding = computed(() => this.paddingElementRef()?.nativeElement);
1586
+ this._scrollablePanel = computed(() => this.scrollElementRef()?.nativeElement);
1587
+ this._contentPanel = computed(() => this.contentElementRef()?.nativeElement);
1540
1588
  this._scrollToEndFired = false;
1541
1589
  this._updateScrollHeight = false;
1542
1590
  this._lastScrollPosition = 0;
1543
- this._dropdown = _elementRef.nativeElement;
1544
1591
  }
1545
1592
  get currentPosition() {
1546
1593
  return this._currentPosition;
@@ -1555,18 +1602,15 @@ class NgDropdownPanelComponent {
1555
1602
  }
1556
1603
  }
1557
1604
  get _startOffset() {
1558
- if (this.markedItem) {
1605
+ if (this.markedItem()) {
1559
1606
  const { itemHeight, panelHeight } = this._panelService.dimensions;
1560
- const offset = this.markedItem.index * itemHeight;
1607
+ const offset = this.markedItem().index * itemHeight;
1561
1608
  return panelHeight > offset ? 0 : offset;
1562
1609
  }
1563
1610
  return 0;
1564
1611
  }
1565
1612
  ngOnInit() {
1566
1613
  this._select = this._dropdown.parentElement;
1567
- this._virtualPadding = this.paddingElementRef.nativeElement;
1568
- this._scrollablePanel = this.scrollElementRef.nativeElement;
1569
- this._contentPanel = this.contentElementRef.nativeElement;
1570
1614
  this._handleScroll();
1571
1615
  this._handleOutsideClick();
1572
1616
  this._appendDropdown();
@@ -1582,7 +1626,7 @@ class NgDropdownPanelComponent {
1582
1626
  this._destroy$.next();
1583
1627
  this._destroy$.complete();
1584
1628
  this._destroy$.unsubscribe();
1585
- if (this.appendTo) {
1629
+ if (this.appendTo()) {
1586
1630
  this._renderer.removeChild(this._dropdown.parentNode, this._dropdown);
1587
1631
  }
1588
1632
  }
@@ -1590,12 +1634,12 @@ class NgDropdownPanelComponent {
1590
1634
  if (!option) {
1591
1635
  return;
1592
1636
  }
1593
- const index = this.items.indexOf(option);
1637
+ const index = this.items().indexOf(option);
1594
1638
  if (index < 0 || index >= this.itemsLength) {
1595
1639
  return;
1596
1640
  }
1597
1641
  let scrollTo;
1598
- if (this.virtualScroll) {
1642
+ if (this.virtualScroll()) {
1599
1643
  const itemHeight = this._panelService.dimensions.itemHeight;
1600
1644
  scrollTo = this._panelService.getScrollTo(index * itemHeight, itemHeight, this._lastScrollPosition);
1601
1645
  }
@@ -1605,11 +1649,11 @@ class NgDropdownPanelComponent {
1605
1649
  scrollTo = this._panelService.getScrollTo(item.offsetTop, item.clientHeight, lastScroll);
1606
1650
  }
1607
1651
  if (isDefined(scrollTo)) {
1608
- this._scrollablePanel.scrollTop = scrollTo;
1652
+ this._scrollablePanel().scrollTop = scrollTo;
1609
1653
  }
1610
1654
  }
1611
1655
  scrollToTag() {
1612
- const panel = this._scrollablePanel;
1656
+ const panel = this._scrollablePanel();
1613
1657
  panel.scrollTop = panel.scrollHeight - panel.clientHeight;
1614
1658
  }
1615
1659
  adjustPosition() {
@@ -1623,7 +1667,7 @@ class NgDropdownPanelComponent {
1623
1667
  else {
1624
1668
  this._updateDropdownClass('bottom');
1625
1669
  }
1626
- if (this.appendTo) {
1670
+ if (this.appendTo()) {
1627
1671
  this._updateYPosition();
1628
1672
  }
1629
1673
  this._dropdown.style.opacity = '1';
@@ -1640,7 +1684,10 @@ class NgDropdownPanelComponent {
1640
1684
  }
1641
1685
  _handleScroll() {
1642
1686
  this._zone.runOutsideAngular(() => {
1643
- fromEvent(this.scrollElementRef.nativeElement, 'scroll')
1687
+ if (!this._scrollablePanel()) {
1688
+ return;
1689
+ }
1690
+ fromEvent(this._scrollablePanel(), 'scroll')
1644
1691
  .pipe(takeUntil(this._destroy$), auditTime(0, SCROLL_SCHEDULER))
1645
1692
  .subscribe((e) => {
1646
1693
  const path = e.path || (e.composedPath && e.composedPath());
@@ -1672,11 +1719,10 @@ class NgDropdownPanelComponent {
1672
1719
  }
1673
1720
  this._zone.run(() => this.outsideClick.emit());
1674
1721
  }
1675
- _onItemsChange(items, firstChange) {
1676
- this.items = items || [];
1722
+ _onItemsChange(items = [], firstChange) {
1677
1723
  this._scrollToEndFired = false;
1678
1724
  this.itemsLength = items.length;
1679
- if (this.virtualScroll) {
1725
+ if (this.virtualScroll()) {
1680
1726
  this._updateItemsRange(firstChange);
1681
1727
  }
1682
1728
  else {
@@ -1685,16 +1731,16 @@ class NgDropdownPanelComponent {
1685
1731
  }
1686
1732
  }
1687
1733
  _updateItems(firstChange) {
1688
- this.update.emit(this.items);
1734
+ this.update.emit(this.items());
1689
1735
  if (firstChange === false) {
1690
1736
  return;
1691
1737
  }
1692
1738
  this._zone.runOutsideAngular(() => {
1693
1739
  Promise.resolve().then(() => {
1694
- const panelHeight = this._scrollablePanel.clientHeight;
1740
+ const panelHeight = this._scrollablePanel().clientHeight;
1695
1741
  this._panelService.setDimensions(0, panelHeight);
1696
1742
  this._handleDropdownPosition();
1697
- this.scrollTo(this.markedItem, firstChange);
1743
+ this.scrollTo(this.markedItem(), firstChange);
1698
1744
  });
1699
1745
  });
1700
1746
  }
@@ -1712,7 +1758,7 @@ class NgDropdownPanelComponent {
1712
1758
  });
1713
1759
  }
1714
1760
  _onContentScrolled(scrollTop) {
1715
- if (this.virtualScroll) {
1761
+ if (this.virtualScroll()) {
1716
1762
  this._renderItemsRange(scrollTop);
1717
1763
  }
1718
1764
  this._lastScrollPosition = scrollTop;
@@ -1720,15 +1766,15 @@ class NgDropdownPanelComponent {
1720
1766
  }
1721
1767
  _updateVirtualHeight(height) {
1722
1768
  if (this._updateScrollHeight) {
1723
- this._virtualPadding.style.height = `${height}px`;
1769
+ this._virtualPadding().style.height = `${height}px`;
1724
1770
  this._updateScrollHeight = false;
1725
1771
  }
1726
1772
  }
1727
1773
  _setVirtualHeight() {
1728
- if (!this._virtualPadding) {
1774
+ if (!this._virtualPadding()) {
1729
1775
  return;
1730
1776
  }
1731
- this._virtualPadding.style.height = `0px`;
1777
+ this._virtualPadding().style.height = `0px`;
1732
1778
  }
1733
1779
  _onItemsLengthChanged() {
1734
1780
  this._updateScrollHeight = true;
@@ -1737,16 +1783,16 @@ class NgDropdownPanelComponent {
1737
1783
  if (scrollTop && this._lastScrollPosition === scrollTop) {
1738
1784
  return;
1739
1785
  }
1740
- scrollTop = scrollTop || this._scrollablePanel.scrollTop;
1741
- const range = this._panelService.calculateItems(scrollTop, this.itemsLength, this.bufferAmount);
1786
+ scrollTop = scrollTop || this._scrollablePanel().scrollTop;
1787
+ const range = this._panelService.calculateItems(scrollTop, this.itemsLength, this.bufferAmount());
1742
1788
  this._updateVirtualHeight(range.scrollHeight);
1743
- this._contentPanel.style.transform = `translateY(${range.topPadding}px)`;
1789
+ this._contentPanel().style.transform = `translateY(${range.topPadding}px)`;
1744
1790
  this._zone.run(() => {
1745
- this.update.emit(this.items.slice(range.start, range.end));
1791
+ this.update.emit(this.items().slice(range.start, range.end));
1746
1792
  this.scroll.emit({ start: range.start, end: range.end });
1747
1793
  });
1748
1794
  if (isDefined(scrollTop) && this._lastScrollPosition === 0) {
1749
- this._scrollablePanel.scrollTop = scrollTop;
1795
+ this._scrollablePanel().scrollTop = scrollTop;
1750
1796
  this._lastScrollPosition = scrollTop;
1751
1797
  }
1752
1798
  }
@@ -1754,13 +1800,13 @@ class NgDropdownPanelComponent {
1754
1800
  if (this._panelService.dimensions.itemHeight > 0 || this.itemsLength === 0) {
1755
1801
  return Promise.resolve(this._panelService.dimensions);
1756
1802
  }
1757
- const [first] = this.items;
1803
+ const [first] = this.items();
1758
1804
  this.update.emit([first]);
1759
1805
  return Promise.resolve().then(() => {
1760
1806
  const option = this._dropdown.querySelector(`#${first.htmlId}`);
1761
1807
  const optionHeight = option.clientHeight;
1762
- this._virtualPadding.style.height = `${optionHeight * this.itemsLength}px`;
1763
- const panelHeight = this._scrollablePanel.clientHeight;
1808
+ this._virtualPadding().style.height = `${optionHeight * this.itemsLength}px`;
1809
+ const panelHeight = this._scrollablePanel().clientHeight;
1764
1810
  this._panelService.setDimensions(optionHeight, panelHeight);
1765
1811
  return this._panelService.dimensions;
1766
1812
  });
@@ -1769,15 +1815,16 @@ class NgDropdownPanelComponent {
1769
1815
  if (this._scrollToEndFired || scrollTop === 0) {
1770
1816
  return;
1771
1817
  }
1772
- const padding = this.virtualScroll ? this._virtualPadding : this._contentPanel;
1818
+ const padding = this.virtualScroll() ? this._virtualPadding() : this._contentPanel();
1773
1819
  if (scrollTop + this._dropdown.clientHeight >= padding.clientHeight - 1) {
1774
1820
  this._zone.run(() => this.scrollToEnd.emit());
1775
1821
  this._scrollToEndFired = true;
1776
1822
  }
1777
1823
  }
1778
1824
  _calculateCurrentPosition(dropdownEl) {
1779
- if (this.position !== 'auto') {
1780
- return this.position;
1825
+ const position = this.position();
1826
+ if (position !== 'auto') {
1827
+ return position;
1781
1828
  }
1782
1829
  const selectRect = this._select.getBoundingClientRect();
1783
1830
  const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
@@ -1792,14 +1839,14 @@ class NgDropdownPanelComponent {
1792
1839
  }
1793
1840
  }
1794
1841
  _appendDropdown() {
1795
- if (!this.appendTo) {
1842
+ if (!this.appendTo()) {
1796
1843
  return;
1797
1844
  }
1798
1845
  this._parent = this._dropdown.shadowRoot
1799
- ? this._dropdown.shadowRoot.querySelector(this.appendTo)
1800
- : document.querySelector(this.appendTo);
1846
+ ? this._dropdown.shadowRoot.querySelector(this.appendTo())
1847
+ : document.querySelector(this.appendTo());
1801
1848
  if (!this._parent) {
1802
- throw new Error(`appendTo selector ${this.appendTo} did not found any parent element`);
1849
+ throw new Error(`appendTo selector ${this.appendTo()} did not found any parent element`);
1803
1850
  }
1804
1851
  this._updateXPosition();
1805
1852
  this._parent.appendChild(this._dropdown);
@@ -1849,22 +1896,22 @@ class NgDropdownPanelComponent {
1849
1896
  });
1850
1897
  });
1851
1898
  }
1852
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgDropdownPanelComponent, deps: [{ token: i0.Renderer2 }, { token: i0.NgZone }, { token: NgDropdownPanelService }, { token: i0.ElementRef }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1853
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: NgDropdownPanelComponent, isStandalone: true, selector: "ng-dropdown-panel", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: false, isRequired: false, transformFunction: null }, markedItem: { classPropertyName: "markedItem", publicName: "markedItem", isSignal: false, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: false, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: false, isRequired: false, transformFunction: null }, bufferAmount: { classPropertyName: "bufferAmount", publicName: "bufferAmount", isSignal: false, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "headerTemplate", isSignal: false, isRequired: false, transformFunction: null }, footerTemplate: { classPropertyName: "footerTemplate", publicName: "footerTemplate", isSignal: false, isRequired: false, transformFunction: null }, filterValue: { classPropertyName: "filterValue", publicName: "filterValue", isSignal: false, isRequired: false, transformFunction: null }, ariaLabelDropdown: { classPropertyName: "ariaLabelDropdown", publicName: "ariaLabelDropdown", isSignal: true, isRequired: false, transformFunction: null } }, 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: `
1854
- @if (headerTemplate) {
1899
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgDropdownPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1900
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: NgDropdownPanelComponent, isStandalone: true, selector: "ng-dropdown-panel", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, markedItem: { classPropertyName: "markedItem", publicName: "markedItem", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, bufferAmount: { classPropertyName: "bufferAmount", publicName: "bufferAmount", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "headerTemplate", isSignal: true, isRequired: false, transformFunction: null }, footerTemplate: { classPropertyName: "footerTemplate", publicName: "footerTemplate", isSignal: true, isRequired: false, transformFunction: null }, filterValue: { classPropertyName: "filterValue", publicName: "filterValue", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelDropdown: { classPropertyName: "ariaLabelDropdown", publicName: "ariaLabelDropdown", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { update: "update", scroll: "scroll", scrollToEnd: "scrollToEnd", outsideClick: "outsideClick" }, viewQueries: [{ propertyName: "contentElementRef", first: true, predicate: ["content"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "scrollElementRef", first: true, predicate: ["scroll"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "paddingElementRef", first: true, predicate: ["padding"], descendants: true, read: ElementRef, isSignal: true }], usesOnChanges: true, ngImport: i0, template: `
1901
+ @if (headerTemplate()) {
1855
1902
  <div class="ng-dropdown-header">
1856
- <ng-container [ngTemplateOutlet]="headerTemplate" [ngTemplateOutletContext]="{ searchTerm: filterValue }" />
1903
+ <ng-container [ngTemplateOutlet]="headerTemplate()" [ngTemplateOutletContext]="{ searchTerm: filterValue() }" />
1857
1904
  </div>
1858
1905
  }
1859
1906
  <div #scroll role="listbox" class="ng-dropdown-panel-items scroll-host" [attr.aria-label]="ariaLabelDropdown()">
1860
- <div #padding [class.total-padding]="virtualScroll"></div>
1861
- <div #content [class.scrollable-content]="virtualScroll && items.length">
1907
+ <div #padding [class.total-padding]="virtualScroll()"></div>
1908
+ <div #content [class.scrollable-content]="virtualScroll() && items().length">
1862
1909
  <ng-content />
1863
1910
  </div>
1864
1911
  </div>
1865
- @if (footerTemplate) {
1912
+ @if (footerTemplate()) {
1866
1913
  <div class="ng-dropdown-footer">
1867
- <ng-container [ngTemplateOutlet]="footerTemplate" [ngTemplateOutletContext]="{ searchTerm: filterValue }" />
1914
+ <ng-container [ngTemplateOutlet]="footerTemplate()" [ngTemplateOutletContext]="{ searchTerm: filterValue() }" />
1868
1915
  </div>
1869
1916
  }
1870
1917
  `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
@@ -1876,100 +1923,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
1876
1923
  encapsulation: ViewEncapsulation.None,
1877
1924
  selector: 'ng-dropdown-panel',
1878
1925
  template: `
1879
- @if (headerTemplate) {
1926
+ @if (headerTemplate()) {
1880
1927
  <div class="ng-dropdown-header">
1881
- <ng-container [ngTemplateOutlet]="headerTemplate" [ngTemplateOutletContext]="{ searchTerm: filterValue }" />
1928
+ <ng-container [ngTemplateOutlet]="headerTemplate()" [ngTemplateOutletContext]="{ searchTerm: filterValue() }" />
1882
1929
  </div>
1883
1930
  }
1884
1931
  <div #scroll role="listbox" class="ng-dropdown-panel-items scroll-host" [attr.aria-label]="ariaLabelDropdown()">
1885
- <div #padding [class.total-padding]="virtualScroll"></div>
1886
- <div #content [class.scrollable-content]="virtualScroll && items.length">
1932
+ <div #padding [class.total-padding]="virtualScroll()"></div>
1933
+ <div #content [class.scrollable-content]="virtualScroll() && items().length">
1887
1934
  <ng-content />
1888
1935
  </div>
1889
1936
  </div>
1890
- @if (footerTemplate) {
1937
+ @if (footerTemplate()) {
1891
1938
  <div class="ng-dropdown-footer">
1892
- <ng-container [ngTemplateOutlet]="footerTemplate" [ngTemplateOutletContext]="{ searchTerm: filterValue }" />
1939
+ <ng-container [ngTemplateOutlet]="footerTemplate()" [ngTemplateOutletContext]="{ searchTerm: filterValue() }" />
1893
1940
  </div>
1894
1941
  }
1895
1942
  `,
1896
- imports: [NgTemplateOutlet],
1943
+ imports: [NgTemplateOutlet]
1897
1944
  }]
1898
- }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.NgZone }, { type: NgDropdownPanelService }, { type: i0.ElementRef }, { type: undefined, decorators: [{
1899
- type: Optional
1900
- }, {
1901
- type: Inject,
1902
- args: [DOCUMENT]
1903
- }] }], propDecorators: { items: [{
1904
- type: Input
1905
- }], markedItem: [{
1906
- type: Input
1907
- }], position: [{
1908
- type: Input
1909
- }], appendTo: [{
1910
- type: Input
1911
- }], bufferAmount: [{
1912
- type: Input
1913
- }], virtualScroll: [{
1914
- type: Input,
1915
- args: [{ transform: booleanAttribute }]
1916
- }], headerTemplate: [{
1917
- type: Input
1918
- }], footerTemplate: [{
1919
- type: Input
1920
- }], filterValue: [{
1921
- type: Input
1922
- }], update: [{
1923
- type: Output
1924
- }], scroll: [{
1925
- type: Output
1926
- }], scrollToEnd: [{
1927
- type: Output
1928
- }], outsideClick: [{
1929
- type: Output
1930
- }], contentElementRef: [{
1931
- type: ViewChild,
1932
- args: ['content', { read: ElementRef, static: true }]
1933
- }], scrollElementRef: [{
1934
- type: ViewChild,
1935
- args: ['scroll', { read: ElementRef, static: true }]
1936
- }], paddingElementRef: [{
1937
- type: ViewChild,
1938
- args: ['padding', { read: ElementRef, static: true }]
1939
- }] } });
1945
+ }] });
1940
1946
 
1941
1947
  class NgOptionComponent {
1942
- constructor(elementRef) {
1943
- this.elementRef = elementRef;
1944
- this.disabled = false;
1945
- this.stateChange$ = new Subject();
1946
- }
1947
- get label() {
1948
- return (this.elementRef.nativeElement.textContent || '').trim();
1949
- }
1950
- ngOnChanges(changes) {
1951
- if (changes.disabled) {
1952
- this.stateChange$.next({
1953
- value: this.value,
1954
- disabled: this.disabled,
1955
- });
1956
- }
1957
- }
1958
- ngAfterViewChecked() {
1959
- if (this.label !== this._previousLabel) {
1960
- this._previousLabel = this.label;
1961
- this.stateChange$.next({
1962
- value: this.value,
1963
- disabled: this.disabled,
1964
- label: this.elementRef.nativeElement.innerHTML,
1965
- });
1966
- }
1948
+ constructor() {
1949
+ this.value = input();
1950
+ this.disabled = input(false, {
1951
+ transform: booleanAttribute,
1952
+ });
1953
+ this.elementRef = inject((ElementRef));
1954
+ this.label = signal('');
1955
+ this.stateChange = computed(() => ({
1956
+ value: this.value(),
1957
+ disabled: this.disabled(),
1958
+ label: this.label(),
1959
+ }));
1960
+ this.stateChange$ = toObservable(this.stateChange);
1961
+ afterNextRender(() => {
1962
+ if (this._label !== this.label()) {
1963
+ this.label.set(this._label);
1964
+ }
1965
+ });
1967
1966
  }
1968
- ngOnDestroy() {
1969
- this.stateChange$.complete();
1967
+ get _label() {
1968
+ return (this.elementRef.nativeElement.innerHTML || '').trim();
1970
1969
  }
1971
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgOptionComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
1972
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.0.0", type: NgOptionComponent, isStandalone: true, selector: "ng-option", inputs: { value: "value", disabled: ["disabled", "disabled", booleanAttribute] }, usesOnChanges: true, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1970
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1971
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.0", type: NgOptionComponent, isStandalone: true, selector: "ng-option", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1973
1972
  }
1974
1973
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgOptionComponent, decorators: [{
1975
1974
  type: Component,
@@ -1979,12 +1978,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
1979
1978
  changeDetection: ChangeDetectionStrategy.OnPush,
1980
1979
  template: `<ng-content />`,
1981
1980
  }]
1982
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { value: [{
1983
- type: Input
1984
- }], disabled: [{
1985
- type: Input,
1986
- args: [{ transform: booleanAttribute }]
1987
- }] } });
1981
+ }], ctorParameters: () => [] });
1988
1982
 
1989
1983
  var KeyCode;
1990
1984
  (function (KeyCode) {
@@ -2072,87 +2066,91 @@ class DefaultSelectionModel {
2072
2066
  }
2073
2067
  }
2074
2068
 
2075
- class NgSelectConfig {
2076
- constructor() {
2077
- this.fixedPlaceholder = true;
2078
- this.notFoundText = 'No items found';
2079
- this.typeToSearchText = 'Type to search';
2080
- this.addTagText = 'Add item';
2081
- this.loadingText = 'Loading...';
2082
- this.clearAllText = 'Clear all';
2083
- this.disableVirtualScroll = true;
2084
- this.openOnEnter = true;
2085
- this.appearance = 'underline';
2086
- this.tabFocusOnClear = true;
2087
- }
2088
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgSelectConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2089
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgSelectConfig, providedIn: 'root' }); }
2090
- }
2091
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgSelectConfig, decorators: [{
2092
- type: Injectable,
2093
- args: [{ providedIn: 'root' }]
2094
- }] });
2095
-
2096
- class ConsoleService {
2097
- warn(message) {
2098
- console.warn(message);
2099
- }
2100
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ConsoleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2101
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ConsoleService, providedIn: 'root' }); }
2102
- }
2103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ConsoleService, decorators: [{
2104
- type: Injectable,
2105
- args: [{ providedIn: 'root' }]
2106
- }] });
2107
-
2108
2069
  const SELECTION_MODEL_FACTORY = new InjectionToken('ng-select-selection-model');
2109
2070
  class NgSelectComponent {
2110
- constructor(classes, autoFocus, config, newSelectionModel, _elementRef, _cd, _console) {
2111
- this.classes = classes;
2112
- this.autoFocus = autoFocus;
2113
- this.config = config;
2114
- this._cd = _cd;
2115
- this._console = _console;
2116
- this.ariaLabelDropdown = 'Options List';
2117
- this.markFirst = true;
2118
- this.fixedPlaceholder = true;
2119
- this.preventToggleOnRightClick = false;
2120
- this.dropdownPosition = 'auto';
2121
- this.loading = false;
2122
- this.closeOnSelect = true;
2123
- this.hideSelected = false;
2124
- this.selectOnTab = false;
2125
- this.bufferAmount = 4;
2126
- this.selectableGroup = false;
2127
- this.selectableGroupAsModel = true;
2128
- this.searchFn = null;
2129
- this.trackByFn = null;
2130
- this.clearOnBackspace = true;
2131
- this.labelForId = null;
2132
- this.inputAttrs = {};
2071
+ constructor() {
2072
+ this.classes = inject(new HostAttributeToken('class'), { optional: true });
2073
+ this.autoFocus = inject(new HostAttributeToken('autofocus'), { optional: true });
2074
+ this.config = inject(NgSelectConfig);
2075
+ this._cd = inject(ChangeDetectorRef);
2076
+ this._console = inject(ConsoleService);
2077
+ this.bindLabel = model(undefined);
2078
+ this.bindValue = model(undefined);
2079
+ this.appearance = model(undefined);
2080
+ this.ariaLabelDropdown = input('Options List');
2081
+ this.ariaLabel = input(undefined);
2082
+ this.markFirst = input(true, { transform: booleanAttribute });
2083
+ this.placeholder = input(this.config.placeholder);
2084
+ this.fixedPlaceholder = input(false);
2085
+ this.notFoundText = input(undefined);
2086
+ this.typeToSearchText = input(undefined);
2087
+ this.preventToggleOnRightClick = input(false);
2088
+ this.addTagText = input(undefined);
2089
+ this.loadingText = input(undefined);
2090
+ this.clearAllText = input(undefined);
2091
+ this.dropdownPosition = input('auto');
2092
+ this.appendTo = input(undefined);
2093
+ this.loading = input(false, { transform: booleanAttribute });
2094
+ this.closeOnSelect = input(true, { transform: booleanAttribute });
2095
+ this.hideSelected = input(false, { transform: booleanAttribute });
2096
+ this.selectOnTab = input(false, { transform: booleanAttribute });
2097
+ this.openOnEnter = input(undefined, { transform: booleanAttribute });
2098
+ this.maxSelectedItems = input(undefined, { transform: numberAttribute });
2099
+ this.groupBy = input(undefined);
2100
+ this.groupValue = input(undefined);
2101
+ this.bufferAmount = input(4, { transform: numberAttribute });
2102
+ this.virtualScroll = input(undefined, { transform: booleanAttribute });
2103
+ this.selectableGroup = input(false, { transform: booleanAttribute });
2133
2104
  this.tabFocusOnClearButton = input();
2134
- this.readonly = false;
2135
- this.searchWhileComposing = true;
2136
- this.minTermLength = 0;
2137
- this.editableSearchTerm = false;
2138
- this.ngClass = null;
2139
- this.multiple = false;
2140
- this.addTag = false;
2141
- this.searchable = true;
2142
- this.clearable = true;
2143
- this.isOpen = false;
2105
+ this.selectableGroupAsModel = input(true, { transform: booleanAttribute });
2106
+ this.searchFn = input(null);
2107
+ this.trackByFn = input(null);
2108
+ this.clearOnBackspace = input(true, { transform: booleanAttribute });
2109
+ this.labelForId = input(null);
2110
+ this.inputAttrs = input({});
2111
+ this.tabIndex = input(undefined, { transform: numberAttribute });
2112
+ this.readonly = input(false, { transform: booleanAttribute });
2113
+ this.searchWhileComposing = input(true, { transform: booleanAttribute });
2114
+ this.minTermLength = input(0, { transform: numberAttribute });
2115
+ this.editableSearchTerm = input(false, { transform: booleanAttribute });
2116
+ this.ngClass = input(null);
2117
+ this.typeahead = input(undefined);
2118
+ this.multiple = input(false, { transform: booleanAttribute });
2119
+ this.addTag = input(false);
2120
+ this.searchable = input(true, { transform: booleanAttribute });
2121
+ this.clearable = input(true, { transform: booleanAttribute });
2122
+ this.isOpen = model(false);
2144
2123
  // output events
2145
- this.blurEvent = new EventEmitter();
2146
- this.focusEvent = new EventEmitter();
2147
- this.changeEvent = new EventEmitter();
2148
- this.openEvent = new EventEmitter();
2149
- this.closeEvent = new EventEmitter();
2150
- this.searchEvent = new EventEmitter();
2151
- this.clearEvent = new EventEmitter();
2152
- this.addEvent = new EventEmitter();
2153
- this.removeEvent = new EventEmitter();
2154
- this.scroll = new EventEmitter();
2155
- this.scrollToEnd = new EventEmitter();
2124
+ this.blurEvent = output({ alias: 'blur' });
2125
+ this.focusEvent = output({ alias: 'focus' });
2126
+ this.changeEvent = output({ alias: 'change' });
2127
+ this.openEvent = output({ alias: 'open' });
2128
+ this.closeEvent = output({ alias: 'close' });
2129
+ this.searchEvent = output({ alias: 'search' });
2130
+ this.clearEvent = output({ alias: 'clear' });
2131
+ this.addEvent = output({ alias: 'add' });
2132
+ this.removeEvent = output({ alias: 'remove' });
2133
+ this.scroll = output({ alias: 'scroll' });
2134
+ this.scrollToEnd = output({ alias: 'scrollToEnd' });
2135
+ // custom templates
2136
+ this.optionTemplate = contentChild(NgOptionTemplateDirective, { read: TemplateRef });
2137
+ this.optgroupTemplate = contentChild(NgOptgroupTemplateDirective, { read: TemplateRef });
2138
+ this.labelTemplate = contentChild(NgLabelTemplateDirective, { read: TemplateRef });
2139
+ this.multiLabelTemplate = contentChild(NgMultiLabelTemplateDirective, { read: TemplateRef });
2140
+ this.headerTemplate = contentChild(NgHeaderTemplateDirective, { read: TemplateRef });
2141
+ this.footerTemplate = contentChild(NgFooterTemplateDirective, { read: TemplateRef });
2142
+ this.notFoundTemplate = contentChild(NgNotFoundTemplateDirective, { read: TemplateRef });
2143
+ this.placeholderTemplate = contentChild(NgPlaceholderTemplateDirective, { read: TemplateRef });
2144
+ this.typeToSearchTemplate = contentChild(NgTypeToSearchTemplateDirective, { read: TemplateRef });
2145
+ this.loadingTextTemplate = contentChild(NgLoadingTextTemplateDirective, { read: TemplateRef });
2146
+ this.tagTemplate = contentChild(NgTagTemplateDirective, { read: TemplateRef });
2147
+ this.loadingSpinnerTemplate = contentChild(NgLoadingSpinnerTemplateDirective, { read: TemplateRef });
2148
+ this.clearButtonTemplate = contentChild(NgClearButtonTemplateDirective, { read: TemplateRef });
2149
+ this.dropdownPanel = viewChild(forwardRef(() => NgDropdownPanelComponent));
2150
+ this.searchInput = viewChild('searchInput');
2151
+ this.clearButton = viewChild('clearButton');
2152
+ this.ngOptions = contentChildren(NgOptionComponent, { descendants: true });
2153
+ this.ngOptionsObservable = toObservable(this.ngOptions);
2156
2154
  this.useDefaultClass = true;
2157
2155
  this.viewPortItems = [];
2158
2156
  this.searchTerm = null;
@@ -2164,72 +2162,64 @@ class NgSelectComponent {
2164
2162
  this._isComposing = false;
2165
2163
  this._destroy$ = new Subject();
2166
2164
  this._keyPress$ = new Subject();
2167
- this._items = [];
2168
- this.keyDownFn = (_) => true;
2165
+ this.items = model([]);
2166
+ this._disabled = signal(false);
2167
+ this.compareWith = input(undefined, {
2168
+ transform: (fn) => {
2169
+ if (fn !== undefined && fn !== null && !isFunction(fn)) {
2170
+ throw Error('`compareWith` must be a function.');
2171
+ }
2172
+ return fn;
2173
+ },
2174
+ });
2175
+ this.clearSearchOnAdd = input(undefined);
2176
+ this.clearSearchOnAddValue = computed(() => {
2177
+ if (isDefined(this.clearSearchOnAdd())) {
2178
+ return this.clearSearchOnAdd();
2179
+ }
2180
+ if (isDefined(this.config.clearSearchOnAdd)) {
2181
+ return this.config.clearSearchOnAdd;
2182
+ }
2183
+ return this.closeOnSelect();
2184
+ });
2185
+ this.deselectOnClick = input();
2186
+ this.deselectOnClickValue = computed(() => {
2187
+ if (isDefined(this.deselectOnClick())) {
2188
+ return this.deselectOnClick();
2189
+ }
2190
+ if (isDefined(this.config.deselectOnClick)) {
2191
+ return this.config.deselectOnClick;
2192
+ }
2193
+ return this.multiple();
2194
+ });
2195
+ this.keyDownFn = input((_) => true);
2169
2196
  this.clearItem = (item) => {
2170
2197
  const option = this.selectedItems.find((x) => x.value === item);
2171
2198
  this.unselect(option);
2172
2199
  };
2173
2200
  this.trackByOption = (_, item) => {
2174
- if (this.trackByFn) {
2175
- return this.trackByFn(item.value);
2201
+ if (this.trackByFn()) {
2202
+ return this.trackByFn()(item.value);
2176
2203
  }
2177
2204
  return item;
2178
2205
  };
2179
2206
  this._onChange = (_) => { };
2180
2207
  this._onTouched = () => { };
2208
+ const config = this.config;
2209
+ const newSelectionModel = inject(SELECTION_MODEL_FACTORY, { optional: true });
2210
+ const _elementRef = inject(ElementRef);
2181
2211
  this._mergeGlobalConfig(config);
2182
2212
  this.itemsList = new ItemsList(this, newSelectionModel ? newSelectionModel() : DefaultSelectionModelFactory());
2183
2213
  this.element = _elementRef.nativeElement;
2184
2214
  }
2185
2215
  get filtered() {
2186
- return (!!this.searchTerm && this.searchable) || this._isComposing;
2216
+ return (!!this.searchTerm && this.searchable()) || this._isComposing;
2187
2217
  }
2188
2218
  get single() {
2189
- return !this.multiple;
2190
- }
2191
- get items() {
2192
- return this._items;
2193
- }
2194
- set items(value) {
2195
- this._itemsAreUsed = true;
2196
- this._items = value ?? [];
2219
+ return !this.multiple();
2197
2220
  }
2198
2221
  get disabled() {
2199
- return this.readonly || this._disabled;
2200
- }
2201
- get compareWith() {
2202
- return this._compareWith;
2203
- }
2204
- set compareWith(fn) {
2205
- if (fn !== undefined && fn !== null && !isFunction(fn)) {
2206
- throw Error('`compareWith` must be a function.');
2207
- }
2208
- this._compareWith = fn;
2209
- }
2210
- get clearSearchOnAdd() {
2211
- if (isDefined(this._clearSearchOnAdd)) {
2212
- return this._clearSearchOnAdd;
2213
- }
2214
- else if (isDefined(this.config.clearSearchOnAdd)) {
2215
- return this.config.clearSearchOnAdd;
2216
- }
2217
- return this.closeOnSelect;
2218
- }
2219
- set clearSearchOnAdd(value) {
2220
- this._clearSearchOnAdd = value;
2221
- }
2222
- get deselectOnClick() {
2223
- if (isDefined(this._deselectOnClick)) {
2224
- return this._deselectOnClick;
2225
- }
2226
- else if (isDefined(this.config.deselectOnClick)) {
2227
- return this.config.deselectOnClick;
2228
- }
2229
- return this.multiple;
2230
- }
2231
- set deselectOnClick(value) {
2232
- this._deselectOnClick = value;
2222
+ return this.readonly() || this._disabled();
2233
2223
  }
2234
2224
  get selectedItems() {
2235
2225
  return this.itemsList.selectedItems;
@@ -2241,8 +2231,8 @@ class NgSelectComponent {
2241
2231
  return this.selectedItems.length > 0;
2242
2232
  }
2243
2233
  get currentPanelPosition() {
2244
- if (this.dropdownPanel) {
2245
- return this.dropdownPanel.currentPosition;
2234
+ if (this.dropdownPanel()) {
2235
+ return this.dropdownPanel().currentPosition;
2246
2236
  }
2247
2237
  return undefined;
2248
2238
  }
@@ -2251,20 +2241,20 @@ class NgSelectComponent {
2251
2241
  return false;
2252
2242
  }
2253
2243
  const term = this.searchTerm.toLowerCase().trim();
2254
- return (this.addTag &&
2244
+ return (this.addTag() &&
2255
2245
  !this.itemsList.filteredItems.some((x) => x.label.toLowerCase() === term) &&
2256
- ((!this.hideSelected && this.isOpen) || !this.selectedItems.some((x) => x.label.toLowerCase() === term)) &&
2257
- !this.loading);
2246
+ ((!this.hideSelected() && this.isOpen()) || !this.selectedItems.some((x) => x.label.toLowerCase() === term)) &&
2247
+ !this.loading());
2258
2248
  }
2259
2249
  get _editableSearchTerm() {
2260
- return this.editableSearchTerm && !this.multiple;
2250
+ return this.editableSearchTerm() && !this.multiple();
2261
2251
  }
2262
2252
  get _isTypeahead() {
2263
- return this.typeahead && this.typeahead.observers.length > 0;
2253
+ return this.typeahead() && this.typeahead().observed;
2264
2254
  }
2265
2255
  get _validTerm() {
2266
2256
  const term = this.searchTerm?.trim();
2267
- return term && term.length >= this.minTermLength;
2257
+ return term && term.length >= this.minTermLength();
2268
2258
  }
2269
2259
  ngOnInit() {
2270
2260
  this._handleKeyPresses();
@@ -2275,6 +2265,7 @@ class NgSelectComponent {
2275
2265
  this.itemsList.clearSelected();
2276
2266
  }
2277
2267
  if (changes.items) {
2268
+ this._itemsAreUsed = true;
2278
2269
  this._setItems(changes.items.currentValue || []);
2279
2270
  }
2280
2271
  if (changes.isOpen) {
@@ -2282,7 +2273,7 @@ class NgSelectComponent {
2282
2273
  }
2283
2274
  if (changes.groupBy) {
2284
2275
  if (!changes.items) {
2285
- this._setItems([...this.items]);
2276
+ this._setItems([...this.items()]);
2286
2277
  }
2287
2278
  }
2288
2279
  if (changes.inputAttrs) {
@@ -2306,7 +2297,7 @@ class NgSelectComponent {
2306
2297
  handleKeyDown($event) {
2307
2298
  const keyName = $event.key;
2308
2299
  if (Object.values(KeyCode).includes(keyName)) {
2309
- if (this.keyDownFn($event) === false) {
2300
+ if (this.keyDownFn()($event) === false) {
2310
2301
  return;
2311
2302
  }
2312
2303
  this.handleKeyCode($event);
@@ -2317,7 +2308,7 @@ class NgSelectComponent {
2317
2308
  }
2318
2309
  handleKeyCode($event) {
2319
2310
  const target = $event.target;
2320
- if (this.clearButton && this.clearButton.nativeElement === target) {
2311
+ if (this.clearButton() && this.clearButton().nativeElement === target) {
2321
2312
  this.handleKeyCodeClear($event);
2322
2313
  }
2323
2314
  else {
@@ -2359,7 +2350,10 @@ class NgSelectComponent {
2359
2350
  }
2360
2351
  }
2361
2352
  handleMousedown($event) {
2362
- if (this.preventToggleOnRightClick && $event.button === 2) {
2353
+ if (this.disabled) {
2354
+ return;
2355
+ }
2356
+ if (this.preventToggleOnRightClick() && $event.button === 2) {
2363
2357
  return false;
2364
2358
  }
2365
2359
  const target = $event.target;
@@ -2380,7 +2374,7 @@ class NgSelectComponent {
2380
2374
  if (!this.focused) {
2381
2375
  this.focus();
2382
2376
  }
2383
- if (this.searchable) {
2377
+ if (this.searchable()) {
2384
2378
  this.open();
2385
2379
  }
2386
2380
  else {
@@ -2388,7 +2382,7 @@ class NgSelectComponent {
2388
2382
  }
2389
2383
  }
2390
2384
  handleArrowClick() {
2391
- if (this.isOpen) {
2385
+ if (this.isOpen()) {
2392
2386
  this.close();
2393
2387
  }
2394
2388
  else {
@@ -2406,7 +2400,7 @@ class NgSelectComponent {
2406
2400
  this._onSelectionChanged();
2407
2401
  }
2408
2402
  clearModel() {
2409
- if (!this.clearable) {
2403
+ if (!this.clearable()) {
2410
2404
  return;
2411
2405
  }
2412
2406
  this.itemsList.clearSelected();
@@ -2424,11 +2418,11 @@ class NgSelectComponent {
2424
2418
  this._onTouched = fn;
2425
2419
  }
2426
2420
  setDisabledState(state) {
2427
- this._disabled = state;
2421
+ this._disabled.set(state);
2428
2422
  this._cd.markForCheck();
2429
2423
  }
2430
2424
  toggle() {
2431
- if (!this.isOpen) {
2425
+ if (!this.isOpen()) {
2432
2426
  this.open();
2433
2427
  }
2434
2428
  else {
@@ -2436,14 +2430,14 @@ class NgSelectComponent {
2436
2430
  }
2437
2431
  }
2438
2432
  open() {
2439
- if (this.disabled || this.isOpen || this._manualOpen) {
2433
+ if (this.disabled || this.isOpen() || this._manualOpen) {
2440
2434
  return;
2441
2435
  }
2442
- if (!this._isTypeahead && !this.addTag && this.itemsList.noItemsToSelect) {
2436
+ if (!this._isTypeahead && !this.addTag() && this.itemsList.noItemsToSelect) {
2443
2437
  return;
2444
2438
  }
2445
- this.isOpen = true;
2446
- this.itemsList.markSelectedOrDefault(this.markFirst);
2439
+ this.isOpen.set(true);
2440
+ this.itemsList.markSelectedOrDefault(this.markFirst());
2447
2441
  this.openEvent.emit();
2448
2442
  if (!this.searchTerm) {
2449
2443
  this.focus();
@@ -2451,10 +2445,10 @@ class NgSelectComponent {
2451
2445
  this.detectChanges();
2452
2446
  }
2453
2447
  close() {
2454
- if (!this.isOpen || this._manualOpen) {
2448
+ if (!this.isOpen() || this._manualOpen) {
2455
2449
  return;
2456
2450
  }
2457
- this.isOpen = false;
2451
+ this.isOpen.set(false);
2458
2452
  this._isComposing = false;
2459
2453
  if (!this._editableSearchTerm) {
2460
2454
  this._clearSearch();
@@ -2471,7 +2465,7 @@ class NgSelectComponent {
2471
2465
  if (!item || item.disabled || this.disabled) {
2472
2466
  return;
2473
2467
  }
2474
- if (this.deselectOnClick && item.selected) {
2468
+ if (this.deselectOnClickValue() && item.selected) {
2475
2469
  this.unselect(item);
2476
2470
  }
2477
2471
  else {
@@ -2484,24 +2478,24 @@ class NgSelectComponent {
2484
2478
  select(item) {
2485
2479
  if (!item.selected) {
2486
2480
  this.itemsList.select(item);
2487
- if (this.clearSearchOnAdd && !this._editableSearchTerm) {
2481
+ if (this.clearSearchOnAddValue() && !this._editableSearchTerm) {
2488
2482
  this._clearSearch();
2489
2483
  }
2490
2484
  this._updateNgModel();
2491
- if (this.multiple) {
2485
+ if (this.multiple()) {
2492
2486
  this.addEvent.emit(item.value);
2493
2487
  }
2494
2488
  }
2495
- if (this.closeOnSelect || this.itemsList.noItemsToSelect) {
2489
+ if (this.closeOnSelect() || this.itemsList.noItemsToSelect) {
2496
2490
  this.close();
2497
2491
  }
2498
2492
  this._onSelectionChanged();
2499
2493
  }
2500
2494
  focus() {
2501
- this.searchInput.nativeElement.focus();
2495
+ this.searchInput().nativeElement.focus();
2502
2496
  }
2503
2497
  blur() {
2504
- this.searchInput.nativeElement.blur();
2498
+ this.searchInput().nativeElement.blur();
2505
2499
  }
2506
2500
  unselect(item) {
2507
2501
  if (!item) {
@@ -2515,13 +2509,13 @@ class NgSelectComponent {
2515
2509
  }
2516
2510
  selectTag() {
2517
2511
  let tag;
2518
- if (isFunction(this.addTag)) {
2519
- tag = this.addTag(this.searchTerm);
2512
+ if (isFunction(this.addTag())) {
2513
+ tag = this.addTag()(this.searchTerm);
2520
2514
  }
2521
2515
  else {
2522
- tag = this._primitive ? this.searchTerm : { [this.bindLabel]: this.searchTerm };
2516
+ tag = this._primitive ? this.searchTerm : { [this.bindLabel()]: this.searchTerm };
2523
2517
  }
2524
- const handleTag = (item) => (this._isTypeahead || !this.isOpen ? this.itemsList.mapItem(item, null) : this.itemsList.addItem(item));
2518
+ const handleTag = (item) => (this._isTypeahead || !this.isOpen() ? this.itemsList.mapItem(item, null) : this.itemsList.addItem(item));
2525
2519
  if (isPromise(tag)) {
2526
2520
  tag.then((item) => this.select(handleTag(item))).catch(() => { });
2527
2521
  }
@@ -2530,45 +2524,45 @@ class NgSelectComponent {
2530
2524
  }
2531
2525
  }
2532
2526
  showClear() {
2533
- return this.clearable && (this.hasValue || this.searchTerm) && !this.disabled;
2527
+ return this.clearable() && (this.hasValue || this.searchTerm) && !this.disabled;
2534
2528
  }
2535
2529
  focusOnClear() {
2536
2530
  this.blur();
2537
- if (this.clearButton) {
2538
- this.clearButton.nativeElement.focus();
2531
+ if (this.clearButton()) {
2532
+ this.clearButton().nativeElement.focus();
2539
2533
  }
2540
2534
  }
2541
2535
  showNoItemsFound() {
2542
2536
  const empty = this.itemsList.filteredItems.length === 0;
2543
- return (((empty && !this._isTypeahead && !this.loading) || (empty && this._isTypeahead && this._validTerm && !this.loading)) &&
2537
+ return (((empty && !this._isTypeahead && !this.loading()) || (empty && this._isTypeahead && this._validTerm && !this.loading())) &&
2544
2538
  !this.showAddTag);
2545
2539
  }
2546
2540
  showTypeToSearch() {
2547
2541
  const empty = this.itemsList.filteredItems.length === 0;
2548
- return empty && this._isTypeahead && !this._validTerm && !this.loading;
2542
+ return empty && this._isTypeahead && !this._validTerm && !this.loading();
2549
2543
  }
2550
2544
  onCompositionStart() {
2551
2545
  this._isComposing = true;
2552
2546
  }
2553
2547
  onCompositionEnd(term) {
2554
2548
  this._isComposing = false;
2555
- if (this.searchWhileComposing) {
2549
+ if (this.searchWhileComposing()) {
2556
2550
  return;
2557
2551
  }
2558
2552
  this.filter(term);
2559
2553
  }
2560
2554
  filter(term) {
2561
- if (this._isComposing && !this.searchWhileComposing) {
2555
+ if (this._isComposing && !this.searchWhileComposing()) {
2562
2556
  return;
2563
2557
  }
2564
2558
  this.searchTerm = term;
2565
- if (this._isTypeahead && (this._validTerm || this.minTermLength === 0)) {
2566
- this.typeahead.next(term);
2559
+ if (this._isTypeahead && (this._validTerm || this.minTermLength() === 0)) {
2560
+ this.typeahead().next(term);
2567
2561
  }
2568
2562
  if (!this._isTypeahead) {
2569
2563
  this.itemsList.filter(this.searchTerm);
2570
- if (this.isOpen) {
2571
- this.itemsList.markSelectedOrDefault(this.markFirst);
2564
+ if (this.isOpen()) {
2565
+ this.itemsList.markSelectedOrDefault(this.markFirst());
2572
2566
  }
2573
2567
  }
2574
2568
  this.searchEvent.emit({ term, items: this.itemsList.filteredItems.map((x) => x.value) });
@@ -2588,7 +2582,7 @@ class NgSelectComponent {
2588
2582
  onInputBlur($event) {
2589
2583
  this.element.classList.remove('ng-select-focused');
2590
2584
  this.blurEvent.emit($event);
2591
- if (!this.isOpen && !this.disabled) {
2585
+ if (!this.isOpen() && !this.disabled) {
2592
2586
  this._onTouched();
2593
2587
  }
2594
2588
  if (this._editableSearchTerm) {
@@ -2613,61 +2607,57 @@ class NgSelectComponent {
2613
2607
  }
2614
2608
  _setItems(items) {
2615
2609
  const firstItem = items[0];
2616
- this.bindLabel = this.bindLabel || this._defaultLabel;
2617
- this._primitive = isDefined(firstItem) ? !isObject(firstItem) : this._primitive || this.bindLabel === this._defaultLabel;
2610
+ this.bindLabel.set(this.bindLabel() || this._defaultLabel);
2611
+ this._primitive = isDefined(firstItem) ? !isObject(firstItem) : this._primitive || this.bindLabel() === this._defaultLabel;
2618
2612
  this.itemsList.setItems(items);
2619
2613
  if (items.length > 0 && this.hasValue) {
2620
2614
  this.itemsList.mapSelectedItems();
2621
2615
  }
2622
- if (this.isOpen && isDefined(this.searchTerm) && !this._isTypeahead) {
2616
+ if (this.isOpen() && isDefined(this.searchTerm) && !this._isTypeahead) {
2623
2617
  this.itemsList.filter(this.searchTerm);
2624
2618
  }
2625
- if (this._isTypeahead || this.isOpen) {
2626
- this.itemsList.markSelectedOrDefault(this.markFirst);
2619
+ if (this._isTypeahead || this.isOpen()) {
2620
+ this.itemsList.markSelectedOrDefault(this.markFirst());
2627
2621
  }
2628
2622
  }
2629
2623
  _setItemsFromNgOptions() {
2630
2624
  const mapNgOptions = (options) => {
2631
- this.items = options.map((option) => ({
2632
- $ngOptionValue: option.value,
2625
+ const items = options.map((option) => ({
2626
+ $ngOptionValue: option.value(),
2633
2627
  $ngOptionLabel: option.elementRef.nativeElement.innerHTML,
2634
- disabled: option.disabled,
2635
- }));
2636
- this.itemsList.setItems(this.items);
2628
+ disabled: option.disabled(),
2629
+ })) ?? [];
2630
+ this.items.set(items);
2631
+ this.itemsList.setItems(items);
2637
2632
  if (this.hasValue) {
2638
2633
  this.itemsList.mapSelectedItems();
2639
2634
  }
2640
- this.detectChanges();
2641
2635
  };
2642
- const handleOptionChange = () => {
2643
- const changedOrDestroyed = merge(this.ngOptions.changes, this._destroy$);
2644
- merge(...this.ngOptions.map((option) => option.stateChange$))
2645
- .pipe(takeUntil(changedOrDestroyed))
2646
- .subscribe((option) => {
2636
+ const handleOptionChange = (options) => {
2637
+ return merge(...options.map((option) => option.stateChange$)).pipe(tap((option) => {
2647
2638
  const item = this.itemsList.findItem(option.value);
2648
2639
  item.disabled = option.disabled;
2649
2640
  item.label = option.label || item.label;
2650
- this._cd.detectChanges();
2651
- });
2641
+ }));
2652
2642
  };
2653
- this.ngOptions.changes.pipe(startWith(this.ngOptions), takeUntil(this._destroy$)).subscribe((options) => {
2654
- this.bindLabel = this._defaultLabel;
2643
+ this.ngOptionsObservable.pipe(startWith(this.ngOptions()), takeUntil(this._destroy$), tap((options) => {
2644
+ this.bindLabel.set(this._defaultLabel);
2655
2645
  mapNgOptions(options);
2656
- handleOptionChange();
2657
- });
2646
+ this._cd.detectChanges();
2647
+ }), switchMap((options) => handleOptionChange(options))).subscribe();
2658
2648
  }
2659
2649
  _isValidWriteValue(value) {
2660
- if (!isDefined(value) || (this.multiple && value === '') || (Array.isArray(value) && value.length === 0)) {
2650
+ if (!isDefined(value) || (this.multiple() && value === '') || (Array.isArray(value) && value.length === 0)) {
2661
2651
  return false;
2662
2652
  }
2663
2653
  const validateBinding = (item) => {
2664
- if (!isDefined(this.compareWith) && isObject(item) && this.bindValue) {
2654
+ if (!isDefined(this.compareWith()) && isObject(item) && this.bindValue()) {
2665
2655
  this._console.warn(`Setting object(${JSON.stringify(item)}) as your model with bindValue is not allowed unless [compareWith] is used.`);
2666
2656
  return false;
2667
2657
  }
2668
2658
  return true;
2669
2659
  };
2670
- if (this.multiple) {
2660
+ if (this.multiple()) {
2671
2661
  if (!Array.isArray(value)) {
2672
2662
  this._console.warn('Multiple select ngModel should be array.');
2673
2663
  return false;
@@ -2689,20 +2679,20 @@ class NgSelectComponent {
2689
2679
  }
2690
2680
  else {
2691
2681
  const isValObject = isObject(val);
2692
- const isPrimitive = !isValObject && !this.bindValue;
2682
+ const isPrimitive = !isValObject && !this.bindValue();
2693
2683
  if (isValObject || isPrimitive) {
2694
2684
  this.itemsList.select(this.itemsList.mapItem(val, null));
2695
2685
  }
2696
- else if (this.bindValue) {
2686
+ else if (this.bindValue()) {
2697
2687
  item = {
2698
- [this.bindLabel]: null,
2699
- [this.bindValue]: val,
2688
+ [this.bindLabel()]: null,
2689
+ [this.bindValue()]: val,
2700
2690
  };
2701
2691
  this.itemsList.select(this.itemsList.mapItem(item, null));
2702
2692
  }
2703
2693
  }
2704
2694
  };
2705
- if (this.multiple) {
2695
+ if (this.multiple()) {
2706
2696
  ngModel.forEach((item) => select(item));
2707
2697
  }
2708
2698
  else {
@@ -2710,7 +2700,7 @@ class NgSelectComponent {
2710
2700
  }
2711
2701
  }
2712
2702
  _handleKeyPresses() {
2713
- if (this.searchable) {
2703
+ if (this.searchable()) {
2714
2704
  return;
2715
2705
  }
2716
2706
  this._keyPress$
@@ -2718,7 +2708,7 @@ class NgSelectComponent {
2718
2708
  .subscribe((term) => {
2719
2709
  const item = this.itemsList.findByLabel(term);
2720
2710
  if (item) {
2721
- if (this.isOpen) {
2711
+ if (this.isOpen()) {
2722
2712
  this.itemsList.markItem(item);
2723
2713
  this._scrollToMarked();
2724
2714
  this._cd.markForCheck();
@@ -2731,14 +2721,14 @@ class NgSelectComponent {
2731
2721
  });
2732
2722
  }
2733
2723
  _setInputAttributes() {
2734
- const input = this.searchInput.nativeElement;
2724
+ const input = this.searchInput().nativeElement;
2735
2725
  const attributes = {
2736
2726
  type: 'text',
2737
2727
  autocorrect: 'off',
2738
2728
  autocapitalize: 'off',
2739
2729
  autocomplete: 'off',
2740
2730
  'aria-controls': this.dropdownId,
2741
- ...this.inputAttrs,
2731
+ ...this.inputAttrs(),
2742
2732
  };
2743
2733
  for (const key of Object.keys(attributes)) {
2744
2734
  input.setAttribute(key, attributes[key]);
@@ -2750,14 +2740,14 @@ class NgSelectComponent {
2750
2740
  _updateNgModel() {
2751
2741
  const model = [];
2752
2742
  for (const item of this.selectedItems) {
2753
- if (this.bindValue) {
2743
+ if (this.bindValue()) {
2754
2744
  let value = null;
2755
2745
  if (item.children) {
2756
- const groupKey = this.groupValue ? this.bindValue : this.groupBy;
2757
- value = item.value[groupKey || this.groupBy];
2746
+ const groupKey = this.groupValue() ? this.bindValue() : this.groupBy();
2747
+ value = item.value[groupKey || this.groupBy()];
2758
2748
  }
2759
2749
  else {
2760
- value = this.itemsList.resolveNested(item.value, this.bindValue);
2750
+ value = this.itemsList.resolveNested(item.value, this.bindValue());
2761
2751
  }
2762
2752
  model.push(value);
2763
2753
  }
@@ -2766,7 +2756,7 @@ class NgSelectComponent {
2766
2756
  }
2767
2757
  }
2768
2758
  const selected = this.selectedItems.map((x) => x.value);
2769
- if (this.multiple) {
2759
+ if (this.multiple()) {
2770
2760
  this._onChange(model);
2771
2761
  this.changeEvent.emit(selected);
2772
2762
  }
@@ -2786,39 +2776,40 @@ class NgSelectComponent {
2786
2776
  _changeSearch(searchTerm) {
2787
2777
  this.searchTerm = searchTerm;
2788
2778
  if (this._isTypeahead) {
2789
- this.typeahead.next(searchTerm);
2779
+ this.typeahead().next(searchTerm);
2790
2780
  }
2791
2781
  }
2792
2782
  _scrollToMarked() {
2793
- if (!this.isOpen || !this.dropdownPanel) {
2783
+ if (!this.isOpen() || !this.dropdownPanel()) {
2794
2784
  return;
2795
2785
  }
2796
- this.dropdownPanel.scrollTo(this.itemsList.markedItem);
2786
+ this.dropdownPanel().scrollTo(this.itemsList.markedItem);
2797
2787
  }
2798
2788
  _scrollToTag() {
2799
- if (!this.isOpen || !this.dropdownPanel) {
2789
+ if (!this.isOpen() || !this.dropdownPanel()) {
2800
2790
  return;
2801
2791
  }
2802
- this.dropdownPanel.scrollToTag();
2792
+ this.dropdownPanel().scrollToTag();
2803
2793
  }
2804
2794
  _onSelectionChanged() {
2805
- if (this.isOpen && this.deselectOnClick && this.appendTo) {
2795
+ const appendTo = this.appendTo() ?? this.config.appendTo;
2796
+ if (this.isOpen() && this.deselectOnClickValue() && appendTo) {
2806
2797
  // Make sure items are rendered.
2807
2798
  this._cd.detectChanges();
2808
- this.dropdownPanel.adjustPosition();
2799
+ this.dropdownPanel().adjustPosition();
2809
2800
  }
2810
2801
  }
2811
2802
  _handleTab($event) {
2812
- if (this.isOpen === false) {
2803
+ if (this.isOpen() === false) {
2813
2804
  if (this.showClear() && !$event.shiftKey && this.tabFocusOnClear()) {
2814
2805
  this.focusOnClear();
2815
2806
  $event.preventDefault();
2816
2807
  }
2817
- else if (!this.addTag) {
2808
+ else if (!this.addTag()) {
2818
2809
  return;
2819
2810
  }
2820
2811
  }
2821
- if (this.selectOnTab) {
2812
+ if (this.selectOnTab()) {
2822
2813
  if (this.itemsList.markedItem) {
2823
2814
  this.toggleItem(this.itemsList.markedItem);
2824
2815
  $event.preventDefault();
@@ -2836,7 +2827,8 @@ class NgSelectComponent {
2836
2827
  }
2837
2828
  }
2838
2829
  _handleEnter($event) {
2839
- if (this.isOpen || this._manualOpen) {
2830
+ const openOnEnter = this.openOnEnter() ?? this.config.openOnEnter;
2831
+ if (this.isOpen() || this._manualOpen) {
2840
2832
  if (this.itemsList.markedItem) {
2841
2833
  this.toggleItem(this.itemsList.markedItem);
2842
2834
  }
@@ -2844,7 +2836,7 @@ class NgSelectComponent {
2844
2836
  this.selectTag();
2845
2837
  }
2846
2838
  }
2847
- else if (this.openOnEnter) {
2839
+ else if (openOnEnter) {
2848
2840
  this.open();
2849
2841
  }
2850
2842
  else {
@@ -2853,7 +2845,7 @@ class NgSelectComponent {
2853
2845
  $event.preventDefault();
2854
2846
  }
2855
2847
  _handleSpace($event) {
2856
- if (this.isOpen || this._manualOpen) {
2848
+ if (this.isOpen() || this._manualOpen) {
2857
2849
  return;
2858
2850
  }
2859
2851
  this.open();
@@ -2872,7 +2864,7 @@ class NgSelectComponent {
2872
2864
  $event.preventDefault();
2873
2865
  }
2874
2866
  _handleArrowUp($event) {
2875
- if (!this.isOpen) {
2867
+ if (!this.isOpen()) {
2876
2868
  return;
2877
2869
  }
2878
2870
  if (this._nextItemIsTag(-1)) {
@@ -2887,13 +2879,13 @@ class NgSelectComponent {
2887
2879
  }
2888
2880
  _nextItemIsTag(nextStep) {
2889
2881
  const nextIndex = this.itemsList.markedIndex + nextStep;
2890
- return (this.addTag && this.searchTerm && this.itemsList.markedItem && (nextIndex < 0 || nextIndex === this.itemsList.filteredItems.length));
2882
+ return (this.addTag() && this.searchTerm && this.itemsList.markedItem && (nextIndex < 0 || nextIndex === this.itemsList.filteredItems.length));
2891
2883
  }
2892
2884
  _handleBackspace() {
2893
- if (this.searchTerm || !this.clearable || !this.clearOnBackspace || !this.hasValue) {
2885
+ if (this.searchTerm || !this.clearable() || !this.clearOnBackspace() || !this.hasValue) {
2894
2886
  return;
2895
2887
  }
2896
- if (this.multiple) {
2888
+ if (this.multiple()) {
2897
2889
  this.unselect(this.itemsList.lastSelectedItem);
2898
2890
  }
2899
2891
  else {
@@ -2901,19 +2893,9 @@ class NgSelectComponent {
2901
2893
  }
2902
2894
  }
2903
2895
  _mergeGlobalConfig(config) {
2904
- this.placeholder = this.placeholder || config.placeholder;
2905
- this.fixedPlaceholder = this.fixedPlaceholder || config.fixedPlaceholder;
2906
- this.notFoundText = this.notFoundText || config.notFoundText;
2907
- this.typeToSearchText = this.typeToSearchText || config.typeToSearchText;
2908
- this.addTagText = this.addTagText || config.addTagText;
2909
- this.loadingText = this.loadingText || config.loadingText;
2910
- this.clearAllText = this.clearAllText || config.clearAllText;
2911
- this.virtualScroll = this.getVirtualScroll(config);
2912
- this.openOnEnter = isDefined(this.openOnEnter) ? this.openOnEnter : config.openOnEnter;
2913
- this.appendTo = this.appendTo || config.appendTo;
2914
- this.bindValue = this.bindValue || config.bindValue;
2915
- this.bindLabel = this.bindLabel || config.bindLabel;
2916
- this.appearance = this.appearance || config.appearance;
2896
+ this.bindValue.set(this.bindValue() || config.bindValue);
2897
+ this.bindLabel.set(this.bindLabel() || config.bindLabel);
2898
+ this.appearance.set(this.appearance() || config.appearance);
2917
2899
  this._setTabFocusOnClear();
2918
2900
  }
2919
2901
  /**
@@ -2924,7 +2906,7 @@ class NgSelectComponent {
2924
2906
  * @returns `true` if virtual scroll is enabled, `false` otherwise
2925
2907
  */
2926
2908
  getVirtualScroll(config) {
2927
- return isDefined(this.virtualScroll) ? this.virtualScroll : this.isVirtualScrollDisabled(config);
2909
+ return isDefined(this.virtualScroll) ? this.virtualScroll() : this.isVirtualScrollDisabled(config);
2928
2910
  }
2929
2911
  /**
2930
2912
  * Gets disableVirtualScroll value from input or from config
@@ -2936,15 +2918,15 @@ class NgSelectComponent {
2936
2918
  isVirtualScrollDisabled(config) {
2937
2919
  return isDefined(config.disableVirtualScroll) ? !config.disableVirtualScroll : false;
2938
2920
  }
2939
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgSelectComponent, deps: [{ token: 'class', attribute: true }, { token: 'autofocus', attribute: true }, { token: NgSelectConfig }, { token: SELECTION_MODEL_FACTORY, optional: true }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: ConsoleService }], target: i0.ɵɵFactoryTarget.Component }); }
2940
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: NgSelectComponent, isStandalone: true, selector: "ng-select", inputs: { ariaLabelDropdown: { classPropertyName: "ariaLabelDropdown", publicName: "ariaLabelDropdown", isSignal: false, isRequired: false, transformFunction: null }, bindLabel: { classPropertyName: "bindLabel", publicName: "bindLabel", isSignal: false, isRequired: false, transformFunction: null }, bindValue: { classPropertyName: "bindValue", publicName: "bindValue", isSignal: false, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null }, markFirst: { classPropertyName: "markFirst", publicName: "markFirst", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, fixedPlaceholder: { classPropertyName: "fixedPlaceholder", publicName: "fixedPlaceholder", isSignal: false, isRequired: false, transformFunction: null }, notFoundText: { classPropertyName: "notFoundText", publicName: "notFoundText", isSignal: false, isRequired: false, transformFunction: null }, typeToSearchText: { classPropertyName: "typeToSearchText", publicName: "typeToSearchText", isSignal: false, isRequired: false, transformFunction: null }, preventToggleOnRightClick: { classPropertyName: "preventToggleOnRightClick", publicName: "preventToggleOnRightClick", isSignal: false, isRequired: false, transformFunction: null }, addTagText: { classPropertyName: "addTagText", publicName: "addTagText", isSignal: false, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: false, isRequired: false, transformFunction: null }, clearAllText: { classPropertyName: "clearAllText", publicName: "clearAllText", isSignal: false, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: false, isRequired: false, transformFunction: null }, dropdownPosition: { classPropertyName: "dropdownPosition", publicName: "dropdownPosition", isSignal: false, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: false, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, hideSelected: { classPropertyName: "hideSelected", publicName: "hideSelected", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, selectOnTab: { classPropertyName: "selectOnTab", publicName: "selectOnTab", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, openOnEnter: { classPropertyName: "openOnEnter", publicName: "openOnEnter", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, maxSelectedItems: { classPropertyName: "maxSelectedItems", publicName: "maxSelectedItems", isSignal: false, isRequired: false, transformFunction: numberAttribute }, groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: false, isRequired: false, transformFunction: null }, groupValue: { classPropertyName: "groupValue", publicName: "groupValue", isSignal: false, isRequired: false, transformFunction: null }, bufferAmount: { classPropertyName: "bufferAmount", publicName: "bufferAmount", isSignal: false, isRequired: false, transformFunction: numberAttribute }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, selectableGroup: { classPropertyName: "selectableGroup", publicName: "selectableGroup", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, selectableGroupAsModel: { classPropertyName: "selectableGroupAsModel", publicName: "selectableGroupAsModel", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, searchFn: { classPropertyName: "searchFn", publicName: "searchFn", isSignal: false, isRequired: false, transformFunction: null }, trackByFn: { classPropertyName: "trackByFn", publicName: "trackByFn", isSignal: false, isRequired: false, transformFunction: null }, clearOnBackspace: { classPropertyName: "clearOnBackspace", publicName: "clearOnBackspace", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, labelForId: { classPropertyName: "labelForId", publicName: "labelForId", isSignal: false, isRequired: false, transformFunction: null }, inputAttrs: { classPropertyName: "inputAttrs", publicName: "inputAttrs", isSignal: false, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, tabFocusOnClearButton: { classPropertyName: "tabFocusOnClearButton", publicName: "tabFocusOnClearButton", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, searchWhileComposing: { classPropertyName: "searchWhileComposing", publicName: "searchWhileComposing", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, minTermLength: { classPropertyName: "minTermLength", publicName: "minTermLength", isSignal: false, isRequired: false, transformFunction: numberAttribute }, editableSearchTerm: { classPropertyName: "editableSearchTerm", publicName: "editableSearchTerm", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, ngClass: { classPropertyName: "ngClass", publicName: "ngClass", isSignal: false, isRequired: false, transformFunction: null }, typeahead: { classPropertyName: "typeahead", publicName: "typeahead", isSignal: false, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, addTag: { classPropertyName: "addTag", publicName: "addTag", isSignal: false, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: false, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: false, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: false, isRequired: false, transformFunction: null }, clearSearchOnAdd: { classPropertyName: "clearSearchOnAdd", publicName: "clearSearchOnAdd", isSignal: false, isRequired: false, transformFunction: null }, deselectOnClick: { classPropertyName: "deselectOnClick", publicName: "deselectOnClick", isSignal: false, isRequired: false, transformFunction: null }, keyDownFn: { classPropertyName: "keyDownFn", publicName: "keyDownFn", isSignal: false, isRequired: false, transformFunction: null } }, 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-typeahead": "this.typeahead", "class.ng-select-multiple": "this.multiple", "class.ng-select-taggable": "this.addTag", "class.ng-select-searchable": "this.searchable", "class.ng-select-clearable": "this.clearable", "class.ng-select-opened": "this.isOpen", "class.ng-select": "this.useDefaultClass", "class.ng-select-filtered": "this.filtered", "class.ng-select-single": "this.single", "class.ng-select-disabled": "this.disabled" } }, providers: [
2921
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2922
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: NgSelectComponent, isStandalone: true, selector: "ng-select", inputs: { bindLabel: { classPropertyName: "bindLabel", publicName: "bindLabel", isSignal: true, isRequired: false, transformFunction: null }, bindValue: { classPropertyName: "bindValue", publicName: "bindValue", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelDropdown: { classPropertyName: "ariaLabelDropdown", publicName: "ariaLabelDropdown", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, markFirst: { classPropertyName: "markFirst", publicName: "markFirst", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, fixedPlaceholder: { classPropertyName: "fixedPlaceholder", publicName: "fixedPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, notFoundText: { classPropertyName: "notFoundText", publicName: "notFoundText", isSignal: true, isRequired: false, transformFunction: null }, typeToSearchText: { classPropertyName: "typeToSearchText", publicName: "typeToSearchText", isSignal: true, isRequired: false, transformFunction: null }, preventToggleOnRightClick: { classPropertyName: "preventToggleOnRightClick", publicName: "preventToggleOnRightClick", isSignal: true, isRequired: false, transformFunction: null }, addTagText: { classPropertyName: "addTagText", publicName: "addTagText", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, clearAllText: { classPropertyName: "clearAllText", publicName: "clearAllText", isSignal: true, isRequired: false, transformFunction: null }, dropdownPosition: { classPropertyName: "dropdownPosition", publicName: "dropdownPosition", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, hideSelected: { classPropertyName: "hideSelected", publicName: "hideSelected", isSignal: true, isRequired: false, transformFunction: null }, selectOnTab: { classPropertyName: "selectOnTab", publicName: "selectOnTab", isSignal: true, isRequired: false, transformFunction: null }, openOnEnter: { classPropertyName: "openOnEnter", publicName: "openOnEnter", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedItems: { classPropertyName: "maxSelectedItems", publicName: "maxSelectedItems", isSignal: true, isRequired: false, transformFunction: null }, groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, groupValue: { classPropertyName: "groupValue", publicName: "groupValue", isSignal: true, isRequired: false, transformFunction: null }, bufferAmount: { classPropertyName: "bufferAmount", publicName: "bufferAmount", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, selectableGroup: { classPropertyName: "selectableGroup", publicName: "selectableGroup", isSignal: true, isRequired: false, transformFunction: null }, tabFocusOnClearButton: { classPropertyName: "tabFocusOnClearButton", publicName: "tabFocusOnClearButton", isSignal: true, isRequired: false, transformFunction: null }, selectableGroupAsModel: { classPropertyName: "selectableGroupAsModel", publicName: "selectableGroupAsModel", isSignal: true, isRequired: false, transformFunction: null }, searchFn: { classPropertyName: "searchFn", publicName: "searchFn", isSignal: true, isRequired: false, transformFunction: null }, trackByFn: { classPropertyName: "trackByFn", publicName: "trackByFn", isSignal: true, isRequired: false, transformFunction: null }, clearOnBackspace: { classPropertyName: "clearOnBackspace", publicName: "clearOnBackspace", isSignal: true, isRequired: false, transformFunction: null }, labelForId: { classPropertyName: "labelForId", publicName: "labelForId", isSignal: true, isRequired: false, transformFunction: null }, inputAttrs: { classPropertyName: "inputAttrs", publicName: "inputAttrs", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, searchWhileComposing: { classPropertyName: "searchWhileComposing", publicName: "searchWhileComposing", isSignal: true, isRequired: false, transformFunction: null }, minTermLength: { classPropertyName: "minTermLength", publicName: "minTermLength", isSignal: true, isRequired: false, transformFunction: null }, editableSearchTerm: { classPropertyName: "editableSearchTerm", publicName: "editableSearchTerm", isSignal: true, isRequired: false, transformFunction: null }, ngClass: { classPropertyName: "ngClass", publicName: "ngClass", isSignal: true, isRequired: false, transformFunction: null }, typeahead: { classPropertyName: "typeahead", publicName: "typeahead", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, addTag: { classPropertyName: "addTag", publicName: "addTag", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, clearSearchOnAdd: { classPropertyName: "clearSearchOnAdd", publicName: "clearSearchOnAdd", isSignal: true, isRequired: false, transformFunction: null }, deselectOnClick: { classPropertyName: "deselectOnClick", publicName: "deselectOnClick", isSignal: true, isRequired: false, transformFunction: null }, keyDownFn: { classPropertyName: "keyDownFn", publicName: "keyDownFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { bindLabel: "bindLabelChange", bindValue: "bindValueChange", appearance: "appearanceChange", isOpen: "isOpenChange", blurEvent: "blur", focusEvent: "focus", changeEvent: "change", openEvent: "open", closeEvent: "close", searchEvent: "search", clearEvent: "clear", addEvent: "add", removeEvent: "remove", scroll: "scroll", scrollToEnd: "scrollToEnd", items: "itemsChange" }, host: { listeners: { "keydown": "handleKeyDown($event)" }, properties: { "class.ng-select-typeahead": "this.typeahead", "class.ng-select-multiple": "this.multiple", "class.ng-select-taggable": "this.addTag", "class.ng-select-searchable": "this.searchable", "class.ng-select-clearable": "this.clearable", "class.ng-select-opened": "this.isOpen", "class.ng-select": "this.useDefaultClass", "class.ng-select-filtered": "this.filtered", "class.ng-select-single": "this.single", "class.ng-select-disabled": "this.disabled" } }, providers: [
2941
2923
  {
2942
2924
  provide: NG_VALUE_ACCESSOR,
2943
2925
  useExisting: forwardRef(() => NgSelectComponent),
2944
2926
  multi: true,
2945
2927
  },
2946
2928
  NgDropdownPanelService,
2947
- ], queries: [{ propertyName: "optionTemplate", first: true, predicate: NgOptionTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "optgroupTemplate", first: true, predicate: NgOptgroupTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "labelTemplate", first: true, predicate: NgLabelTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "multiLabelTemplate", first: true, predicate: NgMultiLabelTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "headerTemplate", first: true, predicate: NgHeaderTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "footerTemplate", first: true, predicate: NgFooterTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "notFoundTemplate", first: true, predicate: NgNotFoundTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "placeholderTemplate", first: true, predicate: NgPlaceholderTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "typeToSearchTemplate", first: true, predicate: NgTypeToSearchTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "loadingTextTemplate", first: true, predicate: NgLoadingTextTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "tagTemplate", first: true, predicate: NgTagTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "loadingSpinnerTemplate", first: true, predicate: NgLoadingSpinnerTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "clearButtonTemplate", first: true, predicate: NgClearButtonTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "ngOptions", predicate: NgOptionComponent, descendants: true }], viewQueries: [{ propertyName: "dropdownPanel", first: true, predicate: i0.forwardRef(() => NgDropdownPanelComponent), 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: "<div\n\t(mousedown)=\"handleMousedown($event)\"\n\t[class.ng-appearance-outline]=\"appearance === 'outline'\"\n\t[class.ng-has-value]=\"hasValue\"\n\tclass=\"ng-select-container\">\n\t<div class=\"ng-value-container\">\n\t\t@if ((selectedItems.length === 0 && !searchTerm) || fixedPlaceholder) {\n\t\t\t<ng-template #defaultPlaceholderTemplate>\n\t\t\t\t<div class=\"ng-placeholder\">{{ placeholder }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template [ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\"> </ng-template>\n\t\t}\n\n\t\t@if ((!multiLabelTemplate || !multiple) && selectedItems.length > 0) {\n\t\t\t@for (item of selectedItems; track trackByOption($index, item)) {\n\t\t\t\t<div [class.ng-value-disabled]=\"item.disabled\" class=\"ng-value\">\n\t\t\t\t\t<ng-template #defaultLabelTemplate>\n\t\t\t\t\t\t<span class=\"ng-value-icon left\" (click)=\"unselect(item)\" aria-hidden=\"true\">\u00D7</span>\n\t\t\t\t\t\t<span class=\"ng-value-label\" [ngItemLabel]=\"item.label\" [escape]=\"escapeHTML\"></span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]=\"labelTemplate || defaultLabelTemplate\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ item: item.value, clear: clearItem, label: item.label }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\n\t\t@if (multiple && multiLabelTemplate && selectedValues.length > 0) {\n\t\t\t<ng-template [ngTemplateOutlet]=\"multiLabelTemplate\" [ngTemplateOutletContext]=\"{ items: selectedValues, clear: clearItem }\">\n\t\t\t</ng-template>\n\t\t}\n\n\t\t<div class=\"ng-input\">\n\t\t\t<input\n\t\t\t\t#searchInput\n\t\t\t\t(blur)=\"onInputBlur($event)\"\n\t\t\t\t(change)=\"$event.stopPropagation()\"\n\t\t\t\t(compositionend)=\"onCompositionEnd(searchInput.value)\"\n\t\t\t\t(compositionstart)=\"onCompositionStart()\"\n\t\t\t\t(focus)=\"onInputFocus($event)\"\n\t\t\t\t(input)=\"filter(searchInput.value)\"\n\t\t\t\t[attr.aria-activedescendant]=\"isOpen ? itemsList?.markedItem?.htmlId : null\"\n\t\t\t\t[attr.aria-controls]=\"isOpen ? dropdownId : null\"\n\t\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t\t[attr.id]=\"labelForId\"\n\t\t\t\t[attr.tabindex]=\"tabIndex\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[readOnly]=\"!searchable || itemsList.maxItemsSelected\"\n\t\t\t\t[value]=\"searchTerm ?? ''\"\n\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\trole=\"combobox\" />\n\t\t</div>\n\t</div>\n\n\t@if (loading) {\n\t\t<ng-template #defaultLoadingSpinnerTemplate>\n\t\t\t<div class=\"ng-spinner-loader\"></div>\n\t\t</ng-template>\n\t\t<ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate || defaultLoadingSpinnerTemplate\"></ng-template>\n\t}\n\n\t@if (showClear()) {\n\t\t@if (clearButtonTemplate) {\n\t\t\t<ng-container [ngTemplateOutlet]=\"clearButtonTemplate\"></ng-container>\n\t\t} @else {\n\t\t\t<span\n\t\t\t\tclass=\"ng-clear-wrapper\"\n\t\t\t\trole=\"button\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t[attr.tabindex]=\"tabFocusOnClear() ? 0 : -1\"\n\t\t\t\ttitle=\"{{ clearAllText }}\"\n\t\t\t\t#clearButton>\n\t\t\t\t<span class=\"ng-clear\" aria-hidden=\"true\">\u00D7</span>\n\t\t\t</span>\n\t\t}\n\t}\n\n\t<span class=\"ng-arrow-wrapper\">\n\t\t<span class=\"ng-arrow\"></span>\n\t</span>\n</div>\n\n@if (isOpen) {\n\t<ng-dropdown-panel\n\t\tclass=\"ng-dropdown-panel\"\n\t\t[virtualScroll]=\"virtualScroll\"\n\t\t[bufferAmount]=\"bufferAmount\"\n\t\t[appendTo]=\"appendTo\"\n\t\t[position]=\"dropdownPosition\"\n\t\t[headerTemplate]=\"headerTemplate\"\n\t\t[footerTemplate]=\"footerTemplate\"\n\t\t[filterValue]=\"searchTerm\"\n\t\t[items]=\"itemsList.filteredItems\"\n\t\t[markedItem]=\"itemsList.markedItem\"\n\t\t(update)=\"viewPortItems = $event\"\n\t\t(scroll)=\"scroll.emit($event)\"\n\t\t(scrollToEnd)=\"scrollToEnd.emit($event)\"\n\t\t(outsideClick)=\"close()\"\n\t\t[class.ng-select-multiple]=\"multiple\"\n\t\t[ngClass]=\"appendTo ? (ngClass ? ngClass : classes) : null\"\n\t\t[id]=\"dropdownId\"\n\t\t[ariaLabelDropdown]=\"ariaLabelDropdown\">\n\t\t<ng-container>\n\t\t\t@for (item of viewPortItems; track trackByOption($index, item)) {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"ng-option\"\n\t\t\t\t\t[attr.role]=\"item.children ? 'group' : 'option'\"\n\t\t\t\t\t(click)=\"toggleItem(item)\"\n\t\t\t\t\t(mouseover)=\"onItemHover(item)\"\n\t\t\t\t\t[class.ng-option-disabled]=\"item.disabled\"\n\t\t\t\t\t[class.ng-option-selected]=\"item.selected\"\n\t\t\t\t\t[class.ng-optgroup]=\"item.children\"\n\t\t\t\t\t[class.ng-option]=\"!item.children\"\n\t\t\t\t\t[class.ng-option-child]=\"!!item.parent\"\n\t\t\t\t\t[class.ng-option-marked]=\"item === itemsList.markedItem\"\n\t\t\t\t\t[attr.aria-selected]=\"item.selected\"\n\t\t\t\t\t[attr.id]=\"item?.htmlId\"\n\t\t\t\t\t[attr.aria-setsize]=\"itemsList.filteredItems.length\"\n\t\t\t\t\t[attr.aria-posinset]=\"item.index + 1\">\n\t\t\t\t\t<ng-template #defaultOptionTemplate>\n\t\t\t\t\t\t<span class=\"ng-option-label\" [ngItemLabel]=\"item.label\" [escape]=\"escapeHTML\"></span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]=\"\n\t\t\t\t\t\t\titem.children ? optgroupTemplate || defaultOptionTemplate : optionTemplate || defaultOptionTemplate\n\t\t\t\t\t\t\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ item: item.value, item$: item, index: item.index, searchTerm: searchTerm }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@if (showAddTag) {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"ng-option\"\n\t\t\t\t\t[class.ng-option-marked]=\"!itemsList.markedItem\"\n\t\t\t\t\t(mouseover)=\"itemsList.unmarkItem()\"\n\t\t\t\t\trole=\"option\"\n\t\t\t\t\t(click)=\"selectTag()\">\n\t\t\t\t\t<ng-template #defaultTagTemplate>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t><span class=\"ng-tag-label\">{{ addTagText }}</span\n\t\t\t\t\t\t\t>\"{{ searchTerm }}\"</span\n\t\t\t\t\t\t>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]=\"tagTemplate || defaultTagTemplate\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</ng-container>\n\t\t@if (showNoItemsFound()) {\n\t\t\t<ng-template #defaultNotFoundTemplate>\n\t\t\t\t<div class=\"ng-option ng-option-disabled\">{{ notFoundText }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]=\"notFoundTemplate || defaultNotFoundTemplate\"\n\t\t\t\t[ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n\t\t\t</ng-template>\n\t\t}\n\t\t@if (showTypeToSearch()) {\n\t\t\t<ng-template #defaultTypeToSearchTemplate>\n\t\t\t\t<div class=\"ng-option ng-option-disabled\">{{ typeToSearchText }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template [ngTemplateOutlet]=\"typeToSearchTemplate || defaultTypeToSearchTemplate\"></ng-template>\n\t\t}\n\t\t@if (loading && itemsList.filteredItems.length === 0) {\n\t\t\t<ng-template #defaultLoadingTextTemplate>\n\t\t\t\t<div class=\"ng-option ng-option-disabled\">{{ loadingText }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]=\"loadingTextTemplate || defaultLoadingTextTemplate\"\n\t\t\t\t[ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n\t\t\t</ng-template>\n\t\t}\n\t</ng-dropdown-panel>\n}\n\n<!-- Always present aria-live region -->\n<div aria-atomic=\"true\" aria-live=\"polite\" class=\"ng-visually-hidden\" role=\"status\">\n\t@if (isOpen && showNoItemsFound()) {\n\t\t{{ notFoundText }}\n\t}\n</div>\n", styles: ["@charset \"UTF-8\";.ng-select{position:relative;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .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{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:unset;user-select:unset;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:\"\\200b\"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}.ng-visually-hidden{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0;white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgItemLabelDirective, selector: "[ngItemLabel]", inputs: ["ngItemLabel", "escape"] }, { kind: "component", type: NgDropdownPanelComponent, selector: "ng-dropdown-panel", inputs: ["items", "markedItem", "position", "appendTo", "bufferAmount", "virtualScroll", "headerTemplate", "footerTemplate", "filterValue", "ariaLabelDropdown"], outputs: ["update", "scroll", "scrollToEnd", "outsideClick"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2929
+ ], queries: [{ propertyName: "optionTemplate", first: true, predicate: NgOptionTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "optgroupTemplate", first: true, predicate: NgOptgroupTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: NgLabelTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "multiLabelTemplate", first: true, predicate: NgMultiLabelTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: NgHeaderTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: NgFooterTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "notFoundTemplate", first: true, predicate: NgNotFoundTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "placeholderTemplate", first: true, predicate: NgPlaceholderTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "typeToSearchTemplate", first: true, predicate: NgTypeToSearchTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "loadingTextTemplate", first: true, predicate: NgLoadingTextTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "tagTemplate", first: true, predicate: NgTagTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "loadingSpinnerTemplate", first: true, predicate: NgLoadingSpinnerTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "clearButtonTemplate", first: true, predicate: NgClearButtonTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "ngOptions", predicate: NgOptionComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "dropdownPanel", first: true, predicate: i0.forwardRef(() => NgDropdownPanelComponent), descendants: true, isSignal: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "clearButton", first: true, predicate: ["clearButton"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div\n\t(mousedown)=\"handleMousedown($event)\"\n\t[class.ng-appearance-outline]=\"appearance() === 'outline'\"\n\t[class.ng-has-value]=\"hasValue\"\n\tclass=\"ng-select-container\">\n\t<div class=\"ng-value-container\">\n\t\t@if ((selectedItems.length === 0 && !searchTerm) || (fixedPlaceholder() ?? config.fixedPlaceholder )) {\n\t\t\t<ng-template #defaultPlaceholderTemplate>\n\t\t\t\t<div class=\"ng-placeholder\">{{ placeholder() ?? config.placeholder }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template [ngTemplateOutlet]=\"placeholderTemplate() || defaultPlaceholderTemplate\"> </ng-template>\n\t\t}\n\n\t\t@if ((!multiLabelTemplate() || !multiple()) && selectedItems.length > 0) {\n\t\t\t@for (item of selectedItems; track trackByOption($index, item)) {\n\t\t\t\t<div [class.ng-value-disabled]=\"item.disabled\" class=\"ng-value\">\n\t\t\t\t\t<ng-template #defaultLabelTemplate>\n\t\t\t\t\t\t<span class=\"ng-value-icon left\" (click)=\"unselect(item)\" aria-hidden=\"true\">\u00D7</span>\n\t\t\t\t\t\t<span class=\"ng-value-label\" [ngItemLabel]=\"item.label\" [escape]=\"escapeHTML\"></span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]=\"labelTemplate() || defaultLabelTemplate\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ item: item.value, clear: clearItem, label: item.label }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\n\t\t@if (multiple() && multiLabelTemplate() && selectedValues.length > 0) {\n\t\t\t<ng-template [ngTemplateOutlet]=\"multiLabelTemplate()\" [ngTemplateOutletContext]=\"{ items: selectedValues, clear: clearItem }\">\n\t\t\t</ng-template>\n\t\t}\n\n\t\t<div class=\"ng-input\">\n\t\t\t<input\n\t\t\t\t#searchInput\n\t\t\t\t(blur)=\"onInputBlur($event)\"\n\t\t\t\t(change)=\"$event.stopPropagation()\"\n\t\t\t\t(compositionend)=\"onCompositionEnd(searchInput.value)\"\n\t\t\t\t(compositionstart)=\"onCompositionStart()\"\n\t\t\t\t(focus)=\"onInputFocus($event)\"\n\t\t\t\t(input)=\"filter(searchInput.value)\"\n\t\t\t\t[attr.aria-activedescendant]=\"isOpen() ? itemsList?.markedItem?.htmlId : null\"\n\t\t\t\t[attr.aria-controls]=\"isOpen() ? dropdownId : null\"\n\t\t\t\t[attr.aria-expanded]=\"isOpen()\"\n\t\t\t\t[attr.aria-label]=\"ariaLabel()\"\n\t\t\t\t[attr.id]=\"labelForId()\"\n\t\t\t\t[attr.tabindex]=\"tabIndex()\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[readOnly]=\"!searchable() || itemsList.maxItemsSelected\"\n\t\t\t\t[value]=\"searchTerm ?? ''\"\n\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\trole=\"combobox\" />\n\t\t</div>\n\t</div>\n\n\t@if (loading()) {\n\t\t<ng-template #defaultLoadingSpinnerTemplate>\n\t\t\t<div class=\"ng-spinner-loader\"></div>\n\t\t</ng-template>\n\t\t<ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate() || defaultLoadingSpinnerTemplate\"></ng-template>\n\t}\n\n\t@if (showClear()) {\n\t\t@if (clearButtonTemplate()) {\n\t\t\t<ng-container [ngTemplateOutlet]=\"clearButtonTemplate()\"></ng-container>\n\t\t} @else {\n\t\t\t<span\n\t\t\t\tclass=\"ng-clear-wrapper\"\n\t\t\t\trole=\"button\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t[attr.tabindex]=\"tabFocusOnClear() ? 0 : -1\"\n\t\t\t\ttitle=\"{{ clearAllText() || config.clearAllText }}\"\n\t\t\t\t#clearButton>\n\t\t\t\t<span class=\"ng-clear\" aria-hidden=\"true\">\u00D7</span>\n\t\t\t</span>\n\t\t}\n\t}\n\n\t<span class=\"ng-arrow-wrapper\">\n\t\t<span class=\"ng-arrow\"></span>\n\t</span>\n</div>\n\n@if (isOpen()) {\n\t@let appendToValue = appendTo() || config.appendTo;\n\t<ng-dropdown-panel\n\t\tclass=\"ng-dropdown-panel\"\n\t\t[virtualScroll]=\"virtualScroll() ?? !config.disableVirtualScroll ?? false\"\n\t\t[bufferAmount]=\"bufferAmount()\"\n\t\t[appendTo]=\"appendToValue\"\n\t\t[position]=\"dropdownPosition()\"\n\t\t[headerTemplate]=\"headerTemplate()\"\n\t\t[footerTemplate]=\"footerTemplate()\"\n\t\t[filterValue]=\"searchTerm\"\n\t\t[items]=\"itemsList.filteredItems\"\n\t\t[markedItem]=\"itemsList.markedItem\"\n\t\t(update)=\"viewPortItems = $event\"\n\t\t(scroll)=\"scroll.emit($event)\"\n\t\t(scrollToEnd)=\"scrollToEnd.emit($event)\"\n\t\t(outsideClick)=\"close()\"\n\t\t[class.ng-select-multiple]=\"multiple()\"\n\t\t[class]=\"appendToValue ? (ngClass() ? ngClass() : classes) : null\"\n\t\t[id]=\"dropdownId\"\n\t\t[ariaLabelDropdown]=\"ariaLabelDropdown()\">\n\t\t<ng-container>\n\t\t\t@for (item of viewPortItems; track trackByOption($index, item)) {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"ng-option\"\n\t\t\t\t\t[attr.role]=\"item.children ? 'group' : 'option'\"\n\t\t\t\t\t(click)=\"toggleItem(item)\"\n\t\t\t\t\t(mouseover)=\"onItemHover(item)\"\n\t\t\t\t\t[class.ng-option-disabled]=\"item.disabled\"\n\t\t\t\t\t[class.ng-option-selected]=\"item.selected\"\n\t\t\t\t\t[class.ng-optgroup]=\"item.children\"\n\t\t\t\t\t[class.ng-option]=\"!item.children\"\n\t\t\t\t\t[class.ng-option-child]=\"!!item.parent\"\n\t\t\t\t\t[class.ng-option-marked]=\"item === itemsList.markedItem\"\n\t\t\t\t\t[attr.aria-selected]=\"item.selected\"\n\t\t\t\t\t[attr.id]=\"item?.htmlId\"\n\t\t\t\t\t[attr.aria-setsize]=\"itemsList.filteredItems.length\"\n\t\t\t\t\t[attr.aria-posinset]=\"item.index + 1\">\n\t\t\t\t\t<ng-template #defaultOptionTemplate>\n\t\t\t\t\t\t<span class=\"ng-option-label\" [ngItemLabel]=\"item.label\" [escape]=\"escapeHTML\"></span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]=\"\n\t\t\t\t\t\t\titem.children ? optgroupTemplate() || defaultOptionTemplate : optionTemplate() || defaultOptionTemplate\n\t\t\t\t\t\t\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ item: item.value, item$: item, index: item.index, searchTerm: searchTerm }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@if (showAddTag) {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"ng-option\"\n\t\t\t\t\t[class.ng-option-marked]=\"!itemsList.markedItem\"\n\t\t\t\t\t(mouseover)=\"itemsList.unmarkItem()\"\n\t\t\t\t\trole=\"option\"\n\t\t\t\t\t(click)=\"selectTag()\">\n\t\t\t\t\t<ng-template #defaultTagTemplate>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t><span class=\"ng-tag-label\">{{ addTagText() || config.addTagText }}</span\n\t\t\t\t\t\t\t>\"{{ searchTerm }}\"</span\n\t\t\t\t\t\t>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]=\"tagTemplate() || defaultTagTemplate\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</ng-container>\n\t\t@if (showNoItemsFound()) {\n\t\t\t<ng-template #defaultNotFoundTemplate>\n\t\t\t\t<div class=\"ng-option ng-option-disabled\">{{ notFoundText() ?? config.notFoundText }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]=\"notFoundTemplate() || defaultNotFoundTemplate\"\n\t\t\t\t[ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n\t\t\t</ng-template>\n\t\t}\n\t\t@if (showTypeToSearch()) {\n\t\t\t<ng-template #defaultTypeToSearchTemplate>\n\t\t\t\t<div class=\"ng-option ng-option-disabled\">{{ typeToSearchText() || config.typeToSearchText }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template [ngTemplateOutlet]=\"typeToSearchTemplate() || defaultTypeToSearchTemplate\"></ng-template>\n\t\t}\n\t\t@if (loading() && itemsList.filteredItems.length === 0) {\n\t\t\t<ng-template #defaultLoadingTextTemplate>\n\t\t\t\t<div class=\"ng-option ng-option-disabled\">{{ loadingText() || config.loadingText }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]=\"loadingTextTemplate() || defaultLoadingTextTemplate\"\n\t\t\t\t[ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n\t\t\t</ng-template>\n\t\t}\n\t</ng-dropdown-panel>\n}\n\n<!-- Always present aria-live region -->\n<div aria-atomic=\"true\" aria-live=\"polite\" class=\"ng-visually-hidden\" role=\"status\">\n\t@if (isOpen && showNoItemsFound()) {\n\t\t{{ notFoundText }}\n\t}\n</div>\n", styles: ["@charset \"UTF-8\";.ng-select{position:relative;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{position:relative;z-index:1001;-webkit-user-select:text;user-select:text;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:unset;user-select:unset;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:\"\\200b\"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}.ng-visually-hidden{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0;white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgItemLabelDirective, selector: "[ngItemLabel]", inputs: ["ngItemLabel", "escape"] }, { kind: "component", type: NgDropdownPanelComponent, 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 }); }
2948
2930
  }
2949
2931
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgSelectComponent, decorators: [{
2950
2932
  type: Component,
@@ -2955,230 +2937,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
2955
2937
  multi: true,
2956
2938
  },
2957
2939
  NgDropdownPanelService,
2958
- ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, NgItemLabelDirective, NgDropdownPanelComponent, NgClass], template: "<div\n\t(mousedown)=\"handleMousedown($event)\"\n\t[class.ng-appearance-outline]=\"appearance === 'outline'\"\n\t[class.ng-has-value]=\"hasValue\"\n\tclass=\"ng-select-container\">\n\t<div class=\"ng-value-container\">\n\t\t@if ((selectedItems.length === 0 && !searchTerm) || fixedPlaceholder) {\n\t\t\t<ng-template #defaultPlaceholderTemplate>\n\t\t\t\t<div class=\"ng-placeholder\">{{ placeholder }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template [ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\"> </ng-template>\n\t\t}\n\n\t\t@if ((!multiLabelTemplate || !multiple) && selectedItems.length > 0) {\n\t\t\t@for (item of selectedItems; track trackByOption($index, item)) {\n\t\t\t\t<div [class.ng-value-disabled]=\"item.disabled\" class=\"ng-value\">\n\t\t\t\t\t<ng-template #defaultLabelTemplate>\n\t\t\t\t\t\t<span class=\"ng-value-icon left\" (click)=\"unselect(item)\" aria-hidden=\"true\">\u00D7</span>\n\t\t\t\t\t\t<span class=\"ng-value-label\" [ngItemLabel]=\"item.label\" [escape]=\"escapeHTML\"></span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]=\"labelTemplate || defaultLabelTemplate\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ item: item.value, clear: clearItem, label: item.label }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\n\t\t@if (multiple && multiLabelTemplate && selectedValues.length > 0) {\n\t\t\t<ng-template [ngTemplateOutlet]=\"multiLabelTemplate\" [ngTemplateOutletContext]=\"{ items: selectedValues, clear: clearItem }\">\n\t\t\t</ng-template>\n\t\t}\n\n\t\t<div class=\"ng-input\">\n\t\t\t<input\n\t\t\t\t#searchInput\n\t\t\t\t(blur)=\"onInputBlur($event)\"\n\t\t\t\t(change)=\"$event.stopPropagation()\"\n\t\t\t\t(compositionend)=\"onCompositionEnd(searchInput.value)\"\n\t\t\t\t(compositionstart)=\"onCompositionStart()\"\n\t\t\t\t(focus)=\"onInputFocus($event)\"\n\t\t\t\t(input)=\"filter(searchInput.value)\"\n\t\t\t\t[attr.aria-activedescendant]=\"isOpen ? itemsList?.markedItem?.htmlId : null\"\n\t\t\t\t[attr.aria-controls]=\"isOpen ? dropdownId : null\"\n\t\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t\t[attr.id]=\"labelForId\"\n\t\t\t\t[attr.tabindex]=\"tabIndex\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[readOnly]=\"!searchable || itemsList.maxItemsSelected\"\n\t\t\t\t[value]=\"searchTerm ?? ''\"\n\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\trole=\"combobox\" />\n\t\t</div>\n\t</div>\n\n\t@if (loading) {\n\t\t<ng-template #defaultLoadingSpinnerTemplate>\n\t\t\t<div class=\"ng-spinner-loader\"></div>\n\t\t</ng-template>\n\t\t<ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate || defaultLoadingSpinnerTemplate\"></ng-template>\n\t}\n\n\t@if (showClear()) {\n\t\t@if (clearButtonTemplate) {\n\t\t\t<ng-container [ngTemplateOutlet]=\"clearButtonTemplate\"></ng-container>\n\t\t} @else {\n\t\t\t<span\n\t\t\t\tclass=\"ng-clear-wrapper\"\n\t\t\t\trole=\"button\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t[attr.tabindex]=\"tabFocusOnClear() ? 0 : -1\"\n\t\t\t\ttitle=\"{{ clearAllText }}\"\n\t\t\t\t#clearButton>\n\t\t\t\t<span class=\"ng-clear\" aria-hidden=\"true\">\u00D7</span>\n\t\t\t</span>\n\t\t}\n\t}\n\n\t<span class=\"ng-arrow-wrapper\">\n\t\t<span class=\"ng-arrow\"></span>\n\t</span>\n</div>\n\n@if (isOpen) {\n\t<ng-dropdown-panel\n\t\tclass=\"ng-dropdown-panel\"\n\t\t[virtualScroll]=\"virtualScroll\"\n\t\t[bufferAmount]=\"bufferAmount\"\n\t\t[appendTo]=\"appendTo\"\n\t\t[position]=\"dropdownPosition\"\n\t\t[headerTemplate]=\"headerTemplate\"\n\t\t[footerTemplate]=\"footerTemplate\"\n\t\t[filterValue]=\"searchTerm\"\n\t\t[items]=\"itemsList.filteredItems\"\n\t\t[markedItem]=\"itemsList.markedItem\"\n\t\t(update)=\"viewPortItems = $event\"\n\t\t(scroll)=\"scroll.emit($event)\"\n\t\t(scrollToEnd)=\"scrollToEnd.emit($event)\"\n\t\t(outsideClick)=\"close()\"\n\t\t[class.ng-select-multiple]=\"multiple\"\n\t\t[ngClass]=\"appendTo ? (ngClass ? ngClass : classes) : null\"\n\t\t[id]=\"dropdownId\"\n\t\t[ariaLabelDropdown]=\"ariaLabelDropdown\">\n\t\t<ng-container>\n\t\t\t@for (item of viewPortItems; track trackByOption($index, item)) {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"ng-option\"\n\t\t\t\t\t[attr.role]=\"item.children ? 'group' : 'option'\"\n\t\t\t\t\t(click)=\"toggleItem(item)\"\n\t\t\t\t\t(mouseover)=\"onItemHover(item)\"\n\t\t\t\t\t[class.ng-option-disabled]=\"item.disabled\"\n\t\t\t\t\t[class.ng-option-selected]=\"item.selected\"\n\t\t\t\t\t[class.ng-optgroup]=\"item.children\"\n\t\t\t\t\t[class.ng-option]=\"!item.children\"\n\t\t\t\t\t[class.ng-option-child]=\"!!item.parent\"\n\t\t\t\t\t[class.ng-option-marked]=\"item === itemsList.markedItem\"\n\t\t\t\t\t[attr.aria-selected]=\"item.selected\"\n\t\t\t\t\t[attr.id]=\"item?.htmlId\"\n\t\t\t\t\t[attr.aria-setsize]=\"itemsList.filteredItems.length\"\n\t\t\t\t\t[attr.aria-posinset]=\"item.index + 1\">\n\t\t\t\t\t<ng-template #defaultOptionTemplate>\n\t\t\t\t\t\t<span class=\"ng-option-label\" [ngItemLabel]=\"item.label\" [escape]=\"escapeHTML\"></span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]=\"\n\t\t\t\t\t\t\titem.children ? optgroupTemplate || defaultOptionTemplate : optionTemplate || defaultOptionTemplate\n\t\t\t\t\t\t\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ item: item.value, item$: item, index: item.index, searchTerm: searchTerm }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@if (showAddTag) {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"ng-option\"\n\t\t\t\t\t[class.ng-option-marked]=\"!itemsList.markedItem\"\n\t\t\t\t\t(mouseover)=\"itemsList.unmarkItem()\"\n\t\t\t\t\trole=\"option\"\n\t\t\t\t\t(click)=\"selectTag()\">\n\t\t\t\t\t<ng-template #defaultTagTemplate>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t><span class=\"ng-tag-label\">{{ addTagText }}</span\n\t\t\t\t\t\t\t>\"{{ searchTerm }}\"</span\n\t\t\t\t\t\t>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]=\"tagTemplate || defaultTagTemplate\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</ng-container>\n\t\t@if (showNoItemsFound()) {\n\t\t\t<ng-template #defaultNotFoundTemplate>\n\t\t\t\t<div class=\"ng-option ng-option-disabled\">{{ notFoundText }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]=\"notFoundTemplate || defaultNotFoundTemplate\"\n\t\t\t\t[ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n\t\t\t</ng-template>\n\t\t}\n\t\t@if (showTypeToSearch()) {\n\t\t\t<ng-template #defaultTypeToSearchTemplate>\n\t\t\t\t<div class=\"ng-option ng-option-disabled\">{{ typeToSearchText }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template [ngTemplateOutlet]=\"typeToSearchTemplate || defaultTypeToSearchTemplate\"></ng-template>\n\t\t}\n\t\t@if (loading && itemsList.filteredItems.length === 0) {\n\t\t\t<ng-template #defaultLoadingTextTemplate>\n\t\t\t\t<div class=\"ng-option ng-option-disabled\">{{ loadingText }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]=\"loadingTextTemplate || defaultLoadingTextTemplate\"\n\t\t\t\t[ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n\t\t\t</ng-template>\n\t\t}\n\t</ng-dropdown-panel>\n}\n\n<!-- Always present aria-live region -->\n<div aria-atomic=\"true\" aria-live=\"polite\" class=\"ng-visually-hidden\" role=\"status\">\n\t@if (isOpen && showNoItemsFound()) {\n\t\t{{ notFoundText }}\n\t}\n</div>\n", styles: ["@charset \"UTF-8\";.ng-select{position:relative;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .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{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:unset;user-select:unset;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:\"\\200b\"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}.ng-visually-hidden{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0;white-space:nowrap}\n"] }]
2959
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2960
- type: Attribute,
2961
- args: ['class']
2962
- }] }, { type: undefined, decorators: [{
2963
- type: Attribute,
2964
- args: ['autofocus']
2965
- }] }, { type: NgSelectConfig }, { type: undefined, decorators: [{
2966
- type: Inject,
2967
- args: [SELECTION_MODEL_FACTORY]
2968
- }, {
2969
- type: Optional
2970
- }] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: ConsoleService }], propDecorators: { ariaLabelDropdown: [{
2971
- type: Input
2972
- }], bindLabel: [{
2973
- type: Input
2974
- }], bindValue: [{
2975
- type: Input
2976
- }], ariaLabel: [{
2977
- type: Input
2978
- }], markFirst: [{
2979
- type: Input,
2980
- args: [{ transform: booleanAttribute }]
2981
- }], placeholder: [{
2982
- type: Input
2983
- }], fixedPlaceholder: [{
2984
- type: Input
2985
- }], notFoundText: [{
2986
- type: Input
2987
- }], typeToSearchText: [{
2988
- type: Input
2989
- }], preventToggleOnRightClick: [{
2990
- type: Input
2991
- }], addTagText: [{
2992
- type: Input
2993
- }], loadingText: [{
2994
- type: Input
2995
- }], clearAllText: [{
2996
- type: Input
2997
- }], appearance: [{
2998
- type: Input
2999
- }], dropdownPosition: [{
3000
- type: Input
3001
- }], appendTo: [{
3002
- type: Input
3003
- }], loading: [{
3004
- type: Input,
3005
- args: [{ transform: booleanAttribute }]
3006
- }], closeOnSelect: [{
3007
- type: Input,
3008
- args: [{ transform: booleanAttribute }]
3009
- }], hideSelected: [{
3010
- type: Input,
3011
- args: [{ transform: booleanAttribute }]
3012
- }], selectOnTab: [{
3013
- type: Input,
3014
- args: [{ transform: booleanAttribute }]
3015
- }], openOnEnter: [{
3016
- type: Input,
3017
- args: [{ transform: booleanAttribute }]
3018
- }], maxSelectedItems: [{
3019
- type: Input,
3020
- args: [{ transform: numberAttribute }]
3021
- }], groupBy: [{
3022
- type: Input
3023
- }], groupValue: [{
3024
- type: Input
3025
- }], bufferAmount: [{
3026
- type: Input,
3027
- args: [{ transform: numberAttribute }]
3028
- }], virtualScroll: [{
3029
- type: Input,
3030
- args: [{ transform: booleanAttribute }]
3031
- }], selectableGroup: [{
3032
- type: Input,
3033
- args: [{ transform: booleanAttribute }]
3034
- }], selectableGroupAsModel: [{
3035
- type: Input,
3036
- args: [{ transform: booleanAttribute }]
3037
- }], searchFn: [{
3038
- type: Input
3039
- }], trackByFn: [{
3040
- type: Input
3041
- }], clearOnBackspace: [{
3042
- type: Input,
3043
- args: [{ transform: booleanAttribute }]
3044
- }], labelForId: [{
3045
- type: Input
3046
- }], inputAttrs: [{
3047
- type: Input
3048
- }], tabIndex: [{
3049
- type: Input,
3050
- args: [{ transform: numberAttribute }]
3051
- }], readonly: [{
3052
- type: Input,
3053
- args: [{ transform: booleanAttribute }]
3054
- }], searchWhileComposing: [{
3055
- type: Input,
3056
- args: [{ transform: booleanAttribute }]
3057
- }], minTermLength: [{
3058
- type: Input,
3059
- args: [{ transform: numberAttribute }]
3060
- }], editableSearchTerm: [{
3061
- type: Input,
3062
- args: [{ transform: booleanAttribute }]
3063
- }], ngClass: [{
3064
- type: Input
3065
- }], typeahead: [{
3066
- type: Input
3067
- }, {
2940
+ ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, NgItemLabelDirective, NgDropdownPanelComponent], template: "<div\n\t(mousedown)=\"handleMousedown($event)\"\n\t[class.ng-appearance-outline]=\"appearance() === 'outline'\"\n\t[class.ng-has-value]=\"hasValue\"\n\tclass=\"ng-select-container\">\n\t<div class=\"ng-value-container\">\n\t\t@if ((selectedItems.length === 0 && !searchTerm) || (fixedPlaceholder() ?? config.fixedPlaceholder )) {\n\t\t\t<ng-template #defaultPlaceholderTemplate>\n\t\t\t\t<div class=\"ng-placeholder\">{{ placeholder() ?? config.placeholder }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template [ngTemplateOutlet]=\"placeholderTemplate() || defaultPlaceholderTemplate\"> </ng-template>\n\t\t}\n\n\t\t@if ((!multiLabelTemplate() || !multiple()) && selectedItems.length > 0) {\n\t\t\t@for (item of selectedItems; track trackByOption($index, item)) {\n\t\t\t\t<div [class.ng-value-disabled]=\"item.disabled\" class=\"ng-value\">\n\t\t\t\t\t<ng-template #defaultLabelTemplate>\n\t\t\t\t\t\t<span class=\"ng-value-icon left\" (click)=\"unselect(item)\" aria-hidden=\"true\">\u00D7</span>\n\t\t\t\t\t\t<span class=\"ng-value-label\" [ngItemLabel]=\"item.label\" [escape]=\"escapeHTML\"></span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]=\"labelTemplate() || defaultLabelTemplate\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ item: item.value, clear: clearItem, label: item.label }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\n\t\t@if (multiple() && multiLabelTemplate() && selectedValues.length > 0) {\n\t\t\t<ng-template [ngTemplateOutlet]=\"multiLabelTemplate()\" [ngTemplateOutletContext]=\"{ items: selectedValues, clear: clearItem }\">\n\t\t\t</ng-template>\n\t\t}\n\n\t\t<div class=\"ng-input\">\n\t\t\t<input\n\t\t\t\t#searchInput\n\t\t\t\t(blur)=\"onInputBlur($event)\"\n\t\t\t\t(change)=\"$event.stopPropagation()\"\n\t\t\t\t(compositionend)=\"onCompositionEnd(searchInput.value)\"\n\t\t\t\t(compositionstart)=\"onCompositionStart()\"\n\t\t\t\t(focus)=\"onInputFocus($event)\"\n\t\t\t\t(input)=\"filter(searchInput.value)\"\n\t\t\t\t[attr.aria-activedescendant]=\"isOpen() ? itemsList?.markedItem?.htmlId : null\"\n\t\t\t\t[attr.aria-controls]=\"isOpen() ? dropdownId : null\"\n\t\t\t\t[attr.aria-expanded]=\"isOpen()\"\n\t\t\t\t[attr.aria-label]=\"ariaLabel()\"\n\t\t\t\t[attr.id]=\"labelForId()\"\n\t\t\t\t[attr.tabindex]=\"tabIndex()\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[readOnly]=\"!searchable() || itemsList.maxItemsSelected\"\n\t\t\t\t[value]=\"searchTerm ?? ''\"\n\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\trole=\"combobox\" />\n\t\t</div>\n\t</div>\n\n\t@if (loading()) {\n\t\t<ng-template #defaultLoadingSpinnerTemplate>\n\t\t\t<div class=\"ng-spinner-loader\"></div>\n\t\t</ng-template>\n\t\t<ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate() || defaultLoadingSpinnerTemplate\"></ng-template>\n\t}\n\n\t@if (showClear()) {\n\t\t@if (clearButtonTemplate()) {\n\t\t\t<ng-container [ngTemplateOutlet]=\"clearButtonTemplate()\"></ng-container>\n\t\t} @else {\n\t\t\t<span\n\t\t\t\tclass=\"ng-clear-wrapper\"\n\t\t\t\trole=\"button\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t[attr.tabindex]=\"tabFocusOnClear() ? 0 : -1\"\n\t\t\t\ttitle=\"{{ clearAllText() || config.clearAllText }}\"\n\t\t\t\t#clearButton>\n\t\t\t\t<span class=\"ng-clear\" aria-hidden=\"true\">\u00D7</span>\n\t\t\t</span>\n\t\t}\n\t}\n\n\t<span class=\"ng-arrow-wrapper\">\n\t\t<span class=\"ng-arrow\"></span>\n\t</span>\n</div>\n\n@if (isOpen()) {\n\t@let appendToValue = appendTo() || config.appendTo;\n\t<ng-dropdown-panel\n\t\tclass=\"ng-dropdown-panel\"\n\t\t[virtualScroll]=\"virtualScroll() ?? !config.disableVirtualScroll ?? false\"\n\t\t[bufferAmount]=\"bufferAmount()\"\n\t\t[appendTo]=\"appendToValue\"\n\t\t[position]=\"dropdownPosition()\"\n\t\t[headerTemplate]=\"headerTemplate()\"\n\t\t[footerTemplate]=\"footerTemplate()\"\n\t\t[filterValue]=\"searchTerm\"\n\t\t[items]=\"itemsList.filteredItems\"\n\t\t[markedItem]=\"itemsList.markedItem\"\n\t\t(update)=\"viewPortItems = $event\"\n\t\t(scroll)=\"scroll.emit($event)\"\n\t\t(scrollToEnd)=\"scrollToEnd.emit($event)\"\n\t\t(outsideClick)=\"close()\"\n\t\t[class.ng-select-multiple]=\"multiple()\"\n\t\t[class]=\"appendToValue ? (ngClass() ? ngClass() : classes) : null\"\n\t\t[id]=\"dropdownId\"\n\t\t[ariaLabelDropdown]=\"ariaLabelDropdown()\">\n\t\t<ng-container>\n\t\t\t@for (item of viewPortItems; track trackByOption($index, item)) {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"ng-option\"\n\t\t\t\t\t[attr.role]=\"item.children ? 'group' : 'option'\"\n\t\t\t\t\t(click)=\"toggleItem(item)\"\n\t\t\t\t\t(mouseover)=\"onItemHover(item)\"\n\t\t\t\t\t[class.ng-option-disabled]=\"item.disabled\"\n\t\t\t\t\t[class.ng-option-selected]=\"item.selected\"\n\t\t\t\t\t[class.ng-optgroup]=\"item.children\"\n\t\t\t\t\t[class.ng-option]=\"!item.children\"\n\t\t\t\t\t[class.ng-option-child]=\"!!item.parent\"\n\t\t\t\t\t[class.ng-option-marked]=\"item === itemsList.markedItem\"\n\t\t\t\t\t[attr.aria-selected]=\"item.selected\"\n\t\t\t\t\t[attr.id]=\"item?.htmlId\"\n\t\t\t\t\t[attr.aria-setsize]=\"itemsList.filteredItems.length\"\n\t\t\t\t\t[attr.aria-posinset]=\"item.index + 1\">\n\t\t\t\t\t<ng-template #defaultOptionTemplate>\n\t\t\t\t\t\t<span class=\"ng-option-label\" [ngItemLabel]=\"item.label\" [escape]=\"escapeHTML\"></span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]=\"\n\t\t\t\t\t\t\titem.children ? optgroupTemplate() || defaultOptionTemplate : optionTemplate() || defaultOptionTemplate\n\t\t\t\t\t\t\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ item: item.value, item$: item, index: item.index, searchTerm: searchTerm }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@if (showAddTag) {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"ng-option\"\n\t\t\t\t\t[class.ng-option-marked]=\"!itemsList.markedItem\"\n\t\t\t\t\t(mouseover)=\"itemsList.unmarkItem()\"\n\t\t\t\t\trole=\"option\"\n\t\t\t\t\t(click)=\"selectTag()\">\n\t\t\t\t\t<ng-template #defaultTagTemplate>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t><span class=\"ng-tag-label\">{{ addTagText() || config.addTagText }}</span\n\t\t\t\t\t\t\t>\"{{ searchTerm }}\"</span\n\t\t\t\t\t\t>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t[ngTemplateOutlet]=\"tagTemplate() || defaultTagTemplate\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</ng-container>\n\t\t@if (showNoItemsFound()) {\n\t\t\t<ng-template #defaultNotFoundTemplate>\n\t\t\t\t<div class=\"ng-option ng-option-disabled\">{{ notFoundText() ?? config.notFoundText }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]=\"notFoundTemplate() || defaultNotFoundTemplate\"\n\t\t\t\t[ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n\t\t\t</ng-template>\n\t\t}\n\t\t@if (showTypeToSearch()) {\n\t\t\t<ng-template #defaultTypeToSearchTemplate>\n\t\t\t\t<div class=\"ng-option ng-option-disabled\">{{ typeToSearchText() || config.typeToSearchText }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template [ngTemplateOutlet]=\"typeToSearchTemplate() || defaultTypeToSearchTemplate\"></ng-template>\n\t\t}\n\t\t@if (loading() && itemsList.filteredItems.length === 0) {\n\t\t\t<ng-template #defaultLoadingTextTemplate>\n\t\t\t\t<div class=\"ng-option ng-option-disabled\">{{ loadingText() || config.loadingText }}</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]=\"loadingTextTemplate() || defaultLoadingTextTemplate\"\n\t\t\t\t[ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n\t\t\t</ng-template>\n\t\t}\n\t</ng-dropdown-panel>\n}\n\n<!-- Always present aria-live region -->\n<div aria-atomic=\"true\" aria-live=\"polite\" class=\"ng-visually-hidden\" role=\"status\">\n\t@if (isOpen && showNoItemsFound()) {\n\t\t{{ notFoundText }}\n\t}\n</div>\n", styles: ["@charset \"UTF-8\";.ng-select{position:relative;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{position:relative;z-index:1001;-webkit-user-select:text;user-select:text;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:unset;user-select:unset;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:\"\\200b\"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}.ng-visually-hidden{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0;white-space:nowrap}\n"] }]
2941
+ }], ctorParameters: () => [], propDecorators: { typeahead: [{
3068
2942
  type: HostBinding,
3069
2943
  args: ['class.ng-select-typeahead']
3070
2944
  }], multiple: [{
3071
- type: Input,
3072
- args: [{ transform: booleanAttribute }]
3073
- }, {
3074
2945
  type: HostBinding,
3075
2946
  args: ['class.ng-select-multiple']
3076
2947
  }], addTag: [{
3077
- type: Input
3078
- }, {
3079
2948
  type: HostBinding,
3080
2949
  args: ['class.ng-select-taggable']
3081
2950
  }], searchable: [{
3082
- type: Input,
3083
- args: [{ transform: booleanAttribute }]
3084
- }, {
3085
2951
  type: HostBinding,
3086
2952
  args: ['class.ng-select-searchable']
3087
2953
  }], clearable: [{
3088
- type: Input,
3089
- args: [{ transform: booleanAttribute }]
3090
- }, {
3091
2954
  type: HostBinding,
3092
2955
  args: ['class.ng-select-clearable']
3093
2956
  }], isOpen: [{
3094
- type: Input
3095
- }, {
3096
2957
  type: HostBinding,
3097
2958
  args: ['class.ng-select-opened']
3098
- }], blurEvent: [{
3099
- type: Output,
3100
- args: ['blur']
3101
- }], focusEvent: [{
3102
- type: Output,
3103
- args: ['focus']
3104
- }], changeEvent: [{
3105
- type: Output,
3106
- args: ['change']
3107
- }], openEvent: [{
3108
- type: Output,
3109
- args: ['open']
3110
- }], closeEvent: [{
3111
- type: Output,
3112
- args: ['close']
3113
- }], searchEvent: [{
3114
- type: Output,
3115
- args: ['search']
3116
- }], clearEvent: [{
3117
- type: Output,
3118
- args: ['clear']
3119
- }], addEvent: [{
3120
- type: Output,
3121
- args: ['add']
3122
- }], removeEvent: [{
3123
- type: Output,
3124
- args: ['remove']
3125
- }], scroll: [{
3126
- type: Output,
3127
- args: ['scroll']
3128
- }], scrollToEnd: [{
3129
- type: Output,
3130
- args: ['scrollToEnd']
3131
- }], optionTemplate: [{
3132
- type: ContentChild,
3133
- args: [NgOptionTemplateDirective, { read: TemplateRef }]
3134
- }], optgroupTemplate: [{
3135
- type: ContentChild,
3136
- args: [NgOptgroupTemplateDirective, { read: TemplateRef }]
3137
- }], labelTemplate: [{
3138
- type: ContentChild,
3139
- args: [NgLabelTemplateDirective, { read: TemplateRef }]
3140
- }], multiLabelTemplate: [{
3141
- type: ContentChild,
3142
- args: [NgMultiLabelTemplateDirective, { read: TemplateRef }]
3143
- }], headerTemplate: [{
3144
- type: ContentChild,
3145
- args: [NgHeaderTemplateDirective, { read: TemplateRef }]
3146
- }], footerTemplate: [{
3147
- type: ContentChild,
3148
- args: [NgFooterTemplateDirective, { read: TemplateRef }]
3149
- }], notFoundTemplate: [{
3150
- type: ContentChild,
3151
- args: [NgNotFoundTemplateDirective, { read: TemplateRef }]
3152
- }], placeholderTemplate: [{
3153
- type: ContentChild,
3154
- args: [NgPlaceholderTemplateDirective, { read: TemplateRef }]
3155
- }], typeToSearchTemplate: [{
3156
- type: ContentChild,
3157
- args: [NgTypeToSearchTemplateDirective, { read: TemplateRef }]
3158
- }], loadingTextTemplate: [{
3159
- type: ContentChild,
3160
- args: [NgLoadingTextTemplateDirective, { read: TemplateRef }]
3161
- }], tagTemplate: [{
3162
- type: ContentChild,
3163
- args: [NgTagTemplateDirective, { read: TemplateRef }]
3164
- }], loadingSpinnerTemplate: [{
3165
- type: ContentChild,
3166
- args: [NgLoadingSpinnerTemplateDirective, { read: TemplateRef }]
3167
- }], clearButtonTemplate: [{
3168
- type: ContentChild,
3169
- args: [NgClearButtonTemplateDirective, { read: TemplateRef }]
3170
- }], dropdownPanel: [{
3171
- type: ViewChild,
3172
- args: [forwardRef(() => NgDropdownPanelComponent)]
3173
- }], searchInput: [{
3174
- type: ViewChild,
3175
- args: ['searchInput', { static: true }]
3176
- }], clearButton: [{
3177
- type: ViewChild,
3178
- args: ['clearButton']
3179
- }], ngOptions: [{
3180
- type: ContentChildren,
3181
- args: [NgOptionComponent, { descendants: true }]
3182
2959
  }], useDefaultClass: [{
3183
2960
  type: HostBinding,
3184
2961
  args: ['class.ng-select']
@@ -3188,19 +2965,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
3188
2965
  }], single: [{
3189
2966
  type: HostBinding,
3190
2967
  args: ['class.ng-select-single']
3191
- }], items: [{
3192
- type: Input
3193
2968
  }], disabled: [{
3194
2969
  type: HostBinding,
3195
2970
  args: ['class.ng-select-disabled']
3196
- }], compareWith: [{
3197
- type: Input
3198
- }], clearSearchOnAdd: [{
3199
- type: Input
3200
- }], deselectOnClick: [{
3201
- type: Input
3202
- }], keyDownFn: [{
3203
- type: Input
3204
2971
  }], handleKeyDown: [{
3205
2972
  type: HostListener,
3206
2973
  args: ['keydown', ['$event']]
@@ -3239,7 +3006,7 @@ class NgSelectModule {
3239
3006
  NgTagTemplateDirective,
3240
3007
  NgLoadingSpinnerTemplateDirective,
3241
3008
  NgClearButtonTemplateDirective] }); }
3242
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgSelectModule, providers: [{ provide: SELECTION_MODEL_FACTORY, useValue: DefaultSelectionModelFactory }] }); }
3009
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgSelectModule, providers: provideNgSelect() }); }
3243
3010
  }
3244
3011
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NgSelectModule, decorators: [{
3245
3012
  type: NgModule,
@@ -3280,9 +3047,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
3280
3047
  NgLoadingSpinnerTemplateDirective,
3281
3048
  NgClearButtonTemplateDirective
3282
3049
  ],
3283
- providers: [{ provide: SELECTION_MODEL_FACTORY, useValue: DefaultSelectionModelFactory }],
3050
+ providers: provideNgSelect(),
3284
3051
  }]
3285
3052
  }] });
3053
+ function provideNgSelect() {
3054
+ return [
3055
+ {
3056
+ provide: SELECTION_MODEL_FACTORY,
3057
+ useValue: DefaultSelectionModelFactory,
3058
+ },
3059
+ ];
3060
+ }
3286
3061
 
3287
3062
  /*
3288
3063
  * Public API Surface of ng-select