@taiga-ui/core 3.59.0 → 3.60.0

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