@taiga-ui/core 3.77.0 → 3.78.0-canary.0955f99

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 (57) hide show
  1. package/bundles/taiga-ui-core-abstract.umd.js +677 -531
  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 +823 -677
  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-group.umd.js +1 -1
  12. package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
  13. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +928 -782
  14. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
  15. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +605 -459
  16. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
  17. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +1176 -1030
  18. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  19. package/bundles/taiga-ui-core-components-root.umd.js +607 -461
  20. package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
  21. package/bundles/taiga-ui-core-components-scroll-controls.umd.js +152 -6
  22. package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
  23. package/bundles/taiga-ui-core-components-svg.umd.js +152 -6
  24. package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
  25. package/bundles/taiga-ui-core-components-theme-night.umd.js +520 -374
  26. package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
  27. package/bundles/taiga-ui-core-components-tooltip.umd.js +595 -449
  28. package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
  29. package/bundles/taiga-ui-core-directives-dropdown.umd.js +1576 -1430
  30. package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
  31. package/bundles/taiga-ui-core-directives-hint.umd.js +1298 -1152
  32. package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
  33. package/bundles/taiga-ui-core-directives-mode.umd.js +521 -375
  34. package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
  35. package/bundles/taiga-ui-core-directives-number-format.umd.js +543 -397
  36. package/bundles/taiga-ui-core-directives-number-format.umd.js.map +1 -1
  37. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +152 -6
  38. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
  39. package/bundles/taiga-ui-core-pipes-order-week-days.umd.js +530 -384
  40. package/bundles/taiga-ui-core-pipes-order-week-days.umd.js.map +1 -1
  41. package/bundles/taiga-ui-core-services.umd.js +783 -637
  42. package/bundles/taiga-ui-core-services.umd.js.map +1 -1
  43. package/bundles/taiga-ui-core-tokens.umd.js +152 -6
  44. package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
  45. package/bundles/taiga-ui-core-utils-format.umd.js +152 -6
  46. package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
  47. package/bundles/taiga-ui-core-utils-mask.umd.js +152 -6
  48. package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
  49. package/constants/cache-basting-payload.d.ts +1 -1
  50. package/esm2015/components/group/group-styles.component.js +1 -1
  51. package/esm2015/components/root/root.component.js +1 -1
  52. package/fesm2015/taiga-ui-core-components-group.js +1 -1
  53. package/fesm2015/taiga-ui-core-components-group.js.map +1 -1
  54. package/fesm2015/taiga-ui-core-components-root.js +1 -1
  55. package/package.json +42 -42
  56. package/styles/mixins/mixins.less +1 -1
  57. package/styles/mixins/mixins.scss +1 -1
@@ -1,1460 +1,1606 @@
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$1 = /*#__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$2 = /*#__PURE__*/_interopNamespace(i1$2);
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
27
+ var i1__namespace$1 = /*#__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$2 = /*#__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
- var TuiDropdownPositionDirective = /** @class */ (function (_super) {
653
- __extends(TuiDropdownPositionDirective, _super);
654
- function TuiDropdownPositionDirective(options, viewport, accessors, directive) {
655
- var _this = _super.call(this) || this;
656
- _this.options = options;
657
- _this.viewport = viewport;
658
- _this.accessors = accessors;
659
- _this.directive = directive;
660
- _this.type = 'dropdown';
661
- return _this;
662
- }
663
- TuiDropdownPositionDirective.prototype.getPosition = function (_c) {
664
- var width = _c.width, height = _c.height;
665
- var _a, _b;
666
- if (!width && !height) {
667
- this.previous = undefined;
668
- }
669
- var hostRect = (_b = (_a = this.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : i2.EMPTY_CLIENT_RECT;
670
- var viewportRect = this.viewport.getClientRect();
671
- var _d = this.options, minHeight = _d.minHeight, align = _d.align, direction = _d.direction, offset = _d.offset, limitWidth = _d.limitWidth;
672
- var viewport = {
673
- top: viewportRect.top - offset,
674
- bottom: viewportRect.bottom + offset,
675
- right: viewportRect.right - offset,
676
- left: viewportRect.left + offset,
677
- };
678
- var previous = this.previous || direction || 'bottom';
679
- var available = {
680
- top: hostRect.top - 2 * offset - viewport.top,
681
- bottom: viewport.bottom - hostRect.bottom - 2 * offset,
682
- };
683
- var rectWidth = limitWidth === 'fixed' ? hostRect.width : width;
684
- var right = Math.max(hostRect.right - rectWidth, offset);
685
- var left = hostRect.left + width < viewport.right ? hostRect.left : right;
686
- var position = {
687
- top: hostRect.top - offset - height,
688
- bottom: hostRect.bottom + offset,
689
- right: Math.max(viewport.left, right),
690
- center: hostRect.left + hostRect.width / 2 + width / 2 < viewport.right
691
- ? hostRect.left + hostRect.width / 2 - width / 2
692
- : right,
693
- left: Math.max(viewport.left, left),
694
- };
695
- var better = available.top > available.bottom ? 'top' : 'bottom';
696
- if ((available[previous] > minHeight && direction) ||
697
- available[previous] > height) {
698
- return [position[previous], position[align]];
699
- }
700
- this.previous = better;
701
- return [position[better], position[align]];
702
- };
703
- Object.defineProperty(TuiDropdownPositionDirective.prototype, "accessor", {
704
- get: function () {
705
- return i1$1.tuiFallbackRectAccessor('dropdown')(this.accessors, this.directive);
706
- },
707
- enumerable: false,
708
- configurable: true
709
- });
710
- return TuiDropdownPositionDirective;
711
- }(i1$1.TuiPositionAccessor));
712
- 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 });
713
- TuiDropdownPositionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionDirective, selector: "[tuiDropdown]", usesInheritance: true, ngImport: i0__namespace });
714
- __decorate([
715
- i2.tuiPure
716
- ], TuiDropdownPositionDirective.prototype, "accessor", null);
717
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionDirective, decorators: [{
718
- type: i0.Directive,
719
- args: [{
720
- selector: '[tuiDropdown]',
721
- }]
722
- }], ctorParameters: function () {
723
- return [{ type: undefined, decorators: [{
724
- type: i0.Inject,
725
- args: [TUI_DROPDOWN_OPTIONS]
726
- }] }, { type: i1__namespace$1.TuiRectAccessor, decorators: [{
727
- type: i0.Inject,
728
- args: [tokens.TUI_VIEWPORT]
729
- }] }, { type: undefined, decorators: [{
730
- type: i0.Inject,
731
- args: [i1$1.TuiRectAccessor]
732
- }] }, { type: TuiDropdownDirective, decorators: [{
733
- type: i0.Inject,
734
- args: [TuiDropdownDirective]
735
- }] }];
736
- }, propDecorators: { accessor: [] } });
798
+ var TuiDropdownPositionDirective = /** @class */ (function (_super) {
799
+ __extends(TuiDropdownPositionDirective, _super);
800
+ function TuiDropdownPositionDirective(options, viewport, accessors, directive) {
801
+ var _this = _super.call(this) || this;
802
+ _this.options = options;
803
+ _this.viewport = viewport;
804
+ _this.accessors = accessors;
805
+ _this.directive = directive;
806
+ _this.type = 'dropdown';
807
+ return _this;
808
+ }
809
+ TuiDropdownPositionDirective.prototype.getPosition = function (_c) {
810
+ var width = _c.width, height = _c.height;
811
+ var _a, _b;
812
+ if (!width && !height) {
813
+ this.previous = undefined;
814
+ }
815
+ var hostRect = (_b = (_a = this.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : i2.EMPTY_CLIENT_RECT;
816
+ var viewportRect = this.viewport.getClientRect();
817
+ var _d = this.options, minHeight = _d.minHeight, align = _d.align, direction = _d.direction, offset = _d.offset, limitWidth = _d.limitWidth;
818
+ var viewport = {
819
+ top: viewportRect.top - offset,
820
+ bottom: viewportRect.bottom + offset,
821
+ right: viewportRect.right - offset,
822
+ left: viewportRect.left + offset,
823
+ };
824
+ var previous = this.previous || direction || 'bottom';
825
+ var available = {
826
+ top: hostRect.top - 2 * offset - viewport.top,
827
+ bottom: viewport.bottom - hostRect.bottom - 2 * offset,
828
+ };
829
+ var rectWidth = limitWidth === 'fixed' ? hostRect.width : width;
830
+ var right = Math.max(hostRect.right - rectWidth, offset);
831
+ var left = hostRect.left + width < viewport.right ? hostRect.left : right;
832
+ var position = {
833
+ top: hostRect.top - offset - height,
834
+ bottom: hostRect.bottom + offset,
835
+ right: Math.max(viewport.left, right),
836
+ center: hostRect.left + hostRect.width / 2 + width / 2 < viewport.right
837
+ ? hostRect.left + hostRect.width / 2 - width / 2
838
+ : right,
839
+ left: Math.max(viewport.left, left),
840
+ };
841
+ var better = available.top > available.bottom ? 'top' : 'bottom';
842
+ if ((available[previous] > minHeight && direction) ||
843
+ available[previous] > height) {
844
+ return [position[previous], position[align]];
845
+ }
846
+ this.previous = better;
847
+ return [position[better], position[align]];
848
+ };
849
+ Object.defineProperty(TuiDropdownPositionDirective.prototype, "accessor", {
850
+ get: function () {
851
+ return i1$1.tuiFallbackRectAccessor('dropdown')(this.accessors, this.directive);
852
+ },
853
+ enumerable: false,
854
+ configurable: true
855
+ });
856
+ return TuiDropdownPositionDirective;
857
+ }(i1$1.TuiPositionAccessor));
858
+ 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 });
859
+ TuiDropdownPositionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionDirective, selector: "[tuiDropdown]", usesInheritance: true, ngImport: i0__namespace });
860
+ __decorate([
861
+ i2.tuiPure
862
+ ], TuiDropdownPositionDirective.prototype, "accessor", null);
863
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionDirective, decorators: [{
864
+ type: i0.Directive,
865
+ args: [{
866
+ selector: '[tuiDropdown]',
867
+ }]
868
+ }], ctorParameters: function () {
869
+ return [{ type: undefined, decorators: [{
870
+ type: i0.Inject,
871
+ args: [TUI_DROPDOWN_OPTIONS]
872
+ }] }, { type: i1__namespace$1.TuiRectAccessor, decorators: [{
873
+ type: i0.Inject,
874
+ args: [tokens.TUI_VIEWPORT]
875
+ }] }, { type: undefined, decorators: [{
876
+ type: i0.Inject,
877
+ args: [i1$1.TuiRectAccessor]
878
+ }] }, { type: TuiDropdownDirective, decorators: [{
879
+ type: i0.Inject,
880
+ args: [TuiDropdownDirective]
881
+ }] }];
882
+ }, propDecorators: { accessor: [] } });
737
883
 
738
- /**
739
- * @description:
740
- * This component is used to show template in a portal
741
- * using default style of white rounded box with a shadow
742
- */
743
- var TuiDropdownComponent = /** @class */ (function () {
744
- function TuiDropdownComponent(vvs, position$, destroy$, directive, animation, el, accessor, win, mode$, options, hoverDirective) {
745
- var _this = this;
746
- this.directive = directive;
747
- this.animation = animation;
748
- this.el = el;
749
- this.accessor = accessor;
750
- this.win = win;
751
- this.mode$ = mode$;
752
- this.options = options;
753
- this.hoverDirective = hoverDirective;
754
- position$
755
- .pipe(operators.map(function (point) { return _this.directive.position === 'fixed' ? vvs.correct(point) : point; }), operators.takeUntil(destroy$))
756
- .subscribe(function (_b) {
757
- var _c = __read(_b, 2), top = _c[0], left = _c[1];
758
- _this.update(top, left);
759
- });
760
- this.updateWidth(this.accessor.getClientRect().width);
761
- }
762
- TuiDropdownComponent.prototype.onHoveredChange = function (hovered) {
763
- var _a;
764
- (_a = this.hoverDirective) === null || _a === void 0 ? void 0 : _a.toggle(hovered);
765
- };
766
- TuiDropdownComponent.prototype.onTopFocus = function () {
767
- this.moveFocusOutside(true);
768
- };
769
- TuiDropdownComponent.prototype.onBottomFocus = function () {
770
- this.moveFocusOutside(false);
771
- };
772
- TuiDropdownComponent.prototype.update = function (top, left) {
773
- var _a;
774
- var style = this.el.nativeElement.style;
775
- var right = this.el.nativeElement.getBoundingClientRect().right;
776
- var _b = this.options, maxHeight = _b.maxHeight, minHeight = _b.minHeight, offset = _b.offset;
777
- var innerHeight = this.win.innerHeight;
778
- var clientRect = (_a = this.el.nativeElement.offsetParent) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
779
- var position = this.directive.position;
780
- var rect = this.accessor.getClientRect();
781
- var offsetX = position === 'fixed' ? 0 : -((clientRect === null || clientRect === void 0 ? void 0 : clientRect.left) || 0);
782
- var offsetY = position === 'fixed' ? 0 : -((clientRect === null || clientRect === void 0 ? void 0 : clientRect.top) || 0);
783
- top += offsetY;
784
- left += offsetX;
785
- var isIntersecting = left < rect.right && right > rect.left && top < offsetY + 2 * offset;
786
- var available = isIntersecting
787
- ? rect.top - 2 * offset
788
- : offsetY + innerHeight - top - offset;
789
- var sided = right <= rect.left || left >= rect.right;
790
- style.position = position;
791
- style.top = i2.tuiPx(Math.max(top, offsetY + offset));
792
- style.left = i2.tuiPx(left);
793
- style.maxHeight = sided
794
- ? maxHeight + "px"
795
- : i2.tuiPx(Math.min(maxHeight, Math.max(available, minHeight)));
796
- style.width = '';
797
- style.minWidth = '';
798
- this.updateWidth(rect.width);
799
- };
800
- TuiDropdownComponent.prototype.updateWidth = function (width) {
801
- var style = this.el.nativeElement.style;
802
- switch (this.options.limitWidth) {
803
- case 'min':
804
- style.minWidth = i2.tuiPx(width);
805
- break;
806
- case 'fixed':
807
- style.width = i2.tuiPx(width);
808
- break;
809
- case 'auto':
810
- break;
811
- }
812
- };
813
- TuiDropdownComponent.prototype.moveFocusOutside = function (previous) {
814
- var nativeElement = this.directive.el.nativeElement;
815
- var ownerDocument = nativeElement.ownerDocument;
816
- var root = ownerDocument ? ownerDocument.body : nativeElement;
817
- var focusable = i2.tuiGetClosestFocusable({ initial: nativeElement, root: root, previous: previous });
818
- while (focusable !== null && nativeElement.contains(focusable)) {
819
- focusable = i2.tuiGetClosestFocusable({ initial: focusable, root: root, previous: previous });
820
- }
821
- focusable === null || focusable === void 0 ? void 0 : focusable.focus();
822
- };
823
- return TuiDropdownComponent;
824
- }());
825
- 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 });
826
- 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: [
827
- i2.TuiDestroyService,
828
- i4.TuiPositionService,
829
- i1$1.tuiPositionAccessorFor('dropdown', TuiDropdownPositionDirective),
830
- i1$1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
831
- providers.MODE_PROVIDER,
832
- ], 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$2.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 });
833
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownComponent, decorators: [{
834
- type: i0.Component,
835
- args: [{
836
- selector: 'tui-dropdown',
837
- templateUrl: './dropdown.template.html',
838
- styleUrls: ['./dropdown.style.less'],
839
- // @bad TODO: OnPush
840
- // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
841
- changeDetection: i0.ChangeDetectionStrategy.Default,
842
- providers: [
843
- i2.TuiDestroyService,
844
- i4.TuiPositionService,
845
- i1$1.tuiPositionAccessorFor('dropdown', TuiDropdownPositionDirective),
846
- i1$1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
847
- providers.MODE_PROVIDER,
848
- ],
849
- host: {
850
- '[@tuiDropdownAnimation]': 'animation',
851
- '[attr.data-appearance]': 'options.appearance',
852
- '($.data-mode.attr)': 'mode$',
853
- },
854
- animations: [animations.tuiDropdownAnimation],
855
- }]
856
- }], ctorParameters: function () {
857
- return [{ type: i4__namespace.TuiVisualViewportService, decorators: [{
858
- type: i0.Inject,
859
- args: [i4.TuiVisualViewportService]
860
- }] }, { type: i1__namespace.Observable, decorators: [{
861
- type: i0.Inject,
862
- args: [i4.TuiPositionService]
863
- }] }, { type: i1__namespace.Observable, decorators: [{
864
- type: i0.Self
865
- }, {
866
- type: i0.Inject,
867
- args: [i2.TuiDestroyService]
868
- }] }, { type: TuiDropdownDirective, decorators: [{
869
- type: i0.Inject,
870
- args: [TuiDropdownDirective]
871
- }] }, { type: undefined, decorators: [{
872
- type: i0.Inject,
873
- args: [tokens.TUI_ANIMATION_OPTIONS]
874
- }] }, { type: i0__namespace.ElementRef, decorators: [{
875
- type: i0.Inject,
876
- args: [i0.ElementRef]
877
- }] }, { type: i1__namespace$1.TuiRectAccessor, decorators: [{
878
- type: i0.Inject,
879
- args: [i1$1.TuiRectAccessor]
880
- }] }, { type: Window, decorators: [{
881
- type: i0.Inject,
882
- args: [common.WINDOW]
883
- }] }, { type: i1__namespace.Observable, decorators: [{
884
- type: i0.Inject,
885
- args: [tokens.TUI_MODE]
886
- }] }, { type: undefined, decorators: [{
887
- type: i0.Inject,
888
- args: [TUI_DROPDOWN_OPTIONS]
889
- }] }, { type: TuiDropdownHoverDirective, decorators: [{
890
- type: i0.Optional
891
- }, {
892
- type: i0.Inject,
893
- args: [TuiDropdownHoverDirective]
894
- }] }];
895
- } });
884
+ /**
885
+ * @description:
886
+ * This component is used to show template in a portal
887
+ * using default style of white rounded box with a shadow
888
+ */
889
+ var TuiDropdownComponent = /** @class */ (function () {
890
+ function TuiDropdownComponent(vvs, position$, destroy$, directive, animation, el, accessor, win, mode$, options, hoverDirective) {
891
+ var _this = this;
892
+ this.directive = directive;
893
+ this.animation = animation;
894
+ this.el = el;
895
+ this.accessor = accessor;
896
+ this.win = win;
897
+ this.mode$ = mode$;
898
+ this.options = options;
899
+ this.hoverDirective = hoverDirective;
900
+ position$
901
+ .pipe(operators.map(function (point) { return _this.directive.position === 'fixed' ? vvs.correct(point) : point; }), operators.takeUntil(destroy$))
902
+ .subscribe(function (_b) {
903
+ var _c = __read(_b, 2), top = _c[0], left = _c[1];
904
+ _this.update(top, left);
905
+ });
906
+ this.updateWidth(this.accessor.getClientRect().width);
907
+ }
908
+ TuiDropdownComponent.prototype.onHoveredChange = function (hovered) {
909
+ var _a;
910
+ (_a = this.hoverDirective) === null || _a === void 0 ? void 0 : _a.toggle(hovered);
911
+ };
912
+ TuiDropdownComponent.prototype.onTopFocus = function () {
913
+ this.moveFocusOutside(true);
914
+ };
915
+ TuiDropdownComponent.prototype.onBottomFocus = function () {
916
+ this.moveFocusOutside(false);
917
+ };
918
+ TuiDropdownComponent.prototype.update = function (top, left) {
919
+ var _a;
920
+ var style = this.el.nativeElement.style;
921
+ var right = this.el.nativeElement.getBoundingClientRect().right;
922
+ var _b = this.options, maxHeight = _b.maxHeight, minHeight = _b.minHeight, offset = _b.offset;
923
+ var innerHeight = this.win.innerHeight;
924
+ var clientRect = (_a = this.el.nativeElement.offsetParent) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
925
+ var position = this.directive.position;
926
+ var rect = this.accessor.getClientRect();
927
+ var offsetX = position === 'fixed' ? 0 : -((clientRect === null || clientRect === void 0 ? void 0 : clientRect.left) || 0);
928
+ var offsetY = position === 'fixed' ? 0 : -((clientRect === null || clientRect === void 0 ? void 0 : clientRect.top) || 0);
929
+ top += offsetY;
930
+ left += offsetX;
931
+ var isIntersecting = left < rect.right && right > rect.left && top < offsetY + 2 * offset;
932
+ var available = isIntersecting
933
+ ? rect.top - 2 * offset
934
+ : offsetY + innerHeight - top - offset;
935
+ var sided = right <= rect.left || left >= rect.right;
936
+ style.position = position;
937
+ style.top = i2.tuiPx(Math.max(top, offsetY + offset));
938
+ style.left = i2.tuiPx(left);
939
+ style.maxHeight = sided
940
+ ? maxHeight + "px"
941
+ : i2.tuiPx(Math.min(maxHeight, Math.max(available, minHeight)));
942
+ style.width = '';
943
+ style.minWidth = '';
944
+ this.updateWidth(rect.width);
945
+ };
946
+ TuiDropdownComponent.prototype.updateWidth = function (width) {
947
+ var style = this.el.nativeElement.style;
948
+ switch (this.options.limitWidth) {
949
+ case 'min':
950
+ style.minWidth = i2.tuiPx(width);
951
+ break;
952
+ case 'fixed':
953
+ style.width = i2.tuiPx(width);
954
+ break;
955
+ case 'auto':
956
+ break;
957
+ }
958
+ };
959
+ TuiDropdownComponent.prototype.moveFocusOutside = function (previous) {
960
+ var nativeElement = this.directive.el.nativeElement;
961
+ var ownerDocument = nativeElement.ownerDocument;
962
+ var root = ownerDocument ? ownerDocument.body : nativeElement;
963
+ var focusable = i2.tuiGetClosestFocusable({ initial: nativeElement, root: root, previous: previous });
964
+ while (focusable !== null && nativeElement.contains(focusable)) {
965
+ focusable = i2.tuiGetClosestFocusable({ initial: focusable, root: root, previous: previous });
966
+ }
967
+ focusable === null || focusable === void 0 ? void 0 : focusable.focus();
968
+ };
969
+ return TuiDropdownComponent;
970
+ }());
971
+ 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 });
972
+ 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: [
973
+ i2.TuiDestroyService,
974
+ i4.TuiPositionService,
975
+ i1$1.tuiPositionAccessorFor('dropdown', TuiDropdownPositionDirective),
976
+ i1$1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
977
+ providers.MODE_PROVIDER,
978
+ ], 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$2.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 });
979
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownComponent, decorators: [{
980
+ type: i0.Component,
981
+ args: [{
982
+ selector: 'tui-dropdown',
983
+ templateUrl: './dropdown.template.html',
984
+ styleUrls: ['./dropdown.style.less'],
985
+ // @bad TODO: OnPush
986
+ // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
987
+ changeDetection: i0.ChangeDetectionStrategy.Default,
988
+ providers: [
989
+ i2.TuiDestroyService,
990
+ i4.TuiPositionService,
991
+ i1$1.tuiPositionAccessorFor('dropdown', TuiDropdownPositionDirective),
992
+ i1$1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
993
+ providers.MODE_PROVIDER,
994
+ ],
995
+ host: {
996
+ '[@tuiDropdownAnimation]': 'animation',
997
+ '[attr.data-appearance]': 'options.appearance',
998
+ '($.data-mode.attr)': 'mode$',
999
+ },
1000
+ animations: [animations.tuiDropdownAnimation],
1001
+ }]
1002
+ }], ctorParameters: function () {
1003
+ return [{ type: i4__namespace.TuiVisualViewportService, decorators: [{
1004
+ type: i0.Inject,
1005
+ args: [i4.TuiVisualViewportService]
1006
+ }] }, { type: i1__namespace.Observable, decorators: [{
1007
+ type: i0.Inject,
1008
+ args: [i4.TuiPositionService]
1009
+ }] }, { type: i1__namespace.Observable, decorators: [{
1010
+ type: i0.Self
1011
+ }, {
1012
+ type: i0.Inject,
1013
+ args: [i2.TuiDestroyService]
1014
+ }] }, { type: TuiDropdownDirective, decorators: [{
1015
+ type: i0.Inject,
1016
+ args: [TuiDropdownDirective]
1017
+ }] }, { type: undefined, decorators: [{
1018
+ type: i0.Inject,
1019
+ args: [tokens.TUI_ANIMATION_OPTIONS]
1020
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
1021
+ type: i0.Inject,
1022
+ args: [i0.ElementRef]
1023
+ }] }, { type: i1__namespace$1.TuiRectAccessor, decorators: [{
1024
+ type: i0.Inject,
1025
+ args: [i1$1.TuiRectAccessor]
1026
+ }] }, { type: Window, decorators: [{
1027
+ type: i0.Inject,
1028
+ args: [common.WINDOW]
1029
+ }] }, { type: i1__namespace.Observable, decorators: [{
1030
+ type: i0.Inject,
1031
+ args: [tokens.TUI_MODE]
1032
+ }] }, { type: undefined, decorators: [{
1033
+ type: i0.Inject,
1034
+ args: [TUI_DROPDOWN_OPTIONS]
1035
+ }] }, { type: TuiDropdownHoverDirective, decorators: [{
1036
+ type: i0.Optional
1037
+ }, {
1038
+ type: i0.Inject,
1039
+ args: [TuiDropdownHoverDirective]
1040
+ }] }];
1041
+ } });
896
1042
 
897
- function activeZoneFilter(target) {
898
- return !this.activeZone.contains(target);
899
- }
900
- var TAP_DELAY = 700;
901
- var MOVE_THRESHOLD = 15;
902
- var TuiDropdownContextDirective = /** @class */ (function (_super) {
903
- __extends(TuiDropdownContextDirective, _super);
904
- function TuiDropdownContextDirective(activeZone, isIOS, isTouch) {
905
- var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
906
- _this.activeZone = activeZone;
907
- _this.isIOS = isIOS;
908
- _this.isTouch = isTouch;
909
- _this.stream$ = new i1.Subject();
910
- _this.currentRect = i2.EMPTY_CLIENT_RECT;
911
- _this.longTapTimeout = NaN;
912
- _this.type = 'dropdown';
913
- return _this;
914
- }
915
- Object.defineProperty(TuiDropdownContextDirective.prototype, "userSelect", {
916
- get: function () {
917
- return this.isTouch ? 'none' : null;
918
- },
919
- enumerable: false,
920
- configurable: true
921
- });
922
- TuiDropdownContextDirective.prototype.onContextMenu = function (x, y) {
923
- this.currentRect = i2.tuiPointToClientRect(x, y);
924
- this.stream$.next(true);
925
- };
926
- TuiDropdownContextDirective.prototype.closeDropdown = function () {
927
- this.stream$.next(false);
928
- this.currentRect = i2.EMPTY_CLIENT_RECT;
929
- };
930
- TuiDropdownContextDirective.prototype.onTouchMove = function (x, y) {
931
- if (this.isIOS &&
932
- this.isTouch &&
933
- this.currentRect !== i2.EMPTY_CLIENT_RECT &&
934
- Math.hypot(x - this.currentRect.x, y - this.currentRect.y) > MOVE_THRESHOLD) {
935
- this.onTouchEnd();
936
- }
937
- };
938
- TuiDropdownContextDirective.prototype.onTouchStart = function (x, y) {
939
- var _this = this;
940
- if (!this.isIOS || !this.isTouch || this.currentRect !== i2.EMPTY_CLIENT_RECT) {
941
- return;
942
- }
943
- this.currentRect = i2.tuiPointToClientRect(x, y);
944
- this.longTapTimeout = setTimeout(function () {
945
- _this.stream$.next(true);
946
- }, TAP_DELAY);
947
- };
948
- TuiDropdownContextDirective.prototype.onTouchEnd = function () {
949
- if (this.isIOS && this.isTouch) {
950
- clearTimeout(this.longTapTimeout);
951
- }
952
- };
953
- TuiDropdownContextDirective.prototype.getClientRect = function () {
954
- return this.currentRect;
955
- };
956
- return TuiDropdownContextDirective;
957
- }(i1$1.TuiDriver));
958
- 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 });
959
- 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: [
960
- i2.TuiActiveZoneDirective,
961
- i1$1.tuiAsDriver(TuiDropdownContextDirective),
962
- i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
963
- ], usesInheritance: true, ngImport: i0__namespace });
964
- __decorate([
965
- ngEventPlugins.shouldCall(activeZoneFilter)
966
- ], TuiDropdownContextDirective.prototype, "closeDropdown", null);
967
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownContextDirective, decorators: [{
968
- type: i0.Directive,
969
- args: [{
970
- selector: '[tuiDropdown][tuiDropdownContext]',
971
- providers: [
972
- i2.TuiActiveZoneDirective,
973
- i1$1.tuiAsDriver(TuiDropdownContextDirective),
974
- i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
975
- ],
976
- }]
977
- }], ctorParameters: function () {
978
- return [{ type: i2__namespace.TuiActiveZoneDirective, decorators: [{
979
- type: i0.Inject,
980
- args: [i2.TuiActiveZoneDirective]
981
- }] }, { type: undefined, decorators: [{
982
- type: i0.Inject,
983
- args: [i2.TUI_IS_IOS]
984
- }] }, { type: undefined, decorators: [{
985
- type: i0.Inject,
986
- args: [i2.TUI_TOUCH_SUPPORTED]
987
- }] }];
988
- }, propDecorators: { userSelect: [{
989
- type: i0.HostBinding,
990
- args: ['style.user-select']
991
- }, {
992
- type: i0.HostBinding,
993
- args: ['style.-webkit-touch-callout']
994
- }, {
995
- type: i0.HostBinding,
996
- args: ['style.-webkit-user-select']
997
- }], onContextMenu: [{
998
- type: i0.HostListener,
999
- args: ['contextmenu.prevent.stop', ['$event.clientX', '$event.clientY']]
1000
- }], closeDropdown: [{
1001
- type: i0.HostListener,
1002
- args: ['document:click.silent', ['$event.target']]
1003
- }, {
1004
- type: i0.HostListener,
1005
- args: ['document:contextmenu.capture.silent', ['$event.target']]
1006
- }, {
1007
- type: i0.HostListener,
1008
- args: ['document:keydown.esc', ['$event.currentTarget']]
1009
- }], onTouchMove: [{
1010
- type: i0.HostListener,
1011
- args: ['touchmove.silent.passive', [
1012
- '$event.touches[0].clientX',
1013
- '$event.touches[0].clientY',
1014
- ]]
1015
- }], onTouchStart: [{
1016
- type: i0.HostListener,
1017
- args: ['touchstart.silent.passive', [
1018
- '$event.touches[0].clientX',
1019
- '$event.touches[0].clientY',
1020
- ]]
1021
- }], onTouchEnd: [{
1022
- type: i0.HostListener,
1023
- args: ['touchend.silent.passive']
1024
- }, {
1025
- type: i0.HostListener,
1026
- args: ['touchcancel.silent.passive']
1027
- }] } });
1043
+ function activeZoneFilter(target) {
1044
+ return !this.activeZone.contains(target);
1045
+ }
1046
+ var TAP_DELAY = 700;
1047
+ var MOVE_THRESHOLD = 15;
1048
+ var TuiDropdownContextDirective = /** @class */ (function (_super) {
1049
+ __extends(TuiDropdownContextDirective, _super);
1050
+ function TuiDropdownContextDirective(activeZone, isIOS, isTouch) {
1051
+ var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
1052
+ _this.activeZone = activeZone;
1053
+ _this.isIOS = isIOS;
1054
+ _this.isTouch = isTouch;
1055
+ _this.stream$ = new i1.Subject();
1056
+ _this.currentRect = i2.EMPTY_CLIENT_RECT;
1057
+ _this.longTapTimeout = NaN;
1058
+ _this.type = 'dropdown';
1059
+ return _this;
1060
+ }
1061
+ Object.defineProperty(TuiDropdownContextDirective.prototype, "userSelect", {
1062
+ get: function () {
1063
+ return this.isTouch ? 'none' : null;
1064
+ },
1065
+ enumerable: false,
1066
+ configurable: true
1067
+ });
1068
+ TuiDropdownContextDirective.prototype.onContextMenu = function (x, y) {
1069
+ this.currentRect = i2.tuiPointToClientRect(x, y);
1070
+ this.stream$.next(true);
1071
+ };
1072
+ TuiDropdownContextDirective.prototype.closeDropdown = function () {
1073
+ this.stream$.next(false);
1074
+ this.currentRect = i2.EMPTY_CLIENT_RECT;
1075
+ };
1076
+ TuiDropdownContextDirective.prototype.onTouchMove = function (x, y) {
1077
+ if (this.isIOS &&
1078
+ this.isTouch &&
1079
+ this.currentRect !== i2.EMPTY_CLIENT_RECT &&
1080
+ Math.hypot(x - this.currentRect.x, y - this.currentRect.y) > MOVE_THRESHOLD) {
1081
+ this.onTouchEnd();
1082
+ }
1083
+ };
1084
+ TuiDropdownContextDirective.prototype.onTouchStart = function (x, y) {
1085
+ var _this = this;
1086
+ if (!this.isIOS || !this.isTouch || this.currentRect !== i2.EMPTY_CLIENT_RECT) {
1087
+ return;
1088
+ }
1089
+ this.currentRect = i2.tuiPointToClientRect(x, y);
1090
+ this.longTapTimeout = setTimeout(function () {
1091
+ _this.stream$.next(true);
1092
+ }, TAP_DELAY);
1093
+ };
1094
+ TuiDropdownContextDirective.prototype.onTouchEnd = function () {
1095
+ if (this.isIOS && this.isTouch) {
1096
+ clearTimeout(this.longTapTimeout);
1097
+ }
1098
+ };
1099
+ TuiDropdownContextDirective.prototype.getClientRect = function () {
1100
+ return this.currentRect;
1101
+ };
1102
+ return TuiDropdownContextDirective;
1103
+ }(i1$1.TuiDriver));
1104
+ 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 });
1105
+ 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: [
1106
+ i2.TuiActiveZoneDirective,
1107
+ i1$1.tuiAsDriver(TuiDropdownContextDirective),
1108
+ i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
1109
+ ], usesInheritance: true, ngImport: i0__namespace });
1110
+ __decorate([
1111
+ ngEventPlugins.shouldCall(activeZoneFilter)
1112
+ ], TuiDropdownContextDirective.prototype, "closeDropdown", null);
1113
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownContextDirective, decorators: [{
1114
+ type: i0.Directive,
1115
+ args: [{
1116
+ selector: '[tuiDropdown][tuiDropdownContext]',
1117
+ providers: [
1118
+ i2.TuiActiveZoneDirective,
1119
+ i1$1.tuiAsDriver(TuiDropdownContextDirective),
1120
+ i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
1121
+ ],
1122
+ }]
1123
+ }], ctorParameters: function () {
1124
+ return [{ type: i2__namespace.TuiActiveZoneDirective, decorators: [{
1125
+ type: i0.Inject,
1126
+ args: [i2.TuiActiveZoneDirective]
1127
+ }] }, { type: undefined, decorators: [{
1128
+ type: i0.Inject,
1129
+ args: [i2.TUI_IS_IOS]
1130
+ }] }, { type: undefined, decorators: [{
1131
+ type: i0.Inject,
1132
+ args: [i2.TUI_TOUCH_SUPPORTED]
1133
+ }] }];
1134
+ }, propDecorators: { userSelect: [{
1135
+ type: i0.HostBinding,
1136
+ args: ['style.user-select']
1137
+ }, {
1138
+ type: i0.HostBinding,
1139
+ args: ['style.-webkit-touch-callout']
1140
+ }, {
1141
+ type: i0.HostBinding,
1142
+ args: ['style.-webkit-user-select']
1143
+ }], onContextMenu: [{
1144
+ type: i0.HostListener,
1145
+ args: ['contextmenu.prevent.stop', ['$event.clientX', '$event.clientY']]
1146
+ }], closeDropdown: [{
1147
+ type: i0.HostListener,
1148
+ args: ['document:click.silent', ['$event.target']]
1149
+ }, {
1150
+ type: i0.HostListener,
1151
+ args: ['document:contextmenu.capture.silent', ['$event.target']]
1152
+ }, {
1153
+ type: i0.HostListener,
1154
+ args: ['document:keydown.esc', ['$event.currentTarget']]
1155
+ }], onTouchMove: [{
1156
+ type: i0.HostListener,
1157
+ args: ['touchmove.silent.passive', [
1158
+ '$event.touches[0].clientX',
1159
+ '$event.touches[0].clientY',
1160
+ ]]
1161
+ }], onTouchStart: [{
1162
+ type: i0.HostListener,
1163
+ args: ['touchstart.silent.passive', [
1164
+ '$event.touches[0].clientX',
1165
+ '$event.touches[0].clientY',
1166
+ ]]
1167
+ }], onTouchEnd: [{
1168
+ type: i0.HostListener,
1169
+ args: ['touchend.silent.passive']
1170
+ }, {
1171
+ type: i0.HostListener,
1172
+ args: ['touchcancel.silent.passive']
1173
+ }] } });
1028
1174
 
1029
- var TuiDropdownDriverDirective = /** @class */ (function (_super) {
1030
- __extends(TuiDropdownDriverDirective, _super);
1031
- // TODO: Figure out why this is necessary under nx test runner
1032
- function TuiDropdownDriverDirective(destroy$, drivers, vehicles) {
1033
- var _this = _super.call(this, destroy$, drivers, vehicles) || this;
1034
- _this.type = 'dropdown';
1035
- return _this;
1036
- }
1037
- return TuiDropdownDriverDirective;
1038
- }(i1$1.AbstractTuiDriverDirective));
1039
- 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 });
1040
- 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 });
1041
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDriverDirective, decorators: [{
1042
- type: i0.Directive,
1043
- args: [{
1044
- selector: '[tuiDropdown]',
1045
- providers: [i2.TuiDestroyService],
1046
- }]
1047
- }], ctorParameters: function () {
1048
- return [{ type: i1__namespace.Observable, decorators: [{
1049
- type: i0.Self
1050
- }, {
1051
- type: i0.Inject,
1052
- args: [i2.TuiDestroyService]
1053
- }] }, { type: undefined, decorators: [{
1054
- type: i0.Inject,
1055
- args: [i1$1.TuiDriver]
1056
- }] }, { type: undefined, decorators: [{
1057
- type: i0.Inject,
1058
- args: [i1$1.TuiVehicle]
1059
- }] }];
1060
- } });
1175
+ var TuiDropdownDriverDirective = /** @class */ (function (_super) {
1176
+ __extends(TuiDropdownDriverDirective, _super);
1177
+ // TODO: Figure out why this is necessary under nx test runner
1178
+ function TuiDropdownDriverDirective(destroy$, drivers, vehicles) {
1179
+ var _this = _super.call(this, destroy$, drivers, vehicles) || this;
1180
+ _this.type = 'dropdown';
1181
+ return _this;
1182
+ }
1183
+ return TuiDropdownDriverDirective;
1184
+ }(i1$1.AbstractTuiDriverDirective));
1185
+ 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 });
1186
+ 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 });
1187
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDriverDirective, decorators: [{
1188
+ type: i0.Directive,
1189
+ args: [{
1190
+ selector: '[tuiDropdown]',
1191
+ providers: [i2.TuiDestroyService],
1192
+ }]
1193
+ }], ctorParameters: function () {
1194
+ return [{ type: i1__namespace.Observable, decorators: [{
1195
+ type: i0.Self
1196
+ }, {
1197
+ type: i0.Inject,
1198
+ args: [i2.TuiDestroyService]
1199
+ }] }, { type: undefined, decorators: [{
1200
+ type: i0.Inject,
1201
+ args: [i1$1.TuiDriver]
1202
+ }] }, { type: undefined, decorators: [{
1203
+ type: i0.Inject,
1204
+ args: [i1$1.TuiVehicle]
1205
+ }] }];
1206
+ } });
1061
1207
 
1062
- var TuiDropdownHostDirective = /** @class */ (function (_super) {
1063
- __extends(TuiDropdownHostDirective, _super);
1064
- function TuiDropdownHostDirective() {
1065
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
1066
- _this.type = 'dropdown';
1067
- return _this;
1068
- }
1069
- TuiDropdownHostDirective.prototype.getClientRect = function () {
1070
- var _a;
1071
- return ((_a = this.tuiDropdownHost) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || i2.EMPTY_CLIENT_RECT;
1072
- };
1073
- return TuiDropdownHostDirective;
1074
- }(i1$1.TuiRectAccessor));
1075
- 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 });
1076
- 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 });
1077
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHostDirective, decorators: [{
1078
- type: i0.Directive,
1079
- args: [{
1080
- selector: '[tuiDropdown][tuiDropdownHost]',
1081
- providers: [i1$1.tuiAsRectAccessor(TuiDropdownHostDirective)],
1082
- }]
1083
- }], propDecorators: { tuiDropdownHost: [{
1084
- type: i0.Input
1085
- }] } });
1208
+ var TuiDropdownHostDirective = /** @class */ (function (_super) {
1209
+ __extends(TuiDropdownHostDirective, _super);
1210
+ function TuiDropdownHostDirective() {
1211
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
1212
+ _this.type = 'dropdown';
1213
+ return _this;
1214
+ }
1215
+ TuiDropdownHostDirective.prototype.getClientRect = function () {
1216
+ var _a;
1217
+ return ((_a = this.tuiDropdownHost) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || i2.EMPTY_CLIENT_RECT;
1218
+ };
1219
+ return TuiDropdownHostDirective;
1220
+ }(i1$1.TuiRectAccessor));
1221
+ 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 });
1222
+ 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 });
1223
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHostDirective, decorators: [{
1224
+ type: i0.Directive,
1225
+ args: [{
1226
+ selector: '[tuiDropdown][tuiDropdownHost]',
1227
+ providers: [i1$1.tuiAsRectAccessor(TuiDropdownHostDirective)],
1228
+ }]
1229
+ }], propDecorators: { tuiDropdownHost: [{
1230
+ type: i0.Input
1231
+ }] } });
1086
1232
 
1087
- var TuiDropdownManualDirective = /** @class */ (function (_super) {
1088
- __extends(TuiDropdownManualDirective, _super);
1089
- function TuiDropdownManualDirective() {
1090
- var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
1091
- _this.stream$ = new i1.BehaviorSubject(false);
1092
- _this.tuiDropdownManual = false;
1093
- _this.type = 'dropdown';
1094
- return _this;
1095
- }
1096
- TuiDropdownManualDirective.prototype.ngOnChanges = function () {
1097
- this.stream$.next(this.tuiDropdownManual);
1098
- };
1099
- return TuiDropdownManualDirective;
1100
- }(i1$1.TuiDriver));
1101
- TuiDropdownManualDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownManualDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
1102
- 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 });
1103
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownManualDirective, decorators: [{
1104
- type: i0.Directive,
1105
- args: [{
1106
- selector: '[tuiDropdown][tuiDropdownManual]',
1107
- providers: [i1$1.tuiAsDriver(TuiDropdownManualDirective)],
1108
- }]
1109
- }], ctorParameters: function () { return []; }, propDecorators: { tuiDropdownManual: [{
1110
- type: i0.Input
1111
- }] } });
1233
+ var TuiDropdownManualDirective = /** @class */ (function (_super) {
1234
+ __extends(TuiDropdownManualDirective, _super);
1235
+ function TuiDropdownManualDirective() {
1236
+ var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
1237
+ _this.stream$ = new i1.BehaviorSubject(false);
1238
+ _this.tuiDropdownManual = false;
1239
+ _this.type = 'dropdown';
1240
+ return _this;
1241
+ }
1242
+ TuiDropdownManualDirective.prototype.ngOnChanges = function () {
1243
+ this.stream$.next(this.tuiDropdownManual);
1244
+ };
1245
+ return TuiDropdownManualDirective;
1246
+ }(i1$1.TuiDriver));
1247
+ TuiDropdownManualDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownManualDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
1248
+ 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 });
1249
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownManualDirective, decorators: [{
1250
+ type: i0.Directive,
1251
+ args: [{
1252
+ selector: '[tuiDropdown][tuiDropdownManual]',
1253
+ providers: [i1$1.tuiAsDriver(TuiDropdownManualDirective)],
1254
+ }]
1255
+ }], ctorParameters: function () { return []; }, propDecorators: { tuiDropdownManual: [{
1256
+ type: i0.Input
1257
+ }] } });
1112
1258
 
1113
- var TuiDropdownPositionSidedDirective = /** @class */ (function (_super) {
1114
- __extends(TuiDropdownPositionSidedDirective, _super);
1115
- function TuiDropdownPositionSidedDirective(options, viewport, vertical) {
1116
- var _this = _super.call(this) || this;
1117
- _this.options = options;
1118
- _this.viewport = viewport;
1119
- _this.vertical = vertical;
1120
- _this.previous = _this.options.direction || 'bottom';
1121
- _this.tuiDropdownSided = '';
1122
- _this.tuiDropdownSidedOffset = 4;
1123
- _this.type = 'dropdown';
1124
- return _this;
1125
- }
1126
- TuiDropdownPositionSidedDirective.prototype.getPosition = function (rect) {
1127
- var _a, _b;
1128
- if (this.tuiDropdownSided === false) {
1129
- return this.vertical.getPosition(rect);
1130
- }
1131
- var height = rect.height, width = rect.width;
1132
- var hostRect = (_b = (_a = this.vertical.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : i2.EMPTY_CLIENT_RECT;
1133
- var viewport = this.viewport.getClientRect();
1134
- var _c = this.options, direction = _c.direction, minHeight = _c.minHeight, offset = _c.offset;
1135
- var align = this.options.align === 'center' ? 'left' : this.options.align;
1136
- var available = {
1137
- top: hostRect.bottom - viewport.top,
1138
- left: hostRect.left - offset - viewport.left,
1139
- right: viewport.right - hostRect.right - offset,
1140
- bottom: viewport.bottom - hostRect.top,
1141
- };
1142
- var position = {
1143
- top: hostRect.bottom - height + this.tuiDropdownSidedOffset + 1,
1144
- left: hostRect.left - width - offset,
1145
- right: hostRect.right + offset,
1146
- bottom: hostRect.top - this.tuiDropdownSidedOffset - 1, // 1 for border
1147
- };
1148
- var better = available.top > available.bottom ? 'top' : 'bottom';
1149
- var maxLeft = available.left > available.right ? position.left : position.right;
1150
- var left = available[align] > width ? position[align] : maxLeft;
1151
- if ((available[this.previous] > minHeight && direction) ||
1152
- this.previous === better) {
1153
- return [position[this.previous], left];
1154
- }
1155
- this.previous = better;
1156
- return [position[better], left];
1157
- };
1158
- return TuiDropdownPositionSidedDirective;
1159
- }(i1$1.TuiPositionAccessor));
1160
- 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 });
1161
- TuiDropdownPositionSidedDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionSidedDirective, selector: "[tuiDropdownSided]", inputs: { tuiDropdownSided: "tuiDropdownSided", tuiDropdownSidedOffset: "tuiDropdownSidedOffset" }, providers: [
1162
- TuiDropdownPositionDirective,
1163
- i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
1164
- ], usesInheritance: true, ngImport: i0__namespace });
1165
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, decorators: [{
1166
- type: i0.Directive,
1167
- args: [{
1168
- selector: '[tuiDropdownSided]',
1169
- providers: [
1170
- TuiDropdownPositionDirective,
1171
- i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
1172
- ],
1173
- }]
1174
- }], ctorParameters: function () {
1175
- return [{ type: undefined, decorators: [{
1176
- type: i0.Inject,
1177
- args: [TUI_DROPDOWN_OPTIONS]
1178
- }] }, { type: i1__namespace$1.TuiRectAccessor, decorators: [{
1179
- type: i0.Inject,
1180
- args: [tokens.TUI_VIEWPORT]
1181
- }] }, { type: TuiDropdownPositionDirective, decorators: [{
1182
- type: i0.Inject,
1183
- args: [TuiDropdownPositionDirective]
1184
- }] }];
1185
- }, propDecorators: { tuiDropdownSided: [{
1186
- type: i0.Input
1187
- }], tuiDropdownSidedOffset: [{
1188
- type: i0.Input
1189
- }] } });
1259
+ var TuiDropdownPositionSidedDirective = /** @class */ (function (_super) {
1260
+ __extends(TuiDropdownPositionSidedDirective, _super);
1261
+ function TuiDropdownPositionSidedDirective(options, viewport, vertical) {
1262
+ var _this = _super.call(this) || this;
1263
+ _this.options = options;
1264
+ _this.viewport = viewport;
1265
+ _this.vertical = vertical;
1266
+ _this.previous = _this.options.direction || 'bottom';
1267
+ _this.tuiDropdownSided = '';
1268
+ _this.tuiDropdownSidedOffset = 4;
1269
+ _this.type = 'dropdown';
1270
+ return _this;
1271
+ }
1272
+ TuiDropdownPositionSidedDirective.prototype.getPosition = function (rect) {
1273
+ var _a, _b;
1274
+ if (this.tuiDropdownSided === false) {
1275
+ return this.vertical.getPosition(rect);
1276
+ }
1277
+ var height = rect.height, width = rect.width;
1278
+ var hostRect = (_b = (_a = this.vertical.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : i2.EMPTY_CLIENT_RECT;
1279
+ var viewport = this.viewport.getClientRect();
1280
+ var _c = this.options, direction = _c.direction, minHeight = _c.minHeight, offset = _c.offset;
1281
+ var align = this.options.align === 'center' ? 'left' : this.options.align;
1282
+ var available = {
1283
+ top: hostRect.bottom - viewport.top,
1284
+ left: hostRect.left - offset - viewport.left,
1285
+ right: viewport.right - hostRect.right - offset,
1286
+ bottom: viewport.bottom - hostRect.top,
1287
+ };
1288
+ var position = {
1289
+ top: hostRect.bottom - height + this.tuiDropdownSidedOffset + 1,
1290
+ left: hostRect.left - width - offset,
1291
+ right: hostRect.right + offset,
1292
+ bottom: hostRect.top - this.tuiDropdownSidedOffset - 1, // 1 for border
1293
+ };
1294
+ var better = available.top > available.bottom ? 'top' : 'bottom';
1295
+ var maxLeft = available.left > available.right ? position.left : position.right;
1296
+ var left = available[align] > width ? position[align] : maxLeft;
1297
+ if ((available[this.previous] > minHeight && direction) ||
1298
+ this.previous === better) {
1299
+ return [position[this.previous], left];
1300
+ }
1301
+ this.previous = better;
1302
+ return [position[better], left];
1303
+ };
1304
+ return TuiDropdownPositionSidedDirective;
1305
+ }(i1$1.TuiPositionAccessor));
1306
+ 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 });
1307
+ TuiDropdownPositionSidedDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionSidedDirective, selector: "[tuiDropdownSided]", inputs: { tuiDropdownSided: "tuiDropdownSided", tuiDropdownSidedOffset: "tuiDropdownSidedOffset" }, providers: [
1308
+ TuiDropdownPositionDirective,
1309
+ i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
1310
+ ], usesInheritance: true, ngImport: i0__namespace });
1311
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, decorators: [{
1312
+ type: i0.Directive,
1313
+ args: [{
1314
+ selector: '[tuiDropdownSided]',
1315
+ providers: [
1316
+ TuiDropdownPositionDirective,
1317
+ i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
1318
+ ],
1319
+ }]
1320
+ }], ctorParameters: function () {
1321
+ return [{ type: undefined, decorators: [{
1322
+ type: i0.Inject,
1323
+ args: [TUI_DROPDOWN_OPTIONS]
1324
+ }] }, { type: i1__namespace$1.TuiRectAccessor, decorators: [{
1325
+ type: i0.Inject,
1326
+ args: [tokens.TUI_VIEWPORT]
1327
+ }] }, { type: TuiDropdownPositionDirective, decorators: [{
1328
+ type: i0.Inject,
1329
+ args: [TuiDropdownPositionDirective]
1330
+ }] }];
1331
+ }, propDecorators: { tuiDropdownSided: [{
1332
+ type: i0.Input
1333
+ }], tuiDropdownSidedOffset: [{
1334
+ type: i0.Input
1335
+ }] } });
1190
1336
 
1191
- var TuiDropdownSelectionDirective = /** @class */ (function (_super) {
1192
- __extends(TuiDropdownSelectionDirective, _super);
1193
- function TuiDropdownSelectionDirective(range, doc, selection$, el, vcr, dropdown) {
1194
- var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
1195
- _this.range = range;
1196
- _this.doc = doc;
1197
- _this.selection$ = selection$;
1198
- _this.el = el;
1199
- _this.vcr = vcr;
1200
- _this.dropdown = dropdown;
1201
- _this.handler$ = new i1.BehaviorSubject(i2.ALWAYS_TRUE_HANDLER);
1202
- _this.stream$ = i1.combineLatest([
1203
- _this.handler$,
1204
- _this.selection$.pipe(operators.map(function () { return _this.getRange(); }), operators.distinctUntilChanged(function (x, y) { return x.startOffset === y.startOffset && x.endOffset === y.endOffset; })),
1205
- ]).pipe(operators.map(function (_b) {
1206
- var _c = __read(_b, 2), handler = _c[0], range = _c[1];
1207
- var contained = _this.el.nativeElement.contains(range.commonAncestorContainer);
1208
- _this.range =
1209
- contained && i2.tuiIsTextNode(range.commonAncestorContainer)
1210
- ? range
1211
- : _this.range;
1212
- return (contained && handler(_this.range)) || _this.inDropdown(range);
1213
- }));
1214
- _this.position = 'selection';
1215
- _this.type = 'dropdown';
1216
- return _this;
1217
- }
1218
- Object.defineProperty(TuiDropdownSelectionDirective.prototype, "tuiDropdownSelection", {
1219
- set: function (visible) {
1220
- if (!i2.tuiIsString(visible)) {
1221
- this.handler$.next(visible);
1222
- }
1223
- },
1224
- enumerable: false,
1225
- configurable: true
1226
- });
1227
- TuiDropdownSelectionDirective.prototype.getClientRect = function () {
1228
- switch (this.position) {
1229
- case 'tag': {
1230
- var commonAncestorContainer = this.range.commonAncestorContainer;
1231
- var element = i2.tuiIsElement(commonAncestorContainer)
1232
- ? commonAncestorContainer
1233
- : commonAncestorContainer.parentNode;
1234
- return element && i2.tuiIsElement(element)
1235
- ? element.getBoundingClientRect()
1236
- : i2.EMPTY_CLIENT_RECT;
1237
- }
1238
- case 'word':
1239
- return utils.tuiGetWordRange(this.range).getBoundingClientRect();
1240
- default:
1241
- return this.range.getBoundingClientRect();
1242
- }
1243
- };
1244
- TuiDropdownSelectionDirective.prototype.ngOnDestroy = function () {
1245
- if (this.ghost) {
1246
- this.vcr.element.nativeElement.removeChild(this.ghost);
1247
- }
1248
- };
1249
- TuiDropdownSelectionDirective.prototype.getRange = function () {
1250
- var active = i2.tuiGetNativeFocused(this.doc);
1251
- var selection = this.doc.getSelection();
1252
- var range = active && i2.tuiIsTextfield(active) && this.el.nativeElement.contains(active)
1253
- ? this.veryVerySadInputFix(active)
1254
- : ((selection === null || selection === void 0 ? void 0 : selection.rangeCount) && selection.getRangeAt(0)) || this.range;
1255
- return range.cloneRange();
1256
- };
1257
- /**
1258
- * Check if given range is at least partially inside dropdown
1259
- */
1260
- TuiDropdownSelectionDirective.prototype.inDropdown = function (range) {
1261
- var startContainer = range.startContainer, endContainer = range.endContainer;
1262
- var nativeElement = this.el.nativeElement;
1263
- var inDropdown = this.boxContains(range.commonAncestorContainer);
1264
- var hostToDropdown = this.boxContains(endContainer) && nativeElement.contains(startContainer);
1265
- var dropdownToHost = this.boxContains(startContainer) && nativeElement.contains(endContainer);
1266
- return inDropdown || hostToDropdown || dropdownToHost;
1267
- };
1268
- TuiDropdownSelectionDirective.prototype.veryVerySadInputFix = function (element) {
1269
- var _b = this.ghost, ghost = _b === void 0 ? this.initGhost(element) : _b;
1270
- var _c = element.getBoundingClientRect(), top = _c.top, left = _c.left, width = _c.width, height = _c.height;
1271
- var selectionStart = element.selectionStart, selectionEnd = element.selectionEnd, value = element.value;
1272
- var range = this.doc.createRange();
1273
- var hostRect = this.el.nativeElement.getBoundingClientRect();
1274
- ghost.style.top = i2.tuiPx(top - hostRect.top);
1275
- ghost.style.left = i2.tuiPx(left - hostRect.left);
1276
- ghost.style.width = i2.tuiPx(width);
1277
- ghost.style.height = i2.tuiPx(height);
1278
- ghost.textContent = i2.CHAR_ZERO_WIDTH_SPACE + value + i2.CHAR_NO_BREAK_SPACE;
1279
- range.setStart(ghost.firstChild, selectionStart || 0);
1280
- range.setEnd(ghost.firstChild, selectionEnd || 0);
1281
- return range;
1282
- };
1283
- /**
1284
- * Check if Node is inside dropdown
1285
- */
1286
- TuiDropdownSelectionDirective.prototype.boxContains = function (node) {
1287
- var _a;
1288
- return !!((_a = this.dropdown.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.location.nativeElement.contains(node));
1289
- };
1290
- /**
1291
- * Create an invisible DIV styled exactly like input/textarea element inside directive
1292
- */
1293
- TuiDropdownSelectionDirective.prototype.initGhost = function (element) {
1294
- var ghost = this.doc.createElement('div');
1295
- var _b = getComputedStyle(element), font = _b.font, letterSpacing = _b.letterSpacing, textTransform = _b.textTransform, padding = _b.padding;
1296
- ghost.style.position = 'absolute';
1297
- ghost.style.pointerEvents = 'none';
1298
- ghost.style.opacity = '0';
1299
- ghost.style.whiteSpace = 'pre-wrap';
1300
- ghost.style.font = font;
1301
- ghost.style.letterSpacing = letterSpacing;
1302
- ghost.style.textTransform = textTransform;
1303
- ghost.style.padding = padding;
1304
- this.vcr.element.nativeElement.appendChild(ghost);
1305
- this.ghost = ghost;
1306
- return ghost;
1307
- };
1308
- return TuiDropdownSelectionDirective;
1309
- }(i1$1.TuiDriver));
1310
- 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 });
1311
- 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: [
1312
- i1$1.tuiAsDriver(TuiDropdownSelectionDirective),
1313
- i1$1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
1314
- ], usesInheritance: true, ngImport: i0__namespace });
1315
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownSelectionDirective, decorators: [{
1316
- type: i0.Directive,
1317
- args: [{
1318
- selector: '[tuiDropdown][tuiDropdownSelection]',
1319
- providers: [
1320
- i1$1.tuiAsDriver(TuiDropdownSelectionDirective),
1321
- i1$1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
1322
- ],
1323
- }]
1324
- }], ctorParameters: function () {
1325
- return [{ type: Range, decorators: [{
1326
- type: i0.Inject,
1327
- args: [i2.TUI_RANGE]
1328
- }] }, { type: Document, decorators: [{
1329
- type: i0.Inject,
1330
- args: [common$1.DOCUMENT]
1331
- }] }, { type: i1__namespace.Observable, decorators: [{
1332
- type: i0.Inject,
1333
- args: [tokens.TUI_SELECTION_STREAM]
1334
- }] }, { type: i0__namespace.ElementRef, decorators: [{
1335
- type: i0.Inject,
1336
- args: [i0.ElementRef]
1337
- }] }, { type: i0__namespace.ViewContainerRef, decorators: [{
1338
- type: i0.Inject,
1339
- args: [i0.ViewContainerRef]
1340
- }] }, { type: TuiDropdownDirective, decorators: [{
1341
- type: i0.Inject,
1342
- args: [TuiDropdownDirective]
1343
- }] }];
1344
- }, propDecorators: { position: [{
1345
- type: i0.Input,
1346
- args: ['tuiDropdownSelectionPosition']
1347
- }], tuiDropdownSelection: [{
1348
- type: i0.Input
1349
- }] } });
1337
+ var TuiDropdownSelectionDirective = /** @class */ (function (_super) {
1338
+ __extends(TuiDropdownSelectionDirective, _super);
1339
+ function TuiDropdownSelectionDirective(range, doc, selection$, el, vcr, dropdown) {
1340
+ var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
1341
+ _this.range = range;
1342
+ _this.doc = doc;
1343
+ _this.selection$ = selection$;
1344
+ _this.el = el;
1345
+ _this.vcr = vcr;
1346
+ _this.dropdown = dropdown;
1347
+ _this.handler$ = new i1.BehaviorSubject(i2.ALWAYS_TRUE_HANDLER);
1348
+ _this.stream$ = i1.combineLatest([
1349
+ _this.handler$,
1350
+ _this.selection$.pipe(operators.map(function () { return _this.getRange(); }), operators.distinctUntilChanged(function (x, y) { return x.startOffset === y.startOffset && x.endOffset === y.endOffset; })),
1351
+ ]).pipe(operators.map(function (_b) {
1352
+ var _c = __read(_b, 2), handler = _c[0], range = _c[1];
1353
+ var contained = _this.el.nativeElement.contains(range.commonAncestorContainer);
1354
+ _this.range =
1355
+ contained && i2.tuiIsTextNode(range.commonAncestorContainer)
1356
+ ? range
1357
+ : _this.range;
1358
+ return (contained && handler(_this.range)) || _this.inDropdown(range);
1359
+ }));
1360
+ _this.position = 'selection';
1361
+ _this.type = 'dropdown';
1362
+ return _this;
1363
+ }
1364
+ Object.defineProperty(TuiDropdownSelectionDirective.prototype, "tuiDropdownSelection", {
1365
+ set: function (visible) {
1366
+ if (!i2.tuiIsString(visible)) {
1367
+ this.handler$.next(visible);
1368
+ }
1369
+ },
1370
+ enumerable: false,
1371
+ configurable: true
1372
+ });
1373
+ TuiDropdownSelectionDirective.prototype.getClientRect = function () {
1374
+ switch (this.position) {
1375
+ case 'tag': {
1376
+ var commonAncestorContainer = this.range.commonAncestorContainer;
1377
+ var element = i2.tuiIsElement(commonAncestorContainer)
1378
+ ? commonAncestorContainer
1379
+ : commonAncestorContainer.parentNode;
1380
+ return element && i2.tuiIsElement(element)
1381
+ ? element.getBoundingClientRect()
1382
+ : i2.EMPTY_CLIENT_RECT;
1383
+ }
1384
+ case 'word':
1385
+ return utils.tuiGetWordRange(this.range).getBoundingClientRect();
1386
+ default:
1387
+ return this.range.getBoundingClientRect();
1388
+ }
1389
+ };
1390
+ TuiDropdownSelectionDirective.prototype.ngOnDestroy = function () {
1391
+ if (this.ghost) {
1392
+ this.vcr.element.nativeElement.removeChild(this.ghost);
1393
+ }
1394
+ };
1395
+ TuiDropdownSelectionDirective.prototype.getRange = function () {
1396
+ var active = i2.tuiGetNativeFocused(this.doc);
1397
+ var selection = this.doc.getSelection();
1398
+ var range = active && i2.tuiIsTextfield(active) && this.el.nativeElement.contains(active)
1399
+ ? this.veryVerySadInputFix(active)
1400
+ : ((selection === null || selection === void 0 ? void 0 : selection.rangeCount) && selection.getRangeAt(0)) || this.range;
1401
+ return range.cloneRange();
1402
+ };
1403
+ /**
1404
+ * Check if given range is at least partially inside dropdown
1405
+ */
1406
+ TuiDropdownSelectionDirective.prototype.inDropdown = function (range) {
1407
+ var startContainer = range.startContainer, endContainer = range.endContainer;
1408
+ var nativeElement = this.el.nativeElement;
1409
+ var inDropdown = this.boxContains(range.commonAncestorContainer);
1410
+ var hostToDropdown = this.boxContains(endContainer) && nativeElement.contains(startContainer);
1411
+ var dropdownToHost = this.boxContains(startContainer) && nativeElement.contains(endContainer);
1412
+ return inDropdown || hostToDropdown || dropdownToHost;
1413
+ };
1414
+ TuiDropdownSelectionDirective.prototype.veryVerySadInputFix = function (element) {
1415
+ var _b = this.ghost, ghost = _b === void 0 ? this.initGhost(element) : _b;
1416
+ var _c = element.getBoundingClientRect(), top = _c.top, left = _c.left, width = _c.width, height = _c.height;
1417
+ var selectionStart = element.selectionStart, selectionEnd = element.selectionEnd, value = element.value;
1418
+ var range = this.doc.createRange();
1419
+ var hostRect = this.el.nativeElement.getBoundingClientRect();
1420
+ ghost.style.top = i2.tuiPx(top - hostRect.top);
1421
+ ghost.style.left = i2.tuiPx(left - hostRect.left);
1422
+ ghost.style.width = i2.tuiPx(width);
1423
+ ghost.style.height = i2.tuiPx(height);
1424
+ ghost.textContent = i2.CHAR_ZERO_WIDTH_SPACE + value + i2.CHAR_NO_BREAK_SPACE;
1425
+ range.setStart(ghost.firstChild, selectionStart || 0);
1426
+ range.setEnd(ghost.firstChild, selectionEnd || 0);
1427
+ return range;
1428
+ };
1429
+ /**
1430
+ * Check if Node is inside dropdown
1431
+ */
1432
+ TuiDropdownSelectionDirective.prototype.boxContains = function (node) {
1433
+ var _a;
1434
+ return !!((_a = this.dropdown.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.location.nativeElement.contains(node));
1435
+ };
1436
+ /**
1437
+ * Create an invisible DIV styled exactly like input/textarea element inside directive
1438
+ */
1439
+ TuiDropdownSelectionDirective.prototype.initGhost = function (element) {
1440
+ var ghost = this.doc.createElement('div');
1441
+ var _b = getComputedStyle(element), font = _b.font, letterSpacing = _b.letterSpacing, textTransform = _b.textTransform, padding = _b.padding;
1442
+ ghost.style.position = 'absolute';
1443
+ ghost.style.pointerEvents = 'none';
1444
+ ghost.style.opacity = '0';
1445
+ ghost.style.whiteSpace = 'pre-wrap';
1446
+ ghost.style.font = font;
1447
+ ghost.style.letterSpacing = letterSpacing;
1448
+ ghost.style.textTransform = textTransform;
1449
+ ghost.style.padding = padding;
1450
+ this.vcr.element.nativeElement.appendChild(ghost);
1451
+ this.ghost = ghost;
1452
+ return ghost;
1453
+ };
1454
+ return TuiDropdownSelectionDirective;
1455
+ }(i1$1.TuiDriver));
1456
+ 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 });
1457
+ 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: [
1458
+ i1$1.tuiAsDriver(TuiDropdownSelectionDirective),
1459
+ i1$1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
1460
+ ], usesInheritance: true, ngImport: i0__namespace });
1461
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownSelectionDirective, decorators: [{
1462
+ type: i0.Directive,
1463
+ args: [{
1464
+ selector: '[tuiDropdown][tuiDropdownSelection]',
1465
+ providers: [
1466
+ i1$1.tuiAsDriver(TuiDropdownSelectionDirective),
1467
+ i1$1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
1468
+ ],
1469
+ }]
1470
+ }], ctorParameters: function () {
1471
+ return [{ type: Range, decorators: [{
1472
+ type: i0.Inject,
1473
+ args: [i2.TUI_RANGE]
1474
+ }] }, { type: Document, decorators: [{
1475
+ type: i0.Inject,
1476
+ args: [common$1.DOCUMENT]
1477
+ }] }, { type: i1__namespace.Observable, decorators: [{
1478
+ type: i0.Inject,
1479
+ args: [tokens.TUI_SELECTION_STREAM]
1480
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
1481
+ type: i0.Inject,
1482
+ args: [i0.ElementRef]
1483
+ }] }, { type: i0__namespace.ViewContainerRef, decorators: [{
1484
+ type: i0.Inject,
1485
+ args: [i0.ViewContainerRef]
1486
+ }] }, { type: TuiDropdownDirective, decorators: [{
1487
+ type: i0.Inject,
1488
+ args: [TuiDropdownDirective]
1489
+ }] }];
1490
+ }, propDecorators: { position: [{
1491
+ type: i0.Input,
1492
+ args: ['tuiDropdownSelectionPosition']
1493
+ }], tuiDropdownSelection: [{
1494
+ type: i0.Input
1495
+ }] } });
1350
1496
 
1351
- var TuiDropdownModule = /** @class */ (function () {
1352
- function TuiDropdownModule() {
1353
- }
1354
- return TuiDropdownModule;
1355
- }());
1356
- TuiDropdownModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1357
- TuiDropdownModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, declarations: [TuiDropdownDirective,
1358
- TuiDropdownComponent,
1359
- TuiDropdownOpenDirective,
1360
- TuiDropdownOptionsDirective,
1361
- TuiDropdownHostDirective,
1362
- TuiDropdownDriverDirective,
1363
- TuiDropdownManualDirective,
1364
- TuiDropdownHoverDirective,
1365
- TuiDropdownContextDirective,
1366
- TuiDropdownPositionDirective,
1367
- TuiDropdownPositionSidedDirective,
1368
- TuiDropdownSelectionDirective], imports: [i3.PolymorpheusModule,
1369
- i2.TuiActiveZoneModule,
1370
- i2.TuiOverscrollModule,
1371
- i1$2.TuiScrollbarModule,
1372
- i2.TuiHoveredModule], exports: [TuiDropdownDirective,
1373
- TuiDropdownComponent,
1374
- TuiDropdownOpenDirective,
1375
- TuiDropdownOptionsDirective,
1376
- TuiDropdownHostDirective,
1377
- TuiDropdownDriverDirective,
1378
- TuiDropdownManualDirective,
1379
- TuiDropdownHoverDirective,
1380
- TuiDropdownContextDirective,
1381
- TuiDropdownPositionDirective,
1382
- TuiDropdownPositionSidedDirective,
1383
- TuiDropdownSelectionDirective] });
1384
- TuiDropdownModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, imports: [[
1385
- i3.PolymorpheusModule,
1386
- i2.TuiActiveZoneModule,
1387
- i2.TuiOverscrollModule,
1388
- i1$2.TuiScrollbarModule,
1389
- i2.TuiHoveredModule,
1390
- ]] });
1391
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, decorators: [{
1392
- type: i0.NgModule,
1393
- args: [{
1394
- imports: [
1395
- i3.PolymorpheusModule,
1396
- i2.TuiActiveZoneModule,
1397
- i2.TuiOverscrollModule,
1398
- i1$2.TuiScrollbarModule,
1399
- i2.TuiHoveredModule,
1400
- ],
1401
- declarations: [
1402
- TuiDropdownDirective,
1403
- TuiDropdownComponent,
1404
- TuiDropdownOpenDirective,
1405
- TuiDropdownOptionsDirective,
1406
- TuiDropdownHostDirective,
1407
- TuiDropdownDriverDirective,
1408
- TuiDropdownManualDirective,
1409
- TuiDropdownHoverDirective,
1410
- TuiDropdownContextDirective,
1411
- TuiDropdownPositionDirective,
1412
- TuiDropdownPositionSidedDirective,
1413
- TuiDropdownSelectionDirective,
1414
- ],
1415
- exports: [
1416
- TuiDropdownDirective,
1417
- TuiDropdownComponent,
1418
- TuiDropdownOpenDirective,
1419
- TuiDropdownOptionsDirective,
1420
- TuiDropdownHostDirective,
1421
- TuiDropdownDriverDirective,
1422
- TuiDropdownManualDirective,
1423
- TuiDropdownHoverDirective,
1424
- TuiDropdownContextDirective,
1425
- TuiDropdownPositionDirective,
1426
- TuiDropdownPositionSidedDirective,
1427
- TuiDropdownSelectionDirective,
1428
- ],
1429
- }]
1430
- }] });
1497
+ var TuiDropdownModule = /** @class */ (function () {
1498
+ function TuiDropdownModule() {
1499
+ }
1500
+ return TuiDropdownModule;
1501
+ }());
1502
+ TuiDropdownModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1503
+ TuiDropdownModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, declarations: [TuiDropdownDirective,
1504
+ TuiDropdownComponent,
1505
+ TuiDropdownOpenDirective,
1506
+ TuiDropdownOptionsDirective,
1507
+ TuiDropdownHostDirective,
1508
+ TuiDropdownDriverDirective,
1509
+ TuiDropdownManualDirective,
1510
+ TuiDropdownHoverDirective,
1511
+ TuiDropdownContextDirective,
1512
+ TuiDropdownPositionDirective,
1513
+ TuiDropdownPositionSidedDirective,
1514
+ TuiDropdownSelectionDirective], imports: [i3.PolymorpheusModule,
1515
+ i2.TuiActiveZoneModule,
1516
+ i2.TuiOverscrollModule,
1517
+ i1$2.TuiScrollbarModule,
1518
+ i2.TuiHoveredModule], exports: [TuiDropdownDirective,
1519
+ TuiDropdownComponent,
1520
+ TuiDropdownOpenDirective,
1521
+ TuiDropdownOptionsDirective,
1522
+ TuiDropdownHostDirective,
1523
+ TuiDropdownDriverDirective,
1524
+ TuiDropdownManualDirective,
1525
+ TuiDropdownHoverDirective,
1526
+ TuiDropdownContextDirective,
1527
+ TuiDropdownPositionDirective,
1528
+ TuiDropdownPositionSidedDirective,
1529
+ TuiDropdownSelectionDirective] });
1530
+ TuiDropdownModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, imports: [[
1531
+ i3.PolymorpheusModule,
1532
+ i2.TuiActiveZoneModule,
1533
+ i2.TuiOverscrollModule,
1534
+ i1$2.TuiScrollbarModule,
1535
+ i2.TuiHoveredModule,
1536
+ ]] });
1537
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, decorators: [{
1538
+ type: i0.NgModule,
1539
+ args: [{
1540
+ imports: [
1541
+ i3.PolymorpheusModule,
1542
+ i2.TuiActiveZoneModule,
1543
+ i2.TuiOverscrollModule,
1544
+ i1$2.TuiScrollbarModule,
1545
+ i2.TuiHoveredModule,
1546
+ ],
1547
+ declarations: [
1548
+ TuiDropdownDirective,
1549
+ TuiDropdownComponent,
1550
+ TuiDropdownOpenDirective,
1551
+ TuiDropdownOptionsDirective,
1552
+ TuiDropdownHostDirective,
1553
+ TuiDropdownDriverDirective,
1554
+ TuiDropdownManualDirective,
1555
+ TuiDropdownHoverDirective,
1556
+ TuiDropdownContextDirective,
1557
+ TuiDropdownPositionDirective,
1558
+ TuiDropdownPositionSidedDirective,
1559
+ TuiDropdownSelectionDirective,
1560
+ ],
1561
+ exports: [
1562
+ TuiDropdownDirective,
1563
+ TuiDropdownComponent,
1564
+ TuiDropdownOpenDirective,
1565
+ TuiDropdownOptionsDirective,
1566
+ TuiDropdownHostDirective,
1567
+ TuiDropdownDriverDirective,
1568
+ TuiDropdownManualDirective,
1569
+ TuiDropdownHoverDirective,
1570
+ TuiDropdownContextDirective,
1571
+ TuiDropdownPositionDirective,
1572
+ TuiDropdownPositionSidedDirective,
1573
+ TuiDropdownSelectionDirective,
1574
+ ],
1575
+ }]
1576
+ }] });
1431
1577
 
1432
- /**
1433
- * Generated bundle index. Do not edit.
1434
- */
1578
+ /**
1579
+ * Generated bundle index. Do not edit.
1580
+ */
1435
1581
 
1436
- exports.TUI_DROPDOWN_COMPONENT = TUI_DROPDOWN_COMPONENT;
1437
- exports.TUI_DROPDOWN_DEFAULT_OPTIONS = TUI_DROPDOWN_DEFAULT_OPTIONS;
1438
- exports.TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS = TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS;
1439
- exports.TUI_DROPDOWN_HOVER_OPTIONS = TUI_DROPDOWN_HOVER_OPTIONS;
1440
- exports.TUI_DROPDOWN_OPTIONS = TUI_DROPDOWN_OPTIONS;
1441
- exports.TuiDropdownComponent = TuiDropdownComponent;
1442
- exports.TuiDropdownContextDirective = TuiDropdownContextDirective;
1443
- exports.TuiDropdownDirective = TuiDropdownDirective;
1444
- exports.TuiDropdownDriverDirective = TuiDropdownDriverDirective;
1445
- exports.TuiDropdownHostDirective = TuiDropdownHostDirective;
1446
- exports.TuiDropdownHoverDirective = TuiDropdownHoverDirective;
1447
- exports.TuiDropdownManualDirective = TuiDropdownManualDirective;
1448
- exports.TuiDropdownModule = TuiDropdownModule;
1449
- exports.TuiDropdownOpenDirective = TuiDropdownOpenDirective;
1450
- exports.TuiDropdownOptionsDirective = TuiDropdownOptionsDirective;
1451
- exports.TuiDropdownPositionDirective = TuiDropdownPositionDirective;
1452
- exports.TuiDropdownPositionSidedDirective = TuiDropdownPositionSidedDirective;
1453
- exports.TuiDropdownSelectionDirective = TuiDropdownSelectionDirective;
1454
- exports.tuiDropdownHoverOptionsProvider = tuiDropdownHoverOptionsProvider;
1455
- exports.tuiDropdownOptionsProvider = tuiDropdownOptionsProvider;
1582
+ exports.TUI_DROPDOWN_COMPONENT = TUI_DROPDOWN_COMPONENT;
1583
+ exports.TUI_DROPDOWN_DEFAULT_OPTIONS = TUI_DROPDOWN_DEFAULT_OPTIONS;
1584
+ exports.TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS = TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS;
1585
+ exports.TUI_DROPDOWN_HOVER_OPTIONS = TUI_DROPDOWN_HOVER_OPTIONS;
1586
+ exports.TUI_DROPDOWN_OPTIONS = TUI_DROPDOWN_OPTIONS;
1587
+ exports.TuiDropdownComponent = TuiDropdownComponent;
1588
+ exports.TuiDropdownContextDirective = TuiDropdownContextDirective;
1589
+ exports.TuiDropdownDirective = TuiDropdownDirective;
1590
+ exports.TuiDropdownDriverDirective = TuiDropdownDriverDirective;
1591
+ exports.TuiDropdownHostDirective = TuiDropdownHostDirective;
1592
+ exports.TuiDropdownHoverDirective = TuiDropdownHoverDirective;
1593
+ exports.TuiDropdownManualDirective = TuiDropdownManualDirective;
1594
+ exports.TuiDropdownModule = TuiDropdownModule;
1595
+ exports.TuiDropdownOpenDirective = TuiDropdownOpenDirective;
1596
+ exports.TuiDropdownOptionsDirective = TuiDropdownOptionsDirective;
1597
+ exports.TuiDropdownPositionDirective = TuiDropdownPositionDirective;
1598
+ exports.TuiDropdownPositionSidedDirective = TuiDropdownPositionSidedDirective;
1599
+ exports.TuiDropdownSelectionDirective = TuiDropdownSelectionDirective;
1600
+ exports.tuiDropdownHoverOptionsProvider = tuiDropdownHoverOptionsProvider;
1601
+ exports.tuiDropdownOptionsProvider = tuiDropdownOptionsProvider;
1456
1602
 
1457
- Object.defineProperty(exports, '__esModule', { value: true });
1603
+ Object.defineProperty(exports, '__esModule', { value: true });
1458
1604
 
1459
1605
  }));
1460
1606
  //# sourceMappingURL=taiga-ui-core-directives-dropdown.umd.js.map