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,2666 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/overlay'), require('@angular/cdk/scrolling'), require('@angular/core'), require('@angular/forms'), require('rxjs'), require('@angular/common'), require('ngx-infinite-scroll')) :
3
- typeof define === 'function' && define.amd ? define('ng-select2-component', ['exports', '@angular/cdk/overlay', '@angular/cdk/scrolling', '@angular/core', '@angular/forms', 'rxjs', '@angular/common', 'ngx-infinite-scroll'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['ng-select2-component'] = {}, global.ng.cdk.overlay, global.ng.cdk.scrolling, global.ng.core, global.ng.forms, global.rxjs, global.ng.common, global.ngxInfiniteScroll));
5
- }(this, (function (exports, overlay, scrolling, core, forms, rxjs, common, ngxInfiniteScroll) { 'use strict';
6
-
7
- /**
8
- * @fileoverview added by tsickle
9
- * Generated from: lib/select2-const.ts
10
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11
- */
12
- /** @type {?} */
13
- var timeout = 200;
14
- /** @type {?} */
15
- var 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
- /** @type {?} */
60
- var defaultMinCountForSearch = 6;
61
- /** @type {?} */
62
- var protectRegexp = new RegExp('[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]', 'g');
63
-
64
- /*! *****************************************************************************
65
- Copyright (c) Microsoft Corporation.
66
-
67
- Permission to use, copy, modify, and/or distribute this software for any
68
- purpose with or without fee is hereby granted.
69
-
70
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
71
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
72
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
73
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
74
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
75
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
76
- PERFORMANCE OF THIS SOFTWARE.
77
- ***************************************************************************** */
78
- /* global Reflect, Promise */
79
- var extendStatics = function (d, b) {
80
- extendStatics = Object.setPrototypeOf ||
81
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
82
- function (d, b) { for (var p in b)
83
- if (Object.prototype.hasOwnProperty.call(b, p))
84
- d[p] = b[p]; };
85
- return extendStatics(d, b);
86
- };
87
- function __extends(d, b) {
88
- if (typeof b !== "function" && b !== null)
89
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
90
- extendStatics(d, b);
91
- function __() { this.constructor = d; }
92
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
93
- }
94
- var __assign = function () {
95
- __assign = Object.assign || function __assign(t) {
96
- for (var s, i = 1, n = arguments.length; i < n; i++) {
97
- s = arguments[i];
98
- for (var p in s)
99
- if (Object.prototype.hasOwnProperty.call(s, p))
100
- t[p] = s[p];
101
- }
102
- return t;
103
- };
104
- return __assign.apply(this, arguments);
105
- };
106
- function __rest(s, e) {
107
- var t = {};
108
- for (var p in s)
109
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
110
- t[p] = s[p];
111
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
112
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
113
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
114
- t[p[i]] = s[p[i]];
115
- }
116
- return t;
117
- }
118
- function __decorate(decorators, target, key, desc) {
119
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
120
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
121
- r = Reflect.decorate(decorators, target, key, desc);
122
- else
123
- for (var i = decorators.length - 1; i >= 0; i--)
124
- if (d = decorators[i])
125
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
126
- return c > 3 && r && Object.defineProperty(target, key, r), r;
127
- }
128
- function __param(paramIndex, decorator) {
129
- return function (target, key) { decorator(target, key, paramIndex); };
130
- }
131
- function __metadata(metadataKey, metadataValue) {
132
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
133
- return Reflect.metadata(metadataKey, metadataValue);
134
- }
135
- function __awaiter(thisArg, _arguments, P, generator) {
136
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
137
- return new (P || (P = Promise))(function (resolve, reject) {
138
- function fulfilled(value) { try {
139
- step(generator.next(value));
140
- }
141
- catch (e) {
142
- reject(e);
143
- } }
144
- function rejected(value) { try {
145
- step(generator["throw"](value));
146
- }
147
- catch (e) {
148
- reject(e);
149
- } }
150
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
151
- step((generator = generator.apply(thisArg, _arguments || [])).next());
152
- });
153
- }
154
- function __generator(thisArg, body) {
155
- var _ = { label: 0, sent: function () { if (t[0] & 1)
156
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
157
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
158
- function verb(n) { return function (v) { return step([n, v]); }; }
159
- function step(op) {
160
- if (f)
161
- throw new TypeError("Generator is already executing.");
162
- while (_)
163
- try {
164
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
165
- return t;
166
- if (y = 0, t)
167
- op = [op[0] & 2, t.value];
168
- switch (op[0]) {
169
- case 0:
170
- case 1:
171
- t = op;
172
- break;
173
- case 4:
174
- _.label++;
175
- return { value: op[1], done: false };
176
- case 5:
177
- _.label++;
178
- y = op[1];
179
- op = [0];
180
- continue;
181
- case 7:
182
- op = _.ops.pop();
183
- _.trys.pop();
184
- continue;
185
- default:
186
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
187
- _ = 0;
188
- continue;
189
- }
190
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
191
- _.label = op[1];
192
- break;
193
- }
194
- if (op[0] === 6 && _.label < t[1]) {
195
- _.label = t[1];
196
- t = op;
197
- break;
198
- }
199
- if (t && _.label < t[2]) {
200
- _.label = t[2];
201
- _.ops.push(op);
202
- break;
203
- }
204
- if (t[2])
205
- _.ops.pop();
206
- _.trys.pop();
207
- continue;
208
- }
209
- op = body.call(thisArg, _);
210
- }
211
- catch (e) {
212
- op = [6, e];
213
- y = 0;
214
- }
215
- finally {
216
- f = t = 0;
217
- }
218
- if (op[0] & 5)
219
- throw op[1];
220
- return { value: op[0] ? op[1] : void 0, done: true };
221
- }
222
- }
223
- var __createBinding = Object.create ? (function (o, m, k, k2) {
224
- if (k2 === undefined)
225
- k2 = k;
226
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
227
- }) : (function (o, m, k, k2) {
228
- if (k2 === undefined)
229
- k2 = k;
230
- o[k2] = m[k];
231
- });
232
- function __exportStar(m, o) {
233
- for (var p in m)
234
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
235
- __createBinding(o, m, p);
236
- }
237
- function __values(o) {
238
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
239
- if (m)
240
- return m.call(o);
241
- if (o && typeof o.length === "number")
242
- return {
243
- next: function () {
244
- if (o && i >= o.length)
245
- o = void 0;
246
- return { value: o && o[i++], done: !o };
247
- }
248
- };
249
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
250
- }
251
- function __read(o, n) {
252
- var m = typeof Symbol === "function" && o[Symbol.iterator];
253
- if (!m)
254
- return o;
255
- var i = m.call(o), r, ar = [], e;
256
- try {
257
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
258
- ar.push(r.value);
259
- }
260
- catch (error) {
261
- e = { error: error };
262
- }
263
- finally {
264
- try {
265
- if (r && !r.done && (m = i["return"]))
266
- m.call(i);
267
- }
268
- finally {
269
- if (e)
270
- throw e.error;
271
- }
272
- }
273
- return ar;
274
- }
275
- /** @deprecated */
276
- function __spread() {
277
- for (var ar = [], i = 0; i < arguments.length; i++)
278
- ar = ar.concat(__read(arguments[i]));
279
- return ar;
280
- }
281
- /** @deprecated */
282
- function __spreadArrays() {
283
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
284
- s += arguments[i].length;
285
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
286
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
287
- r[k] = a[j];
288
- return r;
289
- }
290
- function __spreadArray(to, from, pack) {
291
- if (pack || arguments.length === 2)
292
- for (var i = 0, l = from.length, ar; i < l; i++) {
293
- if (ar || !(i in from)) {
294
- if (!ar)
295
- ar = Array.prototype.slice.call(from, 0, i);
296
- ar[i] = from[i];
297
- }
298
- }
299
- return to.concat(ar || Array.prototype.slice.call(from));
300
- }
301
- function __await(v) {
302
- return this instanceof __await ? (this.v = v, this) : new __await(v);
303
- }
304
- function __asyncGenerator(thisArg, _arguments, generator) {
305
- if (!Symbol.asyncIterator)
306
- throw new TypeError("Symbol.asyncIterator is not defined.");
307
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
308
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
309
- function verb(n) { if (g[n])
310
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
311
- function resume(n, v) { try {
312
- step(g[n](v));
313
- }
314
- catch (e) {
315
- settle(q[0][3], e);
316
- } }
317
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
318
- function fulfill(value) { resume("next", value); }
319
- function reject(value) { resume("throw", value); }
320
- function settle(f, v) { if (f(v), q.shift(), q.length)
321
- resume(q[0][0], q[0][1]); }
322
- }
323
- function __asyncDelegator(o) {
324
- var i, p;
325
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
326
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
327
- }
328
- function __asyncValues(o) {
329
- if (!Symbol.asyncIterator)
330
- throw new TypeError("Symbol.asyncIterator is not defined.");
331
- var m = o[Symbol.asyncIterator], i;
332
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
333
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
334
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
335
- }
336
- function __makeTemplateObject(cooked, raw) {
337
- if (Object.defineProperty) {
338
- Object.defineProperty(cooked, "raw", { value: raw });
339
- }
340
- else {
341
- cooked.raw = raw;
342
- }
343
- return cooked;
344
- }
345
- ;
346
- var __setModuleDefault = Object.create ? (function (o, v) {
347
- Object.defineProperty(o, "default", { enumerable: true, value: v });
348
- }) : function (o, v) {
349
- o["default"] = v;
350
- };
351
- function __importStar(mod) {
352
- if (mod && mod.__esModule)
353
- return mod;
354
- var result = {};
355
- if (mod != null)
356
- for (var k in mod)
357
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
358
- __createBinding(result, mod, k);
359
- __setModuleDefault(result, mod);
360
- return result;
361
- }
362
- function __importDefault(mod) {
363
- return (mod && mod.__esModule) ? mod : { default: mod };
364
- }
365
- function __classPrivateFieldGet(receiver, state, kind, f) {
366
- if (kind === "a" && !f)
367
- throw new TypeError("Private accessor was defined without a getter");
368
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
369
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
370
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
371
- }
372
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
373
- if (kind === "m")
374
- throw new TypeError("Private method is not writable");
375
- if (kind === "a" && !f)
376
- throw new TypeError("Private accessor was defined without a setter");
377
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
378
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
379
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
380
- }
381
-
382
- var Select2Utils = /** @class */ (function () {
383
- function Select2Utils() {
384
- }
385
- /**
386
- * @param {?} data
387
- * @param {?} value
388
- * @return {?}
389
- */
390
- Select2Utils.getOptionByValue = function (data, value) {
391
- var e_1, _a, e_2, _b;
392
- if (Array.isArray(data)) {
393
- try {
394
- for (var data_1 = __values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) {
395
- var groupOrOption = data_1_1.value;
396
- /** @type {?} */
397
- var options = (( /** @type {?} */(groupOrOption))).options;
398
- if (options) {
399
- try {
400
- for (var options_1 = (e_2 = void 0, __values(options)), options_1_1 = options_1.next(); !options_1_1.done; options_1_1 = options_1.next()) {
401
- var option = options_1_1.value;
402
- if (option.value === value) {
403
- return option;
404
- }
405
- }
406
- }
407
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
408
- finally {
409
- try {
410
- if (options_1_1 && !options_1_1.done && (_b = options_1.return)) _b.call(options_1);
411
- }
412
- finally { if (e_2) throw e_2.error; }
413
- }
414
- }
415
- else if ((( /** @type {?} */(groupOrOption))).value === value) {
416
- return ( /** @type {?} */(groupOrOption));
417
- }
418
- }
419
- }
420
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
421
- finally {
422
- try {
423
- if (data_1_1 && !data_1_1.done && (_a = data_1.return)) _a.call(data_1);
424
- }
425
- finally { if (e_1) throw e_1.error; }
426
- }
427
- }
428
- return null;
429
- };
430
- /**
431
- * @param {?} data
432
- * @param {?} value
433
- * @param {?} multiple
434
- * @return {?}
435
- */
436
- Select2Utils.getOptionsByValue = function (data, value, multiple) {
437
- var e_3, _a;
438
- if (multiple) {
439
- /** @type {?} */
440
- var values = Array.isArray(value) ? value : [];
441
- /** @type {?} */
442
- var result = [];
443
- try {
444
- for (var values_1 = __values(values), values_1_1 = values_1.next(); !values_1_1.done; values_1_1 = values_1.next()) {
445
- var v = values_1_1.value;
446
- /** @type {?} */
447
- var option = Select2Utils.getOptionByValue(data, v);
448
- if (option) {
449
- result.push(option);
450
- }
451
- }
452
- }
453
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
454
- finally {
455
- try {
456
- if (values_1_1 && !values_1_1.done && (_a = values_1.return)) _a.call(values_1);
457
- }
458
- finally { if (e_3) throw e_3.error; }
459
- }
460
- return result;
461
- }
462
- return Select2Utils.getOptionByValue(data, ( /** @type {?} */(value)));
463
- };
464
- /**
465
- * @param {?} data
466
- * @return {?}
467
- */
468
- Select2Utils.getFirstAvailableOption = function (data) {
469
- var e_4, _a, e_5, _b;
470
- if (Array.isArray(data)) {
471
- try {
472
- for (var data_2 = __values(data), data_2_1 = data_2.next(); !data_2_1.done; data_2_1 = data_2.next()) {
473
- var groupOrOption = data_2_1.value;
474
- /** @type {?} */
475
- var options = (( /** @type {?} */(groupOrOption))).options;
476
- if (options) {
477
- try {
478
- for (var options_2 = (e_5 = void 0, __values(options)), options_2_1 = options_2.next(); !options_2_1.done; options_2_1 = options_2.next()) {
479
- var option = options_2_1.value;
480
- if (!option.disabled) {
481
- return option.value;
482
- }
483
- }
484
- }
485
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
486
- finally {
487
- try {
488
- if (options_2_1 && !options_2_1.done && (_b = options_2.return)) _b.call(options_2);
489
- }
490
- finally { if (e_5) throw e_5.error; }
491
- }
492
- }
493
- else {
494
- /** @type {?} */
495
- var option = ( /** @type {?} */(groupOrOption));
496
- if (!option.disabled) {
497
- return option.value;
498
- }
499
- }
500
- }
501
- }
502
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
503
- finally {
504
- try {
505
- if (data_2_1 && !data_2_1.done && (_a = data_2.return)) _a.call(data_2);
506
- }
507
- finally { if (e_4) throw e_4.error; }
508
- }
509
- }
510
- return null;
511
- };
512
- /**
513
- * @param {?} filteredData
514
- * @param {?} value
515
- * @return {?}
516
- */
517
- Select2Utils.valueIsNotInFilteredData = function (filteredData, value) {
518
- var e_6, _a, e_7, _b;
519
- if (Select2Utils.isNullOrUndefined(value)) {
520
- return true;
521
- }
522
- try {
523
- for (var filteredData_1 = __values(filteredData), filteredData_1_1 = filteredData_1.next(); !filteredData_1_1.done; filteredData_1_1 = filteredData_1.next()) {
524
- var groupOrOption = filteredData_1_1.value;
525
- /** @type {?} */
526
- var options = (( /** @type {?} */(groupOrOption))).options;
527
- if (options) {
528
- try {
529
- for (var options_3 = (e_7 = void 0, __values(options)), options_3_1 = options_3.next(); !options_3_1.done; options_3_1 = options_3.next()) {
530
- var option = options_3_1.value;
531
- if (option.value === value) {
532
- return false;
533
- }
534
- }
535
- }
536
- catch (e_7_1) { e_7 = { error: e_7_1 }; }
537
- finally {
538
- try {
539
- if (options_3_1 && !options_3_1.done && (_b = options_3.return)) _b.call(options_3);
540
- }
541
- finally { if (e_7) throw e_7.error; }
542
- }
543
- }
544
- else if ((( /** @type {?} */(groupOrOption))).value === value) {
545
- return false;
546
- }
547
- }
548
- }
549
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
550
- finally {
551
- try {
552
- if (filteredData_1_1 && !filteredData_1_1.done && (_a = filteredData_1.return)) _a.call(filteredData_1);
553
- }
554
- finally { if (e_6) throw e_6.error; }
555
- }
556
- return true;
557
- };
558
- // tslint:disable-next-line:cognitive-complexity
559
- /**
560
- * @param {?} filteredData
561
- * @param {?} hoveringValue
562
- * @return {?}
563
- */
564
- Select2Utils.getPreviousOption = function (filteredData, hoveringValue) {
565
- /** @type {?} */
566
- var findIt = Select2Utils.isNullOrUndefined(hoveringValue);
567
- for (var i = filteredData.length - 1; i >= 0; i--) {
568
- /** @type {?} */
569
- var groupOrOption = filteredData[i];
570
- /** @type {?} */
571
- var options = (( /** @type {?} */(groupOrOption))).options;
572
- if (options) {
573
- for (var j = options.length - 1; j >= 0; j--) {
574
- /** @type {?} */
575
- var option = options[j];
576
- if (findIt && !option.disabled && !option.hide) {
577
- return option;
578
- }
579
- if (!findIt) {
580
- findIt = option.value === hoveringValue;
581
- }
582
- }
583
- }
584
- else {
585
- /** @type {?} */
586
- var option = ( /** @type {?} */(groupOrOption));
587
- if (findIt && !option.disabled && !option.hide) {
588
- return option;
589
- }
590
- if (!findIt) {
591
- findIt = option.value === hoveringValue;
592
- }
593
- }
594
- }
595
- return null;
596
- };
597
- // tslint:disable-next-line:cognitive-complexity
598
- /**
599
- * @param {?} filteredData
600
- * @param {?} hoveringValue
601
- * @return {?}
602
- */
603
- Select2Utils.getNextOption = function (filteredData, hoveringValue) {
604
- var e_8, _a, e_9, _b;
605
- /** @type {?} */
606
- var findIt = Select2Utils.isNullOrUndefined(hoveringValue);
607
- try {
608
- for (var filteredData_2 = __values(filteredData), filteredData_2_1 = filteredData_2.next(); !filteredData_2_1.done; filteredData_2_1 = filteredData_2.next()) {
609
- var groupOrOption = filteredData_2_1.value;
610
- /** @type {?} */
611
- var options = (( /** @type {?} */(groupOrOption))).options;
612
- if (options) {
613
- try {
614
- for (var options_4 = (e_9 = void 0, __values(options)), options_4_1 = options_4.next(); !options_4_1.done; options_4_1 = options_4.next()) {
615
- var option = options_4_1.value;
616
- if (findIt) {
617
- if (!option.disabled && !option.hide) {
618
- return option;
619
- }
620
- }
621
- else if (!findIt) {
622
- findIt = option.value === hoveringValue;
623
- }
624
- }
625
- }
626
- catch (e_9_1) { e_9 = { error: e_9_1 }; }
627
- finally {
628
- try {
629
- if (options_4_1 && !options_4_1.done && (_b = options_4.return)) _b.call(options_4);
630
- }
631
- finally { if (e_9) throw e_9.error; }
632
- }
633
- }
634
- else {
635
- /** @type {?} */
636
- var option = ( /** @type {?} */(groupOrOption));
637
- if (findIt) {
638
- if (!option.disabled && !option.hide) {
639
- return option;
640
- }
641
- }
642
- else if (!findIt) {
643
- findIt = option.value === hoveringValue;
644
- }
645
- }
646
- }
647
- }
648
- catch (e_8_1) { e_8 = { error: e_8_1 }; }
649
- finally {
650
- try {
651
- if (filteredData_2_1 && !filteredData_2_1.done && (_a = filteredData_2.return)) _a.call(filteredData_2);
652
- }
653
- finally { if (e_8) throw e_8.error; }
654
- }
655
- return null;
656
- };
657
- /**
658
- * @param {?} data
659
- * @param {?=} maxResults
660
- * @return {?}
661
- */
662
- Select2Utils.getReduceData = function (data, maxResults) {
663
- var e_10, _a, e_11, _b;
664
- if (maxResults === void 0) { maxResults = 0; }
665
- if (maxResults > 0) {
666
- /** @type {?} */
667
- var counter = 0;
668
- /** @type {?} */
669
- var result = [];
670
- try {
671
- // debugger;
672
- for (var data_3 = __values(data), data_3_1 = data_3.next(); !data_3_1.done; data_3_1 = data_3.next()) {
673
- var groupOrOption = data_3_1.value;
674
- /** @type {?} */
675
- var options = (( /** @type {?} */(groupOrOption))).options;
676
- if (options) {
677
- /** @type {?} */
678
- var group = Object.assign(Object.assign({}, groupOrOption), { options: [] });
679
- result.push(group);
680
- try {
681
- for (var options_5 = (e_11 = void 0, __values(options)), options_5_1 = options_5.next(); !options_5_1.done; options_5_1 = options_5.next()) {
682
- var item = options_5_1.value;
683
- group.options.push(item);
684
- counter++;
685
- if (counter === maxResults) {
686
- return { result: result, reduce: true };
687
- }
688
- }
689
- }
690
- catch (e_11_1) { e_11 = { error: e_11_1 }; }
691
- finally {
692
- try {
693
- if (options_5_1 && !options_5_1.done && (_b = options_5.return)) _b.call(options_5);
694
- }
695
- finally { if (e_11) throw e_11.error; }
696
- }
697
- }
698
- else {
699
- result.push(groupOrOption);
700
- counter++;
701
- }
702
- if (counter === maxResults) {
703
- return { result: result, reduce: true };
704
- }
705
- }
706
- }
707
- catch (e_10_1) { e_10 = { error: e_10_1 }; }
708
- finally {
709
- try {
710
- if (data_3_1 && !data_3_1.done && (_a = data_3.return)) _a.call(data_3);
711
- }
712
- finally { if (e_10) throw e_10.error; }
713
- }
714
- return { result: result, reduce: false };
715
- }
716
- else {
717
- return { result: data, reduce: false };
718
- }
719
- };
720
- /**
721
- * @param {?} data
722
- * @param {?} searchText
723
- * @param {?=} editPattern
724
- * @return {?}
725
- */
726
- Select2Utils.getFilteredData = function (data, searchText, editPattern) {
727
- var e_12, _a;
728
- if (searchText) {
729
- /** @type {?} */
730
- var result = [];
731
- try {
732
- for (var data_4 = __values(data), data_4_1 = data_4.next(); !data_4_1.done; data_4_1 = data_4.next()) {
733
- var groupOrOption = data_4_1.value;
734
- /** @type {?} */
735
- var options = (( /** @type {?} */(groupOrOption))).options;
736
- if (options) {
737
- if (options.some(( /**
738
- * @param {?} group
739
- * @return {?}
740
- */function (/**
741
- * @param {?} group
742
- * @return {?}
743
- */ group) { return Select2Utils.containSearchText(group.label, searchText, editPattern); }))) {
744
- /** @type {?} */
745
- var filteredOptions = options.filter(( /**
746
- * @param {?} group
747
- * @return {?}
748
- */function (/**
749
- * @param {?} group
750
- * @return {?}
751
- */ group) { return Select2Utils.containSearchText(group.label, searchText, editPattern); }));
752
- result.push(Object.assign(Object.assign({}, groupOrOption), { options: filteredOptions }));
753
- }
754
- }
755
- else if (Select2Utils.containSearchText(groupOrOption.label, searchText, editPattern)) {
756
- result.push(groupOrOption);
757
- }
758
- }
759
- }
760
- catch (e_12_1) { e_12 = { error: e_12_1 }; }
761
- finally {
762
- try {
763
- if (data_4_1 && !data_4_1.done && (_a = data_4.return)) _a.call(data_4);
764
- }
765
- finally { if (e_12) throw e_12.error; }
766
- }
767
- return result;
768
- }
769
- else {
770
- return data;
771
- }
772
- };
773
- /**
774
- * @param {?} data
775
- * @param {?} selectedOptions
776
- * @return {?}
777
- */
778
- Select2Utils.getFilteredSelectedData = function (data, selectedOptions) {
779
- var e_13, _a;
780
- /** @type {?} */
781
- var result = [];
782
- try {
783
- for (var data_5 = __values(data), data_5_1 = data_5.next(); !data_5_1.done; data_5_1 = data_5.next()) {
784
- var groupOrOption = data_5_1.value;
785
- /** @type {?} */
786
- var options = (( /** @type {?} */(groupOrOption))).options;
787
- if (options) {
788
- /** @type {?} */
789
- var filteredOptions = options.filter(( /**
790
- * @param {?} group
791
- * @return {?}
792
- */function (/**
793
- * @param {?} group
794
- * @return {?}
795
- */ group) { return Select2Utils.isSelected(selectedOptions, group, true) === 'false'; }));
796
- if (filteredOptions.length) {
797
- result.push(Object.assign(Object.assign({}, groupOrOption), { options: filteredOptions }));
798
- }
799
- }
800
- else if (Select2Utils.isSelected(selectedOptions, ( /** @type {?} */(groupOrOption)), true) === 'false') {
801
- result.push(groupOrOption);
802
- }
803
- }
804
- }
805
- catch (e_13_1) { e_13 = { error: e_13_1 }; }
806
- finally {
807
- try {
808
- if (data_5_1 && !data_5_1.done && (_a = data_5.return)) _a.call(data_5);
809
- }
810
- finally { if (e_13) throw e_13.error; }
811
- }
812
- return result;
813
- };
814
- /**
815
- * @param {?} data
816
- * @param {?=} minCountForSearch
817
- * @return {?}
818
- */
819
- Select2Utils.isSearchboxHiddex = function (data, minCountForSearch) {
820
- if (minCountForSearch === '' ||
821
- minCountForSearch === undefined ||
822
- minCountForSearch === null ||
823
- isNaN(+minCountForSearch)) {
824
- minCountForSearch = defaultMinCountForSearch;
825
- }
826
- /** @type {?} */
827
- var optionCount = Select2Utils.getOptionsCount(data);
828
- return optionCount < +minCountForSearch;
829
- };
830
- /**
831
- * @param {?} options
832
- * @param {?} option
833
- * @param {?} multiple
834
- * @return {?}
835
- */
836
- Select2Utils.isSelected = function (options, option, multiple) {
837
- return multiple
838
- ? options && (( /** @type {?} */(options))).some(( /**
839
- * @param {?} op
840
- * @return {?}
841
- */function (/**
842
- * @param {?} op
843
- * @return {?}
844
- */ op) { return op.value === option.value; }))
845
- ? 'true'
846
- : 'false'
847
- : options && option.value === (( /** @type {?} */(options))).value
848
- ? 'true'
849
- : 'false';
850
- };
851
- /**
852
- * @param {?} options
853
- * @param {?} option
854
- * @return {?}
855
- */
856
- Select2Utils.removeSelection = function (options, option) {
857
- for (var i = 0; i < (( /** @type {?} */(options))).length; i++) {
858
- if ((( /** @type {?} */(options)))[i].value === option.value) {
859
- (( /** @type {?} */(options))).splice(i, 1);
860
- return;
861
- }
862
- }
863
- };
864
- /**
865
- * @private
866
- * @param {?} data
867
- * @return {?}
868
- */
869
- Select2Utils.getOptionsCount = function (data) {
870
- var e_14, _a;
871
- /** @type {?} */
872
- var count = 0;
873
- if (Array.isArray(data)) {
874
- try {
875
- for (var data_6 = __values(data), data_6_1 = data_6.next(); !data_6_1.done; data_6_1 = data_6.next()) {
876
- var groupOrOption = data_6_1.value;
877
- /** @type {?} */
878
- var options = (( /** @type {?} */(groupOrOption))).options;
879
- if (options) {
880
- count += options.length;
881
- }
882
- else {
883
- count++;
884
- }
885
- }
886
- }
887
- catch (e_14_1) { e_14 = { error: e_14_1 }; }
888
- finally {
889
- try {
890
- if (data_6_1 && !data_6_1.done && (_a = data_6.return)) _a.call(data_6);
891
- }
892
- finally { if (e_14) throw e_14.error; }
893
- }
894
- }
895
- return count;
896
- };
897
- /**
898
- * @private
899
- * @param {?} value
900
- * @return {?}
901
- */
902
- Select2Utils.isNullOrUndefined = function (value) {
903
- return value === null || value === undefined;
904
- };
905
- /**
906
- * @private
907
- * @param {?} label
908
- * @param {?} searchText
909
- * @param {?} editPattern
910
- * @return {?}
911
- */
912
- Select2Utils.containSearchText = function (label, searchText, editPattern) {
913
- return searchText
914
- ? Select2Utils.formatSansUnicode(label).match(new RegExp(Select2Utils.formatPattern(searchText, editPattern), 'i')) !== null
915
- : true;
916
- };
917
- /**
918
- * @private
919
- * @param {?} str
920
- * @return {?}
921
- */
922
- Select2Utils.protectPattern = function (str) {
923
- return str.replace(protectRegexp, '\\$&');
924
- };
925
- /**
926
- * @private
927
- * @param {?} str
928
- * @return {?}
929
- */
930
- Select2Utils.formatSansUnicode = function (str) {
931
- var e_15, _a;
932
- try {
933
- for (var unicodePatterns_1 = __values(unicodePatterns), unicodePatterns_1_1 = unicodePatterns_1.next(); !unicodePatterns_1_1.done; unicodePatterns_1_1 = unicodePatterns_1.next()) {
934
- var unicodePattern = unicodePatterns_1_1.value;
935
- str = str.replace(unicodePattern.s, unicodePattern.l);
936
- }
937
- }
938
- catch (e_15_1) { e_15 = { error: e_15_1 }; }
939
- finally {
940
- try {
941
- if (unicodePatterns_1_1 && !unicodePatterns_1_1.done && (_a = unicodePatterns_1.return)) _a.call(unicodePatterns_1);
942
- }
943
- finally { if (e_15) throw e_15.error; }
944
- }
945
- return str;
946
- };
947
- /**
948
- * @private
949
- * @param {?} str
950
- * @param {?} editPattern
951
- * @return {?}
952
- */
953
- Select2Utils.formatPattern = function (str, editPattern) {
954
- str = Select2Utils.formatSansUnicode(Select2Utils.protectPattern(str));
955
- if (editPattern && typeof editPattern === 'function') {
956
- str = editPattern(str);
957
- }
958
- return str;
959
- };
960
- return Select2Utils;
961
- }());
962
-
963
- /** @type {?} */
964
- var nextUniqueId = 0;
965
- /** @type {?} */
966
- var displaySearchStatusList = ['default', 'hidden', 'always'];
967
- var Select2 = /** @class */ (function () {
968
- /**
969
- * @param {?} _viewportRuler
970
- * @param {?} _changeDetectorRef
971
- * @param {?} _parentForm
972
- * @param {?} _parentFormGroup
973
- * @param {?} _control
974
- * @param {?} tabIndex
975
- */
976
- function Select2(_viewportRuler, _changeDetectorRef, _parentForm, _parentFormGroup, _control, tabIndex) {
977
- this._viewportRuler = _viewportRuler;
978
- this._changeDetectorRef = _changeDetectorRef;
979
- this._parentForm = _parentForm;
980
- this._parentFormGroup = _parentFormGroup;
981
- this._control = _control;
982
- this.minCharForSearch = 0;
983
- this.limitSelection = 0;
984
- this.listPosition = 'below';
985
- /**
986
- * use the material style
987
- */
988
- this.styleMode = 'default';
989
- /**
990
- * maximum results limit (0 = no limit)
991
- */
992
- this.maxResults = 0;
993
- /**
994
- * message when maximum results
995
- */
996
- this.maxResultsMessage = 'Too many results…';
997
- /**
998
- * infinite scroll distance
999
- */
1000
- this.infiniteScrollDistance = 1.5;
1001
- /**
1002
- * infinite scroll distance
1003
- */
1004
- this.infiniteScrollThrottle = 150;
1005
- /**
1006
- * the max height of the results container when opening the select
1007
- */
1008
- this.resultMaxHeight = '200px';
1009
- this.update = new core.EventEmitter();
1010
- this.open = new core.EventEmitter();
1011
- this.close = new core.EventEmitter();
1012
- this.focus = new core.EventEmitter();
1013
- this.blur = new core.EventEmitter();
1014
- this.search = new core.EventEmitter();
1015
- this.scroll = new core.EventEmitter();
1016
- this.removeOption = new core.EventEmitter();
1017
- this.option = null;
1018
- this.isOpen = false;
1019
- /**
1020
- * Whether the element is focused or not.
1021
- */
1022
- this.focused = false;
1023
- this.hoveringValue = null;
1024
- this.innerSearchText = '';
1025
- this._stateChanges = new rxjs.Subject();
1026
- this._disabled = false;
1027
- this._required = false;
1028
- this._readonly = false;
1029
- this._multiple = false;
1030
- this._overlay = false;
1031
- this._resettable = false;
1032
- this._hideSelectedItems = false;
1033
- this._clickDetection = false;
1034
- this._uid = "select2-" + nextUniqueId++;
1035
- this._infiniteScroll = true;
1036
- /**
1037
- * View -> model callback called when select has been touched
1038
- */
1039
- this._onTouched = ( /**
1040
- * @return {?}
1041
- */function () {
1042
- // do nothing
1043
- });
1044
- /**
1045
- * View -> model callback called when value changes
1046
- */
1047
- this._onChange = ( /**
1048
- * @return {?}
1049
- */function () {
1050
- // do nothing
1051
- });
1052
- this.id = this.id;
1053
- this._tabIndex = parseInt(tabIndex, 10) || 0;
1054
- if (this._control) {
1055
- this._control.valueAccessor = this;
1056
- }
1057
- this._clickDetectionFc = this.clickDetection.bind(this);
1058
- }
1059
- Object.defineProperty(Select2.prototype, "data", {
1060
- /**
1061
- * data of options & optiongrps
1062
- * @param {?} data
1063
- * @return {?}
1064
- */
1065
- set: function (data) {
1066
- this._data = data;
1067
- this.updateFilteredData();
1068
- },
1069
- enumerable: false,
1070
- configurable: true
1071
- });
1072
- Object.defineProperty(Select2.prototype, "multiple", {
1073
- /**
1074
- * @return {?}
1075
- */
1076
- get: function () {
1077
- return this._multiple;
1078
- },
1079
- /**
1080
- * @param {?} value
1081
- * @return {?}
1082
- */
1083
- set: function (value) {
1084
- this._multiple = this._coerceBooleanProperty(value);
1085
- this.ngOnInit();
1086
- },
1087
- enumerable: false,
1088
- configurable: true
1089
- });
1090
- Object.defineProperty(Select2.prototype, "overlay", {
1091
- /**
1092
- * use the material style
1093
- * @return {?}
1094
- */
1095
- get: function () {
1096
- return this._overlay;
1097
- },
1098
- /**
1099
- * @param {?} value
1100
- * @return {?}
1101
- */
1102
- set: function (value) {
1103
- this._overlay = this._coerceBooleanProperty(value);
1104
- },
1105
- enumerable: false,
1106
- configurable: true
1107
- });
1108
- Object.defineProperty(Select2.prototype, "infiniteScroll", {
1109
- /**
1110
- * infinite scroll activated
1111
- * @return {?}
1112
- */
1113
- get: function () {
1114
- return this._infiniteScroll;
1115
- },
1116
- /**
1117
- * @param {?} value
1118
- * @return {?}
1119
- */
1120
- set: function (value) {
1121
- this._infiniteScroll = this._coerceBooleanProperty(value);
1122
- },
1123
- enumerable: false,
1124
- configurable: true
1125
- });
1126
- Object.defineProperty(Select2.prototype, "select2Options", {
1127
- /**
1128
- * @return {?}
1129
- */
1130
- get: function () {
1131
- return this.multiple ? (( /** @type {?} */(this.option))) : null;
1132
- },
1133
- enumerable: false,
1134
- configurable: true
1135
- });
1136
- Object.defineProperty(Select2.prototype, "select2Option", {
1137
- /**
1138
- * @return {?}
1139
- */
1140
- get: function () {
1141
- return this.multiple ? null : (( /** @type {?} */(this.option)));
1142
- },
1143
- enumerable: false,
1144
- configurable: true
1145
- });
1146
- Object.defineProperty(Select2.prototype, "searchText", {
1147
- /**
1148
- * @return {?}
1149
- */
1150
- get: function () {
1151
- return this.innerSearchText;
1152
- },
1153
- /**
1154
- * @param {?} text
1155
- * @return {?}
1156
- */
1157
- set: function (text) {
1158
- if (this.customSearchEnabled) {
1159
- this.search.emit({
1160
- component: this,
1161
- value: this._value,
1162
- search: text,
1163
- });
1164
- }
1165
- this.innerSearchText = text;
1166
- },
1167
- enumerable: false,
1168
- configurable: true
1169
- });
1170
- Object.defineProperty(Select2.prototype, "minCountForSearch", {
1171
- /**
1172
- * minimal data of show the search field
1173
- * @return {?}
1174
- */
1175
- get: function () {
1176
- return this._minCountForSearch;
1177
- },
1178
- /**
1179
- * @param {?} value
1180
- * @return {?}
1181
- */
1182
- set: function (value) {
1183
- this._minCountForSearch = value;
1184
- this.updateSearchBox();
1185
- },
1186
- enumerable: false,
1187
- configurable: true
1188
- });
1189
- Object.defineProperty(Select2.prototype, "id", {
1190
- /**
1191
- * Unique id of the element.
1192
- * @return {?}
1193
- */
1194
- get: function () {
1195
- return this._id;
1196
- },
1197
- /**
1198
- * @param {?} value
1199
- * @return {?}
1200
- */
1201
- set: function (value) {
1202
- this._id = value || this._uid;
1203
- },
1204
- enumerable: false,
1205
- configurable: true
1206
- });
1207
- Object.defineProperty(Select2.prototype, "required", {
1208
- /**
1209
- * Whether the element is required.
1210
- * @return {?}
1211
- */
1212
- get: function () {
1213
- return this._required;
1214
- },
1215
- /**
1216
- * @param {?} value
1217
- * @return {?}
1218
- */
1219
- set: function (value) {
1220
- this._required = this._coerceBooleanProperty(value);
1221
- },
1222
- enumerable: false,
1223
- configurable: true
1224
- });
1225
- Object.defineProperty(Select2.prototype, "disabled", {
1226
- /**
1227
- * Whether selected items should be hidden.
1228
- * @return {?}
1229
- */
1230
- get: function () {
1231
- return this._control ? this._control.disabled : this._disabled;
1232
- },
1233
- /**
1234
- * @param {?} value
1235
- * @return {?}
1236
- */
1237
- set: function (value) {
1238
- this._disabled = this._coerceBooleanProperty(value);
1239
- },
1240
- enumerable: false,
1241
- configurable: true
1242
- });
1243
- Object.defineProperty(Select2.prototype, "hideSelectedItems", {
1244
- /**
1245
- * Whether items are hidden when has.
1246
- * @return {?}
1247
- */
1248
- get: function () {
1249
- return this._hideSelectedItems;
1250
- },
1251
- /**
1252
- * @param {?} value
1253
- * @return {?}
1254
- */
1255
- set: function (value) {
1256
- this._hideSelectedItems = this._coerceBooleanProperty(value);
1257
- },
1258
- enumerable: false,
1259
- configurable: true
1260
- });
1261
- Object.defineProperty(Select2.prototype, "readonly", {
1262
- /**
1263
- * Whether the element is readonly.
1264
- * @return {?}
1265
- */
1266
- get: function () {
1267
- return this._readonly;
1268
- },
1269
- /**
1270
- * @param {?} value
1271
- * @return {?}
1272
- */
1273
- set: function (value) {
1274
- this._readonly = this._coerceBooleanProperty(value);
1275
- },
1276
- enumerable: false,
1277
- configurable: true
1278
- });
1279
- Object.defineProperty(Select2.prototype, "value", {
1280
- /**
1281
- * The input element's value.
1282
- * @return {?}
1283
- */
1284
- get: function () {
1285
- return this._value;
1286
- },
1287
- /**
1288
- * @param {?} value
1289
- * @return {?}
1290
- */
1291
- set: function (value) {
1292
- var _this = this;
1293
- if (this.testValueChange(this._value, value)) {
1294
- setTimeout(( /**
1295
- * @return {?}
1296
- */function () {
1297
- _this._value = value;
1298
- _this.writeValue(value);
1299
- }), 10);
1300
- }
1301
- },
1302
- enumerable: false,
1303
- configurable: true
1304
- });
1305
- Object.defineProperty(Select2.prototype, "tabIndex", {
1306
- /**
1307
- * Tab index for the select2 element.
1308
- * @return {?}
1309
- */
1310
- get: function () {
1311
- return this.disabled ? -1 : this._tabIndex;
1312
- },
1313
- /**
1314
- * @param {?} value
1315
- * @return {?}
1316
- */
1317
- set: function (value) {
1318
- if (typeof value !== 'undefined') {
1319
- this._tabIndex = value;
1320
- }
1321
- },
1322
- enumerable: false,
1323
- configurable: true
1324
- });
1325
- Object.defineProperty(Select2.prototype, "resettable", {
1326
- /**
1327
- * reset with no selected value
1328
- * @return {?}
1329
- */
1330
- get: function () {
1331
- return this._resettable;
1332
- },
1333
- /**
1334
- * @param {?} value
1335
- * @return {?}
1336
- */
1337
- set: function (value) {
1338
- this._resettable = this._coerceBooleanProperty(value);
1339
- },
1340
- enumerable: false,
1341
- configurable: true
1342
- });
1343
- Object.defineProperty(Select2.prototype, "ariaInvalid", {
1344
- /**
1345
- * @return {?}
1346
- */
1347
- get: function () {
1348
- return this._isErrorState();
1349
- },
1350
- enumerable: false,
1351
- configurable: true
1352
- });
1353
- Object.defineProperty(Select2.prototype, "classMaterial", {
1354
- /**
1355
- * @return {?}
1356
- */
1357
- get: function () {
1358
- return this.styleMode === 'material';
1359
- },
1360
- enumerable: false,
1361
- configurable: true
1362
- });
1363
- Object.defineProperty(Select2.prototype, "classNostyle", {
1364
- /**
1365
- * @return {?}
1366
- */
1367
- get: function () {
1368
- return this.styleMode === 'noStyle';
1369
- },
1370
- enumerable: false,
1371
- configurable: true
1372
- });
1373
- Object.defineProperty(Select2.prototype, "select2above", {
1374
- /**
1375
- * @return {?}
1376
- */
1377
- get: function () {
1378
- return !this.overlay ? this.listPosition === 'above' : this._isAbobeOverlay();
1379
- },
1380
- enumerable: false,
1381
- configurable: true
1382
- });
1383
- Object.defineProperty(Select2.prototype, "_positions", {
1384
- /**
1385
- * @return {?}
1386
- */
1387
- get: function () {
1388
- if (this.listPosition === 'auto') {
1389
- [
1390
- {
1391
- originX: 'start',
1392
- originY: 'bottom',
1393
- overlayX: 'start',
1394
- overlayY: 'bottom',
1395
- },
1396
- {
1397
- originX: 'start',
1398
- originY: 'top',
1399
- overlayX: 'start',
1400
- overlayY: 'top',
1401
- },
1402
- ];
1403
- }
1404
- else {
1405
- return null;
1406
- }
1407
- },
1408
- enumerable: false,
1409
- configurable: true
1410
- });
1411
- Object.defineProperty(Select2.prototype, "resultsElement", {
1412
- /**
1413
- * @private
1414
- * @return {?}
1415
- */
1416
- get: function () {
1417
- var _a;
1418
- return (_a = this.resultContainer) === null || _a === void 0 ? void 0 : _a.nativeElement;
1419
- },
1420
- enumerable: false,
1421
- configurable: true
1422
- });
1423
- /**
1424
- * @return {?}
1425
- */
1426
- Select2.prototype.ngOnInit = function () {
1427
- var _this = this;
1428
- this._viewportRuler.change(100).subscribe(( /**
1429
- * @return {?}
1430
- */function () {
1431
- if (_this.isOpen) {
1432
- _this.triggerRect();
1433
- }
1434
- }));
1435
- /** @type {?} */
1436
- var option = Select2Utils.getOptionsByValue(this._data, this._control ? this._control.value : this.value, this.multiple);
1437
- if (option !== null) {
1438
- this.option = option;
1439
- }
1440
- if (!Array.isArray(option)) {
1441
- this.hoveringValue = ( /** @type {?} */(this.value));
1442
- }
1443
- this.updateSearchBox();
1444
- };
1445
- /**
1446
- * @return {?}
1447
- */
1448
- Select2.prototype.ngAfterViewInit = function () {
1449
- var _this = this;
1450
- this.cdkConnectedOverlay.positionChange.subscribe(( /**
1451
- * @param {?} posChange
1452
- * @return {?}
1453
- */function (posChange) {
1454
- var _a;
1455
- if (_this.listPosition === 'auto' && ((_a = posChange.connectionPair) === null || _a === void 0 ? void 0 : _a.originY) &&
1456
- _this._overlayPosition !== posChange.connectionPair.originY) {
1457
- _this.triggerRect();
1458
- _this._overlayPosition = posChange.connectionPair.originY;
1459
- _this._changeDetectorRef.detectChanges();
1460
- }
1461
- }));
1462
- this.selectionElement = this.selection.nativeElement;
1463
- this.triggerRect();
1464
- };
1465
- /**
1466
- * @return {?}
1467
- */
1468
- Select2.prototype.ngDoCheck = function () {
1469
- var _a;
1470
- this.updateSearchBox();
1471
- this._dirtyCheckNativeValue();
1472
- if (this._triggerRect) {
1473
- if (this.overlayWidth !== this._triggerRect.width) {
1474
- this.overlayWidth = this._triggerRect.width;
1475
- }
1476
- if (((_a = this._dropdownRect) === null || _a === void 0 ? void 0 : _a.height) > 0 && this.overlayHeight !== this._dropdownRect.height) {
1477
- this.overlayHeight = this.listPosition === 'auto' ? this._dropdownRect.height : 0;
1478
- }
1479
- }
1480
- };
1481
- /**
1482
- * @return {?}
1483
- */
1484
- Select2.prototype.ngOnDestroy = function () {
1485
- window.document.body.removeEventListener('click', this._clickDetectionFc);
1486
- };
1487
- /**
1488
- * @return {?}
1489
- */
1490
- Select2.prototype.updateSearchBox = function () {
1491
- /** @type {?} */
1492
- var hidden = this.customSearchEnabled
1493
- ? false
1494
- : Select2Utils.isSearchboxHiddex(this._data, this._minCountForSearch);
1495
- if (this.isSearchboxHidden !== hidden) {
1496
- this.isSearchboxHidden = hidden;
1497
- }
1498
- };
1499
- /**
1500
- * @return {?}
1501
- */
1502
- Select2.prototype.hideSearch = function () {
1503
- /** @type {?} */
1504
- var displaySearchStatus = displaySearchStatusList.indexOf(this.displaySearchStatus) > -1 ? this.displaySearchStatus : 'default';
1505
- return (displaySearchStatus === 'default' && this.isSearchboxHidden) || displaySearchStatus === 'hidden';
1506
- };
1507
- /**
1508
- * @param {?} option
1509
- * @return {?}
1510
- */
1511
- Select2.prototype.getOptionStyle = function (option) {
1512
- return ('select2-results__option ' +
1513
- (option.hide ? 'select2-results__option--hide ' : '') +
1514
- (option.value === this.hoveringValue ? 'select2-results__option--highlighted ' : '') +
1515
- (option.classes || ''));
1516
- };
1517
- /**
1518
- * @param {?} option
1519
- * @return {?}
1520
- */
1521
- Select2.prototype.mouseenter = function (option) {
1522
- if (!option.disabled) {
1523
- this.hoveringValue = option.value;
1524
- }
1525
- };
1526
- /**
1527
- * @param {?} option
1528
- * @return {?}
1529
- */
1530
- Select2.prototype.click = function (option) {
1531
- if (this.testSelection(option)) {
1532
- this.select(option);
1533
- }
1534
- };
1535
- /**
1536
- * @param {?} e
1537
- * @return {?}
1538
- */
1539
- Select2.prototype.reset = function (e) {
1540
- this.select(null);
1541
- e.preventDefault();
1542
- e.stopPropagation();
1543
- };
1544
- /**
1545
- * @param {?} event
1546
- * @return {?}
1547
- */
1548
- Select2.prototype.prevChange = function (event) {
1549
- event.stopPropagation();
1550
- };
1551
- /**
1552
- * @return {?}
1553
- */
1554
- Select2.prototype.toggleOpenAndClose = function () {
1555
- var _this = this;
1556
- if (this.disabled) {
1557
- return;
1558
- }
1559
- this._focus(true);
1560
- this.isOpen = !this.isOpen;
1561
- if (this.isOpen) {
1562
- this.innerSearchText = '';
1563
- this.updateFilteredData();
1564
- this._focusSearchboxOrResultsElement();
1565
- setTimeout(( /**
1566
- * @return {?}
1567
- */function () {
1568
- if (_this.option) {
1569
- /** @type {?} */
1570
- var option = _this.option instanceof Array ? _this.option[0] : _this.option;
1571
- _this.updateScrollFromOption(option);
1572
- }
1573
- else if (_this.resultsElement) {
1574
- _this.resultsElement.scrollTop = 0;
1575
- }
1576
- setTimeout(( /**
1577
- * @return {?}
1578
- */function () {
1579
- var _a, _b;
1580
- _this.triggerRect();
1581
- (_b = (_a = _this.cdkConnectedOverlay) === null || _a === void 0 ? void 0 : _a.overlayRef) === null || _b === void 0 ? void 0 : _b.updatePosition();
1582
- }), 100);
1583
- }));
1584
- this.open.emit(this);
1585
- }
1586
- else {
1587
- this.close.emit(this);
1588
- }
1589
- if (this.isOpen && !this._clickDetection) {
1590
- setTimeout(( /**
1591
- * @return {?}
1592
- */function () {
1593
- window.document.body.addEventListener('click', _this._clickDetectionFc, false);
1594
- _this._clickDetection = true;
1595
- }), timeout);
1596
- }
1597
- this._changeDetectorRef.markForCheck();
1598
- };
1599
- /**
1600
- * @param {?} option
1601
- * @param {?} defaut
1602
- * @return {?}
1603
- */
1604
- Select2.prototype.hasTemplate = function (option, defaut) {
1605
- var _a, _b;
1606
- return (this.templates instanceof core.TemplateRef ||
1607
- ((_a = this.templates) === null || _a === void 0 ? void 0 : _a[option.templateId]) instanceof core.TemplateRef ||
1608
- ((_b = this.templates) === null || _b === void 0 ? void 0 : _b[defaut]) instanceof core.TemplateRef);
1609
- };
1610
- /**
1611
- * @param {?} option
1612
- * @param {?} defaut
1613
- * @return {?}
1614
- */
1615
- Select2.prototype.getTemplate = function (option, defaut) {
1616
- return this.hasTemplate(option, defaut)
1617
- ? this.templates[option.templateId] || this.templates[defaut] || this.templates
1618
- : undefined;
1619
- };
1620
- /**
1621
- * @return {?}
1622
- */
1623
- Select2.prototype.triggerRect = function () {
1624
- var _a;
1625
- this._triggerRect = this.selectionElement.getBoundingClientRect();
1626
- this._dropdownRect = ((_a = this.dropdown) === null || _a === void 0 ? void 0 : _a.nativeElement) ? this.dropdown.nativeElement.getBoundingClientRect()
1627
- : undefined;
1628
- };
1629
- /**
1630
- * @private
1631
- * @param {?} option
1632
- * @return {?}
1633
- */
1634
- Select2.prototype.testSelection = function (option) {
1635
- if (option.disabled) {
1636
- return false;
1637
- }
1638
- if (!this.multiple ||
1639
- !this.limitSelection ||
1640
- (Array.isArray(this._value) && this._value.length < this.limitSelection)) {
1641
- return true;
1642
- }
1643
- return false;
1644
- };
1645
- /**
1646
- * @private
1647
- * @param {?} value1
1648
- * @param {?} value2
1649
- * @return {?}
1650
- */
1651
- Select2.prototype.testValueChange = function (value1, value2) {
1652
- var e_1, _c;
1653
- var _a, _b;
1654
- if (((value1 === null || value1 === undefined) && (value2 === null || value2 === undefined)) ||
1655
- value1 === value2) {
1656
- return false;
1657
- }
1658
- 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) &&
1659
- (( /** @type {?} */(value1))).length === (( /** @type {?} */(value2))).length) {
1660
- try {
1661
- for (var _d = __values(( /** @type {?} */(value1))), _e = _d.next(); !_e.done; _e = _d.next()) {
1662
- var e1 = _e.value;
1663
- /** @type {?} */
1664
- var test = (( /** @type {?} */(value2))).indexOf(e1) > -1;
1665
- if (!test) {
1666
- return true;
1667
- }
1668
- }
1669
- }
1670
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1671
- finally {
1672
- try {
1673
- if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
1674
- }
1675
- finally { if (e_1) throw e_1.error; }
1676
- }
1677
- return false;
1678
- }
1679
- return true;
1680
- };
1681
- /**
1682
- * @private
1683
- * @return {?}
1684
- */
1685
- Select2.prototype.updateFilteredData = function () {
1686
- var _this = this;
1687
- setTimeout(( /**
1688
- * @return {?}
1689
- */function () {
1690
- /** @type {?} */
1691
- var result = _this._data;
1692
- if (_this.multiple && _this.hideSelectedItems) {
1693
- result = Select2Utils.getFilteredSelectedData(result, _this.option);
1694
- }
1695
- if (!_this.customSearchEnabled && _this.searchText && _this.searchText.length >= +_this.minCharForSearch) {
1696
- result = Select2Utils.getFilteredData(result, _this.searchText, _this.editPattern);
1697
- }
1698
- if (_this.maxResults > 0) {
1699
- /** @type {?} */
1700
- var data = Select2Utils.getReduceData(result, +_this.maxResults);
1701
- result = data.result;
1702
- _this.maxResultsExceeded = data.reduce;
1703
- }
1704
- else {
1705
- _this.maxResultsExceeded = false;
1706
- }
1707
- if (Select2Utils.valueIsNotInFilteredData(result, _this.hoveringValue)) {
1708
- _this.hoveringValue = Select2Utils.getFirstAvailableOption(result);
1709
- }
1710
- _this.filteredData = result;
1711
- _this._changeDetectorRef.markForCheck();
1712
- }));
1713
- };
1714
- /**
1715
- * @private
1716
- * @param {?} e
1717
- * @return {?}
1718
- */
1719
- Select2.prototype.clickDetection = function (e) {
1720
- if (!this.ifParentContainsClass(( /** @type {?} */(e.target)), 'selection')) {
1721
- if (this.isOpen && !this.ifParentContainsClass(( /** @type {?} */(e.target)), 'select2-dropdown')) {
1722
- this.toggleOpenAndClose();
1723
- }
1724
- if (!this.ifParentContainsId(( /** @type {?} */(e.target)), this._id)) {
1725
- this.clickExit();
1726
- }
1727
- }
1728
- else if (this.isOpen && !this.ifParentContainsId(( /** @type {?} */(e.target)), this._id)) {
1729
- this.toggleOpenAndClose();
1730
- this.clickExit();
1731
- }
1732
- };
1733
- /**
1734
- * @private
1735
- * @return {?}
1736
- */
1737
- Select2.prototype.clickExit = function () {
1738
- this._focus(false);
1739
- window.document.body.removeEventListener('click', this._clickDetectionFc);
1740
- this._clickDetection = false;
1741
- };
1742
- /**
1743
- * @private
1744
- * @param {?} element
1745
- * @param {?} cssClass
1746
- * @return {?}
1747
- */
1748
- Select2.prototype.ifParentContainsClass = function (element, cssClass) {
1749
- return this.getParentElementByClass(element, cssClass) !== null;
1750
- };
1751
- /**
1752
- * @private
1753
- * @param {?} element
1754
- * @param {?} id
1755
- * @return {?}
1756
- */
1757
- Select2.prototype.ifParentContainsId = function (element, id) {
1758
- return this.getParentElementById(element, id) !== null;
1759
- };
1760
- /**
1761
- * @private
1762
- * @param {?} element
1763
- * @param {?} cssClass
1764
- * @return {?}
1765
- */
1766
- Select2.prototype.getParentElementByClass = function (element, cssClass) {
1767
- if (this.containClasses(element, cssClass.trim().split(/\s+/))) {
1768
- return element;
1769
- }
1770
- return element.parentElement ? this.getParentElementByClass(element.parentElement, cssClass) : null;
1771
- };
1772
- /**
1773
- * @private
1774
- * @param {?} element
1775
- * @param {?} id
1776
- * @return {?}
1777
- */
1778
- Select2.prototype.getParentElementById = function (element, id) {
1779
- if (element.id === id) {
1780
- return element;
1781
- }
1782
- return element.parentElement ? this.getParentElementById(element.parentElement, id) : null;
1783
- };
1784
- /**
1785
- * @private
1786
- * @param {?} element
1787
- * @param {?} cssClasses
1788
- * @return {?}
1789
- */
1790
- Select2.prototype.containClasses = function (element, cssClasses) {
1791
- var e_2, _c;
1792
- if (!element.classList) {
1793
- return false;
1794
- }
1795
- try {
1796
- for (var cssClasses_1 = __values(cssClasses), cssClasses_1_1 = cssClasses_1.next(); !cssClasses_1_1.done; cssClasses_1_1 = cssClasses_1.next()) {
1797
- var cssClass = cssClasses_1_1.value;
1798
- if (!element.classList.contains(cssClass)) {
1799
- return false;
1800
- }
1801
- }
1802
- }
1803
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
1804
- finally {
1805
- try {
1806
- if (cssClasses_1_1 && !cssClasses_1_1.done && (_c = cssClasses_1.return)) _c.call(cssClasses_1);
1807
- }
1808
- finally { if (e_2) throw e_2.error; }
1809
- }
1810
- return true;
1811
- };
1812
- /**
1813
- * @return {?}
1814
- */
1815
- Select2.prototype.focusin = function () {
1816
- if (!this.disabled) {
1817
- this._focus(true);
1818
- }
1819
- };
1820
- /**
1821
- * @return {?}
1822
- */
1823
- Select2.prototype.focusout = function () {
1824
- if (this.selectionElement && !this.selectionElement.classList.contains('select2-focused')) {
1825
- this._focus(false);
1826
- this._onTouched();
1827
- }
1828
- };
1829
- /**
1830
- * @param {?} option
1831
- * @return {?}
1832
- */
1833
- Select2.prototype.select = function (option) {
1834
- /** @type {?} */
1835
- var value;
1836
- if (option !== null) {
1837
- if (this.multiple) {
1838
- /** @type {?} */
1839
- var options = ( /** @type {?} */(this.option));
1840
- /** @type {?} */
1841
- var index = options.findIndex(( /**
1842
- * @param {?} op
1843
- * @return {?}
1844
- */function (/**
1845
- * @param {?} op
1846
- * @return {?}
1847
- */ op) { return op.value === option.value; }));
1848
- if (index === -1) {
1849
- options.push(option);
1850
- }
1851
- else {
1852
- options.splice(index, 1);
1853
- }
1854
- value = (( /** @type {?} */(this.option))).map(( /**
1855
- * @param {?} op
1856
- * @return {?}
1857
- */function (/**
1858
- * @param {?} op
1859
- * @return {?}
1860
- */ op) { return op.value; }));
1861
- }
1862
- else {
1863
- this.option = option;
1864
- if (this.isOpen) {
1865
- this.isOpen = false;
1866
- this.close.emit(this);
1867
- if (this.selectionElement) {
1868
- this.selectionElement.focus();
1869
- }
1870
- }
1871
- value = this.option.value;
1872
- }
1873
- }
1874
- else {
1875
- this.option = null;
1876
- }
1877
- if (this.multiple && this.hideSelectedItems) {
1878
- this.updateFilteredData();
1879
- }
1880
- if (this._control) {
1881
- this._onChange(value);
1882
- }
1883
- else {
1884
- this._value = value;
1885
- }
1886
- this.update.emit({
1887
- component: this,
1888
- value: value,
1889
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
1890
- });
1891
- };
1892
- /**
1893
- * @param {?} e
1894
- * @return {?}
1895
- */
1896
- Select2.prototype.keyDown = function (e) {
1897
- if (this._testKey(e, ['ArrowDown', 40])) {
1898
- this.moveDown();
1899
- e.preventDefault();
1900
- }
1901
- else if (this._testKey(e, ['ArrowUp', 38])) {
1902
- this.moveUp();
1903
- e.preventDefault();
1904
- }
1905
- else if (this._testKey(e, ['Enter', 13])) {
1906
- this.selectByEnter();
1907
- e.preventDefault();
1908
- }
1909
- else if (this._testKey(e, ['Escape', 'Tab', 9, 27]) && this.isOpen) {
1910
- this.toggleOpenAndClose();
1911
- this._focus(false);
1912
- }
1913
- };
1914
- /**
1915
- * @param {?} e
1916
- * @return {?}
1917
- */
1918
- Select2.prototype.openKey = function (e) {
1919
- if (this._testKey(e, ['ArrowDown', 'ArrowUp', 'Enter', 40, 38, 13])) {
1920
- this.toggleOpenAndClose();
1921
- e.preventDefault();
1922
- }
1923
- else if (this._testKey(e, ['Escape', 'Tab', 9, 27])) {
1924
- this._focus(false);
1925
- this._onTouched();
1926
- }
1927
- };
1928
- /**
1929
- * @param {?} _index
1930
- * @param {?} item
1931
- * @return {?}
1932
- */
1933
- Select2.prototype.trackBy = function (_index, item) {
1934
- return item.value;
1935
- };
1936
- /**
1937
- * @param {?} e
1938
- * @return {?}
1939
- */
1940
- Select2.prototype.searchUpdate = function (e) {
1941
- this.searchText = (( /** @type {?} */(e.target))).value;
1942
- this.updateFilteredData();
1943
- };
1944
- /**
1945
- * @param {?} option
1946
- * @return {?}
1947
- */
1948
- Select2.prototype.isSelected = function (option) {
1949
- return Select2Utils.isSelected(this.option, option, this.multiple);
1950
- };
1951
- /**
1952
- * @param {?} option
1953
- * @return {?}
1954
- */
1955
- Select2.prototype.isDisabled = function (option) {
1956
- return option.disabled ? 'true' : 'false';
1957
- };
1958
- /**
1959
- * @param {?} e
1960
- * @param {?} option
1961
- * @return {?}
1962
- */
1963
- Select2.prototype.removeSelection = function (e, option) {
1964
- Select2Utils.removeSelection(this.option, option);
1965
- if (this.multiple && this.hideSelectedItems) {
1966
- this.updateFilteredData();
1967
- }
1968
- /** @type {?} */
1969
- var value = (( /** @type {?} */(this.option))).map(( /**
1970
- * @param {?} op
1971
- * @return {?}
1972
- */function (/**
1973
- * @param {?} op
1974
- * @return {?}
1975
- */ op) { return op.value; }));
1976
- if (this._control) {
1977
- this._onChange(value);
1978
- }
1979
- else {
1980
- this._value = value;
1981
- }
1982
- this.update.emit({
1983
- component: this,
1984
- value: value,
1985
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
1986
- });
1987
- this.removeOption.emit({
1988
- component: this,
1989
- value: value,
1990
- removedOption: option,
1991
- });
1992
- e.preventDefault();
1993
- e.stopPropagation();
1994
- if (this.isOpen) {
1995
- this._focusSearchboxOrResultsElement();
1996
- }
1997
- };
1998
- /**
1999
- * Sets the model value. Implemented as part of ControlValueAccessor.
2000
- * @param {?} value
2001
- * @return {?}
2002
- */
2003
- Select2.prototype.writeValue = function (value) {
2004
- this._setSelectionByValue(value);
2005
- };
2006
- /**
2007
- * Saves a callback function to be invoked when the select's value
2008
- * changes from user input. Part of the ControlValueAccessor interface
2009
- * required to integrate with Angular's core forms API.
2010
- *
2011
- * @param {?} fn Callback to be triggered when the value changes.
2012
- * @return {?}
2013
- */
2014
- Select2.prototype.registerOnChange = function (fn) {
2015
- this._onChange = fn;
2016
- };
2017
- /**
2018
- * Saves a callback function to be invoked when the select is blurred
2019
- * by the user. Part of the ControlValueAccessor interface required
2020
- * to integrate with Angular's core forms API.
2021
- *
2022
- * @param {?} fn Callback to be triggered when the component has been touched.
2023
- * @return {?}
2024
- */
2025
- Select2.prototype.registerOnTouched = function (fn) {
2026
- this._onTouched = fn;
2027
- };
2028
- /**
2029
- * Sets whether the component should be disabled.
2030
- * Implemented as part of ControlValueAccessor.
2031
- * @param {?} isDisabled
2032
- * @return {?}
2033
- */
2034
- Select2.prototype.setDisabledState = function (isDisabled) {
2035
- this.disabled = isDisabled;
2036
- };
2037
- /**
2038
- * @param {?} way
2039
- * @return {?}
2040
- */
2041
- Select2.prototype.onScroll = function (way) {
2042
- this.scroll.emit({
2043
- component: this,
2044
- way: way,
2045
- search: this.innerSearchText,
2046
- });
2047
- };
2048
- /**
2049
- * @return {?}
2050
- */
2051
- Select2.prototype._isErrorState = function () {
2052
- /** @type {?} */
2053
- var isInvalid = this._control && this._control.invalid;
2054
- /** @type {?} */
2055
- var isTouched = this._control && this._control.touched;
2056
- /** @type {?} */
2057
- var isSubmitted = (this._parentFormGroup && this._parentFormGroup.submitted) ||
2058
- (this._parentForm && this._parentForm.submitted);
2059
- return !!(isInvalid && (isTouched || isSubmitted));
2060
- };
2061
- /**
2062
- * @private
2063
- * @return {?}
2064
- */
2065
- Select2.prototype.moveUp = function () {
2066
- this.updateScrollFromOption(Select2Utils.getPreviousOption(this.filteredData, this.hoveringValue));
2067
- };
2068
- /**
2069
- * @private
2070
- * @return {?}
2071
- */
2072
- Select2.prototype.moveDown = function () {
2073
- this.updateScrollFromOption(Select2Utils.getNextOption(this.filteredData, this.hoveringValue));
2074
- };
2075
- /**
2076
- * @private
2077
- * @param {?} option
2078
- * @return {?}
2079
- */
2080
- Select2.prototype.updateScrollFromOption = function (option) {
2081
- if (option) {
2082
- this.hoveringValue = option.value;
2083
- /** @type {?} */
2084
- var domElement = this.results.find(( /**
2085
- * @param {?} r
2086
- * @return {?}
2087
- */function (/**
2088
- * @param {?} r
2089
- * @return {?}
2090
- */ r) { return r.nativeElement.innerText.trim() === option.label; }));
2091
- if (domElement && this.resultsElement) {
2092
- this.resultsElement.scrollTop = 0;
2093
- /** @type {?} */
2094
- var listClientRect = this.resultsElement.getBoundingClientRect();
2095
- /** @type {?} */
2096
- var optionClientRect = domElement.nativeElement.getBoundingClientRect();
2097
- this.resultsElement.scrollTop = optionClientRect.top - listClientRect.top;
2098
- }
2099
- }
2100
- };
2101
- /**
2102
- * @private
2103
- * @return {?}
2104
- */
2105
- Select2.prototype.selectByEnter = function () {
2106
- if (this.hoveringValue) {
2107
- /** @type {?} */
2108
- var option = Select2Utils.getOptionByValue(this._data, this.hoveringValue);
2109
- this.select(option);
2110
- }
2111
- };
2112
- /**
2113
- * @private
2114
- * @param {?} event
2115
- * @param {?=} refs
2116
- * @return {?}
2117
- */
2118
- Select2.prototype._testKey = function (event, refs) {
2119
- if (refs === void 0) { refs = []; }
2120
- return this._isKey(this._getKey(event), refs);
2121
- };
2122
- /**
2123
- * @private
2124
- * @param {?} event
2125
- * @return {?}
2126
- */
2127
- Select2.prototype._getKey = function (event) {
2128
- /** @type {?} */
2129
- var code;
2130
- if (event.key !== undefined) {
2131
- code = event.key;
2132
- }
2133
- else if (event['keyIdentifier'] !== undefined) {
2134
- code = event['keyIdentifier'];
2135
- }
2136
- else if (event['keyCode'] !== undefined) {
2137
- code = event['keyCode'];
2138
- }
2139
- else {
2140
- event.preventDefault();
2141
- }
2142
- return code;
2143
- };
2144
- /**
2145
- * @private
2146
- * @param {?} code
2147
- * @param {?=} refs
2148
- * @return {?}
2149
- */
2150
- Select2.prototype._isKey = function (code, refs) {
2151
- if (refs === void 0) { refs = []; }
2152
- return refs && refs.length > 0 ? refs.indexOf(code) !== -1 : false;
2153
- };
2154
- /**
2155
- * Sets the selected option based on a value. If no option can be
2156
- * found with the designated value, the select trigger is cleared.
2157
- * @private
2158
- * @param {?} value
2159
- * @return {?}
2160
- */
2161
- Select2.prototype._setSelectionByValue = function (value) {
2162
- var _this = this;
2163
- if (this.option || (value !== undefined && value !== null)) {
2164
- /** @type {?} */
2165
- var isArray = Array.isArray(value);
2166
- if (this.multiple && value && !isArray) {
2167
- throw new Error('Non array value.');
2168
- }
2169
- else if (this._data) {
2170
- if (this.multiple) {
2171
- this.option = []; // if value is null, then empty option and return
2172
- if (isArray) {
2173
- // value is not null. Preselect value
2174
- /** @type {?} */
2175
- var selectedValues = Select2Utils.getOptionsByValue(this._data, value, this.multiple);
2176
- selectedValues.map(( /**
2177
- * @param {?} item
2178
- * @return {?}
2179
- */function (/**
2180
- * @param {?} item
2181
- * @return {?}
2182
- */ item) { return _this.select(item); }));
2183
- }
2184
- }
2185
- else {
2186
- this.select(Select2Utils.getOptionByValue(this._data, value));
2187
- }
2188
- }
2189
- else if (this._control) {
2190
- this._control.viewToModelUpdate(value);
2191
- }
2192
- this._changeDetectorRef.markForCheck();
2193
- }
2194
- };
2195
- /**
2196
- * Does some manual dirty checking on the native input `value` property.
2197
- * @private
2198
- * @return {?}
2199
- */
2200
- Select2.prototype._dirtyCheckNativeValue = function () {
2201
- /** @type {?} */
2202
- var newValue = this.value;
2203
- if (this._previousNativeValue !== newValue) {
2204
- this._previousNativeValue = newValue;
2205
- this._stateChanges.next();
2206
- }
2207
- };
2208
- /**
2209
- * @private
2210
- * @param {?} value
2211
- * @return {?}
2212
- */
2213
- Select2.prototype._coerceBooleanProperty = function (value) {
2214
- return value != null && "" + value !== 'false';
2215
- };
2216
- /**
2217
- * @private
2218
- * @return {?}
2219
- */
2220
- Select2.prototype._focusSearchboxOrResultsElement = function () {
2221
- var _this = this;
2222
- if (!this.isSearchboxHidden) {
2223
- setTimeout(( /**
2224
- * @return {?}
2225
- */function () {
2226
- if (_this.searchInput && _this.searchInput.nativeElement) {
2227
- _this.searchInput.nativeElement.focus();
2228
- }
2229
- }));
2230
- }
2231
- else if (this.resultsElement) {
2232
- this.resultsElement.focus();
2233
- }
2234
- };
2235
- /**
2236
- * @private
2237
- * @param {?} state
2238
- * @return {?}
2239
- */
2240
- Select2.prototype._focus = function (state) {
2241
- if (!state && this.focused) {
2242
- this.focused = state;
2243
- this.blur.emit(this);
2244
- }
2245
- else if (state && !this.focused) {
2246
- this.focused = state;
2247
- this.focus.emit(this);
2248
- }
2249
- };
2250
- /**
2251
- * @private
2252
- * @return {?}
2253
- */
2254
- Select2.prototype._isAbobeOverlay = function () {
2255
- return this.overlay && this._overlayPosition && this.listPosition === 'auto'
2256
- ? this._overlayPosition === 'top'
2257
- : this.listPosition === 'above';
2258
- };
2259
- return Select2;
2260
- }());
2261
- Select2.decorators = [
2262
- { type: core.Component, args: [{
2263
- selector: 'select2',
2264
- 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",
2265
- 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}}"]
2266
- }] }
2267
- ];
2268
- /** @nocollapse */
2269
- Select2.ctorParameters = function () { return [
2270
- { type: scrolling.ViewportRuler },
2271
- { type: core.ChangeDetectorRef },
2272
- { type: forms.NgForm, decorators: [{ type: core.Optional }] },
2273
- { type: forms.FormGroupDirective, decorators: [{ type: core.Optional }] },
2274
- { type: forms.NgControl, decorators: [{ type: core.Self }, { type: core.Optional }] },
2275
- { type: String, decorators: [{ type: core.Attribute, args: ['tabindex',] }] }
2276
- ]; };
2277
- Select2.propDecorators = {
2278
- data: [{ type: core.Input }],
2279
- minCharForSearch: [{ type: core.Input }],
2280
- displaySearchStatus: [{ type: core.Input }],
2281
- placeholder: [{ type: core.Input }],
2282
- customSearchEnabled: [{ type: core.Input }],
2283
- limitSelection: [{ type: core.Input }],
2284
- listPosition: [{ type: core.Input }],
2285
- multiple: [{ type: core.Input }],
2286
- overlay: [{ type: core.Input }],
2287
- styleMode: [{ type: core.Input }],
2288
- noResultMessage: [{ type: core.Input }],
2289
- maxResults: [{ type: core.Input }],
2290
- maxResultsMessage: [{ type: core.Input }],
2291
- infiniteScrollDistance: [{ type: core.Input }],
2292
- infiniteScrollThrottle: [{ type: core.Input }],
2293
- infiniteScroll: [{ type: core.Input }],
2294
- editPattern: [{ type: core.Input }],
2295
- templates: [{ type: core.Input }],
2296
- resultMaxHeight: [{ type: core.Input }],
2297
- update: [{ type: core.Output }],
2298
- open: [{ type: core.Output }],
2299
- close: [{ type: core.Output }],
2300
- focus: [{ type: core.Output }],
2301
- blur: [{ type: core.Output }],
2302
- search: [{ type: core.Output }],
2303
- scroll: [{ type: core.Output }],
2304
- removeOption: [{ type: core.Output }],
2305
- minCountForSearch: [{ type: core.Input }],
2306
- id: [{ type: core.Input }, { type: core.HostBinding, args: ['id',] }],
2307
- required: [{ type: core.Input }],
2308
- disabled: [{ type: core.Input }],
2309
- hideSelectedItems: [{ type: core.Input }],
2310
- readonly: [{ type: core.Input }],
2311
- value: [{ type: core.Input }],
2312
- tabIndex: [{ type: core.Input }],
2313
- resettable: [{ type: core.Input }],
2314
- ariaInvalid: [{ type: core.HostBinding, args: ['attr.aria-invalid',] }],
2315
- classMaterial: [{ type: core.HostBinding, args: ['class.material',] }],
2316
- classNostyle: [{ type: core.HostBinding, args: ['class.nostyle',] }],
2317
- select2above: [{ type: core.HostBinding, args: ['class.select2-above',] }],
2318
- cdkConnectedOverlay: [{ type: core.ViewChild, args: [overlay.CdkConnectedOverlay,] }],
2319
- selection: [{ type: core.ViewChild, args: ['selection', { static: true },] }],
2320
- resultContainer: [{ type: core.ViewChild, args: ['results',] }],
2321
- results: [{ type: core.ViewChildren, args: ['result',] }],
2322
- searchInput: [{ type: core.ViewChild, args: ['searchInput',] }],
2323
- dropdown: [{ type: core.ViewChild, args: ['dropdown',] }]
2324
- };
2325
- if (false) {
2326
- /** @type {?} */
2327
- Select2.prototype._data;
2328
- /** @type {?} */
2329
- Select2.prototype.minCharForSearch;
2330
- /** @type {?} */
2331
- Select2.prototype.displaySearchStatus;
2332
- /** @type {?} */
2333
- Select2.prototype.placeholder;
2334
- /** @type {?} */
2335
- Select2.prototype.customSearchEnabled;
2336
- /** @type {?} */
2337
- Select2.prototype.limitSelection;
2338
- /** @type {?} */
2339
- Select2.prototype.listPosition;
2340
- /**
2341
- * use the material style
2342
- * @type {?}
2343
- */
2344
- Select2.prototype.styleMode;
2345
- /**
2346
- * message when no result
2347
- * @type {?}
2348
- */
2349
- Select2.prototype.noResultMessage;
2350
- /**
2351
- * maximum results limit (0 = no limit)
2352
- * @type {?}
2353
- */
2354
- Select2.prototype.maxResults;
2355
- /**
2356
- * message when maximum results
2357
- * @type {?}
2358
- */
2359
- Select2.prototype.maxResultsMessage;
2360
- /**
2361
- * infinite scroll distance
2362
- * @type {?}
2363
- */
2364
- Select2.prototype.infiniteScrollDistance;
2365
- /**
2366
- * infinite scroll distance
2367
- * @type {?}
2368
- */
2369
- Select2.prototype.infiniteScrollThrottle;
2370
- /**
2371
- * use it for change the pattern of the filter search
2372
- * @type {?}
2373
- */
2374
- Select2.prototype.editPattern;
2375
- /**
2376
- * template for formating
2377
- * @type {?}
2378
- */
2379
- Select2.prototype.templates;
2380
- /**
2381
- * the max height of the results container when opening the select
2382
- * @type {?}
2383
- */
2384
- Select2.prototype.resultMaxHeight;
2385
- /** @type {?} */
2386
- Select2.prototype.update;
2387
- /** @type {?} */
2388
- Select2.prototype.open;
2389
- /** @type {?} */
2390
- Select2.prototype.close;
2391
- /** @type {?} */
2392
- Select2.prototype.focus;
2393
- /** @type {?} */
2394
- Select2.prototype.blur;
2395
- /** @type {?} */
2396
- Select2.prototype.search;
2397
- /** @type {?} */
2398
- Select2.prototype.scroll;
2399
- /** @type {?} */
2400
- Select2.prototype.removeOption;
2401
- /** @type {?} */
2402
- Select2.prototype.option;
2403
- /** @type {?} */
2404
- Select2.prototype.isOpen;
2405
- /** @type {?} */
2406
- Select2.prototype.searchStyle;
2407
- /**
2408
- * Whether the element is focused or not.
2409
- * @type {?}
2410
- */
2411
- Select2.prototype.focused;
2412
- /** @type {?} */
2413
- Select2.prototype.filteredData;
2414
- /** @type {?} */
2415
- Select2.prototype.overlayWidth;
2416
- /** @type {?} */
2417
- Select2.prototype.overlayHeight;
2418
- /** @type {?} */
2419
- Select2.prototype._triggerRect;
2420
- /** @type {?} */
2421
- Select2.prototype._dropdownRect;
2422
- /** @type {?} */
2423
- Select2.prototype.maxResultsExceeded;
2424
- /**
2425
- * @type {?}
2426
- * @private
2427
- */
2428
- Select2.prototype._minCountForSearch;
2429
- /**
2430
- * @type {?}
2431
- * @private
2432
- */
2433
- Select2.prototype.cdkConnectedOverlay;
2434
- /**
2435
- * @type {?}
2436
- * @private
2437
- */
2438
- Select2.prototype.selection;
2439
- /**
2440
- * @type {?}
2441
- * @private
2442
- */
2443
- Select2.prototype.resultContainer;
2444
- /**
2445
- * @type {?}
2446
- * @private
2447
- */
2448
- Select2.prototype.results;
2449
- /**
2450
- * @type {?}
2451
- * @private
2452
- */
2453
- Select2.prototype.searchInput;
2454
- /**
2455
- * @type {?}
2456
- * @private
2457
- */
2458
- Select2.prototype.dropdown;
2459
- /**
2460
- * @type {?}
2461
- * @private
2462
- */
2463
- Select2.prototype.hoveringValue;
2464
- /**
2465
- * @type {?}
2466
- * @private
2467
- */
2468
- Select2.prototype.innerSearchText;
2469
- /**
2470
- * @type {?}
2471
- * @private
2472
- */
2473
- Select2.prototype.isSearchboxHidden;
2474
- /**
2475
- * @type {?}
2476
- * @private
2477
- */
2478
- Select2.prototype.selectionElement;
2479
- /**
2480
- * @type {?}
2481
- * @private
2482
- */
2483
- Select2.prototype._stateChanges;
2484
- /**
2485
- * Tab index for the element.
2486
- * @type {?}
2487
- * @private
2488
- */
2489
- Select2.prototype._tabIndex;
2490
- /**
2491
- * @type {?}
2492
- * @private
2493
- */
2494
- Select2.prototype._disabled;
2495
- /**
2496
- * @type {?}
2497
- * @private
2498
- */
2499
- Select2.prototype._required;
2500
- /**
2501
- * @type {?}
2502
- * @private
2503
- */
2504
- Select2.prototype._readonly;
2505
- /**
2506
- * @type {?}
2507
- * @private
2508
- */
2509
- Select2.prototype._multiple;
2510
- /**
2511
- * @type {?}
2512
- * @private
2513
- */
2514
- Select2.prototype._overlay;
2515
- /**
2516
- * @type {?}
2517
- * @private
2518
- */
2519
- Select2.prototype._resettable;
2520
- /**
2521
- * @type {?}
2522
- * @private
2523
- */
2524
- Select2.prototype._hideSelectedItems;
2525
- /**
2526
- * @type {?}
2527
- * @private
2528
- */
2529
- Select2.prototype._clickDetection;
2530
- /**
2531
- * @type {?}
2532
- * @private
2533
- */
2534
- Select2.prototype._clickDetectionFc;
2535
- /**
2536
- * @type {?}
2537
- * @private
2538
- */
2539
- Select2.prototype._id;
2540
- /**
2541
- * @type {?}
2542
- * @private
2543
- */
2544
- Select2.prototype._uid;
2545
- /**
2546
- * @type {?}
2547
- * @private
2548
- */
2549
- Select2.prototype._value;
2550
- /**
2551
- * @type {?}
2552
- * @private
2553
- */
2554
- Select2.prototype._previousNativeValue;
2555
- /**
2556
- * @type {?}
2557
- * @private
2558
- */
2559
- Select2.prototype._infiniteScroll;
2560
- /**
2561
- * @type {?}
2562
- * @private
2563
- */
2564
- Select2.prototype._overlayPosition;
2565
- /**
2566
- * View -> model callback called when select has been touched
2567
- * @type {?}
2568
- * @private
2569
- */
2570
- Select2.prototype._onTouched;
2571
- /**
2572
- * View -> model callback called when value changes
2573
- * @type {?}
2574
- * @private
2575
- */
2576
- Select2.prototype._onChange;
2577
- /**
2578
- * @type {?}
2579
- * @protected
2580
- */
2581
- Select2.prototype._viewportRuler;
2582
- /**
2583
- * @type {?}
2584
- * @private
2585
- */
2586
- Select2.prototype._changeDetectorRef;
2587
- /**
2588
- * @type {?}
2589
- * @private
2590
- */
2591
- Select2.prototype._parentForm;
2592
- /**
2593
- * @type {?}
2594
- * @private
2595
- */
2596
- Select2.prototype._parentFormGroup;
2597
- /** @type {?} */
2598
- Select2.prototype._control;
2599
- }
2600
-
2601
- /**
2602
- * @fileoverview added by tsickle
2603
- * Generated from: lib/select2-hint.component.ts
2604
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2605
- */
2606
- var Select2Hint = /** @class */ (function () {
2607
- function Select2Hint() {
2608
- }
2609
- return Select2Hint;
2610
- }());
2611
- Select2Hint.decorators = [
2612
- { type: core.Directive, args: [{ selector: 'select2-hint' },] }
2613
- ];
2614
-
2615
- /**
2616
- * @fileoverview added by tsickle
2617
- * Generated from: lib/select2-label.component.ts
2618
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2619
- */
2620
- var Select2Label = /** @class */ (function () {
2621
- function Select2Label() {
2622
- }
2623
- return Select2Label;
2624
- }());
2625
- Select2Label.decorators = [
2626
- { type: core.Directive, args: [{ selector: 'select2-label' },] }
2627
- ];
2628
-
2629
- /**
2630
- * @fileoverview added by tsickle
2631
- * Generated from: lib/select2.module.ts
2632
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2633
- */
2634
- var Select2Module = /** @class */ (function () {
2635
- function Select2Module() {
2636
- }
2637
- return Select2Module;
2638
- }());
2639
- Select2Module.decorators = [
2640
- { type: core.NgModule, args: [{
2641
- imports: [common.CommonModule, forms.FormsModule, overlay.OverlayModule, forms.ReactiveFormsModule, ngxInfiniteScroll.InfiniteScrollModule],
2642
- declarations: [Select2Hint, Select2Label, Select2],
2643
- exports: [forms.FormsModule, forms.ReactiveFormsModule, Select2Hint, Select2Label, Select2],
2644
- },] }
2645
- ];
2646
-
2647
- /**
2648
- * @fileoverview added by tsickle
2649
- * Generated from: ng-select2-component.ts
2650
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2651
- */
2652
-
2653
- exports.Select2 = Select2;
2654
- exports.Select2Hint = Select2Hint;
2655
- exports.Select2Label = Select2Label;
2656
- exports.Select2Module = Select2Module;
2657
- exports.Select2Utils = Select2Utils;
2658
- exports.defaultMinCountForSearch = defaultMinCountForSearch;
2659
- exports.protectRegexp = protectRegexp;
2660
- exports.timeout = timeout;
2661
- exports.unicodePatterns = unicodePatterns;
2662
-
2663
- Object.defineProperty(exports, '__esModule', { value: true });
2664
-
2665
- })));
2666
- //# sourceMappingURL=ng-select2-component.umd.js.map