ng-select2-component 8.1.0 → 9.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +5 -3
  3. package/esm2020/lib/select2-const.mjs +48 -0
  4. package/esm2020/lib/select2-hint.component.mjs +11 -0
  5. package/esm2020/lib/select2-interfaces.mjs +2 -0
  6. package/esm2020/lib/select2-label.component.mjs +11 -0
  7. package/esm2020/lib/select2-utils.mjs +280 -0
  8. package/esm2020/lib/select2.component.mjs +871 -0
  9. package/esm2020/lib/select2.module.mjs +23 -0
  10. package/esm2020/ng-select2-component.mjs +5 -0
  11. package/esm2020/public_api.mjs +12 -0
  12. package/fesm2015/ng-select2-component.mjs +1241 -0
  13. package/fesm2015/ng-select2-component.mjs.map +1 -0
  14. package/fesm2020/ng-select2-component.mjs +1242 -0
  15. package/fesm2020/ng-select2-component.mjs.map +1 -0
  16. package/lib/select2-const.d.ts +1 -0
  17. package/lib/select2-const.d.ts.map +1 -0
  18. package/lib/select2-hint.component.d.ts +4 -0
  19. package/lib/select2-hint.component.d.ts.map +1 -0
  20. package/lib/select2-interfaces.d.ts +1 -0
  21. package/lib/select2-interfaces.d.ts.map +1 -0
  22. package/lib/select2-label.component.d.ts +4 -0
  23. package/lib/select2-label.component.d.ts.map +1 -0
  24. package/lib/select2-utils.d.ts +1 -0
  25. package/lib/select2-utils.d.ts.map +1 -0
  26. package/lib/select2.component.d.ts +4 -0
  27. package/lib/select2.component.d.ts.map +1 -0
  28. package/lib/select2.module.d.ts +12 -0
  29. package/lib/select2.module.d.ts.map +1 -0
  30. package/ng-select2-component.d.ts +2 -0
  31. package/ng-select2-component.d.ts.map +1 -0
  32. package/package.json +25 -13
  33. package/public_api.d.ts +1 -0
  34. package/public_api.d.ts.map +1 -0
  35. package/bundles/ng-select2-component.umd.js +0 -2666
  36. package/bundles/ng-select2-component.umd.js.map +0 -1
  37. package/bundles/ng-select2-component.umd.min.js +0 -2
  38. package/bundles/ng-select2-component.umd.min.js.map +0 -1
  39. package/esm2015/lib/select2-const.js +0 -57
  40. package/esm2015/lib/select2-hint.component.js +0 -12
  41. package/esm2015/lib/select2-interfaces.js +0 -134
  42. package/esm2015/lib/select2-label.component.js +0 -12
  43. package/esm2015/lib/select2-utils.js +0 -415
  44. package/esm2015/lib/select2.component.js +0 -1530
  45. package/esm2015/lib/select2.module.js +0 -23
  46. package/esm2015/ng-select2-component.js +0 -10
  47. package/esm2015/public_api.js +0 -17
  48. package/fesm2015/ng-select2-component.js +0 -2187
  49. package/fesm2015/ng-select2-component.js.map +0 -1
  50. package/ng-select2-component.metadata.json +0 -1
@@ -1,2187 +0,0 @@
1
- import { CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
2
- import { ViewportRuler } from '@angular/cdk/scrolling';
3
- import { EventEmitter, TemplateRef, Component, ChangeDetectorRef, Optional, Self, Attribute, Input, Output, HostBinding, ViewChild, ViewChildren, Directive, NgModule } from '@angular/core';
4
- import { NgForm, FormGroupDirective, NgControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
- import { Subject } from 'rxjs';
6
- import { CommonModule } from '@angular/common';
7
- import { InfiniteScrollModule } from 'ngx-infinite-scroll';
8
-
9
- /**
10
- * @fileoverview added by tsickle
11
- * Generated from: lib/select2-interfaces.ts
12
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
13
- */
14
- /**
15
- * @record
16
- */
17
- function Select2Group() { }
18
- if (false) {
19
- /**
20
- * label of group
21
- * @type {?}
22
- */
23
- Select2Group.prototype.label;
24
- /**
25
- * options list
26
- * @type {?}
27
- */
28
- Select2Group.prototype.options;
29
- /**
30
- * add classes
31
- * @type {?|undefined}
32
- */
33
- Select2Group.prototype.classes;
34
- /**
35
- * template id
36
- * @type {?|undefined}
37
- */
38
- Select2Group.prototype.templateId;
39
- /**
40
- * template data
41
- * @type {?|undefined}
42
- */
43
- Select2Group.prototype.data;
44
- }
45
- /**
46
- * @record
47
- */
48
- function Select2Option() { }
49
- if (false) {
50
- /**
51
- * value
52
- * @type {?}
53
- */
54
- Select2Option.prototype.value;
55
- /**
56
- * label of option
57
- * @type {?}
58
- */
59
- Select2Option.prototype.label;
60
- /**
61
- * no selectable is disabled
62
- * @type {?|undefined}
63
- */
64
- Select2Option.prototype.disabled;
65
- /**
66
- * for identification
67
- * @type {?|undefined}
68
- */
69
- Select2Option.prototype.id;
70
- /**
71
- * add classes
72
- * @type {?|undefined}
73
- */
74
- Select2Option.prototype.classes;
75
- /**
76
- * template id
77
- * @type {?|undefined}
78
- */
79
- Select2Option.prototype.templateId;
80
- /**
81
- * template data
82
- * @type {?|undefined}
83
- */
84
- Select2Option.prototype.data;
85
- /**
86
- * hide this option
87
- * @type {?|undefined}
88
- */
89
- Select2Option.prototype.hide;
90
- }
91
- /**
92
- * @record
93
- * @template U
94
- */
95
- function Select2UpdateEvent() { }
96
- if (false) {
97
- /** @type {?} */
98
- Select2UpdateEvent.prototype.component;
99
- /** @type {?} */
100
- Select2UpdateEvent.prototype.value;
101
- /** @type {?} */
102
- Select2UpdateEvent.prototype.options;
103
- }
104
- /**
105
- * @record
106
- * @template U
107
- */
108
- function Select2SearchEvent() { }
109
- if (false) {
110
- /** @type {?} */
111
- Select2SearchEvent.prototype.component;
112
- /** @type {?} */
113
- Select2SearchEvent.prototype.value;
114
- /** @type {?} */
115
- Select2SearchEvent.prototype.search;
116
- }
117
- /**
118
- * @record
119
- * @template U
120
- */
121
- function Select2RemoveEvent() { }
122
- if (false) {
123
- /** @type {?} */
124
- Select2RemoveEvent.prototype.component;
125
- /** @type {?} */
126
- Select2RemoveEvent.prototype.value;
127
- /** @type {?} */
128
- Select2RemoveEvent.prototype.removedOption;
129
- }
130
- /**
131
- * @record
132
- */
133
- function Select2ScrollEvent() { }
134
- if (false) {
135
- /** @type {?} */
136
- Select2ScrollEvent.prototype.component;
137
- /** @type {?} */
138
- Select2ScrollEvent.prototype.way;
139
- /** @type {?} */
140
- Select2ScrollEvent.prototype.search;
141
- }
142
-
143
- /**
144
- * @fileoverview added by tsickle
145
- * Generated from: lib/select2-const.ts
146
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
147
- */
148
- /** @type {?} */
149
- const timeout = 200;
150
- /** @type {?} */
151
- const unicodePatterns = [
152
- { l: 'a', s: /[ⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ]/gi },
153
- { l: 'aa', s: /ꜳ/gi },
154
- { l: 'ae', s: /[æǽǣ]/gi },
155
- { l: 'ao', s: /ꜵ/gi },
156
- { l: 'au', s: /ꜷ/gi },
157
- { l: 'av', s: /[ꜹꜻ]/gi },
158
- { l: 'ay', s: /ꜽ/gi },
159
- { l: 'b', s: /[ⓑbḃḅḇƀƃɓ]/gi },
160
- { l: 'c', s: /[ⓒcćĉċčçḉƈȼꜿↄ]/gi },
161
- { l: 'd', s: /[ⓓdḋďḍḑḓḏđƌɖɗꝺ]/gi },
162
- { l: 'dz', s: /[dzdž]/gi },
163
- { l: 'e', s: /[ⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ]/gi },
164
- { l: 'f', s: /[ⓕfḟƒꝼ]/gi },
165
- { l: 'g', s: /[ⓖgǵĝḡğġǧģǥɠꞡᵹꝿ]/gi },
166
- { l: 'h', s: /[ⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ]/gi },
167
- { l: 'hv', s: /ƕ/gi },
168
- { l: 'i', s: /[ⓘiìíîĩīĭİïḯỉǐȉȋịįḭɨı]/gi },
169
- { l: 'j', s: /[ⓙjĵǰɉ]/gi },
170
- { l: 'k', s: /[ⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ]/gi },
171
- { l: 'l', s: /[ⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇꝆ]/gi },
172
- { l: 'lj', s: /lj/gi },
173
- { l: 'm', s: /[ⓜmḿṁṃɱɯ]/gi },
174
- { l: 'n', s: /[ⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ]/gi },
175
- { l: 'nj', s: /nj/gi },
176
- { l: 'o', s: /[ⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔƟꝋꝍɵ]/gi },
177
- { l: 'oi', s: /ƣ/gi },
178
- { l: 'oe', s: /œ/gi },
179
- { l: 'oo', s: /ꝏ/gi },
180
- { l: 'ou', s: /ȣ/gi },
181
- { l: 'p', s: /[ⓟpṕṗƥᵽꝑꝓꝕ]/gi },
182
- { l: 'q', s: /[ⓠqɋꝗꝙ]/gi },
183
- { l: 'r', s: /[ⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ]/gi },
184
- { l: 's', s: /[ⓢsßẞśṥŝṡšṧṣṩșşȿꞩꞅẛ]/gi },
185
- { l: 't', s: /[ⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ]/gi },
186
- { l: 'tz', s: /ꜩ/gi },
187
- { l: 'u', s: /[ⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ]/gi },
188
- { l: 'v', s: /[ⓥvṽṿʋꝟʌ]/gi },
189
- { l: 'vy', s: /ꝡ/gi },
190
- { l: 'w', s: /[ⓦwẁẃŵẇẅẘẉⱳ]/gi },
191
- { l: 'x', s: /[ⓧxẋẍ]/gi },
192
- { l: 'y', s: /[ⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ]/gi },
193
- { l: 'z', s: /[ⓩzźẑżžẓẕƶȥɀⱬꝣ]/gi },
194
- ];
195
- /** @type {?} */
196
- const defaultMinCountForSearch = 6;
197
- /** @type {?} */
198
- const protectRegexp = new RegExp('[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]', 'g');
199
-
200
- /**
201
- * @fileoverview added by tsickle
202
- * Generated from: lib/select2-utils.ts
203
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
204
- */
205
- class Select2Utils {
206
- /**
207
- * @param {?} data
208
- * @param {?} value
209
- * @return {?}
210
- */
211
- static getOptionByValue(data, value) {
212
- if (Array.isArray(data)) {
213
- for (const groupOrOption of data) {
214
- /** @type {?} */
215
- const options = ((/** @type {?} */ (groupOrOption))).options;
216
- if (options) {
217
- for (const option of options) {
218
- if (option.value === value) {
219
- return option;
220
- }
221
- }
222
- }
223
- else if (((/** @type {?} */ (groupOrOption))).value === value) {
224
- return (/** @type {?} */ (groupOrOption));
225
- }
226
- }
227
- }
228
- return null;
229
- }
230
- /**
231
- * @param {?} data
232
- * @param {?} value
233
- * @param {?} multiple
234
- * @return {?}
235
- */
236
- static getOptionsByValue(data, value, multiple) {
237
- if (multiple) {
238
- /** @type {?} */
239
- const values = Array.isArray(value) ? value : [];
240
- /** @type {?} */
241
- const result = [];
242
- for (const v of values) {
243
- /** @type {?} */
244
- const option = Select2Utils.getOptionByValue(data, v);
245
- if (option) {
246
- result.push(option);
247
- }
248
- }
249
- return result;
250
- }
251
- return Select2Utils.getOptionByValue(data, (/** @type {?} */ (value)));
252
- }
253
- /**
254
- * @param {?} data
255
- * @return {?}
256
- */
257
- static getFirstAvailableOption(data) {
258
- if (Array.isArray(data)) {
259
- for (const groupOrOption of data) {
260
- /** @type {?} */
261
- const options = ((/** @type {?} */ (groupOrOption))).options;
262
- if (options) {
263
- for (const option of options) {
264
- if (!option.disabled) {
265
- return option.value;
266
- }
267
- }
268
- }
269
- else {
270
- /** @type {?} */
271
- const option = (/** @type {?} */ (groupOrOption));
272
- if (!option.disabled) {
273
- return option.value;
274
- }
275
- }
276
- }
277
- }
278
- return null;
279
- }
280
- /**
281
- * @param {?} filteredData
282
- * @param {?} value
283
- * @return {?}
284
- */
285
- static valueIsNotInFilteredData(filteredData, value) {
286
- if (Select2Utils.isNullOrUndefined(value)) {
287
- return true;
288
- }
289
- for (const groupOrOption of filteredData) {
290
- /** @type {?} */
291
- const options = ((/** @type {?} */ (groupOrOption))).options;
292
- if (options) {
293
- for (const option of options) {
294
- if (option.value === value) {
295
- return false;
296
- }
297
- }
298
- }
299
- else if (((/** @type {?} */ (groupOrOption))).value === value) {
300
- return false;
301
- }
302
- }
303
- return true;
304
- }
305
- // tslint:disable-next-line:cognitive-complexity
306
- /**
307
- * @param {?} filteredData
308
- * @param {?} hoveringValue
309
- * @return {?}
310
- */
311
- static getPreviousOption(filteredData, hoveringValue) {
312
- /** @type {?} */
313
- let findIt = Select2Utils.isNullOrUndefined(hoveringValue);
314
- for (let i = filteredData.length - 1; i >= 0; i--) {
315
- /** @type {?} */
316
- const groupOrOption = filteredData[i];
317
- /** @type {?} */
318
- const options = ((/** @type {?} */ (groupOrOption))).options;
319
- if (options) {
320
- for (let j = options.length - 1; j >= 0; j--) {
321
- /** @type {?} */
322
- const option = options[j];
323
- if (findIt && !option.disabled && !option.hide) {
324
- return option;
325
- }
326
- if (!findIt) {
327
- findIt = option.value === hoveringValue;
328
- }
329
- }
330
- }
331
- else {
332
- /** @type {?} */
333
- const option = (/** @type {?} */ (groupOrOption));
334
- if (findIt && !option.disabled && !option.hide) {
335
- return option;
336
- }
337
- if (!findIt) {
338
- findIt = option.value === hoveringValue;
339
- }
340
- }
341
- }
342
- return null;
343
- }
344
- // tslint:disable-next-line:cognitive-complexity
345
- /**
346
- * @param {?} filteredData
347
- * @param {?} hoveringValue
348
- * @return {?}
349
- */
350
- static getNextOption(filteredData, hoveringValue) {
351
- /** @type {?} */
352
- let findIt = Select2Utils.isNullOrUndefined(hoveringValue);
353
- for (const groupOrOption of filteredData) {
354
- /** @type {?} */
355
- const options = ((/** @type {?} */ (groupOrOption))).options;
356
- if (options) {
357
- for (const option of options) {
358
- if (findIt) {
359
- if (!option.disabled && !option.hide) {
360
- return option;
361
- }
362
- }
363
- else if (!findIt) {
364
- findIt = option.value === hoveringValue;
365
- }
366
- }
367
- }
368
- else {
369
- /** @type {?} */
370
- const option = (/** @type {?} */ (groupOrOption));
371
- if (findIt) {
372
- if (!option.disabled && !option.hide) {
373
- return option;
374
- }
375
- }
376
- else if (!findIt) {
377
- findIt = option.value === hoveringValue;
378
- }
379
- }
380
- }
381
- return null;
382
- }
383
- /**
384
- * @param {?} data
385
- * @param {?=} maxResults
386
- * @return {?}
387
- */
388
- static getReduceData(data, maxResults = 0) {
389
- if (maxResults > 0) {
390
- /** @type {?} */
391
- let counter = 0;
392
- /** @type {?} */
393
- const result = [];
394
- // debugger;
395
- for (const groupOrOption of data) {
396
- /** @type {?} */
397
- const options = ((/** @type {?} */ (groupOrOption))).options;
398
- if (options) {
399
- /** @type {?} */
400
- const group = Object.assign(Object.assign({}, groupOrOption), { options: [] });
401
- result.push(group);
402
- for (const item of options) {
403
- group.options.push(item);
404
- counter++;
405
- if (counter === maxResults) {
406
- return { result, reduce: true };
407
- }
408
- }
409
- }
410
- else {
411
- result.push(groupOrOption);
412
- counter++;
413
- }
414
- if (counter === maxResults) {
415
- return { result, reduce: true };
416
- }
417
- }
418
- return { result, reduce: false };
419
- }
420
- else {
421
- return { result: data, reduce: false };
422
- }
423
- }
424
- /**
425
- * @param {?} data
426
- * @param {?} searchText
427
- * @param {?=} editPattern
428
- * @return {?}
429
- */
430
- static getFilteredData(data, searchText, editPattern) {
431
- if (searchText) {
432
- /** @type {?} */
433
- const result = [];
434
- for (const groupOrOption of data) {
435
- /** @type {?} */
436
- const options = ((/** @type {?} */ (groupOrOption))).options;
437
- if (options) {
438
- if (options.some((/**
439
- * @param {?} group
440
- * @return {?}
441
- */
442
- group => Select2Utils.containSearchText(group.label, searchText, editPattern)))) {
443
- /** @type {?} */
444
- const filteredOptions = options.filter((/**
445
- * @param {?} group
446
- * @return {?}
447
- */
448
- group => Select2Utils.containSearchText(group.label, searchText, editPattern)));
449
- result.push(Object.assign(Object.assign({}, groupOrOption), { options: filteredOptions }));
450
- }
451
- }
452
- else if (Select2Utils.containSearchText(groupOrOption.label, searchText, editPattern)) {
453
- result.push(groupOrOption);
454
- }
455
- }
456
- return result;
457
- }
458
- else {
459
- return data;
460
- }
461
- }
462
- /**
463
- * @param {?} data
464
- * @param {?} selectedOptions
465
- * @return {?}
466
- */
467
- static getFilteredSelectedData(data, selectedOptions) {
468
- /** @type {?} */
469
- const result = [];
470
- for (const groupOrOption of data) {
471
- /** @type {?} */
472
- const options = ((/** @type {?} */ (groupOrOption))).options;
473
- if (options) {
474
- /** @type {?} */
475
- const filteredOptions = options.filter((/**
476
- * @param {?} group
477
- * @return {?}
478
- */
479
- group => Select2Utils.isSelected(selectedOptions, group, true) === 'false'));
480
- if (filteredOptions.length) {
481
- result.push(Object.assign(Object.assign({}, groupOrOption), { options: filteredOptions }));
482
- }
483
- }
484
- else if (Select2Utils.isSelected(selectedOptions, (/** @type {?} */ (groupOrOption)), true) === 'false') {
485
- result.push(groupOrOption);
486
- }
487
- }
488
- return result;
489
- }
490
- /**
491
- * @param {?} data
492
- * @param {?=} minCountForSearch
493
- * @return {?}
494
- */
495
- static isSearchboxHiddex(data, minCountForSearch) {
496
- if (minCountForSearch === '' ||
497
- minCountForSearch === undefined ||
498
- minCountForSearch === null ||
499
- isNaN(+minCountForSearch)) {
500
- minCountForSearch = defaultMinCountForSearch;
501
- }
502
- /** @type {?} */
503
- const optionCount = Select2Utils.getOptionsCount(data);
504
- return optionCount < +minCountForSearch;
505
- }
506
- /**
507
- * @param {?} options
508
- * @param {?} option
509
- * @param {?} multiple
510
- * @return {?}
511
- */
512
- static isSelected(options, option, multiple) {
513
- return multiple
514
- ? options && ((/** @type {?} */ (options))).some((/**
515
- * @param {?} op
516
- * @return {?}
517
- */
518
- op => op.value === option.value))
519
- ? 'true'
520
- : 'false'
521
- : options && option.value === ((/** @type {?} */ (options))).value
522
- ? 'true'
523
- : 'false';
524
- }
525
- /**
526
- * @param {?} options
527
- * @param {?} option
528
- * @return {?}
529
- */
530
- static removeSelection(options, option) {
531
- for (let i = 0; i < ((/** @type {?} */ (options))).length; i++) {
532
- if (((/** @type {?} */ (options)))[i].value === option.value) {
533
- ((/** @type {?} */ (options))).splice(i, 1);
534
- return;
535
- }
536
- }
537
- }
538
- /**
539
- * @private
540
- * @param {?} data
541
- * @return {?}
542
- */
543
- static getOptionsCount(data) {
544
- /** @type {?} */
545
- let count = 0;
546
- if (Array.isArray(data)) {
547
- for (const groupOrOption of data) {
548
- /** @type {?} */
549
- const options = ((/** @type {?} */ (groupOrOption))).options;
550
- if (options) {
551
- count += options.length;
552
- }
553
- else {
554
- count++;
555
- }
556
- }
557
- }
558
- return count;
559
- }
560
- /**
561
- * @private
562
- * @param {?} value
563
- * @return {?}
564
- */
565
- static isNullOrUndefined(value) {
566
- return value === null || value === undefined;
567
- }
568
- /**
569
- * @private
570
- * @param {?} label
571
- * @param {?} searchText
572
- * @param {?} editPattern
573
- * @return {?}
574
- */
575
- static containSearchText(label, searchText, editPattern) {
576
- return searchText
577
- ? Select2Utils.formatSansUnicode(label).match(new RegExp(Select2Utils.formatPattern(searchText, editPattern), 'i')) !== null
578
- : true;
579
- }
580
- /**
581
- * @private
582
- * @param {?} str
583
- * @return {?}
584
- */
585
- static protectPattern(str) {
586
- return str.replace(protectRegexp, '\\$&');
587
- }
588
- /**
589
- * @private
590
- * @param {?} str
591
- * @return {?}
592
- */
593
- static formatSansUnicode(str) {
594
- for (const unicodePattern of unicodePatterns) {
595
- str = str.replace(unicodePattern.s, unicodePattern.l);
596
- }
597
- return str;
598
- }
599
- /**
600
- * @private
601
- * @param {?} str
602
- * @param {?} editPattern
603
- * @return {?}
604
- */
605
- static formatPattern(str, editPattern) {
606
- str = Select2Utils.formatSansUnicode(Select2Utils.protectPattern(str));
607
- if (editPattern && typeof editPattern === 'function') {
608
- str = editPattern(str);
609
- }
610
- return str;
611
- }
612
- }
613
-
614
- /**
615
- * @fileoverview added by tsickle
616
- * Generated from: lib/select2.component.ts
617
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
618
- */
619
- /** @type {?} */
620
- let nextUniqueId = 0;
621
- /** @type {?} */
622
- const displaySearchStatusList = ['default', 'hidden', 'always'];
623
- class Select2 {
624
- /**
625
- * @param {?} _viewportRuler
626
- * @param {?} _changeDetectorRef
627
- * @param {?} _parentForm
628
- * @param {?} _parentFormGroup
629
- * @param {?} _control
630
- * @param {?} tabIndex
631
- */
632
- constructor(_viewportRuler, _changeDetectorRef, _parentForm, _parentFormGroup, _control, tabIndex) {
633
- this._viewportRuler = _viewportRuler;
634
- this._changeDetectorRef = _changeDetectorRef;
635
- this._parentForm = _parentForm;
636
- this._parentFormGroup = _parentFormGroup;
637
- this._control = _control;
638
- this.minCharForSearch = 0;
639
- this.limitSelection = 0;
640
- this.listPosition = 'below';
641
- /**
642
- * use the material style
643
- */
644
- this.styleMode = 'default';
645
- /**
646
- * maximum results limit (0 = no limit)
647
- */
648
- this.maxResults = 0;
649
- /**
650
- * message when maximum results
651
- */
652
- this.maxResultsMessage = 'Too many results…';
653
- /**
654
- * infinite scroll distance
655
- */
656
- this.infiniteScrollDistance = 1.5;
657
- /**
658
- * infinite scroll distance
659
- */
660
- this.infiniteScrollThrottle = 150;
661
- /**
662
- * the max height of the results container when opening the select
663
- */
664
- this.resultMaxHeight = '200px';
665
- this.update = new EventEmitter();
666
- this.open = new EventEmitter();
667
- this.close = new EventEmitter();
668
- this.focus = new EventEmitter();
669
- this.blur = new EventEmitter();
670
- this.search = new EventEmitter();
671
- this.scroll = new EventEmitter();
672
- this.removeOption = new EventEmitter();
673
- this.option = null;
674
- this.isOpen = false;
675
- /**
676
- * Whether the element is focused or not.
677
- */
678
- this.focused = false;
679
- this.hoveringValue = null;
680
- this.innerSearchText = '';
681
- this._stateChanges = new Subject();
682
- this._disabled = false;
683
- this._required = false;
684
- this._readonly = false;
685
- this._multiple = false;
686
- this._overlay = false;
687
- this._resettable = false;
688
- this._hideSelectedItems = false;
689
- this._clickDetection = false;
690
- this._uid = `select2-${nextUniqueId++}`;
691
- this._infiniteScroll = true;
692
- /**
693
- * View -> model callback called when select has been touched
694
- */
695
- this._onTouched = (/**
696
- * @return {?}
697
- */
698
- () => {
699
- // do nothing
700
- });
701
- /**
702
- * View -> model callback called when value changes
703
- */
704
- this._onChange = (/**
705
- * @return {?}
706
- */
707
- () => {
708
- // do nothing
709
- });
710
- this.id = this.id;
711
- this._tabIndex = parseInt(tabIndex, 10) || 0;
712
- if (this._control) {
713
- this._control.valueAccessor = this;
714
- }
715
- this._clickDetectionFc = this.clickDetection.bind(this);
716
- }
717
- /**
718
- * data of options & optiongrps
719
- * @param {?} data
720
- * @return {?}
721
- */
722
- set data(data) {
723
- this._data = data;
724
- this.updateFilteredData();
725
- }
726
- /**
727
- * @return {?}
728
- */
729
- get multiple() {
730
- return this._multiple;
731
- }
732
- /**
733
- * @param {?} value
734
- * @return {?}
735
- */
736
- set multiple(value) {
737
- this._multiple = this._coerceBooleanProperty(value);
738
- this.ngOnInit();
739
- }
740
- /**
741
- * use the material style
742
- * @return {?}
743
- */
744
- get overlay() {
745
- return this._overlay;
746
- }
747
- /**
748
- * @param {?} value
749
- * @return {?}
750
- */
751
- set overlay(value) {
752
- this._overlay = this._coerceBooleanProperty(value);
753
- }
754
- /**
755
- * infinite scroll activated
756
- * @return {?}
757
- */
758
- get infiniteScroll() {
759
- return this._infiniteScroll;
760
- }
761
- /**
762
- * @param {?} value
763
- * @return {?}
764
- */
765
- set infiniteScroll(value) {
766
- this._infiniteScroll = this._coerceBooleanProperty(value);
767
- }
768
- /**
769
- * @return {?}
770
- */
771
- get select2Options() {
772
- return this.multiple ? ((/** @type {?} */ (this.option))) : null;
773
- }
774
- /**
775
- * @return {?}
776
- */
777
- get select2Option() {
778
- return this.multiple ? null : ((/** @type {?} */ (this.option)));
779
- }
780
- /**
781
- * @return {?}
782
- */
783
- get searchText() {
784
- return this.innerSearchText;
785
- }
786
- /**
787
- * @param {?} text
788
- * @return {?}
789
- */
790
- set searchText(text) {
791
- if (this.customSearchEnabled) {
792
- this.search.emit({
793
- component: this,
794
- value: this._value,
795
- search: text,
796
- });
797
- }
798
- this.innerSearchText = text;
799
- }
800
- /**
801
- * minimal data of show the search field
802
- * @return {?}
803
- */
804
- get minCountForSearch() {
805
- return this._minCountForSearch;
806
- }
807
- /**
808
- * @param {?} value
809
- * @return {?}
810
- */
811
- set minCountForSearch(value) {
812
- this._minCountForSearch = value;
813
- this.updateSearchBox();
814
- }
815
- /**
816
- * Unique id of the element.
817
- * @return {?}
818
- */
819
- get id() {
820
- return this._id;
821
- }
822
- /**
823
- * @param {?} value
824
- * @return {?}
825
- */
826
- set id(value) {
827
- this._id = value || this._uid;
828
- }
829
- /**
830
- * Whether the element is required.
831
- * @return {?}
832
- */
833
- get required() {
834
- return this._required;
835
- }
836
- /**
837
- * @param {?} value
838
- * @return {?}
839
- */
840
- set required(value) {
841
- this._required = this._coerceBooleanProperty(value);
842
- }
843
- /**
844
- * Whether selected items should be hidden.
845
- * @return {?}
846
- */
847
- get disabled() {
848
- return this._control ? this._control.disabled : this._disabled;
849
- }
850
- /**
851
- * @param {?} value
852
- * @return {?}
853
- */
854
- set disabled(value) {
855
- this._disabled = this._coerceBooleanProperty(value);
856
- }
857
- /**
858
- * Whether items are hidden when has.
859
- * @return {?}
860
- */
861
- get hideSelectedItems() {
862
- return this._hideSelectedItems;
863
- }
864
- /**
865
- * @param {?} value
866
- * @return {?}
867
- */
868
- set hideSelectedItems(value) {
869
- this._hideSelectedItems = this._coerceBooleanProperty(value);
870
- }
871
- /**
872
- * Whether the element is readonly.
873
- * @return {?}
874
- */
875
- get readonly() {
876
- return this._readonly;
877
- }
878
- /**
879
- * @param {?} value
880
- * @return {?}
881
- */
882
- set readonly(value) {
883
- this._readonly = this._coerceBooleanProperty(value);
884
- }
885
- /**
886
- * The input element's value.
887
- * @return {?}
888
- */
889
- get value() {
890
- return this._value;
891
- }
892
- /**
893
- * @param {?} value
894
- * @return {?}
895
- */
896
- set value(value) {
897
- if (this.testValueChange(this._value, value)) {
898
- setTimeout((/**
899
- * @return {?}
900
- */
901
- () => {
902
- this._value = value;
903
- this.writeValue(value);
904
- }), 10);
905
- }
906
- }
907
- /**
908
- * Tab index for the select2 element.
909
- * @return {?}
910
- */
911
- get tabIndex() {
912
- return this.disabled ? -1 : this._tabIndex;
913
- }
914
- /**
915
- * @param {?} value
916
- * @return {?}
917
- */
918
- set tabIndex(value) {
919
- if (typeof value !== 'undefined') {
920
- this._tabIndex = value;
921
- }
922
- }
923
- /**
924
- * reset with no selected value
925
- * @return {?}
926
- */
927
- get resettable() {
928
- return this._resettable;
929
- }
930
- /**
931
- * @param {?} value
932
- * @return {?}
933
- */
934
- set resettable(value) {
935
- this._resettable = this._coerceBooleanProperty(value);
936
- }
937
- /**
938
- * @return {?}
939
- */
940
- get ariaInvalid() {
941
- return this._isErrorState();
942
- }
943
- /**
944
- * @return {?}
945
- */
946
- get classMaterial() {
947
- return this.styleMode === 'material';
948
- }
949
- /**
950
- * @return {?}
951
- */
952
- get classNostyle() {
953
- return this.styleMode === 'noStyle';
954
- }
955
- /**
956
- * @return {?}
957
- */
958
- get select2above() {
959
- return !this.overlay ? this.listPosition === 'above' : this._isAbobeOverlay();
960
- }
961
- /**
962
- * @return {?}
963
- */
964
- get _positions() {
965
- if (this.listPosition === 'auto') {
966
- [
967
- {
968
- originX: 'start',
969
- originY: 'bottom',
970
- overlayX: 'start',
971
- overlayY: 'bottom',
972
- },
973
- {
974
- originX: 'start',
975
- originY: 'top',
976
- overlayX: 'start',
977
- overlayY: 'top',
978
- },
979
- ];
980
- }
981
- else {
982
- return null;
983
- }
984
- }
985
- /**
986
- * @private
987
- * @return {?}
988
- */
989
- get resultsElement() {
990
- var _a;
991
- return (_a = this.resultContainer) === null || _a === void 0 ? void 0 : _a.nativeElement;
992
- }
993
- /**
994
- * @return {?}
995
- */
996
- ngOnInit() {
997
- this._viewportRuler.change(100).subscribe((/**
998
- * @return {?}
999
- */
1000
- () => {
1001
- if (this.isOpen) {
1002
- this.triggerRect();
1003
- }
1004
- }));
1005
- /** @type {?} */
1006
- const option = Select2Utils.getOptionsByValue(this._data, this._control ? this._control.value : this.value, this.multiple);
1007
- if (option !== null) {
1008
- this.option = option;
1009
- }
1010
- if (!Array.isArray(option)) {
1011
- this.hoveringValue = (/** @type {?} */ (this.value));
1012
- }
1013
- this.updateSearchBox();
1014
- }
1015
- /**
1016
- * @return {?}
1017
- */
1018
- ngAfterViewInit() {
1019
- this.cdkConnectedOverlay.positionChange.subscribe((/**
1020
- * @param {?} posChange
1021
- * @return {?}
1022
- */
1023
- (posChange) => {
1024
- var _a;
1025
- if (this.listPosition === 'auto' && ((_a = posChange.connectionPair) === null || _a === void 0 ? void 0 : _a.originY) &&
1026
- this._overlayPosition !== posChange.connectionPair.originY) {
1027
- this.triggerRect();
1028
- this._overlayPosition = posChange.connectionPair.originY;
1029
- this._changeDetectorRef.detectChanges();
1030
- }
1031
- }));
1032
- this.selectionElement = this.selection.nativeElement;
1033
- this.triggerRect();
1034
- }
1035
- /**
1036
- * @return {?}
1037
- */
1038
- ngDoCheck() {
1039
- var _a;
1040
- this.updateSearchBox();
1041
- this._dirtyCheckNativeValue();
1042
- if (this._triggerRect) {
1043
- if (this.overlayWidth !== this._triggerRect.width) {
1044
- this.overlayWidth = this._triggerRect.width;
1045
- }
1046
- if (((_a = this._dropdownRect) === null || _a === void 0 ? void 0 : _a.height) > 0 && this.overlayHeight !== this._dropdownRect.height) {
1047
- this.overlayHeight = this.listPosition === 'auto' ? this._dropdownRect.height : 0;
1048
- }
1049
- }
1050
- }
1051
- /**
1052
- * @return {?}
1053
- */
1054
- ngOnDestroy() {
1055
- window.document.body.removeEventListener('click', this._clickDetectionFc);
1056
- }
1057
- /**
1058
- * @return {?}
1059
- */
1060
- updateSearchBox() {
1061
- /** @type {?} */
1062
- const hidden = this.customSearchEnabled
1063
- ? false
1064
- : Select2Utils.isSearchboxHiddex(this._data, this._minCountForSearch);
1065
- if (this.isSearchboxHidden !== hidden) {
1066
- this.isSearchboxHidden = hidden;
1067
- }
1068
- }
1069
- /**
1070
- * @return {?}
1071
- */
1072
- hideSearch() {
1073
- /** @type {?} */
1074
- const displaySearchStatus = displaySearchStatusList.indexOf(this.displaySearchStatus) > -1 ? this.displaySearchStatus : 'default';
1075
- return (displaySearchStatus === 'default' && this.isSearchboxHidden) || displaySearchStatus === 'hidden';
1076
- }
1077
- /**
1078
- * @param {?} option
1079
- * @return {?}
1080
- */
1081
- getOptionStyle(option) {
1082
- return ('select2-results__option ' +
1083
- (option.hide ? 'select2-results__option--hide ' : '') +
1084
- (option.value === this.hoveringValue ? 'select2-results__option--highlighted ' : '') +
1085
- (option.classes || ''));
1086
- }
1087
- /**
1088
- * @param {?} option
1089
- * @return {?}
1090
- */
1091
- mouseenter(option) {
1092
- if (!option.disabled) {
1093
- this.hoveringValue = option.value;
1094
- }
1095
- }
1096
- /**
1097
- * @param {?} option
1098
- * @return {?}
1099
- */
1100
- click(option) {
1101
- if (this.testSelection(option)) {
1102
- this.select(option);
1103
- }
1104
- }
1105
- /**
1106
- * @param {?} e
1107
- * @return {?}
1108
- */
1109
- reset(e) {
1110
- this.select(null);
1111
- e.preventDefault();
1112
- e.stopPropagation();
1113
- }
1114
- /**
1115
- * @param {?} event
1116
- * @return {?}
1117
- */
1118
- prevChange(event) {
1119
- event.stopPropagation();
1120
- }
1121
- /**
1122
- * @return {?}
1123
- */
1124
- toggleOpenAndClose() {
1125
- if (this.disabled) {
1126
- return;
1127
- }
1128
- this._focus(true);
1129
- this.isOpen = !this.isOpen;
1130
- if (this.isOpen) {
1131
- this.innerSearchText = '';
1132
- this.updateFilteredData();
1133
- this._focusSearchboxOrResultsElement();
1134
- setTimeout((/**
1135
- * @return {?}
1136
- */
1137
- () => {
1138
- if (this.option) {
1139
- /** @type {?} */
1140
- const option = this.option instanceof Array ? this.option[0] : this.option;
1141
- this.updateScrollFromOption(option);
1142
- }
1143
- else if (this.resultsElement) {
1144
- this.resultsElement.scrollTop = 0;
1145
- }
1146
- setTimeout((/**
1147
- * @return {?}
1148
- */
1149
- () => {
1150
- var _a, _b;
1151
- this.triggerRect();
1152
- (_b = (_a = this.cdkConnectedOverlay) === null || _a === void 0 ? void 0 : _a.overlayRef) === null || _b === void 0 ? void 0 : _b.updatePosition();
1153
- }), 100);
1154
- }));
1155
- this.open.emit(this);
1156
- }
1157
- else {
1158
- this.close.emit(this);
1159
- }
1160
- if (this.isOpen && !this._clickDetection) {
1161
- setTimeout((/**
1162
- * @return {?}
1163
- */
1164
- () => {
1165
- window.document.body.addEventListener('click', this._clickDetectionFc, false);
1166
- this._clickDetection = true;
1167
- }), timeout);
1168
- }
1169
- this._changeDetectorRef.markForCheck();
1170
- }
1171
- /**
1172
- * @param {?} option
1173
- * @param {?} defaut
1174
- * @return {?}
1175
- */
1176
- hasTemplate(option, defaut) {
1177
- var _a, _b;
1178
- return (this.templates instanceof TemplateRef ||
1179
- ((_a = this.templates) === null || _a === void 0 ? void 0 : _a[option.templateId]) instanceof TemplateRef ||
1180
- ((_b = this.templates) === null || _b === void 0 ? void 0 : _b[defaut]) instanceof TemplateRef);
1181
- }
1182
- /**
1183
- * @param {?} option
1184
- * @param {?} defaut
1185
- * @return {?}
1186
- */
1187
- getTemplate(option, defaut) {
1188
- return this.hasTemplate(option, defaut)
1189
- ? this.templates[option.templateId] || this.templates[defaut] || this.templates
1190
- : undefined;
1191
- }
1192
- /**
1193
- * @return {?}
1194
- */
1195
- triggerRect() {
1196
- var _a;
1197
- this._triggerRect = this.selectionElement.getBoundingClientRect();
1198
- this._dropdownRect = ((_a = this.dropdown) === null || _a === void 0 ? void 0 : _a.nativeElement) ? this.dropdown.nativeElement.getBoundingClientRect()
1199
- : undefined;
1200
- }
1201
- /**
1202
- * @private
1203
- * @param {?} option
1204
- * @return {?}
1205
- */
1206
- testSelection(option) {
1207
- if (option.disabled) {
1208
- return false;
1209
- }
1210
- if (!this.multiple ||
1211
- !this.limitSelection ||
1212
- (Array.isArray(this._value) && this._value.length < this.limitSelection)) {
1213
- return true;
1214
- }
1215
- return false;
1216
- }
1217
- /**
1218
- * @private
1219
- * @param {?} value1
1220
- * @param {?} value2
1221
- * @return {?}
1222
- */
1223
- testValueChange(value1, value2) {
1224
- var _a, _b;
1225
- if (((value1 === null || value1 === undefined) && (value2 === null || value2 === undefined)) ||
1226
- value1 === value2) {
1227
- return false;
1228
- }
1229
- if (this.multiple && ((_a = ((/** @type {?} */ (value1)))) === null || _a === void 0 ? void 0 : _a.length) && ((_b = ((/** @type {?} */ (value2)))) === null || _b === void 0 ? void 0 : _b.length) &&
1230
- ((/** @type {?} */ (value1))).length === ((/** @type {?} */ (value2))).length) {
1231
- for (const e1 of (/** @type {?} */ (value1))) {
1232
- /** @type {?} */
1233
- const test = ((/** @type {?} */ (value2))).indexOf(e1) > -1;
1234
- if (!test) {
1235
- return true;
1236
- }
1237
- }
1238
- return false;
1239
- }
1240
- return true;
1241
- }
1242
- /**
1243
- * @private
1244
- * @return {?}
1245
- */
1246
- updateFilteredData() {
1247
- setTimeout((/**
1248
- * @return {?}
1249
- */
1250
- () => {
1251
- /** @type {?} */
1252
- let result = this._data;
1253
- if (this.multiple && this.hideSelectedItems) {
1254
- result = Select2Utils.getFilteredSelectedData(result, this.option);
1255
- }
1256
- if (!this.customSearchEnabled && this.searchText && this.searchText.length >= +this.minCharForSearch) {
1257
- result = Select2Utils.getFilteredData(result, this.searchText, this.editPattern);
1258
- }
1259
- if (this.maxResults > 0) {
1260
- /** @type {?} */
1261
- const data = Select2Utils.getReduceData(result, +this.maxResults);
1262
- result = data.result;
1263
- this.maxResultsExceeded = data.reduce;
1264
- }
1265
- else {
1266
- this.maxResultsExceeded = false;
1267
- }
1268
- if (Select2Utils.valueIsNotInFilteredData(result, this.hoveringValue)) {
1269
- this.hoveringValue = Select2Utils.getFirstAvailableOption(result);
1270
- }
1271
- this.filteredData = result;
1272
- this._changeDetectorRef.markForCheck();
1273
- }));
1274
- }
1275
- /**
1276
- * @private
1277
- * @param {?} e
1278
- * @return {?}
1279
- */
1280
- clickDetection(e) {
1281
- if (!this.ifParentContainsClass((/** @type {?} */ (e.target)), 'selection')) {
1282
- if (this.isOpen && !this.ifParentContainsClass((/** @type {?} */ (e.target)), 'select2-dropdown')) {
1283
- this.toggleOpenAndClose();
1284
- }
1285
- if (!this.ifParentContainsId((/** @type {?} */ (e.target)), this._id)) {
1286
- this.clickExit();
1287
- }
1288
- }
1289
- else if (this.isOpen && !this.ifParentContainsId((/** @type {?} */ (e.target)), this._id)) {
1290
- this.toggleOpenAndClose();
1291
- this.clickExit();
1292
- }
1293
- }
1294
- /**
1295
- * @private
1296
- * @return {?}
1297
- */
1298
- clickExit() {
1299
- this._focus(false);
1300
- window.document.body.removeEventListener('click', this._clickDetectionFc);
1301
- this._clickDetection = false;
1302
- }
1303
- /**
1304
- * @private
1305
- * @param {?} element
1306
- * @param {?} cssClass
1307
- * @return {?}
1308
- */
1309
- ifParentContainsClass(element, cssClass) {
1310
- return this.getParentElementByClass(element, cssClass) !== null;
1311
- }
1312
- /**
1313
- * @private
1314
- * @param {?} element
1315
- * @param {?} id
1316
- * @return {?}
1317
- */
1318
- ifParentContainsId(element, id) {
1319
- return this.getParentElementById(element, id) !== null;
1320
- }
1321
- /**
1322
- * @private
1323
- * @param {?} element
1324
- * @param {?} cssClass
1325
- * @return {?}
1326
- */
1327
- getParentElementByClass(element, cssClass) {
1328
- if (this.containClasses(element, cssClass.trim().split(/\s+/))) {
1329
- return element;
1330
- }
1331
- return element.parentElement ? this.getParentElementByClass(element.parentElement, cssClass) : null;
1332
- }
1333
- /**
1334
- * @private
1335
- * @param {?} element
1336
- * @param {?} id
1337
- * @return {?}
1338
- */
1339
- getParentElementById(element, id) {
1340
- if (element.id === id) {
1341
- return element;
1342
- }
1343
- return element.parentElement ? this.getParentElementById(element.parentElement, id) : null;
1344
- }
1345
- /**
1346
- * @private
1347
- * @param {?} element
1348
- * @param {?} cssClasses
1349
- * @return {?}
1350
- */
1351
- containClasses(element, cssClasses) {
1352
- if (!element.classList) {
1353
- return false;
1354
- }
1355
- for (const cssClass of cssClasses) {
1356
- if (!element.classList.contains(cssClass)) {
1357
- return false;
1358
- }
1359
- }
1360
- return true;
1361
- }
1362
- /**
1363
- * @return {?}
1364
- */
1365
- focusin() {
1366
- if (!this.disabled) {
1367
- this._focus(true);
1368
- }
1369
- }
1370
- /**
1371
- * @return {?}
1372
- */
1373
- focusout() {
1374
- if (this.selectionElement && !this.selectionElement.classList.contains('select2-focused')) {
1375
- this._focus(false);
1376
- this._onTouched();
1377
- }
1378
- }
1379
- /**
1380
- * @param {?} option
1381
- * @return {?}
1382
- */
1383
- select(option) {
1384
- /** @type {?} */
1385
- let value;
1386
- if (option !== null) {
1387
- if (this.multiple) {
1388
- /** @type {?} */
1389
- const options = (/** @type {?} */ (this.option));
1390
- /** @type {?} */
1391
- const index = options.findIndex((/**
1392
- * @param {?} op
1393
- * @return {?}
1394
- */
1395
- op => op.value === option.value));
1396
- if (index === -1) {
1397
- options.push(option);
1398
- }
1399
- else {
1400
- options.splice(index, 1);
1401
- }
1402
- value = ((/** @type {?} */ (this.option))).map((/**
1403
- * @param {?} op
1404
- * @return {?}
1405
- */
1406
- op => op.value));
1407
- }
1408
- else {
1409
- this.option = option;
1410
- if (this.isOpen) {
1411
- this.isOpen = false;
1412
- this.close.emit(this);
1413
- if (this.selectionElement) {
1414
- this.selectionElement.focus();
1415
- }
1416
- }
1417
- value = this.option.value;
1418
- }
1419
- }
1420
- else {
1421
- this.option = null;
1422
- }
1423
- if (this.multiple && this.hideSelectedItems) {
1424
- this.updateFilteredData();
1425
- }
1426
- if (this._control) {
1427
- this._onChange(value);
1428
- }
1429
- else {
1430
- this._value = value;
1431
- }
1432
- this.update.emit({
1433
- component: this,
1434
- value: value,
1435
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
1436
- });
1437
- }
1438
- /**
1439
- * @param {?} e
1440
- * @return {?}
1441
- */
1442
- keyDown(e) {
1443
- if (this._testKey(e, ['ArrowDown', 40])) {
1444
- this.moveDown();
1445
- e.preventDefault();
1446
- }
1447
- else if (this._testKey(e, ['ArrowUp', 38])) {
1448
- this.moveUp();
1449
- e.preventDefault();
1450
- }
1451
- else if (this._testKey(e, ['Enter', 13])) {
1452
- this.selectByEnter();
1453
- e.preventDefault();
1454
- }
1455
- else if (this._testKey(e, ['Escape', 'Tab', 9, 27]) && this.isOpen) {
1456
- this.toggleOpenAndClose();
1457
- this._focus(false);
1458
- }
1459
- }
1460
- /**
1461
- * @param {?} e
1462
- * @return {?}
1463
- */
1464
- openKey(e) {
1465
- if (this._testKey(e, ['ArrowDown', 'ArrowUp', 'Enter', 40, 38, 13])) {
1466
- this.toggleOpenAndClose();
1467
- e.preventDefault();
1468
- }
1469
- else if (this._testKey(e, ['Escape', 'Tab', 9, 27])) {
1470
- this._focus(false);
1471
- this._onTouched();
1472
- }
1473
- }
1474
- /**
1475
- * @param {?} _index
1476
- * @param {?} item
1477
- * @return {?}
1478
- */
1479
- trackBy(_index, item) {
1480
- return item.value;
1481
- }
1482
- /**
1483
- * @param {?} e
1484
- * @return {?}
1485
- */
1486
- searchUpdate(e) {
1487
- this.searchText = ((/** @type {?} */ (e.target))).value;
1488
- this.updateFilteredData();
1489
- }
1490
- /**
1491
- * @param {?} option
1492
- * @return {?}
1493
- */
1494
- isSelected(option) {
1495
- return Select2Utils.isSelected(this.option, option, this.multiple);
1496
- }
1497
- /**
1498
- * @param {?} option
1499
- * @return {?}
1500
- */
1501
- isDisabled(option) {
1502
- return option.disabled ? 'true' : 'false';
1503
- }
1504
- /**
1505
- * @param {?} e
1506
- * @param {?} option
1507
- * @return {?}
1508
- */
1509
- removeSelection(e, option) {
1510
- Select2Utils.removeSelection(this.option, option);
1511
- if (this.multiple && this.hideSelectedItems) {
1512
- this.updateFilteredData();
1513
- }
1514
- /** @type {?} */
1515
- const value = ((/** @type {?} */ (this.option))).map((/**
1516
- * @param {?} op
1517
- * @return {?}
1518
- */
1519
- op => op.value));
1520
- if (this._control) {
1521
- this._onChange(value);
1522
- }
1523
- else {
1524
- this._value = value;
1525
- }
1526
- this.update.emit({
1527
- component: this,
1528
- value: value,
1529
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
1530
- });
1531
- this.removeOption.emit({
1532
- component: this,
1533
- value: value,
1534
- removedOption: option,
1535
- });
1536
- e.preventDefault();
1537
- e.stopPropagation();
1538
- if (this.isOpen) {
1539
- this._focusSearchboxOrResultsElement();
1540
- }
1541
- }
1542
- /**
1543
- * Sets the model value. Implemented as part of ControlValueAccessor.
1544
- * @param {?} value
1545
- * @return {?}
1546
- */
1547
- writeValue(value) {
1548
- this._setSelectionByValue(value);
1549
- }
1550
- /**
1551
- * Saves a callback function to be invoked when the select's value
1552
- * changes from user input. Part of the ControlValueAccessor interface
1553
- * required to integrate with Angular's core forms API.
1554
- *
1555
- * @param {?} fn Callback to be triggered when the value changes.
1556
- * @return {?}
1557
- */
1558
- registerOnChange(fn) {
1559
- this._onChange = fn;
1560
- }
1561
- /**
1562
- * Saves a callback function to be invoked when the select is blurred
1563
- * by the user. Part of the ControlValueAccessor interface required
1564
- * to integrate with Angular's core forms API.
1565
- *
1566
- * @param {?} fn Callback to be triggered when the component has been touched.
1567
- * @return {?}
1568
- */
1569
- registerOnTouched(fn) {
1570
- this._onTouched = fn;
1571
- }
1572
- /**
1573
- * Sets whether the component should be disabled.
1574
- * Implemented as part of ControlValueAccessor.
1575
- * @param {?} isDisabled
1576
- * @return {?}
1577
- */
1578
- setDisabledState(isDisabled) {
1579
- this.disabled = isDisabled;
1580
- }
1581
- /**
1582
- * @param {?} way
1583
- * @return {?}
1584
- */
1585
- onScroll(way) {
1586
- this.scroll.emit({
1587
- component: this,
1588
- way,
1589
- search: this.innerSearchText,
1590
- });
1591
- }
1592
- /**
1593
- * @return {?}
1594
- */
1595
- _isErrorState() {
1596
- /** @type {?} */
1597
- const isInvalid = this._control && this._control.invalid;
1598
- /** @type {?} */
1599
- const isTouched = this._control && this._control.touched;
1600
- /** @type {?} */
1601
- const isSubmitted = (this._parentFormGroup && this._parentFormGroup.submitted) ||
1602
- (this._parentForm && this._parentForm.submitted);
1603
- return !!(isInvalid && (isTouched || isSubmitted));
1604
- }
1605
- /**
1606
- * @private
1607
- * @return {?}
1608
- */
1609
- moveUp() {
1610
- this.updateScrollFromOption(Select2Utils.getPreviousOption(this.filteredData, this.hoveringValue));
1611
- }
1612
- /**
1613
- * @private
1614
- * @return {?}
1615
- */
1616
- moveDown() {
1617
- this.updateScrollFromOption(Select2Utils.getNextOption(this.filteredData, this.hoveringValue));
1618
- }
1619
- /**
1620
- * @private
1621
- * @param {?} option
1622
- * @return {?}
1623
- */
1624
- updateScrollFromOption(option) {
1625
- if (option) {
1626
- this.hoveringValue = option.value;
1627
- /** @type {?} */
1628
- const domElement = this.results.find((/**
1629
- * @param {?} r
1630
- * @return {?}
1631
- */
1632
- r => r.nativeElement.innerText.trim() === option.label));
1633
- if (domElement && this.resultsElement) {
1634
- this.resultsElement.scrollTop = 0;
1635
- /** @type {?} */
1636
- const listClientRect = this.resultsElement.getBoundingClientRect();
1637
- /** @type {?} */
1638
- const optionClientRect = domElement.nativeElement.getBoundingClientRect();
1639
- this.resultsElement.scrollTop = optionClientRect.top - listClientRect.top;
1640
- }
1641
- }
1642
- }
1643
- /**
1644
- * @private
1645
- * @return {?}
1646
- */
1647
- selectByEnter() {
1648
- if (this.hoveringValue) {
1649
- /** @type {?} */
1650
- const option = Select2Utils.getOptionByValue(this._data, this.hoveringValue);
1651
- this.select(option);
1652
- }
1653
- }
1654
- /**
1655
- * @private
1656
- * @param {?} event
1657
- * @param {?=} refs
1658
- * @return {?}
1659
- */
1660
- _testKey(event, refs = []) {
1661
- return this._isKey(this._getKey(event), refs);
1662
- }
1663
- /**
1664
- * @private
1665
- * @param {?} event
1666
- * @return {?}
1667
- */
1668
- _getKey(event) {
1669
- /** @type {?} */
1670
- let code;
1671
- if (event.key !== undefined) {
1672
- code = event.key;
1673
- }
1674
- else if (event['keyIdentifier'] !== undefined) {
1675
- code = event['keyIdentifier'];
1676
- }
1677
- else if (event['keyCode'] !== undefined) {
1678
- code = event['keyCode'];
1679
- }
1680
- else {
1681
- event.preventDefault();
1682
- }
1683
- return code;
1684
- }
1685
- /**
1686
- * @private
1687
- * @param {?} code
1688
- * @param {?=} refs
1689
- * @return {?}
1690
- */
1691
- _isKey(code, refs = []) {
1692
- return refs && refs.length > 0 ? refs.indexOf(code) !== -1 : false;
1693
- }
1694
- /**
1695
- * Sets the selected option based on a value. If no option can be
1696
- * found with the designated value, the select trigger is cleared.
1697
- * @private
1698
- * @param {?} value
1699
- * @return {?}
1700
- */
1701
- _setSelectionByValue(value) {
1702
- if (this.option || (value !== undefined && value !== null)) {
1703
- /** @type {?} */
1704
- const isArray = Array.isArray(value);
1705
- if (this.multiple && value && !isArray) {
1706
- throw new Error('Non array value.');
1707
- }
1708
- else if (this._data) {
1709
- if (this.multiple) {
1710
- this.option = []; // if value is null, then empty option and return
1711
- if (isArray) {
1712
- // value is not null. Preselect value
1713
- /** @type {?} */
1714
- const selectedValues = Select2Utils.getOptionsByValue(this._data, value, this.multiple);
1715
- selectedValues.map((/**
1716
- * @param {?} item
1717
- * @return {?}
1718
- */
1719
- item => this.select(item)));
1720
- }
1721
- }
1722
- else {
1723
- this.select(Select2Utils.getOptionByValue(this._data, value));
1724
- }
1725
- }
1726
- else if (this._control) {
1727
- this._control.viewToModelUpdate(value);
1728
- }
1729
- this._changeDetectorRef.markForCheck();
1730
- }
1731
- }
1732
- /**
1733
- * Does some manual dirty checking on the native input `value` property.
1734
- * @private
1735
- * @return {?}
1736
- */
1737
- _dirtyCheckNativeValue() {
1738
- /** @type {?} */
1739
- const newValue = this.value;
1740
- if (this._previousNativeValue !== newValue) {
1741
- this._previousNativeValue = newValue;
1742
- this._stateChanges.next();
1743
- }
1744
- }
1745
- /**
1746
- * @private
1747
- * @param {?} value
1748
- * @return {?}
1749
- */
1750
- _coerceBooleanProperty(value) {
1751
- return value != null && `${value}` !== 'false';
1752
- }
1753
- /**
1754
- * @private
1755
- * @return {?}
1756
- */
1757
- _focusSearchboxOrResultsElement() {
1758
- if (!this.isSearchboxHidden) {
1759
- setTimeout((/**
1760
- * @return {?}
1761
- */
1762
- () => {
1763
- if (this.searchInput && this.searchInput.nativeElement) {
1764
- this.searchInput.nativeElement.focus();
1765
- }
1766
- }));
1767
- }
1768
- else if (this.resultsElement) {
1769
- this.resultsElement.focus();
1770
- }
1771
- }
1772
- /**
1773
- * @private
1774
- * @param {?} state
1775
- * @return {?}
1776
- */
1777
- _focus(state) {
1778
- if (!state && this.focused) {
1779
- this.focused = state;
1780
- this.blur.emit(this);
1781
- }
1782
- else if (state && !this.focused) {
1783
- this.focused = state;
1784
- this.focus.emit(this);
1785
- }
1786
- }
1787
- /**
1788
- * @private
1789
- * @return {?}
1790
- */
1791
- _isAbobeOverlay() {
1792
- return this.overlay && this._overlayPosition && this.listPosition === 'auto'
1793
- ? this._overlayPosition === 'top'
1794
- : this.listPosition === 'above';
1795
- }
1796
- }
1797
- Select2.decorators = [
1798
- { type: Component, args: [{
1799
- selector: 'select2',
1800
- 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 select2-container--focus\"\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 [attr.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 *ngFor=\"let op of option; trackBy: trackBy\" class=\"select2-selection__choice\" [title]=\"op.label\">\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",
1801
- 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{opacity:0;position:absolute;width:0}.select2-container .select2-selection--single{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;flex:1 1 auto;overflow:hidden;padding:0 0 0 8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;box-sizing:border-box;cursor:pointer;display:block;min-height:32px;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{border:none;box-sizing:border-box;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:#fff;background:var(--select2-dropdown-background,#fff);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;height:0;overflow:hidden;position:absolute;width:100%;z-index:1051}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;color:#000;color:var(--select2-option-text-color,#000);padding:6px;user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{opacity:1;width:100%}.select2-container--open .select2-dropdown{height:auto;overflow: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{box-sizing:border-box;padding:4px;width:100%}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{background:#fff;border:0;display:block;filter:alpha(opacity=0);height:auto;left:0;margin:0;min-height:100%;min-width:100%;opacity:0;padding:0;position:fixed;top:0;width:auto;z-index:99}.select2-required:before{color:red;color:var(--select2-required-color,red);content:\"*\"}.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;text-overflow:ellipsis;text-overflow:var(--select2-placeholder-overflow,ellipsis);white-space:nowrap}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__arrow,.select2-container--default .select2-selection--single .select2-selection__reset{align-items:center;display:flex;justify-content:center;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow:before{border-bottom:0 solid var(--select2-arrow-color,#888);border-color:#888 transparent;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid var(--select2-arrow-color,#888);content:\" \";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-bottom-color:var(--select2-arrow-color,#888);border-color:transparent transparent #888;border-right-color:transparent;border-top-color:transparent;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{box-sizing:border-box;flex:1 1 auto;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{color:#999;color:var(--select2-placeholder-color,#999);display:block;float:left;margin-top:5px;overflow:hidden;text-overflow:ellipsis;text-overflow:var(--select2-placeholder-overflow,ellipsis);white-space:nowrap;width:100%}.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-right:10px;margin-top:5px}.select2-container--default .select2-selection--multiple .select2-selection__choice{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);color:#000;color:var(--select2-selection-choice-text-color,#000);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,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single{border:1px solid #000;border:1px solid var(--select2-selection-focus-border-color,#000);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--multiple,.select2-container--default.select2-container--open.select2-container--above .select2-selection--single{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple,.select2-container--default.select2-container--open.select2-container--below .select2-selection--single{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{background:#fff;background:1px solid var(--select2-search-background,#fff);border:1px solid #aaa;border:1px solid var(--select2-search-border-color,#aaa);border-radius:0;border-radius:var(--select2-search-border-radius,0)}.select2-container--default .select2-search--inline .select2-search__field{-webkit-appearance:textfield;background:transparent;border:none;box-shadow:none;outline:none}.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]{background:transparent;background:var(--select2-option-disabled-background,transparent);color:#999;color:var(--select2-option-disabled-text-color,#999)}.select2-container--default .select2-results__option[aria-selected=true]{background:#ddd;background:var(--select2-option-selected-background,#ddd);color:#000;color:var(--select2-option-selected-text-color,#000)}.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{background:transparent;background:var(--select2-option-group-background,transparent);color:grey;color:var(--select2-option-group-text-color,grey);cursor:default;display:block;padding:6px}.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-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-selection--multiple,:host.nostyle .select2-selection--single{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{align-items:baseline;border-top:.84375em solid transparent;display:inline-flex;height:auto;padding:.4375em 0;width:100%}:host.material .select2-container--default .select2-selection--multiple,:host.material .select2-container--default .select2-selection--single{border:0;border-radius:0;box-sizing:border-box;height:24px;width:100%}:host.material .select2-container--default .select2-selection--multiple:before,:host.material .select2-container--default .select2-selection--single:before{background:#ddd;background:var(--select2-material-underline,#ddd);bottom:1.65em;content:\" \";display:block;height:1px;position:absolute;width:100%}:host.material .select2-container--default .select2-selection--multiple:after,:host.material .select2-container--default .select2-selection--single:after{background:#5a419e;background:var(--select2-material-underline-active,#5a419e);bottom:1.63em;content:\" \";display:block;height:2px;left:50%;position:absolute;transition:none;width:0}:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered,:host.material .select2-container--default .select2-selection--single .select2-selection__rendered{line-height:inherit;padding-left:1px}:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder{color:rgba(0,0,0,.38);color:var(--select2-material-placeholder-color,rgba(0,0,0,.38));display:block;left:0;position:absolute;top:20px;transform-origin:0 21px;transition:transform .3s}:host.material .select2-container--default .select2-container--open{bottom:1.6em;left:0}: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--multiple:after,:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after{left:0;transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%}:host.material .select2-container--default .select2-dropdown{border:0;border-radius:0;box-shadow:0 5px 5px rgba(0,0,0,.5)}:host.material .select2-container--default .select2-results__option--highlighted[aria-selected],:host.material .select2-container--default .select2-results__option[aria-selected=true]{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--multiple,:host.material .select2-container--default.select2-container--disabled .select2-selection--single{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before{background:linear-gradient(90deg,rgba(0,0,0,.26) 0,rgba(0,0,0,.26) 33%,transparent 0);background:var(--select2-material-underline-disabled,linear-gradient(90deg,rgba(0,0,0,.26) 0,rgba(0,0,0,.26) 33%,transparent 0));background-position:0 bottom;background-repeat:repeat-x;background-size:4px 1px}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple: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--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before{background:red;background:var(--select2-material-underline-invalid,red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple,:host.material:not(.select2-container--open) .select2-focused .select2-selection--single{border:0}:host.material .select2-subscript-wrapper{color:#888;color:var(--select2-hint-text-color,#888);font-size:75%;position:absolute;top:calc(100% - 1.72917em)}::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--multiple,select2.material .select2-container--default .select2-selection--single{height:26px}}@supports (-ms-scroll-limit:0){select2.material .select2-container--default .select2-selection--multiple,select2.material .select2-container--default .select2-selection--single{height:25px}}"]
1802
- }] }
1803
- ];
1804
- /** @nocollapse */
1805
- Select2.ctorParameters = () => [
1806
- { type: ViewportRuler },
1807
- { type: ChangeDetectorRef },
1808
- { type: NgForm, decorators: [{ type: Optional }] },
1809
- { type: FormGroupDirective, decorators: [{ type: Optional }] },
1810
- { type: NgControl, decorators: [{ type: Self }, { type: Optional }] },
1811
- { type: String, decorators: [{ type: Attribute, args: ['tabindex',] }] }
1812
- ];
1813
- Select2.propDecorators = {
1814
- data: [{ type: Input }],
1815
- minCharForSearch: [{ type: Input }],
1816
- displaySearchStatus: [{ type: Input }],
1817
- placeholder: [{ type: Input }],
1818
- customSearchEnabled: [{ type: Input }],
1819
- limitSelection: [{ type: Input }],
1820
- listPosition: [{ type: Input }],
1821
- multiple: [{ type: Input }],
1822
- overlay: [{ type: Input }],
1823
- styleMode: [{ type: Input }],
1824
- noResultMessage: [{ type: Input }],
1825
- maxResults: [{ type: Input }],
1826
- maxResultsMessage: [{ type: Input }],
1827
- infiniteScrollDistance: [{ type: Input }],
1828
- infiniteScrollThrottle: [{ type: Input }],
1829
- infiniteScroll: [{ type: Input }],
1830
- editPattern: [{ type: Input }],
1831
- templates: [{ type: Input }],
1832
- resultMaxHeight: [{ type: Input }],
1833
- update: [{ type: Output }],
1834
- open: [{ type: Output }],
1835
- close: [{ type: Output }],
1836
- focus: [{ type: Output }],
1837
- blur: [{ type: Output }],
1838
- search: [{ type: Output }],
1839
- scroll: [{ type: Output }],
1840
- removeOption: [{ type: Output }],
1841
- minCountForSearch: [{ type: Input }],
1842
- id: [{ type: Input }, { type: HostBinding, args: ['id',] }],
1843
- required: [{ type: Input }],
1844
- disabled: [{ type: Input }],
1845
- hideSelectedItems: [{ type: Input }],
1846
- readonly: [{ type: Input }],
1847
- value: [{ type: Input }],
1848
- tabIndex: [{ type: Input }],
1849
- resettable: [{ type: Input }],
1850
- ariaInvalid: [{ type: HostBinding, args: ['attr.aria-invalid',] }],
1851
- classMaterial: [{ type: HostBinding, args: ['class.material',] }],
1852
- classNostyle: [{ type: HostBinding, args: ['class.nostyle',] }],
1853
- select2above: [{ type: HostBinding, args: ['class.select2-above',] }],
1854
- cdkConnectedOverlay: [{ type: ViewChild, args: [CdkConnectedOverlay,] }],
1855
- selection: [{ type: ViewChild, args: ['selection', { static: true },] }],
1856
- resultContainer: [{ type: ViewChild, args: ['results',] }],
1857
- results: [{ type: ViewChildren, args: ['result',] }],
1858
- searchInput: [{ type: ViewChild, args: ['searchInput',] }],
1859
- dropdown: [{ type: ViewChild, args: ['dropdown',] }]
1860
- };
1861
- if (false) {
1862
- /** @type {?} */
1863
- Select2.prototype._data;
1864
- /** @type {?} */
1865
- Select2.prototype.minCharForSearch;
1866
- /** @type {?} */
1867
- Select2.prototype.displaySearchStatus;
1868
- /** @type {?} */
1869
- Select2.prototype.placeholder;
1870
- /** @type {?} */
1871
- Select2.prototype.customSearchEnabled;
1872
- /** @type {?} */
1873
- Select2.prototype.limitSelection;
1874
- /** @type {?} */
1875
- Select2.prototype.listPosition;
1876
- /**
1877
- * use the material style
1878
- * @type {?}
1879
- */
1880
- Select2.prototype.styleMode;
1881
- /**
1882
- * message when no result
1883
- * @type {?}
1884
- */
1885
- Select2.prototype.noResultMessage;
1886
- /**
1887
- * maximum results limit (0 = no limit)
1888
- * @type {?}
1889
- */
1890
- Select2.prototype.maxResults;
1891
- /**
1892
- * message when maximum results
1893
- * @type {?}
1894
- */
1895
- Select2.prototype.maxResultsMessage;
1896
- /**
1897
- * infinite scroll distance
1898
- * @type {?}
1899
- */
1900
- Select2.prototype.infiniteScrollDistance;
1901
- /**
1902
- * infinite scroll distance
1903
- * @type {?}
1904
- */
1905
- Select2.prototype.infiniteScrollThrottle;
1906
- /**
1907
- * use it for change the pattern of the filter search
1908
- * @type {?}
1909
- */
1910
- Select2.prototype.editPattern;
1911
- /**
1912
- * template for formating
1913
- * @type {?}
1914
- */
1915
- Select2.prototype.templates;
1916
- /**
1917
- * the max height of the results container when opening the select
1918
- * @type {?}
1919
- */
1920
- Select2.prototype.resultMaxHeight;
1921
- /** @type {?} */
1922
- Select2.prototype.update;
1923
- /** @type {?} */
1924
- Select2.prototype.open;
1925
- /** @type {?} */
1926
- Select2.prototype.close;
1927
- /** @type {?} */
1928
- Select2.prototype.focus;
1929
- /** @type {?} */
1930
- Select2.prototype.blur;
1931
- /** @type {?} */
1932
- Select2.prototype.search;
1933
- /** @type {?} */
1934
- Select2.prototype.scroll;
1935
- /** @type {?} */
1936
- Select2.prototype.removeOption;
1937
- /** @type {?} */
1938
- Select2.prototype.option;
1939
- /** @type {?} */
1940
- Select2.prototype.isOpen;
1941
- /** @type {?} */
1942
- Select2.prototype.searchStyle;
1943
- /**
1944
- * Whether the element is focused or not.
1945
- * @type {?}
1946
- */
1947
- Select2.prototype.focused;
1948
- /** @type {?} */
1949
- Select2.prototype.filteredData;
1950
- /** @type {?} */
1951
- Select2.prototype.overlayWidth;
1952
- /** @type {?} */
1953
- Select2.prototype.overlayHeight;
1954
- /** @type {?} */
1955
- Select2.prototype._triggerRect;
1956
- /** @type {?} */
1957
- Select2.prototype._dropdownRect;
1958
- /** @type {?} */
1959
- Select2.prototype.maxResultsExceeded;
1960
- /**
1961
- * @type {?}
1962
- * @private
1963
- */
1964
- Select2.prototype._minCountForSearch;
1965
- /**
1966
- * @type {?}
1967
- * @private
1968
- */
1969
- Select2.prototype.cdkConnectedOverlay;
1970
- /**
1971
- * @type {?}
1972
- * @private
1973
- */
1974
- Select2.prototype.selection;
1975
- /**
1976
- * @type {?}
1977
- * @private
1978
- */
1979
- Select2.prototype.resultContainer;
1980
- /**
1981
- * @type {?}
1982
- * @private
1983
- */
1984
- Select2.prototype.results;
1985
- /**
1986
- * @type {?}
1987
- * @private
1988
- */
1989
- Select2.prototype.searchInput;
1990
- /**
1991
- * @type {?}
1992
- * @private
1993
- */
1994
- Select2.prototype.dropdown;
1995
- /**
1996
- * @type {?}
1997
- * @private
1998
- */
1999
- Select2.prototype.hoveringValue;
2000
- /**
2001
- * @type {?}
2002
- * @private
2003
- */
2004
- Select2.prototype.innerSearchText;
2005
- /**
2006
- * @type {?}
2007
- * @private
2008
- */
2009
- Select2.prototype.isSearchboxHidden;
2010
- /**
2011
- * @type {?}
2012
- * @private
2013
- */
2014
- Select2.prototype.selectionElement;
2015
- /**
2016
- * @type {?}
2017
- * @private
2018
- */
2019
- Select2.prototype._stateChanges;
2020
- /**
2021
- * Tab index for the element.
2022
- * @type {?}
2023
- * @private
2024
- */
2025
- Select2.prototype._tabIndex;
2026
- /**
2027
- * @type {?}
2028
- * @private
2029
- */
2030
- Select2.prototype._disabled;
2031
- /**
2032
- * @type {?}
2033
- * @private
2034
- */
2035
- Select2.prototype._required;
2036
- /**
2037
- * @type {?}
2038
- * @private
2039
- */
2040
- Select2.prototype._readonly;
2041
- /**
2042
- * @type {?}
2043
- * @private
2044
- */
2045
- Select2.prototype._multiple;
2046
- /**
2047
- * @type {?}
2048
- * @private
2049
- */
2050
- Select2.prototype._overlay;
2051
- /**
2052
- * @type {?}
2053
- * @private
2054
- */
2055
- Select2.prototype._resettable;
2056
- /**
2057
- * @type {?}
2058
- * @private
2059
- */
2060
- Select2.prototype._hideSelectedItems;
2061
- /**
2062
- * @type {?}
2063
- * @private
2064
- */
2065
- Select2.prototype._clickDetection;
2066
- /**
2067
- * @type {?}
2068
- * @private
2069
- */
2070
- Select2.prototype._clickDetectionFc;
2071
- /**
2072
- * @type {?}
2073
- * @private
2074
- */
2075
- Select2.prototype._id;
2076
- /**
2077
- * @type {?}
2078
- * @private
2079
- */
2080
- Select2.prototype._uid;
2081
- /**
2082
- * @type {?}
2083
- * @private
2084
- */
2085
- Select2.prototype._value;
2086
- /**
2087
- * @type {?}
2088
- * @private
2089
- */
2090
- Select2.prototype._previousNativeValue;
2091
- /**
2092
- * @type {?}
2093
- * @private
2094
- */
2095
- Select2.prototype._infiniteScroll;
2096
- /**
2097
- * @type {?}
2098
- * @private
2099
- */
2100
- Select2.prototype._overlayPosition;
2101
- /**
2102
- * View -> model callback called when select has been touched
2103
- * @type {?}
2104
- * @private
2105
- */
2106
- Select2.prototype._onTouched;
2107
- /**
2108
- * View -> model callback called when value changes
2109
- * @type {?}
2110
- * @private
2111
- */
2112
- Select2.prototype._onChange;
2113
- /**
2114
- * @type {?}
2115
- * @protected
2116
- */
2117
- Select2.prototype._viewportRuler;
2118
- /**
2119
- * @type {?}
2120
- * @private
2121
- */
2122
- Select2.prototype._changeDetectorRef;
2123
- /**
2124
- * @type {?}
2125
- * @private
2126
- */
2127
- Select2.prototype._parentForm;
2128
- /**
2129
- * @type {?}
2130
- * @private
2131
- */
2132
- Select2.prototype._parentFormGroup;
2133
- /** @type {?} */
2134
- Select2.prototype._control;
2135
- }
2136
-
2137
- /**
2138
- * @fileoverview added by tsickle
2139
- * Generated from: lib/select2-hint.component.ts
2140
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2141
- */
2142
- class Select2Hint {
2143
- }
2144
- Select2Hint.decorators = [
2145
- { type: Directive, args: [{ selector: 'select2-hint' },] }
2146
- ];
2147
-
2148
- /**
2149
- * @fileoverview added by tsickle
2150
- * Generated from: lib/select2-label.component.ts
2151
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2152
- */
2153
- class Select2Label {
2154
- }
2155
- Select2Label.decorators = [
2156
- { type: Directive, args: [{ selector: 'select2-label' },] }
2157
- ];
2158
-
2159
- /**
2160
- * @fileoverview added by tsickle
2161
- * Generated from: lib/select2.module.ts
2162
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2163
- */
2164
- class Select2Module {
2165
- }
2166
- Select2Module.decorators = [
2167
- { type: NgModule, args: [{
2168
- imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule],
2169
- declarations: [Select2Hint, Select2Label, Select2],
2170
- exports: [FormsModule, ReactiveFormsModule, Select2Hint, Select2Label, Select2],
2171
- },] }
2172
- ];
2173
-
2174
- /**
2175
- * @fileoverview added by tsickle
2176
- * Generated from: public_api.ts
2177
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2178
- */
2179
-
2180
- /**
2181
- * @fileoverview added by tsickle
2182
- * Generated from: ng-select2-component.ts
2183
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2184
- */
2185
-
2186
- export { Select2, Select2Hint, Select2Label, Select2Module, Select2Utils, defaultMinCountForSearch, protectRegexp, timeout, unicodePatterns };
2187
- //# sourceMappingURL=ng-select2-component.js.map