@taiga-ui/kit 3.78.0 → 3.79.0-canary.50b3d5e

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 (135) 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 +718 -572
  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 +700 -554
  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 +955 -809
  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 +941 -795
  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 +1108 -962
  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 +152 -6
  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 +966 -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/package.json +42 -42
@@ -1,827 +1,973 @@
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/constants'), require('@taiga-ui/kit/tokens'), require('rxjs/operators'), require('@taiga-ui/kit/components/calendar-range'), 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/constants', '@taiga-ui/kit/tokens', 'rxjs/operators', '@taiga-ui/kit/components/calendar-range', '@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.constants, global["taiga-ui"].kit.tokens, global.rxjs.operators, global["taiga-ui"].kit.components["calendar-range"], 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/constants'), require('@taiga-ui/kit/tokens'), require('rxjs/operators'), require('@taiga-ui/kit/components/calendar-range'), 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/constants', '@taiga-ui/kit/tokens', 'rxjs/operators', '@taiga-ui/kit/components/calendar-range', '@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.constants, global["taiga-ui"].kit.tokens, global.rxjs.operators, global["taiga-ui"].kit.components["calendar-range"], 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, constants, tokens, operators, i2, 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.maxLengthMapper = constants.MAX_DAY_RANGE_LENGTH_MAPPER;
376
- _this.dateFiller$ = _this.dateTexts$.pipe(operators.map(function (dateTexts) { return i3.changeDateSeparator(dateTexts[_this.dateFormat], _this.dateSeparator); }));
377
- return _this;
378
- }
379
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "size", {
380
- get: function () {
381
- return this.textfieldSize.size;
382
- },
383
- enumerable: false,
384
- configurable: true
385
- });
386
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMin", {
387
- get: function () {
388
- var _a;
389
- return (_a = this.min) !== null && _a !== void 0 ? _a : i3.TUI_FIRST_DAY;
390
- },
391
- enumerable: false,
392
- configurable: true
393
- });
394
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMax", {
395
- get: function () {
396
- var _a;
397
- return (_a = this.max) !== null && _a !== void 0 ? _a : i3.TUI_LAST_DAY;
398
- },
399
- enumerable: false,
400
- configurable: true
401
- });
402
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "nativeFocusableElement", {
403
- get: function () {
404
- var _a, _b;
405
- return (_b = (_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) !== null && _b !== void 0 ? _b : null;
406
- },
407
- enumerable: false,
408
- configurable: true
409
- });
410
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "focused", {
411
- get: function () {
412
- var _a;
413
- return !!((_a = this.textfield) === null || _a === void 0 ? void 0 : _a.focused);
414
- },
415
- enumerable: false,
416
- configurable: true
417
- });
418
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMobile", {
419
- get: function () {
420
- return this.isMobile && !!this.mobileCalendar;
421
- },
422
- enumerable: false,
423
- configurable: true
424
- });
425
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "calendarIcon", {
426
- get: function () {
427
- return this.options.icon;
428
- },
429
- enumerable: false,
430
- configurable: true
431
- });
432
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedExampleText", {
433
- get: function () {
434
- var _a, _b;
435
- return this.items.length
436
- ? ((_b = (_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) === null || _b === void 0 ? void 0 : _b.placeholder) || ''
437
- : '';
438
- },
439
- enumerable: false,
440
- configurable: true
441
- });
442
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMask", {
443
- get: function () {
444
- var _a, _b;
445
- /**
446
- * TODO: we can delete this workaround in v4.0
447
- * after solving this issue:
448
- * https://github.com/taiga-family/maskito/issues/604
449
- */
450
- var nativeValueIsNotSynced = ((_b = (_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) === null || _b === void 0 ? void 0 : _b.value) !== this.computedValue;
451
- return this.activePeriod || nativeValueIsNotSynced
452
- ? core.MASKITO_DEFAULT_OPTIONS
453
- : this.calculateMask(this.dateFormat, this.dateSeparator, this.computedMin, this.computedMax, this.minLength, this.maxLength);
454
- },
455
- enumerable: false,
456
- configurable: true
457
- });
458
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "activePeriod", {
459
- get: function () {
460
- var _this = this;
461
- return (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)) &&
462
- a.to.daySame(b.to.dayLimit(_this.min, _this.max)); }); }) || null);
463
- },
464
- enumerable: false,
465
- configurable: true
466
- });
467
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedValue", {
468
- get: function () {
469
- var _c = this, value = _c.value, nativeValue = _c.nativeValue, activePeriod = _c.activePeriod;
470
- if (activePeriod) {
471
- return String(activePeriod);
472
- }
473
- return value
474
- ? value.getFormattedDayRange(this.dateFormat, this.dateSeparator)
475
- : nativeValue;
476
- },
477
- enumerable: false,
478
- configurable: true
479
- });
480
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "showValueTemplate", {
481
- get: function () {
482
- return i3.tuiIsPresent(this.value) && !this.focused;
483
- },
484
- enumerable: false,
485
- configurable: true
486
- });
487
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedContent", {
488
- get: function () {
489
- var _a;
490
- return ((_a = this.activePeriod) === null || _a === void 0 ? void 0 : _a.content) || this.computedValue;
491
- },
492
- enumerable: false,
493
- configurable: true
494
- });
495
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "innerPseudoFocused", {
496
- get: function () {
497
- if (this.pseudoFocus === false) {
498
- return false;
499
- }
500
- if (this.open || this.computedFocused) {
501
- return true;
502
- }
503
- return null;
504
- },
505
- enumerable: false,
506
- configurable: true
507
- });
508
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "nativeValue", {
509
- get: function () {
510
- var _a;
511
- return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.value) || '';
512
- },
513
- set: function (value) {
514
- if (this.nativeFocusableElement) {
515
- this.nativeFocusableElement.value = value;
516
- }
517
- },
518
- enumerable: false,
519
- configurable: true
520
- });
521
- TuiInputDateRangeComponent.prototype.onClick = function () {
522
- if (!this.isMobile && this.interactive) {
523
- this.open = !this.open;
524
- }
525
- };
526
- TuiInputDateRangeComponent.prototype.getComputedRangeFiller = function (dateFiller) {
527
- return this.activePeriod ? '' : this.getDateRangeFiller(dateFiller);
528
- };
529
- TuiInputDateRangeComponent.prototype.onIconClick = function () {
530
- if (this.isMobile && this.interactive) {
531
- this.open = true;
532
- }
533
- };
534
- TuiInputDateRangeComponent.prototype.onOpenChange = function (open) {
535
- this.open = open;
536
- };
537
- TuiInputDateRangeComponent.prototype.onValueChange = function (value) {
538
- if (this.control) {
539
- this.control.updateValueAndValidity({ emitEvent: false });
540
- }
541
- if (!value && !this.mobileCalendar) {
542
- this.onOpenChange(true);
543
- }
544
- this.value =
545
- value.length === i3.DATE_RANGE_FILLER_LENGTH
546
- ? i3.TuiDayRange.normalizeParse(value, this.dateFormat)
547
- : null;
548
- };
549
- TuiInputDateRangeComponent.prototype.onRangeChange = function (range) {
550
- this.toggle();
551
- this.focusInput();
552
- if (!range) {
553
- this.nativeValue = '';
554
- }
555
- this.value = range;
556
- };
557
- // TODO: investigate if it is used anywhere and (if not) delete it in v4.0
558
- TuiInputDateRangeComponent.prototype.onItemSelect = function (item) {
559
- this.toggle();
560
- this.focusInput();
561
- if (typeof item !== 'string') {
562
- this.value = item.range.dayLimit(this.min, this.max);
563
- return;
564
- }
565
- if (this.activePeriod === null) {
566
- return;
567
- }
568
- this.value = null;
569
- this.nativeValue = '';
570
- };
571
- TuiInputDateRangeComponent.prototype.onActiveZone = function (focused) {
572
- this.updateFocused(focused);
573
- if (!focused &&
574
- !this.itemSelected &&
575
- (this.nativeValue.length === i3.DATE_FILLER_LENGTH ||
576
- this.nativeValue.length ===
577
- i3.DATE_FILLER_LENGTH + i3.RANGE_SEPARATOR_CHAR.length)) {
578
- this.value = i3.TuiDayRange.normalizeParse(this.nativeValue, this.dateFormat);
579
- }
580
- };
581
- TuiInputDateRangeComponent.prototype.writeValue = function (value) {
582
- _super.prototype.writeValue.call(this, value);
583
- this.nativeValue = value ? this.computedValue : '';
584
- };
585
- TuiInputDateRangeComponent.prototype.valueIdenticalComparator = function (oldValue, newValue) {
586
- return i3.tuiNullableSame(oldValue, newValue, function (a, b) { return a.daySame(b); });
587
- };
588
- TuiInputDateRangeComponent.prototype.calculateMask = function (dateFormat, separator, min, max, minLength, maxLength) {
589
- return kit.maskitoDateRangeOptionsGenerator({
590
- separator: separator,
591
- mode: constants.TUI_DATE_MODE_MASKITO_ADAPTER[dateFormat],
592
- min: min.toLocalNativeDate(),
593
- max: max.toLocalNativeDate(),
594
- minLength: minLength || {},
595
- maxLength: maxLength || {},
596
- });
597
- };
598
- Object.defineProperty(TuiInputDateRangeComponent.prototype, "itemSelected", {
599
- get: function () {
600
- var _this = this;
601
- return this.items.findIndex(function (item) { return String(item) === _this.nativeValue; }) !== -1;
602
- },
603
- enumerable: false,
604
- configurable: true
605
- });
606
- TuiInputDateRangeComponent.prototype.toggle = function () {
607
- this.open = !this.open;
608
- };
609
- TuiInputDateRangeComponent.prototype.focusInput = function (preventScroll) {
610
- if (preventScroll === void 0) { preventScroll = false; }
611
- if (this.nativeFocusableElement) {
612
- this.nativeFocusableElement.focus({ preventScroll: preventScroll });
613
- }
614
- };
615
- TuiInputDateRangeComponent.prototype.getDateRangeFiller = function (dateFiller) {
616
- return "" + dateFiller + i3.RANGE_SEPARATOR_CHAR + dateFiller;
617
- };
618
- return TuiInputDateRangeComponent;
619
- }(i3.AbstractTuiNullableControl));
620
- 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 });
621
- 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: [
622
- i3.tuiAsFocusableItemAccessor(TuiInputDateRangeComponent),
623
- i3.tuiAsControl(TuiInputDateRangeComponent),
624
- tokens.tuiDateStreamWithTransformer(tokens.TUI_DATE_RANGE_VALUE_TRANSFORMER),
625
- {
626
- provide: i1.TUI_DROPDOWN_COMPONENT,
627
- useFactory: function () { return (i0.inject(i3.TUI_IS_MOBILE) &&
628
- i0.inject(tokens.TUI_MOBILE_CALENDAR, i0.InjectFlags.Optional)) ||
629
- i0.inject(i1.TUI_DROPDOWN_COMPONENT, i0.InjectFlags.SkipSelf); },
630
- },
631
- ], viewQueries: [{ propertyName: "textfield", first: true, predicate: i1.TuiPrimitiveTextfieldComponent, 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 });
632
- __decorate([
633
- i3.tuiPure
634
- ], TuiInputDateRangeComponent.prototype, "calculateMask", null);
635
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeComponent, decorators: [{
636
- type: i0.Component,
637
- args: [{
638
- selector: 'tui-input-date-range',
639
- templateUrl: './input-date-range.template.html',
640
- styleUrls: ['./input-date-range.style.less'],
641
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
642
- providers: [
643
- i3.tuiAsFocusableItemAccessor(TuiInputDateRangeComponent),
644
- i3.tuiAsControl(TuiInputDateRangeComponent),
645
- tokens.tuiDateStreamWithTransformer(tokens.TUI_DATE_RANGE_VALUE_TRANSFORMER),
646
- {
647
- provide: i1.TUI_DROPDOWN_COMPONENT,
648
- useFactory: function () { return (i0.inject(i3.TUI_IS_MOBILE) &&
649
- i0.inject(tokens.TUI_MOBILE_CALENDAR, i0.InjectFlags.Optional)) ||
650
- i0.inject(i1.TUI_DROPDOWN_COMPONENT, i0.InjectFlags.SkipSelf); },
651
- },
652
- ],
653
- }]
654
- }], ctorParameters: function () {
655
- return [{ type: i8__namespace.NgControl, decorators: [{
656
- type: i0.Optional
657
- }, {
658
- type: i0.Self
659
- }, {
660
- type: i0.Inject,
661
- args: [i8.NgControl]
662
- }] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
663
- type: i0.Inject,
664
- args: [i0.ChangeDetectorRef]
665
- }] }, { type: undefined, decorators: [{
666
- type: i0.Inject,
667
- args: [i3.TUI_IS_MOBILE]
668
- }] }, { type: i0__namespace.Type, decorators: [{
669
- type: i0.Optional
670
- }, {
671
- type: i0.Inject,
672
- args: [tokens.TUI_MOBILE_CALENDAR]
673
- }] }, { type: undefined, decorators: [{
674
- type: i0.Inject,
675
- args: [i3.TUI_DATE_FORMAT]
676
- }] }, { type: undefined, decorators: [{
677
- type: i0.Inject,
678
- args: [i3.TUI_DATE_SEPARATOR]
679
- }] }, { type: i9__namespace.Observable, decorators: [{
680
- type: i0.Inject,
681
- args: [tokens.TUI_DATE_TEXTS]
682
- }] }, { type: i3__namespace.AbstractTuiValueTransformer, decorators: [{
683
- type: i0.Optional
684
- }, {
685
- type: i0.Inject,
686
- args: [tokens.TUI_DATE_RANGE_VALUE_TRANSFORMER]
687
- }] }, { type: undefined, decorators: [{
688
- type: i0.Inject,
689
- args: [tokens.TUI_INPUT_DATE_OPTIONS]
690
- }] }, { type: i1__namespace.TuiTextfieldSizeDirective, decorators: [{
691
- type: i0.Inject,
692
- args: [i1.TUI_TEXTFIELD_SIZE]
693
- }] }];
694
- }, propDecorators: { textfield: [{
695
- type: i0.ViewChild,
696
- args: [i1.TuiPrimitiveTextfieldComponent]
697
- }], disabledItemHandler: [{
698
- type: i0.Input
699
- }], markerHandler: [{
700
- type: i0.Input
701
- }], defaultViewedMonth: [{
702
- type: i0.Input
703
- }], items: [{
704
- type: i0.Input
705
- }], min: [{
706
- type: i0.Input
707
- }], max: [{
708
- type: i0.Input
709
- }], minLength: [{
710
- type: i0.Input
711
- }], maxLength: [{
712
- type: i0.Input
713
- }], size: [{
714
- type: i0.HostBinding,
715
- args: ['attr.data-size']
716
- }], onClick: [{
717
- type: i0.HostListener,
718
- args: ['click']
719
- }], 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.maxLengthMapper = constants.MAX_DAY_RANGE_LENGTH_MAPPER;
522
+ _this.dateFiller$ = _this.dateTexts$.pipe(operators.map(function (dateTexts) { return i3.changeDateSeparator(dateTexts[_this.dateFormat], _this.dateSeparator); }));
523
+ return _this;
524
+ }
525
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "size", {
526
+ get: function () {
527
+ return this.textfieldSize.size;
528
+ },
529
+ enumerable: false,
530
+ configurable: true
531
+ });
532
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMin", {
533
+ get: function () {
534
+ var _a;
535
+ return (_a = this.min) !== null && _a !== void 0 ? _a : i3.TUI_FIRST_DAY;
536
+ },
537
+ enumerable: false,
538
+ configurable: true
539
+ });
540
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMax", {
541
+ get: function () {
542
+ var _a;
543
+ return (_a = this.max) !== null && _a !== void 0 ? _a : i3.TUI_LAST_DAY;
544
+ },
545
+ enumerable: false,
546
+ configurable: true
547
+ });
548
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "nativeFocusableElement", {
549
+ get: function () {
550
+ var _a, _b;
551
+ return (_b = (_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) !== null && _b !== void 0 ? _b : null;
552
+ },
553
+ enumerable: false,
554
+ configurable: true
555
+ });
556
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "focused", {
557
+ get: function () {
558
+ var _a;
559
+ return !!((_a = this.textfield) === null || _a === void 0 ? void 0 : _a.focused);
560
+ },
561
+ enumerable: false,
562
+ configurable: true
563
+ });
564
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMobile", {
565
+ get: function () {
566
+ return this.isMobile && !!this.mobileCalendar;
567
+ },
568
+ enumerable: false,
569
+ configurable: true
570
+ });
571
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "calendarIcon", {
572
+ get: function () {
573
+ return this.options.icon;
574
+ },
575
+ enumerable: false,
576
+ configurable: true
577
+ });
578
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedExampleText", {
579
+ get: function () {
580
+ var _a, _b;
581
+ return this.items.length
582
+ ? ((_b = (_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) === null || _b === void 0 ? void 0 : _b.placeholder) || ''
583
+ : '';
584
+ },
585
+ enumerable: false,
586
+ configurable: true
587
+ });
588
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedMask", {
589
+ get: function () {
590
+ var _a, _b;
591
+ /**
592
+ * TODO: we can delete this workaround in v4.0
593
+ * after solving this issue:
594
+ * https://github.com/taiga-family/maskito/issues/604
595
+ */
596
+ var nativeValueIsNotSynced = ((_b = (_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) === null || _b === void 0 ? void 0 : _b.value) !== this.computedValue;
597
+ return this.activePeriod || nativeValueIsNotSynced
598
+ ? core.MASKITO_DEFAULT_OPTIONS
599
+ : this.calculateMask(this.dateFormat, this.dateSeparator, this.computedMin, this.computedMax, this.minLength, this.maxLength);
600
+ },
601
+ enumerable: false,
602
+ configurable: true
603
+ });
604
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "activePeriod", {
605
+ get: function () {
606
+ var _this = this;
607
+ return (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)) &&
608
+ a.to.daySame(b.to.dayLimit(_this.min, _this.max)); }); }) || null);
609
+ },
610
+ enumerable: false,
611
+ configurable: true
612
+ });
613
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedValue", {
614
+ get: function () {
615
+ var _c = this, value = _c.value, nativeValue = _c.nativeValue, activePeriod = _c.activePeriod;
616
+ if (activePeriod) {
617
+ return String(activePeriod);
618
+ }
619
+ return value
620
+ ? value.getFormattedDayRange(this.dateFormat, this.dateSeparator)
621
+ : nativeValue;
622
+ },
623
+ enumerable: false,
624
+ configurable: true
625
+ });
626
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "showValueTemplate", {
627
+ get: function () {
628
+ return i3.tuiIsPresent(this.value) && !this.focused;
629
+ },
630
+ enumerable: false,
631
+ configurable: true
632
+ });
633
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "computedContent", {
634
+ get: function () {
635
+ var _a;
636
+ return ((_a = this.activePeriod) === null || _a === void 0 ? void 0 : _a.content) || this.computedValue;
637
+ },
638
+ enumerable: false,
639
+ configurable: true
640
+ });
641
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "innerPseudoFocused", {
642
+ get: function () {
643
+ if (this.pseudoFocus === false) {
644
+ return false;
645
+ }
646
+ if (this.open || this.computedFocused) {
647
+ return true;
648
+ }
649
+ return null;
650
+ },
651
+ enumerable: false,
652
+ configurable: true
653
+ });
654
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "nativeValue", {
655
+ get: function () {
656
+ var _a;
657
+ return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.value) || '';
658
+ },
659
+ set: function (value) {
660
+ if (this.nativeFocusableElement) {
661
+ this.nativeFocusableElement.value = value;
662
+ }
663
+ },
664
+ enumerable: false,
665
+ configurable: true
666
+ });
667
+ TuiInputDateRangeComponent.prototype.onClick = function () {
668
+ if (!this.isMobile && this.interactive) {
669
+ this.open = !this.open;
670
+ }
671
+ };
672
+ TuiInputDateRangeComponent.prototype.getComputedRangeFiller = function (dateFiller) {
673
+ return this.activePeriod ? '' : this.getDateRangeFiller(dateFiller);
674
+ };
675
+ TuiInputDateRangeComponent.prototype.onIconClick = function () {
676
+ if (this.isMobile && this.interactive) {
677
+ this.open = true;
678
+ }
679
+ };
680
+ TuiInputDateRangeComponent.prototype.onOpenChange = function (open) {
681
+ this.open = open;
682
+ };
683
+ TuiInputDateRangeComponent.prototype.onValueChange = function (value) {
684
+ if (this.control) {
685
+ this.control.updateValueAndValidity({ emitEvent: false });
686
+ }
687
+ if (!value && !this.mobileCalendar) {
688
+ this.onOpenChange(true);
689
+ }
690
+ this.value =
691
+ value.length === i3.DATE_RANGE_FILLER_LENGTH
692
+ ? i3.TuiDayRange.normalizeParse(value, this.dateFormat)
693
+ : null;
694
+ };
695
+ TuiInputDateRangeComponent.prototype.onRangeChange = function (range) {
696
+ this.toggle();
697
+ this.focusInput();
698
+ if (!range) {
699
+ this.nativeValue = '';
700
+ }
701
+ this.value = range;
702
+ };
703
+ // TODO: investigate if it is used anywhere and (if not) delete it in v4.0
704
+ TuiInputDateRangeComponent.prototype.onItemSelect = function (item) {
705
+ this.toggle();
706
+ this.focusInput();
707
+ if (typeof item !== 'string') {
708
+ this.value = item.range.dayLimit(this.min, this.max);
709
+ return;
710
+ }
711
+ if (this.activePeriod === null) {
712
+ return;
713
+ }
714
+ this.value = null;
715
+ this.nativeValue = '';
716
+ };
717
+ TuiInputDateRangeComponent.prototype.onActiveZone = function (focused) {
718
+ this.updateFocused(focused);
719
+ if (!focused &&
720
+ !this.itemSelected &&
721
+ (this.nativeValue.length === i3.DATE_FILLER_LENGTH ||
722
+ this.nativeValue.length ===
723
+ i3.DATE_FILLER_LENGTH + i3.RANGE_SEPARATOR_CHAR.length)) {
724
+ this.value = i3.TuiDayRange.normalizeParse(this.nativeValue, this.dateFormat);
725
+ }
726
+ };
727
+ TuiInputDateRangeComponent.prototype.writeValue = function (value) {
728
+ _super.prototype.writeValue.call(this, value);
729
+ this.nativeValue = value ? this.computedValue : '';
730
+ };
731
+ TuiInputDateRangeComponent.prototype.valueIdenticalComparator = function (oldValue, newValue) {
732
+ return i3.tuiNullableSame(oldValue, newValue, function (a, b) { return a.daySame(b); });
733
+ };
734
+ TuiInputDateRangeComponent.prototype.calculateMask = function (dateFormat, separator, min, max, minLength, maxLength) {
735
+ return kit.maskitoDateRangeOptionsGenerator({
736
+ separator: separator,
737
+ mode: constants.TUI_DATE_MODE_MASKITO_ADAPTER[dateFormat],
738
+ min: min.toLocalNativeDate(),
739
+ max: max.toLocalNativeDate(),
740
+ minLength: minLength || {},
741
+ maxLength: maxLength || {},
742
+ });
743
+ };
744
+ Object.defineProperty(TuiInputDateRangeComponent.prototype, "itemSelected", {
745
+ get: function () {
746
+ var _this = this;
747
+ return this.items.findIndex(function (item) { return String(item) === _this.nativeValue; }) !== -1;
748
+ },
749
+ enumerable: false,
750
+ configurable: true
751
+ });
752
+ TuiInputDateRangeComponent.prototype.toggle = function () {
753
+ this.open = !this.open;
754
+ };
755
+ TuiInputDateRangeComponent.prototype.focusInput = function (preventScroll) {
756
+ if (preventScroll === void 0) { preventScroll = false; }
757
+ if (this.nativeFocusableElement) {
758
+ this.nativeFocusableElement.focus({ preventScroll: preventScroll });
759
+ }
760
+ };
761
+ TuiInputDateRangeComponent.prototype.getDateRangeFiller = function (dateFiller) {
762
+ return "" + dateFiller + i3.RANGE_SEPARATOR_CHAR + dateFiller;
763
+ };
764
+ return TuiInputDateRangeComponent;
765
+ }(i3.AbstractTuiNullableControl));
766
+ 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 });
767
+ 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: [
768
+ i3.tuiAsFocusableItemAccessor(TuiInputDateRangeComponent),
769
+ i3.tuiAsControl(TuiInputDateRangeComponent),
770
+ tokens.tuiDateStreamWithTransformer(tokens.TUI_DATE_RANGE_VALUE_TRANSFORMER),
771
+ {
772
+ provide: i1.TUI_DROPDOWN_COMPONENT,
773
+ useFactory: function () { return (i0.inject(i3.TUI_IS_MOBILE) &&
774
+ i0.inject(tokens.TUI_MOBILE_CALENDAR, i0.InjectFlags.Optional)) ||
775
+ i0.inject(i1.TUI_DROPDOWN_COMPONENT, i0.InjectFlags.SkipSelf); },
776
+ },
777
+ ], viewQueries: [{ propertyName: "textfield", first: true, predicate: i1.TuiPrimitiveTextfieldComponent, 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 });
778
+ __decorate([
779
+ i3.tuiPure
780
+ ], TuiInputDateRangeComponent.prototype, "calculateMask", null);
781
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeComponent, decorators: [{
782
+ type: i0.Component,
783
+ args: [{
784
+ selector: 'tui-input-date-range',
785
+ templateUrl: './input-date-range.template.html',
786
+ styleUrls: ['./input-date-range.style.less'],
787
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
788
+ providers: [
789
+ i3.tuiAsFocusableItemAccessor(TuiInputDateRangeComponent),
790
+ i3.tuiAsControl(TuiInputDateRangeComponent),
791
+ tokens.tuiDateStreamWithTransformer(tokens.TUI_DATE_RANGE_VALUE_TRANSFORMER),
792
+ {
793
+ provide: i1.TUI_DROPDOWN_COMPONENT,
794
+ useFactory: function () { return (i0.inject(i3.TUI_IS_MOBILE) &&
795
+ i0.inject(tokens.TUI_MOBILE_CALENDAR, i0.InjectFlags.Optional)) ||
796
+ i0.inject(i1.TUI_DROPDOWN_COMPONENT, i0.InjectFlags.SkipSelf); },
797
+ },
798
+ ],
799
+ }]
800
+ }], ctorParameters: function () {
801
+ return [{ type: i8__namespace.NgControl, decorators: [{
802
+ type: i0.Optional
803
+ }, {
804
+ type: i0.Self
805
+ }, {
806
+ type: i0.Inject,
807
+ args: [i8.NgControl]
808
+ }] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
809
+ type: i0.Inject,
810
+ args: [i0.ChangeDetectorRef]
811
+ }] }, { type: undefined, decorators: [{
812
+ type: i0.Inject,
813
+ args: [i3.TUI_IS_MOBILE]
814
+ }] }, { type: i0__namespace.Type, decorators: [{
815
+ type: i0.Optional
816
+ }, {
817
+ type: i0.Inject,
818
+ args: [tokens.TUI_MOBILE_CALENDAR]
819
+ }] }, { type: undefined, decorators: [{
820
+ type: i0.Inject,
821
+ args: [i3.TUI_DATE_FORMAT]
822
+ }] }, { type: undefined, decorators: [{
823
+ type: i0.Inject,
824
+ args: [i3.TUI_DATE_SEPARATOR]
825
+ }] }, { type: i9__namespace.Observable, decorators: [{
826
+ type: i0.Inject,
827
+ args: [tokens.TUI_DATE_TEXTS]
828
+ }] }, { type: i3__namespace.AbstractTuiValueTransformer, decorators: [{
829
+ type: i0.Optional
830
+ }, {
831
+ type: i0.Inject,
832
+ args: [tokens.TUI_DATE_RANGE_VALUE_TRANSFORMER]
833
+ }] }, { type: undefined, decorators: [{
834
+ type: i0.Inject,
835
+ args: [tokens.TUI_INPUT_DATE_OPTIONS]
836
+ }] }, { type: i1__namespace.TuiTextfieldSizeDirective, decorators: [{
837
+ type: i0.Inject,
838
+ args: [i1.TUI_TEXTFIELD_SIZE]
839
+ }] }];
840
+ }, propDecorators: { textfield: [{
841
+ type: i0.ViewChild,
842
+ args: [i1.TuiPrimitiveTextfieldComponent]
843
+ }], disabledItemHandler: [{
844
+ type: i0.Input
845
+ }], markerHandler: [{
846
+ type: i0.Input
847
+ }], defaultViewedMonth: [{
848
+ type: i0.Input
849
+ }], items: [{
850
+ type: i0.Input
851
+ }], min: [{
852
+ type: i0.Input
853
+ }], max: [{
854
+ type: i0.Input
855
+ }], minLength: [{
856
+ type: i0.Input
857
+ }], maxLength: [{
858
+ type: i0.Input
859
+ }], size: [{
860
+ type: i0.HostBinding,
861
+ args: ['attr.data-size']
862
+ }], onClick: [{
863
+ type: i0.HostListener,
864
+ args: ['click']
865
+ }], calculateMask: [] } });
720
866
 
721
- var TuiInputDateRangeDirective = /** @class */ (function (_super) {
722
- __extends(TuiInputDateRangeDirective, _super);
723
- function TuiInputDateRangeDirective() {
724
- return _super !== null && _super.apply(this, arguments) || this;
725
- }
726
- Object.defineProperty(TuiInputDateRangeDirective.prototype, "value", {
727
- get: function () {
728
- return this.host.computedValue;
729
- },
730
- enumerable: false,
731
- configurable: true
732
- });
733
- TuiInputDateRangeDirective.prototype.onValueChange = function (value) {
734
- this.host.onValueChange(value);
735
- };
736
- TuiInputDateRangeDirective.prototype.process = function (input) {
737
- input.inputMode = 'numeric';
738
- };
739
- TuiInputDateRangeDirective.prototype.ngDoCheck = function () {
740
- if (this.host.nativeFocusableElement) {
741
- this.host.nativeFocusableElement.placeholder = this.host.computedExampleText;
742
- }
743
- };
744
- return TuiInputDateRangeDirective;
745
- }(i1.AbstractTuiTextfieldHost));
746
- 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 });
747
- 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 });
748
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeDirective, decorators: [{
749
- type: i0.Directive,
750
- args: [{
751
- selector: 'tui-input-date-range',
752
- providers: [i1.tuiAsTextfieldHost(TuiInputDateRangeDirective)],
753
- }]
754
- }] });
867
+ var TuiInputDateRangeDirective = /** @class */ (function (_super) {
868
+ __extends(TuiInputDateRangeDirective, _super);
869
+ function TuiInputDateRangeDirective() {
870
+ return _super !== null && _super.apply(this, arguments) || this;
871
+ }
872
+ Object.defineProperty(TuiInputDateRangeDirective.prototype, "value", {
873
+ get: function () {
874
+ return this.host.computedValue;
875
+ },
876
+ enumerable: false,
877
+ configurable: true
878
+ });
879
+ TuiInputDateRangeDirective.prototype.onValueChange = function (value) {
880
+ this.host.onValueChange(value);
881
+ };
882
+ TuiInputDateRangeDirective.prototype.process = function (input) {
883
+ input.inputMode = 'numeric';
884
+ };
885
+ TuiInputDateRangeDirective.prototype.ngDoCheck = function () {
886
+ if (this.host.nativeFocusableElement) {
887
+ this.host.nativeFocusableElement.placeholder = this.host.computedExampleText;
888
+ }
889
+ };
890
+ return TuiInputDateRangeDirective;
891
+ }(i1.AbstractTuiTextfieldHost));
892
+ 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 });
893
+ 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 });
894
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeDirective, decorators: [{
895
+ type: i0.Directive,
896
+ args: [{
897
+ selector: 'tui-input-date-range',
898
+ providers: [i1.tuiAsTextfieldHost(TuiInputDateRangeDirective)],
899
+ }]
900
+ }] });
755
901
 
756
- var TuiInputDateRangeModule = /** @class */ (function () {
757
- function TuiInputDateRangeModule() {
758
- }
759
- return TuiInputDateRangeModule;
760
- }());
761
- TuiInputDateRangeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
762
- TuiInputDateRangeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, declarations: [TuiInputDateRangeComponent, TuiInputDateRangeDirective], imports: [i6.CommonModule,
763
- i5.MaskitoModule,
764
- i3.TuiActiveZoneModule,
765
- i3.TuiLetModule,
766
- i7.PolymorpheusModule,
767
- i1.TuiWrapperModule,
768
- i1.TuiPrimitiveTextfieldModule,
769
- i1.TuiTextfieldControllerModule,
770
- i1.TuiHostedDropdownModule,
771
- i1.TuiSvgModule,
772
- i2.TuiCalendarRangeModule,
773
- i4.TuiValueAccessorModule], exports: [TuiInputDateRangeComponent,
774
- TuiInputDateRangeDirective,
775
- i1.TuiTextfieldComponent] });
776
- TuiInputDateRangeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, imports: [[
777
- i6.CommonModule,
778
- i5.MaskitoModule,
779
- i3.TuiActiveZoneModule,
780
- i3.TuiLetModule,
781
- i7.PolymorpheusModule,
782
- i1.TuiWrapperModule,
783
- i1.TuiPrimitiveTextfieldModule,
784
- i1.TuiTextfieldControllerModule,
785
- i1.TuiHostedDropdownModule,
786
- i1.TuiSvgModule,
787
- i2.TuiCalendarRangeModule,
788
- i4.TuiValueAccessorModule,
789
- ]] });
790
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, decorators: [{
791
- type: i0.NgModule,
792
- args: [{
793
- imports: [
794
- i6.CommonModule,
795
- i5.MaskitoModule,
796
- i3.TuiActiveZoneModule,
797
- i3.TuiLetModule,
798
- i7.PolymorpheusModule,
799
- i1.TuiWrapperModule,
800
- i1.TuiPrimitiveTextfieldModule,
801
- i1.TuiTextfieldControllerModule,
802
- i1.TuiHostedDropdownModule,
803
- i1.TuiSvgModule,
804
- i2.TuiCalendarRangeModule,
805
- i4.TuiValueAccessorModule,
806
- ],
807
- declarations: [TuiInputDateRangeComponent, TuiInputDateRangeDirective],
808
- exports: [
809
- TuiInputDateRangeComponent,
810
- TuiInputDateRangeDirective,
811
- i1.TuiTextfieldComponent,
812
- ],
813
- }]
814
- }] });
902
+ var TuiInputDateRangeModule = /** @class */ (function () {
903
+ function TuiInputDateRangeModule() {
904
+ }
905
+ return TuiInputDateRangeModule;
906
+ }());
907
+ TuiInputDateRangeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
908
+ TuiInputDateRangeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, declarations: [TuiInputDateRangeComponent, TuiInputDateRangeDirective], imports: [i6.CommonModule,
909
+ i5.MaskitoModule,
910
+ i3.TuiActiveZoneModule,
911
+ i3.TuiLetModule,
912
+ i7.PolymorpheusModule,
913
+ i1.TuiWrapperModule,
914
+ i1.TuiPrimitiveTextfieldModule,
915
+ i1.TuiTextfieldControllerModule,
916
+ i1.TuiHostedDropdownModule,
917
+ i1.TuiSvgModule,
918
+ i2.TuiCalendarRangeModule,
919
+ i4.TuiValueAccessorModule], exports: [TuiInputDateRangeComponent,
920
+ TuiInputDateRangeDirective,
921
+ i1.TuiTextfieldComponent] });
922
+ TuiInputDateRangeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, imports: [[
923
+ i6.CommonModule,
924
+ i5.MaskitoModule,
925
+ i3.TuiActiveZoneModule,
926
+ i3.TuiLetModule,
927
+ i7.PolymorpheusModule,
928
+ i1.TuiWrapperModule,
929
+ i1.TuiPrimitiveTextfieldModule,
930
+ i1.TuiTextfieldControllerModule,
931
+ i1.TuiHostedDropdownModule,
932
+ i1.TuiSvgModule,
933
+ i2.TuiCalendarRangeModule,
934
+ i4.TuiValueAccessorModule,
935
+ ]] });
936
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateRangeModule, decorators: [{
937
+ type: i0.NgModule,
938
+ args: [{
939
+ imports: [
940
+ i6.CommonModule,
941
+ i5.MaskitoModule,
942
+ i3.TuiActiveZoneModule,
943
+ i3.TuiLetModule,
944
+ i7.PolymorpheusModule,
945
+ i1.TuiWrapperModule,
946
+ i1.TuiPrimitiveTextfieldModule,
947
+ i1.TuiTextfieldControllerModule,
948
+ i1.TuiHostedDropdownModule,
949
+ i1.TuiSvgModule,
950
+ i2.TuiCalendarRangeModule,
951
+ i4.TuiValueAccessorModule,
952
+ ],
953
+ declarations: [TuiInputDateRangeComponent, TuiInputDateRangeDirective],
954
+ exports: [
955
+ TuiInputDateRangeComponent,
956
+ TuiInputDateRangeDirective,
957
+ i1.TuiTextfieldComponent,
958
+ ],
959
+ }]
960
+ }] });
815
961
 
816
- /**
817
- * Generated bundle index. Do not edit.
818
- */
962
+ /**
963
+ * Generated bundle index. Do not edit.
964
+ */
819
965
 
820
- exports.TuiInputDateRangeComponent = TuiInputDateRangeComponent;
821
- exports.TuiInputDateRangeDirective = TuiInputDateRangeDirective;
822
- exports.TuiInputDateRangeModule = TuiInputDateRangeModule;
966
+ exports.TuiInputDateRangeComponent = TuiInputDateRangeComponent;
967
+ exports.TuiInputDateRangeDirective = TuiInputDateRangeDirective;
968
+ exports.TuiInputDateRangeModule = TuiInputDateRangeModule;
823
969
 
824
- Object.defineProperty(exports, '__esModule', { value: true });
970
+ Object.defineProperty(exports, '__esModule', { value: true });
825
971
 
826
972
  }));
827
973
  //# sourceMappingURL=taiga-ui-kit-components-input-date-range.umd.js.map