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