ng-select2-component 11.1.0 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1272 +0,0 @@
1
- import * as i4 from '@angular/cdk/overlay';
2
- import { CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
3
- import * as i0 from '@angular/core';
4
- import { EventEmitter, TemplateRef, Component, Optional, Self, Attribute, Input, Output, HostBinding, ViewChild, ViewChildren, Directive, NgModule } from '@angular/core';
5
- import { Subject } from 'rxjs';
6
- import * as i1 from '@angular/cdk/scrolling';
7
- import * as i2 from '@angular/forms';
8
- import { FormsModule, ReactiveFormsModule } from '@angular/forms';
9
- import * as i3 from '@angular/common';
10
- import { CommonModule } from '@angular/common';
11
- import * as i5 from 'ngx-infinite-scroll';
12
- import { InfiniteScrollModule } from 'ngx-infinite-scroll';
13
-
14
- const timeout = 200;
15
- const unicodePatterns = [
16
- { l: 'a', s: /[ⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ]/gi },
17
- { l: 'aa', s: /ꜳ/gi },
18
- { l: 'ae', s: /[æǽǣ]/gi },
19
- { l: 'ao', s: /ꜵ/gi },
20
- { l: 'au', s: /ꜷ/gi },
21
- { l: 'av', s: /[ꜹꜻ]/gi },
22
- { l: 'ay', s: /ꜽ/gi },
23
- { l: 'b', s: /[ⓑbḃḅḇƀƃɓ]/gi },
24
- { l: 'c', s: /[ⓒcćĉċčçḉƈȼꜿↄ]/gi },
25
- { l: 'd', s: /[ⓓdḋďḍḑḓḏđƌɖɗꝺ]/gi },
26
- { l: 'dz', s: /[dzdž]/gi },
27
- { l: 'e', s: /[ⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ]/gi },
28
- { l: 'f', s: /[ⓕfḟƒꝼ]/gi },
29
- { l: 'g', s: /[ⓖgǵĝḡğġǧģǥɠꞡᵹꝿ]/gi },
30
- { l: 'h', s: /[ⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ]/gi },
31
- { l: 'hv', s: /ƕ/gi },
32
- { l: 'i', s: /[ⓘiìíîĩīĭİïḯỉǐȉȋịįḭɨı]/gi },
33
- { l: 'j', s: /[ⓙjĵǰɉ]/gi },
34
- { l: 'k', s: /[ⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ]/gi },
35
- { l: 'l', s: /[ⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇꝆ]/gi },
36
- { l: 'lj', s: /lj/gi },
37
- { l: 'm', s: /[ⓜmḿṁṃɱɯ]/gi },
38
- { l: 'n', s: /[ⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ]/gi },
39
- { l: 'nj', s: /nj/gi },
40
- { l: 'o', s: /[ⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔƟꝋꝍɵ]/gi },
41
- { l: 'oi', s: /ƣ/gi },
42
- { l: 'oe', s: /œ/gi },
43
- { l: 'oo', s: /ꝏ/gi },
44
- { l: 'ou', s: /ȣ/gi },
45
- { l: 'p', s: /[ⓟpṕṗƥᵽꝑꝓꝕ]/gi },
46
- { l: 'q', s: /[ⓠqɋꝗꝙ]/gi },
47
- { l: 'r', s: /[ⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ]/gi },
48
- { l: 's', s: /[ⓢsßẞśṥŝṡšṧṣṩșşȿꞩꞅẛ]/gi },
49
- { l: 't', s: /[ⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ]/gi },
50
- { l: 'tz', s: /ꜩ/gi },
51
- { l: 'u', s: /[ⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ]/gi },
52
- { l: 'v', s: /[ⓥvṽṿʋꝟʌ]/gi },
53
- { l: 'vy', s: /ꝡ/gi },
54
- { l: 'w', s: /[ⓦwẁẃŵẇẅẘẉⱳ]/gi },
55
- { l: 'x', s: /[ⓧxẋẍ]/gi },
56
- { l: 'y', s: /[ⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ]/gi },
57
- { l: 'z', s: /[ⓩzźẑżžẓẕƶȥɀⱬꝣ]/gi },
58
- ];
59
- const defaultMinCountForSearch = 6;
60
- const protectRegexp = new RegExp('[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]', 'g');
61
-
62
- class Select2Utils {
63
- static getOptionByValue(data, value) {
64
- if (Array.isArray(data)) {
65
- for (const groupOrOption of data) {
66
- const options = groupOrOption.options;
67
- if (options) {
68
- for (const option of options) {
69
- if (option.value === value) {
70
- return option;
71
- }
72
- }
73
- }
74
- else if (groupOrOption.value === value) {
75
- return groupOrOption;
76
- }
77
- }
78
- }
79
- return null;
80
- }
81
- static getOptionsByValue(data, value, multiple) {
82
- if (multiple) {
83
- const values = Array.isArray(value) ? value : [];
84
- const result = [];
85
- for (const v of values) {
86
- const option = Select2Utils.getOptionByValue(data, v);
87
- if (option) {
88
- result.push(option);
89
- }
90
- }
91
- return result;
92
- }
93
- return Select2Utils.getOptionByValue(data, value);
94
- }
95
- static getFirstAvailableOption(data) {
96
- if (Array.isArray(data)) {
97
- for (const groupOrOption of data) {
98
- const options = groupOrOption.options;
99
- if (options) {
100
- for (const option of options) {
101
- if (!option.disabled) {
102
- return option.value;
103
- }
104
- }
105
- }
106
- else {
107
- const option = groupOrOption;
108
- if (!option.disabled) {
109
- return option.value;
110
- }
111
- }
112
- }
113
- }
114
- return null;
115
- }
116
- static valueIsNotInFilteredData(filteredData, value) {
117
- if (Select2Utils.isNullOrUndefined(value)) {
118
- return true;
119
- }
120
- for (const groupOrOption of filteredData) {
121
- const options = groupOrOption.options;
122
- if (options) {
123
- for (const option of options) {
124
- if (option.value === value) {
125
- return false;
126
- }
127
- }
128
- }
129
- else if (groupOrOption.value === value) {
130
- return false;
131
- }
132
- }
133
- return true;
134
- }
135
- // eslint-disable-next-line
136
- static getPreviousOption(filteredData, hoveringValue) {
137
- let findIt = Select2Utils.isNullOrUndefined(hoveringValue);
138
- for (let i = filteredData.length - 1; i >= 0; i--) {
139
- const groupOrOption = filteredData[i];
140
- const options = groupOrOption.options;
141
- if (options) {
142
- for (let j = options.length - 1; j >= 0; j--) {
143
- const option = options[j];
144
- if (findIt && !option.disabled && !option.hide) {
145
- return option;
146
- }
147
- if (!findIt) {
148
- findIt = option.value === hoveringValue;
149
- }
150
- }
151
- }
152
- else {
153
- const option = groupOrOption;
154
- if (findIt && !option.disabled && !option.hide) {
155
- return option;
156
- }
157
- if (!findIt) {
158
- findIt = option.value === hoveringValue;
159
- }
160
- }
161
- }
162
- return null;
163
- }
164
- // eslint-disable-next-line
165
- static getNextOption(filteredData, hoveringValue) {
166
- let findIt = Select2Utils.isNullOrUndefined(hoveringValue);
167
- for (const groupOrOption of filteredData) {
168
- const options = groupOrOption.options;
169
- if (options) {
170
- for (const option of options) {
171
- if (findIt) {
172
- if (!option.disabled && !option.hide) {
173
- return option;
174
- }
175
- }
176
- else if (!findIt) {
177
- findIt = option.value === hoveringValue;
178
- }
179
- }
180
- }
181
- else {
182
- const option = groupOrOption;
183
- if (findIt) {
184
- if (!option.disabled && !option.hide) {
185
- return option;
186
- }
187
- }
188
- else if (!findIt) {
189
- findIt = option.value === hoveringValue;
190
- }
191
- }
192
- }
193
- return null;
194
- }
195
- static getReduceData(data, maxResults = 0) {
196
- if (maxResults > 0) {
197
- let counter = 0;
198
- const result = [];
199
- // debugger;
200
- for (const groupOrOption of data) {
201
- const options = groupOrOption.options;
202
- if (options) {
203
- const group = Object.assign(Object.assign({}, groupOrOption), { options: [] });
204
- result.push(group);
205
- for (const item of options) {
206
- group.options.push(item);
207
- counter++;
208
- if (counter === maxResults) {
209
- return { result, reduce: true };
210
- }
211
- }
212
- }
213
- else {
214
- result.push(groupOrOption);
215
- counter++;
216
- }
217
- if (counter === maxResults) {
218
- return { result, reduce: true };
219
- }
220
- }
221
- return { result, reduce: false };
222
- }
223
- else {
224
- return { result: data, reduce: false };
225
- }
226
- }
227
- static getFilteredData(data, searchText, editPattern) {
228
- if (searchText) {
229
- const result = [];
230
- for (const groupOrOption of data) {
231
- const options = groupOrOption.options;
232
- if (options) {
233
- if (options.some(group => Select2Utils.containSearchText(group.label, searchText, editPattern))) {
234
- const filteredOptions = options.filter(group => Select2Utils.containSearchText(group.label, searchText, editPattern));
235
- result.push(Object.assign(Object.assign({}, groupOrOption), { options: filteredOptions }));
236
- }
237
- }
238
- else if (Select2Utils.containSearchText(groupOrOption.label, searchText, editPattern)) {
239
- result.push(groupOrOption);
240
- }
241
- }
242
- return result;
243
- }
244
- else {
245
- return data;
246
- }
247
- }
248
- static getFilteredSelectedData(data, selectedOptions) {
249
- const result = [];
250
- for (const groupOrOption of data) {
251
- const options = groupOrOption.options;
252
- if (options) {
253
- const filteredOptions = options.filter(group => Select2Utils.isSelected(selectedOptions, group, true) === 'false');
254
- if (filteredOptions.length) {
255
- result.push(Object.assign(Object.assign({}, groupOrOption), { options: filteredOptions }));
256
- }
257
- }
258
- else if (Select2Utils.isSelected(selectedOptions, groupOrOption, true) === 'false') {
259
- result.push(groupOrOption);
260
- }
261
- }
262
- return result;
263
- }
264
- static isSearchboxHiddex(data, minCountForSearch) {
265
- if (minCountForSearch === '' ||
266
- minCountForSearch === undefined ||
267
- minCountForSearch === null ||
268
- isNaN(+minCountForSearch)) {
269
- minCountForSearch = defaultMinCountForSearch;
270
- }
271
- const optionCount = Select2Utils.getOptionsCount(data);
272
- return optionCount < +minCountForSearch;
273
- }
274
- static isSelected(options, option, multiple) {
275
- return multiple
276
- ? options && options.some(op => op.value === option.value)
277
- ? 'true'
278
- : 'false'
279
- : options && option.value === options.value
280
- ? 'true'
281
- : 'false';
282
- }
283
- static removeSelection(options, option) {
284
- for (let i = 0; i < options.length; i++) {
285
- if (options[i].value === option.value) {
286
- options.splice(i, 1);
287
- return;
288
- }
289
- }
290
- }
291
- static getOptionsCount(data) {
292
- let count = 0;
293
- if (Array.isArray(data)) {
294
- for (const groupOrOption of data) {
295
- const options = groupOrOption.options;
296
- if (options) {
297
- count += options.length;
298
- }
299
- else {
300
- count++;
301
- }
302
- }
303
- }
304
- return count;
305
- }
306
- static isNullOrUndefined(value) {
307
- return value === null || value === undefined;
308
- }
309
- static containSearchText(label, searchText, editPattern) {
310
- return searchText
311
- ? Select2Utils.formatSansUnicode(label).match(new RegExp(Select2Utils.formatPattern(searchText, editPattern), 'i')) !== null
312
- : true;
313
- }
314
- static protectPattern(str) {
315
- return str.replace(protectRegexp, '\\$&');
316
- }
317
- static formatSansUnicode(str) {
318
- for (const unicodePattern of unicodePatterns) {
319
- str = str.replace(unicodePattern.s, unicodePattern.l);
320
- }
321
- return str;
322
- }
323
- static formatPattern(str, editPattern) {
324
- str = Select2Utils.formatSansUnicode(Select2Utils.protectPattern(str));
325
- if (editPattern && typeof editPattern === 'function') {
326
- str = editPattern(str);
327
- }
328
- return str;
329
- }
330
- }
331
-
332
- let nextUniqueId = 0;
333
- const displaySearchStatusList = ['default', 'hidden', 'always'];
334
- class Select2 {
335
- /** data of options & optiongrps */
336
- set data(data) {
337
- this._data = data;
338
- this.updateFilteredData();
339
- }
340
- get multiple() {
341
- return this._multiple;
342
- }
343
- set multiple(value) {
344
- this._multiple = this._coerceBooleanProperty(value);
345
- this.ngOnInit();
346
- }
347
- /** use the material style */
348
- get overlay() {
349
- return this._overlay;
350
- }
351
- set overlay(value) {
352
- this._overlay = this._coerceBooleanProperty(value);
353
- }
354
- /** infinite scroll activated */
355
- get infiniteScroll() {
356
- return this._infiniteScroll;
357
- }
358
- set infiniteScroll(value) {
359
- this._infiniteScroll = this._coerceBooleanProperty(value);
360
- }
361
- /** auto create if not existe */
362
- get autoCreate() {
363
- return this._autoCreate;
364
- }
365
- set autoCreate(value) {
366
- this._autoCreate = this._coerceBooleanProperty(value);
367
- }
368
- /** no template for label selection */
369
- get noLabelTemplate() {
370
- return this._noLabelTemplate;
371
- }
372
- set noLabelTemplate(value) {
373
- this._noLabelTemplate = this._coerceBooleanProperty(value);
374
- }
375
- get select2Options() {
376
- return this.multiple ? this.option : null;
377
- }
378
- get select2Option() {
379
- return this.multiple ? null : this.option;
380
- }
381
- get searchText() {
382
- return this.innerSearchText;
383
- }
384
- set searchText(text) {
385
- if (this.customSearchEnabled) {
386
- this.search.emit({
387
- component: this,
388
- value: this._value,
389
- search: text,
390
- });
391
- }
392
- this.innerSearchText = text;
393
- }
394
- /** minimal data of show the search field */
395
- get minCountForSearch() {
396
- return this._minCountForSearch;
397
- }
398
- set minCountForSearch(value) {
399
- this._minCountForSearch = value;
400
- this.updateSearchBox();
401
- }
402
- /** Unique id of the element. */
403
- get id() {
404
- return this._id;
405
- }
406
- set id(value) {
407
- this._id = value || this._uid;
408
- }
409
- /** Whether the element is required. */
410
- get required() {
411
- return this._required;
412
- }
413
- set required(value) {
414
- this._required = this._coerceBooleanProperty(value);
415
- }
416
- /** Whether selected items should be hidden. */
417
- get disabled() {
418
- return this._control ? this._control.disabled : this._disabled;
419
- }
420
- set disabled(value) {
421
- this._disabled = this._coerceBooleanProperty(value);
422
- }
423
- /** Whether items are hidden when has. */
424
- get hideSelectedItems() {
425
- return this._hideSelectedItems;
426
- }
427
- set hideSelectedItems(value) {
428
- this._hideSelectedItems = this._coerceBooleanProperty(value);
429
- }
430
- /** Whether the element is readonly. */
431
- get readonly() {
432
- return this._readonly;
433
- }
434
- set readonly(value) {
435
- this._readonly = this._coerceBooleanProperty(value);
436
- }
437
- /** The input element's value. */
438
- get value() {
439
- return this._value;
440
- }
441
- set value(value) {
442
- if (this.testValueChange(this._value, value)) {
443
- setTimeout(() => {
444
- this._value = value;
445
- this.writeValue(value);
446
- }, 10);
447
- }
448
- }
449
- /** Tab index for the select2 element. */
450
- get tabIndex() {
451
- return this.disabled ? -1 : this._tabIndex;
452
- }
453
- set tabIndex(value) {
454
- if (typeof value !== 'undefined') {
455
- this._tabIndex = value;
456
- }
457
- }
458
- /** reset with no selected value */
459
- get resettable() {
460
- return this._resettable;
461
- }
462
- set resettable(value) {
463
- this._resettable = this._coerceBooleanProperty(value);
464
- }
465
- get ariaInvalid() {
466
- return this._isErrorState();
467
- }
468
- get classMaterial() {
469
- return this.styleMode === 'material';
470
- }
471
- get classNostyle() {
472
- return this.styleMode === 'noStyle';
473
- }
474
- get select2above() {
475
- return !this.overlay ? this.listPosition === 'above' : this._isAbobeOverlay();
476
- }
477
- get _positions() {
478
- return this.listPosition === 'auto' ? undefined : null;
479
- }
480
- get resultsElement() {
481
- var _a;
482
- return (_a = this.resultContainer) === null || _a === void 0 ? void 0 : _a.nativeElement;
483
- }
484
- constructor(_viewportRuler, _changeDetectorRef, _parentForm, _parentFormGroup, _control, tabIndex) {
485
- this._viewportRuler = _viewportRuler;
486
- this._changeDetectorRef = _changeDetectorRef;
487
- this._parentForm = _parentForm;
488
- this._parentFormGroup = _parentFormGroup;
489
- this._control = _control;
490
- this.minCharForSearch = 0;
491
- this.limitSelection = 0;
492
- this.listPosition = 'below';
493
- /** use the material style */
494
- this.styleMode = 'default';
495
- /** maximum results limit (0 = no limit) */
496
- this.maxResults = 0;
497
- /** message when maximum results */
498
- this.maxResultsMessage = 'Too many results…';
499
- /** infinite scroll distance */
500
- this.infiniteScrollDistance = 1.5;
501
- /** infinite scroll distance */
502
- this.infiniteScrollThrottle = 150;
503
- /** the max height of the results container when opening the select */
504
- this.resultMaxHeight = '200px';
505
- this.update = new EventEmitter();
506
- this.open = new EventEmitter();
507
- this.close = new EventEmitter();
508
- this.focus = new EventEmitter();
509
- this.blur = new EventEmitter();
510
- this.search = new EventEmitter();
511
- this.scroll = new EventEmitter();
512
- this.removeOption = new EventEmitter();
513
- this.option = null;
514
- this.isOpen = false;
515
- /** Whether the element is focused or not. */
516
- this.focused = false;
517
- this.hoveringValue = null;
518
- this.innerSearchText = '';
519
- this._stateChanges = new Subject();
520
- this._disabled = false;
521
- this._required = false;
522
- this._readonly = false;
523
- this._multiple = false;
524
- this._overlay = false;
525
- this._resettable = false;
526
- this._hideSelectedItems = false;
527
- this._clickDetection = false;
528
- this._uid = `select2-${nextUniqueId++}`;
529
- this._infiniteScroll = true;
530
- this._autoCreate = true;
531
- this._noLabelTemplate = true;
532
- /** View -> model callback called when select has been touched */
533
- this._onTouched = () => {
534
- // do nothing
535
- };
536
- /** View -> model callback called when value changes */
537
- this._onChange = () => {
538
- // do nothing
539
- };
540
- // eslint-disable-next-line no-self-assign
541
- this.id = this.id;
542
- this._tabIndex = parseInt(tabIndex, 10) || 0;
543
- if (this._control) {
544
- this._control.valueAccessor = this;
545
- }
546
- this._clickDetectionFc = this.clickDetection.bind(this);
547
- }
548
- ngOnInit() {
549
- this._viewportRuler.change(100).subscribe(() => {
550
- if (this.isOpen) {
551
- this.triggerRect();
552
- }
553
- });
554
- const option = Select2Utils.getOptionsByValue(this._data, this._control ? this._control.value : this.value, this.multiple);
555
- if (option !== null) {
556
- this.option = option;
557
- }
558
- if (!Array.isArray(option)) {
559
- this.hoveringValue = this.value;
560
- }
561
- this.updateSearchBox();
562
- }
563
- ngAfterViewInit() {
564
- this.cdkConnectedOverlay.positionChange.subscribe((posChange) => {
565
- var _a;
566
- if (this.listPosition === 'auto' &&
567
- ((_a = posChange.connectionPair) === null || _a === void 0 ? void 0 : _a.originY) &&
568
- this._overlayPosition !== posChange.connectionPair.originY) {
569
- this.triggerRect();
570
- this._overlayPosition = posChange.connectionPair.originY;
571
- this._changeDetectorRef.detectChanges();
572
- }
573
- });
574
- this.selectionElement = this.selection.nativeElement;
575
- this.triggerRect();
576
- }
577
- ngDoCheck() {
578
- var _a;
579
- this.updateSearchBox();
580
- this._dirtyCheckNativeValue();
581
- if (this._triggerRect) {
582
- if (this.overlayWidth !== this._triggerRect.width) {
583
- this.overlayWidth = this._triggerRect.width;
584
- }
585
- if (((_a = this._dropdownRect) === null || _a === void 0 ? void 0 : _a.height) > 0 && this.overlayHeight !== this._dropdownRect.height) {
586
- this.overlayHeight = this.listPosition === 'auto' ? this._dropdownRect.height : 0;
587
- }
588
- }
589
- }
590
- ngOnDestroy() {
591
- window.document.body.removeEventListener('click', this._clickDetectionFc);
592
- }
593
- updateSearchBox() {
594
- const hidden = this.customSearchEnabled
595
- ? false
596
- : Select2Utils.isSearchboxHiddex(this._data, this._minCountForSearch);
597
- if (this.isSearchboxHidden !== hidden) {
598
- this.isSearchboxHidden = hidden;
599
- }
600
- }
601
- hideSearch() {
602
- const displaySearchStatus = displaySearchStatusList.indexOf(this.displaySearchStatus) > -1 ? this.displaySearchStatus : 'default';
603
- return (displaySearchStatus === 'default' && this.isSearchboxHidden) || displaySearchStatus === 'hidden';
604
- }
605
- getOptionStyle(option) {
606
- return ('select2-results__option ' +
607
- (option.hide ? 'select2-results__option--hide ' : '') +
608
- (option.value === this.hoveringValue ? 'select2-results__option--highlighted ' : '') +
609
- (option.classes || ''));
610
- }
611
- mouseenter(option) {
612
- if (!option.disabled) {
613
- this.hoveringValue = option.value;
614
- }
615
- }
616
- click(option) {
617
- if (this.testSelection(option)) {
618
- this.select(option);
619
- }
620
- }
621
- reset(event) {
622
- this.select(null);
623
- this.stopEvent(event);
624
- }
625
- prevChange(event) {
626
- event.stopPropagation();
627
- }
628
- stopEvent(event) {
629
- event.preventDefault();
630
- event.stopPropagation();
631
- }
632
- toggleOpenAndClose(focus = true, open) {
633
- if (this.disabled) {
634
- return;
635
- }
636
- this._focus(focus);
637
- this.isOpen = open !== null && open !== void 0 ? open : !this.isOpen;
638
- if (this.isOpen) {
639
- this.innerSearchText = '';
640
- this.updateFilteredData();
641
- this._focusSearchboxOrResultsElement(focus);
642
- setTimeout(() => {
643
- if (this.option) {
644
- const option = this.option instanceof Array ? this.option[0] : this.option;
645
- this.updateScrollFromOption(option);
646
- }
647
- else if (this.resultsElement) {
648
- this.resultsElement.scrollTop = 0;
649
- }
650
- setTimeout(() => {
651
- var _a, _b;
652
- this.triggerRect();
653
- (_b = (_a = this.cdkConnectedOverlay) === null || _a === void 0 ? void 0 : _a.overlayRef) === null || _b === void 0 ? void 0 : _b.updatePosition();
654
- }, 100);
655
- });
656
- this.open.emit(this);
657
- }
658
- else {
659
- this.close.emit(this);
660
- }
661
- if (this.isOpen && !this._clickDetection && focus) {
662
- setTimeout(() => {
663
- window.document.body.addEventListener('click', this._clickDetectionFc, false);
664
- this._clickDetection = true;
665
- }, timeout);
666
- }
667
- this._changeDetectorRef.markForCheck();
668
- }
669
- hasTemplate(option, defaut) {
670
- var _a, _b;
671
- return (this.templates instanceof TemplateRef ||
672
- ((_a = this.templates) === null || _a === void 0 ? void 0 : _a[option.templateId]) instanceof TemplateRef ||
673
- ((_b = this.templates) === null || _b === void 0 ? void 0 : _b[defaut]) instanceof TemplateRef);
674
- }
675
- getTemplate(option, defaut) {
676
- return this.hasTemplate(option, defaut)
677
- ? this.templates[option.templateId] || this.templates[defaut] || this.templates
678
- : undefined;
679
- }
680
- triggerRect() {
681
- var _a;
682
- this._triggerRect = this.selectionElement.getBoundingClientRect();
683
- this._dropdownRect = ((_a = this.dropdown) === null || _a === void 0 ? void 0 : _a.nativeElement)
684
- ? this.dropdown.nativeElement.getBoundingClientRect()
685
- : undefined;
686
- }
687
- testSelection(option) {
688
- if (option.disabled) {
689
- return false;
690
- }
691
- return (!this.multiple ||
692
- !this.limitSelection ||
693
- (Array.isArray(this._value) && this._value.length < this.limitSelection));
694
- }
695
- testValueChange(value1, value2) {
696
- if (((value1 === null || value1 === undefined) && (value2 === null || value2 === undefined)) ||
697
- value1 === value2) {
698
- return false;
699
- }
700
- if (this.multiple &&
701
- (value1 === null || value1 === void 0 ? void 0 : value1.length) &&
702
- (value2 === null || value2 === void 0 ? void 0 : value2.length) &&
703
- value1.length === value2.length) {
704
- for (const e1 of value1) {
705
- const test = value2.indexOf(e1) > -1;
706
- if (!test) {
707
- return true;
708
- }
709
- }
710
- return false;
711
- }
712
- return true;
713
- }
714
- updateFilteredData() {
715
- setTimeout(() => {
716
- let result = this._data;
717
- if (this.multiple && this.hideSelectedItems) {
718
- result = Select2Utils.getFilteredSelectedData(result, this.option);
719
- }
720
- if (!this.customSearchEnabled && this.searchText && this.searchText.length >= +this.minCharForSearch) {
721
- result = Select2Utils.getFilteredData(result, this.searchText, this.editPattern);
722
- }
723
- if (this.maxResults > 0) {
724
- const data = Select2Utils.getReduceData(result, +this.maxResults);
725
- result = data.result;
726
- this.maxResultsExceeded = data.reduce;
727
- }
728
- else {
729
- this.maxResultsExceeded = false;
730
- }
731
- if (Select2Utils.valueIsNotInFilteredData(result, this.hoveringValue)) {
732
- this.hoveringValue = Select2Utils.getFirstAvailableOption(result);
733
- }
734
- this.filteredData = result;
735
- this._changeDetectorRef.markForCheck();
736
- });
737
- }
738
- clickDetection(e) {
739
- if (!this.ifParentContainsClass(e.target, 'selection')) {
740
- if (this.isOpen && !this.ifParentContainsClass(e.target, 'select2-dropdown')) {
741
- this.toggleOpenAndClose();
742
- }
743
- if (!this.ifParentContainsId(e.target, this._id)) {
744
- this.clickExit();
745
- }
746
- }
747
- else if (this.isOpen && !this.ifParentContainsId(e.target, this._id)) {
748
- this.toggleOpenAndClose();
749
- this.clickExit();
750
- }
751
- }
752
- clickExit() {
753
- this._focus(false);
754
- window.document.body.removeEventListener('click', this._clickDetectionFc);
755
- this._clickDetection = false;
756
- }
757
- ifParentContainsClass(element, cssClass) {
758
- return this.getParentElementByClass(element, cssClass) !== null;
759
- }
760
- ifParentContainsId(element, id) {
761
- return this.getParentElementById(element, id) !== null;
762
- }
763
- getParentElementByClass(element, cssClass) {
764
- return this.containClasses(element, cssClass.trim().split(/\s+/))
765
- ? element
766
- : element.parentElement
767
- ? this.getParentElementByClass(element.parentElement, cssClass)
768
- : null;
769
- }
770
- getParentElementById(element, id) {
771
- return element.id === id
772
- ? element
773
- : element.parentElement
774
- ? this.getParentElementById(element.parentElement, id)
775
- : null;
776
- }
777
- containClasses(element, cssClasses) {
778
- if (!element.classList) {
779
- return false;
780
- }
781
- for (const cssClass of cssClasses) {
782
- if (!element.classList.contains(cssClass)) {
783
- return false;
784
- }
785
- }
786
- return true;
787
- }
788
- focusin() {
789
- if (!this.disabled) {
790
- this._focus(true);
791
- }
792
- }
793
- focusout() {
794
- if (this.selectionElement && !this.selectionElement.classList.contains('select2-focused')) {
795
- this._focus(false);
796
- this._onTouched();
797
- }
798
- }
799
- select(option) {
800
- var _a;
801
- let value;
802
- if (option !== null) {
803
- if (this.multiple) {
804
- const options = this.option;
805
- const index = options.findIndex(op => op.value === option.value);
806
- if (index === -1) {
807
- options.push(option);
808
- }
809
- else {
810
- options.splice(index, 1);
811
- }
812
- value = this.option.map(op => op.value);
813
- }
814
- else {
815
- this.option = option;
816
- if (this.isOpen) {
817
- this.isOpen = false;
818
- this.close.emit(this);
819
- (_a = this.selectionElement) === null || _a === void 0 ? void 0 : _a.focus();
820
- }
821
- value = this.option.value;
822
- }
823
- }
824
- else {
825
- this.option = null;
826
- }
827
- if (this.multiple && this.hideSelectedItems) {
828
- this.updateFilteredData();
829
- }
830
- if (this._control) {
831
- this._onChange(value);
832
- }
833
- else {
834
- this._value = value;
835
- }
836
- this.update.emit({
837
- component: this,
838
- value: value,
839
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
840
- });
841
- }
842
- keyDown(e, create = false) {
843
- if (create && this._testKey(e, ['Enter', 13])) {
844
- this.createAndAdd(e);
845
- return;
846
- }
847
- if (this._testKey(e, ['ArrowDown', 40])) {
848
- this.moveDown();
849
- e.preventDefault();
850
- }
851
- else if (this._testKey(e, ['ArrowUp', 38])) {
852
- this.moveUp();
853
- e.preventDefault();
854
- }
855
- else if (this._testKey(e, ['Enter', 13])) {
856
- this.selectByEnter();
857
- e.preventDefault();
858
- }
859
- else if (this._testKey(e, ['Escape', 'Tab', 9, 27]) && this.isOpen) {
860
- this.toggleOpenAndClose();
861
- this._focus(false);
862
- }
863
- }
864
- openKey(e, create = false) {
865
- if (create && this._testKey(e, ['Enter', 13])) {
866
- this.createAndAdd(e);
867
- return;
868
- }
869
- if (this._testKey(e, ['ArrowDown', 'ArrowUp', 'Enter', 40, 38, 13])) {
870
- this.toggleOpenAndClose();
871
- e.preventDefault();
872
- }
873
- else if (this._testKey(e, ['Escape', 'Tab', 9, 27])) {
874
- this._focus(false);
875
- this._onTouched();
876
- }
877
- }
878
- searchUpdate(e) {
879
- this.searchText = e.target.value;
880
- this.updateFilteredData();
881
- }
882
- trackBy(_index, item) {
883
- return item.value;
884
- }
885
- isSelected(option) {
886
- return Select2Utils.isSelected(this.option, option, this.multiple);
887
- }
888
- isDisabled(option) {
889
- return option.disabled ? 'true' : 'false';
890
- }
891
- removeSelection(e, option) {
892
- Select2Utils.removeSelection(this.option, option);
893
- if (this.multiple && this.hideSelectedItems) {
894
- this.updateFilteredData();
895
- }
896
- const value = this.option.map(op => op.value);
897
- if (this._control) {
898
- this._onChange(value);
899
- }
900
- else {
901
- this._value = value;
902
- }
903
- this.update.emit({
904
- component: this,
905
- value: value,
906
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
907
- });
908
- this.removeOption.emit({
909
- component: this,
910
- value: value,
911
- removedOption: option,
912
- });
913
- e.preventDefault();
914
- e.stopPropagation();
915
- if (this.isOpen) {
916
- this._focusSearchboxOrResultsElement();
917
- }
918
- }
919
- /**
920
- * Sets the model value. Implemented as part of ControlValueAccessor.
921
- * @param value
922
- */
923
- writeValue(value) {
924
- this._setSelectionByValue(value);
925
- }
926
- /**
927
- * Saves a callback function to be invoked when the select's value
928
- * changes from user input. Part of the ControlValueAccessor interface
929
- * required to integrate with Angular's core forms API.
930
- *
931
- * @param fn Callback to be triggered when the value changes.
932
- */
933
- registerOnChange(fn) {
934
- this._onChange = fn;
935
- }
936
- /**
937
- * Saves a callback function to be invoked when the select is blurred
938
- * by the user. Part of the ControlValueAccessor interface required
939
- * to integrate with Angular's core forms API.
940
- *
941
- * @param fn Callback to be triggered when the component has been touched.
942
- */
943
- registerOnTouched(fn) {
944
- this._onTouched = fn;
945
- }
946
- /**
947
- * Sets whether the component should be disabled.
948
- * Implemented as part of ControlValueAccessor.
949
- * @param isDisabled
950
- */
951
- setDisabledState(isDisabled) {
952
- this.disabled = isDisabled;
953
- }
954
- onScroll(way) {
955
- this.scroll.emit({
956
- component: this,
957
- way,
958
- search: this.innerSearchText,
959
- });
960
- }
961
- _isErrorState() {
962
- var _a, _b, _c, _d;
963
- const isInvalid = (_a = this._control) === null || _a === void 0 ? void 0 : _a.invalid;
964
- const isTouched = (_b = this._control) === null || _b === void 0 ? void 0 : _b.touched;
965
- const isSubmitted = ((_c = this._parentFormGroup) === null || _c === void 0 ? void 0 : _c.submitted) || ((_d = this._parentForm) === null || _d === void 0 ? void 0 : _d.submitted);
966
- return !!(isInvalid && (isTouched || isSubmitted));
967
- }
968
- addItem(value) {
969
- let item = Select2Utils.getOptionByValue(this._data, value);
970
- if (!item) {
971
- item = {
972
- value,
973
- label: value,
974
- };
975
- this._data.push(item);
976
- }
977
- return item;
978
- }
979
- createAndAdd(e) {
980
- const value = e.target.value;
981
- if (value.trim()) {
982
- const item = this.addItem(value.trim());
983
- this.click(item);
984
- e.target.value = '';
985
- }
986
- this.stopEvent(e);
987
- }
988
- moveUp() {
989
- this.updateScrollFromOption(Select2Utils.getPreviousOption(this.filteredData, this.hoveringValue));
990
- }
991
- moveDown() {
992
- this.updateScrollFromOption(Select2Utils.getNextOption(this.filteredData, this.hoveringValue));
993
- }
994
- updateScrollFromOption(option) {
995
- if (option) {
996
- this.hoveringValue = option.value;
997
- const domElement = this.results.find(r => r.nativeElement.innerText.trim() === option.label);
998
- if (domElement && this.resultsElement) {
999
- this.resultsElement.scrollTop = 0;
1000
- const listClientRect = this.resultsElement.getBoundingClientRect();
1001
- const optionClientRect = domElement.nativeElement.getBoundingClientRect();
1002
- this.resultsElement.scrollTop = optionClientRect.top - listClientRect.top;
1003
- }
1004
- }
1005
- }
1006
- selectByEnter() {
1007
- if (this.hoveringValue) {
1008
- const option = Select2Utils.getOptionByValue(this._data, this.hoveringValue);
1009
- this.select(option);
1010
- }
1011
- }
1012
- _testKey(event, refs = []) {
1013
- return this._isKey(this._getKey(event), refs);
1014
- }
1015
- _getKey(event) {
1016
- let code;
1017
- if (event.key !== undefined) {
1018
- code = event.key;
1019
- }
1020
- else if (event['keyIdentifier'] !== undefined) {
1021
- code = event['keyIdentifier'];
1022
- }
1023
- else if (event['keyCode'] !== undefined) {
1024
- code = event['keyCode'];
1025
- }
1026
- else {
1027
- event.preventDefault();
1028
- }
1029
- return code;
1030
- }
1031
- _isKey(code, refs = []) {
1032
- return refs && refs.length > 0 ? refs.indexOf(code) !== -1 : false;
1033
- }
1034
- /**
1035
- * Sets the selected option based on a value. If no option can be
1036
- * found with the designated value, the select trigger is cleared.
1037
- */
1038
- _setSelectionByValue(value) {
1039
- if (this.option || (value !== undefined && value !== null)) {
1040
- const isArray = Array.isArray(value);
1041
- if (this.multiple && value && !isArray) {
1042
- throw new Error('Non array value.');
1043
- }
1044
- else if (this._data) {
1045
- if (this.multiple) {
1046
- this.option = []; // if value is null, then empty option and return
1047
- if (isArray) {
1048
- // value is not null. Preselect value
1049
- const selectedValues = Select2Utils.getOptionsByValue(this._data, value, this.multiple);
1050
- selectedValues.map(item => this.select(item));
1051
- }
1052
- }
1053
- else {
1054
- this.select(Select2Utils.getOptionByValue(this._data, value));
1055
- }
1056
- }
1057
- else if (this._control) {
1058
- this._control.viewToModelUpdate(value);
1059
- }
1060
- this._changeDetectorRef.markForCheck();
1061
- }
1062
- }
1063
- /** Does some manual dirty checking on the native input `value` property. */
1064
- _dirtyCheckNativeValue() {
1065
- const newValue = this.value;
1066
- if (this._previousNativeValue !== newValue) {
1067
- this._previousNativeValue = newValue;
1068
- this._stateChanges.next();
1069
- }
1070
- }
1071
- _coerceBooleanProperty(value) {
1072
- return value != null && `${value}` !== 'false';
1073
- }
1074
- _focusSearchboxOrResultsElement(focus = true) {
1075
- if (!this.isSearchboxHidden) {
1076
- setTimeout(() => {
1077
- if (this.searchInput && this.searchInput.nativeElement && focus) {
1078
- this.searchInput.nativeElement.focus();
1079
- }
1080
- });
1081
- }
1082
- else if (this.resultsElement) {
1083
- this.resultsElement.focus();
1084
- }
1085
- }
1086
- _focus(state) {
1087
- if (!state && this.focused) {
1088
- this.focused = state;
1089
- this.blur.emit(this);
1090
- }
1091
- else if (state && !this.focused) {
1092
- this.focused = state;
1093
- this.focus.emit(this);
1094
- }
1095
- }
1096
- _isAbobeOverlay() {
1097
- return this.overlay && this._overlayPosition && this.listPosition === 'auto'
1098
- ? this._overlayPosition === 'top'
1099
- : this.listPosition === 'above';
1100
- }
1101
- }
1102
- /** @nocollapse */ Select2.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: Select2, deps: [{ token: i1.ViewportRuler }, { token: i0.ChangeDetectorRef }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i2.NgControl, optional: true, self: true }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Component });
1103
- /** @nocollapse */ Select2.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: Select2, selector: "select2", inputs: { data: "data", minCharForSearch: "minCharForSearch", displaySearchStatus: "displaySearchStatus", placeholder: "placeholder", customSearchEnabled: "customSearchEnabled", limitSelection: "limitSelection", listPosition: "listPosition", multiple: "multiple", overlay: "overlay", styleMode: "styleMode", noResultMessage: "noResultMessage", maxResults: "maxResults", maxResultsMessage: "maxResultsMessage", infiniteScrollDistance: "infiniteScrollDistance", infiniteScrollThrottle: "infiniteScrollThrottle", infiniteScroll: "infiniteScroll", autoCreate: "autoCreate", noLabelTemplate: "noLabelTemplate", editPattern: "editPattern", templates: "templates", resultMaxHeight: "resultMaxHeight", minCountForSearch: "minCountForSearch", id: "id", required: "required", disabled: "disabled", hideSelectedItems: "hideSelectedItems", readonly: "readonly", value: "value", tabIndex: "tabIndex", resettable: "resettable" }, outputs: { update: "update", open: "open", close: "close", focus: "focus", blur: "blur", search: "search", scroll: "scroll", removeOption: "removeOption" }, host: { properties: { "id": "this.id", "attr.aria-invalid": "this.ariaInvalid", "class.material": "this.classMaterial", "class.nostyle": "this.classNostyle", "class.select2-above": "this.select2above" } }, viewQueries: [{ propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true }, { propertyName: "selection", first: true, predicate: ["selection"], descendants: true, static: true }, { propertyName: "resultContainer", first: true, predicate: ["results"], descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }, { propertyName: "results", predicate: ["result"], descendants: true }], ngImport: i0, template: "<div class=\"select2-label\" (click)=\"toggleOpenAndClose()\">\n <ng-content select=\"select2-label\"></ng-content>\n <span *ngIf=\"required\" class=\"select2-required\"></span>\n</div>\n<div\n class=\"select2 select2-container select2-container--default\"\n [class.select2-container--focus]=\"focused\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled\"\n>\n <div\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [tabindex]=\"!this.isOpen ? tabIndex : '-1'\"\n (click)=\"toggleOpenAndClose()\"\n (focus)=\"focusin()\"\n (blur)=\"focusout()\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple\"\n [class.select2-selection--single]=\"!multiple\"\n role=\"combobox\"\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n <span *ngIf=\"!select2Option\">&nbsp;</span>\n <ng-container *ngIf=\"select2Option\">\n <span\n *ngIf=\"!hasTemplate(select2Option, 'option') || noLabelTemplate; else template\"\n [innerHTML]=\"select2Option.label\"\n ></span>\n <ng-template #template>\n <ng-container *ngTemplateOutlet=\"getTemplate(select2Option, 'option'); context: select2Option\">\n </ng-container>\n </ng-template>\n </ng-container>\n <span [class.select2-selection__placeholder__option]=\"option\" class=\"select2-selection__placeholder\">{{\n placeholder\n }}</span>\n </span>\n <span\n (click)=\"reset($event)\"\n *ngIf=\"!multiple && resettable && select2Option && !(disabled || readonly)\"\n class=\"select2-selection__reset\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n <ul *ngIf=\"multiple\" class=\"select2-selection__rendered\">\n <span\n *ngIf=\"!autoCreate\"\n [class.select2-selection__placeholder__option]=\"select2Options?.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n <li\n *ngFor=\"let op of option; trackBy: trackBy\"\n class=\"select2-selection__choice\"\n [title]=\"op.label\"\n tabindex=\"0\"\n (keydown.enter)=\"removeSelection($event, op)\"\n >\n <span\n *ngIf=\"!(disabled || readonly)\"\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span [innerHTML]=\"op.label\"></span>\n </li>\n <li\n *ngIf=\"autoCreate\"\n class=\"select2-selection__auto-create\"\n (focus)=\"stopEvent($event)\"\n (blur)=\"stopEvent($event)\"\n >\n <input\n [id]=\"id + '-create-field'\"\n (click)=\"toggleOpenAndClose(false, true); stopEvent($event)\"\n (keydown)=\"keyDown($event, true)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-create__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n />\n </li>\n </ul>\n </div>\n </div>\n <ng-container *ngIf=\"!overlay\">\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n </ng-container>\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay\"\n [class.select2-position-auto]=\"listPosition === 'auto'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"hideSearch()\">\n <input\n #searchInput\n [id]=\"id + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? tabIndex : '-1'\"\n />\n </div>\n <div class=\"select2-results\">\n <ul\n #results\n class=\"select2-results__options\"\n [style.max-height]=\"resultMaxHeight\"\n role=\"tree\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle\"\n [infiniteScrollContainer]=\"results\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n >\n <ng-container *ngFor=\"let groupOrOption of filteredData; index as i; trackBy: trackBy\">\n <li *ngIf=\"groupOrOption.options\" class=\"select2-results__option\" role=\"group\">\n <strong\n *ngIf=\"!hasTemplate(groupOrOption, 'group'); else optGroup\"\n [attr.class]=\"\n 'select2-results__group' +\n (groupOrOption.classes ? ' ' + groupOrOption.classes : '')\n \"\n [innerHTML]=\"groupOrOption.label\"\n ></strong>\n <ng-template #optGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'group'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n\n <ul class=\"select2-results__options select2-results__options--nested\">\n <li\n *ngFor=\"let option of groupOrOption.options; index as j; trackBy: trackBy\"\n #result\n [id]=\"option.id || id + '-option-' + i + '-' + j\"\n [class]=\"getOptionStyle(option)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n <div\n *ngIf=\"!hasTemplate(option, 'option'); else liGroup\"\n class=\"select2-label-content\"\n [innerHTML]=\"option.label\"\n ></div>\n <ng-template #liGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ul>\n </li>\n <li\n *ngIf=\"!groupOrOption.options\"\n #result\n [id]=\"groupOrOption.id || id + '-option-' + i\"\n [class]=\"getOptionStyle(groupOrOption)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(groupOrOption)\"\n [attr.aria-disabled]=\"isDisabled(groupOrOption)\"\n (mouseenter)=\"mouseenter(groupOrOption)\"\n (click)=\"click(groupOrOption)\"\n >\n <div\n *ngIf=\"!hasTemplate(groupOrOption, 'option'); else li\"\n [innerHTML]=\"groupOrOption.label\"\n class=\"select2-label-content\"\n ></div>\n <ng-template #li>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n <li\n class=\"select2-no-result select2-results__option\"\n *ngIf=\"!filteredData?.length && noResultMessage\"\n [innerHTML]=\"noResultMessage\"\n ></li>\n <li\n class=\"select2-too-much-result select2-results__option\"\n *ngIf=\"maxResultsExceeded\"\n [innerHTML]=\"maxResultsMessage\"\n ></li>\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [".select2-label{color:var(--select2-label-text-color, #000)}.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;width:100%}.select2-container .select2-container-dropdown{position:absolute;width:0px;opacity:0}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:var(--select2-single-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding:0 0 0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:var(--select2-multiple-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-flex;overflow:hidden;padding-left:8px;padding-bottom:2px;text-overflow:ellipsis;white-space:nowrap;flex-wrap:wrap;gap:5px}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-selection__auto-create{flex:1 1 150px;min-width:150px;display:flex}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field{width:100%;border:0}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field:focus{border:0;outline:0}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background:var(--select2-dropdown-background, white);border:1px solid var(--select2-dropdown-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);box-sizing:border-box;display:block;position:absolute;width:100%;z-index:1051;height:0;overflow:hidden}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;-webkit-user-select:none;user-select:none;color:var(--select2-option-text-color, #000)}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{width:100%;opacity:1}.select2-container--open .select2-dropdown{overflow:auto;height:auto}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;bottom:27px;display:flex;flex-direction:column-reverse}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99}.select2-required:before{content:\"*\";color:var(--select2-required-color, red)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--default .select2-selection--single{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);display:flex}.select2-container--default .select2-selection--single .select2-selection__rendered{color:var(--select2-selection-text-color, #111);line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:var(--select2-placeholder-color, #999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__reset,.select2-container--default .select2-selection--single .select2-selection__arrow{display:flex;width:20px;align-items:center;justify-content:center}.select2-container--default .select2-selection--single .select2-selection__arrow:before{content:\" \";border-color:var(--select2-arrow-color, #888) transparent;border-style:solid;border-width:5px 4px 0;height:0;width:0}.select2-container--default .select2-selection--single .select2-selection__reset{color:var(--select2-reset-color, #999)}.select2-container--default.select2-container--disabled .select2-selection--single{background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-color:transparent transparent var(--select2-arrow-color, #888);border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{flex:1 1 auto;box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;width:100%;color:var(--select2-placeholder-color, #999);margin-top:5px;float:left;overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{color:var(--select2-selection-choice-text-color, #000);background:var(--select2-selection-choice-background, #e4e4e4);border:1px solid var(--select2-selection-choice-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:default;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:var(--select2-selection-choice-close-color, #999);cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:var(--select2-selection-choice-hover-close-color, #333)}.select2-container--default.select2-container--focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default.select2-container--disabled .select2-selection--multiple{background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid var(--select2-search-border-color, #aaa);background:1px solid var(--select2-search-background, #fff);border-radius:var(--select2-search-border-radius, 0px)}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:none;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:var(--select2-option-disabled-text-color, #999);background:var(--select2-option-disabled-background, transparent)}.select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-option-selected-text-color, #000);background:var(--select2-option-selected-background, #ddd)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-option-highlighted-background, #5897fb);color:var(--select2-option-highlighted-text-color, #fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px;color:var(--select2-option-group-text-color, gray);background:var(--select2-option-group-background, transparent)}.select2-no-result{color:var(--select2-no-result-color, #888);font-style:var(--select2-no-result-font-style, italic)}.select2-too-much-result{color:var(--select2-too-much-result-color, #888);font-style:var(--select2-too-much-font-style, italic)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-selection--single,:host.nostyle .select2-selection--multiple{background:transparent;border-color:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{background:transparent;border-color:transparent}:host.material{display:inline-block;width:300px}:host.material>.select2-container{padding-bottom:1.29688em;vertical-align:inherit}:host.material>.select2-container .selection{padding:.4375em 0;border-top:.84375em solid transparent;display:inline-flex;align-items:baseline;width:100%;height:auto}:host.material .select2-container--default .select2-selection--single,:host.material .select2-container--default .select2-selection--multiple{width:100%;border:0;border-radius:0;height:24px;box-sizing:border-box}:host.material .select2-container--default .select2-selection--single:before,:host.material .select2-container--default .select2-selection--multiple:before{content:\" \";display:block;position:absolute;bottom:1.65em;background:var(--select2-material-underline, #ddd);height:1px;width:100%}:host.material .select2-container--default .select2-selection--single:after,:host.material .select2-container--default .select2-selection--multiple:after{content:\" \";display:block;position:absolute;bottom:1.63em;background:var(--select2-material-underline-active, #5a419e);height:2px;width:0%;left:50%;transition:none}:host.material .select2-container--default .select2-selection--single .select2-selection__rendered,:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding-left:1px;line-height:inherit}:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;color:var(--select2-material-placeholder-color, rgba(0, 0, 0, .38));transition:transform .3s;position:absolute;transform-origin:0 21px;left:0;top:20px}:host.material .select2-container--default .select2-container--open{left:0;bottom:1.6em}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after{transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%;left:0%}:host.material .select2-container--default .select2-dropdown{border-radius:0;border:0;box-shadow:0 5px 5px #00000080}:host.material .select2-container--default .select2-results__option[aria-selected=true],:host.material .select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-material-option-selected-background, rgba(0, 0, 0, .04));color:var(--select2-material-option-highlighted-text-color, #000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-material-option-selected-text-color, #ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--single,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before{background:var(--select2-material-underline-disabled, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-size:4px 1px;background-repeat:repeat-x;background-position:0 bottom}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after{background:var(--select2-material-underline-invalid, red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--single,:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:0}:host.material .select2-subscript-wrapper{position:absolute;top:calc(100% - 1.72917em);font-size:75%;color:var(--select2-hint-text-color, #888)}::ng-deep .select2-overlay-backdrop{background:var(--select2-overlay-backdrop, transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-bottom:0;margin-top:28px}@supports (-moz-appearance: none){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:26px}}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i4.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: i5.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }] });
1104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: Select2, decorators: [{
1105
- type: Component,
1106
- args: [{ selector: 'select2', template: "<div class=\"select2-label\" (click)=\"toggleOpenAndClose()\">\n <ng-content select=\"select2-label\"></ng-content>\n <span *ngIf=\"required\" class=\"select2-required\"></span>\n</div>\n<div\n class=\"select2 select2-container select2-container--default\"\n [class.select2-container--focus]=\"focused\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled\"\n>\n <div\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [tabindex]=\"!this.isOpen ? tabIndex : '-1'\"\n (click)=\"toggleOpenAndClose()\"\n (focus)=\"focusin()\"\n (blur)=\"focusout()\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple\"\n [class.select2-selection--single]=\"!multiple\"\n role=\"combobox\"\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n <span *ngIf=\"!select2Option\">&nbsp;</span>\n <ng-container *ngIf=\"select2Option\">\n <span\n *ngIf=\"!hasTemplate(select2Option, 'option') || noLabelTemplate; else template\"\n [innerHTML]=\"select2Option.label\"\n ></span>\n <ng-template #template>\n <ng-container *ngTemplateOutlet=\"getTemplate(select2Option, 'option'); context: select2Option\">\n </ng-container>\n </ng-template>\n </ng-container>\n <span [class.select2-selection__placeholder__option]=\"option\" class=\"select2-selection__placeholder\">{{\n placeholder\n }}</span>\n </span>\n <span\n (click)=\"reset($event)\"\n *ngIf=\"!multiple && resettable && select2Option && !(disabled || readonly)\"\n class=\"select2-selection__reset\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n <ul *ngIf=\"multiple\" class=\"select2-selection__rendered\">\n <span\n *ngIf=\"!autoCreate\"\n [class.select2-selection__placeholder__option]=\"select2Options?.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n <li\n *ngFor=\"let op of option; trackBy: trackBy\"\n class=\"select2-selection__choice\"\n [title]=\"op.label\"\n tabindex=\"0\"\n (keydown.enter)=\"removeSelection($event, op)\"\n >\n <span\n *ngIf=\"!(disabled || readonly)\"\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span [innerHTML]=\"op.label\"></span>\n </li>\n <li\n *ngIf=\"autoCreate\"\n class=\"select2-selection__auto-create\"\n (focus)=\"stopEvent($event)\"\n (blur)=\"stopEvent($event)\"\n >\n <input\n [id]=\"id + '-create-field'\"\n (click)=\"toggleOpenAndClose(false, true); stopEvent($event)\"\n (keydown)=\"keyDown($event, true)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-create__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n />\n </li>\n </ul>\n </div>\n </div>\n <ng-container *ngIf=\"!overlay\">\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n </ng-container>\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay\"\n [class.select2-position-auto]=\"listPosition === 'auto'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"hideSearch()\">\n <input\n #searchInput\n [id]=\"id + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? tabIndex : '-1'\"\n />\n </div>\n <div class=\"select2-results\">\n <ul\n #results\n class=\"select2-results__options\"\n [style.max-height]=\"resultMaxHeight\"\n role=\"tree\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle\"\n [infiniteScrollContainer]=\"results\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n >\n <ng-container *ngFor=\"let groupOrOption of filteredData; index as i; trackBy: trackBy\">\n <li *ngIf=\"groupOrOption.options\" class=\"select2-results__option\" role=\"group\">\n <strong\n *ngIf=\"!hasTemplate(groupOrOption, 'group'); else optGroup\"\n [attr.class]=\"\n 'select2-results__group' +\n (groupOrOption.classes ? ' ' + groupOrOption.classes : '')\n \"\n [innerHTML]=\"groupOrOption.label\"\n ></strong>\n <ng-template #optGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'group'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n\n <ul class=\"select2-results__options select2-results__options--nested\">\n <li\n *ngFor=\"let option of groupOrOption.options; index as j; trackBy: trackBy\"\n #result\n [id]=\"option.id || id + '-option-' + i + '-' + j\"\n [class]=\"getOptionStyle(option)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n <div\n *ngIf=\"!hasTemplate(option, 'option'); else liGroup\"\n class=\"select2-label-content\"\n [innerHTML]=\"option.label\"\n ></div>\n <ng-template #liGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ul>\n </li>\n <li\n *ngIf=\"!groupOrOption.options\"\n #result\n [id]=\"groupOrOption.id || id + '-option-' + i\"\n [class]=\"getOptionStyle(groupOrOption)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(groupOrOption)\"\n [attr.aria-disabled]=\"isDisabled(groupOrOption)\"\n (mouseenter)=\"mouseenter(groupOrOption)\"\n (click)=\"click(groupOrOption)\"\n >\n <div\n *ngIf=\"!hasTemplate(groupOrOption, 'option'); else li\"\n [innerHTML]=\"groupOrOption.label\"\n class=\"select2-label-content\"\n ></div>\n <ng-template #li>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n <li\n class=\"select2-no-result select2-results__option\"\n *ngIf=\"!filteredData?.length && noResultMessage\"\n [innerHTML]=\"noResultMessage\"\n ></li>\n <li\n class=\"select2-too-much-result select2-results__option\"\n *ngIf=\"maxResultsExceeded\"\n [innerHTML]=\"maxResultsMessage\"\n ></li>\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [".select2-label{color:var(--select2-label-text-color, #000)}.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;width:100%}.select2-container .select2-container-dropdown{position:absolute;width:0px;opacity:0}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:var(--select2-single-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding:0 0 0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:var(--select2-multiple-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-flex;overflow:hidden;padding-left:8px;padding-bottom:2px;text-overflow:ellipsis;white-space:nowrap;flex-wrap:wrap;gap:5px}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-selection__auto-create{flex:1 1 150px;min-width:150px;display:flex}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field{width:100%;border:0}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field:focus{border:0;outline:0}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background:var(--select2-dropdown-background, white);border:1px solid var(--select2-dropdown-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);box-sizing:border-box;display:block;position:absolute;width:100%;z-index:1051;height:0;overflow:hidden}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;-webkit-user-select:none;user-select:none;color:var(--select2-option-text-color, #000)}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{width:100%;opacity:1}.select2-container--open .select2-dropdown{overflow:auto;height:auto}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;bottom:27px;display:flex;flex-direction:column-reverse}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99}.select2-required:before{content:\"*\";color:var(--select2-required-color, red)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--default .select2-selection--single{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);display:flex}.select2-container--default .select2-selection--single .select2-selection__rendered{color:var(--select2-selection-text-color, #111);line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:var(--select2-placeholder-color, #999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__reset,.select2-container--default .select2-selection--single .select2-selection__arrow{display:flex;width:20px;align-items:center;justify-content:center}.select2-container--default .select2-selection--single .select2-selection__arrow:before{content:\" \";border-color:var(--select2-arrow-color, #888) transparent;border-style:solid;border-width:5px 4px 0;height:0;width:0}.select2-container--default .select2-selection--single .select2-selection__reset{color:var(--select2-reset-color, #999)}.select2-container--default.select2-container--disabled .select2-selection--single{background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-color:transparent transparent var(--select2-arrow-color, #888);border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{flex:1 1 auto;box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;width:100%;color:var(--select2-placeholder-color, #999);margin-top:5px;float:left;overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{color:var(--select2-selection-choice-text-color, #000);background:var(--select2-selection-choice-background, #e4e4e4);border:1px solid var(--select2-selection-choice-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:default;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:var(--select2-selection-choice-close-color, #999);cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:var(--select2-selection-choice-hover-close-color, #333)}.select2-container--default.select2-container--focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default.select2-container--disabled .select2-selection--multiple{background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid var(--select2-search-border-color, #aaa);background:1px solid var(--select2-search-background, #fff);border-radius:var(--select2-search-border-radius, 0px)}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:none;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:var(--select2-option-disabled-text-color, #999);background:var(--select2-option-disabled-background, transparent)}.select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-option-selected-text-color, #000);background:var(--select2-option-selected-background, #ddd)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-option-highlighted-background, #5897fb);color:var(--select2-option-highlighted-text-color, #fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px;color:var(--select2-option-group-text-color, gray);background:var(--select2-option-group-background, transparent)}.select2-no-result{color:var(--select2-no-result-color, #888);font-style:var(--select2-no-result-font-style, italic)}.select2-too-much-result{color:var(--select2-too-much-result-color, #888);font-style:var(--select2-too-much-font-style, italic)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-selection--single,:host.nostyle .select2-selection--multiple{background:transparent;border-color:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{background:transparent;border-color:transparent}:host.material{display:inline-block;width:300px}:host.material>.select2-container{padding-bottom:1.29688em;vertical-align:inherit}:host.material>.select2-container .selection{padding:.4375em 0;border-top:.84375em solid transparent;display:inline-flex;align-items:baseline;width:100%;height:auto}:host.material .select2-container--default .select2-selection--single,:host.material .select2-container--default .select2-selection--multiple{width:100%;border:0;border-radius:0;height:24px;box-sizing:border-box}:host.material .select2-container--default .select2-selection--single:before,:host.material .select2-container--default .select2-selection--multiple:before{content:\" \";display:block;position:absolute;bottom:1.65em;background:var(--select2-material-underline, #ddd);height:1px;width:100%}:host.material .select2-container--default .select2-selection--single:after,:host.material .select2-container--default .select2-selection--multiple:after{content:\" \";display:block;position:absolute;bottom:1.63em;background:var(--select2-material-underline-active, #5a419e);height:2px;width:0%;left:50%;transition:none}:host.material .select2-container--default .select2-selection--single .select2-selection__rendered,:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding-left:1px;line-height:inherit}:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;color:var(--select2-material-placeholder-color, rgba(0, 0, 0, .38));transition:transform .3s;position:absolute;transform-origin:0 21px;left:0;top:20px}:host.material .select2-container--default .select2-container--open{left:0;bottom:1.6em}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after{transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%;left:0%}:host.material .select2-container--default .select2-dropdown{border-radius:0;border:0;box-shadow:0 5px 5px #00000080}:host.material .select2-container--default .select2-results__option[aria-selected=true],:host.material .select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-material-option-selected-background, rgba(0, 0, 0, .04));color:var(--select2-material-option-highlighted-text-color, #000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-material-option-selected-text-color, #ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--single,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before{background:var(--select2-material-underline-disabled, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-size:4px 1px;background-repeat:repeat-x;background-position:0 bottom}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after{background:var(--select2-material-underline-invalid, red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--single,:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:0}:host.material .select2-subscript-wrapper{position:absolute;top:calc(100% - 1.72917em);font-size:75%;color:var(--select2-hint-text-color, #888)}::ng-deep .select2-overlay-backdrop{background:var(--select2-overlay-backdrop, transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-bottom:0;margin-top:28px}@supports (-moz-appearance: none){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:26px}}\n"] }]
1107
- }], ctorParameters: function () {
1108
- return [{ type: i1.ViewportRuler }, { type: i0.ChangeDetectorRef }, { type: i2.NgForm, decorators: [{
1109
- type: Optional
1110
- }] }, { type: i2.FormGroupDirective, decorators: [{
1111
- type: Optional
1112
- }] }, { type: i2.NgControl, decorators: [{
1113
- type: Self
1114
- }, {
1115
- type: Optional
1116
- }] }, { type: undefined, decorators: [{
1117
- type: Attribute,
1118
- args: ['tabindex']
1119
- }] }];
1120
- }, propDecorators: { data: [{
1121
- type: Input
1122
- }], minCharForSearch: [{
1123
- type: Input
1124
- }], displaySearchStatus: [{
1125
- type: Input
1126
- }], placeholder: [{
1127
- type: Input
1128
- }], customSearchEnabled: [{
1129
- type: Input
1130
- }], limitSelection: [{
1131
- type: Input
1132
- }], listPosition: [{
1133
- type: Input
1134
- }], multiple: [{
1135
- type: Input
1136
- }], overlay: [{
1137
- type: Input
1138
- }], styleMode: [{
1139
- type: Input
1140
- }], noResultMessage: [{
1141
- type: Input
1142
- }], maxResults: [{
1143
- type: Input
1144
- }], maxResultsMessage: [{
1145
- type: Input
1146
- }], infiniteScrollDistance: [{
1147
- type: Input
1148
- }], infiniteScrollThrottle: [{
1149
- type: Input
1150
- }], infiniteScroll: [{
1151
- type: Input
1152
- }], autoCreate: [{
1153
- type: Input
1154
- }], noLabelTemplate: [{
1155
- type: Input
1156
- }], editPattern: [{
1157
- type: Input
1158
- }], templates: [{
1159
- type: Input
1160
- }], resultMaxHeight: [{
1161
- type: Input
1162
- }], update: [{
1163
- type: Output
1164
- }], open: [{
1165
- type: Output
1166
- }], close: [{
1167
- type: Output
1168
- }], focus: [{
1169
- type: Output
1170
- }], blur: [{
1171
- type: Output
1172
- }], search: [{
1173
- type: Output
1174
- }], scroll: [{
1175
- type: Output
1176
- }], removeOption: [{
1177
- type: Output
1178
- }], minCountForSearch: [{
1179
- type: Input
1180
- }], id: [{
1181
- type: Input
1182
- }, {
1183
- type: HostBinding,
1184
- args: ['id']
1185
- }], required: [{
1186
- type: Input
1187
- }], disabled: [{
1188
- type: Input
1189
- }], hideSelectedItems: [{
1190
- type: Input
1191
- }], readonly: [{
1192
- type: Input
1193
- }], value: [{
1194
- type: Input
1195
- }], tabIndex: [{
1196
- type: Input
1197
- }], resettable: [{
1198
- type: Input
1199
- }], ariaInvalid: [{
1200
- type: HostBinding,
1201
- args: ['attr.aria-invalid']
1202
- }], classMaterial: [{
1203
- type: HostBinding,
1204
- args: ['class.material']
1205
- }], classNostyle: [{
1206
- type: HostBinding,
1207
- args: ['class.nostyle']
1208
- }], select2above: [{
1209
- type: HostBinding,
1210
- args: ['class.select2-above']
1211
- }], cdkConnectedOverlay: [{
1212
- type: ViewChild,
1213
- args: [CdkConnectedOverlay]
1214
- }], selection: [{
1215
- type: ViewChild,
1216
- args: ['selection', { static: true }]
1217
- }], resultContainer: [{
1218
- type: ViewChild,
1219
- args: ['results']
1220
- }], results: [{
1221
- type: ViewChildren,
1222
- args: ['result']
1223
- }], searchInput: [{
1224
- type: ViewChild,
1225
- args: ['searchInput']
1226
- }], dropdown: [{
1227
- type: ViewChild,
1228
- args: ['dropdown']
1229
- }] } });
1230
-
1231
- class Select2Hint {
1232
- }
1233
- /** @nocollapse */ Select2Hint.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: Select2Hint, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1234
- /** @nocollapse */ Select2Hint.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: Select2Hint, selector: "select2-hint", ngImport: i0 });
1235
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: Select2Hint, decorators: [{
1236
- type: Directive,
1237
- args: [{ selector: 'select2-hint' }]
1238
- }] });
1239
-
1240
- class Select2Label {
1241
- }
1242
- /** @nocollapse */ Select2Label.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: Select2Label, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1243
- /** @nocollapse */ Select2Label.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: Select2Label, selector: "select2-label", ngImport: i0 });
1244
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: Select2Label, decorators: [{
1245
- type: Directive,
1246
- args: [{ selector: 'select2-label' }]
1247
- }] });
1248
-
1249
- class Select2Module {
1250
- }
1251
- /** @nocollapse */ Select2Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: Select2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1252
- /** @nocollapse */ Select2Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.5", ngImport: i0, type: Select2Module, declarations: [Select2Hint, Select2Label, Select2], imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule], exports: [FormsModule, ReactiveFormsModule, Select2Hint, Select2Label, Select2] });
1253
- /** @nocollapse */ Select2Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: Select2Module, imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule, FormsModule, ReactiveFormsModule] });
1254
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: Select2Module, decorators: [{
1255
- type: NgModule,
1256
- args: [{
1257
- imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule],
1258
- declarations: [Select2Hint, Select2Label, Select2],
1259
- exports: [FormsModule, ReactiveFormsModule, Select2Hint, Select2Label, Select2],
1260
- }]
1261
- }] });
1262
-
1263
- /*
1264
- * Public API Surface of ng-select2-component
1265
- */
1266
-
1267
- /**
1268
- * Generated bundle index. Do not edit.
1269
- */
1270
-
1271
- export { Select2, Select2Hint, Select2Label, Select2Module, Select2Utils, defaultMinCountForSearch, protectRegexp, timeout, unicodePatterns };
1272
- //# sourceMappingURL=ng-select2-component.mjs.map