ng-select2-component 11.0.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.
@@ -0,0 +1,1271 @@
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 = {
204
+ ...groupOrOption,
205
+ options: [],
206
+ };
207
+ result.push(group);
208
+ for (const item of options) {
209
+ group.options.push(item);
210
+ counter++;
211
+ if (counter === maxResults) {
212
+ return { result, reduce: true };
213
+ }
214
+ }
215
+ }
216
+ else {
217
+ result.push(groupOrOption);
218
+ counter++;
219
+ }
220
+ if (counter === maxResults) {
221
+ return { result, reduce: true };
222
+ }
223
+ }
224
+ return { result, reduce: false };
225
+ }
226
+ else {
227
+ return { result: data, reduce: false };
228
+ }
229
+ }
230
+ static getFilteredData(data, searchText, editPattern) {
231
+ if (searchText) {
232
+ const result = [];
233
+ for (const groupOrOption of data) {
234
+ const options = groupOrOption.options;
235
+ if (options) {
236
+ if (options.some(group => Select2Utils.containSearchText(group.label, searchText, editPattern))) {
237
+ const filteredOptions = options.filter(group => Select2Utils.containSearchText(group.label, searchText, editPattern));
238
+ result.push({
239
+ ...groupOrOption,
240
+ options: filteredOptions,
241
+ });
242
+ }
243
+ }
244
+ else if (Select2Utils.containSearchText(groupOrOption.label, searchText, editPattern)) {
245
+ result.push(groupOrOption);
246
+ }
247
+ }
248
+ return result;
249
+ }
250
+ else {
251
+ return data;
252
+ }
253
+ }
254
+ static getFilteredSelectedData(data, selectedOptions) {
255
+ const result = [];
256
+ for (const groupOrOption of data) {
257
+ const options = groupOrOption.options;
258
+ if (options) {
259
+ const filteredOptions = options.filter(group => Select2Utils.isSelected(selectedOptions, group, true) === 'false');
260
+ if (filteredOptions.length) {
261
+ result.push({
262
+ ...groupOrOption,
263
+ options: filteredOptions,
264
+ });
265
+ }
266
+ }
267
+ else if (Select2Utils.isSelected(selectedOptions, groupOrOption, true) === 'false') {
268
+ result.push(groupOrOption);
269
+ }
270
+ }
271
+ return result;
272
+ }
273
+ static isSearchboxHiddex(data, minCountForSearch) {
274
+ if (minCountForSearch === '' ||
275
+ minCountForSearch === undefined ||
276
+ minCountForSearch === null ||
277
+ isNaN(+minCountForSearch)) {
278
+ minCountForSearch = defaultMinCountForSearch;
279
+ }
280
+ const optionCount = Select2Utils.getOptionsCount(data);
281
+ return optionCount < +minCountForSearch;
282
+ }
283
+ static isSelected(options, option, multiple) {
284
+ return multiple
285
+ ? options && options.some(op => op.value === option.value)
286
+ ? 'true'
287
+ : 'false'
288
+ : options && option.value === options.value
289
+ ? 'true'
290
+ : 'false';
291
+ }
292
+ static removeSelection(options, option) {
293
+ for (let i = 0; i < options.length; i++) {
294
+ if (options[i].value === option.value) {
295
+ options.splice(i, 1);
296
+ return;
297
+ }
298
+ }
299
+ }
300
+ static getOptionsCount(data) {
301
+ let count = 0;
302
+ if (Array.isArray(data)) {
303
+ for (const groupOrOption of data) {
304
+ const options = groupOrOption.options;
305
+ if (options) {
306
+ count += options.length;
307
+ }
308
+ else {
309
+ count++;
310
+ }
311
+ }
312
+ }
313
+ return count;
314
+ }
315
+ static isNullOrUndefined(value) {
316
+ return value === null || value === undefined;
317
+ }
318
+ static containSearchText(label, searchText, editPattern) {
319
+ return searchText
320
+ ? Select2Utils.formatSansUnicode(label).match(new RegExp(Select2Utils.formatPattern(searchText, editPattern), 'i')) !== null
321
+ : true;
322
+ }
323
+ static protectPattern(str) {
324
+ return str.replace(protectRegexp, '\\$&');
325
+ }
326
+ static formatSansUnicode(str) {
327
+ for (const unicodePattern of unicodePatterns) {
328
+ str = str.replace(unicodePattern.s, unicodePattern.l);
329
+ }
330
+ return str;
331
+ }
332
+ static formatPattern(str, editPattern) {
333
+ str = Select2Utils.formatSansUnicode(Select2Utils.protectPattern(str));
334
+ if (editPattern && typeof editPattern === 'function') {
335
+ str = editPattern(str);
336
+ }
337
+ return str;
338
+ }
339
+ }
340
+
341
+ let nextUniqueId = 0;
342
+ const displaySearchStatusList = ['default', 'hidden', 'always'];
343
+ class Select2 {
344
+ /** data of options & optiongrps */
345
+ set data(data) {
346
+ this._data = data;
347
+ this.updateFilteredData();
348
+ }
349
+ get multiple() {
350
+ return this._multiple;
351
+ }
352
+ set multiple(value) {
353
+ this._multiple = this._coerceBooleanProperty(value);
354
+ this.ngOnInit();
355
+ }
356
+ /** use the material style */
357
+ get overlay() {
358
+ return this._overlay;
359
+ }
360
+ set overlay(value) {
361
+ this._overlay = this._coerceBooleanProperty(value);
362
+ }
363
+ /** infinite scroll activated */
364
+ get infiniteScroll() {
365
+ return this._infiniteScroll;
366
+ }
367
+ set infiniteScroll(value) {
368
+ this._infiniteScroll = this._coerceBooleanProperty(value);
369
+ }
370
+ /** auto create if not existe */
371
+ get autoCreate() {
372
+ return this._autoCreate;
373
+ }
374
+ set autoCreate(value) {
375
+ this._autoCreate = this._coerceBooleanProperty(value);
376
+ }
377
+ /** no template for label selection */
378
+ get noLabelTemplate() {
379
+ return this._noLabelTemplate;
380
+ }
381
+ set noLabelTemplate(value) {
382
+ this._noLabelTemplate = this._coerceBooleanProperty(value);
383
+ }
384
+ get select2Options() {
385
+ return this.multiple ? this.option : null;
386
+ }
387
+ get select2Option() {
388
+ return this.multiple ? null : this.option;
389
+ }
390
+ get searchText() {
391
+ return this.innerSearchText;
392
+ }
393
+ set searchText(text) {
394
+ if (this.customSearchEnabled) {
395
+ this.search.emit({
396
+ component: this,
397
+ value: this._value,
398
+ search: text,
399
+ });
400
+ }
401
+ this.innerSearchText = text;
402
+ }
403
+ /** minimal data of show the search field */
404
+ get minCountForSearch() {
405
+ return this._minCountForSearch;
406
+ }
407
+ set minCountForSearch(value) {
408
+ this._minCountForSearch = value;
409
+ this.updateSearchBox();
410
+ }
411
+ /** Unique id of the element. */
412
+ get id() {
413
+ return this._id;
414
+ }
415
+ set id(value) {
416
+ this._id = value || this._uid;
417
+ }
418
+ /** Whether the element is required. */
419
+ get required() {
420
+ return this._required;
421
+ }
422
+ set required(value) {
423
+ this._required = this._coerceBooleanProperty(value);
424
+ }
425
+ /** Whether selected items should be hidden. */
426
+ get disabled() {
427
+ return this._control ? this._control.disabled : this._disabled;
428
+ }
429
+ set disabled(value) {
430
+ this._disabled = this._coerceBooleanProperty(value);
431
+ }
432
+ /** Whether items are hidden when has. */
433
+ get hideSelectedItems() {
434
+ return this._hideSelectedItems;
435
+ }
436
+ set hideSelectedItems(value) {
437
+ this._hideSelectedItems = this._coerceBooleanProperty(value);
438
+ }
439
+ /** Whether the element is readonly. */
440
+ get readonly() {
441
+ return this._readonly;
442
+ }
443
+ set readonly(value) {
444
+ this._readonly = this._coerceBooleanProperty(value);
445
+ }
446
+ /** The input element's value. */
447
+ get value() {
448
+ return this._value;
449
+ }
450
+ set value(value) {
451
+ if (this.testValueChange(this._value, value)) {
452
+ setTimeout(() => {
453
+ this._value = value;
454
+ this.writeValue(value);
455
+ }, 10);
456
+ }
457
+ }
458
+ /** Tab index for the select2 element. */
459
+ get tabIndex() {
460
+ return this.disabled ? -1 : this._tabIndex;
461
+ }
462
+ set tabIndex(value) {
463
+ if (typeof value !== 'undefined') {
464
+ this._tabIndex = value;
465
+ }
466
+ }
467
+ /** reset with no selected value */
468
+ get resettable() {
469
+ return this._resettable;
470
+ }
471
+ set resettable(value) {
472
+ this._resettable = this._coerceBooleanProperty(value);
473
+ }
474
+ get ariaInvalid() {
475
+ return this._isErrorState();
476
+ }
477
+ get classMaterial() {
478
+ return this.styleMode === 'material';
479
+ }
480
+ get classNostyle() {
481
+ return this.styleMode === 'noStyle';
482
+ }
483
+ get select2above() {
484
+ return !this.overlay ? this.listPosition === 'above' : this._isAbobeOverlay();
485
+ }
486
+ get _positions() {
487
+ return this.listPosition === 'auto' ? undefined : null;
488
+ }
489
+ get resultsElement() {
490
+ return this.resultContainer?.nativeElement;
491
+ }
492
+ constructor(_viewportRuler, _changeDetectorRef, _parentForm, _parentFormGroup, _control, tabIndex) {
493
+ this._viewportRuler = _viewportRuler;
494
+ this._changeDetectorRef = _changeDetectorRef;
495
+ this._parentForm = _parentForm;
496
+ this._parentFormGroup = _parentFormGroup;
497
+ this._control = _control;
498
+ this.minCharForSearch = 0;
499
+ this.limitSelection = 0;
500
+ this.listPosition = 'below';
501
+ /** use the material style */
502
+ this.styleMode = 'default';
503
+ /** maximum results limit (0 = no limit) */
504
+ this.maxResults = 0;
505
+ /** message when maximum results */
506
+ this.maxResultsMessage = 'Too many results…';
507
+ /** infinite scroll distance */
508
+ this.infiniteScrollDistance = 1.5;
509
+ /** infinite scroll distance */
510
+ this.infiniteScrollThrottle = 150;
511
+ /** the max height of the results container when opening the select */
512
+ this.resultMaxHeight = '200px';
513
+ this.update = new EventEmitter();
514
+ this.open = new EventEmitter();
515
+ this.close = new EventEmitter();
516
+ this.focus = new EventEmitter();
517
+ this.blur = new EventEmitter();
518
+ this.search = new EventEmitter();
519
+ this.scroll = new EventEmitter();
520
+ this.removeOption = new EventEmitter();
521
+ this.option = null;
522
+ this.isOpen = false;
523
+ /** Whether the element is focused or not. */
524
+ this.focused = false;
525
+ this.hoveringValue = null;
526
+ this.innerSearchText = '';
527
+ this._stateChanges = new Subject();
528
+ this._disabled = false;
529
+ this._required = false;
530
+ this._readonly = false;
531
+ this._multiple = false;
532
+ this._overlay = false;
533
+ this._resettable = false;
534
+ this._hideSelectedItems = false;
535
+ this._clickDetection = false;
536
+ this._uid = `select2-${nextUniqueId++}`;
537
+ this._infiniteScroll = true;
538
+ this._autoCreate = true;
539
+ this._noLabelTemplate = true;
540
+ /** View -> model callback called when select has been touched */
541
+ this._onTouched = () => {
542
+ // do nothing
543
+ };
544
+ /** View -> model callback called when value changes */
545
+ this._onChange = () => {
546
+ // do nothing
547
+ };
548
+ // eslint-disable-next-line no-self-assign
549
+ this.id = this.id;
550
+ this._tabIndex = parseInt(tabIndex, 10) || 0;
551
+ if (this._control) {
552
+ this._control.valueAccessor = this;
553
+ }
554
+ this._clickDetectionFc = this.clickDetection.bind(this);
555
+ }
556
+ ngOnInit() {
557
+ this._viewportRuler.change(100).subscribe(() => {
558
+ if (this.isOpen) {
559
+ this.triggerRect();
560
+ }
561
+ });
562
+ const option = Select2Utils.getOptionsByValue(this._data, this._control ? this._control.value : this.value, this.multiple);
563
+ if (option !== null) {
564
+ this.option = option;
565
+ }
566
+ if (!Array.isArray(option)) {
567
+ this.hoveringValue = this.value;
568
+ }
569
+ this.updateSearchBox();
570
+ }
571
+ ngAfterViewInit() {
572
+ this.cdkConnectedOverlay.positionChange.subscribe((posChange) => {
573
+ if (this.listPosition === 'auto' &&
574
+ posChange.connectionPair?.originY &&
575
+ this._overlayPosition !== posChange.connectionPair.originY) {
576
+ this.triggerRect();
577
+ this._overlayPosition = posChange.connectionPair.originY;
578
+ this._changeDetectorRef.detectChanges();
579
+ }
580
+ });
581
+ this.selectionElement = this.selection.nativeElement;
582
+ this.triggerRect();
583
+ }
584
+ ngDoCheck() {
585
+ this.updateSearchBox();
586
+ this._dirtyCheckNativeValue();
587
+ if (this._triggerRect) {
588
+ if (this.overlayWidth !== this._triggerRect.width) {
589
+ this.overlayWidth = this._triggerRect.width;
590
+ }
591
+ if (this._dropdownRect?.height > 0 && this.overlayHeight !== this._dropdownRect.height) {
592
+ this.overlayHeight = this.listPosition === 'auto' ? this._dropdownRect.height : 0;
593
+ }
594
+ }
595
+ }
596
+ ngOnDestroy() {
597
+ window.document.body.removeEventListener('click', this._clickDetectionFc);
598
+ }
599
+ updateSearchBox() {
600
+ const hidden = this.customSearchEnabled
601
+ ? false
602
+ : Select2Utils.isSearchboxHiddex(this._data, this._minCountForSearch);
603
+ if (this.isSearchboxHidden !== hidden) {
604
+ this.isSearchboxHidden = hidden;
605
+ }
606
+ }
607
+ hideSearch() {
608
+ const displaySearchStatus = displaySearchStatusList.indexOf(this.displaySearchStatus) > -1 ? this.displaySearchStatus : 'default';
609
+ return (displaySearchStatus === 'default' && this.isSearchboxHidden) || displaySearchStatus === 'hidden';
610
+ }
611
+ getOptionStyle(option) {
612
+ return ('select2-results__option ' +
613
+ (option.hide ? 'select2-results__option--hide ' : '') +
614
+ (option.value === this.hoveringValue ? 'select2-results__option--highlighted ' : '') +
615
+ (option.classes || ''));
616
+ }
617
+ mouseenter(option) {
618
+ if (!option.disabled) {
619
+ this.hoveringValue = option.value;
620
+ }
621
+ }
622
+ click(option) {
623
+ if (this.testSelection(option)) {
624
+ this.select(option);
625
+ }
626
+ }
627
+ reset(event) {
628
+ this.select(null);
629
+ this.stopEvent(event);
630
+ }
631
+ prevChange(event) {
632
+ event.stopPropagation();
633
+ }
634
+ stopEvent(event) {
635
+ event.preventDefault();
636
+ event.stopPropagation();
637
+ }
638
+ toggleOpenAndClose(focus = true, open) {
639
+ if (this.disabled) {
640
+ return;
641
+ }
642
+ this._focus(focus);
643
+ this.isOpen = open ?? !this.isOpen;
644
+ if (this.isOpen) {
645
+ this.innerSearchText = '';
646
+ this.updateFilteredData();
647
+ this._focusSearchboxOrResultsElement(focus);
648
+ setTimeout(() => {
649
+ if (this.option) {
650
+ const option = this.option instanceof Array ? this.option[0] : this.option;
651
+ this.updateScrollFromOption(option);
652
+ }
653
+ else if (this.resultsElement) {
654
+ this.resultsElement.scrollTop = 0;
655
+ }
656
+ setTimeout(() => {
657
+ this.triggerRect();
658
+ this.cdkConnectedOverlay?.overlayRef?.updatePosition();
659
+ }, 100);
660
+ });
661
+ this.open.emit(this);
662
+ }
663
+ else {
664
+ this.close.emit(this);
665
+ }
666
+ if (this.isOpen && !this._clickDetection && focus) {
667
+ setTimeout(() => {
668
+ window.document.body.addEventListener('click', this._clickDetectionFc, false);
669
+ this._clickDetection = true;
670
+ }, timeout);
671
+ }
672
+ this._changeDetectorRef.markForCheck();
673
+ }
674
+ hasTemplate(option, defaut) {
675
+ return (this.templates instanceof TemplateRef ||
676
+ this.templates?.[option.templateId] instanceof TemplateRef ||
677
+ this.templates?.[defaut] instanceof TemplateRef);
678
+ }
679
+ getTemplate(option, defaut) {
680
+ return this.hasTemplate(option, defaut)
681
+ ? this.templates[option.templateId] || this.templates[defaut] || this.templates
682
+ : undefined;
683
+ }
684
+ triggerRect() {
685
+ this._triggerRect = this.selectionElement.getBoundingClientRect();
686
+ this._dropdownRect = this.dropdown?.nativeElement
687
+ ? this.dropdown.nativeElement.getBoundingClientRect()
688
+ : undefined;
689
+ }
690
+ testSelection(option) {
691
+ if (option.disabled) {
692
+ return false;
693
+ }
694
+ return (!this.multiple ||
695
+ !this.limitSelection ||
696
+ (Array.isArray(this._value) && this._value.length < this.limitSelection));
697
+ }
698
+ testValueChange(value1, value2) {
699
+ if (((value1 === null || value1 === undefined) && (value2 === null || value2 === undefined)) ||
700
+ value1 === value2) {
701
+ return false;
702
+ }
703
+ if (this.multiple &&
704
+ value1?.length &&
705
+ value2?.length &&
706
+ value1.length === value2.length) {
707
+ for (const e1 of value1) {
708
+ const test = value2.indexOf(e1) > -1;
709
+ if (!test) {
710
+ return true;
711
+ }
712
+ }
713
+ return false;
714
+ }
715
+ return true;
716
+ }
717
+ updateFilteredData() {
718
+ setTimeout(() => {
719
+ let result = this._data;
720
+ if (this.multiple && this.hideSelectedItems) {
721
+ result = Select2Utils.getFilteredSelectedData(result, this.option);
722
+ }
723
+ if (!this.customSearchEnabled && this.searchText && this.searchText.length >= +this.minCharForSearch) {
724
+ result = Select2Utils.getFilteredData(result, this.searchText, this.editPattern);
725
+ }
726
+ if (this.maxResults > 0) {
727
+ const data = Select2Utils.getReduceData(result, +this.maxResults);
728
+ result = data.result;
729
+ this.maxResultsExceeded = data.reduce;
730
+ }
731
+ else {
732
+ this.maxResultsExceeded = false;
733
+ }
734
+ if (Select2Utils.valueIsNotInFilteredData(result, this.hoveringValue)) {
735
+ this.hoveringValue = Select2Utils.getFirstAvailableOption(result);
736
+ }
737
+ this.filteredData = result;
738
+ this._changeDetectorRef.markForCheck();
739
+ });
740
+ }
741
+ clickDetection(e) {
742
+ if (!this.ifParentContainsClass(e.target, 'selection')) {
743
+ if (this.isOpen && !this.ifParentContainsClass(e.target, 'select2-dropdown')) {
744
+ this.toggleOpenAndClose();
745
+ }
746
+ if (!this.ifParentContainsId(e.target, this._id)) {
747
+ this.clickExit();
748
+ }
749
+ }
750
+ else if (this.isOpen && !this.ifParentContainsId(e.target, this._id)) {
751
+ this.toggleOpenAndClose();
752
+ this.clickExit();
753
+ }
754
+ }
755
+ clickExit() {
756
+ this._focus(false);
757
+ window.document.body.removeEventListener('click', this._clickDetectionFc);
758
+ this._clickDetection = false;
759
+ }
760
+ ifParentContainsClass(element, cssClass) {
761
+ return this.getParentElementByClass(element, cssClass) !== null;
762
+ }
763
+ ifParentContainsId(element, id) {
764
+ return this.getParentElementById(element, id) !== null;
765
+ }
766
+ getParentElementByClass(element, cssClass) {
767
+ return this.containClasses(element, cssClass.trim().split(/\s+/))
768
+ ? element
769
+ : element.parentElement
770
+ ? this.getParentElementByClass(element.parentElement, cssClass)
771
+ : null;
772
+ }
773
+ getParentElementById(element, id) {
774
+ return element.id === id
775
+ ? element
776
+ : element.parentElement
777
+ ? this.getParentElementById(element.parentElement, id)
778
+ : null;
779
+ }
780
+ containClasses(element, cssClasses) {
781
+ if (!element.classList) {
782
+ return false;
783
+ }
784
+ for (const cssClass of cssClasses) {
785
+ if (!element.classList.contains(cssClass)) {
786
+ return false;
787
+ }
788
+ }
789
+ return true;
790
+ }
791
+ focusin() {
792
+ if (!this.disabled) {
793
+ this._focus(true);
794
+ }
795
+ }
796
+ focusout() {
797
+ if (this.selectionElement && !this.selectionElement.classList.contains('select2-focused')) {
798
+ this._focus(false);
799
+ this._onTouched();
800
+ }
801
+ }
802
+ select(option) {
803
+ let value;
804
+ if (option !== null) {
805
+ if (this.multiple) {
806
+ const options = this.option;
807
+ const index = options.findIndex(op => op.value === option.value);
808
+ if (index === -1) {
809
+ options.push(option);
810
+ }
811
+ else {
812
+ options.splice(index, 1);
813
+ }
814
+ value = this.option.map(op => op.value);
815
+ }
816
+ else {
817
+ this.option = option;
818
+ if (this.isOpen) {
819
+ this.isOpen = false;
820
+ this.close.emit(this);
821
+ this.selectionElement?.focus();
822
+ }
823
+ value = this.option.value;
824
+ }
825
+ }
826
+ else {
827
+ this.option = null;
828
+ }
829
+ if (this.multiple && this.hideSelectedItems) {
830
+ this.updateFilteredData();
831
+ }
832
+ if (this._control) {
833
+ this._onChange(value);
834
+ }
835
+ else {
836
+ this._value = value;
837
+ }
838
+ this.update.emit({
839
+ component: this,
840
+ value: value,
841
+ options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
842
+ });
843
+ }
844
+ keyDown(e, create = false) {
845
+ if (create && this._testKey(e, ['Enter', 13])) {
846
+ this.createAndAdd(e);
847
+ return;
848
+ }
849
+ if (this._testKey(e, ['ArrowDown', 40])) {
850
+ this.moveDown();
851
+ e.preventDefault();
852
+ }
853
+ else if (this._testKey(e, ['ArrowUp', 38])) {
854
+ this.moveUp();
855
+ e.preventDefault();
856
+ }
857
+ else if (this._testKey(e, ['Enter', 13])) {
858
+ this.selectByEnter();
859
+ e.preventDefault();
860
+ }
861
+ else if (this._testKey(e, ['Escape', 'Tab', 9, 27]) && this.isOpen) {
862
+ this.toggleOpenAndClose();
863
+ this._focus(false);
864
+ }
865
+ }
866
+ openKey(e, create = false) {
867
+ if (create && this._testKey(e, ['Enter', 13])) {
868
+ this.createAndAdd(e);
869
+ return;
870
+ }
871
+ if (this._testKey(e, ['ArrowDown', 'ArrowUp', 'Enter', 40, 38, 13])) {
872
+ this.toggleOpenAndClose();
873
+ e.preventDefault();
874
+ }
875
+ else if (this._testKey(e, ['Escape', 'Tab', 9, 27])) {
876
+ this._focus(false);
877
+ this._onTouched();
878
+ }
879
+ }
880
+ searchUpdate(e) {
881
+ this.searchText = e.target.value;
882
+ this.updateFilteredData();
883
+ }
884
+ trackBy(_index, item) {
885
+ return item.value;
886
+ }
887
+ isSelected(option) {
888
+ return Select2Utils.isSelected(this.option, option, this.multiple);
889
+ }
890
+ isDisabled(option) {
891
+ return option.disabled ? 'true' : 'false';
892
+ }
893
+ removeSelection(e, option) {
894
+ Select2Utils.removeSelection(this.option, option);
895
+ if (this.multiple && this.hideSelectedItems) {
896
+ this.updateFilteredData();
897
+ }
898
+ const value = this.option.map(op => op.value);
899
+ if (this._control) {
900
+ this._onChange(value);
901
+ }
902
+ else {
903
+ this._value = value;
904
+ }
905
+ this.update.emit({
906
+ component: this,
907
+ value: value,
908
+ options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
909
+ });
910
+ this.removeOption.emit({
911
+ component: this,
912
+ value: value,
913
+ removedOption: option,
914
+ });
915
+ e.preventDefault();
916
+ e.stopPropagation();
917
+ if (this.isOpen) {
918
+ this._focusSearchboxOrResultsElement();
919
+ }
920
+ }
921
+ /**
922
+ * Sets the model value. Implemented as part of ControlValueAccessor.
923
+ * @param value
924
+ */
925
+ writeValue(value) {
926
+ this._setSelectionByValue(value);
927
+ }
928
+ /**
929
+ * Saves a callback function to be invoked when the select's value
930
+ * changes from user input. Part of the ControlValueAccessor interface
931
+ * required to integrate with Angular's core forms API.
932
+ *
933
+ * @param fn Callback to be triggered when the value changes.
934
+ */
935
+ registerOnChange(fn) {
936
+ this._onChange = fn;
937
+ }
938
+ /**
939
+ * Saves a callback function to be invoked when the select is blurred
940
+ * by the user. Part of the ControlValueAccessor interface required
941
+ * to integrate with Angular's core forms API.
942
+ *
943
+ * @param fn Callback to be triggered when the component has been touched.
944
+ */
945
+ registerOnTouched(fn) {
946
+ this._onTouched = fn;
947
+ }
948
+ /**
949
+ * Sets whether the component should be disabled.
950
+ * Implemented as part of ControlValueAccessor.
951
+ * @param isDisabled
952
+ */
953
+ setDisabledState(isDisabled) {
954
+ this.disabled = isDisabled;
955
+ }
956
+ onScroll(way) {
957
+ this.scroll.emit({
958
+ component: this,
959
+ way,
960
+ search: this.innerSearchText,
961
+ });
962
+ }
963
+ _isErrorState() {
964
+ const isInvalid = this._control?.invalid;
965
+ const isTouched = this._control?.touched;
966
+ const isSubmitted = this._parentFormGroup?.submitted || this._parentForm?.submitted;
967
+ return !!(isInvalid && (isTouched || isSubmitted));
968
+ }
969
+ addItem(value) {
970
+ let item = Select2Utils.getOptionByValue(this._data, value);
971
+ if (!item) {
972
+ item = {
973
+ value,
974
+ label: value,
975
+ };
976
+ this._data.push(item);
977
+ }
978
+ return item;
979
+ }
980
+ createAndAdd(e) {
981
+ const value = e.target.value;
982
+ if (value.trim()) {
983
+ const item = this.addItem(value.trim());
984
+ this.click(item);
985
+ e.target.value = '';
986
+ }
987
+ this.stopEvent(e);
988
+ }
989
+ moveUp() {
990
+ this.updateScrollFromOption(Select2Utils.getPreviousOption(this.filteredData, this.hoveringValue));
991
+ }
992
+ moveDown() {
993
+ this.updateScrollFromOption(Select2Utils.getNextOption(this.filteredData, this.hoveringValue));
994
+ }
995
+ updateScrollFromOption(option) {
996
+ if (option) {
997
+ this.hoveringValue = option.value;
998
+ const domElement = this.results.find(r => r.nativeElement.innerText.trim() === option.label);
999
+ if (domElement && this.resultsElement) {
1000
+ this.resultsElement.scrollTop = 0;
1001
+ const listClientRect = this.resultsElement.getBoundingClientRect();
1002
+ const optionClientRect = domElement.nativeElement.getBoundingClientRect();
1003
+ this.resultsElement.scrollTop = optionClientRect.top - listClientRect.top;
1004
+ }
1005
+ }
1006
+ }
1007
+ selectByEnter() {
1008
+ if (this.hoveringValue) {
1009
+ const option = Select2Utils.getOptionByValue(this._data, this.hoveringValue);
1010
+ this.select(option);
1011
+ }
1012
+ }
1013
+ _testKey(event, refs = []) {
1014
+ return this._isKey(this._getKey(event), refs);
1015
+ }
1016
+ _getKey(event) {
1017
+ let code;
1018
+ if (event.key !== undefined) {
1019
+ code = event.key;
1020
+ }
1021
+ else if (event['keyIdentifier'] !== undefined) {
1022
+ code = event['keyIdentifier'];
1023
+ }
1024
+ else if (event['keyCode'] !== undefined) {
1025
+ code = event['keyCode'];
1026
+ }
1027
+ else {
1028
+ event.preventDefault();
1029
+ }
1030
+ return code;
1031
+ }
1032
+ _isKey(code, refs = []) {
1033
+ return refs && refs.length > 0 ? refs.indexOf(code) !== -1 : false;
1034
+ }
1035
+ /**
1036
+ * Sets the selected option based on a value. If no option can be
1037
+ * found with the designated value, the select trigger is cleared.
1038
+ */
1039
+ _setSelectionByValue(value) {
1040
+ if (this.option || (value !== undefined && value !== null)) {
1041
+ const isArray = Array.isArray(value);
1042
+ if (this.multiple && value && !isArray) {
1043
+ throw new Error('Non array value.');
1044
+ }
1045
+ else if (this._data) {
1046
+ if (this.multiple) {
1047
+ this.option = []; // if value is null, then empty option and return
1048
+ if (isArray) {
1049
+ // value is not null. Preselect value
1050
+ const selectedValues = Select2Utils.getOptionsByValue(this._data, value, this.multiple);
1051
+ selectedValues.map(item => this.select(item));
1052
+ }
1053
+ }
1054
+ else {
1055
+ this.select(Select2Utils.getOptionByValue(this._data, value));
1056
+ }
1057
+ }
1058
+ else if (this._control) {
1059
+ this._control.viewToModelUpdate(value);
1060
+ }
1061
+ this._changeDetectorRef.markForCheck();
1062
+ }
1063
+ }
1064
+ /** Does some manual dirty checking on the native input `value` property. */
1065
+ _dirtyCheckNativeValue() {
1066
+ const newValue = this.value;
1067
+ if (this._previousNativeValue !== newValue) {
1068
+ this._previousNativeValue = newValue;
1069
+ this._stateChanges.next();
1070
+ }
1071
+ }
1072
+ _coerceBooleanProperty(value) {
1073
+ return value != null && `${value}` !== 'false';
1074
+ }
1075
+ _focusSearchboxOrResultsElement(focus = true) {
1076
+ if (!this.isSearchboxHidden) {
1077
+ setTimeout(() => {
1078
+ if (this.searchInput && this.searchInput.nativeElement && focus) {
1079
+ this.searchInput.nativeElement.focus();
1080
+ }
1081
+ });
1082
+ }
1083
+ else if (this.resultsElement) {
1084
+ this.resultsElement.focus();
1085
+ }
1086
+ }
1087
+ _focus(state) {
1088
+ if (!state && this.focused) {
1089
+ this.focused = state;
1090
+ this.blur.emit(this);
1091
+ }
1092
+ else if (state && !this.focused) {
1093
+ this.focused = state;
1094
+ this.focus.emit(this);
1095
+ }
1096
+ }
1097
+ _isAbobeOverlay() {
1098
+ return this.overlay && this._overlayPosition && this.listPosition === 'auto'
1099
+ ? this._overlayPosition === 'top'
1100
+ : this.listPosition === 'above';
1101
+ }
1102
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", 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 */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", 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
+ }
1105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: Select2, decorators: [{
1106
+ type: Component,
1107
+ 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"] }]
1108
+ }], ctorParameters: function () { 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
+ }] }]; }, propDecorators: { data: [{
1120
+ type: Input
1121
+ }], minCharForSearch: [{
1122
+ type: Input
1123
+ }], displaySearchStatus: [{
1124
+ type: Input
1125
+ }], placeholder: [{
1126
+ type: Input
1127
+ }], customSearchEnabled: [{
1128
+ type: Input
1129
+ }], limitSelection: [{
1130
+ type: Input
1131
+ }], listPosition: [{
1132
+ type: Input
1133
+ }], multiple: [{
1134
+ type: Input
1135
+ }], overlay: [{
1136
+ type: Input
1137
+ }], styleMode: [{
1138
+ type: Input
1139
+ }], noResultMessage: [{
1140
+ type: Input
1141
+ }], maxResults: [{
1142
+ type: Input
1143
+ }], maxResultsMessage: [{
1144
+ type: Input
1145
+ }], infiniteScrollDistance: [{
1146
+ type: Input
1147
+ }], infiniteScrollThrottle: [{
1148
+ type: Input
1149
+ }], infiniteScroll: [{
1150
+ type: Input
1151
+ }], autoCreate: [{
1152
+ type: Input
1153
+ }], noLabelTemplate: [{
1154
+ type: Input
1155
+ }], editPattern: [{
1156
+ type: Input
1157
+ }], templates: [{
1158
+ type: Input
1159
+ }], resultMaxHeight: [{
1160
+ type: Input
1161
+ }], update: [{
1162
+ type: Output
1163
+ }], open: [{
1164
+ type: Output
1165
+ }], close: [{
1166
+ type: Output
1167
+ }], focus: [{
1168
+ type: Output
1169
+ }], blur: [{
1170
+ type: Output
1171
+ }], search: [{
1172
+ type: Output
1173
+ }], scroll: [{
1174
+ type: Output
1175
+ }], removeOption: [{
1176
+ type: Output
1177
+ }], minCountForSearch: [{
1178
+ type: Input
1179
+ }], id: [{
1180
+ type: Input
1181
+ }, {
1182
+ type: HostBinding,
1183
+ args: ['id']
1184
+ }], required: [{
1185
+ type: Input
1186
+ }], disabled: [{
1187
+ type: Input
1188
+ }], hideSelectedItems: [{
1189
+ type: Input
1190
+ }], readonly: [{
1191
+ type: Input
1192
+ }], value: [{
1193
+ type: Input
1194
+ }], tabIndex: [{
1195
+ type: Input
1196
+ }], resettable: [{
1197
+ type: Input
1198
+ }], ariaInvalid: [{
1199
+ type: HostBinding,
1200
+ args: ['attr.aria-invalid']
1201
+ }], classMaterial: [{
1202
+ type: HostBinding,
1203
+ args: ['class.material']
1204
+ }], classNostyle: [{
1205
+ type: HostBinding,
1206
+ args: ['class.nostyle']
1207
+ }], select2above: [{
1208
+ type: HostBinding,
1209
+ args: ['class.select2-above']
1210
+ }], cdkConnectedOverlay: [{
1211
+ type: ViewChild,
1212
+ args: [CdkConnectedOverlay]
1213
+ }], selection: [{
1214
+ type: ViewChild,
1215
+ args: ['selection', { static: true }]
1216
+ }], resultContainer: [{
1217
+ type: ViewChild,
1218
+ args: ['results']
1219
+ }], results: [{
1220
+ type: ViewChildren,
1221
+ args: ['result']
1222
+ }], searchInput: [{
1223
+ type: ViewChild,
1224
+ args: ['searchInput']
1225
+ }], dropdown: [{
1226
+ type: ViewChild,
1227
+ args: ['dropdown']
1228
+ }] } });
1229
+
1230
+ class Select2Hint {
1231
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: Select2Hint, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1232
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.4", type: Select2Hint, selector: "select2-hint", ngImport: i0 }); }
1233
+ }
1234
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: Select2Hint, decorators: [{
1235
+ type: Directive,
1236
+ args: [{ selector: 'select2-hint' }]
1237
+ }] });
1238
+
1239
+ class Select2Label {
1240
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: Select2Label, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1241
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.4", type: Select2Label, selector: "select2-label", ngImport: i0 }); }
1242
+ }
1243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: Select2Label, decorators: [{
1244
+ type: Directive,
1245
+ args: [{ selector: 'select2-label' }]
1246
+ }] });
1247
+
1248
+ class Select2Module {
1249
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: Select2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1250
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.4", ngImport: i0, type: Select2Module, declarations: [Select2Hint, Select2Label, Select2], imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule], exports: [FormsModule, ReactiveFormsModule, Select2Hint, Select2Label, Select2] }); }
1251
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: Select2Module, imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule, FormsModule, ReactiveFormsModule] }); }
1252
+ }
1253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: Select2Module, decorators: [{
1254
+ type: NgModule,
1255
+ args: [{
1256
+ imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule],
1257
+ declarations: [Select2Hint, Select2Label, Select2],
1258
+ exports: [FormsModule, ReactiveFormsModule, Select2Hint, Select2Label, Select2],
1259
+ }]
1260
+ }] });
1261
+
1262
+ /*
1263
+ * Public API Surface of ng-select2-component
1264
+ */
1265
+
1266
+ /**
1267
+ * Generated bundle index. Do not edit.
1268
+ */
1269
+
1270
+ export { Select2, Select2Hint, Select2Label, Select2Module, Select2Utils, defaultMinCountForSearch, protectRegexp, timeout, unicodePatterns };
1271
+ //# sourceMappingURL=ng-select2-component.mjs.map