@ng-select/ng-select 13.6.0 → 13.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -2
- package/esm2022/lib/ng-dropdown-panel.component.mjs +41 -38
- package/esm2022/lib/ng-option.component.mjs +4 -3
- package/esm2022/lib/ng-select.component.mjs +20 -13
- package/esm2022/lib/ng-select.module.mjs +7 -9
- package/esm2022/lib/ng-templates.directive.mjs +78 -39
- package/fesm2022/ng-select-ng-select.mjs +214 -164
- package/fesm2022/ng-select-ng-select.mjs.map +1 -1
- package/lib/ng-dropdown-panel.component.d.ts +1 -1
- package/lib/ng-option.component.d.ts +1 -1
- package/lib/ng-select.component.d.ts +3 -3
- package/lib/ng-select.module.d.ts +1 -2
- package/lib/ng-templates.directive.d.ts +13 -13
- package/package.json +1 -1
|
@@ -3,8 +3,7 @@ import { Directive, Input, Injectable, EventEmitter, booleanAttribute, ElementRe
|
|
|
3
3
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
4
|
import { takeUntil, auditTime, startWith, tap, debounceTime, filter, map } from 'rxjs/operators';
|
|
5
5
|
import { animationFrameScheduler, asapScheduler, Subject, fromEvent, merge } from 'rxjs';
|
|
6
|
-
import
|
|
7
|
-
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
6
|
+
import { DOCUMENT, NgTemplateOutlet, NgClass } from '@angular/common';
|
|
8
7
|
|
|
9
8
|
const unescapedHTMLExp = /[&<>"']/g;
|
|
10
9
|
const hasUnescapedHTMLExp = RegExp(unescapedHTMLExp.source);
|
|
@@ -40,159 +39,198 @@ class NgItemLabelDirective {
|
|
|
40
39
|
this.element.nativeElement.innerHTML = this.escape ? escapeHTML(this.ngItemLabel) : this.ngItemLabel;
|
|
41
40
|
}
|
|
42
41
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgItemLabelDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
43
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgItemLabelDirective, selector: "[ngItemLabel]", inputs: { ngItemLabel: "ngItemLabel", escape: "escape" }, usesOnChanges: true, ngImport: i0 }); }
|
|
42
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgItemLabelDirective, isStandalone: true, selector: "[ngItemLabel]", inputs: { ngItemLabel: "ngItemLabel", escape: "escape" }, usesOnChanges: true, ngImport: i0 }); }
|
|
44
43
|
}
|
|
45
44
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgItemLabelDirective, decorators: [{
|
|
46
45
|
type: Directive,
|
|
47
|
-
args: [{
|
|
46
|
+
args: [{
|
|
47
|
+
selector: '[ngItemLabel]',
|
|
48
|
+
standalone: true,
|
|
49
|
+
}]
|
|
48
50
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { ngItemLabel: [{
|
|
49
51
|
type: Input
|
|
50
52
|
}], escape: [{
|
|
51
53
|
type: Input
|
|
52
54
|
}] } });
|
|
53
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
54
55
|
class NgOptionTemplateDirective {
|
|
55
56
|
constructor(template) {
|
|
56
57
|
this.template = template;
|
|
57
58
|
}
|
|
58
59
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgOptionTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
59
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgOptionTemplateDirective, selector: "[ng-option-tmp]", ngImport: i0 }); }
|
|
60
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgOptionTemplateDirective, isStandalone: true, selector: "[ng-option-tmp]", ngImport: i0 }); }
|
|
60
61
|
}
|
|
61
62
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgOptionTemplateDirective, decorators: [{
|
|
62
63
|
type: Directive,
|
|
63
|
-
args: [{
|
|
64
|
+
args: [{
|
|
65
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
66
|
+
selector: '[ng-option-tmp]',
|
|
67
|
+
standalone: true,
|
|
68
|
+
}]
|
|
64
69
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
65
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
66
70
|
class NgOptgroupTemplateDirective {
|
|
67
71
|
constructor(template) {
|
|
68
72
|
this.template = template;
|
|
69
73
|
}
|
|
70
74
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgOptgroupTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
71
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgOptgroupTemplateDirective, selector: "[ng-optgroup-tmp]", ngImport: i0 }); }
|
|
75
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgOptgroupTemplateDirective, isStandalone: true, selector: "[ng-optgroup-tmp]", ngImport: i0 }); }
|
|
72
76
|
}
|
|
73
77
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgOptgroupTemplateDirective, decorators: [{
|
|
74
78
|
type: Directive,
|
|
75
|
-
args: [{
|
|
79
|
+
args: [{
|
|
80
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
81
|
+
selector: '[ng-optgroup-tmp]',
|
|
82
|
+
standalone: true,
|
|
83
|
+
}]
|
|
76
84
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
77
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
78
85
|
class NgLabelTemplateDirective {
|
|
79
86
|
constructor(template) {
|
|
80
87
|
this.template = template;
|
|
81
88
|
}
|
|
82
89
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgLabelTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
83
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgLabelTemplateDirective, selector: "[ng-label-tmp]", ngImport: i0 }); }
|
|
90
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgLabelTemplateDirective, isStandalone: true, selector: "[ng-label-tmp]", ngImport: i0 }); }
|
|
84
91
|
}
|
|
85
92
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgLabelTemplateDirective, decorators: [{
|
|
86
93
|
type: Directive,
|
|
87
|
-
args: [{
|
|
94
|
+
args: [{
|
|
95
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
96
|
+
selector: '[ng-label-tmp]',
|
|
97
|
+
standalone: true,
|
|
98
|
+
}]
|
|
88
99
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
89
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
90
100
|
class NgMultiLabelTemplateDirective {
|
|
91
101
|
constructor(template) {
|
|
92
102
|
this.template = template;
|
|
93
103
|
}
|
|
94
104
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgMultiLabelTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
95
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgMultiLabelTemplateDirective, selector: "[ng-multi-label-tmp]", ngImport: i0 }); }
|
|
105
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgMultiLabelTemplateDirective, isStandalone: true, selector: "[ng-multi-label-tmp]", ngImport: i0 }); }
|
|
96
106
|
}
|
|
97
107
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgMultiLabelTemplateDirective, decorators: [{
|
|
98
108
|
type: Directive,
|
|
99
|
-
args: [{
|
|
109
|
+
args: [{
|
|
110
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
111
|
+
selector: '[ng-multi-label-tmp]',
|
|
112
|
+
standalone: true,
|
|
113
|
+
}]
|
|
100
114
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
101
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
102
115
|
class NgHeaderTemplateDirective {
|
|
103
116
|
constructor(template) {
|
|
104
117
|
this.template = template;
|
|
105
118
|
}
|
|
106
119
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgHeaderTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
107
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgHeaderTemplateDirective, selector: "[ng-header-tmp]", ngImport: i0 }); }
|
|
120
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgHeaderTemplateDirective, isStandalone: true, selector: "[ng-header-tmp]", ngImport: i0 }); }
|
|
108
121
|
}
|
|
109
122
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgHeaderTemplateDirective, decorators: [{
|
|
110
123
|
type: Directive,
|
|
111
|
-
args: [{
|
|
124
|
+
args: [{
|
|
125
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
126
|
+
selector: '[ng-header-tmp]',
|
|
127
|
+
standalone: true,
|
|
128
|
+
}]
|
|
112
129
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
113
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
114
130
|
class NgFooterTemplateDirective {
|
|
115
131
|
constructor(template) {
|
|
116
132
|
this.template = template;
|
|
117
133
|
}
|
|
118
134
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgFooterTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
119
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgFooterTemplateDirective, selector: "[ng-footer-tmp]", ngImport: i0 }); }
|
|
135
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgFooterTemplateDirective, isStandalone: true, selector: "[ng-footer-tmp]", ngImport: i0 }); }
|
|
120
136
|
}
|
|
121
137
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgFooterTemplateDirective, decorators: [{
|
|
122
138
|
type: Directive,
|
|
123
|
-
args: [{
|
|
139
|
+
args: [{
|
|
140
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
141
|
+
selector: '[ng-footer-tmp]',
|
|
142
|
+
standalone: true,
|
|
143
|
+
}]
|
|
124
144
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
125
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
126
145
|
class NgNotFoundTemplateDirective {
|
|
127
146
|
constructor(template) {
|
|
128
147
|
this.template = template;
|
|
129
148
|
}
|
|
130
149
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgNotFoundTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
131
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgNotFoundTemplateDirective, selector: "[ng-notfound-tmp]", ngImport: i0 }); }
|
|
150
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgNotFoundTemplateDirective, isStandalone: true, selector: "[ng-notfound-tmp]", ngImport: i0 }); }
|
|
132
151
|
}
|
|
133
152
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgNotFoundTemplateDirective, decorators: [{
|
|
134
153
|
type: Directive,
|
|
135
|
-
args: [{
|
|
154
|
+
args: [{
|
|
155
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
156
|
+
selector: '[ng-notfound-tmp]',
|
|
157
|
+
standalone: true,
|
|
158
|
+
}]
|
|
136
159
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
137
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
138
160
|
class NgPlaceholderTemplateDirective {
|
|
139
161
|
constructor(template) {
|
|
140
162
|
this.template = template;
|
|
141
163
|
}
|
|
142
164
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgPlaceholderTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
143
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgPlaceholderTemplateDirective, selector: "[ng-placeholder-tmp]", ngImport: i0 }); }
|
|
165
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgPlaceholderTemplateDirective, isStandalone: true, selector: "[ng-placeholder-tmp]", ngImport: i0 }); }
|
|
144
166
|
}
|
|
145
167
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgPlaceholderTemplateDirective, decorators: [{
|
|
146
168
|
type: Directive,
|
|
147
|
-
args: [{
|
|
169
|
+
args: [{
|
|
170
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
171
|
+
selector: '[ng-placeholder-tmp]',
|
|
172
|
+
standalone: true,
|
|
173
|
+
}]
|
|
148
174
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
149
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
150
175
|
class NgTypeToSearchTemplateDirective {
|
|
151
176
|
constructor(template) {
|
|
152
177
|
this.template = template;
|
|
153
178
|
}
|
|
154
179
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgTypeToSearchTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
155
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgTypeToSearchTemplateDirective, selector: "[ng-typetosearch-tmp]", ngImport: i0 }); }
|
|
180
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgTypeToSearchTemplateDirective, isStandalone: true, selector: "[ng-typetosearch-tmp]", ngImport: i0 }); }
|
|
156
181
|
}
|
|
157
182
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgTypeToSearchTemplateDirective, decorators: [{
|
|
158
183
|
type: Directive,
|
|
159
|
-
args: [{
|
|
184
|
+
args: [{
|
|
185
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
186
|
+
selector: '[ng-typetosearch-tmp]',
|
|
187
|
+
standalone: true,
|
|
188
|
+
}]
|
|
160
189
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
161
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
162
190
|
class NgLoadingTextTemplateDirective {
|
|
163
191
|
constructor(template) {
|
|
164
192
|
this.template = template;
|
|
165
193
|
}
|
|
166
194
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgLoadingTextTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
167
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgLoadingTextTemplateDirective, selector: "[ng-loadingtext-tmp]", ngImport: i0 }); }
|
|
195
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgLoadingTextTemplateDirective, isStandalone: true, selector: "[ng-loadingtext-tmp]", ngImport: i0 }); }
|
|
168
196
|
}
|
|
169
197
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgLoadingTextTemplateDirective, decorators: [{
|
|
170
198
|
type: Directive,
|
|
171
|
-
args: [{
|
|
199
|
+
args: [{
|
|
200
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
201
|
+
selector: '[ng-loadingtext-tmp]',
|
|
202
|
+
standalone: true,
|
|
203
|
+
}]
|
|
172
204
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
173
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
174
205
|
class NgTagTemplateDirective {
|
|
175
206
|
constructor(template) {
|
|
176
207
|
this.template = template;
|
|
177
208
|
}
|
|
178
209
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgTagTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
179
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgTagTemplateDirective, selector: "[ng-tag-tmp]", ngImport: i0 }); }
|
|
210
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgTagTemplateDirective, isStandalone: true, selector: "[ng-tag-tmp]", ngImport: i0 }); }
|
|
180
211
|
}
|
|
181
212
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgTagTemplateDirective, decorators: [{
|
|
182
213
|
type: Directive,
|
|
183
|
-
args: [{
|
|
214
|
+
args: [{
|
|
215
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
216
|
+
selector: '[ng-tag-tmp]',
|
|
217
|
+
standalone: true,
|
|
218
|
+
}]
|
|
184
219
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
185
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
186
220
|
class NgLoadingSpinnerTemplateDirective {
|
|
187
221
|
constructor(template) {
|
|
188
222
|
this.template = template;
|
|
189
223
|
}
|
|
190
224
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgLoadingSpinnerTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
191
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgLoadingSpinnerTemplateDirective, selector: "[ng-loadingspinner-tmp]", ngImport: i0 }); }
|
|
225
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: NgLoadingSpinnerTemplateDirective, isStandalone: true, selector: "[ng-loadingspinner-tmp]", ngImport: i0 }); }
|
|
192
226
|
}
|
|
193
227
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgLoadingSpinnerTemplateDirective, decorators: [{
|
|
194
228
|
type: Directive,
|
|
195
|
-
args: [{
|
|
229
|
+
args: [{
|
|
230
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
231
|
+
selector: '[ng-loadingspinner-tmp]',
|
|
232
|
+
standalone: true,
|
|
233
|
+
}]
|
|
196
234
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
197
235
|
|
|
198
236
|
function newId() {
|
|
@@ -1799,24 +1837,24 @@ class NgDropdownPanelComponent {
|
|
|
1799
1837
|
});
|
|
1800
1838
|
}
|
|
1801
1839
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.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 }); }
|
|
1802
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: NgDropdownPanelComponent, selector: "ng-dropdown-panel", inputs: { items: "items", markedItem: "markedItem", position: "position", appendTo: "appendTo", bufferAmount: "bufferAmount", virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], headerTemplate: "headerTemplate", footerTemplate: "footerTemplate", filterValue: "filterValue" }, 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: `
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1840
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: NgDropdownPanelComponent, isStandalone: true, selector: "ng-dropdown-panel", inputs: { items: "items", markedItem: "markedItem", position: "position", appendTo: "appendTo", bufferAmount: "bufferAmount", virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], headerTemplate: "headerTemplate", footerTemplate: "footerTemplate", filterValue: "filterValue" }, 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: `
|
|
1841
|
+
@if (headerTemplate) {
|
|
1842
|
+
<div class="ng-dropdown-header">
|
|
1843
|
+
<ng-container [ngTemplateOutlet]="headerTemplate" [ngTemplateOutletContext]="{ searchTerm: filterValue }"/>
|
|
1844
|
+
</div>
|
|
1845
|
+
}
|
|
1846
|
+
<div #scroll role="listbox" class="ng-dropdown-panel-items scroll-host">
|
|
1847
|
+
<div #padding [class.total-padding]="virtualScroll"></div>
|
|
1848
|
+
<div #content [class.scrollable-content]="virtualScroll && items.length">
|
|
1849
|
+
<ng-content/>
|
|
1850
|
+
</div>
|
|
1851
|
+
</div>
|
|
1852
|
+
@if (footerTemplate) {
|
|
1853
|
+
<div class="ng-dropdown-footer">
|
|
1854
|
+
<ng-container [ngTemplateOutlet]="footerTemplate" [ngTemplateOutletContext]="{ searchTerm: filterValue }"/>
|
|
1855
|
+
</div>
|
|
1856
|
+
}
|
|
1857
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1820
1858
|
}
|
|
1821
1859
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgDropdownPanelComponent, decorators: [{
|
|
1822
1860
|
type: Component,
|
|
@@ -1824,24 +1862,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
|
|
|
1824
1862
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1825
1863
|
encapsulation: ViewEncapsulation.None,
|
|
1826
1864
|
selector: 'ng-dropdown-panel',
|
|
1865
|
+
standalone: true,
|
|
1827
1866
|
template: `
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1867
|
+
@if (headerTemplate) {
|
|
1868
|
+
<div class="ng-dropdown-header">
|
|
1869
|
+
<ng-container [ngTemplateOutlet]="headerTemplate" [ngTemplateOutletContext]="{ searchTerm: filterValue }"/>
|
|
1870
|
+
</div>
|
|
1871
|
+
}
|
|
1872
|
+
<div #scroll role="listbox" class="ng-dropdown-panel-items scroll-host">
|
|
1873
|
+
<div #padding [class.total-padding]="virtualScroll"></div>
|
|
1874
|
+
<div #content [class.scrollable-content]="virtualScroll && items.length">
|
|
1875
|
+
<ng-content/>
|
|
1876
|
+
</div>
|
|
1877
|
+
</div>
|
|
1878
|
+
@if (footerTemplate) {
|
|
1879
|
+
<div class="ng-dropdown-footer">
|
|
1880
|
+
<ng-container [ngTemplateOutlet]="footerTemplate" [ngTemplateOutletContext]="{ searchTerm: filterValue }"/>
|
|
1881
|
+
</div>
|
|
1882
|
+
}
|
|
1883
|
+
`,
|
|
1884
|
+
imports: [
|
|
1885
|
+
NgTemplateOutlet,
|
|
1886
|
+
],
|
|
1845
1887
|
}]
|
|
1846
1888
|
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.NgZone }, { type: NgDropdownPanelService }, { type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
1847
1889
|
type: Optional
|
|
@@ -1917,14 +1959,15 @@ class NgOptionComponent {
|
|
|
1917
1959
|
this.stateChange$.complete();
|
|
1918
1960
|
}
|
|
1919
1961
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgOptionComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1920
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.0.0", type: NgOptionComponent, selector: "ng-option", inputs: { value: "value", disabled: ["disabled", "disabled", booleanAttribute] }, usesOnChanges: true, ngImport: i0, template: `<ng-content
|
|
1962
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.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 }); }
|
|
1921
1963
|
}
|
|
1922
1964
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgOptionComponent, decorators: [{
|
|
1923
1965
|
type: Component,
|
|
1924
1966
|
args: [{
|
|
1925
1967
|
selector: 'ng-option',
|
|
1968
|
+
standalone: true,
|
|
1926
1969
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1927
|
-
template: `<ng-content
|
|
1970
|
+
template: `<ng-content/>`,
|
|
1928
1971
|
}]
|
|
1929
1972
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { value: [{
|
|
1930
1973
|
type: Input
|
|
@@ -1933,6 +1976,81 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
|
|
|
1933
1976
|
args: [{ transform: booleanAttribute }]
|
|
1934
1977
|
}] } });
|
|
1935
1978
|
|
|
1979
|
+
function DefaultSelectionModelFactory() {
|
|
1980
|
+
return new DefaultSelectionModel();
|
|
1981
|
+
}
|
|
1982
|
+
class DefaultSelectionModel {
|
|
1983
|
+
constructor() {
|
|
1984
|
+
this._selected = [];
|
|
1985
|
+
}
|
|
1986
|
+
get value() {
|
|
1987
|
+
return this._selected;
|
|
1988
|
+
}
|
|
1989
|
+
select(item, multiple, groupAsModel) {
|
|
1990
|
+
item.selected = true;
|
|
1991
|
+
if (!item.children || (!multiple && groupAsModel)) {
|
|
1992
|
+
this._selected.push(item);
|
|
1993
|
+
}
|
|
1994
|
+
if (multiple) {
|
|
1995
|
+
if (item.parent) {
|
|
1996
|
+
const childrenCount = item.parent.children.length;
|
|
1997
|
+
const selectedCount = item.parent.children.filter((x) => x.selected).length;
|
|
1998
|
+
item.parent.selected = childrenCount === selectedCount;
|
|
1999
|
+
}
|
|
2000
|
+
else if (item.children) {
|
|
2001
|
+
this._setChildrenSelectedState(item.children, true);
|
|
2002
|
+
this._removeChildren(item);
|
|
2003
|
+
if (groupAsModel && this._activeChildren(item)) {
|
|
2004
|
+
this._selected = [...this._selected.filter((x) => x.parent !== item), item];
|
|
2005
|
+
}
|
|
2006
|
+
else {
|
|
2007
|
+
this._selected = [...this._selected, ...item.children.filter((x) => !x.disabled)];
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
unselect(item, multiple) {
|
|
2013
|
+
this._selected = this._selected.filter((x) => x !== item);
|
|
2014
|
+
item.selected = false;
|
|
2015
|
+
if (multiple) {
|
|
2016
|
+
if (item.parent && item.parent.selected) {
|
|
2017
|
+
const children = item.parent.children;
|
|
2018
|
+
this._removeParent(item.parent);
|
|
2019
|
+
this._removeChildren(item.parent);
|
|
2020
|
+
this._selected.push(...children.filter((x) => x !== item && !x.disabled));
|
|
2021
|
+
item.parent.selected = false;
|
|
2022
|
+
}
|
|
2023
|
+
else if (item.children) {
|
|
2024
|
+
this._setChildrenSelectedState(item.children, false);
|
|
2025
|
+
this._removeChildren(item);
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
2029
|
+
clear(keepDisabled) {
|
|
2030
|
+
this._selected = keepDisabled ? this._selected.filter((x) => x.disabled) : [];
|
|
2031
|
+
}
|
|
2032
|
+
_setChildrenSelectedState(children, selected) {
|
|
2033
|
+
for (const child of children) {
|
|
2034
|
+
if (child.disabled) {
|
|
2035
|
+
continue;
|
|
2036
|
+
}
|
|
2037
|
+
child.selected = selected;
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
_removeChildren(parent) {
|
|
2041
|
+
this._selected = [
|
|
2042
|
+
...this._selected.filter((x) => x.parent !== parent),
|
|
2043
|
+
...parent.children.filter((x) => x.parent === parent && x.disabled && x.selected),
|
|
2044
|
+
];
|
|
2045
|
+
}
|
|
2046
|
+
_removeParent(parent) {
|
|
2047
|
+
this._selected = this._selected.filter((x) => x !== parent);
|
|
2048
|
+
}
|
|
2049
|
+
_activeChildren(item) {
|
|
2050
|
+
return item.children.every((x) => !x.disabled || x.selected);
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
|
|
1936
2054
|
class NgSelectConfig {
|
|
1937
2055
|
constructor() {
|
|
1938
2056
|
this.notFoundText = 'No items found';
|
|
@@ -2086,7 +2204,7 @@ class NgSelectComponent {
|
|
|
2086
2204
|
return item;
|
|
2087
2205
|
};
|
|
2088
2206
|
this._mergeGlobalConfig(config);
|
|
2089
|
-
this.itemsList = new ItemsList(this, newSelectionModel());
|
|
2207
|
+
this.itemsList = new ItemsList(this, newSelectionModel ? newSelectionModel() : DefaultSelectionModelFactory());
|
|
2090
2208
|
this.element = _elementRef.nativeElement;
|
|
2091
2209
|
}
|
|
2092
2210
|
get selectedItems() {
|
|
@@ -2309,7 +2427,6 @@ class NgSelectComponent {
|
|
|
2309
2427
|
if (this._editableSearchTerm) {
|
|
2310
2428
|
this._setSearchTermFromItems();
|
|
2311
2429
|
}
|
|
2312
|
-
this._onSelectionChanged();
|
|
2313
2430
|
}
|
|
2314
2431
|
select(item) {
|
|
2315
2432
|
if (!item.selected) {
|
|
@@ -2325,6 +2442,7 @@ class NgSelectComponent {
|
|
|
2325
2442
|
if (this.closeOnSelect || this.itemsList.noItemsToSelect) {
|
|
2326
2443
|
this.close();
|
|
2327
2444
|
}
|
|
2445
|
+
this._onSelectionChanged();
|
|
2328
2446
|
}
|
|
2329
2447
|
focus() {
|
|
2330
2448
|
this.searchInput.nativeElement.focus();
|
|
@@ -2340,6 +2458,7 @@ class NgSelectComponent {
|
|
|
2340
2458
|
this.focus();
|
|
2341
2459
|
this._updateNgModel();
|
|
2342
2460
|
this.removeEvent.emit(item.value);
|
|
2461
|
+
this._onSelectionChanged();
|
|
2343
2462
|
}
|
|
2344
2463
|
selectTag() {
|
|
2345
2464
|
let tag;
|
|
@@ -2759,26 +2878,31 @@ class NgSelectComponent {
|
|
|
2759
2878
|
this.bindLabel = this.bindLabel || config.bindLabel;
|
|
2760
2879
|
this.appearance = this.appearance || config.appearance;
|
|
2761
2880
|
}
|
|
2762
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgSelectComponent, deps: [{ token: 'class', attribute: true }, { token: 'autofocus', attribute: true }, { token: NgSelectConfig }, { token: SELECTION_MODEL_FACTORY }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: ConsoleService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2763
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: NgSelectComponent, selector: "ng-select", inputs: { bindLabel: "bindLabel", bindValue: "bindValue", markFirst: ["markFirst", "markFirst", booleanAttribute], placeholder: "placeholder", notFoundText: "notFoundText", typeToSearchText: "typeToSearchText", preventToggleOnRightClick: "preventToggleOnRightClick", addTagText: "addTagText", loadingText: "loadingText", clearAllText: "clearAllText", appearance: "appearance", dropdownPosition: "dropdownPosition", appendTo: "appendTo", loading: ["loading", "loading", booleanAttribute], closeOnSelect: ["closeOnSelect", "closeOnSelect", booleanAttribute], hideSelected: ["hideSelected", "hideSelected", booleanAttribute], selectOnTab: ["selectOnTab", "selectOnTab", booleanAttribute], openOnEnter: ["openOnEnter", "openOnEnter", booleanAttribute], maxSelectedItems: ["maxSelectedItems", "maxSelectedItems", numberAttribute], groupBy: "groupBy", groupValue: "groupValue", bufferAmount: ["bufferAmount", "bufferAmount", numberAttribute], virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], selectableGroup: ["selectableGroup", "selectableGroup", booleanAttribute], selectableGroupAsModel: ["selectableGroupAsModel", "selectableGroupAsModel", booleanAttribute], searchFn: "searchFn", trackByFn: "trackByFn", clearOnBackspace: ["clearOnBackspace", "clearOnBackspace", booleanAttribute], labelForId: "labelForId", inputAttrs: "inputAttrs", tabIndex: ["tabIndex", "tabIndex", numberAttribute], readonly: ["readonly", "readonly", booleanAttribute], searchWhileComposing: ["searchWhileComposing", "searchWhileComposing", booleanAttribute], minTermLength: ["minTermLength", "minTermLength", numberAttribute], editableSearchTerm: ["editableSearchTerm", "editableSearchTerm", booleanAttribute], keyDownFn: "keyDownFn", ngClass: "ngClass", typeahead: "typeahead", multiple: ["multiple", "multiple", booleanAttribute], addTag: "addTag", searchable: ["searchable", "searchable", booleanAttribute], clearable: ["clearable", "clearable", booleanAttribute], isOpen: "isOpen", items: "items", compareWith: "compareWith", clearSearchOnAdd: "clearSearchOnAdd", deselectOnClick: "deselectOnClick" }, outputs: { blurEvent: "blur", focusEvent: "focus", changeEvent: "change", openEvent: "open", closeEvent: "close", searchEvent: "search", clearEvent: "clear", addEvent: "add", removeEvent: "remove", scroll: "scroll", scrollToEnd: "scrollToEnd" }, host: { listeners: { "keydown": "handleKeyDown($event)" }, properties: { "class.ng-select-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-disabled": "this.disabled", "class.ng-select-filtered": "this.filtered", "class.ng-select-single": "this.single" } }, providers: [
|
|
2881
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.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 }); }
|
|
2882
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: NgSelectComponent, isStandalone: true, selector: "ng-select", inputs: { bindLabel: "bindLabel", bindValue: "bindValue", markFirst: ["markFirst", "markFirst", booleanAttribute], placeholder: "placeholder", notFoundText: "notFoundText", typeToSearchText: "typeToSearchText", preventToggleOnRightClick: "preventToggleOnRightClick", addTagText: "addTagText", loadingText: "loadingText", clearAllText: "clearAllText", appearance: "appearance", dropdownPosition: "dropdownPosition", appendTo: "appendTo", loading: ["loading", "loading", booleanAttribute], closeOnSelect: ["closeOnSelect", "closeOnSelect", booleanAttribute], hideSelected: ["hideSelected", "hideSelected", booleanAttribute], selectOnTab: ["selectOnTab", "selectOnTab", booleanAttribute], openOnEnter: ["openOnEnter", "openOnEnter", booleanAttribute], maxSelectedItems: ["maxSelectedItems", "maxSelectedItems", numberAttribute], groupBy: "groupBy", groupValue: "groupValue", bufferAmount: ["bufferAmount", "bufferAmount", numberAttribute], virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], selectableGroup: ["selectableGroup", "selectableGroup", booleanAttribute], selectableGroupAsModel: ["selectableGroupAsModel", "selectableGroupAsModel", booleanAttribute], searchFn: "searchFn", trackByFn: "trackByFn", clearOnBackspace: ["clearOnBackspace", "clearOnBackspace", booleanAttribute], labelForId: "labelForId", inputAttrs: "inputAttrs", tabIndex: ["tabIndex", "tabIndex", numberAttribute], readonly: ["readonly", "readonly", booleanAttribute], searchWhileComposing: ["searchWhileComposing", "searchWhileComposing", booleanAttribute], minTermLength: ["minTermLength", "minTermLength", numberAttribute], editableSearchTerm: ["editableSearchTerm", "editableSearchTerm", booleanAttribute], keyDownFn: "keyDownFn", ngClass: "ngClass", typeahead: "typeahead", multiple: ["multiple", "multiple", booleanAttribute], addTag: "addTag", searchable: ["searchable", "searchable", booleanAttribute], clearable: ["clearable", "clearable", booleanAttribute], isOpen: "isOpen", items: "items", compareWith: "compareWith", clearSearchOnAdd: "clearSearchOnAdd", deselectOnClick: "deselectOnClick" }, outputs: { blurEvent: "blur", focusEvent: "focus", changeEvent: "change", openEvent: "open", closeEvent: "close", searchEvent: "search", clearEvent: "clear", addEvent: "add", removeEvent: "remove", scroll: "scroll", scrollToEnd: "scrollToEnd" }, host: { listeners: { "keydown": "handleKeyDown($event)" }, properties: { "class.ng-select-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-disabled": "this.disabled", "class.ng-select-filtered": "this.filtered", "class.ng-select-single": "this.single" } }, providers: [
|
|
2764
2883
|
{
|
|
2765
2884
|
provide: NG_VALUE_ACCESSOR,
|
|
2766
2885
|
useExisting: forwardRef(() => NgSelectComponent),
|
|
2767
2886
|
multi: true,
|
|
2768
2887
|
},
|
|
2769
2888
|
NgDropdownPanelService,
|
|
2770
|
-
], 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: "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) {\n <ng-template #defaultPlaceholderTemplate>\n <div class=\"ng-placeholder\">{{ placeholder }}</div>\n </ng-template>\n <ng-template\n\t\t\t[ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\">\n </ng-template>\n\t\t}\n\t\t\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 @if (multiple && multiLabelTemplate && selectedValues.length > 0) {\n <ng-template [ngTemplateOutlet]=\"multiLabelTemplate\"\n [ngTemplateOutletContext]=\"{ items: selectedValues, clear: clearItem }\">\n </ng-template>\n }\n\n <div\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-owns]=\"isOpen ? dropdownId : null\"\n aria-haspopup=\"listbox\"\n class=\"ng-input\"\n role=\"combobox\">\n <input\n #searchInput\n (blur)=\"onInputBlur($event)\"\n (change)=\"$event.stopPropagation()\"\n (compositionend)=\"onCompositionEnd(searchInput.value)\"\n (compositionstart)=\"onCompositionStart()\"\n (focus)=\"onInputFocus($event)\"\n (input)=\"filter(searchInput.value)\"\n [attr.aria-activedescendant]=\"isOpen ? itemsList?.markedItem?.htmlId : null\"\n [attr.aria-controls]=\"isOpen ? dropdownId : null\"\n [attr.id]=\"labelForId\"\n [attr.tabindex]=\"tabIndex\"\n [disabled]=\"disabled\"\n [readOnly]=\"!searchable || itemsList.maxItemsSelected\"\n [value]=\"searchTerm ? searchTerm : ''\"\n aria-autocomplete=\"list\" />\n </div>\n </div>\n\n @if (loading) {\n <ng-template #defaultLoadingSpinnerTemplate>\n <div class=\"ng-spinner-loader\"></div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate || defaultLoadingSpinnerTemplate\"></ng-template>\n }\n\n @if (showClear()) {\n <span class=\"ng-clear-wrapper\" tabindex=\"0\" title=\"{{ clearAllText }}\" #clearButton>\n\t\t\t<span class=\"ng-clear\" aria-hidden=\"true\">\u00D7</span>\n\t\t</span>\n }\n\n <span class=\"ng-arrow-wrapper\">\n\t\t<span class=\"ng-arrow\"></span>\n\t</span>\n</div>\n\n@if (isOpen) {\n <ng-dropdown-panel\n class=\"ng-dropdown-panel\"\n [virtualScroll]=\"virtualScroll\"\n [bufferAmount]=\"bufferAmount\"\n [appendTo]=\"appendTo\"\n [position]=\"dropdownPosition\"\n [headerTemplate]=\"headerTemplate\"\n [footerTemplate]=\"footerTemplate\"\n [filterValue]=\"searchTerm\"\n [items]=\"itemsList.filteredItems\"\n [markedItem]=\"itemsList.markedItem\"\n (update)=\"viewPortItems = $event\"\n (scroll)=\"scroll.emit($event)\"\n (scrollToEnd)=\"scrollToEnd.emit($event)\"\n (outsideClick)=\"close()\"\n [class.ng-select-multiple]=\"multiple\"\n [ngClass]=\"appendTo ? (ngClass ? ngClass : classes) : null\"\n [id]=\"dropdownId\"\n role=\"listbox\"\n aria-label=\"Options list\">\n <ng-container>\n @for (item of viewPortItems; track trackByOption($index, item)) {\n <div\n class=\"ng-option\"\n [attr.role]=\"item.children ? 'group' : 'option'\"\n (click)=\"toggleItem(item)\"\n (mouseover)=\"onItemHover(item)\"\n [class.ng-option-disabled]=\"item.disabled\"\n [class.ng-option-selected]=\"item.selected\"\n [class.ng-optgroup]=\"item.children\"\n [class.ng-option]=\"!item.children\"\n [class.ng-option-child]=\"!!item.parent\"\n [class.ng-option-marked]=\"item === itemsList.markedItem\"\n [attr.aria-selected]=\"item.selected\"\n [attr.id]=\"item?.htmlId\">\n <ng-template #defaultOptionTemplate>\n <span class=\"ng-option-label\" [ngItemLabel]=\"item.label\" [escape]=\"escapeHTML\"></span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"\n\t\t\t\t\t\t\titem.children ? optgroupTemplate || defaultOptionTemplate : optionTemplate || defaultOptionTemplate\n\t\t\t\t\t\t\"\n [ngTemplateOutletContext]=\"{ item: item.value, item$: item, index: item.index, searchTerm: searchTerm }\">\n </ng-template>\n </div>\n }\n @if (showAddTag) {\n <div\n class=\"ng-option\"\n [class.ng-option-marked]=\"!itemsList.markedItem\"\n (mouseover)=\"itemsList.unmarkItem()\"\n role=\"option\"\n (click)=\"selectTag()\">\n <ng-template #defaultTagTemplate>\n\t\t\t\t\t\t<span\n ><span class=\"ng-tag-label\">{{ addTagText }}</span\n >\"{{ searchTerm }}\"</span\n >\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"tagTemplate || defaultTagTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n </ng-template>\n </div>\n }\n </ng-container>\n @if (showNoItemsFound()) {\n <ng-template #defaultNotFoundTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ notFoundText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"notFoundTemplate || defaultNotFoundTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n </ng-template>\n }\n @if (showTypeToSearch()) {\n <ng-template #defaultTypeToSearchTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ typeToSearchText }}</div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"typeToSearchTemplate || defaultTypeToSearchTemplate\"></ng-template>\n }\n @if (loading && itemsList.filteredItems.length === 0) {\n <ng-template #defaultLoadingTextTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ loadingText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"loadingTextTemplate || defaultLoadingTextTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n </ng-template>\n }\n </ng-dropdown-panel>\n}\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}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgDropdownPanelComponent, selector: "ng-dropdown-panel", inputs: ["items", "markedItem", "position", "appendTo", "bufferAmount", "virtualScroll", "headerTemplate", "footerTemplate", "filterValue"], outputs: ["update", "scroll", "scrollToEnd", "outsideClick"] }, { kind: "directive", type: NgItemLabelDirective, selector: "[ngItemLabel]", inputs: ["ngItemLabel", "escape"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2889
|
+
], 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: "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) {\n <ng-template #defaultPlaceholderTemplate>\n <div class=\"ng-placeholder\">{{ placeholder }}</div>\n </ng-template>\n <ng-template\n\t\t\t[ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\">\n </ng-template>\n\t\t}\n\t\t\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 @if (multiple && multiLabelTemplate && selectedValues.length > 0) {\n <ng-template [ngTemplateOutlet]=\"multiLabelTemplate\"\n [ngTemplateOutletContext]=\"{ items: selectedValues, clear: clearItem }\">\n </ng-template>\n }\n\n <div\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-owns]=\"isOpen ? dropdownId : null\"\n aria-haspopup=\"listbox\"\n class=\"ng-input\"\n role=\"combobox\">\n <input\n #searchInput\n (blur)=\"onInputBlur($event)\"\n (change)=\"$event.stopPropagation()\"\n (compositionend)=\"onCompositionEnd(searchInput.value)\"\n (compositionstart)=\"onCompositionStart()\"\n (focus)=\"onInputFocus($event)\"\n (input)=\"filter(searchInput.value)\"\n [attr.aria-activedescendant]=\"isOpen ? itemsList?.markedItem?.htmlId : null\"\n [attr.aria-controls]=\"isOpen ? dropdownId : null\"\n [attr.id]=\"labelForId\"\n [attr.tabindex]=\"tabIndex\"\n [disabled]=\"disabled\"\n [readOnly]=\"!searchable || itemsList.maxItemsSelected\"\n [value]=\"searchTerm ? searchTerm : ''\"\n aria-autocomplete=\"list\" />\n </div>\n </div>\n\n @if (loading) {\n <ng-template #defaultLoadingSpinnerTemplate>\n <div class=\"ng-spinner-loader\"></div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate || defaultLoadingSpinnerTemplate\"></ng-template>\n }\n\n @if (showClear()) {\n <span class=\"ng-clear-wrapper\" tabindex=\"0\" title=\"{{ clearAllText }}\" #clearButton>\n\t\t\t<span class=\"ng-clear\" aria-hidden=\"true\">\u00D7</span>\n\t\t</span>\n }\n\n <span class=\"ng-arrow-wrapper\">\n\t\t<span class=\"ng-arrow\"></span>\n\t</span>\n</div>\n\n@if (isOpen) {\n <ng-dropdown-panel\n class=\"ng-dropdown-panel\"\n [virtualScroll]=\"virtualScroll\"\n [bufferAmount]=\"bufferAmount\"\n [appendTo]=\"appendTo\"\n [position]=\"dropdownPosition\"\n [headerTemplate]=\"headerTemplate\"\n [footerTemplate]=\"footerTemplate\"\n [filterValue]=\"searchTerm\"\n [items]=\"itemsList.filteredItems\"\n [markedItem]=\"itemsList.markedItem\"\n (update)=\"viewPortItems = $event\"\n (scroll)=\"scroll.emit($event)\"\n (scrollToEnd)=\"scrollToEnd.emit($event)\"\n (outsideClick)=\"close()\"\n [class.ng-select-multiple]=\"multiple\"\n [ngClass]=\"appendTo ? (ngClass ? ngClass : classes) : null\"\n [id]=\"dropdownId\"\n role=\"listbox\"\n aria-label=\"Options list\">\n <ng-container>\n @for (item of viewPortItems; track trackByOption($index, item)) {\n <div\n class=\"ng-option\"\n [attr.role]=\"item.children ? 'group' : 'option'\"\n (click)=\"toggleItem(item)\"\n (mouseover)=\"onItemHover(item)\"\n [class.ng-option-disabled]=\"item.disabled\"\n [class.ng-option-selected]=\"item.selected\"\n [class.ng-optgroup]=\"item.children\"\n [class.ng-option]=\"!item.children\"\n [class.ng-option-child]=\"!!item.parent\"\n [class.ng-option-marked]=\"item === itemsList.markedItem\"\n [attr.aria-selected]=\"item.selected\"\n [attr.id]=\"item?.htmlId\">\n <ng-template #defaultOptionTemplate>\n <span class=\"ng-option-label\" [ngItemLabel]=\"item.label\" [escape]=\"escapeHTML\"></span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"\n\t\t\t\t\t\t\titem.children ? optgroupTemplate || defaultOptionTemplate : optionTemplate || defaultOptionTemplate\n\t\t\t\t\t\t\"\n [ngTemplateOutletContext]=\"{ item: item.value, item$: item, index: item.index, searchTerm: searchTerm }\">\n </ng-template>\n </div>\n }\n @if (showAddTag) {\n <div\n class=\"ng-option\"\n [class.ng-option-marked]=\"!itemsList.markedItem\"\n (mouseover)=\"itemsList.unmarkItem()\"\n role=\"option\"\n (click)=\"selectTag()\">\n <ng-template #defaultTagTemplate>\n\t\t\t\t\t\t<span\n ><span class=\"ng-tag-label\">{{ addTagText }}</span\n >\"{{ searchTerm }}\"</span\n >\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"tagTemplate || defaultTagTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n </ng-template>\n </div>\n }\n </ng-container>\n @if (showNoItemsFound()) {\n <ng-template #defaultNotFoundTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ notFoundText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"notFoundTemplate || defaultNotFoundTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n </ng-template>\n }\n @if (showTypeToSearch()) {\n <ng-template #defaultTypeToSearchTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ typeToSearchText }}</div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"typeToSearchTemplate || defaultTypeToSearchTemplate\"></ng-template>\n }\n @if (loading && itemsList.filteredItems.length === 0) {\n <ng-template #defaultLoadingTextTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ loadingText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"loadingTextTemplate || defaultLoadingTextTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n </ng-template>\n }\n </ng-dropdown-panel>\n}\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}\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"], outputs: ["update", "scroll", "scrollToEnd", "outsideClick"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2771
2890
|
}
|
|
2772
2891
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgSelectComponent, decorators: [{
|
|
2773
2892
|
type: Component,
|
|
2774
|
-
args: [{ selector: 'ng-select', providers: [
|
|
2893
|
+
args: [{ selector: 'ng-select', standalone: true, providers: [
|
|
2775
2894
|
{
|
|
2776
2895
|
provide: NG_VALUE_ACCESSOR,
|
|
2777
2896
|
useExisting: forwardRef(() => NgSelectComponent),
|
|
2778
2897
|
multi: true,
|
|
2779
2898
|
},
|
|
2780
2899
|
NgDropdownPanelService,
|
|
2781
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, 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) {\n <ng-template #defaultPlaceholderTemplate>\n <div class=\"ng-placeholder\">{{ placeholder }}</div>\n </ng-template>\n <ng-template\n\t\t\t[ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\">\n </ng-template>\n\t\t}\n\t\t\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 @if (multiple && multiLabelTemplate && selectedValues.length > 0) {\n <ng-template [ngTemplateOutlet]=\"multiLabelTemplate\"\n [ngTemplateOutletContext]=\"{ items: selectedValues, clear: clearItem }\">\n </ng-template>\n }\n\n <div\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-owns]=\"isOpen ? dropdownId : null\"\n aria-haspopup=\"listbox\"\n class=\"ng-input\"\n role=\"combobox\">\n <input\n #searchInput\n (blur)=\"onInputBlur($event)\"\n (change)=\"$event.stopPropagation()\"\n (compositionend)=\"onCompositionEnd(searchInput.value)\"\n (compositionstart)=\"onCompositionStart()\"\n (focus)=\"onInputFocus($event)\"\n (input)=\"filter(searchInput.value)\"\n [attr.aria-activedescendant]=\"isOpen ? itemsList?.markedItem?.htmlId : null\"\n [attr.aria-controls]=\"isOpen ? dropdownId : null\"\n [attr.id]=\"labelForId\"\n [attr.tabindex]=\"tabIndex\"\n [disabled]=\"disabled\"\n [readOnly]=\"!searchable || itemsList.maxItemsSelected\"\n [value]=\"searchTerm ? searchTerm : ''\"\n aria-autocomplete=\"list\" />\n </div>\n </div>\n\n @if (loading) {\n <ng-template #defaultLoadingSpinnerTemplate>\n <div class=\"ng-spinner-loader\"></div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate || defaultLoadingSpinnerTemplate\"></ng-template>\n }\n\n @if (showClear()) {\n <span class=\"ng-clear-wrapper\" tabindex=\"0\" title=\"{{ clearAllText }}\" #clearButton>\n\t\t\t<span class=\"ng-clear\" aria-hidden=\"true\">\u00D7</span>\n\t\t</span>\n }\n\n <span class=\"ng-arrow-wrapper\">\n\t\t<span class=\"ng-arrow\"></span>\n\t</span>\n</div>\n\n@if (isOpen) {\n <ng-dropdown-panel\n class=\"ng-dropdown-panel\"\n [virtualScroll]=\"virtualScroll\"\n [bufferAmount]=\"bufferAmount\"\n [appendTo]=\"appendTo\"\n [position]=\"dropdownPosition\"\n [headerTemplate]=\"headerTemplate\"\n [footerTemplate]=\"footerTemplate\"\n [filterValue]=\"searchTerm\"\n [items]=\"itemsList.filteredItems\"\n [markedItem]=\"itemsList.markedItem\"\n (update)=\"viewPortItems = $event\"\n (scroll)=\"scroll.emit($event)\"\n (scrollToEnd)=\"scrollToEnd.emit($event)\"\n (outsideClick)=\"close()\"\n [class.ng-select-multiple]=\"multiple\"\n [ngClass]=\"appendTo ? (ngClass ? ngClass : classes) : null\"\n [id]=\"dropdownId\"\n role=\"listbox\"\n aria-label=\"Options list\">\n <ng-container>\n @for (item of viewPortItems; track trackByOption($index, item)) {\n <div\n class=\"ng-option\"\n [attr.role]=\"item.children ? 'group' : 'option'\"\n (click)=\"toggleItem(item)\"\n (mouseover)=\"onItemHover(item)\"\n [class.ng-option-disabled]=\"item.disabled\"\n [class.ng-option-selected]=\"item.selected\"\n [class.ng-optgroup]=\"item.children\"\n [class.ng-option]=\"!item.children\"\n [class.ng-option-child]=\"!!item.parent\"\n [class.ng-option-marked]=\"item === itemsList.markedItem\"\n [attr.aria-selected]=\"item.selected\"\n [attr.id]=\"item?.htmlId\">\n <ng-template #defaultOptionTemplate>\n <span class=\"ng-option-label\" [ngItemLabel]=\"item.label\" [escape]=\"escapeHTML\"></span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"\n\t\t\t\t\t\t\titem.children ? optgroupTemplate || defaultOptionTemplate : optionTemplate || defaultOptionTemplate\n\t\t\t\t\t\t\"\n [ngTemplateOutletContext]=\"{ item: item.value, item$: item, index: item.index, searchTerm: searchTerm }\">\n </ng-template>\n </div>\n }\n @if (showAddTag) {\n <div\n class=\"ng-option\"\n [class.ng-option-marked]=\"!itemsList.markedItem\"\n (mouseover)=\"itemsList.unmarkItem()\"\n role=\"option\"\n (click)=\"selectTag()\">\n <ng-template #defaultTagTemplate>\n\t\t\t\t\t\t<span\n ><span class=\"ng-tag-label\">{{ addTagText }}</span\n >\"{{ searchTerm }}\"</span\n >\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"tagTemplate || defaultTagTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n </ng-template>\n </div>\n }\n </ng-container>\n @if (showNoItemsFound()) {\n <ng-template #defaultNotFoundTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ notFoundText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"notFoundTemplate || defaultNotFoundTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n </ng-template>\n }\n @if (showTypeToSearch()) {\n <ng-template #defaultTypeToSearchTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ typeToSearchText }}</div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"typeToSearchTemplate || defaultTypeToSearchTemplate\"></ng-template>\n }\n @if (loading && itemsList.filteredItems.length === 0) {\n <ng-template #defaultLoadingTextTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ loadingText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"loadingTextTemplate || defaultLoadingTextTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n </ng-template>\n }\n </ng-dropdown-panel>\n}\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}\n"] }]
|
|
2900
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2901
|
+
NgTemplateOutlet,
|
|
2902
|
+
NgItemLabelDirective,
|
|
2903
|
+
NgDropdownPanelComponent,
|
|
2904
|
+
NgClass,
|
|
2905
|
+
], 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) {\n <ng-template #defaultPlaceholderTemplate>\n <div class=\"ng-placeholder\">{{ placeholder }}</div>\n </ng-template>\n <ng-template\n\t\t\t[ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\">\n </ng-template>\n\t\t}\n\t\t\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 @if (multiple && multiLabelTemplate && selectedValues.length > 0) {\n <ng-template [ngTemplateOutlet]=\"multiLabelTemplate\"\n [ngTemplateOutletContext]=\"{ items: selectedValues, clear: clearItem }\">\n </ng-template>\n }\n\n <div\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-owns]=\"isOpen ? dropdownId : null\"\n aria-haspopup=\"listbox\"\n class=\"ng-input\"\n role=\"combobox\">\n <input\n #searchInput\n (blur)=\"onInputBlur($event)\"\n (change)=\"$event.stopPropagation()\"\n (compositionend)=\"onCompositionEnd(searchInput.value)\"\n (compositionstart)=\"onCompositionStart()\"\n (focus)=\"onInputFocus($event)\"\n (input)=\"filter(searchInput.value)\"\n [attr.aria-activedescendant]=\"isOpen ? itemsList?.markedItem?.htmlId : null\"\n [attr.aria-controls]=\"isOpen ? dropdownId : null\"\n [attr.id]=\"labelForId\"\n [attr.tabindex]=\"tabIndex\"\n [disabled]=\"disabled\"\n [readOnly]=\"!searchable || itemsList.maxItemsSelected\"\n [value]=\"searchTerm ? searchTerm : ''\"\n aria-autocomplete=\"list\" />\n </div>\n </div>\n\n @if (loading) {\n <ng-template #defaultLoadingSpinnerTemplate>\n <div class=\"ng-spinner-loader\"></div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate || defaultLoadingSpinnerTemplate\"></ng-template>\n }\n\n @if (showClear()) {\n <span class=\"ng-clear-wrapper\" tabindex=\"0\" title=\"{{ clearAllText }}\" #clearButton>\n\t\t\t<span class=\"ng-clear\" aria-hidden=\"true\">\u00D7</span>\n\t\t</span>\n }\n\n <span class=\"ng-arrow-wrapper\">\n\t\t<span class=\"ng-arrow\"></span>\n\t</span>\n</div>\n\n@if (isOpen) {\n <ng-dropdown-panel\n class=\"ng-dropdown-panel\"\n [virtualScroll]=\"virtualScroll\"\n [bufferAmount]=\"bufferAmount\"\n [appendTo]=\"appendTo\"\n [position]=\"dropdownPosition\"\n [headerTemplate]=\"headerTemplate\"\n [footerTemplate]=\"footerTemplate\"\n [filterValue]=\"searchTerm\"\n [items]=\"itemsList.filteredItems\"\n [markedItem]=\"itemsList.markedItem\"\n (update)=\"viewPortItems = $event\"\n (scroll)=\"scroll.emit($event)\"\n (scrollToEnd)=\"scrollToEnd.emit($event)\"\n (outsideClick)=\"close()\"\n [class.ng-select-multiple]=\"multiple\"\n [ngClass]=\"appendTo ? (ngClass ? ngClass : classes) : null\"\n [id]=\"dropdownId\"\n role=\"listbox\"\n aria-label=\"Options list\">\n <ng-container>\n @for (item of viewPortItems; track trackByOption($index, item)) {\n <div\n class=\"ng-option\"\n [attr.role]=\"item.children ? 'group' : 'option'\"\n (click)=\"toggleItem(item)\"\n (mouseover)=\"onItemHover(item)\"\n [class.ng-option-disabled]=\"item.disabled\"\n [class.ng-option-selected]=\"item.selected\"\n [class.ng-optgroup]=\"item.children\"\n [class.ng-option]=\"!item.children\"\n [class.ng-option-child]=\"!!item.parent\"\n [class.ng-option-marked]=\"item === itemsList.markedItem\"\n [attr.aria-selected]=\"item.selected\"\n [attr.id]=\"item?.htmlId\">\n <ng-template #defaultOptionTemplate>\n <span class=\"ng-option-label\" [ngItemLabel]=\"item.label\" [escape]=\"escapeHTML\"></span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"\n\t\t\t\t\t\t\titem.children ? optgroupTemplate || defaultOptionTemplate : optionTemplate || defaultOptionTemplate\n\t\t\t\t\t\t\"\n [ngTemplateOutletContext]=\"{ item: item.value, item$: item, index: item.index, searchTerm: searchTerm }\">\n </ng-template>\n </div>\n }\n @if (showAddTag) {\n <div\n class=\"ng-option\"\n [class.ng-option-marked]=\"!itemsList.markedItem\"\n (mouseover)=\"itemsList.unmarkItem()\"\n role=\"option\"\n (click)=\"selectTag()\">\n <ng-template #defaultTagTemplate>\n\t\t\t\t\t\t<span\n ><span class=\"ng-tag-label\">{{ addTagText }}</span\n >\"{{ searchTerm }}\"</span\n >\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"tagTemplate || defaultTagTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n </ng-template>\n </div>\n }\n </ng-container>\n @if (showNoItemsFound()) {\n <ng-template #defaultNotFoundTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ notFoundText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"notFoundTemplate || defaultNotFoundTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n </ng-template>\n }\n @if (showTypeToSearch()) {\n <ng-template #defaultTypeToSearchTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ typeToSearchText }}</div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"typeToSearchTemplate || defaultTypeToSearchTemplate\"></ng-template>\n }\n @if (loading && itemsList.filteredItems.length === 0) {\n <ng-template #defaultLoadingTextTemplate>\n <div class=\"ng-option ng-option-disabled\">{{ loadingText }}</div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"loadingTextTemplate || defaultLoadingTextTemplate\"\n [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n </ng-template>\n }\n </ng-dropdown-panel>\n}\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}\n"] }]
|
|
2782
2906
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2783
2907
|
type: Attribute,
|
|
2784
2908
|
args: ['class']
|
|
@@ -2788,6 +2912,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
|
|
|
2788
2912
|
}] }, { type: NgSelectConfig }, { type: undefined, decorators: [{
|
|
2789
2913
|
type: Inject,
|
|
2790
2914
|
args: [SELECTION_MODEL_FACTORY]
|
|
2915
|
+
}, {
|
|
2916
|
+
type: Optional
|
|
2791
2917
|
}] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: ConsoleService }], propDecorators: { bindLabel: [{
|
|
2792
2918
|
type: Input
|
|
2793
2919
|
}], bindValue: [{
|
|
@@ -3018,84 +3144,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
|
|
|
3018
3144
|
args: ['keydown', ['$event']]
|
|
3019
3145
|
}] } });
|
|
3020
3146
|
|
|
3021
|
-
function DefaultSelectionModelFactory() {
|
|
3022
|
-
return new DefaultSelectionModel();
|
|
3023
|
-
}
|
|
3024
|
-
class DefaultSelectionModel {
|
|
3025
|
-
constructor() {
|
|
3026
|
-
this._selected = [];
|
|
3027
|
-
}
|
|
3028
|
-
get value() {
|
|
3029
|
-
return this._selected;
|
|
3030
|
-
}
|
|
3031
|
-
select(item, multiple, groupAsModel) {
|
|
3032
|
-
item.selected = true;
|
|
3033
|
-
if (!item.children || (!multiple && groupAsModel)) {
|
|
3034
|
-
this._selected.push(item);
|
|
3035
|
-
}
|
|
3036
|
-
if (multiple) {
|
|
3037
|
-
if (item.parent) {
|
|
3038
|
-
const childrenCount = item.parent.children.length;
|
|
3039
|
-
const selectedCount = item.parent.children.filter((x) => x.selected).length;
|
|
3040
|
-
item.parent.selected = childrenCount === selectedCount;
|
|
3041
|
-
}
|
|
3042
|
-
else if (item.children) {
|
|
3043
|
-
this._setChildrenSelectedState(item.children, true);
|
|
3044
|
-
this._removeChildren(item);
|
|
3045
|
-
if (groupAsModel && this._activeChildren(item)) {
|
|
3046
|
-
this._selected = [...this._selected.filter((x) => x.parent !== item), item];
|
|
3047
|
-
}
|
|
3048
|
-
else {
|
|
3049
|
-
this._selected = [...this._selected, ...item.children.filter((x) => !x.disabled)];
|
|
3050
|
-
}
|
|
3051
|
-
}
|
|
3052
|
-
}
|
|
3053
|
-
}
|
|
3054
|
-
unselect(item, multiple) {
|
|
3055
|
-
this._selected = this._selected.filter((x) => x !== item);
|
|
3056
|
-
item.selected = false;
|
|
3057
|
-
if (multiple) {
|
|
3058
|
-
if (item.parent && item.parent.selected) {
|
|
3059
|
-
const children = item.parent.children;
|
|
3060
|
-
this._removeParent(item.parent);
|
|
3061
|
-
this._removeChildren(item.parent);
|
|
3062
|
-
this._selected.push(...children.filter((x) => x !== item && !x.disabled));
|
|
3063
|
-
item.parent.selected = false;
|
|
3064
|
-
}
|
|
3065
|
-
else if (item.children) {
|
|
3066
|
-
this._setChildrenSelectedState(item.children, false);
|
|
3067
|
-
this._removeChildren(item);
|
|
3068
|
-
}
|
|
3069
|
-
}
|
|
3070
|
-
}
|
|
3071
|
-
clear(keepDisabled) {
|
|
3072
|
-
this._selected = keepDisabled ? this._selected.filter((x) => x.disabled) : [];
|
|
3073
|
-
}
|
|
3074
|
-
_setChildrenSelectedState(children, selected) {
|
|
3075
|
-
for (const child of children) {
|
|
3076
|
-
if (child.disabled) {
|
|
3077
|
-
continue;
|
|
3078
|
-
}
|
|
3079
|
-
child.selected = selected;
|
|
3080
|
-
}
|
|
3081
|
-
}
|
|
3082
|
-
_removeChildren(parent) {
|
|
3083
|
-
this._selected = [
|
|
3084
|
-
...this._selected.filter((x) => x.parent !== parent),
|
|
3085
|
-
...parent.children.filter((x) => x.parent === parent && x.disabled && x.selected),
|
|
3086
|
-
];
|
|
3087
|
-
}
|
|
3088
|
-
_removeParent(parent) {
|
|
3089
|
-
this._selected = this._selected.filter((x) => x !== parent);
|
|
3090
|
-
}
|
|
3091
|
-
_activeChildren(item) {
|
|
3092
|
-
return item.children.every((x) => !x.disabled || x.selected);
|
|
3093
|
-
}
|
|
3094
|
-
}
|
|
3095
|
-
|
|
3096
3147
|
class NgSelectModule {
|
|
3097
3148
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3098
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0", ngImport: i0, type: NgSelectModule,
|
|
3149
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0", ngImport: i0, type: NgSelectModule, imports: [NgDropdownPanelComponent,
|
|
3099
3150
|
NgOptionComponent,
|
|
3100
3151
|
NgSelectComponent,
|
|
3101
3152
|
NgOptgroupTemplateDirective,
|
|
@@ -3110,7 +3161,7 @@ class NgSelectModule {
|
|
|
3110
3161
|
NgLoadingTextTemplateDirective,
|
|
3111
3162
|
NgTagTemplateDirective,
|
|
3112
3163
|
NgLoadingSpinnerTemplateDirective,
|
|
3113
|
-
NgItemLabelDirective],
|
|
3164
|
+
NgItemLabelDirective], exports: [NgSelectComponent,
|
|
3114
3165
|
NgOptionComponent,
|
|
3115
3166
|
NgOptgroupTemplateDirective,
|
|
3116
3167
|
NgOptionTemplateDirective,
|
|
@@ -3124,12 +3175,12 @@ class NgSelectModule {
|
|
|
3124
3175
|
NgLoadingTextTemplateDirective,
|
|
3125
3176
|
NgTagTemplateDirective,
|
|
3126
3177
|
NgLoadingSpinnerTemplateDirective] }); }
|
|
3127
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgSelectModule, providers: [{ provide: SELECTION_MODEL_FACTORY, useValue: DefaultSelectionModelFactory }]
|
|
3178
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgSelectModule, providers: [{ provide: SELECTION_MODEL_FACTORY, useValue: DefaultSelectionModelFactory }] }); }
|
|
3128
3179
|
}
|
|
3129
3180
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: NgSelectModule, decorators: [{
|
|
3130
3181
|
type: NgModule,
|
|
3131
3182
|
args: [{
|
|
3132
|
-
|
|
3183
|
+
imports: [
|
|
3133
3184
|
NgDropdownPanelComponent,
|
|
3134
3185
|
NgOptionComponent,
|
|
3135
3186
|
NgSelectComponent,
|
|
@@ -3147,7 +3198,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
|
|
|
3147
3198
|
NgLoadingSpinnerTemplateDirective,
|
|
3148
3199
|
NgItemLabelDirective,
|
|
3149
3200
|
],
|
|
3150
|
-
imports: [CommonModule],
|
|
3151
3201
|
exports: [
|
|
3152
3202
|
NgSelectComponent,
|
|
3153
3203
|
NgOptionComponent,
|