@taiga-ui/kit 3.86.0 → 3.87.0-canary.95b57e0

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 (155) hide show
  1. package/bundles/taiga-ui-kit-components-accordion.umd.js +771 -625
  2. package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
  3. package/bundles/taiga-ui-kit-components-action.umd.js +598 -452
  4. package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
  5. package/bundles/taiga-ui-kit-components-avatar.umd.js +640 -494
  6. package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
  7. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +563 -417
  8. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
  9. package/bundles/taiga-ui-kit-components-calendar-month.umd.js +747 -601
  10. package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
  11. package/bundles/taiga-ui-kit-components-calendar-range.umd.js +725 -579
  12. package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
  13. package/bundles/taiga-ui-kit-components-carousel.umd.js +825 -679
  14. package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
  15. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +645 -499
  16. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
  17. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +585 -439
  18. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
  19. package/bundles/taiga-ui-kit-components-checkbox.umd.js +608 -462
  20. package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +1 -1
  21. package/bundles/taiga-ui-kit-components-combo-box.umd.js +834 -688
  22. package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
  23. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +656 -510
  24. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
  25. package/bundles/taiga-ui-kit-components-elastic-container.umd.js +587 -441
  26. package/bundles/taiga-ui-kit-components-elastic-container.umd.js.map +1 -1
  27. package/bundles/taiga-ui-kit-components-files.umd.js +806 -660
  28. package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
  29. package/bundles/taiga-ui-kit-components-filter.umd.js +607 -461
  30. package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
  31. package/bundles/taiga-ui-kit-components-input-copy.umd.js +706 -560
  32. package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
  33. package/bundles/taiga-ui-kit-components-input-count.umd.js +809 -663
  34. package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
  35. package/bundles/taiga-ui-kit-components-input-date-multi.umd.js +828 -682
  36. package/bundles/taiga-ui-kit-components-input-date-multi.umd.js.map +1 -1
  37. package/bundles/taiga-ui-kit-components-input-date-range.umd.js +973 -827
  38. package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
  39. package/bundles/taiga-ui-kit-components-input-date-time.umd.js +1042 -896
  40. package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
  41. package/bundles/taiga-ui-kit-components-input-date.umd.js +959 -813
  42. package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
  43. package/bundles/taiga-ui-kit-components-input-files.umd.js +975 -829
  44. package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
  45. package/bundles/taiga-ui-kit-components-input-inline.umd.js +612 -466
  46. package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
  47. package/bundles/taiga-ui-kit-components-input-month-range.umd.js +755 -609
  48. package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
  49. package/bundles/taiga-ui-kit-components-input-month.umd.js +788 -642
  50. package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
  51. package/bundles/taiga-ui-kit-components-input-number.umd.js +942 -796
  52. package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
  53. package/bundles/taiga-ui-kit-components-input-password.umd.js +720 -574
  54. package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
  55. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +811 -665
  56. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
  57. package/bundles/taiga-ui-kit-components-input-phone.umd.js +913 -767
  58. package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
  59. package/bundles/taiga-ui-kit-components-input-range.umd.js +796 -650
  60. package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
  61. package/bundles/taiga-ui-kit-components-input-slider.umd.js +737 -591
  62. package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
  63. package/bundles/taiga-ui-kit-components-input-tag.umd.js +1109 -963
  64. package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
  65. package/bundles/taiga-ui-kit-components-input-time.umd.js +1023 -877
  66. package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
  67. package/bundles/taiga-ui-kit-components-input-year.umd.js +705 -559
  68. package/bundles/taiga-ui-kit-components-input-year.umd.js.map +1 -1
  69. package/bundles/taiga-ui-kit-components-input.umd.js +661 -515
  70. package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
  71. package/bundles/taiga-ui-kit-components-items-with-more.umd.js +689 -543
  72. package/bundles/taiga-ui-kit-components-items-with-more.umd.js.map +1 -1
  73. package/bundles/taiga-ui-kit-components-line-clamp.umd.js +742 -596
  74. package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
  75. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +544 -398
  76. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js.map +1 -1
  77. package/bundles/taiga-ui-kit-components-multi-select.umd.js +1340 -1194
  78. package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
  79. package/bundles/taiga-ui-kit-components-pagination.umd.js +810 -664
  80. package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
  81. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js +152 -6
  82. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
  83. package/bundles/taiga-ui-kit-components-progress.umd.js +199 -32
  84. package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
  85. package/bundles/taiga-ui-kit-components-push.umd.js +152 -6
  86. package/bundles/taiga-ui-kit-components-push.umd.js.map +1 -1
  87. package/bundles/taiga-ui-kit-components-radio-block.umd.js +645 -499
  88. package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
  89. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +616 -470
  90. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
  91. package/bundles/taiga-ui-kit-components-radio-list.umd.js +628 -482
  92. package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +1 -1
  93. package/bundles/taiga-ui-kit-components-radio.umd.js +689 -543
  94. package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
  95. package/bundles/taiga-ui-kit-components-range.umd.js +811 -665
  96. package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
  97. package/bundles/taiga-ui-kit-components-rating.umd.js +646 -500
  98. package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
  99. package/bundles/taiga-ui-kit-components-routable-dialog.umd.js +586 -440
  100. package/bundles/taiga-ui-kit-components-routable-dialog.umd.js.map +1 -1
  101. package/bundles/taiga-ui-kit-components-select.umd.js +933 -787
  102. package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
  103. package/bundles/taiga-ui-kit-components-slider.umd.js +943 -797
  104. package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
  105. package/bundles/taiga-ui-kit-components-stepper.umd.js +764 -618
  106. package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
  107. package/bundles/taiga-ui-kit-components-tabs.umd.js +152 -6
  108. package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
  109. package/bundles/taiga-ui-kit-components-textarea.umd.js +969 -820
  110. package/bundles/taiga-ui-kit-components-textarea.umd.js.map +1 -1
  111. package/bundles/taiga-ui-kit-components-tiles.umd.js +839 -693
  112. package/bundles/taiga-ui-kit-components-tiles.umd.js.map +1 -1
  113. package/bundles/taiga-ui-kit-components-toggle.umd.js +711 -565
  114. package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
  115. package/bundles/taiga-ui-kit-constants.umd.js +152 -6
  116. package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
  117. package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js +637 -491
  118. package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js.map +1 -1
  119. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +605 -459
  120. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +1 -1
  121. package/bundles/taiga-ui-kit-directives-unmask-handler.umd.js +540 -394
  122. package/bundles/taiga-ui-kit-directives-unmask-handler.umd.js.map +1 -1
  123. package/bundles/taiga-ui-kit-pipes-field-error.umd.js +693 -547
  124. package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
  125. package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js +616 -470
  126. package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js.map +1 -1
  127. package/bundles/taiga-ui-kit-pipes-sort-countries.umd.js +524 -378
  128. package/bundles/taiga-ui-kit-pipes-sort-countries.umd.js.map +1 -1
  129. package/bundles/taiga-ui-kit-utils-mask.umd.js +152 -6
  130. package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
  131. package/bundles/taiga-ui-kit-utils-math.umd.js +152 -6
  132. package/bundles/taiga-ui-kit-utils-math.umd.js.map +1 -1
  133. package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js +152 -6
  134. package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
  135. package/components/progress/index.d.ts +1 -0
  136. package/components/progress/progress-bar/progress-bar.component.d.ts +6 -4
  137. package/components/progress/progress-circle/progress-circle.component.d.ts +3 -1
  138. package/components/progress/progress.options.d.ts +9 -0
  139. package/esm2015/components/checkbox-block/checkbox-block.component.js +1 -1
  140. package/esm2015/components/progress/index.js +2 -1
  141. package/esm2015/components/progress/progress-bar/progress-bar.component.js +11 -5
  142. package/esm2015/components/progress/progress-circle/progress-circle.component.js +10 -5
  143. package/esm2015/components/progress/progress.options.js +10 -0
  144. package/esm2015/components/radio-block/radio-block.component.js +1 -1
  145. package/esm2015/components/textarea/deprecated.js +7 -4
  146. package/esm2015/components/textarea/textarea.component.js +1 -1
  147. package/fesm2015/taiga-ui-kit-components-checkbox-block.js +1 -1
  148. package/fesm2015/taiga-ui-kit-components-checkbox-block.js.map +1 -1
  149. package/fesm2015/taiga-ui-kit-components-progress.js +28 -10
  150. package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
  151. package/fesm2015/taiga-ui-kit-components-radio-block.js +1 -1
  152. package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
  153. package/fesm2015/taiga-ui-kit-components-textarea.js +7 -4
  154. package/fesm2015/taiga-ui-kit-components-textarea.js.map +1 -1
  155. package/package.json +42 -42
@@ -1,845 +1,991 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@maskito/core'), require('@maskito/kit'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/kit/components/calendar-range'), require('@taiga-ui/kit/constants'), require('@taiga-ui/kit/tokens'), require('rxjs/operators'), require('@taiga-ui/kit/directives'), require('@maskito/angular'), require('@angular/common'), require('@tinkoff/ng-polymorpheus'), require('rxjs')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-date-range', ['exports', '@angular/core', '@angular/forms', '@maskito/core', '@maskito/kit', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/components/calendar-range', '@taiga-ui/kit/constants', '@taiga-ui/kit/tokens', 'rxjs/operators', '@taiga-ui/kit/directives', '@maskito/angular', '@angular/common', '@tinkoff/ng-polymorpheus', 'rxjs'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].kit = global["taiga-ui"].kit || {}, global["taiga-ui"].kit.components = global["taiga-ui"].kit.components || {}, global["taiga-ui"].kit.components["input-date-range"] = {}), global.ng.core, global.ng.forms, global.core, global.kit, global.i3, global.i1, global["taiga-ui"].kit.components["calendar-range"], global["taiga-ui"].kit.constants, global["taiga-ui"].kit.tokens, global.rxjs.operators, global["taiga-ui"].kit.directives, global.i5, global.ng.common, global.i7, global.rxjs));
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@maskito/core'), require('@maskito/kit'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/kit/components/calendar-range'), require('@taiga-ui/kit/constants'), require('@taiga-ui/kit/tokens'), require('rxjs/operators'), require('@taiga-ui/kit/directives'), require('@maskito/angular'), require('@angular/common'), require('@tinkoff/ng-polymorpheus'), require('rxjs')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-date-range', ['exports', '@angular/core', '@angular/forms', '@maskito/core', '@maskito/kit', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/components/calendar-range', '@taiga-ui/kit/constants', '@taiga-ui/kit/tokens', 'rxjs/operators', '@taiga-ui/kit/directives', '@maskito/angular', '@angular/common', '@tinkoff/ng-polymorpheus', 'rxjs'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].kit = global["taiga-ui"].kit || {}, global["taiga-ui"].kit.components = global["taiga-ui"].kit.components || {}, global["taiga-ui"].kit.components["input-date-range"] = {}), global.ng.core, global.ng.forms, global.core, global.kit, global.i3, global.i1, global["taiga-ui"].kit.components["calendar-range"], global["taiga-ui"].kit.constants, global["taiga-ui"].kit.tokens, global.rxjs.operators, global["taiga-ui"].kit.directives, global.i5, global.ng.common, global.i7, global.rxjs));
5
5
  })(this, (function (exports, i0, i8, core, kit, i3, i1, i2, constants, tokens, operators, i4, i5, i6, i7, i9) { '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 i8__namespace = /*#__PURE__*/_interopNamespace(i8);
27
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
28
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
30
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
31
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
32
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
33
- var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
34
- var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
27
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
28
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
30
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
31
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
32
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
33
+ var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
34
+ var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
35
35
 
36
- /*! *****************************************************************************
37
- Copyright (c) Microsoft Corporation.
36
+ /******************************************************************************
37
+ Copyright (c) Microsoft Corporation.
38
38
 
39
- Permission to use, copy, modify, and/or distribute this software for any
40
- purpose with or without fee is hereby granted.
39
+ Permission to use, copy, modify, and/or distribute this software for any
40
+ purpose with or without fee is hereby granted.
41
41
 
42
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
43
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
44
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
45
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
46
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
47
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
48
- PERFORMANCE OF THIS SOFTWARE.
49
- ***************************************************************************** */
50
- /* global Reflect, Promise */
51
- var extendStatics = function (d, b) {
52
- extendStatics = Object.setPrototypeOf ||
53
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
54
- function (d, b) { for (var p in b)
55
- if (Object.prototype.hasOwnProperty.call(b, p))
56
- d[p] = b[p]; };
57
- return extendStatics(d, b);
58
- };
59
- function __extends(d, b) {
60
- if (typeof b !== "function" && b !== null)
61
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
62
- extendStatics(d, b);
63
- function __() { this.constructor = d; }
64
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
65
- }
66
- var __assign = function () {
67
- __assign = Object.assign || function __assign(t) {
68
- for (var s, i = 1, n = arguments.length; i < n; i++) {
69
- s = arguments[i];
70
- for (var p in s)
71
- if (Object.prototype.hasOwnProperty.call(s, p))
72
- t[p] = s[p];
73
- }
74
- return t;
75
- };
76
- return __assign.apply(this, arguments);
77
- };
78
- function __rest(s, e) {
79
- var t = {};
80
- for (var p in s)
81
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
82
- t[p] = s[p];
83
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
84
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
85
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
86
- t[p[i]] = s[p[i]];
87
- }
88
- return t;
89
- }
90
- function __decorate(decorators, target, key, desc) {
91
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
92
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
93
- r = Reflect.decorate(decorators, target, key, desc);
94
- else
95
- for (var i = decorators.length - 1; i >= 0; i--)
96
- if (d = decorators[i])
97
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
98
- return c > 3 && r && Object.defineProperty(target, key, r), r;
99
- }
100
- function __param(paramIndex, decorator) {
101
- return function (target, key) { decorator(target, key, paramIndex); };
102
- }
103
- function __metadata(metadataKey, metadataValue) {
104
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
105
- return Reflect.metadata(metadataKey, metadataValue);
106
- }
107
- function __awaiter(thisArg, _arguments, P, generator) {
108
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
109
- return new (P || (P = Promise))(function (resolve, reject) {
110
- function fulfilled(value) { try {
111
- step(generator.next(value));
112
- }
113
- catch (e) {
114
- reject(e);
115
- } }
116
- function rejected(value) { try {
117
- step(generator["throw"](value));
118
- }
119
- catch (e) {
120
- reject(e);
121
- } }
122
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
123
- step((generator = generator.apply(thisArg, _arguments || [])).next());
124
- });
125
- }
126
- function __generator(thisArg, body) {
127
- var _ = { label: 0, sent: function () { if (t[0] & 1)
128
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
129
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
130
- function verb(n) { return function (v) { return step([n, v]); }; }
131
- function step(op) {
132
- if (f)
133
- throw new TypeError("Generator is already executing.");
134
- while (_)
135
- try {
136
- 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)
137
- return t;
138
- if (y = 0, t)
139
- op = [op[0] & 2, t.value];
140
- switch (op[0]) {
141
- case 0:
142
- case 1:
143
- t = op;
144
- break;
145
- case 4:
146
- _.label++;
147
- return { value: op[1], done: false };
148
- case 5:
149
- _.label++;
150
- y = op[1];
151
- op = [0];
152
- continue;
153
- case 7:
154
- op = _.ops.pop();
155
- _.trys.pop();
156
- continue;
157
- default:
158
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
159
- _ = 0;
160
- continue;
161
- }
162
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
163
- _.label = op[1];
164
- break;
165
- }
166
- if (op[0] === 6 && _.label < t[1]) {
167
- _.label = t[1];
168
- t = op;
169
- break;
170
- }
171
- if (t && _.label < t[2]) {
172
- _.label = t[2];
173
- _.ops.push(op);
174
- break;
175
- }
176
- if (t[2])
177
- _.ops.pop();
178
- _.trys.pop();
179
- continue;
180
- }
181
- op = body.call(thisArg, _);
182
- }
183
- catch (e) {
184
- op = [6, e];
185
- y = 0;
186
- }
187
- finally {
188
- f = t = 0;
189
- }
190
- if (op[0] & 5)
191
- throw op[1];
192
- return { value: op[0] ? op[1] : void 0, done: true };
193
- }
194
- }
195
- var __createBinding = Object.create ? (function (o, m, k, k2) {
196
- if (k2 === undefined)
197
- k2 = k;
198
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
199
- }) : (function (o, m, k, k2) {
200
- if (k2 === undefined)
201
- k2 = k;
202
- o[k2] = m[k];
203
- });
204
- function __exportStar(m, o) {
205
- for (var p in m)
206
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
207
- __createBinding(o, m, p);
208
- }
209
- function __values(o) {
210
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
211
- if (m)
212
- return m.call(o);
213
- if (o && typeof o.length === "number")
214
- return {
215
- next: function () {
216
- if (o && i >= o.length)
217
- o = void 0;
218
- return { value: o && o[i++], done: !o };
219
- }
220
- };
221
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
222
- }
223
- function __read(o, n) {
224
- var m = typeof Symbol === "function" && o[Symbol.iterator];
225
- if (!m)
226
- return o;
227
- var i = m.call(o), r, ar = [], e;
228
- try {
229
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
230
- ar.push(r.value);
231
- }
232
- catch (error) {
233
- e = { error: error };
234
- }
235
- finally {
236
- try {
237
- if (r && !r.done && (m = i["return"]))
238
- m.call(i);
239
- }
240
- finally {
241
- if (e)
242
- throw e.error;
243
- }
244
- }
245
- return ar;
246
- }
247
- /** @deprecated */
248
- function __spread() {
249
- for (var ar = [], i = 0; i < arguments.length; i++)
250
- ar = ar.concat(__read(arguments[i]));
251
- return ar;
252
- }
253
- /** @deprecated */
254
- function __spreadArrays() {
255
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
256
- s += arguments[i].length;
257
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
258
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
259
- r[k] = a[j];
260
- return r;
261
- }
262
- function __spreadArray(to, from, pack) {
263
- if (pack || arguments.length === 2)
264
- for (var i = 0, l = from.length, ar; i < l; i++) {
265
- if (ar || !(i in from)) {
266
- if (!ar)
267
- ar = Array.prototype.slice.call(from, 0, i);
268
- ar[i] = from[i];
269
- }
270
- }
271
- return to.concat(ar || from);
272
- }
273
- function __await(v) {
274
- return this instanceof __await ? (this.v = v, this) : new __await(v);
275
- }
276
- function __asyncGenerator(thisArg, _arguments, generator) {
277
- if (!Symbol.asyncIterator)
278
- throw new TypeError("Symbol.asyncIterator is not defined.");
279
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
280
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
281
- function verb(n) { if (g[n])
282
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
283
- function resume(n, v) { try {
284
- step(g[n](v));
285
- }
286
- catch (e) {
287
- settle(q[0][3], e);
288
- } }
289
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
290
- function fulfill(value) { resume("next", value); }
291
- function reject(value) { resume("throw", value); }
292
- function settle(f, v) { if (f(v), q.shift(), q.length)
293
- resume(q[0][0], q[0][1]); }
294
- }
295
- function __asyncDelegator(o) {
296
- var i, p;
297
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
298
- 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; }
299
- }
300
- function __asyncValues(o) {
301
- if (!Symbol.asyncIterator)
302
- throw new TypeError("Symbol.asyncIterator is not defined.");
303
- var m = o[Symbol.asyncIterator], i;
304
- 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);
305
- 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); }); }; }
306
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
307
- }
308
- function __makeTemplateObject(cooked, raw) {
309
- if (Object.defineProperty) {
310
- Object.defineProperty(cooked, "raw", { value: raw });
311
- }
312
- else {
313
- cooked.raw = raw;
314
- }
315
- return cooked;
316
- }
317
- ;
318
- var __setModuleDefault = Object.create ? (function (o, v) {
319
- Object.defineProperty(o, "default", { enumerable: true, value: v });
320
- }) : function (o, v) {
321
- o["default"] = v;
322
- };
323
- function __importStar(mod) {
324
- if (mod && mod.__esModule)
325
- return mod;
326
- var result = {};
327
- if (mod != null)
328
- for (var k in mod)
329
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
330
- __createBinding(result, mod, k);
331
- __setModuleDefault(result, mod);
332
- return result;
333
- }
334
- function __importDefault(mod) {
335
- return (mod && mod.__esModule) ? mod : { default: mod };
336
- }
337
- function __classPrivateFieldGet(receiver, state, kind, f) {
338
- if (kind === "a" && !f)
339
- throw new TypeError("Private accessor was defined without a getter");
340
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
341
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
342
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
343
- }
344
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
345
- if (kind === "m")
346
- throw new TypeError("Private method is not writable");
347
- if (kind === "a" && !f)
348
- throw new TypeError("Private accessor was defined without a setter");
349
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
350
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
351
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
352
- }
42
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
43
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
44
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
45
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
46
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
47
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
48
+ PERFORMANCE OF THIS SOFTWARE.
49
+ ***************************************************************************** */
50
+ /* global Reflect, Promise, SuppressedError, Symbol */
51
+ var extendStatics = function (d, b) {
52
+ extendStatics = Object.setPrototypeOf ||
53
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
54
+ function (d, b) { for (var p in b)
55
+ if (Object.prototype.hasOwnProperty.call(b, p))
56
+ d[p] = b[p]; };
57
+ return extendStatics(d, b);
58
+ };
59
+ function __extends(d, b) {
60
+ if (typeof b !== "function" && b !== null)
61
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
62
+ extendStatics(d, b);
63
+ function __() { this.constructor = d; }
64
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
65
+ }
66
+ var __assign = function () {
67
+ __assign = Object.assign || function __assign(t) {
68
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
69
+ s = arguments[i];
70
+ for (var p in s)
71
+ if (Object.prototype.hasOwnProperty.call(s, p))
72
+ t[p] = s[p];
73
+ }
74
+ return t;
75
+ };
76
+ return __assign.apply(this, arguments);
77
+ };
78
+ function __rest(s, e) {
79
+ var t = {};
80
+ for (var p in s)
81
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
82
+ t[p] = s[p];
83
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
84
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
85
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
86
+ t[p[i]] = s[p[i]];
87
+ }
88
+ return t;
89
+ }
90
+ function __decorate(decorators, target, key, desc) {
91
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
92
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
93
+ r = Reflect.decorate(decorators, target, key, desc);
94
+ else
95
+ for (var i = decorators.length - 1; i >= 0; i--)
96
+ if (d = decorators[i])
97
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
98
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
99
+ }
100
+ function __param(paramIndex, decorator) {
101
+ return function (target, key) { decorator(target, key, paramIndex); };
102
+ }
103
+ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
104
+ function accept(f) { if (f !== void 0 && typeof f !== "function")
105
+ throw new TypeError("Function expected"); return f; }
106
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
107
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
108
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
109
+ var _, done = false;
110
+ for (var i = decorators.length - 1; i >= 0; i--) {
111
+ var context = {};
112
+ for (var p in contextIn)
113
+ context[p] = p === "access" ? {} : contextIn[p];
114
+ for (var p in contextIn.access)
115
+ context.access[p] = contextIn.access[p];
116
+ context.addInitializer = function (f) { if (done)
117
+ throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
118
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
119
+ if (kind === "accessor") {
120
+ if (result === void 0)
121
+ continue;
122
+ if (result === null || typeof result !== "object")
123
+ throw new TypeError("Object expected");
124
+ if (_ = accept(result.get))
125
+ descriptor.get = _;
126
+ if (_ = accept(result.set))
127
+ descriptor.set = _;
128
+ if (_ = accept(result.init))
129
+ initializers.unshift(_);
130
+ }
131
+ else if (_ = accept(result)) {
132
+ if (kind === "field")
133
+ initializers.unshift(_);
134
+ else
135
+ descriptor[key] = _;
136
+ }
137
+ }
138
+ if (target)
139
+ Object.defineProperty(target, contextIn.name, descriptor);
140
+ done = true;
141
+ }
142
+ ;
143
+ function __runInitializers(thisArg, initializers, value) {
144
+ var useValue = arguments.length > 2;
145
+ for (var i = 0; i < initializers.length; i++) {
146
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
147
+ }
148
+ return useValue ? value : void 0;
149
+ }
150
+ ;
151
+ function __propKey(x) {
152
+ return typeof x === "symbol" ? x : "".concat(x);
153
+ }
154
+ ;
155
+ function __setFunctionName(f, name, prefix) {
156
+ if (typeof name === "symbol")
157
+ name = name.description ? "[".concat(name.description, "]") : "";
158
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
159
+ }
160
+ ;
161
+ function __metadata(metadataKey, metadataValue) {
162
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
163
+ return Reflect.metadata(metadataKey, metadataValue);
164
+ }
165
+ function __awaiter(thisArg, _arguments, P, generator) {
166
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
167
+ return new (P || (P = Promise))(function (resolve, reject) {
168
+ function fulfilled(value) { try {
169
+ step(generator.next(value));
170
+ }
171
+ catch (e) {
172
+ reject(e);
173
+ } }
174
+ function rejected(value) { try {
175
+ step(generator["throw"](value));
176
+ }
177
+ catch (e) {
178
+ reject(e);
179
+ } }
180
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
181
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
182
+ });
183
+ }
184
+ function __generator(thisArg, body) {
185
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
186
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
187
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
188
+ function verb(n) { return function (v) { return step([n, v]); }; }
189
+ function step(op) {
190
+ if (f)
191
+ throw new TypeError("Generator is already executing.");
192
+ while (g && (g = 0, op[0] && (_ = 0)), _)
193
+ try {
194
+ 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)
195
+ return t;
196
+ if (y = 0, t)
197
+ op = [op[0] & 2, t.value];
198
+ switch (op[0]) {
199
+ case 0:
200
+ case 1:
201
+ t = op;
202
+ break;
203
+ case 4:
204
+ _.label++;
205
+ return { value: op[1], done: false };
206
+ case 5:
207
+ _.label++;
208
+ y = op[1];
209
+ op = [0];
210
+ continue;
211
+ case 7:
212
+ op = _.ops.pop();
213
+ _.trys.pop();
214
+ continue;
215
+ default:
216
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
217
+ _ = 0;
218
+ continue;
219
+ }
220
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
221
+ _.label = op[1];
222
+ break;
223
+ }
224
+ if (op[0] === 6 && _.label < t[1]) {
225
+ _.label = t[1];
226
+ t = op;
227
+ break;
228
+ }
229
+ if (t && _.label < t[2]) {
230
+ _.label = t[2];
231
+ _.ops.push(op);
232
+ break;
233
+ }
234
+ if (t[2])
235
+ _.ops.pop();
236
+ _.trys.pop();
237
+ continue;
238
+ }
239
+ op = body.call(thisArg, _);
240
+ }
241
+ catch (e) {
242
+ op = [6, e];
243
+ y = 0;
244
+ }
245
+ finally {
246
+ f = t = 0;
247
+ }
248
+ if (op[0] & 5)
249
+ throw op[1];
250
+ return { value: op[0] ? op[1] : void 0, done: true };
251
+ }
252
+ }
253
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
254
+ if (k2 === undefined)
255
+ k2 = k;
256
+ var desc = Object.getOwnPropertyDescriptor(m, k);
257
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
258
+ desc = { enumerable: true, get: function () { return m[k]; } };
259
+ }
260
+ Object.defineProperty(o, k2, desc);
261
+ }) : (function (o, m, k, k2) {
262
+ if (k2 === undefined)
263
+ k2 = k;
264
+ o[k2] = m[k];
265
+ });
266
+ function __exportStar(m, o) {
267
+ for (var p in m)
268
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
269
+ __createBinding(o, m, p);
270
+ }
271
+ function __values(o) {
272
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
273
+ if (m)
274
+ return m.call(o);
275
+ if (o && typeof o.length === "number")
276
+ return {
277
+ next: function () {
278
+ if (o && i >= o.length)
279
+ o = void 0;
280
+ return { value: o && o[i++], done: !o };
281
+ }
282
+ };
283
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
284
+ }
285
+ function __read(o, n) {
286
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
287
+ if (!m)
288
+ return o;
289
+ var i = m.call(o), r, ar = [], e;
290
+ try {
291
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
292
+ ar.push(r.value);
293
+ }
294
+ catch (error) {
295
+ e = { error: error };
296
+ }
297
+ finally {
298
+ try {
299
+ if (r && !r.done && (m = i["return"]))
300
+ m.call(i);
301
+ }
302
+ finally {
303
+ if (e)
304
+ throw e.error;
305
+ }
306
+ }
307
+ return ar;
308
+ }
309
+ /** @deprecated */
310
+ function __spread() {
311
+ for (var ar = [], i = 0; i < arguments.length; i++)
312
+ ar = ar.concat(__read(arguments[i]));
313
+ return ar;
314
+ }
315
+ /** @deprecated */
316
+ function __spreadArrays() {
317
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
318
+ s += arguments[i].length;
319
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
320
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
321
+ r[k] = a[j];
322
+ return r;
323
+ }
324
+ function __spreadArray(to, from, pack) {
325
+ if (pack || arguments.length === 2)
326
+ for (var i = 0, l = from.length, ar; i < l; i++) {
327
+ if (ar || !(i in from)) {
328
+ if (!ar)
329
+ ar = Array.prototype.slice.call(from, 0, i);
330
+ ar[i] = from[i];
331
+ }
332
+ }
333
+ return to.concat(ar || Array.prototype.slice.call(from));
334
+ }
335
+ function __await(v) {
336
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
337
+ }
338
+ function __asyncGenerator(thisArg, _arguments, generator) {
339
+ if (!Symbol.asyncIterator)
340
+ throw new TypeError("Symbol.asyncIterator is not defined.");
341
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
342
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
343
+ function verb(n) { if (g[n])
344
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
345
+ function resume(n, v) { try {
346
+ step(g[n](v));
347
+ }
348
+ catch (e) {
349
+ settle(q[0][3], e);
350
+ } }
351
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
352
+ function fulfill(value) { resume("next", value); }
353
+ function reject(value) { resume("throw", value); }
354
+ function settle(f, v) { if (f(v), q.shift(), q.length)
355
+ resume(q[0][0], q[0][1]); }
356
+ }
357
+ function __asyncDelegator(o) {
358
+ var i, p;
359
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
360
+ 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; }
361
+ }
362
+ function __asyncValues(o) {
363
+ if (!Symbol.asyncIterator)
364
+ throw new TypeError("Symbol.asyncIterator is not defined.");
365
+ var m = o[Symbol.asyncIterator], i;
366
+ 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);
367
+ 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); }); }; }
368
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
369
+ }
370
+ function __makeTemplateObject(cooked, raw) {
371
+ if (Object.defineProperty) {
372
+ Object.defineProperty(cooked, "raw", { value: raw });
373
+ }
374
+ else {
375
+ cooked.raw = raw;
376
+ }
377
+ return cooked;
378
+ }
379
+ ;
380
+ var __setModuleDefault = Object.create ? (function (o, v) {
381
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
382
+ }) : function (o, v) {
383
+ o["default"] = v;
384
+ };
385
+ function __importStar(mod) {
386
+ if (mod && mod.__esModule)
387
+ return mod;
388
+ var result = {};
389
+ if (mod != null)
390
+ for (var k in mod)
391
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
392
+ __createBinding(result, mod, k);
393
+ __setModuleDefault(result, mod);
394
+ return result;
395
+ }
396
+ function __importDefault(mod) {
397
+ return (mod && mod.__esModule) ? mod : { default: mod };
398
+ }
399
+ function __classPrivateFieldGet(receiver, state, kind, f) {
400
+ if (kind === "a" && !f)
401
+ throw new TypeError("Private accessor was defined without a getter");
402
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
403
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
404
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
405
+ }
406
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
407
+ if (kind === "m")
408
+ throw new TypeError("Private method is not writable");
409
+ if (kind === "a" && !f)
410
+ throw new TypeError("Private accessor was defined without a setter");
411
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
412
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
413
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
414
+ }
415
+ function __classPrivateFieldIn(state, receiver) {
416
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
417
+ throw new TypeError("Cannot use 'in' operator on non-object");
418
+ return typeof state === "function" ? receiver === state : state.has(receiver);
419
+ }
420
+ function __addDisposableResource(env, value, async) {
421
+ if (value !== null && value !== void 0) {
422
+ if (typeof value !== "object" && typeof value !== "function")
423
+ throw new TypeError("Object expected.");
424
+ var dispose;
425
+ if (async) {
426
+ if (!Symbol.asyncDispose)
427
+ throw new TypeError("Symbol.asyncDispose is not defined.");
428
+ dispose = value[Symbol.asyncDispose];
429
+ }
430
+ if (dispose === void 0) {
431
+ if (!Symbol.dispose)
432
+ throw new TypeError("Symbol.dispose is not defined.");
433
+ dispose = value[Symbol.dispose];
434
+ }
435
+ if (typeof dispose !== "function")
436
+ throw new TypeError("Object not disposable.");
437
+ env.stack.push({ value: value, dispose: dispose, async: async });
438
+ }
439
+ else if (async) {
440
+ env.stack.push({ async: true });
441
+ }
442
+ return value;
443
+ }
444
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
445
+ var e = new Error(message);
446
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
447
+ };
448
+ function __disposeResources(env) {
449
+ function fail(e) {
450
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
451
+ env.hasError = true;
452
+ }
453
+ function next() {
454
+ while (env.stack.length) {
455
+ var rec = env.stack.pop();
456
+ try {
457
+ var result = rec.dispose && rec.dispose.call(rec.value);
458
+ if (rec.async)
459
+ return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
460
+ }
461
+ catch (e) {
462
+ fail(e);
463
+ }
464
+ }
465
+ if (env.hasError)
466
+ throw env.error;
467
+ }
468
+ return next();
469
+ }
470
+ var tslib_es6 = {
471
+ __extends: __extends,
472
+ __assign: __assign,
473
+ __rest: __rest,
474
+ __decorate: __decorate,
475
+ __param: __param,
476
+ __metadata: __metadata,
477
+ __awaiter: __awaiter,
478
+ __generator: __generator,
479
+ __createBinding: __createBinding,
480
+ __exportStar: __exportStar,
481
+ __values: __values,
482
+ __read: __read,
483
+ __spread: __spread,
484
+ __spreadArrays: __spreadArrays,
485
+ __spreadArray: __spreadArray,
486
+ __await: __await,
487
+ __asyncGenerator: __asyncGenerator,
488
+ __asyncDelegator: __asyncDelegator,
489
+ __asyncValues: __asyncValues,
490
+ __makeTemplateObject: __makeTemplateObject,
491
+ __importStar: __importStar,
492
+ __importDefault: __importDefault,
493
+ __classPrivateFieldGet: __classPrivateFieldGet,
494
+ __classPrivateFieldSet: __classPrivateFieldSet,
495
+ __classPrivateFieldIn: __classPrivateFieldIn,
496
+ __addDisposableResource: __addDisposableResource,
497
+ __disposeResources: __disposeResources,
498
+ };
353
499
 
354
- var TuiInputDateRangeComponent = /** @class */ (function (_super) {
355
- __extends(TuiInputDateRangeComponent, _super);
356
- function TuiInputDateRangeComponent(control, cdr, isMobile, mobileCalendar, dateFormat, dateSeparator, dateTexts$, valueTransformer, options, textfieldSize) {
357
- var _this = _super.call(this, control, cdr, valueTransformer) || this;
358
- _this.isMobile = isMobile;
359
- _this.mobileCalendar = mobileCalendar;
360
- _this.dateFormat = dateFormat;
361
- _this.dateSeparator = dateSeparator;
362
- _this.dateTexts$ = dateTexts$;
363
- _this.valueTransformer = valueTransformer;
364
- _this.options = options;
365
- _this.textfieldSize = textfieldSize;
366
- _this.disabledItemHandler = i3.ALWAYS_FALSE_HANDLER;
367
- _this.markerHandler = i1.TUI_DEFAULT_MARKER_HANDLER;
368
- _this.defaultViewedMonth = i3.TuiMonth.currentLocal();
369
- _this.items = [];
370
- _this.min = _this.options.min;
371
- _this.max = _this.options.max;
372
- _this.minLength = null;
373
- _this.maxLength = null;
374
- _this.open = false;
375
- _this.selectedActivePeriod = null;
376
- _this.maxLengthMapper = constants.MAX_DAY_RANGE_LENGTH_MAPPER;
377
- _this.dateFiller$ = _this.dateTexts$.pipe(operators.map(function (dateTexts) { return i3.changeDateSeparator(dateTexts[_this.dateFormat], _this.dateSeparator); }));
378
- return _this;
379
- }
380
- TuiInputDateRangeComponent.prototype.onClick = function () {
381
- if (!this.isMobile && this.interactive) {
382
- this.toggle();
383
- }
384
- };
385
- // TODO: remove this after refactor controls to hold whole TuiDayRangePeriod
386
- TuiInputDateRangeComponent.prototype.ngAfterViewChecked = function () {
387
- if (this.calendarRange) {
388
- this.calendarRange.selectedActivePeriod = this.selectedActivePeriod;
389
- this.calendarRange.cdr.markForCheck();
390
- }
391
- };
392
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "size", {
393
- get: function () {
394
- return this.textfieldSize.size;
395
- },
396
- enumerable: false,
397
- configurable: true
398
- });
399
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMin", {
400
- get: function () {
401
- var _a;
402
- return (_a = this.min) !== null && _a !== void 0 ? _a : i3.TUI_FIRST_DAY;
403
- },
404
- enumerable: false,
405
- configurable: true
406
- });
407
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMax", {
408
- get: function () {
409
- var _a;
410
- return (_a = this.max) !== null && _a !== void 0 ? _a : i3.TUI_LAST_DAY;
411
- },
412
- enumerable: false,
413
- configurable: true
414
- });
415
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "nativeFocusableElement", {
416
- get: function () {
417
- var _a, _b;
418
- return (_b = (_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) !== null && _b !== void 0 ? _b : null;
419
- },
420
- enumerable: false,
421
- configurable: true
422
- });
423
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "focused", {
424
- get: function () {
425
- var _a;
426
- return !!((_a = this.textfield) === null || _a === void 0 ? void 0 : _a.focused);
427
- },
428
- enumerable: false,
429
- configurable: true
430
- });
431
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMobile", {
432
- get: function () {
433
- return this.isMobile && !!this.mobileCalendar;
434
- },
435
- enumerable: false,
436
- configurable: true
437
- });
438
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "calendarIcon", {
439
- get: function () {
440
- return this.options.icon;
441
- },
442
- enumerable: false,
443
- configurable: true
444
- });
445
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedExampleText", {
446
- get: function () {
447
- var _a, _b;
448
- return this.items.length
449
- ? ((_b = (_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) === null || _b === void 0 ? void 0 : _b.placeholder) || ''
450
- : '';
451
- },
452
- enumerable: false,
453
- configurable: true
454
- });
455
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMask", {
456
- get: function () {
457
- var _a, _b;
458
- /**
459
- * TODO: we can delete this workaround in v4.0
460
- * after solving this issue:
461
- * https://github.com/taiga-family/maskito/issues/604
462
- */
463
- var nativeValueIsNotSynced = ((_b = (_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) === null || _b === void 0 ? void 0 : _b.value) !== this.computedValue;
464
- return this.activePeriod || nativeValueIsNotSynced
465
- ? core.MASKITO_DEFAULT_OPTIONS
466
- : this.calculateMask(this.dateFormat, this.dateSeparator, this.computedMin, this.computedMax, this.minLength, this.maxLength);
467
- },
468
- enumerable: false,
469
- configurable: true
470
- });
471
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "activePeriod", {
472
- get: function () {
473
- var _this = this;
474
- var _a;
475
- return ((_a = this.selectedActivePeriod) !== null && _a !== void 0 ? _a : (this.items.find(function (item) { return i3.tuiNullableSame(_this.value, item.range, function (a, b) { return a.from.daySame(b.from.dayLimit(_this.min, _this.max)) &&
476
- a.to.daySame(b.to.dayLimit(_this.min, _this.max)); }); }) ||
477
- null));
478
- },
479
- enumerable: false,
480
- configurable: true
481
- });
482
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedValue", {
483
- get: function () {
484
- var _c = this, value = _c.value, nativeValue = _c.nativeValue, activePeriod = _c.activePeriod;
485
- if (activePeriod) {
486
- return String(activePeriod);
487
- }
488
- return value
489
- ? value.getFormattedDayRange(this.dateFormat, this.dateSeparator)
490
- : nativeValue;
491
- },
492
- enumerable: false,
493
- configurable: true
494
- });
495
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "showValueTemplate", {
496
- get: function () {
497
- return i3.tuiIsPresent(this.value) && !this.focused;
498
- },
499
- enumerable: false,
500
- configurable: true
501
- });
502
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedContent", {
503
- get: function () {
504
- var _a;
505
- return ((_a = this.activePeriod) === null || _a === void 0 ? void 0 : _a.content) || this.computedValue;
506
- },
507
- enumerable: false,
508
- configurable: true
509
- });
510
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "innerPseudoFocused", {
511
- get: function () {
512
- if (this.pseudoFocus === false) {
513
- return false;
514
- }
515
- if (this.open || this.computedFocused) {
516
- return true;
517
- }
518
- return null;
519
- },
520
- enumerable: false,
521
- configurable: true
522
- });
523
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "nativeValue", {
524
- get: function () {
525
- var _a;
526
- return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.value) || '';
527
- },
528
- set: function (value) {
529
- if (this.nativeFocusableElement) {
530
- this.nativeFocusableElement.value = value;
531
- }
532
- },
533
- enumerable: false,
534
- configurable: true
535
- });
536
- TuiInputDateRangeComponent.prototype.getComputedRangeFiller = function (dateFiller) {
537
- return this.activePeriod ? '' : this.getDateRangeFiller(dateFiller);
538
- };
539
- TuiInputDateRangeComponent.prototype.onIconClick = function () {
540
- if (this.isMobile && this.interactive) {
541
- this.onOpenChange(true);
542
- }
543
- };
544
- TuiInputDateRangeComponent.prototype.onOpenChange = function (open) {
545
- this.open = open;
546
- };
547
- TuiInputDateRangeComponent.prototype.onValueChange = function (value) {
548
- if (this.control) {
549
- this.control.updateValueAndValidity({ emitEvent: false });
550
- }
551
- if (!value && !this.mobileCalendar) {
552
- this.onOpenChange(true);
553
- }
554
- this.value =
555
- value.length === i3.DATE_RANGE_FILLER_LENGTH
556
- ? i3.TuiDayRange.normalizeParse(value, this.dateFormat)
557
- : null;
558
- if (!this.value) {
559
- this.selectedActivePeriod = null;
560
- }
561
- };
562
- TuiInputDateRangeComponent.prototype.onRangeChange = function (range) {
563
- var _a, _b;
564
- this.toggle();
565
- this.focusInput();
566
- if (!range) {
567
- this.nativeValue = '';
568
- }
569
- this.value = range;
570
- this.selectedActivePeriod = (_b = (_a = this.calendarRange) === null || _a === void 0 ? void 0 : _a.selectedActivePeriod) !== null && _b !== void 0 ? _b : null;
571
- };
572
- // TODO: investigate if it is used anywhere and (if not) delete it in v4.0
573
- TuiInputDateRangeComponent.prototype.onItemSelect = function (item) {
574
- this.toggle();
575
- this.focusInput();
576
- if (typeof item !== 'string') {
577
- this.value = item.range.dayLimit(this.min, this.max);
578
- return;
579
- }
580
- if (this.activePeriod === null) {
581
- return;
582
- }
583
- this.value = null;
584
- this.nativeValue = '';
585
- };
586
- TuiInputDateRangeComponent.prototype.onActiveZone = function (focused) {
587
- this.updateFocused(focused);
588
- if (!focused &&
589
- !this.itemSelected &&
590
- (this.nativeValue.length === i3.DATE_FILLER_LENGTH ||
591
- this.nativeValue.length ===
592
- i3.DATE_FILLER_LENGTH + i3.RANGE_SEPARATOR_CHAR.length)) {
593
- this.value = i3.TuiDayRange.normalizeParse(this.nativeValue, this.dateFormat);
594
- }
595
- };
596
- TuiInputDateRangeComponent.prototype.writeValue = function (value) {
597
- _super.prototype.writeValue.call(this, value);
598
- this.nativeValue = value ? this.computedValue : '';
599
- };
600
- TuiInputDateRangeComponent.prototype.valueIdenticalComparator = function (oldValue, newValue) {
601
- return i3.tuiNullableSame(oldValue, newValue, function (a, b) { return a.daySame(b); });
602
- };
603
- TuiInputDateRangeComponent.prototype.calculateMask = function (dateFormat, separator, min, max, minLength, maxLength) {
604
- return kit.maskitoDateRangeOptionsGenerator({
605
- separator: separator,
606
- mode: constants.TUI_DATE_MODE_MASKITO_ADAPTER[dateFormat],
607
- min: min.toLocalNativeDate(),
608
- max: max.toLocalNativeDate(),
609
- minLength: minLength || {},
610
- maxLength: maxLength || {},
611
- });
612
- };
613
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "itemSelected", {
614
- get: function () {
615
- var _this = this;
616
- return this.items.findIndex(function (item) { return String(item) === _this.nativeValue; }) !== -1;
617
- },
618
- enumerable: false,
619
- configurable: true
620
- });
621
- TuiInputDateRangeComponent.prototype.toggle = function () {
622
- this.open = !this.open;
623
- };
624
- TuiInputDateRangeComponent.prototype.focusInput = function (preventScroll) {
625
- if (preventScroll === void 0) { preventScroll = false; }
626
- if (this.nativeFocusableElement) {
627
- this.nativeFocusableElement.focus({ preventScroll: preventScroll });
628
- }
629
- };
630
- TuiInputDateRangeComponent.prototype.getDateRangeFiller = function (dateFiller) {
631
- return "" + dateFiller + i3.RANGE_SEPARATOR_CHAR + dateFiller;
632
- };
633
- return TuiInputDateRangeComponent;
634
- }(i3.AbstractTuiNullableControl));
635
- TuiInputDateRangeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeComponent, deps: [{ token: i8.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: i3.TUI_IS_MOBILE }, { token: tokens.TUI_MOBILE_CALENDAR, optional: true }, { token: i3.TUI_DATE_FORMAT }, { token: i3.TUI_DATE_SEPARATOR }, { token: tokens.TUI_DATE_TEXTS }, { token: tokens.TUI_DATE_RANGE_VALUE_TRANSFORMER, optional: true }, { token: tokens.TUI_INPUT_DATE_OPTIONS }, { token: i1.TUI_TEXTFIELD_SIZE }], target: i0__namespace.ɵɵFactoryTarget.Component });
636
- TuiInputDateRangeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputDateRangeComponent, selector: "tui-input-date-range", inputs: { disabledItemHandler: "disabledItemHandler", markerHandler: "markerHandler", defaultViewedMonth: "defaultViewedMonth", items: "items", min: "min", max: "max", minLength: "minLength", maxLength: "maxLength" }, host: { listeners: { "click": "onClick()" }, properties: { "attr.data-size": "this.size" } }, providers: [
637
- i3.tuiAsFocusableItemAccessor(TuiInputDateRangeComponent),
638
- i3.tuiAsControl(TuiInputDateRangeComponent),
639
- tokens.tuiDateStreamWithTransformer(tokens.TUI_DATE_RANGE_VALUE_TRANSFORMER),
640
- {
641
- provide: i1.TUI_DROPDOWN_COMPONENT,
642
- useFactory: function () { return (i0.inject(i3.TUI_IS_MOBILE) &&
643
- i0.inject(tokens.TUI_MOBILE_CALENDAR, i0.InjectFlags.Optional)) ||
644
- i0.inject(i1.TUI_DROPDOWN_COMPONENT, i0.InjectFlags.SkipSelf); },
645
- },
646
- ], viewQueries: [{ propertyName: "textfield", first: true, predicate: i1.TuiPrimitiveTextfieldComponent, descendants: true }, { propertyName: "calendarRange", first: true, predicate: i0__namespace.forwardRef(function () { return i2.TuiCalendarRangeComponent; }), descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<tui-hosted-dropdown\n class=\"t-hosted\"\n [canOpen]=\"interactive\"\n [content]=\"dropdown\"\n [open]=\"open && interactive\"\n (openChange)=\"onOpenChange($event)\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-primitive-textfield\n *tuiLet=\"dateFiller$ | async as dateFiller\"\n automation-id=\"tui-input-date-range__textfield\"\n tuiValueAccessor\n class=\"t-textfield\"\n [disabled]=\"computedDisabled\"\n [invalid]=\"computedInvalid\"\n [maskito]=\"computedMask\"\n [nativeId]=\"nativeId\"\n [pseudoActive]=\"pseudoActive\"\n [pseudoFocus]=\"innerPseudoFocused\"\n [pseudoHover]=\"pseudoHover\"\n [readOnly]=\"readOnly\"\n [tuiTextfieldFiller]=\"getComputedRangeFiller(dateFiller || '')\"\n [tuiTextfieldIcon]=\"calendarIcon && iconContent\"\n [value]=\"computedValue\"\n (valueChange)=\"onValueChange($event)\"\n >\n <ng-content></ng-content>\n <ng-content\n ngProjectAs=\"input\"\n select=\"input\"\n ></ng-content>\n\n <div\n *ngIf=\"showValueTemplate\"\n ngProjectAs=\"tuiContent\"\n class=\"t-value\"\n >\n <ng-container *polymorpheusOutlet=\"computedContent as text; context: {$implicit: value}\">\n {{ text }}\n </ng-container>\n </div>\n </tui-primitive-textfield>\n\n <ng-template #iconContent>\n <tui-svg\n *polymorpheusOutlet=\"calendarIcon as src; context: {$implicit: size}\"\n appearance=\"icon\"\n automation-id=\"tui-input-date-range__icon\"\n tuiWrapper\n [class.t-icon]=\"!computedDisabled\"\n [src]=\"src\"\n (click)=\"onIconClick()\"\n ></tui-svg>\n </ng-template>\n\n <ng-template #dropdown>\n <tui-calendar-range\n [defaultViewedMonth]=\"defaultViewedMonth\"\n [disabledItemHandler]=\"disabledItemHandler\"\n [items]=\"items\"\n [markerHandler]=\"markerHandler\"\n [max]=\"computedMax\"\n [maxLength]=\"maxLength\"\n [min]=\"computedMin\"\n [minLength]=\"minLength\"\n [value]=\"value\"\n (valueChange)=\"onRangeChange($event)\"\n ></tui-calendar-range>\n </ng-template>\n</tui-hosted-dropdown>\n", styles: [":host{display:block;border-radius:var(--tui-radius-m);text-align:left}:host._disabled{pointer-events:none}.t-hosted{display:block;border-radius:inherit}.t-textfield{border-radius:inherit;text-align:inherit}.t-icon{pointer-events:auto}.t-value{display:flex;width:100%;align-items:center}\n"], components: [{ type: i1__namespace.TuiHostedDropdownComponent, selector: "tui-hosted-dropdown", inputs: ["content", "sided", "canOpen", "open"], outputs: ["openChange", "focusedChange"] }, { type: i1__namespace.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i1__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i2__namespace.TuiCalendarRangeComponent, selector: "tui-calendar-range", inputs: ["defaultViewedMonth", "disabledItemHandler", "markerHandler", "items", "min", "max", "minLength", "maxLength", "value"], outputs: ["valueChange"] }], directives: [{ type: i3__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i3__namespace.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { type: i1__namespace.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i4__namespace.TuiValueAccessorDirective, selector: "[tuiValueAccessor]" }, { type: i5__namespace.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { type: i1__namespace.TuiTextfieldFillerDirective, selector: "[tuiTextfieldFiller]", inputs: ["tuiTextfieldFiller"] }, { type: i1__namespace.TuiTextfieldIconDirective, selector: "[tuiTextfieldIcon]", inputs: ["tuiTextfieldIcon"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i1__namespace.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }], pipes: { "async": i6__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
647
- __decorate([
648
- i3.tuiPure
649
- ], TuiInputDateRangeComponent.prototype, "calculateMask", null);
650
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeComponent, decorators: [{
651
- type: i0.Component,
652
- args: [{
653
- selector: 'tui-input-date-range',
654
- templateUrl: './input-date-range.template.html',
655
- styleUrls: ['./input-date-range.style.less'],
656
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
657
- providers: [
658
- i3.tuiAsFocusableItemAccessor(TuiInputDateRangeComponent),
659
- i3.tuiAsControl(TuiInputDateRangeComponent),
660
- tokens.tuiDateStreamWithTransformer(tokens.TUI_DATE_RANGE_VALUE_TRANSFORMER),
661
- {
662
- provide: i1.TUI_DROPDOWN_COMPONENT,
663
- useFactory: function () { return (i0.inject(i3.TUI_IS_MOBILE) &&
664
- i0.inject(tokens.TUI_MOBILE_CALENDAR, i0.InjectFlags.Optional)) ||
665
- i0.inject(i1.TUI_DROPDOWN_COMPONENT, i0.InjectFlags.SkipSelf); },
666
- },
667
- ],
668
- }]
669
- }], ctorParameters: function () {
670
- return [{ type: i8__namespace.NgControl, decorators: [{
671
- type: i0.Optional
672
- }, {
673
- type: i0.Self
674
- }, {
675
- type: i0.Inject,
676
- args: [i8.NgControl]
677
- }] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
678
- type: i0.Inject,
679
- args: [i0.ChangeDetectorRef]
680
- }] }, { type: undefined, decorators: [{
681
- type: i0.Inject,
682
- args: [i3.TUI_IS_MOBILE]
683
- }] }, { type: i0__namespace.Type, decorators: [{
684
- type: i0.Optional
685
- }, {
686
- type: i0.Inject,
687
- args: [tokens.TUI_MOBILE_CALENDAR]
688
- }] }, { type: undefined, decorators: [{
689
- type: i0.Inject,
690
- args: [i3.TUI_DATE_FORMAT]
691
- }] }, { type: undefined, decorators: [{
692
- type: i0.Inject,
693
- args: [i3.TUI_DATE_SEPARATOR]
694
- }] }, { type: i9__namespace.Observable, decorators: [{
695
- type: i0.Inject,
696
- args: [tokens.TUI_DATE_TEXTS]
697
- }] }, { type: i3__namespace.AbstractTuiValueTransformer, decorators: [{
698
- type: i0.Optional
699
- }, {
700
- type: i0.Inject,
701
- args: [tokens.TUI_DATE_RANGE_VALUE_TRANSFORMER]
702
- }] }, { type: undefined, decorators: [{
703
- type: i0.Inject,
704
- args: [tokens.TUI_INPUT_DATE_OPTIONS]
705
- }] }, { type: i1__namespace.TuiTextfieldSizeDirective, decorators: [{
706
- type: i0.Inject,
707
- args: [i1.TUI_TEXTFIELD_SIZE]
708
- }] }];
709
- }, propDecorators: { textfield: [{
710
- type: i0.ViewChild,
711
- args: [i1.TuiPrimitiveTextfieldComponent]
712
- }], calendarRange: [{
713
- type: i0.ViewChild,
714
- args: [i0.forwardRef(function () { return i2.TuiCalendarRangeComponent; })]
715
- }], disabledItemHandler: [{
716
- type: i0.Input
717
- }], markerHandler: [{
718
- type: i0.Input
719
- }], defaultViewedMonth: [{
720
- type: i0.Input
721
- }], items: [{
722
- type: i0.Input
723
- }], min: [{
724
- type: i0.Input
725
- }], max: [{
726
- type: i0.Input
727
- }], minLength: [{
728
- type: i0.Input
729
- }], maxLength: [{
730
- type: i0.Input
731
- }], onClick: [{
732
- type: i0.HostListener,
733
- args: ['click']
734
- }], size: [{
735
- type: i0.HostBinding,
736
- args: ['attr.data-size']
737
- }], calculateMask: [] } });
500
+ var TuiInputDateRangeComponent = /** @class */ (function (_super) {
501
+ __extends(TuiInputDateRangeComponent, _super);
502
+ function TuiInputDateRangeComponent(control, cdr, isMobile, mobileCalendar, dateFormat, dateSeparator, dateTexts$, valueTransformer, options, textfieldSize) {
503
+ var _this = _super.call(this, control, cdr, valueTransformer) || this;
504
+ _this.isMobile = isMobile;
505
+ _this.mobileCalendar = mobileCalendar;
506
+ _this.dateFormat = dateFormat;
507
+ _this.dateSeparator = dateSeparator;
508
+ _this.dateTexts$ = dateTexts$;
509
+ _this.valueTransformer = valueTransformer;
510
+ _this.options = options;
511
+ _this.textfieldSize = textfieldSize;
512
+ _this.disabledItemHandler = i3.ALWAYS_FALSE_HANDLER;
513
+ _this.markerHandler = i1.TUI_DEFAULT_MARKER_HANDLER;
514
+ _this.defaultViewedMonth = i3.TuiMonth.currentLocal();
515
+ _this.items = [];
516
+ _this.min = _this.options.min;
517
+ _this.max = _this.options.max;
518
+ _this.minLength = null;
519
+ _this.maxLength = null;
520
+ _this.open = false;
521
+ _this.selectedActivePeriod = null;
522
+ _this.maxLengthMapper = constants.MAX_DAY_RANGE_LENGTH_MAPPER;
523
+ _this.dateFiller$ = _this.dateTexts$.pipe(operators.map(function (dateTexts) { return i3.changeDateSeparator(dateTexts[_this.dateFormat], _this.dateSeparator); }));
524
+ return _this;
525
+ }
526
+ TuiInputDateRangeComponent.prototype.onClick = function () {
527
+ if (!this.isMobile && this.interactive) {
528
+ this.toggle();
529
+ }
530
+ };
531
+ // TODO: remove this after refactor controls to hold whole TuiDayRangePeriod
532
+ TuiInputDateRangeComponent.prototype.ngAfterViewChecked = function () {
533
+ if (this.calendarRange) {
534
+ this.calendarRange.selectedActivePeriod = this.selectedActivePeriod;
535
+ this.calendarRange.cdr.markForCheck();
536
+ }
537
+ };
538
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "size", {
539
+ get: function () {
540
+ return this.textfieldSize.size;
541
+ },
542
+ enumerable: false,
543
+ configurable: true
544
+ });
545
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMin", {
546
+ get: function () {
547
+ var _a;
548
+ return (_a = this.min) !== null && _a !== void 0 ? _a : i3.TUI_FIRST_DAY;
549
+ },
550
+ enumerable: false,
551
+ configurable: true
552
+ });
553
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMax", {
554
+ get: function () {
555
+ var _a;
556
+ return (_a = this.max) !== null && _a !== void 0 ? _a : i3.TUI_LAST_DAY;
557
+ },
558
+ enumerable: false,
559
+ configurable: true
560
+ });
561
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "nativeFocusableElement", {
562
+ get: function () {
563
+ var _a, _b;
564
+ return (_b = (_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) !== null && _b !== void 0 ? _b : null;
565
+ },
566
+ enumerable: false,
567
+ configurable: true
568
+ });
569
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "focused", {
570
+ get: function () {
571
+ var _a;
572
+ return !!((_a = this.textfield) === null || _a === void 0 ? void 0 : _a.focused);
573
+ },
574
+ enumerable: false,
575
+ configurable: true
576
+ });
577
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMobile", {
578
+ get: function () {
579
+ return this.isMobile && !!this.mobileCalendar;
580
+ },
581
+ enumerable: false,
582
+ configurable: true
583
+ });
584
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "calendarIcon", {
585
+ get: function () {
586
+ return this.options.icon;
587
+ },
588
+ enumerable: false,
589
+ configurable: true
590
+ });
591
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedExampleText", {
592
+ get: function () {
593
+ var _a, _b;
594
+ return this.items.length
595
+ ? ((_b = (_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) === null || _b === void 0 ? void 0 : _b.placeholder) || ''
596
+ : '';
597
+ },
598
+ enumerable: false,
599
+ configurable: true
600
+ });
601
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMask", {
602
+ get: function () {
603
+ var _a, _b;
604
+ /**
605
+ * TODO: we can delete this workaround in v4.0
606
+ * after solving this issue:
607
+ * https://github.com/taiga-family/maskito/issues/604
608
+ */
609
+ var nativeValueIsNotSynced = ((_b = (_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) === null || _b === void 0 ? void 0 : _b.value) !== this.computedValue;
610
+ return this.activePeriod || nativeValueIsNotSynced
611
+ ? core.MASKITO_DEFAULT_OPTIONS
612
+ : this.calculateMask(this.dateFormat, this.dateSeparator, this.computedMin, this.computedMax, this.minLength, this.maxLength);
613
+ },
614
+ enumerable: false,
615
+ configurable: true
616
+ });
617
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "activePeriod", {
618
+ get: function () {
619
+ var _this = this;
620
+ var _a;
621
+ return ((_a = this.selectedActivePeriod) !== null && _a !== void 0 ? _a : (this.items.find(function (item) { return i3.tuiNullableSame(_this.value, item.range, function (a, b) { return a.from.daySame(b.from.dayLimit(_this.min, _this.max)) &&
622
+ a.to.daySame(b.to.dayLimit(_this.min, _this.max)); }); }) ||
623
+ null));
624
+ },
625
+ enumerable: false,
626
+ configurable: true
627
+ });
628
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedValue", {
629
+ get: function () {
630
+ var _c = this, value = _c.value, nativeValue = _c.nativeValue, activePeriod = _c.activePeriod;
631
+ if (activePeriod) {
632
+ return String(activePeriod);
633
+ }
634
+ return value
635
+ ? value.getFormattedDayRange(this.dateFormat, this.dateSeparator)
636
+ : nativeValue;
637
+ },
638
+ enumerable: false,
639
+ configurable: true
640
+ });
641
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "showValueTemplate", {
642
+ get: function () {
643
+ return i3.tuiIsPresent(this.value) && !this.focused;
644
+ },
645
+ enumerable: false,
646
+ configurable: true
647
+ });
648
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedContent", {
649
+ get: function () {
650
+ var _a;
651
+ return ((_a = this.activePeriod) === null || _a === void 0 ? void 0 : _a.content) || this.computedValue;
652
+ },
653
+ enumerable: false,
654
+ configurable: true
655
+ });
656
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "innerPseudoFocused", {
657
+ get: function () {
658
+ if (this.pseudoFocus === false) {
659
+ return false;
660
+ }
661
+ if (this.open || this.computedFocused) {
662
+ return true;
663
+ }
664
+ return null;
665
+ },
666
+ enumerable: false,
667
+ configurable: true
668
+ });
669
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "nativeValue", {
670
+ get: function () {
671
+ var _a;
672
+ return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.value) || '';
673
+ },
674
+ set: function (value) {
675
+ if (this.nativeFocusableElement) {
676
+ this.nativeFocusableElement.value = value;
677
+ }
678
+ },
679
+ enumerable: false,
680
+ configurable: true
681
+ });
682
+ TuiInputDateRangeComponent.prototype.getComputedRangeFiller = function (dateFiller) {
683
+ return this.activePeriod ? '' : this.getDateRangeFiller(dateFiller);
684
+ };
685
+ TuiInputDateRangeComponent.prototype.onIconClick = function () {
686
+ if (this.isMobile && this.interactive) {
687
+ this.onOpenChange(true);
688
+ }
689
+ };
690
+ TuiInputDateRangeComponent.prototype.onOpenChange = function (open) {
691
+ this.open = open;
692
+ };
693
+ TuiInputDateRangeComponent.prototype.onValueChange = function (value) {
694
+ if (this.control) {
695
+ this.control.updateValueAndValidity({ emitEvent: false });
696
+ }
697
+ if (!value && !this.mobileCalendar) {
698
+ this.onOpenChange(true);
699
+ }
700
+ this.value =
701
+ value.length === i3.DATE_RANGE_FILLER_LENGTH
702
+ ? i3.TuiDayRange.normalizeParse(value, this.dateFormat)
703
+ : null;
704
+ if (!this.value) {
705
+ this.selectedActivePeriod = null;
706
+ }
707
+ };
708
+ TuiInputDateRangeComponent.prototype.onRangeChange = function (range) {
709
+ var _a, _b;
710
+ this.toggle();
711
+ this.focusInput();
712
+ if (!range) {
713
+ this.nativeValue = '';
714
+ }
715
+ this.value = range;
716
+ this.selectedActivePeriod = (_b = (_a = this.calendarRange) === null || _a === void 0 ? void 0 : _a.selectedActivePeriod) !== null && _b !== void 0 ? _b : null;
717
+ };
718
+ // TODO: investigate if it is used anywhere and (if not) delete it in v4.0
719
+ TuiInputDateRangeComponent.prototype.onItemSelect = function (item) {
720
+ this.toggle();
721
+ this.focusInput();
722
+ if (typeof item !== 'string') {
723
+ this.value = item.range.dayLimit(this.min, this.max);
724
+ return;
725
+ }
726
+ if (this.activePeriod === null) {
727
+ return;
728
+ }
729
+ this.value = null;
730
+ this.nativeValue = '';
731
+ };
732
+ TuiInputDateRangeComponent.prototype.onActiveZone = function (focused) {
733
+ this.updateFocused(focused);
734
+ if (!focused &&
735
+ !this.itemSelected &&
736
+ (this.nativeValue.length === i3.DATE_FILLER_LENGTH ||
737
+ this.nativeValue.length ===
738
+ i3.DATE_FILLER_LENGTH + i3.RANGE_SEPARATOR_CHAR.length)) {
739
+ this.value = i3.TuiDayRange.normalizeParse(this.nativeValue, this.dateFormat);
740
+ }
741
+ };
742
+ TuiInputDateRangeComponent.prototype.writeValue = function (value) {
743
+ _super.prototype.writeValue.call(this, value);
744
+ this.nativeValue = value ? this.computedValue : '';
745
+ };
746
+ TuiInputDateRangeComponent.prototype.valueIdenticalComparator = function (oldValue, newValue) {
747
+ return i3.tuiNullableSame(oldValue, newValue, function (a, b) { return a.daySame(b); });
748
+ };
749
+ TuiInputDateRangeComponent.prototype.calculateMask = function (dateFormat, separator, min, max, minLength, maxLength) {
750
+ return kit.maskitoDateRangeOptionsGenerator({
751
+ separator: separator,
752
+ mode: constants.TUI_DATE_MODE_MASKITO_ADAPTER[dateFormat],
753
+ min: min.toLocalNativeDate(),
754
+ max: max.toLocalNativeDate(),
755
+ minLength: minLength || {},
756
+ maxLength: maxLength || {},
757
+ });
758
+ };
759
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "itemSelected", {
760
+ get: function () {
761
+ var _this = this;
762
+ return this.items.findIndex(function (item) { return String(item) === _this.nativeValue; }) !== -1;
763
+ },
764
+ enumerable: false,
765
+ configurable: true
766
+ });
767
+ TuiInputDateRangeComponent.prototype.toggle = function () {
768
+ this.open = !this.open;
769
+ };
770
+ TuiInputDateRangeComponent.prototype.focusInput = function (preventScroll) {
771
+ if (preventScroll === void 0) { preventScroll = false; }
772
+ if (this.nativeFocusableElement) {
773
+ this.nativeFocusableElement.focus({ preventScroll: preventScroll });
774
+ }
775
+ };
776
+ TuiInputDateRangeComponent.prototype.getDateRangeFiller = function (dateFiller) {
777
+ return "" + dateFiller + i3.RANGE_SEPARATOR_CHAR + dateFiller;
778
+ };
779
+ return TuiInputDateRangeComponent;
780
+ }(i3.AbstractTuiNullableControl));
781
+ TuiInputDateRangeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeComponent, deps: [{ token: i8.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: i3.TUI_IS_MOBILE }, { token: tokens.TUI_MOBILE_CALENDAR, optional: true }, { token: i3.TUI_DATE_FORMAT }, { token: i3.TUI_DATE_SEPARATOR }, { token: tokens.TUI_DATE_TEXTS }, { token: tokens.TUI_DATE_RANGE_VALUE_TRANSFORMER, optional: true }, { token: tokens.TUI_INPUT_DATE_OPTIONS }, { token: i1.TUI_TEXTFIELD_SIZE }], target: i0__namespace.ɵɵFactoryTarget.Component });
782
+ TuiInputDateRangeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputDateRangeComponent, selector: "tui-input-date-range", inputs: { disabledItemHandler: "disabledItemHandler", markerHandler: "markerHandler", defaultViewedMonth: "defaultViewedMonth", items: "items", min: "min", max: "max", minLength: "minLength", maxLength: "maxLength" }, host: { listeners: { "click": "onClick()" }, properties: { "attr.data-size": "this.size" } }, providers: [
783
+ i3.tuiAsFocusableItemAccessor(TuiInputDateRangeComponent),
784
+ i3.tuiAsControl(TuiInputDateRangeComponent),
785
+ tokens.tuiDateStreamWithTransformer(tokens.TUI_DATE_RANGE_VALUE_TRANSFORMER),
786
+ {
787
+ provide: i1.TUI_DROPDOWN_COMPONENT,
788
+ useFactory: function () { return (i0.inject(i3.TUI_IS_MOBILE) &&
789
+ i0.inject(tokens.TUI_MOBILE_CALENDAR, i0.InjectFlags.Optional)) ||
790
+ i0.inject(i1.TUI_DROPDOWN_COMPONENT, i0.InjectFlags.SkipSelf); },
791
+ },
792
+ ], viewQueries: [{ propertyName: "textfield", first: true, predicate: i1.TuiPrimitiveTextfieldComponent, descendants: true }, { propertyName: "calendarRange", first: true, predicate: i0__namespace.forwardRef(function () { return i2.TuiCalendarRangeComponent; }), descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<tui-hosted-dropdown\n class=\"t-hosted\"\n [canOpen]=\"interactive\"\n [content]=\"dropdown\"\n [open]=\"open && interactive\"\n (openChange)=\"onOpenChange($event)\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-primitive-textfield\n *tuiLet=\"dateFiller$ | async as dateFiller\"\n automation-id=\"tui-input-date-range__textfield\"\n tuiValueAccessor\n class=\"t-textfield\"\n [disabled]=\"computedDisabled\"\n [invalid]=\"computedInvalid\"\n [maskito]=\"computedMask\"\n [nativeId]=\"nativeId\"\n [pseudoActive]=\"pseudoActive\"\n [pseudoFocus]=\"innerPseudoFocused\"\n [pseudoHover]=\"pseudoHover\"\n [readOnly]=\"readOnly\"\n [tuiTextfieldFiller]=\"getComputedRangeFiller(dateFiller || '')\"\n [tuiTextfieldIcon]=\"calendarIcon && iconContent\"\n [value]=\"computedValue\"\n (valueChange)=\"onValueChange($event)\"\n >\n <ng-content></ng-content>\n <ng-content\n ngProjectAs=\"input\"\n select=\"input\"\n ></ng-content>\n\n <div\n *ngIf=\"showValueTemplate\"\n ngProjectAs=\"tuiContent\"\n class=\"t-value\"\n >\n <ng-container *polymorpheusOutlet=\"computedContent as text; context: {$implicit: value}\">\n {{ text }}\n </ng-container>\n </div>\n </tui-primitive-textfield>\n\n <ng-template #iconContent>\n <tui-svg\n *polymorpheusOutlet=\"calendarIcon as src; context: {$implicit: size}\"\n appearance=\"icon\"\n automation-id=\"tui-input-date-range__icon\"\n tuiWrapper\n [class.t-icon]=\"!computedDisabled\"\n [src]=\"src\"\n (click)=\"onIconClick()\"\n ></tui-svg>\n </ng-template>\n\n <ng-template #dropdown>\n <tui-calendar-range\n [defaultViewedMonth]=\"defaultViewedMonth\"\n [disabledItemHandler]=\"disabledItemHandler\"\n [items]=\"items\"\n [markerHandler]=\"markerHandler\"\n [max]=\"computedMax\"\n [maxLength]=\"maxLength\"\n [min]=\"computedMin\"\n [minLength]=\"minLength\"\n [value]=\"value\"\n (valueChange)=\"onRangeChange($event)\"\n ></tui-calendar-range>\n </ng-template>\n</tui-hosted-dropdown>\n", styles: [":host{display:block;border-radius:var(--tui-radius-m);text-align:left}:host._disabled{pointer-events:none}.t-hosted{display:block;border-radius:inherit}.t-textfield{border-radius:inherit;text-align:inherit}.t-icon{pointer-events:auto}.t-value{display:flex;width:100%;align-items:center}\n"], components: [{ type: i1__namespace.TuiHostedDropdownComponent, selector: "tui-hosted-dropdown", inputs: ["content", "sided", "canOpen", "open"], outputs: ["openChange", "focusedChange"] }, { type: i1__namespace.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i1__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i2__namespace.TuiCalendarRangeComponent, selector: "tui-calendar-range", inputs: ["defaultViewedMonth", "disabledItemHandler", "markerHandler", "items", "min", "max", "minLength", "maxLength", "value"], outputs: ["valueChange"] }], directives: [{ type: i3__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i3__namespace.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { type: i1__namespace.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i4__namespace.TuiValueAccessorDirective, selector: "[tuiValueAccessor]" }, { type: i5__namespace.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { type: i1__namespace.TuiTextfieldFillerDirective, selector: "[tuiTextfieldFiller]", inputs: ["tuiTextfieldFiller"] }, { type: i1__namespace.TuiTextfieldIconDirective, selector: "[tuiTextfieldIcon]", inputs: ["tuiTextfieldIcon"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i1__namespace.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }], pipes: { "async": i6__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
793
+ __decorate([
794
+ i3.tuiPure
795
+ ], TuiInputDateRangeComponent.prototype, "calculateMask", null);
796
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeComponent, decorators: [{
797
+ type: i0.Component,
798
+ args: [{
799
+ selector: 'tui-input-date-range',
800
+ templateUrl: './input-date-range.template.html',
801
+ styleUrls: ['./input-date-range.style.less'],
802
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
803
+ providers: [
804
+ i3.tuiAsFocusableItemAccessor(TuiInputDateRangeComponent),
805
+ i3.tuiAsControl(TuiInputDateRangeComponent),
806
+ tokens.tuiDateStreamWithTransformer(tokens.TUI_DATE_RANGE_VALUE_TRANSFORMER),
807
+ {
808
+ provide: i1.TUI_DROPDOWN_COMPONENT,
809
+ useFactory: function () { return (i0.inject(i3.TUI_IS_MOBILE) &&
810
+ i0.inject(tokens.TUI_MOBILE_CALENDAR, i0.InjectFlags.Optional)) ||
811
+ i0.inject(i1.TUI_DROPDOWN_COMPONENT, i0.InjectFlags.SkipSelf); },
812
+ },
813
+ ],
814
+ }]
815
+ }], ctorParameters: function () {
816
+ return [{ type: i8__namespace.NgControl, decorators: [{
817
+ type: i0.Optional
818
+ }, {
819
+ type: i0.Self
820
+ }, {
821
+ type: i0.Inject,
822
+ args: [i8.NgControl]
823
+ }] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
824
+ type: i0.Inject,
825
+ args: [i0.ChangeDetectorRef]
826
+ }] }, { type: undefined, decorators: [{
827
+ type: i0.Inject,
828
+ args: [i3.TUI_IS_MOBILE]
829
+ }] }, { type: i0__namespace.Type, decorators: [{
830
+ type: i0.Optional
831
+ }, {
832
+ type: i0.Inject,
833
+ args: [tokens.TUI_MOBILE_CALENDAR]
834
+ }] }, { type: undefined, decorators: [{
835
+ type: i0.Inject,
836
+ args: [i3.TUI_DATE_FORMAT]
837
+ }] }, { type: undefined, decorators: [{
838
+ type: i0.Inject,
839
+ args: [i3.TUI_DATE_SEPARATOR]
840
+ }] }, { type: i9__namespace.Observable, decorators: [{
841
+ type: i0.Inject,
842
+ args: [tokens.TUI_DATE_TEXTS]
843
+ }] }, { type: i3__namespace.AbstractTuiValueTransformer, decorators: [{
844
+ type: i0.Optional
845
+ }, {
846
+ type: i0.Inject,
847
+ args: [tokens.TUI_DATE_RANGE_VALUE_TRANSFORMER]
848
+ }] }, { type: undefined, decorators: [{
849
+ type: i0.Inject,
850
+ args: [tokens.TUI_INPUT_DATE_OPTIONS]
851
+ }] }, { type: i1__namespace.TuiTextfieldSizeDirective, decorators: [{
852
+ type: i0.Inject,
853
+ args: [i1.TUI_TEXTFIELD_SIZE]
854
+ }] }];
855
+ }, propDecorators: { textfield: [{
856
+ type: i0.ViewChild,
857
+ args: [i1.TuiPrimitiveTextfieldComponent]
858
+ }], calendarRange: [{
859
+ type: i0.ViewChild,
860
+ args: [i0.forwardRef(function () { return i2.TuiCalendarRangeComponent; })]
861
+ }], disabledItemHandler: [{
862
+ type: i0.Input
863
+ }], markerHandler: [{
864
+ type: i0.Input
865
+ }], defaultViewedMonth: [{
866
+ type: i0.Input
867
+ }], items: [{
868
+ type: i0.Input
869
+ }], min: [{
870
+ type: i0.Input
871
+ }], max: [{
872
+ type: i0.Input
873
+ }], minLength: [{
874
+ type: i0.Input
875
+ }], maxLength: [{
876
+ type: i0.Input
877
+ }], onClick: [{
878
+ type: i0.HostListener,
879
+ args: ['click']
880
+ }], size: [{
881
+ type: i0.HostBinding,
882
+ args: ['attr.data-size']
883
+ }], calculateMask: [] } });
738
884
 
739
- var TuiInputDateRangeDirective = /** @class */ (function (_super) {
740
- __extends(TuiInputDateRangeDirective, _super);
741
- function TuiInputDateRangeDirective() {
742
- return _super !== null && _super.apply(this, arguments) || this;
743
- }
744
- Object.defineProperty(TuiInputDateRangeDirective.prototype, "value", {
745
- get: function () {
746
- return this.host.computedValue;
747
- },
748
- enumerable: false,
749
- configurable: true
750
- });
751
- TuiInputDateRangeDirective.prototype.onValueChange = function (value) {
752
- this.host.onValueChange(value);
753
- };
754
- TuiInputDateRangeDirective.prototype.process = function (input) {
755
- input.inputMode = 'numeric';
756
- };
757
- TuiInputDateRangeDirective.prototype.ngDoCheck = function () {
758
- if (this.host.nativeFocusableElement) {
759
- this.host.nativeFocusableElement.placeholder = this.host.computedExampleText;
760
- }
761
- };
762
- return TuiInputDateRangeDirective;
763
- }(i1.AbstractTuiTextfieldHost));
764
- TuiInputDateRangeDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
765
- TuiInputDateRangeDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputDateRangeDirective, selector: "tui-input-date-range", providers: [i1.tuiAsTextfieldHost(TuiInputDateRangeDirective)], usesInheritance: true, ngImport: i0__namespace });
766
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeDirective, decorators: [{
767
- type: i0.Directive,
768
- args: [{
769
- selector: 'tui-input-date-range',
770
- providers: [i1.tuiAsTextfieldHost(TuiInputDateRangeDirective)],
771
- }]
772
- }] });
885
+ var TuiInputDateRangeDirective = /** @class */ (function (_super) {
886
+ __extends(TuiInputDateRangeDirective, _super);
887
+ function TuiInputDateRangeDirective() {
888
+ return _super !== null && _super.apply(this, arguments) || this;
889
+ }
890
+ Object.defineProperty(TuiInputDateRangeDirective.prototype, "value", {
891
+ get: function () {
892
+ return this.host.computedValue;
893
+ },
894
+ enumerable: false,
895
+ configurable: true
896
+ });
897
+ TuiInputDateRangeDirective.prototype.onValueChange = function (value) {
898
+ this.host.onValueChange(value);
899
+ };
900
+ TuiInputDateRangeDirective.prototype.process = function (input) {
901
+ input.inputMode = 'numeric';
902
+ };
903
+ TuiInputDateRangeDirective.prototype.ngDoCheck = function () {
904
+ if (this.host.nativeFocusableElement) {
905
+ this.host.nativeFocusableElement.placeholder = this.host.computedExampleText;
906
+ }
907
+ };
908
+ return TuiInputDateRangeDirective;
909
+ }(i1.AbstractTuiTextfieldHost));
910
+ TuiInputDateRangeDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
911
+ TuiInputDateRangeDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputDateRangeDirective, selector: "tui-input-date-range", providers: [i1.tuiAsTextfieldHost(TuiInputDateRangeDirective)], usesInheritance: true, ngImport: i0__namespace });
912
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeDirective, decorators: [{
913
+ type: i0.Directive,
914
+ args: [{
915
+ selector: 'tui-input-date-range',
916
+ providers: [i1.tuiAsTextfieldHost(TuiInputDateRangeDirective)],
917
+ }]
918
+ }] });
773
919
 
774
- var TuiInputDateRangeModule = /** @class */ (function () {
775
- function TuiInputDateRangeModule() {
776
- }
777
- return TuiInputDateRangeModule;
778
- }());
779
- TuiInputDateRangeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
780
- TuiInputDateRangeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, declarations: [TuiInputDateRangeComponent, TuiInputDateRangeDirective], imports: [i6.CommonModule,
781
- i5.MaskitoModule,
782
- i3.TuiActiveZoneModule,
783
- i3.TuiLetModule,
784
- i7.PolymorpheusModule,
785
- i1.TuiWrapperModule,
786
- i1.TuiPrimitiveTextfieldModule,
787
- i1.TuiTextfieldControllerModule,
788
- i1.TuiHostedDropdownModule,
789
- i1.TuiSvgModule,
790
- i2.TuiCalendarRangeModule,
791
- i4.TuiValueAccessorModule], exports: [TuiInputDateRangeComponent,
792
- TuiInputDateRangeDirective,
793
- i1.TuiTextfieldComponent] });
794
- TuiInputDateRangeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, imports: [[
795
- i6.CommonModule,
796
- i5.MaskitoModule,
797
- i3.TuiActiveZoneModule,
798
- i3.TuiLetModule,
799
- i7.PolymorpheusModule,
800
- i1.TuiWrapperModule,
801
- i1.TuiPrimitiveTextfieldModule,
802
- i1.TuiTextfieldControllerModule,
803
- i1.TuiHostedDropdownModule,
804
- i1.TuiSvgModule,
805
- i2.TuiCalendarRangeModule,
806
- i4.TuiValueAccessorModule,
807
- ]] });
808
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, decorators: [{
809
- type: i0.NgModule,
810
- args: [{
811
- imports: [
812
- i6.CommonModule,
813
- i5.MaskitoModule,
814
- i3.TuiActiveZoneModule,
815
- i3.TuiLetModule,
816
- i7.PolymorpheusModule,
817
- i1.TuiWrapperModule,
818
- i1.TuiPrimitiveTextfieldModule,
819
- i1.TuiTextfieldControllerModule,
820
- i1.TuiHostedDropdownModule,
821
- i1.TuiSvgModule,
822
- i2.TuiCalendarRangeModule,
823
- i4.TuiValueAccessorModule,
824
- ],
825
- declarations: [TuiInputDateRangeComponent, TuiInputDateRangeDirective],
826
- exports: [
827
- TuiInputDateRangeComponent,
828
- TuiInputDateRangeDirective,
829
- i1.TuiTextfieldComponent,
830
- ],
831
- }]
832
- }] });
920
+ var TuiInputDateRangeModule = /** @class */ (function () {
921
+ function TuiInputDateRangeModule() {
922
+ }
923
+ return TuiInputDateRangeModule;
924
+ }());
925
+ TuiInputDateRangeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
926
+ TuiInputDateRangeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, declarations: [TuiInputDateRangeComponent, TuiInputDateRangeDirective], imports: [i6.CommonModule,
927
+ i5.MaskitoModule,
928
+ i3.TuiActiveZoneModule,
929
+ i3.TuiLetModule,
930
+ i7.PolymorpheusModule,
931
+ i1.TuiWrapperModule,
932
+ i1.TuiPrimitiveTextfieldModule,
933
+ i1.TuiTextfieldControllerModule,
934
+ i1.TuiHostedDropdownModule,
935
+ i1.TuiSvgModule,
936
+ i2.TuiCalendarRangeModule,
937
+ i4.TuiValueAccessorModule], exports: [TuiInputDateRangeComponent,
938
+ TuiInputDateRangeDirective,
939
+ i1.TuiTextfieldComponent] });
940
+ TuiInputDateRangeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, imports: [[
941
+ i6.CommonModule,
942
+ i5.MaskitoModule,
943
+ i3.TuiActiveZoneModule,
944
+ i3.TuiLetModule,
945
+ i7.PolymorpheusModule,
946
+ i1.TuiWrapperModule,
947
+ i1.TuiPrimitiveTextfieldModule,
948
+ i1.TuiTextfieldControllerModule,
949
+ i1.TuiHostedDropdownModule,
950
+ i1.TuiSvgModule,
951
+ i2.TuiCalendarRangeModule,
952
+ i4.TuiValueAccessorModule,
953
+ ]] });
954
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, decorators: [{
955
+ type: i0.NgModule,
956
+ args: [{
957
+ imports: [
958
+ i6.CommonModule,
959
+ i5.MaskitoModule,
960
+ i3.TuiActiveZoneModule,
961
+ i3.TuiLetModule,
962
+ i7.PolymorpheusModule,
963
+ i1.TuiWrapperModule,
964
+ i1.TuiPrimitiveTextfieldModule,
965
+ i1.TuiTextfieldControllerModule,
966
+ i1.TuiHostedDropdownModule,
967
+ i1.TuiSvgModule,
968
+ i2.TuiCalendarRangeModule,
969
+ i4.TuiValueAccessorModule,
970
+ ],
971
+ declarations: [TuiInputDateRangeComponent, TuiInputDateRangeDirective],
972
+ exports: [
973
+ TuiInputDateRangeComponent,
974
+ TuiInputDateRangeDirective,
975
+ i1.TuiTextfieldComponent,
976
+ ],
977
+ }]
978
+ }] });
833
979
 
834
- /**
835
- * Generated bundle index. Do not edit.
836
- */
980
+ /**
981
+ * Generated bundle index. Do not edit.
982
+ */
837
983
 
838
- exports.TuiInputDateRangeComponent = TuiInputDateRangeComponent;
839
- exports.TuiInputDateRangeDirective = TuiInputDateRangeDirective;
840
- exports.TuiInputDateRangeModule = TuiInputDateRangeModule;
984
+ exports.TuiInputDateRangeComponent = TuiInputDateRangeComponent;
985
+ exports.TuiInputDateRangeDirective = TuiInputDateRangeDirective;
986
+ exports.TuiInputDateRangeModule = TuiInputDateRangeModule;
841
987
 
842
- Object.defineProperty(exports, '__esModule', { value: true });
988
+ Object.defineProperty(exports, '__esModule', { value: true });
843
989
 
844
990
  }));
845
991
  //# sourceMappingURL=taiga-ui-kit-components-input-date-range.umd.js.map