@taiga-ui/kit 3.59.0 → 3.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taiga-ui-kit-components-accordion.umd.js +774 -628
- package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.js +598 -452
- package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js +640 -494
- package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +563 -417
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js +747 -601
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js +718 -572
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.js +821 -675
- package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +645 -499
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +585 -439
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.js +608 -462
- package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-combo-box.umd.js +834 -688
- package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +656 -510
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-elastic-container.umd.js +587 -441
- package/bundles/taiga-ui-kit-components-elastic-container.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-files.umd.js +808 -662
- package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.js +607 -461
- package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.js +700 -554
- package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.js +809 -663
- package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-multi.umd.js +849 -703
- package/bundles/taiga-ui-kit-components-input-date-multi.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js +973 -827
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js +1026 -880
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.js +976 -830
- package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.js +975 -829
- package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.js +612 -466
- package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js +755 -609
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month.umd.js +788 -642
- package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.js +941 -795
- package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js +720 -574
- package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +811 -665
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.js +913 -767
- package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.js +796 -650
- package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.js +737 -591
- package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js +1102 -956
- package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.js +1021 -875
- package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-year.umd.js +706 -560
- package/bundles/taiga-ui-kit-components-input-year.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.js +661 -515
- package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-items-with-more.umd.js +689 -543
- package/bundles/taiga-ui-kit-components-items-with-more.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js +742 -596
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +544 -398
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js +1337 -1191
- package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pagination.umd.js +810 -664
- package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js +152 -6
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.js +152 -6
- package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-push.umd.js +152 -6
- package/bundles/taiga-ui-kit-components-push.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.js +645 -499
- package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +616 -470
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-list.umd.js +628 -482
- package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.js +689 -543
- package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.js +811 -665
- package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-rating.umd.js +646 -500
- package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-routable-dialog.umd.js +580 -434
- package/bundles/taiga-ui-kit-components-routable-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.js +933 -787
- package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js +943 -797
- package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.js +769 -623
- package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js +152 -6
- package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-textarea.umd.js +966 -820
- package/bundles/taiga-ui-kit-components-textarea.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tiles.umd.js +839 -693
- package/bundles/taiga-ui-kit-components-tiles.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js +711 -565
- package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.js +152 -6
- package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js +637 -491
- package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +605 -459
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-unmask-handler.umd.js +540 -394
- package/bundles/taiga-ui-kit-directives-unmask-handler.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-field-error.umd.js +693 -547
- package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js +616 -470
- package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-sort-countries.umd.js +524 -378
- package/bundles/taiga-ui-kit-pipes-sort-countries.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.js +152 -6
- package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-math.umd.js +152 -6
- package/bundles/taiga-ui-kit-utils-math.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js +152 -6
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,789 +1,935 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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/providers'), require('@taiga-ui/kit/directives'), require('@maskito/angular')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-phone', ['exports', '@angular/core', '@angular/forms', '@maskito/core', '@maskito/kit', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/providers', '@taiga-ui/kit/directives', '@maskito/angular'], 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-phone"] = {}), global.ng.core, global.ng.forms, global.core, global.kit, global.i2, global.i1, global["taiga-ui"].kit.providers, global["taiga-ui"].kit.directives, global.i4));
|
|
5
5
|
})(this, (function (exports, i0, i5, core, kit, i2, i1, providers, i3, i4) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
22
|
-
return Object.freeze(n);
|
|
19
|
+
});
|
|
23
20
|
}
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
27
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
28
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
29
|
+
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
30
|
+
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
/******************************************************************************
|
|
33
|
+
Copyright (c) Microsoft Corporation.
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
36
|
+
purpose with or without fee is hereby granted.
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
38
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
39
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
40
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
41
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
42
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
43
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
44
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
45
|
+
***************************************************************************** */
|
|
46
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
47
|
+
var extendStatics = function (d, b) {
|
|
48
|
+
extendStatics = Object.setPrototypeOf ||
|
|
49
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
50
|
+
function (d, b) { for (var p in b)
|
|
51
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
52
|
+
d[p] = b[p]; };
|
|
53
|
+
return extendStatics(d, b);
|
|
54
|
+
};
|
|
55
|
+
function __extends(d, b) {
|
|
56
|
+
if (typeof b !== "function" && b !== null)
|
|
57
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
58
|
+
extendStatics(d, b);
|
|
59
|
+
function __() { this.constructor = d; }
|
|
60
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
61
|
+
}
|
|
62
|
+
var __assign = function () {
|
|
63
|
+
__assign = Object.assign || function __assign(t) {
|
|
64
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
65
|
+
s = arguments[i];
|
|
66
|
+
for (var p in s)
|
|
67
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
68
|
+
t[p] = s[p];
|
|
69
|
+
}
|
|
70
|
+
return t;
|
|
71
|
+
};
|
|
72
|
+
return __assign.apply(this, arguments);
|
|
73
|
+
};
|
|
74
|
+
function __rest(s, e) {
|
|
75
|
+
var t = {};
|
|
76
|
+
for (var p in s)
|
|
77
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
78
|
+
t[p] = s[p];
|
|
79
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
80
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
81
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
82
|
+
t[p[i]] = s[p[i]];
|
|
83
|
+
}
|
|
84
|
+
return t;
|
|
85
|
+
}
|
|
86
|
+
function __decorate(decorators, target, key, desc) {
|
|
87
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
88
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
89
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
90
|
+
else
|
|
91
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
92
|
+
if (d = decorators[i])
|
|
93
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
94
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
95
|
+
}
|
|
96
|
+
function __param(paramIndex, decorator) {
|
|
97
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
98
|
+
}
|
|
99
|
+
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
100
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function")
|
|
101
|
+
throw new TypeError("Function expected"); return f; }
|
|
102
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
103
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
104
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
105
|
+
var _, done = false;
|
|
106
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
107
|
+
var context = {};
|
|
108
|
+
for (var p in contextIn)
|
|
109
|
+
context[p] = p === "access" ? {} : contextIn[p];
|
|
110
|
+
for (var p in contextIn.access)
|
|
111
|
+
context.access[p] = contextIn.access[p];
|
|
112
|
+
context.addInitializer = function (f) { if (done)
|
|
113
|
+
throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
114
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
115
|
+
if (kind === "accessor") {
|
|
116
|
+
if (result === void 0)
|
|
117
|
+
continue;
|
|
118
|
+
if (result === null || typeof result !== "object")
|
|
119
|
+
throw new TypeError("Object expected");
|
|
120
|
+
if (_ = accept(result.get))
|
|
121
|
+
descriptor.get = _;
|
|
122
|
+
if (_ = accept(result.set))
|
|
123
|
+
descriptor.set = _;
|
|
124
|
+
if (_ = accept(result.init))
|
|
125
|
+
initializers.unshift(_);
|
|
126
|
+
}
|
|
127
|
+
else if (_ = accept(result)) {
|
|
128
|
+
if (kind === "field")
|
|
129
|
+
initializers.unshift(_);
|
|
130
|
+
else
|
|
131
|
+
descriptor[key] = _;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (target)
|
|
135
|
+
Object.defineProperty(target, contextIn.name, descriptor);
|
|
136
|
+
done = true;
|
|
137
|
+
}
|
|
138
|
+
;
|
|
139
|
+
function __runInitializers(thisArg, initializers, value) {
|
|
140
|
+
var useValue = arguments.length > 2;
|
|
141
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
142
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
143
|
+
}
|
|
144
|
+
return useValue ? value : void 0;
|
|
145
|
+
}
|
|
146
|
+
;
|
|
147
|
+
function __propKey(x) {
|
|
148
|
+
return typeof x === "symbol" ? x : "".concat(x);
|
|
149
|
+
}
|
|
150
|
+
;
|
|
151
|
+
function __setFunctionName(f, name, prefix) {
|
|
152
|
+
if (typeof name === "symbol")
|
|
153
|
+
name = name.description ? "[".concat(name.description, "]") : "";
|
|
154
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
155
|
+
}
|
|
156
|
+
;
|
|
157
|
+
function __metadata(metadataKey, metadataValue) {
|
|
158
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
159
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
160
|
+
}
|
|
161
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
162
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
163
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
164
|
+
function fulfilled(value) { try {
|
|
165
|
+
step(generator.next(value));
|
|
166
|
+
}
|
|
167
|
+
catch (e) {
|
|
168
|
+
reject(e);
|
|
169
|
+
} }
|
|
170
|
+
function rejected(value) { try {
|
|
171
|
+
step(generator["throw"](value));
|
|
172
|
+
}
|
|
173
|
+
catch (e) {
|
|
174
|
+
reject(e);
|
|
175
|
+
} }
|
|
176
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
177
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
function __generator(thisArg, body) {
|
|
181
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
182
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
183
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
184
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
185
|
+
function step(op) {
|
|
186
|
+
if (f)
|
|
187
|
+
throw new TypeError("Generator is already executing.");
|
|
188
|
+
while (g && (g = 0, op[0] && (_ = 0)), _)
|
|
189
|
+
try {
|
|
190
|
+
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)
|
|
191
|
+
return t;
|
|
192
|
+
if (y = 0, t)
|
|
193
|
+
op = [op[0] & 2, t.value];
|
|
194
|
+
switch (op[0]) {
|
|
195
|
+
case 0:
|
|
196
|
+
case 1:
|
|
197
|
+
t = op;
|
|
198
|
+
break;
|
|
199
|
+
case 4:
|
|
200
|
+
_.label++;
|
|
201
|
+
return { value: op[1], done: false };
|
|
202
|
+
case 5:
|
|
203
|
+
_.label++;
|
|
204
|
+
y = op[1];
|
|
205
|
+
op = [0];
|
|
206
|
+
continue;
|
|
207
|
+
case 7:
|
|
208
|
+
op = _.ops.pop();
|
|
209
|
+
_.trys.pop();
|
|
210
|
+
continue;
|
|
211
|
+
default:
|
|
212
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
213
|
+
_ = 0;
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
217
|
+
_.label = op[1];
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
221
|
+
_.label = t[1];
|
|
222
|
+
t = op;
|
|
223
|
+
break;
|
|
224
|
+
}
|
|
225
|
+
if (t && _.label < t[2]) {
|
|
226
|
+
_.label = t[2];
|
|
227
|
+
_.ops.push(op);
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
230
|
+
if (t[2])
|
|
231
|
+
_.ops.pop();
|
|
232
|
+
_.trys.pop();
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
op = body.call(thisArg, _);
|
|
236
|
+
}
|
|
237
|
+
catch (e) {
|
|
238
|
+
op = [6, e];
|
|
239
|
+
y = 0;
|
|
240
|
+
}
|
|
241
|
+
finally {
|
|
242
|
+
f = t = 0;
|
|
243
|
+
}
|
|
244
|
+
if (op[0] & 5)
|
|
245
|
+
throw op[1];
|
|
246
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
250
|
+
if (k2 === undefined)
|
|
251
|
+
k2 = k;
|
|
252
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
253
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
254
|
+
desc = { enumerable: true, get: function () { return m[k]; } };
|
|
255
|
+
}
|
|
256
|
+
Object.defineProperty(o, k2, desc);
|
|
257
|
+
}) : (function (o, m, k, k2) {
|
|
258
|
+
if (k2 === undefined)
|
|
259
|
+
k2 = k;
|
|
260
|
+
o[k2] = m[k];
|
|
261
|
+
});
|
|
262
|
+
function __exportStar(m, o) {
|
|
263
|
+
for (var p in m)
|
|
264
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
265
|
+
__createBinding(o, m, p);
|
|
266
|
+
}
|
|
267
|
+
function __values(o) {
|
|
268
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
269
|
+
if (m)
|
|
270
|
+
return m.call(o);
|
|
271
|
+
if (o && typeof o.length === "number")
|
|
272
|
+
return {
|
|
273
|
+
next: function () {
|
|
274
|
+
if (o && i >= o.length)
|
|
275
|
+
o = void 0;
|
|
276
|
+
return { value: o && o[i++], done: !o };
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
280
|
+
}
|
|
281
|
+
function __read(o, n) {
|
|
282
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
283
|
+
if (!m)
|
|
284
|
+
return o;
|
|
285
|
+
var i = m.call(o), r, ar = [], e;
|
|
286
|
+
try {
|
|
287
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
288
|
+
ar.push(r.value);
|
|
289
|
+
}
|
|
290
|
+
catch (error) {
|
|
291
|
+
e = { error: error };
|
|
292
|
+
}
|
|
293
|
+
finally {
|
|
294
|
+
try {
|
|
295
|
+
if (r && !r.done && (m = i["return"]))
|
|
296
|
+
m.call(i);
|
|
297
|
+
}
|
|
298
|
+
finally {
|
|
299
|
+
if (e)
|
|
300
|
+
throw e.error;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return ar;
|
|
304
|
+
}
|
|
305
|
+
/** @deprecated */
|
|
306
|
+
function __spread() {
|
|
307
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
308
|
+
ar = ar.concat(__read(arguments[i]));
|
|
309
|
+
return ar;
|
|
310
|
+
}
|
|
311
|
+
/** @deprecated */
|
|
312
|
+
function __spreadArrays() {
|
|
313
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
314
|
+
s += arguments[i].length;
|
|
315
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
316
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
317
|
+
r[k] = a[j];
|
|
318
|
+
return r;
|
|
319
|
+
}
|
|
320
|
+
function __spreadArray(to, from, pack) {
|
|
321
|
+
if (pack || arguments.length === 2)
|
|
322
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
323
|
+
if (ar || !(i in from)) {
|
|
324
|
+
if (!ar)
|
|
325
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
326
|
+
ar[i] = from[i];
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
330
|
+
}
|
|
331
|
+
function __await(v) {
|
|
332
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
333
|
+
}
|
|
334
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
335
|
+
if (!Symbol.asyncIterator)
|
|
336
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
337
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
338
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
339
|
+
function verb(n) { if (g[n])
|
|
340
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
341
|
+
function resume(n, v) { try {
|
|
342
|
+
step(g[n](v));
|
|
343
|
+
}
|
|
344
|
+
catch (e) {
|
|
345
|
+
settle(q[0][3], e);
|
|
346
|
+
} }
|
|
347
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
348
|
+
function fulfill(value) { resume("next", value); }
|
|
349
|
+
function reject(value) { resume("throw", value); }
|
|
350
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
351
|
+
resume(q[0][0], q[0][1]); }
|
|
352
|
+
}
|
|
353
|
+
function __asyncDelegator(o) {
|
|
354
|
+
var i, p;
|
|
355
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
356
|
+
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; }
|
|
357
|
+
}
|
|
358
|
+
function __asyncValues(o) {
|
|
359
|
+
if (!Symbol.asyncIterator)
|
|
360
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
361
|
+
var m = o[Symbol.asyncIterator], i;
|
|
362
|
+
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);
|
|
363
|
+
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); }); }; }
|
|
364
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
365
|
+
}
|
|
366
|
+
function __makeTemplateObject(cooked, raw) {
|
|
367
|
+
if (Object.defineProperty) {
|
|
368
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
cooked.raw = raw;
|
|
372
|
+
}
|
|
373
|
+
return cooked;
|
|
374
|
+
}
|
|
375
|
+
;
|
|
376
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
377
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
378
|
+
}) : function (o, v) {
|
|
379
|
+
o["default"] = v;
|
|
380
|
+
};
|
|
381
|
+
function __importStar(mod) {
|
|
382
|
+
if (mod && mod.__esModule)
|
|
383
|
+
return mod;
|
|
384
|
+
var result = {};
|
|
385
|
+
if (mod != null)
|
|
386
|
+
for (var k in mod)
|
|
387
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
388
|
+
__createBinding(result, mod, k);
|
|
389
|
+
__setModuleDefault(result, mod);
|
|
390
|
+
return result;
|
|
391
|
+
}
|
|
392
|
+
function __importDefault(mod) {
|
|
393
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
394
|
+
}
|
|
395
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
396
|
+
if (kind === "a" && !f)
|
|
397
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
398
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
399
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
400
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
401
|
+
}
|
|
402
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
403
|
+
if (kind === "m")
|
|
404
|
+
throw new TypeError("Private method is not writable");
|
|
405
|
+
if (kind === "a" && !f)
|
|
406
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
407
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
408
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
409
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
410
|
+
}
|
|
411
|
+
function __classPrivateFieldIn(state, receiver) {
|
|
412
|
+
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
|
413
|
+
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
414
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
415
|
+
}
|
|
416
|
+
function __addDisposableResource(env, value, async) {
|
|
417
|
+
if (value !== null && value !== void 0) {
|
|
418
|
+
if (typeof value !== "object" && typeof value !== "function")
|
|
419
|
+
throw new TypeError("Object expected.");
|
|
420
|
+
var dispose;
|
|
421
|
+
if (async) {
|
|
422
|
+
if (!Symbol.asyncDispose)
|
|
423
|
+
throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
424
|
+
dispose = value[Symbol.asyncDispose];
|
|
425
|
+
}
|
|
426
|
+
if (dispose === void 0) {
|
|
427
|
+
if (!Symbol.dispose)
|
|
428
|
+
throw new TypeError("Symbol.dispose is not defined.");
|
|
429
|
+
dispose = value[Symbol.dispose];
|
|
430
|
+
}
|
|
431
|
+
if (typeof dispose !== "function")
|
|
432
|
+
throw new TypeError("Object not disposable.");
|
|
433
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
434
|
+
}
|
|
435
|
+
else if (async) {
|
|
436
|
+
env.stack.push({ async: true });
|
|
437
|
+
}
|
|
438
|
+
return value;
|
|
439
|
+
}
|
|
440
|
+
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
441
|
+
var e = new Error(message);
|
|
442
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
443
|
+
};
|
|
444
|
+
function __disposeResources(env) {
|
|
445
|
+
function fail(e) {
|
|
446
|
+
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
447
|
+
env.hasError = true;
|
|
448
|
+
}
|
|
449
|
+
function next() {
|
|
450
|
+
while (env.stack.length) {
|
|
451
|
+
var rec = env.stack.pop();
|
|
452
|
+
try {
|
|
453
|
+
var result = rec.dispose && rec.dispose.call(rec.value);
|
|
454
|
+
if (rec.async)
|
|
455
|
+
return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
|
|
456
|
+
}
|
|
457
|
+
catch (e) {
|
|
458
|
+
fail(e);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
if (env.hasError)
|
|
462
|
+
throw env.error;
|
|
463
|
+
}
|
|
464
|
+
return next();
|
|
465
|
+
}
|
|
466
|
+
var tslib_es6 = {
|
|
467
|
+
__extends: __extends,
|
|
468
|
+
__assign: __assign,
|
|
469
|
+
__rest: __rest,
|
|
470
|
+
__decorate: __decorate,
|
|
471
|
+
__param: __param,
|
|
472
|
+
__metadata: __metadata,
|
|
473
|
+
__awaiter: __awaiter,
|
|
474
|
+
__generator: __generator,
|
|
475
|
+
__createBinding: __createBinding,
|
|
476
|
+
__exportStar: __exportStar,
|
|
477
|
+
__values: __values,
|
|
478
|
+
__read: __read,
|
|
479
|
+
__spread: __spread,
|
|
480
|
+
__spreadArrays: __spreadArrays,
|
|
481
|
+
__spreadArray: __spreadArray,
|
|
482
|
+
__await: __await,
|
|
483
|
+
__asyncGenerator: __asyncGenerator,
|
|
484
|
+
__asyncDelegator: __asyncDelegator,
|
|
485
|
+
__asyncValues: __asyncValues,
|
|
486
|
+
__makeTemplateObject: __makeTemplateObject,
|
|
487
|
+
__importStar: __importStar,
|
|
488
|
+
__importDefault: __importDefault,
|
|
489
|
+
__classPrivateFieldGet: __classPrivateFieldGet,
|
|
490
|
+
__classPrivateFieldSet: __classPrivateFieldSet,
|
|
491
|
+
__classPrivateFieldIn: __classPrivateFieldIn,
|
|
492
|
+
__addDisposableResource: __addDisposableResource,
|
|
493
|
+
__disposeResources: __disposeResources,
|
|
494
|
+
};
|
|
349
495
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
496
|
+
var TUI_INPUT_PHONE_DEFAULT_OPTIONS = {
|
|
497
|
+
phoneMaskAfterCountryCode: "### ###-##-##",
|
|
498
|
+
allowText: false,
|
|
499
|
+
countryCode: "+7",
|
|
500
|
+
};
|
|
501
|
+
/**
|
|
502
|
+
* Default parameters for input phone component
|
|
503
|
+
*/
|
|
504
|
+
var TUI_INPUT_PHONE_OPTIONS = i2.tuiCreateToken(TUI_INPUT_PHONE_DEFAULT_OPTIONS);
|
|
505
|
+
function tuiInputPhoneOptionsProvider(options) {
|
|
506
|
+
return i2.tuiProvideOptions(TUI_INPUT_PHONE_OPTIONS, options, TUI_INPUT_PHONE_DEFAULT_OPTIONS);
|
|
507
|
+
}
|
|
362
508
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
509
|
+
var countDigits = function (value) { return value.replace(/\D/g, "").length; };
|
|
510
|
+
/**
|
|
511
|
+
* `InputPhone` component sets country code as non-removable prefix.
|
|
512
|
+
* This prefix appears on focus and cannot be erased.
|
|
513
|
+
* But users sometimes can copy complete phone number (from any different source)
|
|
514
|
+
* and try to insert the whole string inside our `InputPhone` textfield.
|
|
515
|
+
* This preprocessor helps to avoid country prefix duplication on paste/drop/autofill events.
|
|
516
|
+
*/
|
|
517
|
+
function tuiCreateCompletePhoneInsertionPreprocessor(countryCode, phoneMaskAfterCountryCode) {
|
|
518
|
+
var completePhoneLength = (countryCode + phoneMaskAfterCountryCode).replace(/[^#\d]+/g, "").length;
|
|
519
|
+
var trimCountryPrefix = function (value) { return countryCode === "+7"
|
|
520
|
+
? value.replace(/^(\+?7?\s?8?)\s?/, "")
|
|
521
|
+
: value.replace(new RegExp("^(\\+?" + countryCode.replace("+", "") + "?)\\s?"), ""); };
|
|
522
|
+
return function (_a) {
|
|
523
|
+
var elementState = _a.elementState, data = _a.data;
|
|
524
|
+
var value = elementState.value, selection = elementState.selection;
|
|
525
|
+
return {
|
|
526
|
+
elementState: {
|
|
527
|
+
selection: selection,
|
|
528
|
+
value:
|
|
529
|
+
/**
|
|
530
|
+
* The only possible case when `value` includes digits more
|
|
531
|
+
* than mask expression allows – browser autofill.
|
|
532
|
+
* It means that we are inside `input`-event
|
|
533
|
+
* and mask are ready to reject "extra" characters.
|
|
534
|
+
* We should cut leading country prefix to save trailing characters!
|
|
535
|
+
*/
|
|
536
|
+
countDigits(value) > completePhoneLength
|
|
537
|
+
? trimCountryPrefix(value)
|
|
538
|
+
: value,
|
|
539
|
+
},
|
|
540
|
+
data: countDigits(data) >= completePhoneLength
|
|
541
|
+
? /**
|
|
542
|
+
* User tries to insert/drop the complete phone number (with country prefix).
|
|
543
|
+
* We should drop already existing non-removable prefix.
|
|
389
544
|
*/
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
? /**
|
|
396
|
-
* User tries to insert/drop the complete phone number (with country prefix).
|
|
397
|
-
* We should drop already existing non-removable prefix.
|
|
398
|
-
*/
|
|
399
|
-
trimCountryPrefix(data)
|
|
400
|
-
: data,
|
|
401
|
-
};
|
|
402
|
-
};
|
|
403
|
-
}
|
|
545
|
+
trimCountryPrefix(data)
|
|
546
|
+
: data,
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
}
|
|
404
550
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
551
|
+
/**
|
|
552
|
+
* Create {@link https://maskito.dev/core-concepts/mask-expression pattern mask expression} for phone number
|
|
553
|
+
*
|
|
554
|
+
* @example
|
|
555
|
+
* tuiCreatePhoneMaskExpression('+1', '(###) ###-####');
|
|
556
|
+
*/
|
|
557
|
+
function tuiCreatePhoneMaskExpression(countryCode, phoneMaskAfterCountryCode) {
|
|
558
|
+
return __spreadArray(__spreadArray(__spreadArray([], __read(countryCode.split(""))), [
|
|
559
|
+
" "
|
|
560
|
+
]), __read(phoneMaskAfterCountryCode
|
|
561
|
+
.replace(/[^#\- ()]+/g, "")
|
|
562
|
+
.split("")
|
|
563
|
+
.map(function (item) { return (item === "#" ? /\d/ : item); })));
|
|
564
|
+
}
|
|
419
565
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
566
|
+
function isText(value) {
|
|
567
|
+
return Number.isNaN(parseInt(value.replace(i1.TUI_MASK_SYMBOLS_REGEXP, ''), 10));
|
|
568
|
+
}
|
|
569
|
+
var TuiInputPhoneComponent = /** @class */ (function (_super) {
|
|
570
|
+
__extends(TuiInputPhoneComponent, _super);
|
|
571
|
+
function TuiInputPhoneComponent(control, cdr, textfieldCleaner, options, textfieldSize) {
|
|
572
|
+
var _this = _super.call(this, control, cdr) || this;
|
|
573
|
+
_this.textfieldCleaner = textfieldCleaner;
|
|
574
|
+
_this.options = options;
|
|
575
|
+
_this.textfieldSize = textfieldSize;
|
|
576
|
+
_this.phoneMaskAfterCountryCode = _this.options.phoneMaskAfterCountryCode;
|
|
577
|
+
_this.allowText = _this.options.allowText;
|
|
578
|
+
_this.search = '';
|
|
579
|
+
_this.searchChange = new i0.EventEmitter();
|
|
580
|
+
_this.countryCode = _this.options.countryCode;
|
|
581
|
+
_this.open = false;
|
|
582
|
+
return _this;
|
|
583
|
+
}
|
|
584
|
+
Object.defineProperty(TuiInputPhoneComponent.prototype, "countryCodeSetter", {
|
|
585
|
+
set: function (newCountryCode) {
|
|
586
|
+
var prevCountryCode = this.countryCode;
|
|
587
|
+
this.countryCode = newCountryCode;
|
|
588
|
+
this.updateValueWithNewCountryCode(prevCountryCode, newCountryCode);
|
|
589
|
+
},
|
|
590
|
+
enumerable: false,
|
|
591
|
+
configurable: true
|
|
592
|
+
});
|
|
593
|
+
Object.defineProperty(TuiInputPhoneComponent.prototype, "size", {
|
|
594
|
+
get: function () {
|
|
595
|
+
return this.textfieldSize.size;
|
|
596
|
+
},
|
|
597
|
+
enumerable: false,
|
|
598
|
+
configurable: true
|
|
599
|
+
});
|
|
600
|
+
Object.defineProperty(TuiInputPhoneComponent.prototype, "nativeFocusableElement", {
|
|
601
|
+
get: function () {
|
|
602
|
+
return !this.textfield || this.computedDisabled
|
|
603
|
+
? null
|
|
604
|
+
: this.textfield.nativeFocusableElement;
|
|
605
|
+
},
|
|
606
|
+
enumerable: false,
|
|
607
|
+
configurable: true
|
|
608
|
+
});
|
|
609
|
+
Object.defineProperty(TuiInputPhoneComponent.prototype, "focused", {
|
|
610
|
+
get: function () {
|
|
611
|
+
return (i2.tuiIsNativeFocused(this.nativeFocusableElement) ||
|
|
612
|
+
(!!this.dropdown && this.dropdown.focused));
|
|
613
|
+
},
|
|
614
|
+
enumerable: false,
|
|
615
|
+
configurable: true
|
|
616
|
+
});
|
|
617
|
+
Object.defineProperty(TuiInputPhoneComponent.prototype, "nativeValue", {
|
|
618
|
+
get: function () {
|
|
619
|
+
var _a;
|
|
620
|
+
return (((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.value) ||
|
|
621
|
+
core.maskitoTransform(this.value, this.maskOptions));
|
|
622
|
+
},
|
|
623
|
+
set: function (value) {
|
|
624
|
+
if (this.nativeFocusableElement) {
|
|
625
|
+
this.nativeFocusableElement.value = value;
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
enumerable: false,
|
|
629
|
+
configurable: true
|
|
630
|
+
});
|
|
631
|
+
Object.defineProperty(TuiInputPhoneComponent.prototype, "inputMode", {
|
|
632
|
+
get: function () {
|
|
633
|
+
return this.allowText ? 'text' : 'numeric';
|
|
634
|
+
},
|
|
635
|
+
enumerable: false,
|
|
636
|
+
configurable: true
|
|
637
|
+
});
|
|
638
|
+
Object.defineProperty(TuiInputPhoneComponent.prototype, "canOpen", {
|
|
639
|
+
get: function () {
|
|
640
|
+
return this.interactive && !!this.datalist;
|
|
641
|
+
},
|
|
642
|
+
enumerable: false,
|
|
643
|
+
configurable: true
|
|
644
|
+
});
|
|
645
|
+
Object.defineProperty(TuiInputPhoneComponent.prototype, "canClean", {
|
|
646
|
+
get: function () {
|
|
647
|
+
return (this.nativeValue !== this.nonRemovablePrefix && this.textfieldCleaner.cleaner);
|
|
648
|
+
},
|
|
649
|
+
enumerable: false,
|
|
650
|
+
configurable: true
|
|
651
|
+
});
|
|
652
|
+
Object.defineProperty(TuiInputPhoneComponent.prototype, "maskOptions", {
|
|
653
|
+
get: function () {
|
|
654
|
+
return this.calculateMask(this.countryCode, this.phoneMaskAfterCountryCode, this.nonRemovablePrefix, this.allowText);
|
|
655
|
+
},
|
|
656
|
+
enumerable: false,
|
|
657
|
+
configurable: true
|
|
658
|
+
});
|
|
659
|
+
TuiInputPhoneComponent.prototype.onActiveZone = function (active) {
|
|
660
|
+
this.updateFocused(active);
|
|
661
|
+
if (active && !this.nativeValue && !this.readOnly && !this.allowText) {
|
|
662
|
+
this.updateSearch(this.nonRemovablePrefix);
|
|
663
|
+
this.nativeValue = this.nonRemovablePrefix;
|
|
664
|
+
return;
|
|
665
|
+
}
|
|
666
|
+
if (this.nativeValue === this.nonRemovablePrefix || this.isTextValue) {
|
|
667
|
+
this.updateSearch('');
|
|
668
|
+
this.nativeValue = '';
|
|
669
|
+
return;
|
|
670
|
+
}
|
|
671
|
+
if (!active && !this.allowText && this.nativeFocusableElement) {
|
|
672
|
+
this.nativeValue = this.nativeValue.replace(/\D$/, '');
|
|
673
|
+
}
|
|
674
|
+
};
|
|
675
|
+
TuiInputPhoneComponent.prototype.onValueChange = function (value) {
|
|
676
|
+
var parsed = isText(value)
|
|
677
|
+
? value
|
|
678
|
+
: value.replace(i1.TUI_MASK_SYMBOLS_REGEXP, '').slice(0, this.maxPhoneLength);
|
|
679
|
+
this.updateSearch(parsed);
|
|
680
|
+
this.value = parsed === this.countryCode || isText(parsed) ? '' : parsed;
|
|
681
|
+
this.open = true;
|
|
682
|
+
if (!this.value && !this.allowText) {
|
|
683
|
+
this.nativeValue = this.nonRemovablePrefix;
|
|
684
|
+
}
|
|
685
|
+
};
|
|
686
|
+
TuiInputPhoneComponent.prototype.handleOption = function (item) {
|
|
687
|
+
this.focusInput();
|
|
688
|
+
this.value = item;
|
|
689
|
+
this.nativeValue = core.maskitoTransform(this.value, this.maskOptions);
|
|
690
|
+
this.updateSearch('');
|
|
691
|
+
this.open = false;
|
|
692
|
+
};
|
|
693
|
+
TuiInputPhoneComponent.prototype.setDisabledState = function () {
|
|
694
|
+
_super.prototype.setDisabledState.call(this);
|
|
695
|
+
this.open = false;
|
|
696
|
+
};
|
|
697
|
+
TuiInputPhoneComponent.prototype.writeValue = function (value) {
|
|
698
|
+
_super.prototype.writeValue.call(this, value);
|
|
699
|
+
this.nativeValue = core.maskitoTransform(value || '', this.maskOptions);
|
|
700
|
+
this.updateSearch('');
|
|
701
|
+
};
|
|
702
|
+
TuiInputPhoneComponent.prototype.getFallbackValue = function () {
|
|
703
|
+
return '';
|
|
704
|
+
};
|
|
705
|
+
Object.defineProperty(TuiInputPhoneComponent.prototype, "nonRemovablePrefix", {
|
|
706
|
+
get: function () {
|
|
707
|
+
return this.countryCode + " ";
|
|
708
|
+
},
|
|
709
|
+
enumerable: false,
|
|
710
|
+
configurable: true
|
|
711
|
+
});
|
|
712
|
+
Object.defineProperty(TuiInputPhoneComponent.prototype, "maxPhoneLength", {
|
|
713
|
+
get: function () {
|
|
714
|
+
return (this.countryCode.length +
|
|
715
|
+
this.phoneMaskAfterCountryCode.replace(/[^#]+/g, '').length);
|
|
716
|
+
},
|
|
717
|
+
enumerable: false,
|
|
718
|
+
configurable: true
|
|
719
|
+
});
|
|
720
|
+
Object.defineProperty(TuiInputPhoneComponent.prototype, "isTextValue", {
|
|
721
|
+
get: function () {
|
|
722
|
+
return !!this.search && isText(this.search);
|
|
723
|
+
},
|
|
724
|
+
enumerable: false,
|
|
725
|
+
configurable: true
|
|
726
|
+
});
|
|
727
|
+
TuiInputPhoneComponent.prototype.calculateMask = function (countryCode, phoneMaskAfterCountryCode, nonRemovablePrefix, allowText) {
|
|
728
|
+
var mask = tuiCreatePhoneMaskExpression(countryCode, phoneMaskAfterCountryCode);
|
|
729
|
+
var preprocessors = [
|
|
730
|
+
tuiCreateCompletePhoneInsertionPreprocessor(countryCode, phoneMaskAfterCountryCode),
|
|
731
|
+
];
|
|
732
|
+
return allowText
|
|
733
|
+
? {
|
|
734
|
+
mask: function (_b) {
|
|
735
|
+
var value = _b.value;
|
|
736
|
+
return isText(value) && value !== '+'
|
|
737
|
+
? core.MASKITO_DEFAULT_OPTIONS.mask
|
|
738
|
+
: mask;
|
|
739
|
+
},
|
|
740
|
+
preprocessors: preprocessors,
|
|
741
|
+
}
|
|
742
|
+
: {
|
|
743
|
+
mask: mask,
|
|
744
|
+
preprocessors: preprocessors,
|
|
745
|
+
postprocessors: [
|
|
746
|
+
kit.maskitoPrefixPostprocessorGenerator(nonRemovablePrefix),
|
|
747
|
+
],
|
|
748
|
+
plugins: [
|
|
749
|
+
kit.maskitoCaretGuard(function (value, _b) {
|
|
750
|
+
var _c = __read(_b, 2), from = _c[0], to = _c[1];
|
|
751
|
+
return [
|
|
752
|
+
from === to ? nonRemovablePrefix.length : 0,
|
|
753
|
+
value.length,
|
|
754
|
+
];
|
|
755
|
+
}),
|
|
756
|
+
],
|
|
757
|
+
};
|
|
758
|
+
};
|
|
759
|
+
TuiInputPhoneComponent.prototype.focusInput = function () {
|
|
760
|
+
if (this.nativeFocusableElement) {
|
|
761
|
+
this.nativeFocusableElement.focus({ preventScroll: true });
|
|
762
|
+
}
|
|
763
|
+
};
|
|
764
|
+
TuiInputPhoneComponent.prototype.updateSearch = function (search) {
|
|
765
|
+
if (this.search === search) {
|
|
766
|
+
return;
|
|
767
|
+
}
|
|
768
|
+
this.search = search;
|
|
769
|
+
this.searchChange.emit(search);
|
|
770
|
+
};
|
|
771
|
+
TuiInputPhoneComponent.prototype.updateValueWithNewCountryCode = function (prevCountryCode, newCountryCode) {
|
|
772
|
+
if (!this.isTextValue) {
|
|
773
|
+
this.value = this.value.replace(prevCountryCode, newCountryCode);
|
|
774
|
+
this.nativeValue = core.maskitoTransform(this.value, this.maskOptions);
|
|
775
|
+
}
|
|
776
|
+
};
|
|
777
|
+
return TuiInputPhoneComponent;
|
|
778
|
+
}(i2.AbstractTuiControl));
|
|
779
|
+
TuiInputPhoneComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputPhoneComponent, deps: [{ token: i5.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: i1.TUI_TEXTFIELD_CLEANER }, { token: TUI_INPUT_PHONE_OPTIONS }, { token: i1.TUI_TEXTFIELD_SIZE }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
780
|
+
TuiInputPhoneComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputPhoneComponent, selector: "tui-input-phone", inputs: { countryCodeSetter: ["countryCode", "countryCodeSetter"], phoneMaskAfterCountryCode: "phoneMaskAfterCountryCode", allowText: "allowText", search: "search" }, outputs: { searchChange: "searchChange" }, host: { properties: { "attr.data-size": "this.size" } }, providers: [
|
|
781
|
+
i2.tuiAsFocusableItemAccessor(TuiInputPhoneComponent),
|
|
782
|
+
i2.tuiAsControl(TuiInputPhoneComponent),
|
|
783
|
+
i1.tuiAsDataListHost(TuiInputPhoneComponent),
|
|
784
|
+
], queries: [{ propertyName: "datalist", first: true, predicate: i1.TuiDataListDirective, descendants: true, read: i0.TemplateRef }], viewQueries: [{ propertyName: "dropdown", first: true, predicate: i1.TuiHostedDropdownComponent, descendants: true }, { propertyName: "textfield", first: true, predicate: i1.TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<tui-hosted-dropdown\n class=\"t-hosted\"\n [canOpen]=\"canOpen\"\n [content]=\"datalist || ''\"\n [(open)]=\"open\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-primitive-textfield\n tuiValueAccessor\n class=\"t-textfield\"\n [disabled]=\"computedDisabled\"\n [focusable]=\"focusable\"\n [invalid]=\"computedInvalid\"\n [maskito]=\"maskOptions\"\n [nativeId]=\"nativeId\"\n [pseudoFocus]=\"computedFocused\"\n [pseudoHover]=\"pseudoHover\"\n [readOnly]=\"readOnly\"\n [tuiTextfieldCleaner]=\"canClean\"\n [(value)]=\"nativeValue\"\n (valueChange)=\"onValueChange($event)\"\n >\n <ng-content></ng-content>\n <ng-content\n ngProjectAs=\"input\"\n select=\"input\"\n ></ng-content>\n </tui-primitive-textfield>\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}\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"] }], directives: [{ type: i2__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i1__namespace.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i3__namespace.TuiValueAccessorDirective, selector: "[tuiValueAccessor]" }, { type: i4__namespace.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { type: i1__namespace.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }], viewProviders: [providers.FIXED_DROPDOWN_CONTROLLER_PROVIDER], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
785
|
+
__decorate([
|
|
786
|
+
i2.tuiPure
|
|
787
|
+
], TuiInputPhoneComponent.prototype, "calculateMask", null);
|
|
788
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputPhoneComponent, decorators: [{
|
|
789
|
+
type: i0.Component,
|
|
790
|
+
args: [{
|
|
791
|
+
selector: 'tui-input-phone',
|
|
792
|
+
templateUrl: './input-phone.template.html',
|
|
793
|
+
styleUrls: ['./input-phone.style.less'],
|
|
794
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
795
|
+
providers: [
|
|
796
|
+
i2.tuiAsFocusableItemAccessor(TuiInputPhoneComponent),
|
|
797
|
+
i2.tuiAsControl(TuiInputPhoneComponent),
|
|
798
|
+
i1.tuiAsDataListHost(TuiInputPhoneComponent),
|
|
799
|
+
],
|
|
800
|
+
viewProviders: [providers.FIXED_DROPDOWN_CONTROLLER_PROVIDER],
|
|
801
|
+
}]
|
|
802
|
+
}], ctorParameters: function () {
|
|
803
|
+
return [{ type: i5__namespace.NgControl, decorators: [{
|
|
804
|
+
type: i0.Optional
|
|
805
|
+
}, {
|
|
806
|
+
type: i0.Self
|
|
807
|
+
}, {
|
|
808
|
+
type: i0.Inject,
|
|
809
|
+
args: [i5.NgControl]
|
|
810
|
+
}] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
|
|
811
|
+
type: i0.Inject,
|
|
812
|
+
args: [i0.ChangeDetectorRef]
|
|
813
|
+
}] }, { type: i1__namespace.TuiTextfieldCleanerDirective, decorators: [{
|
|
814
|
+
type: i0.Inject,
|
|
815
|
+
args: [i1.TUI_TEXTFIELD_CLEANER]
|
|
816
|
+
}] }, { type: undefined, decorators: [{
|
|
817
|
+
type: i0.Inject,
|
|
818
|
+
args: [TUI_INPUT_PHONE_OPTIONS]
|
|
819
|
+
}] }, { type: i1__namespace.TuiTextfieldSizeDirective, decorators: [{
|
|
820
|
+
type: i0.Inject,
|
|
821
|
+
args: [i1.TUI_TEXTFIELD_SIZE]
|
|
822
|
+
}] }];
|
|
823
|
+
}, propDecorators: { dropdown: [{
|
|
824
|
+
type: i0.ViewChild,
|
|
825
|
+
args: [i1.TuiHostedDropdownComponent]
|
|
826
|
+
}], textfield: [{
|
|
827
|
+
type: i0.ViewChild,
|
|
828
|
+
args: [i1.TuiPrimitiveTextfieldComponent]
|
|
829
|
+
}], countryCodeSetter: [{
|
|
830
|
+
type: i0.Input,
|
|
831
|
+
args: ['countryCode']
|
|
832
|
+
}], phoneMaskAfterCountryCode: [{
|
|
833
|
+
type: i0.Input
|
|
834
|
+
}], allowText: [{
|
|
835
|
+
type: i0.Input
|
|
836
|
+
}], search: [{
|
|
837
|
+
type: i0.Input
|
|
838
|
+
}], searchChange: [{
|
|
839
|
+
type: i0.Output
|
|
840
|
+
}], datalist: [{
|
|
841
|
+
type: i0.ContentChild,
|
|
842
|
+
args: [i1.TuiDataListDirective, { read: i0.TemplateRef }]
|
|
843
|
+
}], size: [{
|
|
844
|
+
type: i0.HostBinding,
|
|
845
|
+
args: ['attr.data-size']
|
|
846
|
+
}], calculateMask: [] } });
|
|
701
847
|
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
848
|
+
var TuiInputPhoneDirective = /** @class */ (function (_super) {
|
|
849
|
+
__extends(TuiInputPhoneDirective, _super);
|
|
850
|
+
function TuiInputPhoneDirective() {
|
|
851
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
852
|
+
}
|
|
853
|
+
Object.defineProperty(TuiInputPhoneDirective.prototype, "value", {
|
|
854
|
+
get: function () {
|
|
855
|
+
return this.host.nativeValue;
|
|
856
|
+
},
|
|
857
|
+
enumerable: false,
|
|
858
|
+
configurable: true
|
|
859
|
+
});
|
|
860
|
+
TuiInputPhoneDirective.prototype.onValueChange = function (value) {
|
|
861
|
+
this.host.onValueChange(value);
|
|
862
|
+
};
|
|
863
|
+
TuiInputPhoneDirective.prototype.process = function (input) {
|
|
864
|
+
this.input = input;
|
|
865
|
+
};
|
|
866
|
+
TuiInputPhoneDirective.prototype.ngDoCheck = function () {
|
|
867
|
+
if (!this.input) {
|
|
868
|
+
return;
|
|
869
|
+
}
|
|
870
|
+
this.input.type = 'tel';
|
|
871
|
+
this.input.inputMode = this.host.inputMode;
|
|
872
|
+
};
|
|
873
|
+
return TuiInputPhoneDirective;
|
|
874
|
+
}(i1.AbstractTuiTextfieldHost));
|
|
875
|
+
TuiInputPhoneDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputPhoneDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
876
|
+
TuiInputPhoneDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputPhoneDirective, selector: "tui-input-phone", providers: [i1.tuiAsTextfieldHost(TuiInputPhoneDirective)], usesInheritance: true, ngImport: i0__namespace });
|
|
877
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputPhoneDirective, decorators: [{
|
|
878
|
+
type: i0.Directive,
|
|
879
|
+
args: [{
|
|
880
|
+
selector: 'tui-input-phone',
|
|
881
|
+
providers: [i1.tuiAsTextfieldHost(TuiInputPhoneDirective)],
|
|
882
|
+
}]
|
|
883
|
+
}] });
|
|
738
884
|
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
885
|
+
var TuiInputPhoneModule = /** @class */ (function () {
|
|
886
|
+
function TuiInputPhoneModule() {
|
|
887
|
+
}
|
|
888
|
+
return TuiInputPhoneModule;
|
|
889
|
+
}());
|
|
890
|
+
TuiInputPhoneModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputPhoneModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
891
|
+
TuiInputPhoneModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputPhoneModule, declarations: [TuiInputPhoneComponent, TuiInputPhoneDirective], imports: [i4.MaskitoModule,
|
|
892
|
+
i1.TuiPrimitiveTextfieldModule,
|
|
893
|
+
i1.TuiHostedDropdownModule,
|
|
894
|
+
i1.TuiTextfieldControllerModule,
|
|
895
|
+
i2.TuiActiveZoneModule,
|
|
896
|
+
i3.TuiValueAccessorModule], exports: [TuiInputPhoneComponent, TuiInputPhoneDirective, i1.TuiTextfieldComponent] });
|
|
897
|
+
TuiInputPhoneModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputPhoneModule, imports: [[
|
|
898
|
+
i4.MaskitoModule,
|
|
899
|
+
i1.TuiPrimitiveTextfieldModule,
|
|
900
|
+
i1.TuiHostedDropdownModule,
|
|
901
|
+
i1.TuiTextfieldControllerModule,
|
|
902
|
+
i2.TuiActiveZoneModule,
|
|
903
|
+
i3.TuiValueAccessorModule,
|
|
904
|
+
]] });
|
|
905
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputPhoneModule, decorators: [{
|
|
906
|
+
type: i0.NgModule,
|
|
907
|
+
args: [{
|
|
908
|
+
imports: [
|
|
909
|
+
i4.MaskitoModule,
|
|
910
|
+
i1.TuiPrimitiveTextfieldModule,
|
|
911
|
+
i1.TuiHostedDropdownModule,
|
|
912
|
+
i1.TuiTextfieldControllerModule,
|
|
913
|
+
i2.TuiActiveZoneModule,
|
|
914
|
+
i3.TuiValueAccessorModule,
|
|
915
|
+
],
|
|
916
|
+
declarations: [TuiInputPhoneComponent, TuiInputPhoneDirective],
|
|
917
|
+
exports: [TuiInputPhoneComponent, TuiInputPhoneDirective, i1.TuiTextfieldComponent],
|
|
918
|
+
}]
|
|
919
|
+
}] });
|
|
774
920
|
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
921
|
+
/**
|
|
922
|
+
* Generated bundle index. Do not edit.
|
|
923
|
+
*/
|
|
778
924
|
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
925
|
+
exports.TUI_INPUT_PHONE_DEFAULT_OPTIONS = TUI_INPUT_PHONE_DEFAULT_OPTIONS;
|
|
926
|
+
exports.TUI_INPUT_PHONE_OPTIONS = TUI_INPUT_PHONE_OPTIONS;
|
|
927
|
+
exports.TuiInputPhoneComponent = TuiInputPhoneComponent;
|
|
928
|
+
exports.TuiInputPhoneDirective = TuiInputPhoneDirective;
|
|
929
|
+
exports.TuiInputPhoneModule = TuiInputPhoneModule;
|
|
930
|
+
exports.tuiInputPhoneOptionsProvider = tuiInputPhoneOptionsProvider;
|
|
785
931
|
|
|
786
|
-
|
|
932
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
787
933
|
|
|
788
934
|
}));
|
|
789
935
|
//# sourceMappingURL=taiga-ui-kit-components-input-phone.umd.js.map
|