@taiga-ui/core 3.69.0 → 3.70.0-canary.e02fd1e

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/bundles/taiga-ui-core-abstract.umd.js +671 -525
  2. package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
  3. package/bundles/taiga-ui-core-components-alert.umd.js +152 -6
  4. package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
  5. package/bundles/taiga-ui-core-components-button.umd.js +668 -522
  6. package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
  7. package/bundles/taiga-ui-core-components-data-list.umd.js +819 -673
  8. package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
  9. package/bundles/taiga-ui-core-components-dialog.umd.js +152 -6
  10. package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
  11. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +928 -782
  12. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
  13. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +605 -459
  14. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
  15. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +1175 -1029
  16. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  17. package/bundles/taiga-ui-core-components-root.umd.js +607 -461
  18. package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
  19. package/bundles/taiga-ui-core-components-scroll-controls.umd.js +152 -6
  20. package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
  21. package/bundles/taiga-ui-core-components-svg.umd.js +152 -6
  22. package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
  23. package/bundles/taiga-ui-core-components-theme-night.umd.js +520 -374
  24. package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
  25. package/bundles/taiga-ui-core-components-tooltip.umd.js +595 -449
  26. package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
  27. package/bundles/taiga-ui-core-directives-dropdown.umd.js +1579 -1433
  28. package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
  29. package/bundles/taiga-ui-core-directives-hint.umd.js +1287 -1141
  30. package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
  31. package/bundles/taiga-ui-core-directives-mode.umd.js +521 -375
  32. package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
  33. package/bundles/taiga-ui-core-directives-number-format.umd.js +543 -397
  34. package/bundles/taiga-ui-core-directives-number-format.umd.js.map +1 -1
  35. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +152 -6
  36. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
  37. package/bundles/taiga-ui-core-pipes-order-week-days.umd.js +530 -384
  38. package/bundles/taiga-ui-core-pipes-order-week-days.umd.js.map +1 -1
  39. package/bundles/taiga-ui-core-services.umd.js +780 -634
  40. package/bundles/taiga-ui-core-services.umd.js.map +1 -1
  41. package/bundles/taiga-ui-core-tokens.umd.js +152 -6
  42. package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
  43. package/bundles/taiga-ui-core-utils-format.umd.js +152 -6
  44. package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
  45. package/bundles/taiga-ui-core-utils-mask.umd.js +152 -6
  46. package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
  47. package/constants/cache-basting-payload.d.ts +1 -1
  48. package/esm2015/components/root/root.component.js +1 -1
  49. package/fesm2015/taiga-ui-core-components-root.js +1 -1
  50. package/package.json +42 -42
@@ -1,1463 +1,1609 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ng-web-apis/common'), require('@taiga-ui/cdk'), require('@taiga-ui/core/abstract'), require('@taiga-ui/core/animations'), require('@taiga-ui/core/providers'), require('@taiga-ui/core/services'), require('@taiga-ui/core/tokens'), require('rxjs/operators'), require('@taiga-ui/core/utils'), require('@tinkoff/ng-polymorpheus'), require('rxjs'), require('@taiga-ui/core/components/scrollbar'), require('@tinkoff/ng-event-plugins'), require('@angular/common')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/core/directives/dropdown', ['exports', '@angular/core', '@ng-web-apis/common', '@taiga-ui/cdk', '@taiga-ui/core/abstract', '@taiga-ui/core/animations', '@taiga-ui/core/providers', '@taiga-ui/core/services', '@taiga-ui/core/tokens', 'rxjs/operators', '@taiga-ui/core/utils', '@tinkoff/ng-polymorpheus', 'rxjs', '@taiga-ui/core/components/scrollbar', '@tinkoff/ng-event-plugins', '@angular/common'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].core = global["taiga-ui"].core || {}, global["taiga-ui"].core.directives = global["taiga-ui"].core.directives || {}, global["taiga-ui"].core.directives.dropdown = {}), global.ng.core, global.common, global.i2, global["taiga-ui"].core.abstract, global["taiga-ui"].core.animations, global["taiga-ui"].core.providers, global["taiga-ui"].core.services, global["taiga-ui"].core.tokens, global.rxjs.operators, global["taiga-ui"].core.utils, global.i3, global.rxjs, global["taiga-ui"].core.components.scrollbar, global.ngEventPlugins, global.ng.common));
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ng-web-apis/common'), require('@taiga-ui/cdk'), require('@taiga-ui/core/abstract'), require('@taiga-ui/core/animations'), require('@taiga-ui/core/providers'), require('@taiga-ui/core/services'), require('@taiga-ui/core/tokens'), require('rxjs/operators'), require('@taiga-ui/core/utils'), require('@tinkoff/ng-polymorpheus'), require('rxjs'), require('@taiga-ui/core/components/scrollbar'), require('@tinkoff/ng-event-plugins'), require('@angular/common')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/core/directives/dropdown', ['exports', '@angular/core', '@ng-web-apis/common', '@taiga-ui/cdk', '@taiga-ui/core/abstract', '@taiga-ui/core/animations', '@taiga-ui/core/providers', '@taiga-ui/core/services', '@taiga-ui/core/tokens', 'rxjs/operators', '@taiga-ui/core/utils', '@tinkoff/ng-polymorpheus', 'rxjs', '@taiga-ui/core/components/scrollbar', '@tinkoff/ng-event-plugins', '@angular/common'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].core = global["taiga-ui"].core || {}, global["taiga-ui"].core.directives = global["taiga-ui"].core.directives || {}, global["taiga-ui"].core.directives.dropdown = {}), global.ng.core, global.common, global.i2, global["taiga-ui"].core.abstract, global["taiga-ui"].core.animations, global["taiga-ui"].core.providers, global["taiga-ui"].core.services, global["taiga-ui"].core.tokens, global.rxjs.operators, global["taiga-ui"].core.utils, global.i3, global.rxjs, global["taiga-ui"].core.components.scrollbar, global.ngEventPlugins, global.ng.common));
5
5
  })(this, (function (exports, i0, common, i2, i1$1, animations, providers, i4, tokens, operators, utils, i3, i1, i1$2, ngEventPlugins, common$1) { 'use strict';
6
6
 
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () { return e[k]; }
17
- });
18
- }
19
- });
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
20
18
  }
21
- n["default"] = e;
22
- return Object.freeze(n);
19
+ });
23
20
  }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
24
24
 
25
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
27
- var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$1);
28
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
29
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
30
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
31
- var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$2);
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
27
+ var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$1);
28
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
29
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
30
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
31
+ var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$2);
32
32
 
33
- /*! *****************************************************************************
34
- Copyright (c) Microsoft Corporation.
33
+ /******************************************************************************
34
+ Copyright (c) Microsoft Corporation.
35
35
 
36
- Permission to use, copy, modify, and/or distribute this software for any
37
- purpose with or without fee is hereby granted.
36
+ Permission to use, copy, modify, and/or distribute this software for any
37
+ purpose with or without fee is hereby granted.
38
38
 
39
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
40
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
41
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
42
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
43
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
44
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
45
- PERFORMANCE OF THIS SOFTWARE.
46
- ***************************************************************************** */
47
- /* global Reflect, Promise */
48
- var extendStatics = function (d, b) {
49
- extendStatics = Object.setPrototypeOf ||
50
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51
- function (d, b) { for (var p in b)
52
- if (Object.prototype.hasOwnProperty.call(b, p))
53
- d[p] = b[p]; };
54
- return extendStatics(d, b);
55
- };
56
- function __extends(d, b) {
57
- if (typeof b !== "function" && b !== null)
58
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
59
- extendStatics(d, b);
60
- function __() { this.constructor = d; }
61
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
62
- }
63
- var __assign = function () {
64
- __assign = Object.assign || function __assign(t) {
65
- for (var s, i = 1, n = arguments.length; i < n; i++) {
66
- s = arguments[i];
67
- for (var p in s)
68
- if (Object.prototype.hasOwnProperty.call(s, p))
69
- t[p] = s[p];
70
- }
71
- return t;
72
- };
73
- return __assign.apply(this, arguments);
74
- };
75
- function __rest(s, e) {
76
- var t = {};
77
- for (var p in s)
78
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
79
- t[p] = s[p];
80
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
81
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
82
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
83
- t[p[i]] = s[p[i]];
84
- }
85
- return t;
86
- }
87
- function __decorate(decorators, target, key, desc) {
88
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
89
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
90
- r = Reflect.decorate(decorators, target, key, desc);
91
- else
92
- for (var i = decorators.length - 1; i >= 0; i--)
93
- if (d = decorators[i])
94
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
95
- return c > 3 && r && Object.defineProperty(target, key, r), r;
96
- }
97
- function __param(paramIndex, decorator) {
98
- return function (target, key) { decorator(target, key, paramIndex); };
99
- }
100
- function __metadata(metadataKey, metadataValue) {
101
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
102
- return Reflect.metadata(metadataKey, metadataValue);
103
- }
104
- function __awaiter(thisArg, _arguments, P, generator) {
105
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
106
- return new (P || (P = Promise))(function (resolve, reject) {
107
- function fulfilled(value) { try {
108
- step(generator.next(value));
109
- }
110
- catch (e) {
111
- reject(e);
112
- } }
113
- function rejected(value) { try {
114
- step(generator["throw"](value));
115
- }
116
- catch (e) {
117
- reject(e);
118
- } }
119
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
120
- step((generator = generator.apply(thisArg, _arguments || [])).next());
121
- });
122
- }
123
- function __generator(thisArg, body) {
124
- var _ = { label: 0, sent: function () { if (t[0] & 1)
125
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
126
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
127
- function verb(n) { return function (v) { return step([n, v]); }; }
128
- function step(op) {
129
- if (f)
130
- throw new TypeError("Generator is already executing.");
131
- while (_)
132
- try {
133
- 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)
134
- return t;
135
- if (y = 0, t)
136
- op = [op[0] & 2, t.value];
137
- switch (op[0]) {
138
- case 0:
139
- case 1:
140
- t = op;
141
- break;
142
- case 4:
143
- _.label++;
144
- return { value: op[1], done: false };
145
- case 5:
146
- _.label++;
147
- y = op[1];
148
- op = [0];
149
- continue;
150
- case 7:
151
- op = _.ops.pop();
152
- _.trys.pop();
153
- continue;
154
- default:
155
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
156
- _ = 0;
157
- continue;
158
- }
159
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
160
- _.label = op[1];
161
- break;
162
- }
163
- if (op[0] === 6 && _.label < t[1]) {
164
- _.label = t[1];
165
- t = op;
166
- break;
167
- }
168
- if (t && _.label < t[2]) {
169
- _.label = t[2];
170
- _.ops.push(op);
171
- break;
172
- }
173
- if (t[2])
174
- _.ops.pop();
175
- _.trys.pop();
176
- continue;
177
- }
178
- op = body.call(thisArg, _);
179
- }
180
- catch (e) {
181
- op = [6, e];
182
- y = 0;
183
- }
184
- finally {
185
- f = t = 0;
186
- }
187
- if (op[0] & 5)
188
- throw op[1];
189
- return { value: op[0] ? op[1] : void 0, done: true };
190
- }
191
- }
192
- var __createBinding = Object.create ? (function (o, m, k, k2) {
193
- if (k2 === undefined)
194
- k2 = k;
195
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
196
- }) : (function (o, m, k, k2) {
197
- if (k2 === undefined)
198
- k2 = k;
199
- o[k2] = m[k];
200
- });
201
- function __exportStar(m, o) {
202
- for (var p in m)
203
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
204
- __createBinding(o, m, p);
205
- }
206
- function __values(o) {
207
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
208
- if (m)
209
- return m.call(o);
210
- if (o && typeof o.length === "number")
211
- return {
212
- next: function () {
213
- if (o && i >= o.length)
214
- o = void 0;
215
- return { value: o && o[i++], done: !o };
216
- }
217
- };
218
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
219
- }
220
- function __read(o, n) {
221
- var m = typeof Symbol === "function" && o[Symbol.iterator];
222
- if (!m)
223
- return o;
224
- var i = m.call(o), r, ar = [], e;
225
- try {
226
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
227
- ar.push(r.value);
228
- }
229
- catch (error) {
230
- e = { error: error };
231
- }
232
- finally {
233
- try {
234
- if (r && !r.done && (m = i["return"]))
235
- m.call(i);
236
- }
237
- finally {
238
- if (e)
239
- throw e.error;
240
- }
241
- }
242
- return ar;
243
- }
244
- /** @deprecated */
245
- function __spread() {
246
- for (var ar = [], i = 0; i < arguments.length; i++)
247
- ar = ar.concat(__read(arguments[i]));
248
- return ar;
249
- }
250
- /** @deprecated */
251
- function __spreadArrays() {
252
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
253
- s += arguments[i].length;
254
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
255
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
256
- r[k] = a[j];
257
- return r;
258
- }
259
- function __spreadArray(to, from, pack) {
260
- if (pack || arguments.length === 2)
261
- for (var i = 0, l = from.length, ar; i < l; i++) {
262
- if (ar || !(i in from)) {
263
- if (!ar)
264
- ar = Array.prototype.slice.call(from, 0, i);
265
- ar[i] = from[i];
266
- }
267
- }
268
- return to.concat(ar || from);
269
- }
270
- function __await(v) {
271
- return this instanceof __await ? (this.v = v, this) : new __await(v);
272
- }
273
- function __asyncGenerator(thisArg, _arguments, generator) {
274
- if (!Symbol.asyncIterator)
275
- throw new TypeError("Symbol.asyncIterator is not defined.");
276
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
277
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
278
- function verb(n) { if (g[n])
279
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
280
- function resume(n, v) { try {
281
- step(g[n](v));
282
- }
283
- catch (e) {
284
- settle(q[0][3], e);
285
- } }
286
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
287
- function fulfill(value) { resume("next", value); }
288
- function reject(value) { resume("throw", value); }
289
- function settle(f, v) { if (f(v), q.shift(), q.length)
290
- resume(q[0][0], q[0][1]); }
291
- }
292
- function __asyncDelegator(o) {
293
- var i, p;
294
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
295
- 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; }
296
- }
297
- function __asyncValues(o) {
298
- if (!Symbol.asyncIterator)
299
- throw new TypeError("Symbol.asyncIterator is not defined.");
300
- var m = o[Symbol.asyncIterator], i;
301
- 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);
302
- 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); }); }; }
303
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
304
- }
305
- function __makeTemplateObject(cooked, raw) {
306
- if (Object.defineProperty) {
307
- Object.defineProperty(cooked, "raw", { value: raw });
308
- }
309
- else {
310
- cooked.raw = raw;
311
- }
312
- return cooked;
313
- }
314
- ;
315
- var __setModuleDefault = Object.create ? (function (o, v) {
316
- Object.defineProperty(o, "default", { enumerable: true, value: v });
317
- }) : function (o, v) {
318
- o["default"] = v;
319
- };
320
- function __importStar(mod) {
321
- if (mod && mod.__esModule)
322
- return mod;
323
- var result = {};
324
- if (mod != null)
325
- for (var k in mod)
326
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
327
- __createBinding(result, mod, k);
328
- __setModuleDefault(result, mod);
329
- return result;
330
- }
331
- function __importDefault(mod) {
332
- return (mod && mod.__esModule) ? mod : { default: mod };
333
- }
334
- function __classPrivateFieldGet(receiver, state, kind, f) {
335
- if (kind === "a" && !f)
336
- throw new TypeError("Private accessor was defined without a getter");
337
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
338
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
339
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
340
- }
341
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
342
- if (kind === "m")
343
- throw new TypeError("Private method is not writable");
344
- if (kind === "a" && !f)
345
- throw new TypeError("Private accessor was defined without a setter");
346
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
347
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
348
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
349
- }
39
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
40
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
41
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
42
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
43
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
44
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
45
+ PERFORMANCE OF THIS SOFTWARE.
46
+ ***************************************************************************** */
47
+ /* global Reflect, Promise, SuppressedError, Symbol */
48
+ var extendStatics = function (d, b) {
49
+ extendStatics = Object.setPrototypeOf ||
50
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51
+ function (d, b) { for (var p in b)
52
+ if (Object.prototype.hasOwnProperty.call(b, p))
53
+ d[p] = b[p]; };
54
+ return extendStatics(d, b);
55
+ };
56
+ function __extends(d, b) {
57
+ if (typeof b !== "function" && b !== null)
58
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
59
+ extendStatics(d, b);
60
+ function __() { this.constructor = d; }
61
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
62
+ }
63
+ var __assign = function () {
64
+ __assign = Object.assign || function __assign(t) {
65
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
66
+ s = arguments[i];
67
+ for (var p in s)
68
+ if (Object.prototype.hasOwnProperty.call(s, p))
69
+ t[p] = s[p];
70
+ }
71
+ return t;
72
+ };
73
+ return __assign.apply(this, arguments);
74
+ };
75
+ function __rest(s, e) {
76
+ var t = {};
77
+ for (var p in s)
78
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
79
+ t[p] = s[p];
80
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
81
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
82
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
83
+ t[p[i]] = s[p[i]];
84
+ }
85
+ return t;
86
+ }
87
+ function __decorate(decorators, target, key, desc) {
88
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
89
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
90
+ r = Reflect.decorate(decorators, target, key, desc);
91
+ else
92
+ for (var i = decorators.length - 1; i >= 0; i--)
93
+ if (d = decorators[i])
94
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
95
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
96
+ }
97
+ function __param(paramIndex, decorator) {
98
+ return function (target, key) { decorator(target, key, paramIndex); };
99
+ }
100
+ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
101
+ function accept(f) { if (f !== void 0 && typeof f !== "function")
102
+ throw new TypeError("Function expected"); return f; }
103
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
104
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
105
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
106
+ var _, done = false;
107
+ for (var i = decorators.length - 1; i >= 0; i--) {
108
+ var context = {};
109
+ for (var p in contextIn)
110
+ context[p] = p === "access" ? {} : contextIn[p];
111
+ for (var p in contextIn.access)
112
+ context.access[p] = contextIn.access[p];
113
+ context.addInitializer = function (f) { if (done)
114
+ throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
115
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
116
+ if (kind === "accessor") {
117
+ if (result === void 0)
118
+ continue;
119
+ if (result === null || typeof result !== "object")
120
+ throw new TypeError("Object expected");
121
+ if (_ = accept(result.get))
122
+ descriptor.get = _;
123
+ if (_ = accept(result.set))
124
+ descriptor.set = _;
125
+ if (_ = accept(result.init))
126
+ initializers.unshift(_);
127
+ }
128
+ else if (_ = accept(result)) {
129
+ if (kind === "field")
130
+ initializers.unshift(_);
131
+ else
132
+ descriptor[key] = _;
133
+ }
134
+ }
135
+ if (target)
136
+ Object.defineProperty(target, contextIn.name, descriptor);
137
+ done = true;
138
+ }
139
+ ;
140
+ function __runInitializers(thisArg, initializers, value) {
141
+ var useValue = arguments.length > 2;
142
+ for (var i = 0; i < initializers.length; i++) {
143
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
144
+ }
145
+ return useValue ? value : void 0;
146
+ }
147
+ ;
148
+ function __propKey(x) {
149
+ return typeof x === "symbol" ? x : "".concat(x);
150
+ }
151
+ ;
152
+ function __setFunctionName(f, name, prefix) {
153
+ if (typeof name === "symbol")
154
+ name = name.description ? "[".concat(name.description, "]") : "";
155
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
156
+ }
157
+ ;
158
+ function __metadata(metadataKey, metadataValue) {
159
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
160
+ return Reflect.metadata(metadataKey, metadataValue);
161
+ }
162
+ function __awaiter(thisArg, _arguments, P, generator) {
163
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
164
+ return new (P || (P = Promise))(function (resolve, reject) {
165
+ function fulfilled(value) { try {
166
+ step(generator.next(value));
167
+ }
168
+ catch (e) {
169
+ reject(e);
170
+ } }
171
+ function rejected(value) { try {
172
+ step(generator["throw"](value));
173
+ }
174
+ catch (e) {
175
+ reject(e);
176
+ } }
177
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
178
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
179
+ });
180
+ }
181
+ function __generator(thisArg, body) {
182
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
183
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
184
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
185
+ function verb(n) { return function (v) { return step([n, v]); }; }
186
+ function step(op) {
187
+ if (f)
188
+ throw new TypeError("Generator is already executing.");
189
+ while (g && (g = 0, op[0] && (_ = 0)), _)
190
+ try {
191
+ 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)
192
+ return t;
193
+ if (y = 0, t)
194
+ op = [op[0] & 2, t.value];
195
+ switch (op[0]) {
196
+ case 0:
197
+ case 1:
198
+ t = op;
199
+ break;
200
+ case 4:
201
+ _.label++;
202
+ return { value: op[1], done: false };
203
+ case 5:
204
+ _.label++;
205
+ y = op[1];
206
+ op = [0];
207
+ continue;
208
+ case 7:
209
+ op = _.ops.pop();
210
+ _.trys.pop();
211
+ continue;
212
+ default:
213
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
214
+ _ = 0;
215
+ continue;
216
+ }
217
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
218
+ _.label = op[1];
219
+ break;
220
+ }
221
+ if (op[0] === 6 && _.label < t[1]) {
222
+ _.label = t[1];
223
+ t = op;
224
+ break;
225
+ }
226
+ if (t && _.label < t[2]) {
227
+ _.label = t[2];
228
+ _.ops.push(op);
229
+ break;
230
+ }
231
+ if (t[2])
232
+ _.ops.pop();
233
+ _.trys.pop();
234
+ continue;
235
+ }
236
+ op = body.call(thisArg, _);
237
+ }
238
+ catch (e) {
239
+ op = [6, e];
240
+ y = 0;
241
+ }
242
+ finally {
243
+ f = t = 0;
244
+ }
245
+ if (op[0] & 5)
246
+ throw op[1];
247
+ return { value: op[0] ? op[1] : void 0, done: true };
248
+ }
249
+ }
250
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
251
+ if (k2 === undefined)
252
+ k2 = k;
253
+ var desc = Object.getOwnPropertyDescriptor(m, k);
254
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
255
+ desc = { enumerable: true, get: function () { return m[k]; } };
256
+ }
257
+ Object.defineProperty(o, k2, desc);
258
+ }) : (function (o, m, k, k2) {
259
+ if (k2 === undefined)
260
+ k2 = k;
261
+ o[k2] = m[k];
262
+ });
263
+ function __exportStar(m, o) {
264
+ for (var p in m)
265
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
266
+ __createBinding(o, m, p);
267
+ }
268
+ function __values(o) {
269
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
270
+ if (m)
271
+ return m.call(o);
272
+ if (o && typeof o.length === "number")
273
+ return {
274
+ next: function () {
275
+ if (o && i >= o.length)
276
+ o = void 0;
277
+ return { value: o && o[i++], done: !o };
278
+ }
279
+ };
280
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
281
+ }
282
+ function __read(o, n) {
283
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
284
+ if (!m)
285
+ return o;
286
+ var i = m.call(o), r, ar = [], e;
287
+ try {
288
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
289
+ ar.push(r.value);
290
+ }
291
+ catch (error) {
292
+ e = { error: error };
293
+ }
294
+ finally {
295
+ try {
296
+ if (r && !r.done && (m = i["return"]))
297
+ m.call(i);
298
+ }
299
+ finally {
300
+ if (e)
301
+ throw e.error;
302
+ }
303
+ }
304
+ return ar;
305
+ }
306
+ /** @deprecated */
307
+ function __spread() {
308
+ for (var ar = [], i = 0; i < arguments.length; i++)
309
+ ar = ar.concat(__read(arguments[i]));
310
+ return ar;
311
+ }
312
+ /** @deprecated */
313
+ function __spreadArrays() {
314
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
315
+ s += arguments[i].length;
316
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
317
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
318
+ r[k] = a[j];
319
+ return r;
320
+ }
321
+ function __spreadArray(to, from, pack) {
322
+ if (pack || arguments.length === 2)
323
+ for (var i = 0, l = from.length, ar; i < l; i++) {
324
+ if (ar || !(i in from)) {
325
+ if (!ar)
326
+ ar = Array.prototype.slice.call(from, 0, i);
327
+ ar[i] = from[i];
328
+ }
329
+ }
330
+ return to.concat(ar || Array.prototype.slice.call(from));
331
+ }
332
+ function __await(v) {
333
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
334
+ }
335
+ function __asyncGenerator(thisArg, _arguments, generator) {
336
+ if (!Symbol.asyncIterator)
337
+ throw new TypeError("Symbol.asyncIterator is not defined.");
338
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
339
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
340
+ function verb(n) { if (g[n])
341
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
342
+ function resume(n, v) { try {
343
+ step(g[n](v));
344
+ }
345
+ catch (e) {
346
+ settle(q[0][3], e);
347
+ } }
348
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
349
+ function fulfill(value) { resume("next", value); }
350
+ function reject(value) { resume("throw", value); }
351
+ function settle(f, v) { if (f(v), q.shift(), q.length)
352
+ resume(q[0][0], q[0][1]); }
353
+ }
354
+ function __asyncDelegator(o) {
355
+ var i, p;
356
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
357
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
358
+ }
359
+ function __asyncValues(o) {
360
+ if (!Symbol.asyncIterator)
361
+ throw new TypeError("Symbol.asyncIterator is not defined.");
362
+ var m = o[Symbol.asyncIterator], i;
363
+ 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);
364
+ 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); }); }; }
365
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
366
+ }
367
+ function __makeTemplateObject(cooked, raw) {
368
+ if (Object.defineProperty) {
369
+ Object.defineProperty(cooked, "raw", { value: raw });
370
+ }
371
+ else {
372
+ cooked.raw = raw;
373
+ }
374
+ return cooked;
375
+ }
376
+ ;
377
+ var __setModuleDefault = Object.create ? (function (o, v) {
378
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
379
+ }) : function (o, v) {
380
+ o["default"] = v;
381
+ };
382
+ function __importStar(mod) {
383
+ if (mod && mod.__esModule)
384
+ return mod;
385
+ var result = {};
386
+ if (mod != null)
387
+ for (var k in mod)
388
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
389
+ __createBinding(result, mod, k);
390
+ __setModuleDefault(result, mod);
391
+ return result;
392
+ }
393
+ function __importDefault(mod) {
394
+ return (mod && mod.__esModule) ? mod : { default: mod };
395
+ }
396
+ function __classPrivateFieldGet(receiver, state, kind, f) {
397
+ if (kind === "a" && !f)
398
+ throw new TypeError("Private accessor was defined without a getter");
399
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
400
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
401
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
402
+ }
403
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
404
+ if (kind === "m")
405
+ throw new TypeError("Private method is not writable");
406
+ if (kind === "a" && !f)
407
+ throw new TypeError("Private accessor was defined without a setter");
408
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
409
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
410
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
411
+ }
412
+ function __classPrivateFieldIn(state, receiver) {
413
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
414
+ throw new TypeError("Cannot use 'in' operator on non-object");
415
+ return typeof state === "function" ? receiver === state : state.has(receiver);
416
+ }
417
+ function __addDisposableResource(env, value, async) {
418
+ if (value !== null && value !== void 0) {
419
+ if (typeof value !== "object" && typeof value !== "function")
420
+ throw new TypeError("Object expected.");
421
+ var dispose;
422
+ if (async) {
423
+ if (!Symbol.asyncDispose)
424
+ throw new TypeError("Symbol.asyncDispose is not defined.");
425
+ dispose = value[Symbol.asyncDispose];
426
+ }
427
+ if (dispose === void 0) {
428
+ if (!Symbol.dispose)
429
+ throw new TypeError("Symbol.dispose is not defined.");
430
+ dispose = value[Symbol.dispose];
431
+ }
432
+ if (typeof dispose !== "function")
433
+ throw new TypeError("Object not disposable.");
434
+ env.stack.push({ value: value, dispose: dispose, async: async });
435
+ }
436
+ else if (async) {
437
+ env.stack.push({ async: true });
438
+ }
439
+ return value;
440
+ }
441
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
442
+ var e = new Error(message);
443
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
444
+ };
445
+ function __disposeResources(env) {
446
+ function fail(e) {
447
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
448
+ env.hasError = true;
449
+ }
450
+ function next() {
451
+ while (env.stack.length) {
452
+ var rec = env.stack.pop();
453
+ try {
454
+ var result = rec.dispose && rec.dispose.call(rec.value);
455
+ if (rec.async)
456
+ return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
457
+ }
458
+ catch (e) {
459
+ fail(e);
460
+ }
461
+ }
462
+ if (env.hasError)
463
+ throw env.error;
464
+ }
465
+ return next();
466
+ }
467
+ var tslib_es6 = {
468
+ __extends: __extends,
469
+ __assign: __assign,
470
+ __rest: __rest,
471
+ __decorate: __decorate,
472
+ __param: __param,
473
+ __metadata: __metadata,
474
+ __awaiter: __awaiter,
475
+ __generator: __generator,
476
+ __createBinding: __createBinding,
477
+ __exportStar: __exportStar,
478
+ __values: __values,
479
+ __read: __read,
480
+ __spread: __spread,
481
+ __spreadArrays: __spreadArrays,
482
+ __spreadArray: __spreadArray,
483
+ __await: __await,
484
+ __asyncGenerator: __asyncGenerator,
485
+ __asyncDelegator: __asyncDelegator,
486
+ __asyncValues: __asyncValues,
487
+ __makeTemplateObject: __makeTemplateObject,
488
+ __importStar: __importStar,
489
+ __importDefault: __importDefault,
490
+ __classPrivateFieldGet: __classPrivateFieldGet,
491
+ __classPrivateFieldSet: __classPrivateFieldSet,
492
+ __classPrivateFieldIn: __classPrivateFieldIn,
493
+ __addDisposableResource: __addDisposableResource,
494
+ __disposeResources: __disposeResources,
495
+ };
350
496
 
351
- /**
352
- * A component to display a dropdown
353
- */
354
- var TUI_DROPDOWN_COMPONENT = i2.tuiCreateTokenFromFactory(function () { return TuiDropdownComponent; });
497
+ /**
498
+ * A component to display a dropdown
499
+ */
500
+ var TUI_DROPDOWN_COMPONENT = i2.tuiCreateTokenFromFactory(function () { return TuiDropdownComponent; });
355
501
 
356
- var TuiDropdownOpenDirective = /** @class */ (function () {
357
- function TuiDropdownOpenDirective() {
358
- this.tuiDropdownOpen = false;
359
- this.tuiDropdownOpenChange = new i0.EventEmitter();
360
- }
361
- TuiDropdownOpenDirective.prototype.update = function (open) {
362
- this.tuiDropdownOpen = open;
363
- this.tuiDropdownOpenChange.emit(open);
364
- };
365
- TuiDropdownOpenDirective.prototype.ngOnChanges = function () {
366
- var _a;
367
- (_a = this.dropdown) === null || _a === void 0 ? void 0 : _a.toggle(this.tuiDropdownOpen);
368
- };
369
- return TuiDropdownOpenDirective;
370
- }());
371
- TuiDropdownOpenDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownOpenDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
372
- TuiDropdownOpenDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownOpenDirective, selector: "[tuiDropdownOpen],[tuiDropdownOpenChange]", inputs: { tuiDropdownOpen: "tuiDropdownOpen" }, outputs: { tuiDropdownOpenChange: "tuiDropdownOpenChange" }, usesOnChanges: true, ngImport: i0__namespace });
373
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownOpenDirective, decorators: [{
374
- type: i0.Directive,
375
- args: [{
376
- selector: '[tuiDropdownOpen],[tuiDropdownOpenChange]',
377
- }]
378
- }], propDecorators: { tuiDropdownOpen: [{
379
- type: i0.Input
380
- }], tuiDropdownOpenChange: [{
381
- type: i0.Output
382
- }] } });
502
+ var TuiDropdownOpenDirective = /** @class */ (function () {
503
+ function TuiDropdownOpenDirective() {
504
+ this.tuiDropdownOpen = false;
505
+ this.tuiDropdownOpenChange = new i0.EventEmitter();
506
+ }
507
+ TuiDropdownOpenDirective.prototype.update = function (open) {
508
+ this.tuiDropdownOpen = open;
509
+ this.tuiDropdownOpenChange.emit(open);
510
+ };
511
+ TuiDropdownOpenDirective.prototype.ngOnChanges = function () {
512
+ var _a;
513
+ (_a = this.dropdown) === null || _a === void 0 ? void 0 : _a.toggle(this.tuiDropdownOpen);
514
+ };
515
+ return TuiDropdownOpenDirective;
516
+ }());
517
+ TuiDropdownOpenDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownOpenDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
518
+ TuiDropdownOpenDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownOpenDirective, selector: "[tuiDropdownOpen],[tuiDropdownOpenChange]", inputs: { tuiDropdownOpen: "tuiDropdownOpen" }, outputs: { tuiDropdownOpenChange: "tuiDropdownOpenChange" }, usesOnChanges: true, ngImport: i0__namespace });
519
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownOpenDirective, decorators: [{
520
+ type: i0.Directive,
521
+ args: [{
522
+ selector: '[tuiDropdownOpen],[tuiDropdownOpenChange]',
523
+ }]
524
+ }], propDecorators: { tuiDropdownOpen: [{
525
+ type: i0.Input
526
+ }], tuiDropdownOpenChange: [{
527
+ type: i0.Output
528
+ }] } });
383
529
 
384
- var TuiDropdownDirective = /** @class */ (function () {
385
- function TuiDropdownDirective(destroy$, el, dropdown, injector, dropdownService, open) {
386
- var _this = this;
387
- this.el = el;
388
- this.dropdown = dropdown;
389
- this.injector = injector;
390
- this.dropdownService = dropdownService;
391
- this.open = open;
392
- this.refresh$ = new i1.Subject();
393
- this.dropdownBoxRef = null;
394
- this.type = 'dropdown';
395
- this.component = new i3.PolymorpheusComponent(this.dropdown, this.injector);
396
- if (this.open && !this.open.dropdown) {
397
- this.open.dropdown = this;
398
- }
399
- else {
400
- this.open = null;
401
- }
402
- // Ignore multiple change detection triggers at the same frame
403
- this.refresh$.pipe(operators.throttleTime(0), operators.takeUntil(destroy$)).subscribe(function () {
404
- var _a, _b;
405
- (_a = _this.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.changeDetectorRef.detectChanges();
406
- (_b = _this.dropdownBoxRef) === null || _b === void 0 ? void 0 : _b.changeDetectorRef.markForCheck();
407
- });
408
- }
409
- Object.defineProperty(TuiDropdownDirective.prototype, "position", {
410
- get: function () {
411
- return utils.tuiCheckFixedPosition(this.el.nativeElement) ? 'fixed' : 'absolute';
412
- },
413
- enumerable: false,
414
- configurable: true
415
- });
416
- TuiDropdownDirective.prototype.ngAfterViewChecked = function () {
417
- this.refresh$.next();
418
- };
419
- TuiDropdownDirective.prototype.ngAfterViewInit = function () {
420
- if (this.open) {
421
- this.toggle(this.open.tuiDropdownOpen);
422
- }
423
- };
424
- TuiDropdownDirective.prototype.ngOnChanges = function () {
425
- if (!this.content) {
426
- this.toggle(false);
427
- }
428
- };
429
- TuiDropdownDirective.prototype.ngOnDestroy = function () {
430
- this.toggle(false);
431
- if (this.open) {
432
- this.open.dropdown = undefined;
433
- }
434
- };
435
- TuiDropdownDirective.prototype.getClientRect = function () {
436
- return this.el.nativeElement.getBoundingClientRect();
437
- };
438
- TuiDropdownDirective.prototype.toggle = function (show) {
439
- var _a, _b;
440
- if (show && this.content && !this.dropdownBoxRef) {
441
- this.dropdownBoxRef = this.dropdownService.add(this.component);
442
- (_a = this.open) === null || _a === void 0 ? void 0 : _a.update(true);
443
- }
444
- else if (!show && this.dropdownBoxRef) {
445
- this.dropdownService.remove(this.dropdownBoxRef);
446
- this.dropdownBoxRef = null;
447
- (_b = this.open) === null || _b === void 0 ? void 0 : _b.update(false);
448
- }
449
- };
450
- return TuiDropdownDirective;
451
- }());
452
- TuiDropdownDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDirective, deps: [{ token: i2.TuiDestroyService, self: true }, { token: i0.ElementRef }, { token: TUI_DROPDOWN_COMPONENT }, { token: i0.INJECTOR }, { token: i2.TuiDropdownPortalService }, { token: TuiDropdownOpenDirective, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
453
- TuiDropdownDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container)", inputs: { content: ["tuiDropdown", "content"] }, providers: [
454
- i2.TuiDestroyService,
455
- i1$1.tuiAsRectAccessor(TuiDropdownDirective),
456
- i1$1.tuiAsVehicle(TuiDropdownDirective),
457
- ], exportAs: ["tuiDropdown"], usesOnChanges: true, ngImport: i0__namespace });
458
- __decorate([
459
- i2.tuiPure
460
- ], TuiDropdownDirective.prototype, "position", null);
461
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDirective, decorators: [{
462
- type: i0.Directive,
463
- args: [{
464
- selector: '[tuiDropdown]:not(ng-container)',
465
- providers: [
466
- i2.TuiDestroyService,
467
- i1$1.tuiAsRectAccessor(TuiDropdownDirective),
468
- i1$1.tuiAsVehicle(TuiDropdownDirective),
469
- ],
470
- exportAs: 'tuiDropdown',
471
- }]
472
- }], ctorParameters: function () {
473
- return [{ type: i1__namespace.Observable, decorators: [{
474
- type: i0.Self
475
- }, {
476
- type: i0.Inject,
477
- args: [i2.TuiDestroyService]
478
- }] }, { type: i0__namespace.ElementRef, decorators: [{
479
- type: i0.Inject,
480
- args: [i0.ElementRef]
481
- }] }, { type: i0__namespace.Type, decorators: [{
482
- type: i0.Inject,
483
- args: [TUI_DROPDOWN_COMPONENT]
484
- }] }, { type: i0__namespace.Injector, decorators: [{
485
- type: i0.Inject,
486
- args: [i0.INJECTOR]
487
- }] }, { type: i2__namespace.TuiDropdownPortalService, decorators: [{
488
- type: i0.Inject,
489
- args: [i2.TuiDropdownPortalService]
490
- }] }, { type: TuiDropdownOpenDirective, decorators: [{
491
- type: i0.Optional
492
- }, {
493
- type: i0.Inject,
494
- args: [TuiDropdownOpenDirective]
495
- }] }];
496
- }, propDecorators: { content: [{
497
- type: i0.Input,
498
- args: ['tuiDropdown']
499
- }], position: [] } });
530
+ var TuiDropdownDirective = /** @class */ (function () {
531
+ function TuiDropdownDirective(destroy$, el, dropdown, injector, dropdownService, open) {
532
+ var _this = this;
533
+ this.el = el;
534
+ this.dropdown = dropdown;
535
+ this.injector = injector;
536
+ this.dropdownService = dropdownService;
537
+ this.open = open;
538
+ this.refresh$ = new i1.Subject();
539
+ this.dropdownBoxRef = null;
540
+ this.type = 'dropdown';
541
+ this.component = new i3.PolymorpheusComponent(this.dropdown, this.injector);
542
+ if (this.open && !this.open.dropdown) {
543
+ this.open.dropdown = this;
544
+ }
545
+ else {
546
+ this.open = null;
547
+ }
548
+ // Ignore multiple change detection triggers at the same frame
549
+ this.refresh$.pipe(operators.throttleTime(0), operators.takeUntil(destroy$)).subscribe(function () {
550
+ var _a, _b;
551
+ (_a = _this.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.changeDetectorRef.detectChanges();
552
+ (_b = _this.dropdownBoxRef) === null || _b === void 0 ? void 0 : _b.changeDetectorRef.markForCheck();
553
+ });
554
+ }
555
+ Object.defineProperty(TuiDropdownDirective.prototype, "position", {
556
+ get: function () {
557
+ return utils.tuiCheckFixedPosition(this.el.nativeElement) ? 'fixed' : 'absolute';
558
+ },
559
+ enumerable: false,
560
+ configurable: true
561
+ });
562
+ TuiDropdownDirective.prototype.ngAfterViewChecked = function () {
563
+ this.refresh$.next();
564
+ };
565
+ TuiDropdownDirective.prototype.ngAfterViewInit = function () {
566
+ if (this.open) {
567
+ this.toggle(this.open.tuiDropdownOpen);
568
+ }
569
+ };
570
+ TuiDropdownDirective.prototype.ngOnChanges = function () {
571
+ if (!this.content) {
572
+ this.toggle(false);
573
+ }
574
+ };
575
+ TuiDropdownDirective.prototype.ngOnDestroy = function () {
576
+ this.toggle(false);
577
+ if (this.open) {
578
+ this.open.dropdown = undefined;
579
+ }
580
+ };
581
+ TuiDropdownDirective.prototype.getClientRect = function () {
582
+ return this.el.nativeElement.getBoundingClientRect();
583
+ };
584
+ TuiDropdownDirective.prototype.toggle = function (show) {
585
+ var _a, _b;
586
+ if (show && this.content && !this.dropdownBoxRef) {
587
+ this.dropdownBoxRef = this.dropdownService.add(this.component);
588
+ (_a = this.open) === null || _a === void 0 ? void 0 : _a.update(true);
589
+ }
590
+ else if (!show && this.dropdownBoxRef) {
591
+ this.dropdownService.remove(this.dropdownBoxRef);
592
+ this.dropdownBoxRef = null;
593
+ (_b = this.open) === null || _b === void 0 ? void 0 : _b.update(false);
594
+ }
595
+ };
596
+ return TuiDropdownDirective;
597
+ }());
598
+ TuiDropdownDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDirective, deps: [{ token: i2.TuiDestroyService, self: true }, { token: i0.ElementRef }, { token: TUI_DROPDOWN_COMPONENT }, { token: i0.INJECTOR }, { token: i2.TuiDropdownPortalService }, { token: TuiDropdownOpenDirective, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
599
+ TuiDropdownDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container)", inputs: { content: ["tuiDropdown", "content"] }, providers: [
600
+ i2.TuiDestroyService,
601
+ i1$1.tuiAsRectAccessor(TuiDropdownDirective),
602
+ i1$1.tuiAsVehicle(TuiDropdownDirective),
603
+ ], exportAs: ["tuiDropdown"], usesOnChanges: true, ngImport: i0__namespace });
604
+ __decorate([
605
+ i2.tuiPure
606
+ ], TuiDropdownDirective.prototype, "position", null);
607
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDirective, decorators: [{
608
+ type: i0.Directive,
609
+ args: [{
610
+ selector: '[tuiDropdown]:not(ng-container)',
611
+ providers: [
612
+ i2.TuiDestroyService,
613
+ i1$1.tuiAsRectAccessor(TuiDropdownDirective),
614
+ i1$1.tuiAsVehicle(TuiDropdownDirective),
615
+ ],
616
+ exportAs: 'tuiDropdown',
617
+ }]
618
+ }], ctorParameters: function () {
619
+ return [{ type: i1__namespace.Observable, decorators: [{
620
+ type: i0.Self
621
+ }, {
622
+ type: i0.Inject,
623
+ args: [i2.TuiDestroyService]
624
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
625
+ type: i0.Inject,
626
+ args: [i0.ElementRef]
627
+ }] }, { type: i0__namespace.Type, decorators: [{
628
+ type: i0.Inject,
629
+ args: [TUI_DROPDOWN_COMPONENT]
630
+ }] }, { type: i0__namespace.Injector, decorators: [{
631
+ type: i0.Inject,
632
+ args: [i0.INJECTOR]
633
+ }] }, { type: i2__namespace.TuiDropdownPortalService, decorators: [{
634
+ type: i0.Inject,
635
+ args: [i2.TuiDropdownPortalService]
636
+ }] }, { type: TuiDropdownOpenDirective, decorators: [{
637
+ type: i0.Optional
638
+ }, {
639
+ type: i0.Inject,
640
+ args: [TuiDropdownOpenDirective]
641
+ }] }];
642
+ }, propDecorators: { content: [{
643
+ type: i0.Input,
644
+ args: ['tuiDropdown']
645
+ }], position: [] } });
500
646
 
501
- /** Default values for hint options */
502
- var TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS = {
503
- showDelay: 200,
504
- hideDelay: 500,
505
- };
506
- /**
507
- * Default parameters for dropdown hover directive
508
- */
509
- var TUI_DROPDOWN_HOVER_OPTIONS = i2.tuiCreateToken(TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS);
510
- function tuiDropdownHoverOptionsProvider(options) {
511
- return i2.tuiProvideOptions(TUI_DROPDOWN_HOVER_OPTIONS, options, TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS);
512
- }
647
+ /** Default values for hint options */
648
+ var TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS = {
649
+ showDelay: 200,
650
+ hideDelay: 500,
651
+ };
652
+ /**
653
+ * Default parameters for dropdown hover directive
654
+ */
655
+ var TUI_DROPDOWN_HOVER_OPTIONS = i2.tuiCreateToken(TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS);
656
+ function tuiDropdownHoverOptionsProvider(options) {
657
+ return i2.tuiProvideOptions(TUI_DROPDOWN_HOVER_OPTIONS, options, TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS);
658
+ }
513
659
 
514
- var TuiDropdownHoverDirective = /** @class */ (function (_super) {
515
- __extends(TuiDropdownHoverDirective, _super);
516
- function TuiDropdownHoverDirective(hovered$, options, parentHover) {
517
- var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
518
- _this.hovered$ = hovered$;
519
- _this.options = options;
520
- _this.parentHover = parentHover;
521
- _this.toggle$ = new i1.Subject();
522
- _this.stream$ = i1.merge(_this.toggle$, _this.hovered$).pipe(operators.switchMap(function (visible) { return i1.of(visible).pipe(operators.delay(visible ? _this.showDelay : _this.hideDelay)); }), operators.tap(function (visible) {
523
- _this.hovered = visible;
524
- }), operators.share());
525
- _this.showDelay = _this.options.showDelay;
526
- _this.hideDelay = _this.options.hideDelay;
527
- _this.hovered = false;
528
- _this.type = 'dropdown';
529
- return _this;
530
- }
531
- TuiDropdownHoverDirective.prototype.toggle = function (visible) {
532
- var _a;
533
- (_a = this.parentHover) === null || _a === void 0 ? void 0 : _a.toggle(visible);
534
- this.toggle$.next(visible);
535
- };
536
- return TuiDropdownHoverDirective;
537
- }(i1$1.TuiDriver));
538
- TuiDropdownHoverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHoverDirective, deps: [{ token: i2.TuiHoveredService }, { token: TUI_DROPDOWN_HOVER_OPTIONS }, { token: TuiDropdownHoverDirective, optional: true, skipSelf: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
539
- TuiDropdownHoverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownHoverDirective, selector: "[tuiDropdownHover]:not(ng-container)", inputs: { showDelay: ["tuiDropdownShowDelay", "showDelay"], hideDelay: ["tuiDropdownHideDelay", "hideDelay"] }, providers: [i1$1.tuiAsDriver(TuiDropdownHoverDirective), i2.TuiHoveredService], usesInheritance: true, ngImport: i0__namespace });
540
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHoverDirective, decorators: [{
541
- type: i0.Directive,
542
- args: [{
543
- selector: '[tuiDropdownHover]:not(ng-container)',
544
- providers: [i1$1.tuiAsDriver(TuiDropdownHoverDirective), i2.TuiHoveredService],
545
- }]
546
- }], ctorParameters: function () {
547
- return [{ type: i1__namespace.Observable, decorators: [{
548
- type: i0.Inject,
549
- args: [i2.TuiHoveredService]
550
- }] }, { type: undefined, decorators: [{
551
- type: i0.Inject,
552
- args: [TUI_DROPDOWN_HOVER_OPTIONS]
553
- }] }, { type: TuiDropdownHoverDirective, decorators: [{
554
- type: i0.SkipSelf
555
- }, {
556
- type: i0.Optional
557
- }, {
558
- type: i0.Inject,
559
- args: [TuiDropdownHoverDirective]
560
- }] }];
561
- }, propDecorators: { showDelay: [{
562
- type: i0.Input,
563
- args: ['tuiDropdownShowDelay']
564
- }], hideDelay: [{
565
- type: i0.Input,
566
- args: ['tuiDropdownHideDelay']
567
- }] } });
660
+ var TuiDropdownHoverDirective = /** @class */ (function (_super) {
661
+ __extends(TuiDropdownHoverDirective, _super);
662
+ function TuiDropdownHoverDirective(hovered$, options, parentHover) {
663
+ var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
664
+ _this.hovered$ = hovered$;
665
+ _this.options = options;
666
+ _this.parentHover = parentHover;
667
+ _this.toggle$ = new i1.Subject();
668
+ _this.stream$ = i1.merge(_this.toggle$, _this.hovered$).pipe(operators.switchMap(function (visible) { return i1.of(visible).pipe(operators.delay(visible ? _this.showDelay : _this.hideDelay)); }), operators.tap(function (visible) {
669
+ _this.hovered = visible;
670
+ }), operators.share());
671
+ _this.showDelay = _this.options.showDelay;
672
+ _this.hideDelay = _this.options.hideDelay;
673
+ _this.hovered = false;
674
+ _this.type = 'dropdown';
675
+ return _this;
676
+ }
677
+ TuiDropdownHoverDirective.prototype.toggle = function (visible) {
678
+ var _a;
679
+ (_a = this.parentHover) === null || _a === void 0 ? void 0 : _a.toggle(visible);
680
+ this.toggle$.next(visible);
681
+ };
682
+ return TuiDropdownHoverDirective;
683
+ }(i1$1.TuiDriver));
684
+ TuiDropdownHoverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHoverDirective, deps: [{ token: i2.TuiHoveredService }, { token: TUI_DROPDOWN_HOVER_OPTIONS }, { token: TuiDropdownHoverDirective, optional: true, skipSelf: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
685
+ TuiDropdownHoverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownHoverDirective, selector: "[tuiDropdownHover]:not(ng-container)", inputs: { showDelay: ["tuiDropdownShowDelay", "showDelay"], hideDelay: ["tuiDropdownHideDelay", "hideDelay"] }, providers: [i1$1.tuiAsDriver(TuiDropdownHoverDirective), i2.TuiHoveredService], usesInheritance: true, ngImport: i0__namespace });
686
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHoverDirective, decorators: [{
687
+ type: i0.Directive,
688
+ args: [{
689
+ selector: '[tuiDropdownHover]:not(ng-container)',
690
+ providers: [i1$1.tuiAsDriver(TuiDropdownHoverDirective), i2.TuiHoveredService],
691
+ }]
692
+ }], ctorParameters: function () {
693
+ return [{ type: i1__namespace.Observable, decorators: [{
694
+ type: i0.Inject,
695
+ args: [i2.TuiHoveredService]
696
+ }] }, { type: undefined, decorators: [{
697
+ type: i0.Inject,
698
+ args: [TUI_DROPDOWN_HOVER_OPTIONS]
699
+ }] }, { type: TuiDropdownHoverDirective, decorators: [{
700
+ type: i0.SkipSelf
701
+ }, {
702
+ type: i0.Optional
703
+ }, {
704
+ type: i0.Inject,
705
+ args: [TuiDropdownHoverDirective]
706
+ }] }];
707
+ }, propDecorators: { showDelay: [{
708
+ type: i0.Input,
709
+ args: ['tuiDropdownShowDelay']
710
+ }], hideDelay: [{
711
+ type: i0.Input,
712
+ args: ['tuiDropdownHideDelay']
713
+ }] } });
568
714
 
569
- /** Default values for dropdown options */
570
- var TUI_DROPDOWN_DEFAULT_OPTIONS = {
571
- align: 'left',
572
- direction: null,
573
- limitWidth: 'auto',
574
- maxHeight: 400,
575
- minHeight: 80,
576
- offset: 4,
577
- appearance: '',
578
- };
579
- /**
580
- * Default parameters for dropdown directive
581
- */
582
- var TUI_DROPDOWN_OPTIONS = i2.tuiCreateToken(TUI_DROPDOWN_DEFAULT_OPTIONS);
583
- var tuiDropdownOptionsProvider = function (override) { return ({
584
- provide: TUI_DROPDOWN_OPTIONS,
585
- deps: [
586
- [new i0.Optional(), TuiDropdownOptionsDirective],
587
- [new i0.Optional(), new i0.SkipSelf(), TUI_DROPDOWN_OPTIONS],
588
- ],
589
- useFactory: utils.tuiOverrideOptions(override, TUI_DROPDOWN_DEFAULT_OPTIONS),
590
- }); };
591
- var TuiDropdownOptionsDirective = /** @class */ (function () {
592
- function TuiDropdownOptionsDirective(options) {
593
- this.options = options;
594
- this.align = this.options.align;
595
- this.appearance = this.options.appearance;
596
- this.direction = this.options.direction;
597
- this.limitWidth = this.options.limitWidth;
598
- this.minHeight = this.options.minHeight;
599
- this.maxHeight = this.options.maxHeight;
600
- this.offset = this.options.offset;
601
- }
602
- return TuiDropdownOptionsDirective;
603
- }());
604
- TuiDropdownOptionsDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownOptionsDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS, skipSelf: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
605
- TuiDropdownOptionsDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownAppearance], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: { align: ["tuiDropdownAlign", "align"], appearance: ["tuiDropdownAppearance", "appearance"], direction: ["tuiDropdownDirection", "direction"], limitWidth: ["tuiDropdownLimitWidth", "limitWidth"], minHeight: ["tuiDropdownMinHeight", "minHeight"], maxHeight: ["tuiDropdownMaxHeight", "maxHeight"], offset: ["tuiDropdownOffset", "offset"] }, providers: [
606
- {
607
- provide: TUI_DROPDOWN_OPTIONS,
608
- useExisting: i0.forwardRef(function () { return TuiDropdownOptionsDirective; }),
609
- },
610
- ], ngImport: i0__namespace });
611
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownOptionsDirective, decorators: [{
612
- type: i0.Directive,
613
- args: [{
614
- selector: '[tuiDropdownAlign], [tuiDropdownAppearance], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]',
615
- providers: [
616
- {
617
- provide: TUI_DROPDOWN_OPTIONS,
618
- useExisting: i0.forwardRef(function () { return TuiDropdownOptionsDirective; }),
619
- },
620
- ],
621
- }]
622
- }], ctorParameters: function () {
623
- return [{ type: undefined, decorators: [{
624
- type: i0.SkipSelf
625
- }, {
626
- type: i0.Inject,
627
- args: [TUI_DROPDOWN_OPTIONS]
628
- }] }];
629
- }, propDecorators: { align: [{
630
- type: i0.Input,
631
- args: ['tuiDropdownAlign']
632
- }], appearance: [{
633
- type: i0.Input,
634
- args: ['tuiDropdownAppearance']
635
- }], direction: [{
636
- type: i0.Input,
637
- args: ['tuiDropdownDirection']
638
- }], limitWidth: [{
639
- type: i0.Input,
640
- args: ['tuiDropdownLimitWidth']
641
- }], minHeight: [{
642
- type: i0.Input,
643
- args: ['tuiDropdownMinHeight']
644
- }], maxHeight: [{
645
- type: i0.Input,
646
- args: ['tuiDropdownMaxHeight']
647
- }], offset: [{
648
- type: i0.Input,
649
- args: ['tuiDropdownOffset']
650
- }] } });
715
+ /** Default values for dropdown options */
716
+ var TUI_DROPDOWN_DEFAULT_OPTIONS = {
717
+ align: 'left',
718
+ direction: null,
719
+ limitWidth: 'auto',
720
+ maxHeight: 400,
721
+ minHeight: 80,
722
+ offset: 4,
723
+ appearance: '',
724
+ };
725
+ /**
726
+ * Default parameters for dropdown directive
727
+ */
728
+ var TUI_DROPDOWN_OPTIONS = i2.tuiCreateToken(TUI_DROPDOWN_DEFAULT_OPTIONS);
729
+ var tuiDropdownOptionsProvider = function (override) { return ({
730
+ provide: TUI_DROPDOWN_OPTIONS,
731
+ deps: [
732
+ [new i0.Optional(), TuiDropdownOptionsDirective],
733
+ [new i0.Optional(), new i0.SkipSelf(), TUI_DROPDOWN_OPTIONS],
734
+ ],
735
+ useFactory: utils.tuiOverrideOptions(override, TUI_DROPDOWN_DEFAULT_OPTIONS),
736
+ }); };
737
+ var TuiDropdownOptionsDirective = /** @class */ (function () {
738
+ function TuiDropdownOptionsDirective(options) {
739
+ this.options = options;
740
+ this.align = this.options.align;
741
+ this.appearance = this.options.appearance;
742
+ this.direction = this.options.direction;
743
+ this.limitWidth = this.options.limitWidth;
744
+ this.minHeight = this.options.minHeight;
745
+ this.maxHeight = this.options.maxHeight;
746
+ this.offset = this.options.offset;
747
+ }
748
+ return TuiDropdownOptionsDirective;
749
+ }());
750
+ TuiDropdownOptionsDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownOptionsDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS, skipSelf: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
751
+ TuiDropdownOptionsDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownAppearance], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: { align: ["tuiDropdownAlign", "align"], appearance: ["tuiDropdownAppearance", "appearance"], direction: ["tuiDropdownDirection", "direction"], limitWidth: ["tuiDropdownLimitWidth", "limitWidth"], minHeight: ["tuiDropdownMinHeight", "minHeight"], maxHeight: ["tuiDropdownMaxHeight", "maxHeight"], offset: ["tuiDropdownOffset", "offset"] }, providers: [
752
+ {
753
+ provide: TUI_DROPDOWN_OPTIONS,
754
+ useExisting: i0.forwardRef(function () { return TuiDropdownOptionsDirective; }),
755
+ },
756
+ ], ngImport: i0__namespace });
757
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownOptionsDirective, decorators: [{
758
+ type: i0.Directive,
759
+ args: [{
760
+ selector: '[tuiDropdownAlign], [tuiDropdownAppearance], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]',
761
+ providers: [
762
+ {
763
+ provide: TUI_DROPDOWN_OPTIONS,
764
+ useExisting: i0.forwardRef(function () { return TuiDropdownOptionsDirective; }),
765
+ },
766
+ ],
767
+ }]
768
+ }], ctorParameters: function () {
769
+ return [{ type: undefined, decorators: [{
770
+ type: i0.SkipSelf
771
+ }, {
772
+ type: i0.Inject,
773
+ args: [TUI_DROPDOWN_OPTIONS]
774
+ }] }];
775
+ }, propDecorators: { align: [{
776
+ type: i0.Input,
777
+ args: ['tuiDropdownAlign']
778
+ }], appearance: [{
779
+ type: i0.Input,
780
+ args: ['tuiDropdownAppearance']
781
+ }], direction: [{
782
+ type: i0.Input,
783
+ args: ['tuiDropdownDirection']
784
+ }], limitWidth: [{
785
+ type: i0.Input,
786
+ args: ['tuiDropdownLimitWidth']
787
+ }], minHeight: [{
788
+ type: i0.Input,
789
+ args: ['tuiDropdownMinHeight']
790
+ }], maxHeight: [{
791
+ type: i0.Input,
792
+ args: ['tuiDropdownMaxHeight']
793
+ }], offset: [{
794
+ type: i0.Input,
795
+ args: ['tuiDropdownOffset']
796
+ }] } });
651
797
 
652
- /**
653
- * @description:
654
- * This component is used to show template in a portal
655
- * using default style of white rounded box with a shadow
656
- */
657
- var TuiDropdownComponent = /** @class */ (function () {
658
- function TuiDropdownComponent(visualViewportService, position$, destroy$, directive, animation, el, accessor, win, mode$, options, hoverDirective) {
659
- var _this = this;
660
- this.directive = directive;
661
- this.animation = animation;
662
- this.el = el;
663
- this.accessor = accessor;
664
- this.win = win;
665
- this.mode$ = mode$;
666
- this.options = options;
667
- this.hoverDirective = hoverDirective;
668
- position$
669
- .pipe(operators.map(function (point) { return _this.directive.position === 'fixed'
670
- ? visualViewportService.correct(point)
671
- : point; }), operators.takeUntil(destroy$))
672
- .subscribe(function (_b) {
673
- var _c = __read(_b, 2), top = _c[0], left = _c[1];
674
- _this.update(top, left);
675
- });
676
- this.updateWidth(this.accessor.getClientRect().width);
677
- }
678
- TuiDropdownComponent.prototype.onHoveredChange = function (hovered) {
679
- var _a;
680
- (_a = this.hoverDirective) === null || _a === void 0 ? void 0 : _a.toggle(hovered);
681
- };
682
- TuiDropdownComponent.prototype.onTopFocus = function () {
683
- this.moveFocusOutside(true);
684
- };
685
- TuiDropdownComponent.prototype.onBottomFocus = function () {
686
- this.moveFocusOutside(false);
687
- };
688
- TuiDropdownComponent.prototype.update = function (top, left) {
689
- var _a;
690
- var style = this.el.nativeElement.style;
691
- var right = this.el.nativeElement.getBoundingClientRect().right;
692
- var _b = this.options, maxHeight = _b.maxHeight, minHeight = _b.minHeight, offset = _b.offset;
693
- var innerHeight = this.win.innerHeight;
694
- var clientRect = (_a = this.el.nativeElement.offsetParent) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
695
- var position = this.directive.position;
696
- var rect = this.accessor.getClientRect();
697
- var offsetX = position === 'fixed' ? 0 : -((clientRect === null || clientRect === void 0 ? void 0 : clientRect.left) || 0);
698
- var offsetY = position === 'fixed' ? 0 : -((clientRect === null || clientRect === void 0 ? void 0 : clientRect.top) || 0);
699
- top += offsetY;
700
- left += offsetX;
701
- var isIntersecting = left < rect.right && right > rect.left && top < offsetY + 2 * offset;
702
- var available = isIntersecting
703
- ? rect.top - 2 * offset
704
- : offsetY + innerHeight - top - offset;
705
- var sided = right <= rect.left || left >= rect.right;
706
- style.position = position;
707
- style.top = i2.tuiPx(Math.max(top, offsetY + offset));
708
- style.left = i2.tuiPx(left);
709
- style.maxHeight = sided
710
- ? maxHeight + "px"
711
- : i2.tuiPx(Math.min(maxHeight, Math.max(available, minHeight)));
712
- style.width = '';
713
- style.minWidth = '';
714
- this.updateWidth(rect.width);
715
- };
716
- TuiDropdownComponent.prototype.updateWidth = function (width) {
717
- var style = this.el.nativeElement.style;
718
- switch (this.options.limitWidth) {
719
- case 'min':
720
- style.minWidth = i2.tuiPx(width);
721
- break;
722
- case 'fixed':
723
- style.width = i2.tuiPx(width);
724
- break;
725
- case 'auto':
726
- break;
727
- }
728
- };
729
- TuiDropdownComponent.prototype.moveFocusOutside = function (previous) {
730
- var nativeElement = this.directive.el.nativeElement;
731
- var ownerDocument = nativeElement.ownerDocument;
732
- var root = ownerDocument ? ownerDocument.body : nativeElement;
733
- var focusable = i2.tuiGetClosestFocusable({ initial: nativeElement, root: root, previous: previous });
734
- while (focusable !== null && nativeElement.contains(focusable)) {
735
- focusable = i2.tuiGetClosestFocusable({ initial: focusable, root: root, previous: previous });
736
- }
737
- focusable === null || focusable === void 0 ? void 0 : focusable.focus();
738
- };
739
- return TuiDropdownComponent;
740
- }());
741
- TuiDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownComponent, deps: [{ token: i4.TuiVisualViewportService }, { token: i4.TuiPositionService }, { token: i2.TuiDestroyService, self: true }, { token: TuiDropdownDirective }, { token: tokens.TUI_ANIMATION_OPTIONS }, { token: i0.ElementRef }, { token: i1$1.TuiRectAccessor }, { token: common.WINDOW }, { token: tokens.TUI_MODE }, { token: TUI_DROPDOWN_OPTIONS }, { token: TuiDropdownHoverDirective, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
742
- TuiDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownComponent, selector: "tui-dropdown", host: { listeners: { "$.data-mode.attr": "mode$" }, properties: { "@tuiDropdownAnimation": "animation", "attr.data-appearance": "options.appearance" } }, providers: [
743
- i2.TuiDestroyService,
744
- i4.TuiPositionService,
745
- i1$1.tuiPositionAccessorFor('dropdown'),
746
- i1$1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
747
- providers.MODE_PROVIDER,
748
- ], ngImport: i0__namespace, template: "<tui-scrollbar\n #activeZone=\"tuiActiveZone\"\n tuiActiveZone\n tuiOverscroll=\"all\"\n class=\"t-scroll\"\n (tuiHoveredChange)=\"onHoveredChange($event)\"\n>\n <div\n tabindex=\"0\"\n (focus)=\"onTopFocus()\"\n ></div>\n <div\n *polymorpheusOutlet=\"directive.content as text; context: {$implicit: activeZone}\"\n class=\"t-primitive\"\n >\n {{ text }}\n </div>\n <div\n tabindex=\"0\"\n (focus)=\"onBottomFocus()\"\n ></div>\n</tui-scrollbar>\n", styles: [":host{position:absolute;display:flex;box-shadow:var(--tui-shadow-dropdown);background:var(--tui-elevation-02);border-radius:var(--tui-radius-m);overflow:hidden;border:1px solid var(--tui-base-04);box-sizing:border-box;max-width:calc(100% - 8px);isolation:isolate;pointer-events:auto}:host.ng-animating{pointer-events:none}:host:not([style*=\"top\"]){visibility:hidden}:host[data-mode=onDark]{--tui-text-01: var(--tui-text-01-night);--tui-clear: var(--tui-clear-inverse);background:#222;border:1px solid #808080}.t-scroll{flex-grow:1;max-width:100%}.t-primitive{padding:1rem}\n"], components: [{ type: i1__namespace$1.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }], directives: [{ type: i2__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i2__namespace.TuiOverscrollDirective, selector: "[tuiOverscroll]", inputs: ["tuiOverscroll"] }, { type: i2__namespace.TuiHoveredDirective, selector: "[tuiHoveredChange]", outputs: ["tuiHoveredChange"] }, { type: i3__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], animations: [animations.tuiDropdownAnimation], changeDetection: i0__namespace.ChangeDetectionStrategy.Default });
749
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownComponent, decorators: [{
750
- type: i0.Component,
751
- args: [{
752
- selector: 'tui-dropdown',
753
- templateUrl: './dropdown.template.html',
754
- styleUrls: ['./dropdown.style.less'],
755
- // @bad TODO: OnPush
756
- // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
757
- changeDetection: i0.ChangeDetectionStrategy.Default,
758
- providers: [
759
- i2.TuiDestroyService,
760
- i4.TuiPositionService,
761
- i1$1.tuiPositionAccessorFor('dropdown'),
762
- i1$1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
763
- providers.MODE_PROVIDER,
764
- ],
765
- host: {
766
- '[@tuiDropdownAnimation]': 'animation',
767
- '[attr.data-appearance]': 'options.appearance',
768
- '($.data-mode.attr)': 'mode$',
769
- },
770
- animations: [animations.tuiDropdownAnimation],
771
- }]
772
- }], ctorParameters: function () {
773
- return [{ type: i4__namespace.TuiVisualViewportService, decorators: [{
774
- type: i0.Inject,
775
- args: [i4.TuiVisualViewportService]
776
- }] }, { type: i1__namespace.Observable, decorators: [{
777
- type: i0.Inject,
778
- args: [i4.TuiPositionService]
779
- }] }, { type: i1__namespace.Observable, decorators: [{
780
- type: i0.Self
781
- }, {
782
- type: i0.Inject,
783
- args: [i2.TuiDestroyService]
784
- }] }, { type: TuiDropdownDirective, decorators: [{
785
- type: i0.Inject,
786
- args: [TuiDropdownDirective]
787
- }] }, { type: undefined, decorators: [{
788
- type: i0.Inject,
789
- args: [tokens.TUI_ANIMATION_OPTIONS]
790
- }] }, { type: i0__namespace.ElementRef, decorators: [{
791
- type: i0.Inject,
792
- args: [i0.ElementRef]
793
- }] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
794
- type: i0.Inject,
795
- args: [i1$1.TuiRectAccessor]
796
- }] }, { type: Window, decorators: [{
797
- type: i0.Inject,
798
- args: [common.WINDOW]
799
- }] }, { type: i1__namespace.Observable, decorators: [{
800
- type: i0.Inject,
801
- args: [tokens.TUI_MODE]
802
- }] }, { type: undefined, decorators: [{
803
- type: i0.Inject,
804
- args: [TUI_DROPDOWN_OPTIONS]
805
- }] }, { type: TuiDropdownHoverDirective, decorators: [{
806
- type: i0.Optional
807
- }, {
808
- type: i0.Inject,
809
- args: [TuiDropdownHoverDirective]
810
- }] }];
811
- } });
798
+ /**
799
+ * @description:
800
+ * This component is used to show template in a portal
801
+ * using default style of white rounded box with a shadow
802
+ */
803
+ var TuiDropdownComponent = /** @class */ (function () {
804
+ function TuiDropdownComponent(visualViewportService, position$, destroy$, directive, animation, el, accessor, win, mode$, options, hoverDirective) {
805
+ var _this = this;
806
+ this.directive = directive;
807
+ this.animation = animation;
808
+ this.el = el;
809
+ this.accessor = accessor;
810
+ this.win = win;
811
+ this.mode$ = mode$;
812
+ this.options = options;
813
+ this.hoverDirective = hoverDirective;
814
+ position$
815
+ .pipe(operators.map(function (point) { return _this.directive.position === 'fixed'
816
+ ? visualViewportService.correct(point)
817
+ : point; }), operators.takeUntil(destroy$))
818
+ .subscribe(function (_b) {
819
+ var _c = __read(_b, 2), top = _c[0], left = _c[1];
820
+ _this.update(top, left);
821
+ });
822
+ this.updateWidth(this.accessor.getClientRect().width);
823
+ }
824
+ TuiDropdownComponent.prototype.onHoveredChange = function (hovered) {
825
+ var _a;
826
+ (_a = this.hoverDirective) === null || _a === void 0 ? void 0 : _a.toggle(hovered);
827
+ };
828
+ TuiDropdownComponent.prototype.onTopFocus = function () {
829
+ this.moveFocusOutside(true);
830
+ };
831
+ TuiDropdownComponent.prototype.onBottomFocus = function () {
832
+ this.moveFocusOutside(false);
833
+ };
834
+ TuiDropdownComponent.prototype.update = function (top, left) {
835
+ var _a;
836
+ var style = this.el.nativeElement.style;
837
+ var right = this.el.nativeElement.getBoundingClientRect().right;
838
+ var _b = this.options, maxHeight = _b.maxHeight, minHeight = _b.minHeight, offset = _b.offset;
839
+ var innerHeight = this.win.innerHeight;
840
+ var clientRect = (_a = this.el.nativeElement.offsetParent) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
841
+ var position = this.directive.position;
842
+ var rect = this.accessor.getClientRect();
843
+ var offsetX = position === 'fixed' ? 0 : -((clientRect === null || clientRect === void 0 ? void 0 : clientRect.left) || 0);
844
+ var offsetY = position === 'fixed' ? 0 : -((clientRect === null || clientRect === void 0 ? void 0 : clientRect.top) || 0);
845
+ top += offsetY;
846
+ left += offsetX;
847
+ var isIntersecting = left < rect.right && right > rect.left && top < offsetY + 2 * offset;
848
+ var available = isIntersecting
849
+ ? rect.top - 2 * offset
850
+ : offsetY + innerHeight - top - offset;
851
+ var sided = right <= rect.left || left >= rect.right;
852
+ style.position = position;
853
+ style.top = i2.tuiPx(Math.max(top, offsetY + offset));
854
+ style.left = i2.tuiPx(left);
855
+ style.maxHeight = sided
856
+ ? maxHeight + "px"
857
+ : i2.tuiPx(Math.min(maxHeight, Math.max(available, minHeight)));
858
+ style.width = '';
859
+ style.minWidth = '';
860
+ this.updateWidth(rect.width);
861
+ };
862
+ TuiDropdownComponent.prototype.updateWidth = function (width) {
863
+ var style = this.el.nativeElement.style;
864
+ switch (this.options.limitWidth) {
865
+ case 'min':
866
+ style.minWidth = i2.tuiPx(width);
867
+ break;
868
+ case 'fixed':
869
+ style.width = i2.tuiPx(width);
870
+ break;
871
+ case 'auto':
872
+ break;
873
+ }
874
+ };
875
+ TuiDropdownComponent.prototype.moveFocusOutside = function (previous) {
876
+ var nativeElement = this.directive.el.nativeElement;
877
+ var ownerDocument = nativeElement.ownerDocument;
878
+ var root = ownerDocument ? ownerDocument.body : nativeElement;
879
+ var focusable = i2.tuiGetClosestFocusable({ initial: nativeElement, root: root, previous: previous });
880
+ while (focusable !== null && nativeElement.contains(focusable)) {
881
+ focusable = i2.tuiGetClosestFocusable({ initial: focusable, root: root, previous: previous });
882
+ }
883
+ focusable === null || focusable === void 0 ? void 0 : focusable.focus();
884
+ };
885
+ return TuiDropdownComponent;
886
+ }());
887
+ TuiDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownComponent, deps: [{ token: i4.TuiVisualViewportService }, { token: i4.TuiPositionService }, { token: i2.TuiDestroyService, self: true }, { token: TuiDropdownDirective }, { token: tokens.TUI_ANIMATION_OPTIONS }, { token: i0.ElementRef }, { token: i1$1.TuiRectAccessor }, { token: common.WINDOW }, { token: tokens.TUI_MODE }, { token: TUI_DROPDOWN_OPTIONS }, { token: TuiDropdownHoverDirective, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
888
+ TuiDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownComponent, selector: "tui-dropdown", host: { listeners: { "$.data-mode.attr": "mode$" }, properties: { "@tuiDropdownAnimation": "animation", "attr.data-appearance": "options.appearance" } }, providers: [
889
+ i2.TuiDestroyService,
890
+ i4.TuiPositionService,
891
+ i1$1.tuiPositionAccessorFor('dropdown'),
892
+ i1$1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
893
+ providers.MODE_PROVIDER,
894
+ ], ngImport: i0__namespace, template: "<tui-scrollbar\n #activeZone=\"tuiActiveZone\"\n tuiActiveZone\n tuiOverscroll=\"all\"\n class=\"t-scroll\"\n (tuiHoveredChange)=\"onHoveredChange($event)\"\n>\n <div\n tabindex=\"0\"\n (focus)=\"onTopFocus()\"\n ></div>\n <div\n *polymorpheusOutlet=\"directive.content as text; context: {$implicit: activeZone}\"\n class=\"t-primitive\"\n >\n {{ text }}\n </div>\n <div\n tabindex=\"0\"\n (focus)=\"onBottomFocus()\"\n ></div>\n</tui-scrollbar>\n", styles: [":host{position:absolute;display:flex;box-shadow:var(--tui-shadow-dropdown);background:var(--tui-elevation-02);border-radius:var(--tui-radius-m);overflow:hidden;border:1px solid var(--tui-base-04);box-sizing:border-box;max-width:calc(100% - 8px);isolation:isolate;pointer-events:auto}:host.ng-animating{pointer-events:none}:host:not([style*=\"top\"]){visibility:hidden}:host[data-mode=onDark]{--tui-text-01: var(--tui-text-01-night);--tui-clear: var(--tui-clear-inverse);background:#222;border:1px solid #808080}.t-scroll{flex-grow:1;max-width:100%}.t-primitive{padding:1rem}\n"], components: [{ type: i1__namespace$1.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }], directives: [{ type: i2__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i2__namespace.TuiOverscrollDirective, selector: "[tuiOverscroll]", inputs: ["tuiOverscroll"] }, { type: i2__namespace.TuiHoveredDirective, selector: "[tuiHoveredChange]", outputs: ["tuiHoveredChange"] }, { type: i3__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], animations: [animations.tuiDropdownAnimation], changeDetection: i0__namespace.ChangeDetectionStrategy.Default });
895
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownComponent, decorators: [{
896
+ type: i0.Component,
897
+ args: [{
898
+ selector: 'tui-dropdown',
899
+ templateUrl: './dropdown.template.html',
900
+ styleUrls: ['./dropdown.style.less'],
901
+ // @bad TODO: OnPush
902
+ // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
903
+ changeDetection: i0.ChangeDetectionStrategy.Default,
904
+ providers: [
905
+ i2.TuiDestroyService,
906
+ i4.TuiPositionService,
907
+ i1$1.tuiPositionAccessorFor('dropdown'),
908
+ i1$1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
909
+ providers.MODE_PROVIDER,
910
+ ],
911
+ host: {
912
+ '[@tuiDropdownAnimation]': 'animation',
913
+ '[attr.data-appearance]': 'options.appearance',
914
+ '($.data-mode.attr)': 'mode$',
915
+ },
916
+ animations: [animations.tuiDropdownAnimation],
917
+ }]
918
+ }], ctorParameters: function () {
919
+ return [{ type: i4__namespace.TuiVisualViewportService, decorators: [{
920
+ type: i0.Inject,
921
+ args: [i4.TuiVisualViewportService]
922
+ }] }, { type: i1__namespace.Observable, decorators: [{
923
+ type: i0.Inject,
924
+ args: [i4.TuiPositionService]
925
+ }] }, { type: i1__namespace.Observable, decorators: [{
926
+ type: i0.Self
927
+ }, {
928
+ type: i0.Inject,
929
+ args: [i2.TuiDestroyService]
930
+ }] }, { type: TuiDropdownDirective, decorators: [{
931
+ type: i0.Inject,
932
+ args: [TuiDropdownDirective]
933
+ }] }, { type: undefined, decorators: [{
934
+ type: i0.Inject,
935
+ args: [tokens.TUI_ANIMATION_OPTIONS]
936
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
937
+ type: i0.Inject,
938
+ args: [i0.ElementRef]
939
+ }] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
940
+ type: i0.Inject,
941
+ args: [i1$1.TuiRectAccessor]
942
+ }] }, { type: Window, decorators: [{
943
+ type: i0.Inject,
944
+ args: [common.WINDOW]
945
+ }] }, { type: i1__namespace.Observable, decorators: [{
946
+ type: i0.Inject,
947
+ args: [tokens.TUI_MODE]
948
+ }] }, { type: undefined, decorators: [{
949
+ type: i0.Inject,
950
+ args: [TUI_DROPDOWN_OPTIONS]
951
+ }] }, { type: TuiDropdownHoverDirective, decorators: [{
952
+ type: i0.Optional
953
+ }, {
954
+ type: i0.Inject,
955
+ args: [TuiDropdownHoverDirective]
956
+ }] }];
957
+ } });
812
958
 
813
- function activeZoneFilter(target) {
814
- return !this.activeZone.contains(target);
815
- }
816
- var TAP_DELAY = 700;
817
- var MOVE_THRESHOLD = 15;
818
- var TuiDropdownContextDirective = /** @class */ (function (_super) {
819
- __extends(TuiDropdownContextDirective, _super);
820
- function TuiDropdownContextDirective(activeZone, isIOS, isTouch) {
821
- var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
822
- _this.activeZone = activeZone;
823
- _this.isIOS = isIOS;
824
- _this.isTouch = isTouch;
825
- _this.stream$ = new i1.Subject();
826
- _this.currentRect = i2.EMPTY_CLIENT_RECT;
827
- _this.longTapTimeout = NaN;
828
- _this.type = 'dropdown';
829
- return _this;
830
- }
831
- Object.defineProperty(TuiDropdownContextDirective.prototype, "userSelect", {
832
- get: function () {
833
- return this.isTouch ? 'none' : null;
834
- },
835
- enumerable: false,
836
- configurable: true
837
- });
838
- TuiDropdownContextDirective.prototype.onContextMenu = function (x, y) {
839
- this.currentRect = i2.tuiPointToClientRect(x, y);
840
- this.stream$.next(true);
841
- };
842
- TuiDropdownContextDirective.prototype.closeDropdown = function () {
843
- this.stream$.next(false);
844
- this.currentRect = i2.EMPTY_CLIENT_RECT;
845
- };
846
- TuiDropdownContextDirective.prototype.onTouchMove = function (x, y) {
847
- if (this.isIOS &&
848
- this.isTouch &&
849
- this.currentRect !== i2.EMPTY_CLIENT_RECT &&
850
- Math.hypot(x - this.currentRect.x, y - this.currentRect.y) > MOVE_THRESHOLD) {
851
- this.onTouchEnd();
852
- }
853
- };
854
- TuiDropdownContextDirective.prototype.onTouchStart = function (x, y) {
855
- var _this = this;
856
- if (!this.isIOS || !this.isTouch || this.currentRect !== i2.EMPTY_CLIENT_RECT) {
857
- return;
858
- }
859
- this.currentRect = i2.tuiPointToClientRect(x, y);
860
- this.longTapTimeout = setTimeout(function () {
861
- _this.stream$.next(true);
862
- }, TAP_DELAY);
863
- };
864
- TuiDropdownContextDirective.prototype.onTouchEnd = function () {
865
- if (this.isIOS && this.isTouch) {
866
- clearTimeout(this.longTapTimeout);
867
- }
868
- };
869
- TuiDropdownContextDirective.prototype.getClientRect = function () {
870
- return this.currentRect;
871
- };
872
- return TuiDropdownContextDirective;
873
- }(i1$1.TuiDriver));
874
- TuiDropdownContextDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownContextDirective, deps: [{ token: i2.TuiActiveZoneDirective }, { token: i2.TUI_IS_IOS }, { token: i2.TUI_TOUCH_SUPPORTED }], target: i0__namespace.ɵɵFactoryTarget.Directive });
875
- TuiDropdownContextDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownContextDirective, selector: "[tuiDropdown][tuiDropdownContext]", host: { listeners: { "contextmenu.prevent.stop": "onContextMenu($event.clientX,$event.clientY)", "document:click.silent": "closeDropdown($event.target)", "document:contextmenu.capture.silent": "closeDropdown($event.target)", "document:keydown.esc": "closeDropdown($event.currentTarget)", "touchmove.silent.passive": "onTouchMove($event.touches[0].clientX,$event.touches[0].clientY)", "touchstart.silent.passive": "onTouchStart($event.touches[0].clientX,$event.touches[0].clientY)", "touchend.silent.passive": "onTouchEnd()", "touchcancel.silent.passive": "onTouchEnd()" }, properties: { "style.user-select": "this.userSelect", "style.-webkit-touch-callout": "this.userSelect", "style.-webkit-user-select": "this.userSelect" } }, providers: [
876
- i2.TuiActiveZoneDirective,
877
- i1$1.tuiAsDriver(TuiDropdownContextDirective),
878
- i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
879
- ], usesInheritance: true, ngImport: i0__namespace });
880
- __decorate([
881
- ngEventPlugins.shouldCall(activeZoneFilter)
882
- ], TuiDropdownContextDirective.prototype, "closeDropdown", null);
883
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownContextDirective, decorators: [{
884
- type: i0.Directive,
885
- args: [{
886
- selector: '[tuiDropdown][tuiDropdownContext]',
887
- providers: [
888
- i2.TuiActiveZoneDirective,
889
- i1$1.tuiAsDriver(TuiDropdownContextDirective),
890
- i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
891
- ],
892
- }]
893
- }], ctorParameters: function () {
894
- return [{ type: i2__namespace.TuiActiveZoneDirective, decorators: [{
895
- type: i0.Inject,
896
- args: [i2.TuiActiveZoneDirective]
897
- }] }, { type: undefined, decorators: [{
898
- type: i0.Inject,
899
- args: [i2.TUI_IS_IOS]
900
- }] }, { type: undefined, decorators: [{
901
- type: i0.Inject,
902
- args: [i2.TUI_TOUCH_SUPPORTED]
903
- }] }];
904
- }, propDecorators: { userSelect: [{
905
- type: i0.HostBinding,
906
- args: ['style.user-select']
907
- }, {
908
- type: i0.HostBinding,
909
- args: ['style.-webkit-touch-callout']
910
- }, {
911
- type: i0.HostBinding,
912
- args: ['style.-webkit-user-select']
913
- }], onContextMenu: [{
914
- type: i0.HostListener,
915
- args: ['contextmenu.prevent.stop', ['$event.clientX', '$event.clientY']]
916
- }], closeDropdown: [{
917
- type: i0.HostListener,
918
- args: ['document:click.silent', ['$event.target']]
919
- }, {
920
- type: i0.HostListener,
921
- args: ['document:contextmenu.capture.silent', ['$event.target']]
922
- }, {
923
- type: i0.HostListener,
924
- args: ['document:keydown.esc', ['$event.currentTarget']]
925
- }], onTouchMove: [{
926
- type: i0.HostListener,
927
- args: ['touchmove.silent.passive', [
928
- '$event.touches[0].clientX',
929
- '$event.touches[0].clientY',
930
- ]]
931
- }], onTouchStart: [{
932
- type: i0.HostListener,
933
- args: ['touchstart.silent.passive', [
934
- '$event.touches[0].clientX',
935
- '$event.touches[0].clientY',
936
- ]]
937
- }], onTouchEnd: [{
938
- type: i0.HostListener,
939
- args: ['touchend.silent.passive']
940
- }, {
941
- type: i0.HostListener,
942
- args: ['touchcancel.silent.passive']
943
- }] } });
959
+ function activeZoneFilter(target) {
960
+ return !this.activeZone.contains(target);
961
+ }
962
+ var TAP_DELAY = 700;
963
+ var MOVE_THRESHOLD = 15;
964
+ var TuiDropdownContextDirective = /** @class */ (function (_super) {
965
+ __extends(TuiDropdownContextDirective, _super);
966
+ function TuiDropdownContextDirective(activeZone, isIOS, isTouch) {
967
+ var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
968
+ _this.activeZone = activeZone;
969
+ _this.isIOS = isIOS;
970
+ _this.isTouch = isTouch;
971
+ _this.stream$ = new i1.Subject();
972
+ _this.currentRect = i2.EMPTY_CLIENT_RECT;
973
+ _this.longTapTimeout = NaN;
974
+ _this.type = 'dropdown';
975
+ return _this;
976
+ }
977
+ Object.defineProperty(TuiDropdownContextDirective.prototype, "userSelect", {
978
+ get: function () {
979
+ return this.isTouch ? 'none' : null;
980
+ },
981
+ enumerable: false,
982
+ configurable: true
983
+ });
984
+ TuiDropdownContextDirective.prototype.onContextMenu = function (x, y) {
985
+ this.currentRect = i2.tuiPointToClientRect(x, y);
986
+ this.stream$.next(true);
987
+ };
988
+ TuiDropdownContextDirective.prototype.closeDropdown = function () {
989
+ this.stream$.next(false);
990
+ this.currentRect = i2.EMPTY_CLIENT_RECT;
991
+ };
992
+ TuiDropdownContextDirective.prototype.onTouchMove = function (x, y) {
993
+ if (this.isIOS &&
994
+ this.isTouch &&
995
+ this.currentRect !== i2.EMPTY_CLIENT_RECT &&
996
+ Math.hypot(x - this.currentRect.x, y - this.currentRect.y) > MOVE_THRESHOLD) {
997
+ this.onTouchEnd();
998
+ }
999
+ };
1000
+ TuiDropdownContextDirective.prototype.onTouchStart = function (x, y) {
1001
+ var _this = this;
1002
+ if (!this.isIOS || !this.isTouch || this.currentRect !== i2.EMPTY_CLIENT_RECT) {
1003
+ return;
1004
+ }
1005
+ this.currentRect = i2.tuiPointToClientRect(x, y);
1006
+ this.longTapTimeout = setTimeout(function () {
1007
+ _this.stream$.next(true);
1008
+ }, TAP_DELAY);
1009
+ };
1010
+ TuiDropdownContextDirective.prototype.onTouchEnd = function () {
1011
+ if (this.isIOS && this.isTouch) {
1012
+ clearTimeout(this.longTapTimeout);
1013
+ }
1014
+ };
1015
+ TuiDropdownContextDirective.prototype.getClientRect = function () {
1016
+ return this.currentRect;
1017
+ };
1018
+ return TuiDropdownContextDirective;
1019
+ }(i1$1.TuiDriver));
1020
+ TuiDropdownContextDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownContextDirective, deps: [{ token: i2.TuiActiveZoneDirective }, { token: i2.TUI_IS_IOS }, { token: i2.TUI_TOUCH_SUPPORTED }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1021
+ TuiDropdownContextDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownContextDirective, selector: "[tuiDropdown][tuiDropdownContext]", host: { listeners: { "contextmenu.prevent.stop": "onContextMenu($event.clientX,$event.clientY)", "document:click.silent": "closeDropdown($event.target)", "document:contextmenu.capture.silent": "closeDropdown($event.target)", "document:keydown.esc": "closeDropdown($event.currentTarget)", "touchmove.silent.passive": "onTouchMove($event.touches[0].clientX,$event.touches[0].clientY)", "touchstart.silent.passive": "onTouchStart($event.touches[0].clientX,$event.touches[0].clientY)", "touchend.silent.passive": "onTouchEnd()", "touchcancel.silent.passive": "onTouchEnd()" }, properties: { "style.user-select": "this.userSelect", "style.-webkit-touch-callout": "this.userSelect", "style.-webkit-user-select": "this.userSelect" } }, providers: [
1022
+ i2.TuiActiveZoneDirective,
1023
+ i1$1.tuiAsDriver(TuiDropdownContextDirective),
1024
+ i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
1025
+ ], usesInheritance: true, ngImport: i0__namespace });
1026
+ __decorate([
1027
+ ngEventPlugins.shouldCall(activeZoneFilter)
1028
+ ], TuiDropdownContextDirective.prototype, "closeDropdown", null);
1029
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownContextDirective, decorators: [{
1030
+ type: i0.Directive,
1031
+ args: [{
1032
+ selector: '[tuiDropdown][tuiDropdownContext]',
1033
+ providers: [
1034
+ i2.TuiActiveZoneDirective,
1035
+ i1$1.tuiAsDriver(TuiDropdownContextDirective),
1036
+ i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
1037
+ ],
1038
+ }]
1039
+ }], ctorParameters: function () {
1040
+ return [{ type: i2__namespace.TuiActiveZoneDirective, decorators: [{
1041
+ type: i0.Inject,
1042
+ args: [i2.TuiActiveZoneDirective]
1043
+ }] }, { type: undefined, decorators: [{
1044
+ type: i0.Inject,
1045
+ args: [i2.TUI_IS_IOS]
1046
+ }] }, { type: undefined, decorators: [{
1047
+ type: i0.Inject,
1048
+ args: [i2.TUI_TOUCH_SUPPORTED]
1049
+ }] }];
1050
+ }, propDecorators: { userSelect: [{
1051
+ type: i0.HostBinding,
1052
+ args: ['style.user-select']
1053
+ }, {
1054
+ type: i0.HostBinding,
1055
+ args: ['style.-webkit-touch-callout']
1056
+ }, {
1057
+ type: i0.HostBinding,
1058
+ args: ['style.-webkit-user-select']
1059
+ }], onContextMenu: [{
1060
+ type: i0.HostListener,
1061
+ args: ['contextmenu.prevent.stop', ['$event.clientX', '$event.clientY']]
1062
+ }], closeDropdown: [{
1063
+ type: i0.HostListener,
1064
+ args: ['document:click.silent', ['$event.target']]
1065
+ }, {
1066
+ type: i0.HostListener,
1067
+ args: ['document:contextmenu.capture.silent', ['$event.target']]
1068
+ }, {
1069
+ type: i0.HostListener,
1070
+ args: ['document:keydown.esc', ['$event.currentTarget']]
1071
+ }], onTouchMove: [{
1072
+ type: i0.HostListener,
1073
+ args: ['touchmove.silent.passive', [
1074
+ '$event.touches[0].clientX',
1075
+ '$event.touches[0].clientY',
1076
+ ]]
1077
+ }], onTouchStart: [{
1078
+ type: i0.HostListener,
1079
+ args: ['touchstart.silent.passive', [
1080
+ '$event.touches[0].clientX',
1081
+ '$event.touches[0].clientY',
1082
+ ]]
1083
+ }], onTouchEnd: [{
1084
+ type: i0.HostListener,
1085
+ args: ['touchend.silent.passive']
1086
+ }, {
1087
+ type: i0.HostListener,
1088
+ args: ['touchcancel.silent.passive']
1089
+ }] } });
944
1090
 
945
- var TuiDropdownDriverDirective = /** @class */ (function (_super) {
946
- __extends(TuiDropdownDriverDirective, _super);
947
- // TODO: Figure out why this is necessary under nx test runner
948
- function TuiDropdownDriverDirective(destroy$, drivers, vehicles) {
949
- var _this = _super.call(this, destroy$, drivers, vehicles) || this;
950
- _this.type = 'dropdown';
951
- return _this;
952
- }
953
- return TuiDropdownDriverDirective;
954
- }(i1$1.AbstractTuiDriverDirective));
955
- TuiDropdownDriverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDriverDirective, deps: [{ token: i2.TuiDestroyService, self: true }, { token: i1$1.TuiDriver }, { token: i1$1.TuiVehicle }], target: i0__namespace.ɵɵFactoryTarget.Directive });
956
- TuiDropdownDriverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownDriverDirective, selector: "[tuiDropdown]", providers: [i2.TuiDestroyService], usesInheritance: true, ngImport: i0__namespace });
957
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDriverDirective, decorators: [{
958
- type: i0.Directive,
959
- args: [{
960
- selector: '[tuiDropdown]',
961
- providers: [i2.TuiDestroyService],
962
- }]
963
- }], ctorParameters: function () {
964
- return [{ type: i1__namespace.Observable, decorators: [{
965
- type: i0.Self
966
- }, {
967
- type: i0.Inject,
968
- args: [i2.TuiDestroyService]
969
- }] }, { type: undefined, decorators: [{
970
- type: i0.Inject,
971
- args: [i1$1.TuiDriver]
972
- }] }, { type: undefined, decorators: [{
973
- type: i0.Inject,
974
- args: [i1$1.TuiVehicle]
975
- }] }];
976
- } });
1091
+ var TuiDropdownDriverDirective = /** @class */ (function (_super) {
1092
+ __extends(TuiDropdownDriverDirective, _super);
1093
+ // TODO: Figure out why this is necessary under nx test runner
1094
+ function TuiDropdownDriverDirective(destroy$, drivers, vehicles) {
1095
+ var _this = _super.call(this, destroy$, drivers, vehicles) || this;
1096
+ _this.type = 'dropdown';
1097
+ return _this;
1098
+ }
1099
+ return TuiDropdownDriverDirective;
1100
+ }(i1$1.AbstractTuiDriverDirective));
1101
+ TuiDropdownDriverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDriverDirective, deps: [{ token: i2.TuiDestroyService, self: true }, { token: i1$1.TuiDriver }, { token: i1$1.TuiVehicle }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1102
+ TuiDropdownDriverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownDriverDirective, selector: "[tuiDropdown]", providers: [i2.TuiDestroyService], usesInheritance: true, ngImport: i0__namespace });
1103
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDriverDirective, decorators: [{
1104
+ type: i0.Directive,
1105
+ args: [{
1106
+ selector: '[tuiDropdown]',
1107
+ providers: [i2.TuiDestroyService],
1108
+ }]
1109
+ }], ctorParameters: function () {
1110
+ return [{ type: i1__namespace.Observable, decorators: [{
1111
+ type: i0.Self
1112
+ }, {
1113
+ type: i0.Inject,
1114
+ args: [i2.TuiDestroyService]
1115
+ }] }, { type: undefined, decorators: [{
1116
+ type: i0.Inject,
1117
+ args: [i1$1.TuiDriver]
1118
+ }] }, { type: undefined, decorators: [{
1119
+ type: i0.Inject,
1120
+ args: [i1$1.TuiVehicle]
1121
+ }] }];
1122
+ } });
977
1123
 
978
- var TuiDropdownHostDirective = /** @class */ (function (_super) {
979
- __extends(TuiDropdownHostDirective, _super);
980
- function TuiDropdownHostDirective() {
981
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
982
- _this.type = 'dropdown';
983
- return _this;
984
- }
985
- TuiDropdownHostDirective.prototype.getClientRect = function () {
986
- var _a;
987
- return ((_a = this.tuiDropdownHost) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || i2.EMPTY_CLIENT_RECT;
988
- };
989
- return TuiDropdownHostDirective;
990
- }(i1$1.TuiRectAccessor));
991
- TuiDropdownHostDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHostDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
992
- TuiDropdownHostDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownHostDirective, selector: "[tuiDropdown][tuiDropdownHost]", inputs: { tuiDropdownHost: "tuiDropdownHost" }, providers: [i1$1.tuiAsRectAccessor(TuiDropdownHostDirective)], usesInheritance: true, ngImport: i0__namespace });
993
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHostDirective, decorators: [{
994
- type: i0.Directive,
995
- args: [{
996
- selector: '[tuiDropdown][tuiDropdownHost]',
997
- providers: [i1$1.tuiAsRectAccessor(TuiDropdownHostDirective)],
998
- }]
999
- }], propDecorators: { tuiDropdownHost: [{
1000
- type: i0.Input
1001
- }] } });
1124
+ var TuiDropdownHostDirective = /** @class */ (function (_super) {
1125
+ __extends(TuiDropdownHostDirective, _super);
1126
+ function TuiDropdownHostDirective() {
1127
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
1128
+ _this.type = 'dropdown';
1129
+ return _this;
1130
+ }
1131
+ TuiDropdownHostDirective.prototype.getClientRect = function () {
1132
+ var _a;
1133
+ return ((_a = this.tuiDropdownHost) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || i2.EMPTY_CLIENT_RECT;
1134
+ };
1135
+ return TuiDropdownHostDirective;
1136
+ }(i1$1.TuiRectAccessor));
1137
+ TuiDropdownHostDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHostDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
1138
+ TuiDropdownHostDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownHostDirective, selector: "[tuiDropdown][tuiDropdownHost]", inputs: { tuiDropdownHost: "tuiDropdownHost" }, providers: [i1$1.tuiAsRectAccessor(TuiDropdownHostDirective)], usesInheritance: true, ngImport: i0__namespace });
1139
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHostDirective, decorators: [{
1140
+ type: i0.Directive,
1141
+ args: [{
1142
+ selector: '[tuiDropdown][tuiDropdownHost]',
1143
+ providers: [i1$1.tuiAsRectAccessor(TuiDropdownHostDirective)],
1144
+ }]
1145
+ }], propDecorators: { tuiDropdownHost: [{
1146
+ type: i0.Input
1147
+ }] } });
1002
1148
 
1003
- var TuiDropdownManualDirective = /** @class */ (function (_super) {
1004
- __extends(TuiDropdownManualDirective, _super);
1005
- function TuiDropdownManualDirective() {
1006
- var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
1007
- _this.stream$ = new i1.BehaviorSubject(false);
1008
- _this.tuiDropdownManual = false;
1009
- _this.type = 'dropdown';
1010
- return _this;
1011
- }
1012
- TuiDropdownManualDirective.prototype.ngOnChanges = function () {
1013
- this.stream$.next(this.tuiDropdownManual);
1014
- };
1015
- return TuiDropdownManualDirective;
1016
- }(i1$1.TuiDriver));
1017
- TuiDropdownManualDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownManualDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
1018
- TuiDropdownManualDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownManualDirective, selector: "[tuiDropdown][tuiDropdownManual]", inputs: { tuiDropdownManual: "tuiDropdownManual" }, providers: [i1$1.tuiAsDriver(TuiDropdownManualDirective)], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace });
1019
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownManualDirective, decorators: [{
1020
- type: i0.Directive,
1021
- args: [{
1022
- selector: '[tuiDropdown][tuiDropdownManual]',
1023
- providers: [i1$1.tuiAsDriver(TuiDropdownManualDirective)],
1024
- }]
1025
- }], ctorParameters: function () { return []; }, propDecorators: { tuiDropdownManual: [{
1026
- type: i0.Input
1027
- }] } });
1149
+ var TuiDropdownManualDirective = /** @class */ (function (_super) {
1150
+ __extends(TuiDropdownManualDirective, _super);
1151
+ function TuiDropdownManualDirective() {
1152
+ var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
1153
+ _this.stream$ = new i1.BehaviorSubject(false);
1154
+ _this.tuiDropdownManual = false;
1155
+ _this.type = 'dropdown';
1156
+ return _this;
1157
+ }
1158
+ TuiDropdownManualDirective.prototype.ngOnChanges = function () {
1159
+ this.stream$.next(this.tuiDropdownManual);
1160
+ };
1161
+ return TuiDropdownManualDirective;
1162
+ }(i1$1.TuiDriver));
1163
+ TuiDropdownManualDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownManualDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
1164
+ TuiDropdownManualDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownManualDirective, selector: "[tuiDropdown][tuiDropdownManual]", inputs: { tuiDropdownManual: "tuiDropdownManual" }, providers: [i1$1.tuiAsDriver(TuiDropdownManualDirective)], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace });
1165
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownManualDirective, decorators: [{
1166
+ type: i0.Directive,
1167
+ args: [{
1168
+ selector: '[tuiDropdown][tuiDropdownManual]',
1169
+ providers: [i1$1.tuiAsDriver(TuiDropdownManualDirective)],
1170
+ }]
1171
+ }], ctorParameters: function () { return []; }, propDecorators: { tuiDropdownManual: [{
1172
+ type: i0.Input
1173
+ }] } });
1028
1174
 
1029
- var TuiDropdownPositionDirective = /** @class */ (function (_super) {
1030
- __extends(TuiDropdownPositionDirective, _super);
1031
- function TuiDropdownPositionDirective(options, viewport, accessors, directive) {
1032
- var _this = _super.call(this) || this;
1033
- _this.options = options;
1034
- _this.viewport = viewport;
1035
- _this.accessors = accessors;
1036
- _this.directive = directive;
1037
- _this.type = 'dropdown';
1038
- return _this;
1039
- }
1040
- TuiDropdownPositionDirective.prototype.getPosition = function (_c) {
1041
- var width = _c.width, height = _c.height;
1042
- var _a, _b;
1043
- if (!width && !height) {
1044
- this.previous = undefined;
1045
- }
1046
- var hostRect = (_b = (_a = this.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : i2.EMPTY_CLIENT_RECT;
1047
- var viewportRect = this.viewport.getClientRect();
1048
- var _d = this.options, minHeight = _d.minHeight, align = _d.align, direction = _d.direction, offset = _d.offset, limitWidth = _d.limitWidth;
1049
- var viewport = {
1050
- top: viewportRect.top - offset,
1051
- bottom: viewportRect.bottom + offset,
1052
- right: viewportRect.right - offset,
1053
- left: viewportRect.left + offset,
1054
- };
1055
- var previous = this.previous || direction || 'bottom';
1056
- var available = {
1057
- top: hostRect.top - 2 * offset - viewport.top,
1058
- bottom: viewport.bottom - hostRect.bottom - 2 * offset,
1059
- };
1060
- var rectWidth = limitWidth === 'fixed' ? hostRect.width : width;
1061
- var right = Math.max(hostRect.right - rectWidth, offset);
1062
- var left = hostRect.left + width < viewport.right ? hostRect.left : right;
1063
- var position = {
1064
- top: hostRect.top - offset - height,
1065
- bottom: hostRect.bottom + offset,
1066
- right: Math.max(viewport.left, right),
1067
- center: hostRect.left + hostRect.width / 2 + width / 2 < viewport.right
1068
- ? hostRect.left + hostRect.width / 2 - width / 2
1069
- : right,
1070
- left: Math.max(viewport.left, left),
1071
- };
1072
- var better = available.top > available.bottom ? 'top' : 'bottom';
1073
- if ((available[previous] > minHeight && direction) ||
1074
- available[previous] > height) {
1075
- return [position[previous], position[align]];
1076
- }
1077
- this.previous = better;
1078
- return [position[better], position[align]];
1079
- };
1080
- Object.defineProperty(TuiDropdownPositionDirective.prototype, "accessor", {
1081
- get: function () {
1082
- return i1$1.tuiFallbackRectAccessor('dropdown')(this.accessors, this.directive);
1083
- },
1084
- enumerable: false,
1085
- configurable: true
1086
- });
1087
- return TuiDropdownPositionDirective;
1088
- }(i1$1.TuiPositionAccessor));
1089
- TuiDropdownPositionDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: tokens.TUI_VIEWPORT }, { token: i1$1.TuiRectAccessor }, { token: TuiDropdownDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1090
- TuiDropdownPositionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionDirective, selector: "[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])", providers: [i1$1.tuiAsPositionAccessor(TuiDropdownPositionDirective)], usesInheritance: true, ngImport: i0__namespace });
1091
- __decorate([
1092
- i2.tuiPure
1093
- ], TuiDropdownPositionDirective.prototype, "accessor", null);
1094
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionDirective, decorators: [{
1095
- type: i0.Directive,
1096
- args: [{
1097
- selector: '[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])',
1098
- providers: [i1$1.tuiAsPositionAccessor(TuiDropdownPositionDirective)],
1099
- }]
1100
- }], ctorParameters: function () {
1101
- return [{ type: undefined, decorators: [{
1102
- type: i0.Inject,
1103
- args: [TUI_DROPDOWN_OPTIONS]
1104
- }] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
1105
- type: i0.Inject,
1106
- args: [tokens.TUI_VIEWPORT]
1107
- }] }, { type: undefined, decorators: [{
1108
- type: i0.Inject,
1109
- args: [i1$1.TuiRectAccessor]
1110
- }] }, { type: TuiDropdownDirective, decorators: [{
1111
- type: i0.Inject,
1112
- args: [TuiDropdownDirective]
1113
- }] }];
1114
- }, propDecorators: { accessor: [] } });
1175
+ var TuiDropdownPositionDirective = /** @class */ (function (_super) {
1176
+ __extends(TuiDropdownPositionDirective, _super);
1177
+ function TuiDropdownPositionDirective(options, viewport, accessors, directive) {
1178
+ var _this = _super.call(this) || this;
1179
+ _this.options = options;
1180
+ _this.viewport = viewport;
1181
+ _this.accessors = accessors;
1182
+ _this.directive = directive;
1183
+ _this.type = 'dropdown';
1184
+ return _this;
1185
+ }
1186
+ TuiDropdownPositionDirective.prototype.getPosition = function (_c) {
1187
+ var width = _c.width, height = _c.height;
1188
+ var _a, _b;
1189
+ if (!width && !height) {
1190
+ this.previous = undefined;
1191
+ }
1192
+ var hostRect = (_b = (_a = this.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : i2.EMPTY_CLIENT_RECT;
1193
+ var viewportRect = this.viewport.getClientRect();
1194
+ var _d = this.options, minHeight = _d.minHeight, align = _d.align, direction = _d.direction, offset = _d.offset, limitWidth = _d.limitWidth;
1195
+ var viewport = {
1196
+ top: viewportRect.top - offset,
1197
+ bottom: viewportRect.bottom + offset,
1198
+ right: viewportRect.right - offset,
1199
+ left: viewportRect.left + offset,
1200
+ };
1201
+ var previous = this.previous || direction || 'bottom';
1202
+ var available = {
1203
+ top: hostRect.top - 2 * offset - viewport.top,
1204
+ bottom: viewport.bottom - hostRect.bottom - 2 * offset,
1205
+ };
1206
+ var rectWidth = limitWidth === 'fixed' ? hostRect.width : width;
1207
+ var right = Math.max(hostRect.right - rectWidth, offset);
1208
+ var left = hostRect.left + width < viewport.right ? hostRect.left : right;
1209
+ var position = {
1210
+ top: hostRect.top - offset - height,
1211
+ bottom: hostRect.bottom + offset,
1212
+ right: Math.max(viewport.left, right),
1213
+ center: hostRect.left + hostRect.width / 2 + width / 2 < viewport.right
1214
+ ? hostRect.left + hostRect.width / 2 - width / 2
1215
+ : right,
1216
+ left: Math.max(viewport.left, left),
1217
+ };
1218
+ var better = available.top > available.bottom ? 'top' : 'bottom';
1219
+ if ((available[previous] > minHeight && direction) ||
1220
+ available[previous] > height) {
1221
+ return [position[previous], position[align]];
1222
+ }
1223
+ this.previous = better;
1224
+ return [position[better], position[align]];
1225
+ };
1226
+ Object.defineProperty(TuiDropdownPositionDirective.prototype, "accessor", {
1227
+ get: function () {
1228
+ return i1$1.tuiFallbackRectAccessor('dropdown')(this.accessors, this.directive);
1229
+ },
1230
+ enumerable: false,
1231
+ configurable: true
1232
+ });
1233
+ return TuiDropdownPositionDirective;
1234
+ }(i1$1.TuiPositionAccessor));
1235
+ TuiDropdownPositionDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: tokens.TUI_VIEWPORT }, { token: i1$1.TuiRectAccessor }, { token: TuiDropdownDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1236
+ TuiDropdownPositionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionDirective, selector: "[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])", providers: [i1$1.tuiAsPositionAccessor(TuiDropdownPositionDirective)], usesInheritance: true, ngImport: i0__namespace });
1237
+ __decorate([
1238
+ i2.tuiPure
1239
+ ], TuiDropdownPositionDirective.prototype, "accessor", null);
1240
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionDirective, decorators: [{
1241
+ type: i0.Directive,
1242
+ args: [{
1243
+ selector: '[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])',
1244
+ providers: [i1$1.tuiAsPositionAccessor(TuiDropdownPositionDirective)],
1245
+ }]
1246
+ }], ctorParameters: function () {
1247
+ return [{ type: undefined, decorators: [{
1248
+ type: i0.Inject,
1249
+ args: [TUI_DROPDOWN_OPTIONS]
1250
+ }] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
1251
+ type: i0.Inject,
1252
+ args: [tokens.TUI_VIEWPORT]
1253
+ }] }, { type: undefined, decorators: [{
1254
+ type: i0.Inject,
1255
+ args: [i1$1.TuiRectAccessor]
1256
+ }] }, { type: TuiDropdownDirective, decorators: [{
1257
+ type: i0.Inject,
1258
+ args: [TuiDropdownDirective]
1259
+ }] }];
1260
+ }, propDecorators: { accessor: [] } });
1115
1261
 
1116
- var TuiDropdownPositionSidedDirective = /** @class */ (function (_super) {
1117
- __extends(TuiDropdownPositionSidedDirective, _super);
1118
- function TuiDropdownPositionSidedDirective(options, viewport, vertical) {
1119
- var _this = _super.call(this) || this;
1120
- _this.options = options;
1121
- _this.viewport = viewport;
1122
- _this.vertical = vertical;
1123
- _this.previous = _this.options.direction || 'bottom';
1124
- _this.tuiDropdownSided = '';
1125
- _this.tuiDropdownSidedOffset = 4;
1126
- _this.type = 'dropdown';
1127
- return _this;
1128
- }
1129
- TuiDropdownPositionSidedDirective.prototype.getPosition = function (rect) {
1130
- var _a, _b;
1131
- if (this.tuiDropdownSided === false) {
1132
- return this.vertical.getPosition(rect);
1133
- }
1134
- var height = rect.height, width = rect.width;
1135
- var hostRect = (_b = (_a = this.vertical.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : i2.EMPTY_CLIENT_RECT;
1136
- var viewport = this.viewport.getClientRect();
1137
- var _c = this.options, direction = _c.direction, minHeight = _c.minHeight, offset = _c.offset;
1138
- var align = this.options.align === 'center' ? 'left' : this.options.align;
1139
- var available = {
1140
- top: hostRect.bottom - viewport.top,
1141
- left: hostRect.left - offset - viewport.left,
1142
- right: viewport.right - hostRect.right - offset,
1143
- bottom: viewport.bottom - hostRect.top,
1144
- };
1145
- var position = {
1146
- top: hostRect.bottom - height + this.tuiDropdownSidedOffset + 1,
1147
- left: hostRect.left - width - offset,
1148
- right: hostRect.right + offset,
1149
- bottom: hostRect.top - this.tuiDropdownSidedOffset - 1, // 1 for border
1150
- };
1151
- var better = available.top > available.bottom ? 'top' : 'bottom';
1152
- var maxLeft = available.left > available.right ? position.left : position.right;
1153
- var left = available[align] > width ? position[align] : maxLeft;
1154
- if ((available[this.previous] > minHeight && direction) ||
1155
- this.previous === better) {
1156
- return [position[this.previous], left];
1157
- }
1158
- this.previous = better;
1159
- return [position[better], left];
1160
- };
1161
- return TuiDropdownPositionSidedDirective;
1162
- }(i1$1.TuiPositionAccessor));
1163
- TuiDropdownPositionSidedDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: tokens.TUI_VIEWPORT }, { token: TuiDropdownPositionDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1164
- TuiDropdownPositionSidedDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionSidedDirective, selector: "[tuiDropdownSided]", inputs: { tuiDropdownSided: "tuiDropdownSided", tuiDropdownSidedOffset: "tuiDropdownSidedOffset" }, providers: [
1165
- TuiDropdownPositionDirective,
1166
- i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
1167
- ], usesInheritance: true, ngImport: i0__namespace });
1168
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, decorators: [{
1169
- type: i0.Directive,
1170
- args: [{
1171
- selector: '[tuiDropdownSided]',
1172
- providers: [
1173
- TuiDropdownPositionDirective,
1174
- i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
1175
- ],
1176
- }]
1177
- }], ctorParameters: function () {
1178
- return [{ type: undefined, decorators: [{
1179
- type: i0.Inject,
1180
- args: [TUI_DROPDOWN_OPTIONS]
1181
- }] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
1182
- type: i0.Inject,
1183
- args: [tokens.TUI_VIEWPORT]
1184
- }] }, { type: TuiDropdownPositionDirective, decorators: [{
1185
- type: i0.Inject,
1186
- args: [TuiDropdownPositionDirective]
1187
- }] }];
1188
- }, propDecorators: { tuiDropdownSided: [{
1189
- type: i0.Input
1190
- }], tuiDropdownSidedOffset: [{
1191
- type: i0.Input
1192
- }] } });
1262
+ var TuiDropdownPositionSidedDirective = /** @class */ (function (_super) {
1263
+ __extends(TuiDropdownPositionSidedDirective, _super);
1264
+ function TuiDropdownPositionSidedDirective(options, viewport, vertical) {
1265
+ var _this = _super.call(this) || this;
1266
+ _this.options = options;
1267
+ _this.viewport = viewport;
1268
+ _this.vertical = vertical;
1269
+ _this.previous = _this.options.direction || 'bottom';
1270
+ _this.tuiDropdownSided = '';
1271
+ _this.tuiDropdownSidedOffset = 4;
1272
+ _this.type = 'dropdown';
1273
+ return _this;
1274
+ }
1275
+ TuiDropdownPositionSidedDirective.prototype.getPosition = function (rect) {
1276
+ var _a, _b;
1277
+ if (this.tuiDropdownSided === false) {
1278
+ return this.vertical.getPosition(rect);
1279
+ }
1280
+ var height = rect.height, width = rect.width;
1281
+ var hostRect = (_b = (_a = this.vertical.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : i2.EMPTY_CLIENT_RECT;
1282
+ var viewport = this.viewport.getClientRect();
1283
+ var _c = this.options, direction = _c.direction, minHeight = _c.minHeight, offset = _c.offset;
1284
+ var align = this.options.align === 'center' ? 'left' : this.options.align;
1285
+ var available = {
1286
+ top: hostRect.bottom - viewport.top,
1287
+ left: hostRect.left - offset - viewport.left,
1288
+ right: viewport.right - hostRect.right - offset,
1289
+ bottom: viewport.bottom - hostRect.top,
1290
+ };
1291
+ var position = {
1292
+ top: hostRect.bottom - height + this.tuiDropdownSidedOffset + 1,
1293
+ left: hostRect.left - width - offset,
1294
+ right: hostRect.right + offset,
1295
+ bottom: hostRect.top - this.tuiDropdownSidedOffset - 1, // 1 for border
1296
+ };
1297
+ var better = available.top > available.bottom ? 'top' : 'bottom';
1298
+ var maxLeft = available.left > available.right ? position.left : position.right;
1299
+ var left = available[align] > width ? position[align] : maxLeft;
1300
+ if ((available[this.previous] > minHeight && direction) ||
1301
+ this.previous === better) {
1302
+ return [position[this.previous], left];
1303
+ }
1304
+ this.previous = better;
1305
+ return [position[better], left];
1306
+ };
1307
+ return TuiDropdownPositionSidedDirective;
1308
+ }(i1$1.TuiPositionAccessor));
1309
+ TuiDropdownPositionSidedDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: tokens.TUI_VIEWPORT }, { token: TuiDropdownPositionDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1310
+ TuiDropdownPositionSidedDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionSidedDirective, selector: "[tuiDropdownSided]", inputs: { tuiDropdownSided: "tuiDropdownSided", tuiDropdownSidedOffset: "tuiDropdownSidedOffset" }, providers: [
1311
+ TuiDropdownPositionDirective,
1312
+ i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
1313
+ ], usesInheritance: true, ngImport: i0__namespace });
1314
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, decorators: [{
1315
+ type: i0.Directive,
1316
+ args: [{
1317
+ selector: '[tuiDropdownSided]',
1318
+ providers: [
1319
+ TuiDropdownPositionDirective,
1320
+ i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
1321
+ ],
1322
+ }]
1323
+ }], ctorParameters: function () {
1324
+ return [{ type: undefined, decorators: [{
1325
+ type: i0.Inject,
1326
+ args: [TUI_DROPDOWN_OPTIONS]
1327
+ }] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
1328
+ type: i0.Inject,
1329
+ args: [tokens.TUI_VIEWPORT]
1330
+ }] }, { type: TuiDropdownPositionDirective, decorators: [{
1331
+ type: i0.Inject,
1332
+ args: [TuiDropdownPositionDirective]
1333
+ }] }];
1334
+ }, propDecorators: { tuiDropdownSided: [{
1335
+ type: i0.Input
1336
+ }], tuiDropdownSidedOffset: [{
1337
+ type: i0.Input
1338
+ }] } });
1193
1339
 
1194
- var TuiDropdownSelectionDirective = /** @class */ (function (_super) {
1195
- __extends(TuiDropdownSelectionDirective, _super);
1196
- function TuiDropdownSelectionDirective(range, doc, selection$, el, vcr, dropdown) {
1197
- var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
1198
- _this.range = range;
1199
- _this.doc = doc;
1200
- _this.selection$ = selection$;
1201
- _this.el = el;
1202
- _this.vcr = vcr;
1203
- _this.dropdown = dropdown;
1204
- _this.handler$ = new i1.BehaviorSubject(i2.ALWAYS_TRUE_HANDLER);
1205
- _this.stream$ = i1.combineLatest([
1206
- _this.handler$,
1207
- _this.selection$.pipe(operators.map(function () { return _this.getRange(); }), operators.distinctUntilChanged(function (x, y) { return x.startOffset === y.startOffset && x.endOffset === y.endOffset; })),
1208
- ]).pipe(operators.map(function (_b) {
1209
- var _c = __read(_b, 2), handler = _c[0], range = _c[1];
1210
- var contained = _this.el.nativeElement.contains(range.commonAncestorContainer);
1211
- _this.range =
1212
- contained && i2.tuiIsTextNode(range.commonAncestorContainer)
1213
- ? range
1214
- : _this.range;
1215
- return (contained && handler(_this.range)) || _this.inDropdown(range);
1216
- }));
1217
- _this.position = 'selection';
1218
- _this.type = 'dropdown';
1219
- return _this;
1220
- }
1221
- Object.defineProperty(TuiDropdownSelectionDirective.prototype, "tuiDropdownSelection", {
1222
- set: function (visible) {
1223
- if (!i2.tuiIsString(visible)) {
1224
- this.handler$.next(visible);
1225
- }
1226
- },
1227
- enumerable: false,
1228
- configurable: true
1229
- });
1230
- TuiDropdownSelectionDirective.prototype.getClientRect = function () {
1231
- switch (this.position) {
1232
- case 'tag': {
1233
- var commonAncestorContainer = this.range.commonAncestorContainer;
1234
- var element = i2.tuiIsElement(commonAncestorContainer)
1235
- ? commonAncestorContainer
1236
- : commonAncestorContainer.parentNode;
1237
- return element && i2.tuiIsElement(element)
1238
- ? element.getBoundingClientRect()
1239
- : i2.EMPTY_CLIENT_RECT;
1240
- }
1241
- case 'word':
1242
- return utils.tuiGetWordRange(this.range).getBoundingClientRect();
1243
- default:
1244
- return this.range.getBoundingClientRect();
1245
- }
1246
- };
1247
- TuiDropdownSelectionDirective.prototype.ngOnDestroy = function () {
1248
- if (this.ghost) {
1249
- this.vcr.element.nativeElement.removeChild(this.ghost);
1250
- }
1251
- };
1252
- TuiDropdownSelectionDirective.prototype.getRange = function () {
1253
- var active = i2.tuiGetNativeFocused(this.doc);
1254
- var selection = this.doc.getSelection();
1255
- var range = active && i2.tuiIsTextfield(active) && this.el.nativeElement.contains(active)
1256
- ? this.veryVerySadInputFix(active)
1257
- : ((selection === null || selection === void 0 ? void 0 : selection.rangeCount) && selection.getRangeAt(0)) || this.range;
1258
- return range.cloneRange();
1259
- };
1260
- /**
1261
- * Check if Node is inside dropdown
1262
- */
1263
- TuiDropdownSelectionDirective.prototype.boxContains = function (node) {
1264
- var _a;
1265
- return !!((_a = this.dropdown.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.location.nativeElement.contains(node));
1266
- };
1267
- /**
1268
- * Check if given range is at least partially inside dropdown
1269
- */
1270
- TuiDropdownSelectionDirective.prototype.inDropdown = function (range) {
1271
- var startContainer = range.startContainer, endContainer = range.endContainer;
1272
- var nativeElement = this.el.nativeElement;
1273
- var inDropdown = this.boxContains(range.commonAncestorContainer);
1274
- var hostToDropdown = this.boxContains(endContainer) && nativeElement.contains(startContainer);
1275
- var dropdownToHost = this.boxContains(startContainer) && nativeElement.contains(endContainer);
1276
- return inDropdown || hostToDropdown || dropdownToHost;
1277
- };
1278
- TuiDropdownSelectionDirective.prototype.veryVerySadInputFix = function (element) {
1279
- var _b = this.ghost, ghost = _b === void 0 ? this.initGhost(element) : _b;
1280
- var _c = element.getBoundingClientRect(), top = _c.top, left = _c.left, width = _c.width, height = _c.height;
1281
- var selectionStart = element.selectionStart, selectionEnd = element.selectionEnd, value = element.value;
1282
- var range = this.doc.createRange();
1283
- var hostRect = this.el.nativeElement.getBoundingClientRect();
1284
- ghost.style.top = i2.tuiPx(top - hostRect.top);
1285
- ghost.style.left = i2.tuiPx(left - hostRect.left);
1286
- ghost.style.width = i2.tuiPx(width);
1287
- ghost.style.height = i2.tuiPx(height);
1288
- ghost.textContent = i2.CHAR_ZERO_WIDTH_SPACE + value + i2.CHAR_NO_BREAK_SPACE;
1289
- range.setStart(ghost.firstChild, selectionStart || 0);
1290
- range.setEnd(ghost.firstChild, selectionEnd || 0);
1291
- return range;
1292
- };
1293
- /**
1294
- * Create an invisible DIV styled exactly like input/textarea element inside directive
1295
- */
1296
- TuiDropdownSelectionDirective.prototype.initGhost = function (element) {
1297
- var ghost = this.doc.createElement('div');
1298
- var _b = getComputedStyle(element), font = _b.font, letterSpacing = _b.letterSpacing, textTransform = _b.textTransform, padding = _b.padding;
1299
- ghost.style.position = 'absolute';
1300
- ghost.style.pointerEvents = 'none';
1301
- ghost.style.opacity = '0';
1302
- ghost.style.whiteSpace = 'pre-wrap';
1303
- ghost.style.font = font;
1304
- ghost.style.letterSpacing = letterSpacing;
1305
- ghost.style.textTransform = textTransform;
1306
- ghost.style.padding = padding;
1307
- this.vcr.element.nativeElement.appendChild(ghost);
1308
- this.ghost = ghost;
1309
- return ghost;
1310
- };
1311
- return TuiDropdownSelectionDirective;
1312
- }(i1$1.TuiDriver));
1313
- TuiDropdownSelectionDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownSelectionDirective, deps: [{ token: i2.TUI_RANGE }, { token: common$1.DOCUMENT }, { token: tokens.TUI_SELECTION_STREAM }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: TuiDropdownDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1314
- TuiDropdownSelectionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownSelectionDirective, selector: "[tuiDropdown][tuiDropdownSelection]", inputs: { position: ["tuiDropdownSelectionPosition", "position"], tuiDropdownSelection: "tuiDropdownSelection" }, providers: [
1315
- i1$1.tuiAsDriver(TuiDropdownSelectionDirective),
1316
- i1$1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
1317
- ], usesInheritance: true, ngImport: i0__namespace });
1318
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownSelectionDirective, decorators: [{
1319
- type: i0.Directive,
1320
- args: [{
1321
- selector: '[tuiDropdown][tuiDropdownSelection]',
1322
- providers: [
1323
- i1$1.tuiAsDriver(TuiDropdownSelectionDirective),
1324
- i1$1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
1325
- ],
1326
- }]
1327
- }], ctorParameters: function () {
1328
- return [{ type: Range, decorators: [{
1329
- type: i0.Inject,
1330
- args: [i2.TUI_RANGE]
1331
- }] }, { type: Document, decorators: [{
1332
- type: i0.Inject,
1333
- args: [common$1.DOCUMENT]
1334
- }] }, { type: i1__namespace.Observable, decorators: [{
1335
- type: i0.Inject,
1336
- args: [tokens.TUI_SELECTION_STREAM]
1337
- }] }, { type: i0__namespace.ElementRef, decorators: [{
1338
- type: i0.Inject,
1339
- args: [i0.ElementRef]
1340
- }] }, { type: i0__namespace.ViewContainerRef, decorators: [{
1341
- type: i0.Inject,
1342
- args: [i0.ViewContainerRef]
1343
- }] }, { type: TuiDropdownDirective, decorators: [{
1344
- type: i0.Inject,
1345
- args: [TuiDropdownDirective]
1346
- }] }];
1347
- }, propDecorators: { position: [{
1348
- type: i0.Input,
1349
- args: ['tuiDropdownSelectionPosition']
1350
- }], tuiDropdownSelection: [{
1351
- type: i0.Input
1352
- }] } });
1340
+ var TuiDropdownSelectionDirective = /** @class */ (function (_super) {
1341
+ __extends(TuiDropdownSelectionDirective, _super);
1342
+ function TuiDropdownSelectionDirective(range, doc, selection$, el, vcr, dropdown) {
1343
+ var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
1344
+ _this.range = range;
1345
+ _this.doc = doc;
1346
+ _this.selection$ = selection$;
1347
+ _this.el = el;
1348
+ _this.vcr = vcr;
1349
+ _this.dropdown = dropdown;
1350
+ _this.handler$ = new i1.BehaviorSubject(i2.ALWAYS_TRUE_HANDLER);
1351
+ _this.stream$ = i1.combineLatest([
1352
+ _this.handler$,
1353
+ _this.selection$.pipe(operators.map(function () { return _this.getRange(); }), operators.distinctUntilChanged(function (x, y) { return x.startOffset === y.startOffset && x.endOffset === y.endOffset; })),
1354
+ ]).pipe(operators.map(function (_b) {
1355
+ var _c = __read(_b, 2), handler = _c[0], range = _c[1];
1356
+ var contained = _this.el.nativeElement.contains(range.commonAncestorContainer);
1357
+ _this.range =
1358
+ contained && i2.tuiIsTextNode(range.commonAncestorContainer)
1359
+ ? range
1360
+ : _this.range;
1361
+ return (contained && handler(_this.range)) || _this.inDropdown(range);
1362
+ }));
1363
+ _this.position = 'selection';
1364
+ _this.type = 'dropdown';
1365
+ return _this;
1366
+ }
1367
+ Object.defineProperty(TuiDropdownSelectionDirective.prototype, "tuiDropdownSelection", {
1368
+ set: function (visible) {
1369
+ if (!i2.tuiIsString(visible)) {
1370
+ this.handler$.next(visible);
1371
+ }
1372
+ },
1373
+ enumerable: false,
1374
+ configurable: true
1375
+ });
1376
+ TuiDropdownSelectionDirective.prototype.getClientRect = function () {
1377
+ switch (this.position) {
1378
+ case 'tag': {
1379
+ var commonAncestorContainer = this.range.commonAncestorContainer;
1380
+ var element = i2.tuiIsElement(commonAncestorContainer)
1381
+ ? commonAncestorContainer
1382
+ : commonAncestorContainer.parentNode;
1383
+ return element && i2.tuiIsElement(element)
1384
+ ? element.getBoundingClientRect()
1385
+ : i2.EMPTY_CLIENT_RECT;
1386
+ }
1387
+ case 'word':
1388
+ return utils.tuiGetWordRange(this.range).getBoundingClientRect();
1389
+ default:
1390
+ return this.range.getBoundingClientRect();
1391
+ }
1392
+ };
1393
+ TuiDropdownSelectionDirective.prototype.ngOnDestroy = function () {
1394
+ if (this.ghost) {
1395
+ this.vcr.element.nativeElement.removeChild(this.ghost);
1396
+ }
1397
+ };
1398
+ TuiDropdownSelectionDirective.prototype.getRange = function () {
1399
+ var active = i2.tuiGetNativeFocused(this.doc);
1400
+ var selection = this.doc.getSelection();
1401
+ var range = active && i2.tuiIsTextfield(active) && this.el.nativeElement.contains(active)
1402
+ ? this.veryVerySadInputFix(active)
1403
+ : ((selection === null || selection === void 0 ? void 0 : selection.rangeCount) && selection.getRangeAt(0)) || this.range;
1404
+ return range.cloneRange();
1405
+ };
1406
+ /**
1407
+ * Check if Node is inside dropdown
1408
+ */
1409
+ TuiDropdownSelectionDirective.prototype.boxContains = function (node) {
1410
+ var _a;
1411
+ return !!((_a = this.dropdown.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.location.nativeElement.contains(node));
1412
+ };
1413
+ /**
1414
+ * Check if given range is at least partially inside dropdown
1415
+ */
1416
+ TuiDropdownSelectionDirective.prototype.inDropdown = function (range) {
1417
+ var startContainer = range.startContainer, endContainer = range.endContainer;
1418
+ var nativeElement = this.el.nativeElement;
1419
+ var inDropdown = this.boxContains(range.commonAncestorContainer);
1420
+ var hostToDropdown = this.boxContains(endContainer) && nativeElement.contains(startContainer);
1421
+ var dropdownToHost = this.boxContains(startContainer) && nativeElement.contains(endContainer);
1422
+ return inDropdown || hostToDropdown || dropdownToHost;
1423
+ };
1424
+ TuiDropdownSelectionDirective.prototype.veryVerySadInputFix = function (element) {
1425
+ var _b = this.ghost, ghost = _b === void 0 ? this.initGhost(element) : _b;
1426
+ var _c = element.getBoundingClientRect(), top = _c.top, left = _c.left, width = _c.width, height = _c.height;
1427
+ var selectionStart = element.selectionStart, selectionEnd = element.selectionEnd, value = element.value;
1428
+ var range = this.doc.createRange();
1429
+ var hostRect = this.el.nativeElement.getBoundingClientRect();
1430
+ ghost.style.top = i2.tuiPx(top - hostRect.top);
1431
+ ghost.style.left = i2.tuiPx(left - hostRect.left);
1432
+ ghost.style.width = i2.tuiPx(width);
1433
+ ghost.style.height = i2.tuiPx(height);
1434
+ ghost.textContent = i2.CHAR_ZERO_WIDTH_SPACE + value + i2.CHAR_NO_BREAK_SPACE;
1435
+ range.setStart(ghost.firstChild, selectionStart || 0);
1436
+ range.setEnd(ghost.firstChild, selectionEnd || 0);
1437
+ return range;
1438
+ };
1439
+ /**
1440
+ * Create an invisible DIV styled exactly like input/textarea element inside directive
1441
+ */
1442
+ TuiDropdownSelectionDirective.prototype.initGhost = function (element) {
1443
+ var ghost = this.doc.createElement('div');
1444
+ var _b = getComputedStyle(element), font = _b.font, letterSpacing = _b.letterSpacing, textTransform = _b.textTransform, padding = _b.padding;
1445
+ ghost.style.position = 'absolute';
1446
+ ghost.style.pointerEvents = 'none';
1447
+ ghost.style.opacity = '0';
1448
+ ghost.style.whiteSpace = 'pre-wrap';
1449
+ ghost.style.font = font;
1450
+ ghost.style.letterSpacing = letterSpacing;
1451
+ ghost.style.textTransform = textTransform;
1452
+ ghost.style.padding = padding;
1453
+ this.vcr.element.nativeElement.appendChild(ghost);
1454
+ this.ghost = ghost;
1455
+ return ghost;
1456
+ };
1457
+ return TuiDropdownSelectionDirective;
1458
+ }(i1$1.TuiDriver));
1459
+ TuiDropdownSelectionDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownSelectionDirective, deps: [{ token: i2.TUI_RANGE }, { token: common$1.DOCUMENT }, { token: tokens.TUI_SELECTION_STREAM }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: TuiDropdownDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1460
+ TuiDropdownSelectionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownSelectionDirective, selector: "[tuiDropdown][tuiDropdownSelection]", inputs: { position: ["tuiDropdownSelectionPosition", "position"], tuiDropdownSelection: "tuiDropdownSelection" }, providers: [
1461
+ i1$1.tuiAsDriver(TuiDropdownSelectionDirective),
1462
+ i1$1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
1463
+ ], usesInheritance: true, ngImport: i0__namespace });
1464
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownSelectionDirective, decorators: [{
1465
+ type: i0.Directive,
1466
+ args: [{
1467
+ selector: '[tuiDropdown][tuiDropdownSelection]',
1468
+ providers: [
1469
+ i1$1.tuiAsDriver(TuiDropdownSelectionDirective),
1470
+ i1$1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
1471
+ ],
1472
+ }]
1473
+ }], ctorParameters: function () {
1474
+ return [{ type: Range, decorators: [{
1475
+ type: i0.Inject,
1476
+ args: [i2.TUI_RANGE]
1477
+ }] }, { type: Document, decorators: [{
1478
+ type: i0.Inject,
1479
+ args: [common$1.DOCUMENT]
1480
+ }] }, { type: i1__namespace.Observable, decorators: [{
1481
+ type: i0.Inject,
1482
+ args: [tokens.TUI_SELECTION_STREAM]
1483
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
1484
+ type: i0.Inject,
1485
+ args: [i0.ElementRef]
1486
+ }] }, { type: i0__namespace.ViewContainerRef, decorators: [{
1487
+ type: i0.Inject,
1488
+ args: [i0.ViewContainerRef]
1489
+ }] }, { type: TuiDropdownDirective, decorators: [{
1490
+ type: i0.Inject,
1491
+ args: [TuiDropdownDirective]
1492
+ }] }];
1493
+ }, propDecorators: { position: [{
1494
+ type: i0.Input,
1495
+ args: ['tuiDropdownSelectionPosition']
1496
+ }], tuiDropdownSelection: [{
1497
+ type: i0.Input
1498
+ }] } });
1353
1499
 
1354
- var TuiDropdownModule = /** @class */ (function () {
1355
- function TuiDropdownModule() {
1356
- }
1357
- return TuiDropdownModule;
1358
- }());
1359
- TuiDropdownModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1360
- TuiDropdownModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, declarations: [TuiDropdownDirective,
1361
- TuiDropdownComponent,
1362
- TuiDropdownOpenDirective,
1363
- TuiDropdownOptionsDirective,
1364
- TuiDropdownHostDirective,
1365
- TuiDropdownDriverDirective,
1366
- TuiDropdownManualDirective,
1367
- TuiDropdownHoverDirective,
1368
- TuiDropdownContextDirective,
1369
- TuiDropdownPositionDirective,
1370
- TuiDropdownPositionSidedDirective,
1371
- TuiDropdownSelectionDirective], imports: [i3.PolymorpheusModule,
1372
- i2.TuiActiveZoneModule,
1373
- i2.TuiOverscrollModule,
1374
- i1$2.TuiScrollbarModule,
1375
- i2.TuiHoveredModule], exports: [TuiDropdownDirective,
1376
- TuiDropdownComponent,
1377
- TuiDropdownOpenDirective,
1378
- TuiDropdownOptionsDirective,
1379
- TuiDropdownHostDirective,
1380
- TuiDropdownDriverDirective,
1381
- TuiDropdownManualDirective,
1382
- TuiDropdownHoverDirective,
1383
- TuiDropdownContextDirective,
1384
- TuiDropdownPositionDirective,
1385
- TuiDropdownPositionSidedDirective,
1386
- TuiDropdownSelectionDirective] });
1387
- TuiDropdownModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, imports: [[
1388
- i3.PolymorpheusModule,
1389
- i2.TuiActiveZoneModule,
1390
- i2.TuiOverscrollModule,
1391
- i1$2.TuiScrollbarModule,
1392
- i2.TuiHoveredModule,
1393
- ]] });
1394
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, decorators: [{
1395
- type: i0.NgModule,
1396
- args: [{
1397
- imports: [
1398
- i3.PolymorpheusModule,
1399
- i2.TuiActiveZoneModule,
1400
- i2.TuiOverscrollModule,
1401
- i1$2.TuiScrollbarModule,
1402
- i2.TuiHoveredModule,
1403
- ],
1404
- declarations: [
1405
- TuiDropdownDirective,
1406
- TuiDropdownComponent,
1407
- TuiDropdownOpenDirective,
1408
- TuiDropdownOptionsDirective,
1409
- TuiDropdownHostDirective,
1410
- TuiDropdownDriverDirective,
1411
- TuiDropdownManualDirective,
1412
- TuiDropdownHoverDirective,
1413
- TuiDropdownContextDirective,
1414
- TuiDropdownPositionDirective,
1415
- TuiDropdownPositionSidedDirective,
1416
- TuiDropdownSelectionDirective,
1417
- ],
1418
- exports: [
1419
- TuiDropdownDirective,
1420
- TuiDropdownComponent,
1421
- TuiDropdownOpenDirective,
1422
- TuiDropdownOptionsDirective,
1423
- TuiDropdownHostDirective,
1424
- TuiDropdownDriverDirective,
1425
- TuiDropdownManualDirective,
1426
- TuiDropdownHoverDirective,
1427
- TuiDropdownContextDirective,
1428
- TuiDropdownPositionDirective,
1429
- TuiDropdownPositionSidedDirective,
1430
- TuiDropdownSelectionDirective,
1431
- ],
1432
- }]
1433
- }] });
1500
+ var TuiDropdownModule = /** @class */ (function () {
1501
+ function TuiDropdownModule() {
1502
+ }
1503
+ return TuiDropdownModule;
1504
+ }());
1505
+ TuiDropdownModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1506
+ TuiDropdownModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, declarations: [TuiDropdownDirective,
1507
+ TuiDropdownComponent,
1508
+ TuiDropdownOpenDirective,
1509
+ TuiDropdownOptionsDirective,
1510
+ TuiDropdownHostDirective,
1511
+ TuiDropdownDriverDirective,
1512
+ TuiDropdownManualDirective,
1513
+ TuiDropdownHoverDirective,
1514
+ TuiDropdownContextDirective,
1515
+ TuiDropdownPositionDirective,
1516
+ TuiDropdownPositionSidedDirective,
1517
+ TuiDropdownSelectionDirective], imports: [i3.PolymorpheusModule,
1518
+ i2.TuiActiveZoneModule,
1519
+ i2.TuiOverscrollModule,
1520
+ i1$2.TuiScrollbarModule,
1521
+ i2.TuiHoveredModule], exports: [TuiDropdownDirective,
1522
+ TuiDropdownComponent,
1523
+ TuiDropdownOpenDirective,
1524
+ TuiDropdownOptionsDirective,
1525
+ TuiDropdownHostDirective,
1526
+ TuiDropdownDriverDirective,
1527
+ TuiDropdownManualDirective,
1528
+ TuiDropdownHoverDirective,
1529
+ TuiDropdownContextDirective,
1530
+ TuiDropdownPositionDirective,
1531
+ TuiDropdownPositionSidedDirective,
1532
+ TuiDropdownSelectionDirective] });
1533
+ TuiDropdownModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, imports: [[
1534
+ i3.PolymorpheusModule,
1535
+ i2.TuiActiveZoneModule,
1536
+ i2.TuiOverscrollModule,
1537
+ i1$2.TuiScrollbarModule,
1538
+ i2.TuiHoveredModule,
1539
+ ]] });
1540
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, decorators: [{
1541
+ type: i0.NgModule,
1542
+ args: [{
1543
+ imports: [
1544
+ i3.PolymorpheusModule,
1545
+ i2.TuiActiveZoneModule,
1546
+ i2.TuiOverscrollModule,
1547
+ i1$2.TuiScrollbarModule,
1548
+ i2.TuiHoveredModule,
1549
+ ],
1550
+ declarations: [
1551
+ TuiDropdownDirective,
1552
+ TuiDropdownComponent,
1553
+ TuiDropdownOpenDirective,
1554
+ TuiDropdownOptionsDirective,
1555
+ TuiDropdownHostDirective,
1556
+ TuiDropdownDriverDirective,
1557
+ TuiDropdownManualDirective,
1558
+ TuiDropdownHoverDirective,
1559
+ TuiDropdownContextDirective,
1560
+ TuiDropdownPositionDirective,
1561
+ TuiDropdownPositionSidedDirective,
1562
+ TuiDropdownSelectionDirective,
1563
+ ],
1564
+ exports: [
1565
+ TuiDropdownDirective,
1566
+ TuiDropdownComponent,
1567
+ TuiDropdownOpenDirective,
1568
+ TuiDropdownOptionsDirective,
1569
+ TuiDropdownHostDirective,
1570
+ TuiDropdownDriverDirective,
1571
+ TuiDropdownManualDirective,
1572
+ TuiDropdownHoverDirective,
1573
+ TuiDropdownContextDirective,
1574
+ TuiDropdownPositionDirective,
1575
+ TuiDropdownPositionSidedDirective,
1576
+ TuiDropdownSelectionDirective,
1577
+ ],
1578
+ }]
1579
+ }] });
1434
1580
 
1435
- /**
1436
- * Generated bundle index. Do not edit.
1437
- */
1581
+ /**
1582
+ * Generated bundle index. Do not edit.
1583
+ */
1438
1584
 
1439
- exports.TUI_DROPDOWN_COMPONENT = TUI_DROPDOWN_COMPONENT;
1440
- exports.TUI_DROPDOWN_DEFAULT_OPTIONS = TUI_DROPDOWN_DEFAULT_OPTIONS;
1441
- exports.TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS = TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS;
1442
- exports.TUI_DROPDOWN_HOVER_OPTIONS = TUI_DROPDOWN_HOVER_OPTIONS;
1443
- exports.TUI_DROPDOWN_OPTIONS = TUI_DROPDOWN_OPTIONS;
1444
- exports.TuiDropdownComponent = TuiDropdownComponent;
1445
- exports.TuiDropdownContextDirective = TuiDropdownContextDirective;
1446
- exports.TuiDropdownDirective = TuiDropdownDirective;
1447
- exports.TuiDropdownDriverDirective = TuiDropdownDriverDirective;
1448
- exports.TuiDropdownHostDirective = TuiDropdownHostDirective;
1449
- exports.TuiDropdownHoverDirective = TuiDropdownHoverDirective;
1450
- exports.TuiDropdownManualDirective = TuiDropdownManualDirective;
1451
- exports.TuiDropdownModule = TuiDropdownModule;
1452
- exports.TuiDropdownOpenDirective = TuiDropdownOpenDirective;
1453
- exports.TuiDropdownOptionsDirective = TuiDropdownOptionsDirective;
1454
- exports.TuiDropdownPositionDirective = TuiDropdownPositionDirective;
1455
- exports.TuiDropdownPositionSidedDirective = TuiDropdownPositionSidedDirective;
1456
- exports.TuiDropdownSelectionDirective = TuiDropdownSelectionDirective;
1457
- exports.tuiDropdownHoverOptionsProvider = tuiDropdownHoverOptionsProvider;
1458
- exports.tuiDropdownOptionsProvider = tuiDropdownOptionsProvider;
1585
+ exports.TUI_DROPDOWN_COMPONENT = TUI_DROPDOWN_COMPONENT;
1586
+ exports.TUI_DROPDOWN_DEFAULT_OPTIONS = TUI_DROPDOWN_DEFAULT_OPTIONS;
1587
+ exports.TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS = TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS;
1588
+ exports.TUI_DROPDOWN_HOVER_OPTIONS = TUI_DROPDOWN_HOVER_OPTIONS;
1589
+ exports.TUI_DROPDOWN_OPTIONS = TUI_DROPDOWN_OPTIONS;
1590
+ exports.TuiDropdownComponent = TuiDropdownComponent;
1591
+ exports.TuiDropdownContextDirective = TuiDropdownContextDirective;
1592
+ exports.TuiDropdownDirective = TuiDropdownDirective;
1593
+ exports.TuiDropdownDriverDirective = TuiDropdownDriverDirective;
1594
+ exports.TuiDropdownHostDirective = TuiDropdownHostDirective;
1595
+ exports.TuiDropdownHoverDirective = TuiDropdownHoverDirective;
1596
+ exports.TuiDropdownManualDirective = TuiDropdownManualDirective;
1597
+ exports.TuiDropdownModule = TuiDropdownModule;
1598
+ exports.TuiDropdownOpenDirective = TuiDropdownOpenDirective;
1599
+ exports.TuiDropdownOptionsDirective = TuiDropdownOptionsDirective;
1600
+ exports.TuiDropdownPositionDirective = TuiDropdownPositionDirective;
1601
+ exports.TuiDropdownPositionSidedDirective = TuiDropdownPositionSidedDirective;
1602
+ exports.TuiDropdownSelectionDirective = TuiDropdownSelectionDirective;
1603
+ exports.tuiDropdownHoverOptionsProvider = tuiDropdownHoverOptionsProvider;
1604
+ exports.tuiDropdownOptionsProvider = tuiDropdownOptionsProvider;
1459
1605
 
1460
- Object.defineProperty(exports, '__esModule', { value: true });
1606
+ Object.defineProperty(exports, '__esModule', { value: true });
1461
1607
 
1462
1608
  }));
1463
1609
  //# sourceMappingURL=taiga-ui-core-directives-dropdown.umd.js.map