ngx-nz-formly 0.0.1
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/README.md +24 -0
- package/esm2022/lib/components/formly-button/formly-button.component.mjs +21 -0
- package/esm2022/lib/components/formly-field-checkbox/formly-field-checkbox.component.mjs +33 -0
- package/esm2022/lib/components/formly-field-input/formly-field-input.component.mjs +105 -0
- package/esm2022/lib/components/formly-field-input/phone-mask.config.mjs +1463 -0
- package/esm2022/lib/components/formly-field-radio/formly-field-radio.component.mjs +39 -0
- package/esm2022/lib/components/formly-field-select/formly-field-select.component.mjs +34 -0
- package/esm2022/lib/components/formly-field-switch/formly-field-switch.component.mjs +38 -0
- package/esm2022/lib/ngx-nz-formly-props.model.mjs +6 -0
- package/esm2022/lib/ngx-nz-formly-type-safe.model.mjs +44 -0
- package/esm2022/lib/ngx-nz-formly-validators.mjs +52 -0
- package/esm2022/lib/ngx-nz-formly.module.mjs +263 -0
- package/esm2022/lib/wrappers/formly-default-wrapper/formly-default-wrapper.component.mjs +39 -0
- package/esm2022/lib/wrappers/formly-label-wrapper/formly-label-wrapper.component.mjs +13 -0
- package/esm2022/ngx-nz-formly.mjs +5 -0
- package/esm2022/public-api.mjs +5 -0
- package/fesm2022/ngx-nz-formly.mjs +2101 -0
- package/fesm2022/ngx-nz-formly.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/formly-button/formly-button.component.d.ts +8 -0
- package/lib/components/formly-field-checkbox/formly-field-checkbox.component.d.ts +13 -0
- package/lib/components/formly-field-input/formly-field-input.component.d.ts +24 -0
- package/lib/components/formly-field-input/phone-mask.config.d.ts +11 -0
- package/lib/components/formly-field-radio/formly-field-radio.component.d.ts +14 -0
- package/lib/components/formly-field-select/formly-field-select.component.d.ts +13 -0
- package/lib/components/formly-field-switch/formly-field-switch.component.d.ts +14 -0
- package/lib/ngx-nz-formly-props.model.d.ts +145 -0
- package/lib/ngx-nz-formly-type-safe.model.d.ts +14 -0
- package/lib/ngx-nz-formly-validators.d.ts +16 -0
- package/lib/ngx-nz-formly.module.d.ts +28 -0
- package/lib/wrappers/formly-default-wrapper/formly-default-wrapper.component.d.ts +7 -0
- package/lib/wrappers/formly-label-wrapper/formly-label-wrapper.component.d.ts +7 -0
- package/package.json +31 -0
- package/public-api.d.ts +4 -0
|
@@ -0,0 +1,2101 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2 from '@ngx-formly/core';
|
|
4
|
+
import { FieldType, FieldWrapper, FormlyModule } from '@ngx-formly/core';
|
|
5
|
+
import { Subject, takeUntil, tap, debounceTime } from 'rxjs';
|
|
6
|
+
import * as i1 from '@angular/common';
|
|
7
|
+
import { CommonModule } from '@angular/common';
|
|
8
|
+
import * as i3 from '@angular/forms';
|
|
9
|
+
import { RequiredValidator, ReactiveFormsModule } from '@angular/forms';
|
|
10
|
+
import * as i4 from 'ngx-mask';
|
|
11
|
+
import { NgxMaskModule } from 'ngx-mask';
|
|
12
|
+
import * as i5 from 'ng-zorro-antd/input';
|
|
13
|
+
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
14
|
+
import * as i3$1 from 'ng-zorro-antd/core/transition-patch';
|
|
15
|
+
import * as i7 from 'ng-zorro-antd/icon';
|
|
16
|
+
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
17
|
+
import * as i3$2 from 'ng-zorro-antd/checkbox';
|
|
18
|
+
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
|
|
19
|
+
import * as i2$1 from 'ng-zorro-antd/button';
|
|
20
|
+
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
21
|
+
import * as i4$1 from 'ng-zorro-antd/core/wave';
|
|
22
|
+
import * as i4$2 from 'ng-zorro-antd/select';
|
|
23
|
+
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
24
|
+
import * as i3$3 from 'ng-zorro-antd/switch';
|
|
25
|
+
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
|
26
|
+
import * as i4$3 from 'ng-zorro-antd/radio';
|
|
27
|
+
import { NzRadioModule } from 'ng-zorro-antd/radio';
|
|
28
|
+
import { trigger, transition, style, animate } from '@angular/animations';
|
|
29
|
+
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
|
30
|
+
|
|
31
|
+
const CountryMasks2 = [
|
|
32
|
+
{
|
|
33
|
+
countryShortName: "AC",
|
|
34
|
+
prefix: "+247",
|
|
35
|
+
globalMask: "+247-####",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
countryShortName: "AD",
|
|
39
|
+
prefix: "+376",
|
|
40
|
+
globalMask: "+376-###-###",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
countryShortName: "AE",
|
|
44
|
+
prefix: "+9715",
|
|
45
|
+
globalMask: "+971-5#-###-####",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
countryShortName: "AE",
|
|
49
|
+
prefix: "+971",
|
|
50
|
+
globalMask: "+971-#-###-####",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
countryShortName: "AF",
|
|
54
|
+
prefix: "+93",
|
|
55
|
+
globalMask: "+93-##-###-####",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
countryShortName: "AG",
|
|
59
|
+
prefix: "+1268",
|
|
60
|
+
globalMask: "+1(268)###-####",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
countryShortName: "AI",
|
|
64
|
+
prefix: "+1264",
|
|
65
|
+
globalMask: "+1(264)###-####",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
countryShortName: "AL",
|
|
69
|
+
prefix: "+355",
|
|
70
|
+
globalMask: "+355(###)###-###",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
countryShortName: "AM",
|
|
74
|
+
prefix: "+374",
|
|
75
|
+
globalMask: "+374-##-###-###",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
countryShortName: "AN",
|
|
79
|
+
prefix: "+599",
|
|
80
|
+
globalMask: "+599-###-####",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
countryShortName: "AN",
|
|
84
|
+
prefix: "+5999",
|
|
85
|
+
globalMask: "+599-9###-####",
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
countryShortName: "AO",
|
|
89
|
+
prefix: "+244",
|
|
90
|
+
globalMask: "+244(###)###-###",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
countryShortName: "AQ",
|
|
94
|
+
prefix: "+6721",
|
|
95
|
+
globalMask: "+672-1##-###",
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
countryShortName: "AR",
|
|
99
|
+
prefix: "+54",
|
|
100
|
+
globalMask: "+54(###)###-####",
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
countryShortName: "AS",
|
|
104
|
+
prefix: "+1684",
|
|
105
|
+
globalMask: "+1(684)###-####",
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
countryShortName: "AT",
|
|
109
|
+
prefix: "+43",
|
|
110
|
+
globalMask: "+43(###)###-####",
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
countryShortName: "AU",
|
|
114
|
+
prefix: "+61",
|
|
115
|
+
globalMask: "+61-#-####-####",
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
countryShortName: "AW",
|
|
119
|
+
prefix: "+297",
|
|
120
|
+
globalMask: "+297-###-####",
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
countryShortName: "AZ",
|
|
124
|
+
prefix: "+994",
|
|
125
|
+
globalMask: "+994-##-###-##-##",
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
countryShortName: "BA",
|
|
129
|
+
prefix: "+387",
|
|
130
|
+
globalMask: "+387-##-#####",
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
countryShortName: "BA",
|
|
134
|
+
prefix: "+387",
|
|
135
|
+
globalMask: "+387-##-####",
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
countryShortName: "BB",
|
|
139
|
+
prefix: "+1246",
|
|
140
|
+
globalMask: "+1(246)###-####",
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
countryShortName: "BD",
|
|
144
|
+
prefix: "+880",
|
|
145
|
+
globalMask: "+880-##-###-###",
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
countryShortName: "BE",
|
|
149
|
+
prefix: "+32",
|
|
150
|
+
globalMask: "+32(###)###-###",
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
countryShortName: "BF",
|
|
154
|
+
prefix: "+226",
|
|
155
|
+
globalMask: "+226-##-##-####",
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
countryShortName: "BG",
|
|
159
|
+
prefix: "+359",
|
|
160
|
+
globalMask: "+359(###)###-###",
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
countryShortName: "BH",
|
|
164
|
+
prefix: "+973",
|
|
165
|
+
globalMask: "+973-####-####",
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
countryShortName: "BI",
|
|
169
|
+
prefix: "+257",
|
|
170
|
+
globalMask: "+257-##-##-####",
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
countryShortName: "BJ",
|
|
174
|
+
prefix: "+229",
|
|
175
|
+
globalMask: "+229-##-##-####",
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
countryShortName: "BM",
|
|
179
|
+
prefix: "+1441",
|
|
180
|
+
globalMask: "+1(441)###-####",
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
countryShortName: "BN",
|
|
184
|
+
prefix: "+673",
|
|
185
|
+
globalMask: "+673-###-####",
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
countryShortName: "BO",
|
|
189
|
+
prefix: "+591",
|
|
190
|
+
globalMask: "+591-#-###-####",
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
countryShortName: "BR",
|
|
194
|
+
prefix: "+55",
|
|
195
|
+
globalMask: "+55(##)####-####",
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
countryShortName: "BR",
|
|
199
|
+
prefix: "+55",
|
|
200
|
+
globalMask: "+55(##)9####-####",
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
countryShortName: "BS",
|
|
204
|
+
prefix: "+1242",
|
|
205
|
+
globalMask: "+1(242)###-####",
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
countryShortName: "BT",
|
|
209
|
+
prefix: "+97517",
|
|
210
|
+
globalMask: "+975-17-###-###",
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
countryShortName: "BT",
|
|
214
|
+
prefix: "+975",
|
|
215
|
+
globalMask: "+975-#-###-###",
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
countryShortName: "BW",
|
|
219
|
+
prefix: "+267",
|
|
220
|
+
globalMask: "+267-##-###-###",
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
countryShortName: "BY",
|
|
224
|
+
prefix: "+375",
|
|
225
|
+
globalMask: "+375(##)###-##-##",
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
countryShortName: "BZ",
|
|
229
|
+
prefix: "+501",
|
|
230
|
+
globalMask: "+501-###-####",
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
countryShortName: "US & CA",
|
|
234
|
+
prefix: "+1",
|
|
235
|
+
globalMask: "+1(###)###-####",
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
countryShortName: "CD",
|
|
239
|
+
prefix: "+243",
|
|
240
|
+
globalMask: "+243(###)###-###",
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
countryShortName: "CF",
|
|
244
|
+
prefix: "+236",
|
|
245
|
+
globalMask: "+236-##-##-####",
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
countryShortName: "CG",
|
|
249
|
+
prefix: "+242",
|
|
250
|
+
globalMask: "+242-##-###-####",
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
countryShortName: "CH",
|
|
254
|
+
prefix: "+41",
|
|
255
|
+
globalMask: "+41-##-###-####",
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
countryShortName: "CI",
|
|
259
|
+
prefix: "+225",
|
|
260
|
+
globalMask: "+225-##-###-###",
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
countryShortName: "CK",
|
|
264
|
+
prefix: "+682",
|
|
265
|
+
globalMask: "+682-##-###",
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
countryShortName: "CL",
|
|
269
|
+
prefix: "+56",
|
|
270
|
+
globalMask: "+56-#-####-####",
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
countryShortName: "CM",
|
|
274
|
+
prefix: "+237",
|
|
275
|
+
globalMask: "+237-####-####",
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
countryShortName: "CN",
|
|
279
|
+
prefix: "+86",
|
|
280
|
+
globalMask: "+86(###)####-####",
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
countryShortName: "CN",
|
|
284
|
+
prefix: "+86",
|
|
285
|
+
globalMask: "+86(###)####-###",
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
countryShortName: "CN",
|
|
289
|
+
prefix: "+86",
|
|
290
|
+
globalMask: "+86-##-#####-#####",
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
countryShortName: "CO",
|
|
294
|
+
prefix: "+57",
|
|
295
|
+
globalMask: "+57(###)###-####",
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
countryShortName: "CR",
|
|
299
|
+
prefix: "+506",
|
|
300
|
+
globalMask: "+506-####-####",
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
countryShortName: "CU",
|
|
304
|
+
prefix: "+53",
|
|
305
|
+
globalMask: "+53-#-###-####",
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
countryShortName: "CV",
|
|
309
|
+
prefix: "+238",
|
|
310
|
+
globalMask: "+238(###)##-##",
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
countryShortName: "CW",
|
|
314
|
+
prefix: "+599",
|
|
315
|
+
globalMask: "+599-###-####",
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
countryShortName: "CY",
|
|
319
|
+
prefix: "+357",
|
|
320
|
+
globalMask: "+357-##-###-###",
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
countryShortName: "CZ",
|
|
324
|
+
prefix: "+420",
|
|
325
|
+
globalMask: "+420(###)###-###",
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
countryShortName: "DE",
|
|
329
|
+
prefix: "+49",
|
|
330
|
+
globalMask: "+49(####)###-####",
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
countryShortName: "DE",
|
|
334
|
+
prefix: "+49",
|
|
335
|
+
globalMask: "+49(###)###-####",
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
countryShortName: "DE",
|
|
339
|
+
prefix: "+49",
|
|
340
|
+
globalMask: "+49(###)##-####",
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
countryShortName: "DE",
|
|
344
|
+
prefix: "+49",
|
|
345
|
+
globalMask: "+49(###)##-###",
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
countryShortName: "DE",
|
|
349
|
+
prefix: "+49",
|
|
350
|
+
globalMask: "+49(###)##-##",
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
countryShortName: "DE",
|
|
354
|
+
prefix: "+49",
|
|
355
|
+
globalMask: "+49-###-###",
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
countryShortName: "DJ",
|
|
359
|
+
prefix: "+253",
|
|
360
|
+
globalMask: "+253-##-##-##-##",
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
countryShortName: "DK",
|
|
364
|
+
prefix: "+45",
|
|
365
|
+
globalMask: "+45-##-##-##-##",
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
countryShortName: "DM",
|
|
369
|
+
prefix: "+1767",
|
|
370
|
+
globalMask: "+1(767)###-####",
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
countryShortName: "DO",
|
|
374
|
+
prefix: "+1809",
|
|
375
|
+
globalMask: "+1(809)###-####",
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
countryShortName: "DO",
|
|
379
|
+
prefix: "+1829",
|
|
380
|
+
globalMask: "+1(829)###-####",
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
countryShortName: "DO",
|
|
384
|
+
prefix: "+1849",
|
|
385
|
+
globalMask: "+1(849)###-####",
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
countryShortName: "DZ",
|
|
389
|
+
prefix: "+213",
|
|
390
|
+
globalMask: "+213-##-###-####",
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
countryShortName: "EC",
|
|
394
|
+
prefix: "+593",
|
|
395
|
+
globalMask: "+593-##-###-####",
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
countryShortName: "EC",
|
|
399
|
+
prefix: "+593",
|
|
400
|
+
globalMask: "+593-#-###-####",
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
countryShortName: "EE",
|
|
404
|
+
prefix: "+372",
|
|
405
|
+
globalMask: "+372-####-####",
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
countryShortName: "EE",
|
|
409
|
+
prefix: "+372",
|
|
410
|
+
globalMask: "+372-###-####",
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
countryShortName: "EG",
|
|
414
|
+
prefix: "+20",
|
|
415
|
+
globalMask: "+20(###)###-####",
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
countryShortName: "ER",
|
|
419
|
+
prefix: "+291",
|
|
420
|
+
globalMask: "+291-#-###-###",
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
countryShortName: "ES",
|
|
424
|
+
prefix: "+34",
|
|
425
|
+
globalMask: "+34(###)###-###",
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
countryShortName: "ET",
|
|
429
|
+
prefix: "+251",
|
|
430
|
+
globalMask: "+251-##-###-####",
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
countryShortName: "FI",
|
|
434
|
+
prefix: "+358",
|
|
435
|
+
globalMask: "+358(###)###-##-##",
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
countryShortName: "FJ",
|
|
439
|
+
prefix: "+679",
|
|
440
|
+
globalMask: "+679-##-#####",
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
countryShortName: "FK",
|
|
444
|
+
prefix: "+500",
|
|
445
|
+
globalMask: "+500-#####",
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
countryShortName: "FM",
|
|
449
|
+
prefix: "+691",
|
|
450
|
+
globalMask: "+691-###-####",
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
countryShortName: "FO",
|
|
454
|
+
prefix: "+298",
|
|
455
|
+
globalMask: "+298-###-###",
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
countryShortName: "FR",
|
|
459
|
+
prefix: "+262",
|
|
460
|
+
globalMask: "+262-#####-####",
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
countryShortName: "FR",
|
|
464
|
+
prefix: "+33",
|
|
465
|
+
globalMask: "+33(###)###-###",
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
countryShortName: "FR",
|
|
469
|
+
prefix: "+508",
|
|
470
|
+
globalMask: "+508-##-####",
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
countryShortName: "FR",
|
|
474
|
+
prefix: "+590",
|
|
475
|
+
globalMask: "+590(###)###-###",
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
countryShortName: "GA",
|
|
479
|
+
prefix: "+241",
|
|
480
|
+
globalMask: "+241-#-##-##-##",
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
countryShortName: "GD",
|
|
484
|
+
prefix: "+1473",
|
|
485
|
+
globalMask: "+1(473)###-####",
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
countryShortName: "GE",
|
|
489
|
+
prefix: "+995",
|
|
490
|
+
globalMask: "+995(###)###-###",
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
countryShortName: "GF",
|
|
494
|
+
prefix: "+594",
|
|
495
|
+
globalMask: "+594-#####-####",
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
countryShortName: "GH",
|
|
499
|
+
prefix: "+233",
|
|
500
|
+
globalMask: "+233(###)###-###",
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
countryShortName: "GI",
|
|
504
|
+
prefix: "+350",
|
|
505
|
+
globalMask: "+350-###-#####",
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
countryShortName: "GL",
|
|
509
|
+
prefix: "+299",
|
|
510
|
+
globalMask: "+299-##-##-##",
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
countryShortName: "GM",
|
|
514
|
+
prefix: "+220",
|
|
515
|
+
globalMask: "+220(###)##-##",
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
countryShortName: "GN",
|
|
519
|
+
prefix: "+224",
|
|
520
|
+
globalMask: "+224-##-###-###",
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
countryShortName: "GQ",
|
|
524
|
+
prefix: "+240",
|
|
525
|
+
globalMask: "+240-##-###-####",
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
countryShortName: "GR",
|
|
529
|
+
prefix: "+30",
|
|
530
|
+
globalMask: "+30(###)###-####",
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
countryShortName: "GT",
|
|
534
|
+
prefix: "+502",
|
|
535
|
+
globalMask: "+502-#-###-####",
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
countryShortName: "GU",
|
|
539
|
+
prefix: "+1671",
|
|
540
|
+
globalMask: "+1(671)###-####",
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
countryShortName: "GW",
|
|
544
|
+
prefix: "+245",
|
|
545
|
+
globalMask: "+245-#-######",
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
countryShortName: "GY",
|
|
549
|
+
prefix: "+592",
|
|
550
|
+
globalMask: "+592-###-####",
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
countryShortName: "HK",
|
|
554
|
+
prefix: "+852",
|
|
555
|
+
globalMask: "+852-####-####",
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
countryShortName: "HN",
|
|
559
|
+
prefix: "+504",
|
|
560
|
+
globalMask: "+504-####-####",
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
countryShortName: "HR",
|
|
564
|
+
prefix: "+385",
|
|
565
|
+
globalMask: "+385-##-###-###",
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
countryShortName: "HT",
|
|
569
|
+
prefix: "+509",
|
|
570
|
+
globalMask: "+509-##-##-####",
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
countryShortName: "HU",
|
|
574
|
+
prefix: "+36",
|
|
575
|
+
globalMask: "+36(###)###-###",
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
countryShortName: "ID",
|
|
579
|
+
prefix: "+628",
|
|
580
|
+
globalMask: "+62(8##)###-####",
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
countryShortName: "ID",
|
|
584
|
+
prefix: "+62",
|
|
585
|
+
globalMask: "+62-##-###-##",
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
countryShortName: "ID",
|
|
589
|
+
prefix: "+62",
|
|
590
|
+
globalMask: "+62-##-###-###",
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
countryShortName: "ID",
|
|
594
|
+
prefix: "+62",
|
|
595
|
+
globalMask: "+62-##-###-####",
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
countryShortName: "ID",
|
|
599
|
+
prefix: "+628",
|
|
600
|
+
globalMask: "+62(8##)###-###",
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
countryShortName: "ID",
|
|
604
|
+
prefix: "+628",
|
|
605
|
+
globalMask: "+62(8##)###-##-###",
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
countryShortName: "IE",
|
|
609
|
+
prefix: "+353",
|
|
610
|
+
globalMask: "+353(###)###-###",
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
countryShortName: "IL",
|
|
614
|
+
prefix: "+9725",
|
|
615
|
+
globalMask: "+972-5#-###-####",
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
countryShortName: "IL",
|
|
619
|
+
prefix: "+972",
|
|
620
|
+
globalMask: "+972-#-###-####",
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
countryShortName: "IN",
|
|
624
|
+
prefix: "+91",
|
|
625
|
+
globalMask: "+91(####)###-###",
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
countryShortName: "IO",
|
|
629
|
+
prefix: "+246",
|
|
630
|
+
globalMask: "+246-###-####",
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
countryShortName: "IQ",
|
|
634
|
+
prefix: "+964",
|
|
635
|
+
globalMask: "+964(###)###-####",
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
countryShortName: "IR",
|
|
639
|
+
prefix: "+98",
|
|
640
|
+
globalMask: "+98(###)###-####",
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
countryShortName: "IS",
|
|
644
|
+
prefix: "+354",
|
|
645
|
+
globalMask: "+354-###-####",
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
countryShortName: "IT",
|
|
649
|
+
prefix: "+39",
|
|
650
|
+
globalMask: "+39(###)####-###",
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
countryShortName: "JM",
|
|
654
|
+
prefix: "+1876",
|
|
655
|
+
globalMask: "+1(876)###-####",
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
countryShortName: "JO",
|
|
659
|
+
prefix: "+962",
|
|
660
|
+
globalMask: "+962-#-####-####",
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
countryShortName: "JP",
|
|
664
|
+
prefix: "+81",
|
|
665
|
+
globalMask: "+81-##-####-####",
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
countryShortName: "JP",
|
|
669
|
+
prefix: "+81",
|
|
670
|
+
globalMask: "+81(###)###-###",
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
countryShortName: "KE",
|
|
674
|
+
prefix: "+254",
|
|
675
|
+
globalMask: "+254-###-######",
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
countryShortName: "KG",
|
|
679
|
+
prefix: "+996",
|
|
680
|
+
globalMask: "+996(###)###-###",
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
countryShortName: "KH",
|
|
684
|
+
prefix: "+855",
|
|
685
|
+
globalMask: "+855-##-###-###",
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
countryShortName: "KI",
|
|
689
|
+
prefix: "+686",
|
|
690
|
+
globalMask: "+686-##-###",
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
countryShortName: "KM",
|
|
694
|
+
prefix: "+269",
|
|
695
|
+
globalMask: "+269-##-#####",
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
countryShortName: "KN",
|
|
699
|
+
prefix: "+1869",
|
|
700
|
+
globalMask: "+1(869)###-####",
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
countryShortName: "KP",
|
|
704
|
+
prefix: "+850191",
|
|
705
|
+
globalMask: "+850-191-###-####",
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
countryShortName: "KP",
|
|
709
|
+
prefix: "+850",
|
|
710
|
+
globalMask: "+850-##-###-###",
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
countryShortName: "KP",
|
|
714
|
+
prefix: "+850",
|
|
715
|
+
globalMask: "+850-###-####-###",
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
countryShortName: "KP",
|
|
719
|
+
prefix: "+850",
|
|
720
|
+
globalMask: "+850-###-###",
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
countryShortName: "KP",
|
|
724
|
+
prefix: "+850",
|
|
725
|
+
globalMask: "+850-####-####",
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
countryShortName: "KP",
|
|
729
|
+
prefix: "+850",
|
|
730
|
+
globalMask: "+850-####-#############",
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
countryShortName: "KR",
|
|
734
|
+
prefix: "+82",
|
|
735
|
+
globalMask: "+82-##-###-####",
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
countryShortName: "KW",
|
|
739
|
+
prefix: "+965",
|
|
740
|
+
globalMask: "+965-####-####",
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
countryShortName: "KY",
|
|
744
|
+
prefix: "+1345",
|
|
745
|
+
globalMask: "+1(345)###-####",
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
countryShortName: "KZ",
|
|
749
|
+
prefix: "+76",
|
|
750
|
+
globalMask: "+7(6##)###-##-##",
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
countryShortName: "KZ",
|
|
754
|
+
prefix: "+77",
|
|
755
|
+
globalMask: "+7(7##)###-##-##",
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
countryShortName: "LA",
|
|
759
|
+
prefix: "+85620",
|
|
760
|
+
globalMask: "+856(20##)###-###",
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
countryShortName: "LA",
|
|
764
|
+
prefix: "+856",
|
|
765
|
+
globalMask: "+856-##-###-###",
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
countryShortName: "LB",
|
|
769
|
+
prefix: "+961",
|
|
770
|
+
globalMask: "+961-##-###-###",
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
countryShortName: "LB",
|
|
774
|
+
prefix: "+961",
|
|
775
|
+
globalMask: "+961-#-###-###",
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
countryShortName: "LC",
|
|
779
|
+
prefix: "+1758",
|
|
780
|
+
globalMask: "+1(758)###-####",
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
countryShortName: "LI",
|
|
784
|
+
prefix: "+423",
|
|
785
|
+
globalMask: "+423(###)###-####",
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
countryShortName: "LK",
|
|
789
|
+
prefix: "+94",
|
|
790
|
+
globalMask: "+94-##-###-####",
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
countryShortName: "LR",
|
|
794
|
+
prefix: "+231",
|
|
795
|
+
globalMask: "+231-##-###-###",
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
countryShortName: "LS",
|
|
799
|
+
prefix: "+266",
|
|
800
|
+
globalMask: "+266-#-###-####",
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
countryShortName: "LT",
|
|
804
|
+
prefix: "+370",
|
|
805
|
+
globalMask: "+370(###)##-###",
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
countryShortName: "LU",
|
|
809
|
+
prefix: "+352",
|
|
810
|
+
globalMask: "+352(###)###-###",
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
countryShortName: "LV",
|
|
814
|
+
prefix: "+371",
|
|
815
|
+
globalMask: "+371-##-###-###",
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
countryShortName: "LY",
|
|
819
|
+
prefix: "+218",
|
|
820
|
+
globalMask: "+218-##-###-###",
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
countryShortName: "LY",
|
|
824
|
+
prefix: "+21821",
|
|
825
|
+
globalMask: "+218-21-###-####",
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
countryShortName: "MA",
|
|
829
|
+
prefix: "+212",
|
|
830
|
+
globalMask: "+212-##-####-###",
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
countryShortName: "MC",
|
|
834
|
+
prefix: "+377",
|
|
835
|
+
globalMask: "+377(###)###-###",
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
countryShortName: "MC",
|
|
839
|
+
prefix: "+377",
|
|
840
|
+
globalMask: "+377-##-###-###",
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
countryShortName: "MD",
|
|
844
|
+
prefix: "+373",
|
|
845
|
+
globalMask: "+373-####-####",
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
countryShortName: "ME",
|
|
849
|
+
prefix: "+382",
|
|
850
|
+
globalMask: "+382-##-###-###",
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
countryShortName: "MG",
|
|
854
|
+
prefix: "+261",
|
|
855
|
+
globalMask: "+261-##-##-#####",
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
countryShortName: "MH",
|
|
859
|
+
prefix: "+692",
|
|
860
|
+
globalMask: "+692-###-####",
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
countryShortName: "MK",
|
|
864
|
+
prefix: "+389",
|
|
865
|
+
globalMask: "+389-##-###-###",
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
countryShortName: "ML",
|
|
869
|
+
prefix: "+223",
|
|
870
|
+
globalMask: "+223-##-##-####",
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
countryShortName: "MM",
|
|
874
|
+
prefix: "+95",
|
|
875
|
+
globalMask: "+95-##-###-###",
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
countryShortName: "MM",
|
|
879
|
+
prefix: "+95",
|
|
880
|
+
globalMask: "+95-#-###-###",
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
countryShortName: "MM",
|
|
884
|
+
prefix: "+95",
|
|
885
|
+
globalMask: "+95-###-###",
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
countryShortName: "MN",
|
|
889
|
+
prefix: "+976",
|
|
890
|
+
globalMask: "+976-##-##-####",
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
countryShortName: "MO",
|
|
894
|
+
prefix: "+853",
|
|
895
|
+
globalMask: "+853-####-####",
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
countryShortName: "MP",
|
|
899
|
+
prefix: "+1670",
|
|
900
|
+
globalMask: "+1(670)###-####",
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
countryShortName: "MQ",
|
|
904
|
+
prefix: "+596",
|
|
905
|
+
globalMask: "+596(###)##-##-##",
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
countryShortName: "MR",
|
|
909
|
+
prefix: "+222",
|
|
910
|
+
globalMask: "+222-##-##-####",
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
countryShortName: "MS",
|
|
914
|
+
prefix: "+1664",
|
|
915
|
+
globalMask: "+1(664)###-####",
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
countryShortName: "MT",
|
|
919
|
+
prefix: "+356",
|
|
920
|
+
globalMask: "+356-####-####",
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
countryShortName: "MU",
|
|
924
|
+
prefix: "+230",
|
|
925
|
+
globalMask: "+230-###-####",
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
countryShortName: "MV",
|
|
929
|
+
prefix: "+960",
|
|
930
|
+
globalMask: "+960-###-####",
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
countryShortName: "MW",
|
|
934
|
+
prefix: "+2651",
|
|
935
|
+
globalMask: "+265-1-###-###",
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
countryShortName: "MW",
|
|
939
|
+
prefix: "+265",
|
|
940
|
+
globalMask: "+265-#-####-####",
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
countryShortName: "MX",
|
|
944
|
+
prefix: "+52",
|
|
945
|
+
globalMask: "+52(###)###-####",
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
countryShortName: "MX",
|
|
949
|
+
prefix: "+52",
|
|
950
|
+
globalMask: "+52-##-##-####",
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
countryShortName: "MY",
|
|
954
|
+
prefix: "+60",
|
|
955
|
+
globalMask: "+60-##-###-####",
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
countryShortName: "MY",
|
|
959
|
+
prefix: "+60",
|
|
960
|
+
globalMask: "+60(###)###-###",
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
countryShortName: "MY",
|
|
964
|
+
prefix: "+60",
|
|
965
|
+
globalMask: "+60-##-###-###",
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
countryShortName: "MY",
|
|
969
|
+
prefix: "+60",
|
|
970
|
+
globalMask: "+60-#-###-###",
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
countryShortName: "MZ",
|
|
974
|
+
prefix: "+258",
|
|
975
|
+
globalMask: "+258-##-###-###",
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
countryShortName: "NA",
|
|
979
|
+
prefix: "+264",
|
|
980
|
+
globalMask: "+264-##-###-####",
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
countryShortName: "NC",
|
|
984
|
+
prefix: "+687",
|
|
985
|
+
globalMask: "+687-##-####",
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
countryShortName: "NE",
|
|
989
|
+
prefix: "+227",
|
|
990
|
+
globalMask: "+227-##-##-####",
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
countryShortName: "NF",
|
|
994
|
+
prefix: "+6723",
|
|
995
|
+
globalMask: "+672-3##-###",
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
countryShortName: "NG",
|
|
999
|
+
prefix: "+234",
|
|
1000
|
+
globalMask: "+234(###)###-####",
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
countryShortName: "NG",
|
|
1004
|
+
prefix: "+234",
|
|
1005
|
+
globalMask: "+234-##-###-###",
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
countryShortName: "NG",
|
|
1009
|
+
prefix: "+234",
|
|
1010
|
+
globalMask: "+234-##-###-##",
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
countryShortName: "NG",
|
|
1014
|
+
prefix: "+234",
|
|
1015
|
+
globalMask: "+234(###)###-####",
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
countryShortName: "NI",
|
|
1019
|
+
prefix: "+505",
|
|
1020
|
+
globalMask: "+505-####-####",
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
countryShortName: "NL",
|
|
1024
|
+
prefix: "+31",
|
|
1025
|
+
globalMask: "+31-##-###-####",
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
countryShortName: "NO",
|
|
1029
|
+
prefix: "+47",
|
|
1030
|
+
globalMask: "+47(###)##-###",
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
countryShortName: "NP",
|
|
1034
|
+
prefix: "+977",
|
|
1035
|
+
globalMask: "+977-##-###-###",
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
countryShortName: "NR",
|
|
1039
|
+
prefix: "+674",
|
|
1040
|
+
globalMask: "+674-###-####",
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
countryShortName: "NU",
|
|
1044
|
+
prefix: "+683",
|
|
1045
|
+
globalMask: "+683-####",
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
countryShortName: "NZ",
|
|
1049
|
+
prefix: "+64",
|
|
1050
|
+
globalMask: "+64(###)###-###",
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
countryShortName: "NZ",
|
|
1054
|
+
prefix: "+64",
|
|
1055
|
+
globalMask: "+64-##-###-###",
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
countryShortName: "NZ",
|
|
1059
|
+
prefix: "+64",
|
|
1060
|
+
globalMask: "+64(###)###-####",
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
countryShortName: "OM",
|
|
1064
|
+
prefix: "+968",
|
|
1065
|
+
globalMask: "+968-##-###-###",
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
countryShortName: "PA",
|
|
1069
|
+
prefix: "+507",
|
|
1070
|
+
globalMask: "+507-###-####",
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
countryShortName: "PE",
|
|
1074
|
+
prefix: "+51",
|
|
1075
|
+
globalMask: "+51(###)###-###",
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
countryShortName: "PF",
|
|
1079
|
+
prefix: "+689",
|
|
1080
|
+
globalMask: "+689-##-##-##",
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
countryShortName: "PG",
|
|
1084
|
+
prefix: "+675",
|
|
1085
|
+
globalMask: "+675(###)##-###",
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
countryShortName: "PH",
|
|
1089
|
+
prefix: "+63",
|
|
1090
|
+
globalMask: "+63(###)###-####",
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
countryShortName: "PK",
|
|
1094
|
+
prefix: "+92",
|
|
1095
|
+
globalMask: "+92(###)###-####",
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
countryShortName: "PL",
|
|
1099
|
+
prefix: "+48",
|
|
1100
|
+
globalMask: "+48(###)###-###",
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
countryShortName: "PS",
|
|
1104
|
+
prefix: "+970",
|
|
1105
|
+
globalMask: "+970-##-###-####",
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
countryShortName: "PT",
|
|
1109
|
+
prefix: "+351",
|
|
1110
|
+
globalMask: "+351-##-###-####",
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
countryShortName: "PW",
|
|
1114
|
+
prefix: "+680",
|
|
1115
|
+
globalMask: "+680-###-####",
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
countryShortName: "PY",
|
|
1119
|
+
prefix: "+595",
|
|
1120
|
+
globalMask: "+595(###)###-###",
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
countryShortName: "QA",
|
|
1124
|
+
prefix: "+974",
|
|
1125
|
+
globalMask: "+974-####-####",
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
countryShortName: "RE",
|
|
1129
|
+
prefix: "+262",
|
|
1130
|
+
globalMask: "+262-#####-####",
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
countryShortName: "RO",
|
|
1134
|
+
prefix: "+40",
|
|
1135
|
+
globalMask: "+40-##-###-####",
|
|
1136
|
+
},
|
|
1137
|
+
{
|
|
1138
|
+
countryShortName: "RS",
|
|
1139
|
+
prefix: "+381",
|
|
1140
|
+
globalMask: "+381-##-###-####",
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
countryShortName: "RU",
|
|
1144
|
+
prefix: "+7",
|
|
1145
|
+
globalMask: "+7(###)###-##-##",
|
|
1146
|
+
},
|
|
1147
|
+
{
|
|
1148
|
+
countryShortName: "RW",
|
|
1149
|
+
prefix: "+250",
|
|
1150
|
+
globalMask: "+250(###)###-###",
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
countryShortName: "SA",
|
|
1154
|
+
prefix: "+9665",
|
|
1155
|
+
globalMask: "+966-5-####-####",
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
countryShortName: "SA",
|
|
1159
|
+
prefix: "+966",
|
|
1160
|
+
globalMask: "+966-#-###-####",
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
countryShortName: "SB",
|
|
1164
|
+
prefix: "+677",
|
|
1165
|
+
globalMask: "+677-###-####",
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
countryShortName: "SB",
|
|
1169
|
+
prefix: "+677",
|
|
1170
|
+
globalMask: "+677-#####",
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
countryShortName: "SC",
|
|
1174
|
+
prefix: "+248",
|
|
1175
|
+
globalMask: "+248-#-###-###",
|
|
1176
|
+
},
|
|
1177
|
+
{
|
|
1178
|
+
countryShortName: "SD",
|
|
1179
|
+
prefix: "+249",
|
|
1180
|
+
globalMask: "+249-##-###-####",
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
countryShortName: "SE",
|
|
1184
|
+
prefix: "+46",
|
|
1185
|
+
globalMask: "+46-##-###-####",
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
countryShortName: "SG",
|
|
1189
|
+
prefix: "+65",
|
|
1190
|
+
globalMask: "+65-####-####",
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
countryShortName: "SH",
|
|
1194
|
+
prefix: "+290",
|
|
1195
|
+
globalMask: "+290-####",
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
countryShortName: "SH",
|
|
1199
|
+
prefix: "+290",
|
|
1200
|
+
globalMask: "+290-####",
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
countryShortName: "SI",
|
|
1204
|
+
prefix: "+386",
|
|
1205
|
+
globalMask: "+386-##-###-###",
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
countryShortName: "SK",
|
|
1209
|
+
prefix: "+421",
|
|
1210
|
+
globalMask: "+421(###)###-###",
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
countryShortName: "SL",
|
|
1214
|
+
prefix: "+232",
|
|
1215
|
+
globalMask: "+232-##-######",
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
countryShortName: "SM",
|
|
1219
|
+
prefix: "+378",
|
|
1220
|
+
globalMask: "+378-####-######",
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
countryShortName: "SN",
|
|
1224
|
+
prefix: "+221",
|
|
1225
|
+
globalMask: "+221-##-###-####",
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
countryShortName: "SO",
|
|
1229
|
+
prefix: "+252",
|
|
1230
|
+
globalMask: "+252-##-###-###",
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
countryShortName: "SO",
|
|
1234
|
+
prefix: "+252",
|
|
1235
|
+
globalMask: "+252-#-###-###",
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
countryShortName: "SO",
|
|
1239
|
+
prefix: "+252",
|
|
1240
|
+
globalMask: "+252-#-###-###",
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
countryShortName: "SR",
|
|
1244
|
+
prefix: "+597",
|
|
1245
|
+
globalMask: "+597-###-####",
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
countryShortName: "SR",
|
|
1249
|
+
prefix: "+597",
|
|
1250
|
+
globalMask: "+597-###-###",
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
countryShortName: "SS",
|
|
1254
|
+
prefix: "+211",
|
|
1255
|
+
globalMask: "+211-##-###-####",
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
countryShortName: "ST",
|
|
1259
|
+
prefix: "+239",
|
|
1260
|
+
globalMask: "+239-##-#####",
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
countryShortName: "SV",
|
|
1264
|
+
prefix: "+503",
|
|
1265
|
+
globalMask: "+503-##-##-####",
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
countryShortName: "SX",
|
|
1269
|
+
prefix: "+1721",
|
|
1270
|
+
globalMask: "+1(721)###-####",
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
countryShortName: "SY",
|
|
1274
|
+
prefix: "+963",
|
|
1275
|
+
globalMask: "+963-##-####-###",
|
|
1276
|
+
},
|
|
1277
|
+
{
|
|
1278
|
+
countryShortName: "SZ",
|
|
1279
|
+
prefix: "+268",
|
|
1280
|
+
globalMask: "+268-##-##-####",
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
countryShortName: "TC",
|
|
1284
|
+
prefix: "+1649",
|
|
1285
|
+
globalMask: "+1(649)###-####",
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
countryShortName: "TD",
|
|
1289
|
+
prefix: "+235",
|
|
1290
|
+
globalMask: "+235-##-##-##-##",
|
|
1291
|
+
},
|
|
1292
|
+
{
|
|
1293
|
+
countryShortName: "TG",
|
|
1294
|
+
prefix: "+228",
|
|
1295
|
+
globalMask: "+228-##-###-###",
|
|
1296
|
+
},
|
|
1297
|
+
{
|
|
1298
|
+
countryShortName: "TH",
|
|
1299
|
+
prefix: "+66",
|
|
1300
|
+
globalMask: "+66-##-###-####",
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
countryShortName: "TH",
|
|
1304
|
+
prefix: "+66",
|
|
1305
|
+
globalMask: "+66-##-###-###",
|
|
1306
|
+
},
|
|
1307
|
+
{
|
|
1308
|
+
countryShortName: "TJ",
|
|
1309
|
+
prefix: "+992",
|
|
1310
|
+
globalMask: "+992-##-###-####",
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
countryShortName: "TK",
|
|
1314
|
+
prefix: "+690",
|
|
1315
|
+
globalMask: "+690-####",
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
countryShortName: "TL",
|
|
1319
|
+
prefix: "+670",
|
|
1320
|
+
globalMask: "+670-###-####",
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
countryShortName: "TL",
|
|
1324
|
+
prefix: "+67077",
|
|
1325
|
+
globalMask: "+670-77#-#####",
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
countryShortName: "TL",
|
|
1329
|
+
prefix: "+67078",
|
|
1330
|
+
globalMask: "+670-78#-#####",
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
countryShortName: "TM",
|
|
1334
|
+
prefix: "+993",
|
|
1335
|
+
globalMask: "+993-#-###-####",
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
countryShortName: "TN",
|
|
1339
|
+
prefix: "+216",
|
|
1340
|
+
globalMask: "+216-##-###-###",
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
countryShortName: "TO",
|
|
1344
|
+
prefix: "+676",
|
|
1345
|
+
globalMask: "+676-#####",
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
countryShortName: "TR",
|
|
1349
|
+
prefix: "+90",
|
|
1350
|
+
globalMask: "+90(###)###-####",
|
|
1351
|
+
},
|
|
1352
|
+
{
|
|
1353
|
+
countryShortName: "TT",
|
|
1354
|
+
prefix: "+1868",
|
|
1355
|
+
globalMask: "+1(868)###-####",
|
|
1356
|
+
},
|
|
1357
|
+
{
|
|
1358
|
+
countryShortName: "TV",
|
|
1359
|
+
prefix: "+68890",
|
|
1360
|
+
globalMask: "+688-90####",
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
countryShortName: "TV",
|
|
1364
|
+
prefix: "+6882",
|
|
1365
|
+
globalMask: "+688-2####",
|
|
1366
|
+
},
|
|
1367
|
+
{
|
|
1368
|
+
countryShortName: "TW",
|
|
1369
|
+
prefix: "+886",
|
|
1370
|
+
globalMask: "+886-#-####-####",
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
countryShortName: "TW",
|
|
1374
|
+
prefix: "+886",
|
|
1375
|
+
globalMask: "+886-####-####",
|
|
1376
|
+
},
|
|
1377
|
+
{
|
|
1378
|
+
countryShortName: "TZ",
|
|
1379
|
+
prefix: "+255",
|
|
1380
|
+
globalMask: "+255-##-###-####",
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
countryShortName: "UA",
|
|
1384
|
+
prefix: "+380",
|
|
1385
|
+
globalMask: "+380(##)###-##-##",
|
|
1386
|
+
},
|
|
1387
|
+
{
|
|
1388
|
+
countryShortName: "UG",
|
|
1389
|
+
prefix: "+256",
|
|
1390
|
+
globalMask: "+256(###)###-###",
|
|
1391
|
+
},
|
|
1392
|
+
{
|
|
1393
|
+
countryShortName: "UK",
|
|
1394
|
+
prefix: "+44",
|
|
1395
|
+
globalMask: "+44-##-####-####",
|
|
1396
|
+
},
|
|
1397
|
+
{
|
|
1398
|
+
countryShortName: "UY",
|
|
1399
|
+
prefix: "+598",
|
|
1400
|
+
globalMask: "+598-#-###-##-##",
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
countryShortName: "UZ",
|
|
1404
|
+
prefix: "+998",
|
|
1405
|
+
globalMask: "+998-##-###-####",
|
|
1406
|
+
},
|
|
1407
|
+
{
|
|
1408
|
+
countryShortName: "VA",
|
|
1409
|
+
prefix: "+396698",
|
|
1410
|
+
globalMask: "+39-6-698-#####",
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
countryShortName: "VC",
|
|
1414
|
+
prefix: "+1784",
|
|
1415
|
+
globalMask: "+1(784)###-####",
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
countryShortName: "VE",
|
|
1419
|
+
prefix: "+58",
|
|
1420
|
+
globalMask: "+58(###)###-####",
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
countryShortName: "VG",
|
|
1424
|
+
prefix: "+1284",
|
|
1425
|
+
globalMask: "+1(284)###-####",
|
|
1426
|
+
},
|
|
1427
|
+
{
|
|
1428
|
+
countryShortName: "VI",
|
|
1429
|
+
prefix: "+1340",
|
|
1430
|
+
globalMask: "+1(340)###-####",
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
countryShortName: "VN",
|
|
1434
|
+
prefix: "+84",
|
|
1435
|
+
globalMask: "+84-##-####-###",
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
countryShortName: "VN",
|
|
1439
|
+
prefix: "+84",
|
|
1440
|
+
globalMask: "+84(###)####-###",
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
countryShortName: "VU",
|
|
1444
|
+
prefix: "+678",
|
|
1445
|
+
globalMask: "+678-##-#####",
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
countryShortName: "VU",
|
|
1449
|
+
prefix: "+678",
|
|
1450
|
+
globalMask: "+678-#####",
|
|
1451
|
+
},
|
|
1452
|
+
{
|
|
1453
|
+
countryShortName: "WF",
|
|
1454
|
+
prefix: "+681",
|
|
1455
|
+
globalMask: "+681-##-####",
|
|
1456
|
+
},
|
|
1457
|
+
{
|
|
1458
|
+
countryShortName: "WS",
|
|
1459
|
+
prefix: "+685",
|
|
1460
|
+
globalMask: "+685-##-####",
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
countryShortName: "YE",
|
|
1464
|
+
prefix: "+967",
|
|
1465
|
+
globalMask: "+967-###-###-###",
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
countryShortName: "YE",
|
|
1469
|
+
prefix: "+967",
|
|
1470
|
+
globalMask: "+967-#-###-###",
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
countryShortName: "YE",
|
|
1474
|
+
prefix: "+967",
|
|
1475
|
+
globalMask: "+967-##-###-###",
|
|
1476
|
+
},
|
|
1477
|
+
{
|
|
1478
|
+
countryShortName: "ZA",
|
|
1479
|
+
prefix: "+27",
|
|
1480
|
+
globalMask: "+27-##-###-####",
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
countryShortName: "ZM",
|
|
1484
|
+
prefix: "+260",
|
|
1485
|
+
globalMask: "+260-##-###-####",
|
|
1486
|
+
},
|
|
1487
|
+
{
|
|
1488
|
+
countryShortName: "ZW",
|
|
1489
|
+
prefix: "+263",
|
|
1490
|
+
globalMask: "+263-#-######",
|
|
1491
|
+
},
|
|
1492
|
+
];
|
|
1493
|
+
|
|
1494
|
+
const DefaultPhoneMask = {
|
|
1495
|
+
countryShortName: "IR",
|
|
1496
|
+
prefix: "+98",
|
|
1497
|
+
globalMask: "+00(000)000-0000",
|
|
1498
|
+
};
|
|
1499
|
+
class FormlyFieldInputComponent extends FieldType {
|
|
1500
|
+
mask;
|
|
1501
|
+
unSubscribeAll$ = new Subject();
|
|
1502
|
+
ngAfterViewInit() {
|
|
1503
|
+
this.createInitState();
|
|
1504
|
+
this.onValueChange();
|
|
1505
|
+
}
|
|
1506
|
+
createInitState() {
|
|
1507
|
+
if (this.props.mask === "phone") {
|
|
1508
|
+
this.mask = DefaultPhoneMask.globalMask;
|
|
1509
|
+
this.handlePhoneMask();
|
|
1510
|
+
}
|
|
1511
|
+
else {
|
|
1512
|
+
this.mask = this.props.mask;
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
handlePhoneMask() {
|
|
1516
|
+
this.formControl.valueChanges
|
|
1517
|
+
.pipe(takeUntil(this.unSubscribeAll$), tap((value) => {
|
|
1518
|
+
if (value == "") {
|
|
1519
|
+
// hint: without setTimeout we don't have Ctrl + A -> delete
|
|
1520
|
+
setTimeout(() => {
|
|
1521
|
+
this.mask = DefaultPhoneMask.globalMask;
|
|
1522
|
+
});
|
|
1523
|
+
}
|
|
1524
|
+
else {
|
|
1525
|
+
let mask = this.findAppropriateMask(value);
|
|
1526
|
+
if (mask && this.mask !== mask.globalMask) {
|
|
1527
|
+
this.mask = mask.globalMask?.replace(/#|[1-9]/g, "0");
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
}))
|
|
1531
|
+
.subscribe();
|
|
1532
|
+
}
|
|
1533
|
+
onValueChange() {
|
|
1534
|
+
this.formControl.valueChanges
|
|
1535
|
+
.pipe(takeUntil(this.unSubscribeAll$), debounceTime(300), tap((value) => {
|
|
1536
|
+
if (typeof this.props?.change == "function") {
|
|
1537
|
+
this.props.change(this.field, value);
|
|
1538
|
+
}
|
|
1539
|
+
}))
|
|
1540
|
+
.subscribe();
|
|
1541
|
+
}
|
|
1542
|
+
findAppropriateMask(value) {
|
|
1543
|
+
let newMask = CountryMasks2.filter(item => this.exactEquality(value, item.prefix)).find(item => value.length <= item.globalMask.length);
|
|
1544
|
+
if (newMask)
|
|
1545
|
+
return newMask;
|
|
1546
|
+
return null;
|
|
1547
|
+
}
|
|
1548
|
+
exactEquality(str, prefix) {
|
|
1549
|
+
// hint: replace function removes all characters except numbers to return clean numeric string
|
|
1550
|
+
// hint: index of convince us to match prefix on first index of input value
|
|
1551
|
+
let new_str = str.replace(/[^0-9.]/g, "");
|
|
1552
|
+
let new_prefix = prefix.replace(/[^0-9.]/g, "");
|
|
1553
|
+
return new_str.indexOf(new_prefix) == 0;
|
|
1554
|
+
}
|
|
1555
|
+
changeShowPassword(input) {
|
|
1556
|
+
if (input.type === "password") {
|
|
1557
|
+
input.type = "text";
|
|
1558
|
+
}
|
|
1559
|
+
else {
|
|
1560
|
+
input.type = "password";
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
showPassword(input) {
|
|
1564
|
+
return input.type === "text";
|
|
1565
|
+
}
|
|
1566
|
+
get type() {
|
|
1567
|
+
return this.props.type ?? "text";
|
|
1568
|
+
}
|
|
1569
|
+
get fieldID() {
|
|
1570
|
+
return "control-" + this.field.key;
|
|
1571
|
+
}
|
|
1572
|
+
get status() {
|
|
1573
|
+
return this.formControl.touched && this.formControl.invalid ? "error" : "";
|
|
1574
|
+
}
|
|
1575
|
+
ngOnDestroy() {
|
|
1576
|
+
this.unSubscribeAll$.next();
|
|
1577
|
+
this.unSubscribeAll$.complete();
|
|
1578
|
+
}
|
|
1579
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1580
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormlyFieldInputComponent, selector: "app-formly-field-input", usesInheritance: true, ngImport: i0, template: "<nz-input-group\r\n [nzAddOnAfter]=\"props.nzAddOnAfter\"\r\n [nzAddOnBefore]=\"props.nzAddOnBefore\"\r\n [nzAddOnAfterIcon]=\"props.nzAddOnAfterIcon\"\r\n [nzAddOnBeforeIcon]=\"props.nzAddOnBeforeIcon\"\r\n [nzPrefix]=\"props.nzPrefix\"\r\n [nzSuffix]=\"props.nzSuffix\"\r\n [nzSize]=\"props.nzSize || 'default'\"\r\n>\r\n <input\r\n #input\r\n nz-input\r\n [id]=\"fieldID\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [mask]=\"mask\"\r\n [thousandSeparator]=\"props.thousandSeparator\"\r\n [type]=\"type\"\r\n [nzStatus]=\"status\"\r\n [disabled]=\"props.disabled\"\r\n [readonly]=\"props.readonly\"\r\n [placeholder]=\"props.placeholder\"\r\n [nzBorderless]=\"props.nzBorderless\"\r\n />\r\n <div class=\"show-password\" *ngIf=\"props.type === 'password'\">\r\n <span\r\n nz-icon\r\n nzTheme=\"outline\"\r\n (click)=\"changeShowPassword(input)\"\r\n [nzType]=\"showPassword(input) ? 'eye-invisible' : 'eye'\"\r\n ></span>\r\n </div>\r\n</nz-input-group>\r\n", styles: ["nz-input-group{position:relative}input{border-radius:2px!important;box-shadow:none!important}.show-password{top:6px;z-index:5;right:10px;opacity:.6;cursor:pointer;position:absolute}::ng-deep .ant-input-affix-wrapper-focused,::ng-deep .ant-input-affix-wrapper:focus{box-shadow:none!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.MaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "triggerOnMaskChange"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "directive", type: i5.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i5.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i5.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "directive", type: i3$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i7.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }] });
|
|
1581
|
+
}
|
|
1582
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyFieldInputComponent, decorators: [{
|
|
1583
|
+
type: Component,
|
|
1584
|
+
args: [{ selector: "app-formly-field-input", template: "<nz-input-group\r\n [nzAddOnAfter]=\"props.nzAddOnAfter\"\r\n [nzAddOnBefore]=\"props.nzAddOnBefore\"\r\n [nzAddOnAfterIcon]=\"props.nzAddOnAfterIcon\"\r\n [nzAddOnBeforeIcon]=\"props.nzAddOnBeforeIcon\"\r\n [nzPrefix]=\"props.nzPrefix\"\r\n [nzSuffix]=\"props.nzSuffix\"\r\n [nzSize]=\"props.nzSize || 'default'\"\r\n>\r\n <input\r\n #input\r\n nz-input\r\n [id]=\"fieldID\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [mask]=\"mask\"\r\n [thousandSeparator]=\"props.thousandSeparator\"\r\n [type]=\"type\"\r\n [nzStatus]=\"status\"\r\n [disabled]=\"props.disabled\"\r\n [readonly]=\"props.readonly\"\r\n [placeholder]=\"props.placeholder\"\r\n [nzBorderless]=\"props.nzBorderless\"\r\n />\r\n <div class=\"show-password\" *ngIf=\"props.type === 'password'\">\r\n <span\r\n nz-icon\r\n nzTheme=\"outline\"\r\n (click)=\"changeShowPassword(input)\"\r\n [nzType]=\"showPassword(input) ? 'eye-invisible' : 'eye'\"\r\n ></span>\r\n </div>\r\n</nz-input-group>\r\n", styles: ["nz-input-group{position:relative}input{border-radius:2px!important;box-shadow:none!important}.show-password{top:6px;z-index:5;right:10px;opacity:.6;cursor:pointer;position:absolute}::ng-deep .ant-input-affix-wrapper-focused,::ng-deep .ant-input-affix-wrapper:focus{box-shadow:none!important}\n"] }]
|
|
1585
|
+
}] });
|
|
1586
|
+
|
|
1587
|
+
class FormlyFieldCheckboxComponent extends FieldType {
|
|
1588
|
+
unSubscribeAll$ = new Subject();
|
|
1589
|
+
ngOnInit() {
|
|
1590
|
+
this.formControl.valueChanges
|
|
1591
|
+
.pipe(takeUntil(this.unSubscribeAll$), tap((value) => {
|
|
1592
|
+
if (typeof this.props?.change == "function") {
|
|
1593
|
+
this.props.change(this.field, value);
|
|
1594
|
+
}
|
|
1595
|
+
}))
|
|
1596
|
+
.subscribe();
|
|
1597
|
+
}
|
|
1598
|
+
get fieldID() {
|
|
1599
|
+
return "control-" + this.field.key;
|
|
1600
|
+
}
|
|
1601
|
+
ngOnDestroy() {
|
|
1602
|
+
this.unSubscribeAll$.next();
|
|
1603
|
+
this.unSubscribeAll$.complete();
|
|
1604
|
+
}
|
|
1605
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyFieldCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1606
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormlyFieldCheckboxComponent, selector: "app-formly-field-checkbox", usesInheritance: true, ngImport: i0, template: "<label\r\n nz-checkbox\r\n [nzId]=\"fieldID\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzDisabled]=\"props.disabled\"\r\n>\r\n {{props.label}}\r\n</label>\r\n", styles: ["label{display:flex;font-size:100%;font-weight:600;min-height:30px;width:-moz-fit-content;width:fit-content;align-items:center}label ::ng-deep .ant-checkbox{top:0!important}label ::ng-deep .ant-checkbox-checked:after{visibility:hidden!important}\n"], dependencies: [{ kind: "directive", type: i2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3$2.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }] });
|
|
1607
|
+
}
|
|
1608
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyFieldCheckboxComponent, decorators: [{
|
|
1609
|
+
type: Component,
|
|
1610
|
+
args: [{ selector: "app-formly-field-checkbox", template: "<label\r\n nz-checkbox\r\n [nzId]=\"fieldID\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzDisabled]=\"props.disabled\"\r\n>\r\n {{props.label}}\r\n</label>\r\n", styles: ["label{display:flex;font-size:100%;font-weight:600;min-height:30px;width:-moz-fit-content;width:fit-content;align-items:center}label ::ng-deep .ant-checkbox{top:0!important}label ::ng-deep .ant-checkbox-checked:after{visibility:hidden!important}\n"] }]
|
|
1611
|
+
}] });
|
|
1612
|
+
|
|
1613
|
+
class FormlyButtonComponent extends FieldType {
|
|
1614
|
+
onClick() {
|
|
1615
|
+
if (typeof this.props?.click == "function") {
|
|
1616
|
+
this.props.click();
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1620
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormlyButtonComponent, selector: "app-formly-button", usesInheritance: true, ngImport: i0, template: "<button\r\n nz-button\r\n type=\"button\"\r\n [disabled]=\"props.disabled\"\r\n [nzGhost]=\"props.nzGhost\"\r\n [nzLoading]=\"props.nzLoading\"\r\n [nzShape]=\"props.nzShape\"\r\n [nzSize]=\"props.nzSize\"\r\n [nzType]=\"props.nzType\"\r\n [nzBlock]=\"props.nzBlock\"\r\n [nzDanger]=\"props.nzDanger\"\r\n [ngClass]=\"props.classList\"\r\n (click)=\"onClick()\"\r\n>\r\n {{props.text}}\r\n</button>\r\n", styles: [".ant-btn:after{visibility:hidden!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2$1.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }] });
|
|
1621
|
+
}
|
|
1622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyButtonComponent, decorators: [{
|
|
1623
|
+
type: Component,
|
|
1624
|
+
args: [{ selector: "app-formly-button", template: "<button\r\n nz-button\r\n type=\"button\"\r\n [disabled]=\"props.disabled\"\r\n [nzGhost]=\"props.nzGhost\"\r\n [nzLoading]=\"props.nzLoading\"\r\n [nzShape]=\"props.nzShape\"\r\n [nzSize]=\"props.nzSize\"\r\n [nzType]=\"props.nzType\"\r\n [nzBlock]=\"props.nzBlock\"\r\n [nzDanger]=\"props.nzDanger\"\r\n [ngClass]=\"props.classList\"\r\n (click)=\"onClick()\"\r\n>\r\n {{props.text}}\r\n</button>\r\n", styles: [".ant-btn:after{visibility:hidden!important}\n"] }]
|
|
1625
|
+
}] });
|
|
1626
|
+
|
|
1627
|
+
class FormlyFieldSelectComponent extends FieldType {
|
|
1628
|
+
unSubscribeAll$ = new Subject();
|
|
1629
|
+
ngOnInit() {
|
|
1630
|
+
this.formControl.valueChanges
|
|
1631
|
+
.pipe(takeUntil(this.unSubscribeAll$), tap((value) => {
|
|
1632
|
+
if (typeof this.props?.change == "function") {
|
|
1633
|
+
this.props.change(this.field, value);
|
|
1634
|
+
}
|
|
1635
|
+
}))
|
|
1636
|
+
.subscribe();
|
|
1637
|
+
}
|
|
1638
|
+
get fieldID() {
|
|
1639
|
+
return "control-" + this.field.key;
|
|
1640
|
+
}
|
|
1641
|
+
ngOnDestroy() {
|
|
1642
|
+
this.unSubscribeAll$.next();
|
|
1643
|
+
this.unSubscribeAll$.complete();
|
|
1644
|
+
}
|
|
1645
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyFieldSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1646
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormlyFieldSelectComponent, selector: "app-formly-field-select", usesInheritance: true, ngImport: i0, template: "<nz-select\r\n [nzId]=\"fieldID\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [compareWith]=\"props.compareWith\"\r\n [nzAutoClearSearchValue]=\"props.nzAutoClearSearchValue\"\r\n [nzAllowClear]=\"props.nzAllowClear\"\r\n [nzBorderless]=\"props.nzBorderless\"\r\n [nzOpen]=\"props.nzOpen\"\r\n [nzAutoFocus]=\"props.nzAutoFocus\"\r\n [nzDisabled]=\"props.disabled\"\r\n [nzDropdownClassName]=\"props.nzDropdownClassName\"\r\n [nzDropdownMatchSelectWidth]=\"props.nzDropdownMatchSelectWidth\"\r\n [nzDropdownStyle]=\"props.nzDropdownStyle\"\r\n [nzCustomTemplate]=\"props.nzCustomTemplate\"\r\n [nzServerSearch]=\"props.nzServerSearch\"\r\n [nzFilterOption]=\"props.nzFilterOption\"\r\n [nzMaxMultipleCount]=\"props.nzMaxMultipleCount\"\r\n [nzMode]=\"props.nzMode\"\r\n [nzNotFoundContent]=\"props.nzNotFoundContent\"\r\n [nzPlacement]=\"props.nzPlacement\"\r\n [nzPlaceHolder]=\"props.placeholder\"\r\n [nzShowArrow]=\"props.nzShowArrow\"\r\n [nzShowSearch]=\"props.nzShowSearch\"\r\n [nzSize]=\"props.nzSize\"\r\n [nzStatus]=\"props.nzStatus\"\r\n [nzSuffixIcon]=\"props.nzSuffixIcon\"\r\n [nzRemoveIcon]=\"props.nzRemoveIcon\"\r\n [nzClearIcon]=\"props.nzClearIcon\"\r\n [nzMenuItemSelectedIcon]=\"props.nzMenuItemSelectedIcon\"\r\n [nzTokenSeparators]=\"props.nzTokenSeparators\"\r\n [nzLoading]=\"props.nzLoading || (props.nzLoadingObs | async)\"\r\n [nzMaxTagCount]=\"props.nzMaxTagCount\"\r\n [nzMaxTagPlaceholder]=\"props.nzMaxTagPlaceholder\"\r\n [nzOptionHeightPx]=\"props.nzOptionHeightPx\"\r\n [nzOptionOverflowSize]=\"props.nzOptionOverflowSize\"\r\n [nzSelectOnTab]=\"props.nzSelectOnTab\"\r\n (nzOpenChange)=\"props?.nzOpenChange($event)\"\r\n (nzScrollToBottom)=\"props?.nzScrollToBottom()\"\r\n (nzOnSearch)=\"props?.nzOnSearch($event)\"\r\n>\r\n <nz-option\r\n *ngFor=\"let option of props.nzOptions || (props.nzOptionsObs | async)\"\r\n [nzDisabled]=\"option.disabled\"\r\n [nzLabel]=\"option.label\"\r\n [nzValue]=\"props.objectValue ? option : option.value\"\r\n [nzHide]=\"option.hide\"\r\n [nzCustomContent]=\"!!option.nzCustomContent\"\r\n >\r\n <div [innerHTML]=\"option.nzCustomContent\"></div>\r\n </nz-option>\r\n</nz-select>\r\n\r\n\r\n", styles: ["nz-select{width:100%}::ng-deep .ant-select-selector,::ng-deep .ant-input-number-focused{box-shadow:none!important}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$2.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i4$2.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
|
|
1647
|
+
}
|
|
1648
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyFieldSelectComponent, decorators: [{
|
|
1649
|
+
type: Component,
|
|
1650
|
+
args: [{ selector: "app-formly-field-select", template: "<nz-select\r\n [nzId]=\"fieldID\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [compareWith]=\"props.compareWith\"\r\n [nzAutoClearSearchValue]=\"props.nzAutoClearSearchValue\"\r\n [nzAllowClear]=\"props.nzAllowClear\"\r\n [nzBorderless]=\"props.nzBorderless\"\r\n [nzOpen]=\"props.nzOpen\"\r\n [nzAutoFocus]=\"props.nzAutoFocus\"\r\n [nzDisabled]=\"props.disabled\"\r\n [nzDropdownClassName]=\"props.nzDropdownClassName\"\r\n [nzDropdownMatchSelectWidth]=\"props.nzDropdownMatchSelectWidth\"\r\n [nzDropdownStyle]=\"props.nzDropdownStyle\"\r\n [nzCustomTemplate]=\"props.nzCustomTemplate\"\r\n [nzServerSearch]=\"props.nzServerSearch\"\r\n [nzFilterOption]=\"props.nzFilterOption\"\r\n [nzMaxMultipleCount]=\"props.nzMaxMultipleCount\"\r\n [nzMode]=\"props.nzMode\"\r\n [nzNotFoundContent]=\"props.nzNotFoundContent\"\r\n [nzPlacement]=\"props.nzPlacement\"\r\n [nzPlaceHolder]=\"props.placeholder\"\r\n [nzShowArrow]=\"props.nzShowArrow\"\r\n [nzShowSearch]=\"props.nzShowSearch\"\r\n [nzSize]=\"props.nzSize\"\r\n [nzStatus]=\"props.nzStatus\"\r\n [nzSuffixIcon]=\"props.nzSuffixIcon\"\r\n [nzRemoveIcon]=\"props.nzRemoveIcon\"\r\n [nzClearIcon]=\"props.nzClearIcon\"\r\n [nzMenuItemSelectedIcon]=\"props.nzMenuItemSelectedIcon\"\r\n [nzTokenSeparators]=\"props.nzTokenSeparators\"\r\n [nzLoading]=\"props.nzLoading || (props.nzLoadingObs | async)\"\r\n [nzMaxTagCount]=\"props.nzMaxTagCount\"\r\n [nzMaxTagPlaceholder]=\"props.nzMaxTagPlaceholder\"\r\n [nzOptionHeightPx]=\"props.nzOptionHeightPx\"\r\n [nzOptionOverflowSize]=\"props.nzOptionOverflowSize\"\r\n [nzSelectOnTab]=\"props.nzSelectOnTab\"\r\n (nzOpenChange)=\"props?.nzOpenChange($event)\"\r\n (nzScrollToBottom)=\"props?.nzScrollToBottom()\"\r\n (nzOnSearch)=\"props?.nzOnSearch($event)\"\r\n>\r\n <nz-option\r\n *ngFor=\"let option of props.nzOptions || (props.nzOptionsObs | async)\"\r\n [nzDisabled]=\"option.disabled\"\r\n [nzLabel]=\"option.label\"\r\n [nzValue]=\"props.objectValue ? option : option.value\"\r\n [nzHide]=\"option.hide\"\r\n [nzCustomContent]=\"!!option.nzCustomContent\"\r\n >\r\n <div [innerHTML]=\"option.nzCustomContent\"></div>\r\n </nz-option>\r\n</nz-select>\r\n\r\n\r\n", styles: ["nz-select{width:100%}::ng-deep .ant-select-selector,::ng-deep .ant-input-number-focused{box-shadow:none!important}\n"] }]
|
|
1651
|
+
}] });
|
|
1652
|
+
|
|
1653
|
+
class FormlyFieldSwitchComponent extends FieldType {
|
|
1654
|
+
unSubscribeAll$ = new Subject();
|
|
1655
|
+
ngOnInit() {
|
|
1656
|
+
this.formControl.valueChanges
|
|
1657
|
+
.pipe(takeUntil(this.unSubscribeAll$), tap((value) => {
|
|
1658
|
+
if (typeof this.props?.change == "function") {
|
|
1659
|
+
this.props.change(this.field, value);
|
|
1660
|
+
}
|
|
1661
|
+
}))
|
|
1662
|
+
.subscribe();
|
|
1663
|
+
}
|
|
1664
|
+
onChange(event) {
|
|
1665
|
+
if (typeof this.props?.change === "function") {
|
|
1666
|
+
this.props.change(this.field, event);
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
get fieldID() {
|
|
1670
|
+
return "control-" + this.field.key;
|
|
1671
|
+
}
|
|
1672
|
+
ngOnDestroy() {
|
|
1673
|
+
this.unSubscribeAll$.next();
|
|
1674
|
+
this.unSubscribeAll$.complete();
|
|
1675
|
+
}
|
|
1676
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyFieldSwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1677
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormlyFieldSwitchComponent, selector: "app-formly-field-switch", usesInheritance: true, ngImport: i0, template: "<nz-switch\r\n [nzId]=\"fieldID\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzSize]=\"props.nzSize\"\r\n [nzLoading]=\"props.nzLoading\"\r\n [nzDisabled]=\"props.disabled\"\r\n [nzCheckedChildren]=\"props.nzCheckedChildren\"\r\n [nzUnCheckedChildren]=\"props.nzUnCheckedChildren\"\r\n></nz-switch>\r\n", styles: ["::ng-deep .ant-switch{background:#d9d9d9 none}::ng-deep .ant-switch-checked{background:#1890ff}::ng-deep .ant-switch:focus{box-shadow:none!important}::ng-deep .ant-click-animating-node{box-shadow:none!important}\n"], dependencies: [{ kind: "directive", type: i2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3$3.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }] });
|
|
1678
|
+
}
|
|
1679
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyFieldSwitchComponent, decorators: [{
|
|
1680
|
+
type: Component,
|
|
1681
|
+
args: [{ selector: "app-formly-field-switch", template: "<nz-switch\r\n [nzId]=\"fieldID\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzSize]=\"props.nzSize\"\r\n [nzLoading]=\"props.nzLoading\"\r\n [nzDisabled]=\"props.disabled\"\r\n [nzCheckedChildren]=\"props.nzCheckedChildren\"\r\n [nzUnCheckedChildren]=\"props.nzUnCheckedChildren\"\r\n></nz-switch>\r\n", styles: ["::ng-deep .ant-switch{background:#d9d9d9 none}::ng-deep .ant-switch-checked{background:#1890ff}::ng-deep .ant-switch:focus{box-shadow:none!important}::ng-deep .ant-click-animating-node{box-shadow:none!important}\n"] }]
|
|
1682
|
+
}] });
|
|
1683
|
+
|
|
1684
|
+
class FormlyFieldRadioComponent extends FieldType {
|
|
1685
|
+
unSubscribeAll$ = new Subject();
|
|
1686
|
+
ngOnInit() {
|
|
1687
|
+
this.formControl.valueChanges
|
|
1688
|
+
.pipe(takeUntil(this.unSubscribeAll$), tap((value) => {
|
|
1689
|
+
if (typeof this.props?.change == "function") {
|
|
1690
|
+
this.props.change(this.field, value);
|
|
1691
|
+
}
|
|
1692
|
+
}))
|
|
1693
|
+
.subscribe();
|
|
1694
|
+
}
|
|
1695
|
+
onChange(event) {
|
|
1696
|
+
if (typeof this.props?.change === "function") {
|
|
1697
|
+
this.props.change(this.field, event);
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
get fieldID() {
|
|
1701
|
+
return "control-" + this.field.key;
|
|
1702
|
+
}
|
|
1703
|
+
ngOnDestroy() {
|
|
1704
|
+
this.unSubscribeAll$.next();
|
|
1705
|
+
this.unSubscribeAll$.complete();
|
|
1706
|
+
}
|
|
1707
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyFieldRadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1708
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormlyFieldRadioComponent, selector: "app-formly-field-radio", usesInheritance: true, ngImport: i0, template: "<nz-radio-group\r\n [id]=\"fieldID\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzName]=\"props.nzName\"\r\n [nzDisabled]=\"props.disabled\"\r\n [nzSize]=\"props.nzSize\"\r\n [nzButtonStyle]=\"props.nzButtonStyle\"\r\n>\r\n <ng-container *ngIf=\"props.nzType == 'nz-radio'\">\r\n <label\r\n nz-radio\r\n *ngFor=\"let item of props.nzOptions\"\r\n [nzDisabled]=\"item.disabled\"\r\n [nzValue]=\"item.value\"\r\n >\r\n {{item.label}}\r\n <div [innerHTML]=\"item.nzCustomContent\"></div>\r\n </label>\r\n </ng-container>\r\n <ng-container *ngIf=\"props.nzType == 'nz-radio-button'\">\r\n <label\r\n nz-radio-button\r\n *ngFor=\"let item of props.nzOptions\"\r\n [nzDisabled]=\"item.disabled\"\r\n [nzValue]=\"item.value\"\r\n >\r\n {{item.label}}\r\n <div [innerHTML]=\"item.nzCustomContent\"></div>\r\n </label>\r\n </ng-container>\r\n</nz-radio-group>\r\n", styles: ["::ng-deep .ant-radio-checked:after{display:none!important}::ng-deep .ant-radio-input:focus+.ant-radio-inner{box-shadow:none}::ng-deep .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within{box-shadow:none!important}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$3.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus"], exportAs: ["nzRadio"] }, { kind: "directive", type: i4$3.NzRadioButtonDirective, selector: "[nz-radio-button]" }, { kind: "component", type: i4$3.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }] });
|
|
1709
|
+
}
|
|
1710
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyFieldRadioComponent, decorators: [{
|
|
1711
|
+
type: Component,
|
|
1712
|
+
args: [{ selector: "app-formly-field-radio", template: "<nz-radio-group\r\n [id]=\"fieldID\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzName]=\"props.nzName\"\r\n [nzDisabled]=\"props.disabled\"\r\n [nzSize]=\"props.nzSize\"\r\n [nzButtonStyle]=\"props.nzButtonStyle\"\r\n>\r\n <ng-container *ngIf=\"props.nzType == 'nz-radio'\">\r\n <label\r\n nz-radio\r\n *ngFor=\"let item of props.nzOptions\"\r\n [nzDisabled]=\"item.disabled\"\r\n [nzValue]=\"item.value\"\r\n >\r\n {{item.label}}\r\n <div [innerHTML]=\"item.nzCustomContent\"></div>\r\n </label>\r\n </ng-container>\r\n <ng-container *ngIf=\"props.nzType == 'nz-radio-button'\">\r\n <label\r\n nz-radio-button\r\n *ngFor=\"let item of props.nzOptions\"\r\n [nzDisabled]=\"item.disabled\"\r\n [nzValue]=\"item.value\"\r\n >\r\n {{item.label}}\r\n <div [innerHTML]=\"item.nzCustomContent\"></div>\r\n </label>\r\n </ng-container>\r\n</nz-radio-group>\r\n", styles: ["::ng-deep .ant-radio-checked:after{display:none!important}::ng-deep .ant-radio-input:focus+.ant-radio-inner{box-shadow:none}::ng-deep .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within{box-shadow:none!important}\n"] }]
|
|
1713
|
+
}] });
|
|
1714
|
+
|
|
1715
|
+
class FormlyLabelWrapperComponent extends FieldWrapper {
|
|
1716
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyLabelWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1717
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormlyLabelWrapperComponent, selector: "app-formly-label-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"top-label\" *ngIf=\"props.labelPosition == 'Top'\">\r\n <ng-container *ngTemplateOutlet=\"Label\"></ng-container>\r\n <ng-container #fieldComponent></ng-container>\r\n</div>\r\n\r\n<div class=\"top-label\" *ngIf=\"props.labelPosition == 'Left'\">\r\n <div class=\"field-wrapper\">\r\n <div class=\"left-label\" [ngStyle]=\"{ width: props.styles?.labelWidth }\">\r\n <ng-container *ngTemplateOutlet=\"Label\"></ng-container>\r\n </div>\r\n\r\n <div class=\"flex-grow-1\">\r\n <ng-container #fieldComponent></ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #Label>\r\n <label [ngClass]=\"props.styles?.labelClass\">\r\n {{ props.label || (props.labelObs | async) }}\r\n <span class=\"colon\" *ngIf=\"props.labelPosition == 'Left'\">:</span>\r\n <span class=\"required\" *ngIf=\"props.required\">*</span>\r\n </label>\r\n</ng-template>\r\n", styles: [".field-wrapper{display:flex;align-items:center}@media (max-width: 500px){.field-wrapper{flex-direction:column;align-items:initial}}.top-label label{font-size:75%;font-weight:500}.left-label label{font-size:100%;font-weight:600;position:relative;padding-right:5px}label .colon{position:relative;left:-2px}label .required{color:#f10232;position:relative;right:0;top:2px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
|
|
1718
|
+
}
|
|
1719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyLabelWrapperComponent, decorators: [{
|
|
1720
|
+
type: Component,
|
|
1721
|
+
args: [{ selector: "app-formly-label-wrapper", template: "<div class=\"top-label\" *ngIf=\"props.labelPosition == 'Top'\">\r\n <ng-container *ngTemplateOutlet=\"Label\"></ng-container>\r\n <ng-container #fieldComponent></ng-container>\r\n</div>\r\n\r\n<div class=\"top-label\" *ngIf=\"props.labelPosition == 'Left'\">\r\n <div class=\"field-wrapper\">\r\n <div class=\"left-label\" [ngStyle]=\"{ width: props.styles?.labelWidth }\">\r\n <ng-container *ngTemplateOutlet=\"Label\"></ng-container>\r\n </div>\r\n\r\n <div class=\"flex-grow-1\">\r\n <ng-container #fieldComponent></ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #Label>\r\n <label [ngClass]=\"props.styles?.labelClass\">\r\n {{ props.label || (props.labelObs | async) }}\r\n <span class=\"colon\" *ngIf=\"props.labelPosition == 'Left'\">:</span>\r\n <span class=\"required\" *ngIf=\"props.required\">*</span>\r\n </label>\r\n</ng-template>\r\n", styles: [".field-wrapper{display:flex;align-items:center}@media (max-width: 500px){.field-wrapper{flex-direction:column;align-items:initial}}.top-label label{font-size:75%;font-weight:500}.left-label label{font-size:100%;font-weight:600;position:relative;padding-right:5px}label .colon{position:relative;left:-2px}label .required{color:#f10232;position:relative;right:0;top:2px}\n"] }]
|
|
1722
|
+
}] });
|
|
1723
|
+
|
|
1724
|
+
class FormlyDefaultWrapperComponent extends FieldWrapper {
|
|
1725
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyDefaultWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1726
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormlyDefaultWrapperComponent, selector: "app-formly-default-wrapper", usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"position-relative\"\r\n [classList]=\"props.styles?.wrapperClass\"\r\n [id]=\"'wrapper-' + field.key\"\r\n *ngIf=\"!props.hidden\"\r\n>\r\n <ng-container #fieldComponent></ng-container>\r\n <div\r\n class=\"error-message\"\r\n *ngIf=\"formControl.touched && formControl.invalid\"\r\n [@myAnimation]=\"formControl.touched && formControl.invalid\"\r\n [ngStyle]=\"{ 'margin-left': props.labelPosition === 'Left' ? props.styles?.labelWidth ?? '0' : '0' }\"\r\n >\r\n <span nz-icon nzType=\"info-circle\" nzTheme=\"outline\"></span>\r\n <formly-validation-message [field]=\"field\"></formly-validation-message>\r\n </div>\r\n</div>\r\n", styles: [".error-message{left:0;gap:6px;bottom:0;height:0;display:flex;color:#f10232;font-size:85%;font-weight:500;position:relative;align-items:flex-start}.error-message span{position:relative;top:4px}@media (max-width: 500px){.error-message{margin:0!important}}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "directive", type: i3$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i7.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], animations: [
|
|
1727
|
+
trigger("myAnimation", [
|
|
1728
|
+
transition(":enter", [
|
|
1729
|
+
style({ bottom: "4px", opacity: 0 }),
|
|
1730
|
+
animate("100ms", style({ bottom: "0px", opacity: 1 })),
|
|
1731
|
+
]),
|
|
1732
|
+
transition(":leave", [
|
|
1733
|
+
style({ bottom: "0px", opacity: 1 }),
|
|
1734
|
+
animate("100ms", style({ bottom: "4px", opacity: 0 })),
|
|
1735
|
+
]),
|
|
1736
|
+
]),
|
|
1737
|
+
] });
|
|
1738
|
+
}
|
|
1739
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormlyDefaultWrapperComponent, decorators: [{
|
|
1740
|
+
type: Component,
|
|
1741
|
+
args: [{ selector: "app-formly-default-wrapper", animations: [
|
|
1742
|
+
trigger("myAnimation", [
|
|
1743
|
+
transition(":enter", [
|
|
1744
|
+
style({ bottom: "4px", opacity: 0 }),
|
|
1745
|
+
animate("100ms", style({ bottom: "0px", opacity: 1 })),
|
|
1746
|
+
]),
|
|
1747
|
+
transition(":leave", [
|
|
1748
|
+
style({ bottom: "0px", opacity: 1 }),
|
|
1749
|
+
animate("100ms", style({ bottom: "4px", opacity: 0 })),
|
|
1750
|
+
]),
|
|
1751
|
+
]),
|
|
1752
|
+
], template: "<div\r\n class=\"position-relative\"\r\n [classList]=\"props.styles?.wrapperClass\"\r\n [id]=\"'wrapper-' + field.key\"\r\n *ngIf=\"!props.hidden\"\r\n>\r\n <ng-container #fieldComponent></ng-container>\r\n <div\r\n class=\"error-message\"\r\n *ngIf=\"formControl.touched && formControl.invalid\"\r\n [@myAnimation]=\"formControl.touched && formControl.invalid\"\r\n [ngStyle]=\"{ 'margin-left': props.labelPosition === 'Left' ? props.styles?.labelWidth ?? '0' : '0' }\"\r\n >\r\n <span nz-icon nzType=\"info-circle\" nzTheme=\"outline\"></span>\r\n <formly-validation-message [field]=\"field\"></formly-validation-message>\r\n </div>\r\n</div>\r\n", styles: [".error-message{left:0;gap:6px;bottom:0;height:0;display:flex;color:#f10232;font-size:85%;font-weight:500;position:relative;align-items:flex-start}.error-message span{position:relative;top:4px}@media (max-width: 500px){.error-message{margin:0!important}}\n"] }]
|
|
1753
|
+
}] });
|
|
1754
|
+
|
|
1755
|
+
function minLengthValidator(control, field) {
|
|
1756
|
+
if (field.props?.minLen)
|
|
1757
|
+
return control.value?.length < field.props?.minLen
|
|
1758
|
+
? { minLen: true }
|
|
1759
|
+
: null;
|
|
1760
|
+
return null;
|
|
1761
|
+
}
|
|
1762
|
+
function minLengthMessage(field) {
|
|
1763
|
+
return `Field must be at least ${field.props?.minLen} characters`;
|
|
1764
|
+
}
|
|
1765
|
+
function maxLengthValidator(control, field) {
|
|
1766
|
+
if (field.props?.maxLen)
|
|
1767
|
+
return control.value?.length > field.props?.maxLen
|
|
1768
|
+
? { maxLen: true }
|
|
1769
|
+
: null;
|
|
1770
|
+
return null;
|
|
1771
|
+
}
|
|
1772
|
+
function maxLengthMessage(field) {
|
|
1773
|
+
return `Field must be at most ${field.props?.maxLen} characters`;
|
|
1774
|
+
}
|
|
1775
|
+
function minValueValidator(control, field) {
|
|
1776
|
+
if (field.props?.minValue && control.value != null)
|
|
1777
|
+
return Number(control.value) < field.props.minValue
|
|
1778
|
+
? { minValue: false }
|
|
1779
|
+
: null;
|
|
1780
|
+
return null;
|
|
1781
|
+
}
|
|
1782
|
+
function minValueMessage(field) {
|
|
1783
|
+
return `Field value must be more than ${field.props?.minValue}`;
|
|
1784
|
+
}
|
|
1785
|
+
function maxValueValidator(control, field) {
|
|
1786
|
+
if (field.props?.maxValue && control.value != null)
|
|
1787
|
+
return Number(control.value) > field.props.maxValue
|
|
1788
|
+
? { maxValue: true }
|
|
1789
|
+
: null;
|
|
1790
|
+
return null;
|
|
1791
|
+
}
|
|
1792
|
+
function maxValueMessage(field) {
|
|
1793
|
+
return `Field value must be less than ${field.props?.maxValue}`;
|
|
1794
|
+
}
|
|
1795
|
+
function emailValidator(control) {
|
|
1796
|
+
let REGEX = /^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/;
|
|
1797
|
+
return REGEX.test(control.value) ? null : { email: true };
|
|
1798
|
+
}
|
|
1799
|
+
function passwordValidator(control, field) {
|
|
1800
|
+
if (field.props?.type === "password") {
|
|
1801
|
+
let REGEX = /^(?=.*[A-Z])(?=.*\d)(?=.*[\W_])[A-Za-z\d\W_]{8,}$/;
|
|
1802
|
+
return REGEX.test(control.value) ? null : { password: true };
|
|
1803
|
+
}
|
|
1804
|
+
return null;
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
const FormlyForRoot = {
|
|
1808
|
+
types: [
|
|
1809
|
+
{
|
|
1810
|
+
name: "input",
|
|
1811
|
+
component: FormlyFieldInputComponent,
|
|
1812
|
+
wrappers: ["default-wrapper", "label-wrapper"],
|
|
1813
|
+
defaultOptions: {
|
|
1814
|
+
props: {
|
|
1815
|
+
nzSize: "default",
|
|
1816
|
+
labelPosition: "Left",
|
|
1817
|
+
mask: "",
|
|
1818
|
+
thousandSeparator: "",
|
|
1819
|
+
},
|
|
1820
|
+
},
|
|
1821
|
+
},
|
|
1822
|
+
{
|
|
1823
|
+
name: "checkbox",
|
|
1824
|
+
component: FormlyFieldCheckboxComponent,
|
|
1825
|
+
wrappers: [],
|
|
1826
|
+
defaultOptions: {
|
|
1827
|
+
props: {
|
|
1828
|
+
disabled: false,
|
|
1829
|
+
nzAutoFocus: false,
|
|
1830
|
+
},
|
|
1831
|
+
},
|
|
1832
|
+
},
|
|
1833
|
+
{
|
|
1834
|
+
name: "switch",
|
|
1835
|
+
component: FormlyFieldSwitchComponent,
|
|
1836
|
+
wrappers: ["default-wrapper", "label-wrapper"],
|
|
1837
|
+
defaultOptions: {
|
|
1838
|
+
props: {
|
|
1839
|
+
labelPosition: "Left",
|
|
1840
|
+
disabled: false,
|
|
1841
|
+
nzSize: "default",
|
|
1842
|
+
nzLoading: false,
|
|
1843
|
+
},
|
|
1844
|
+
},
|
|
1845
|
+
},
|
|
1846
|
+
{
|
|
1847
|
+
name: "radio",
|
|
1848
|
+
component: FormlyFieldRadioComponent,
|
|
1849
|
+
wrappers: ["default-wrapper", "label-wrapper"],
|
|
1850
|
+
defaultOptions: {
|
|
1851
|
+
props: {
|
|
1852
|
+
labelPosition: "Left",
|
|
1853
|
+
disabled: false,
|
|
1854
|
+
nzSize: "default",
|
|
1855
|
+
nzType: "nz-radio",
|
|
1856
|
+
},
|
|
1857
|
+
},
|
|
1858
|
+
},
|
|
1859
|
+
{
|
|
1860
|
+
name: "select",
|
|
1861
|
+
component: FormlyFieldSelectComponent,
|
|
1862
|
+
wrappers: ["default-wrapper", "label-wrapper"],
|
|
1863
|
+
defaultOptions: {
|
|
1864
|
+
props: {
|
|
1865
|
+
objectValue: false,
|
|
1866
|
+
labelPosition: "Left",
|
|
1867
|
+
compareWith: (o1, o2) => o1 === o2,
|
|
1868
|
+
nzAutoClearSearchValue: true,
|
|
1869
|
+
nzAllowClear: false,
|
|
1870
|
+
nzBorderless: false,
|
|
1871
|
+
nzOpen: false,
|
|
1872
|
+
nzAutoFocus: false,
|
|
1873
|
+
disabled: false,
|
|
1874
|
+
nzDropdownMatchSelectWidth: true,
|
|
1875
|
+
nzServerSearch: false,
|
|
1876
|
+
nzMaxMultipleCount: Infinity,
|
|
1877
|
+
nzMode: "default",
|
|
1878
|
+
nzNotFoundContent: "Not Found",
|
|
1879
|
+
nzShowSearch: false,
|
|
1880
|
+
nzSize: "default",
|
|
1881
|
+
nzTokenSeparators: [],
|
|
1882
|
+
nzLoading: false,
|
|
1883
|
+
nzOptionHeightPx: 32,
|
|
1884
|
+
nzOptionOverflowSize: 8,
|
|
1885
|
+
nzSelectOnTab: false,
|
|
1886
|
+
},
|
|
1887
|
+
},
|
|
1888
|
+
},
|
|
1889
|
+
{
|
|
1890
|
+
name: "button",
|
|
1891
|
+
component: FormlyButtonComponent,
|
|
1892
|
+
wrappers: ["default-wrapper"],
|
|
1893
|
+
defaultOptions: {
|
|
1894
|
+
props: {
|
|
1895
|
+
text: "",
|
|
1896
|
+
disabled: false,
|
|
1897
|
+
nzGhost: false,
|
|
1898
|
+
nzLoading: false,
|
|
1899
|
+
nzSize: "default",
|
|
1900
|
+
nzBlock: false,
|
|
1901
|
+
nzDanger: false,
|
|
1902
|
+
classList: "",
|
|
1903
|
+
},
|
|
1904
|
+
},
|
|
1905
|
+
},
|
|
1906
|
+
],
|
|
1907
|
+
wrappers: [
|
|
1908
|
+
{
|
|
1909
|
+
name: "default-wrapper",
|
|
1910
|
+
component: FormlyDefaultWrapperComponent,
|
|
1911
|
+
},
|
|
1912
|
+
{
|
|
1913
|
+
name: "label-wrapper",
|
|
1914
|
+
component: FormlyLabelWrapperComponent,
|
|
1915
|
+
},
|
|
1916
|
+
],
|
|
1917
|
+
validators: [
|
|
1918
|
+
{
|
|
1919
|
+
name: "required",
|
|
1920
|
+
validation: () => RequiredValidator,
|
|
1921
|
+
},
|
|
1922
|
+
{
|
|
1923
|
+
name: "minLen",
|
|
1924
|
+
validation: (c, f) => minLengthValidator(c, f),
|
|
1925
|
+
},
|
|
1926
|
+
{
|
|
1927
|
+
name: "maxLen",
|
|
1928
|
+
validation: (c, f) => maxLengthValidator(c, f),
|
|
1929
|
+
},
|
|
1930
|
+
{
|
|
1931
|
+
name: "minValue",
|
|
1932
|
+
validation: (c, f) => minValueValidator(c, f),
|
|
1933
|
+
},
|
|
1934
|
+
{
|
|
1935
|
+
name: "maxValue",
|
|
1936
|
+
validation: (c, f) => maxValueValidator(c, f),
|
|
1937
|
+
},
|
|
1938
|
+
{
|
|
1939
|
+
name: "email",
|
|
1940
|
+
validation: (c) => emailValidator(c),
|
|
1941
|
+
},
|
|
1942
|
+
{
|
|
1943
|
+
name: "password",
|
|
1944
|
+
validation: (c, f) => passwordValidator(c, f),
|
|
1945
|
+
},
|
|
1946
|
+
],
|
|
1947
|
+
validationMessages: [
|
|
1948
|
+
{
|
|
1949
|
+
name: "required",
|
|
1950
|
+
message: "This field is required",
|
|
1951
|
+
},
|
|
1952
|
+
{
|
|
1953
|
+
name: "minLen",
|
|
1954
|
+
message: (err, f) => minLengthMessage(f),
|
|
1955
|
+
},
|
|
1956
|
+
{
|
|
1957
|
+
name: "maxLen",
|
|
1958
|
+
message: (err, f) => maxLengthMessage(f),
|
|
1959
|
+
},
|
|
1960
|
+
{
|
|
1961
|
+
name: "minValue",
|
|
1962
|
+
message: (err, f) => minValueMessage(f),
|
|
1963
|
+
},
|
|
1964
|
+
{
|
|
1965
|
+
name: "maxValue",
|
|
1966
|
+
message: (err, f) => maxValueMessage(f),
|
|
1967
|
+
},
|
|
1968
|
+
{
|
|
1969
|
+
name: "email",
|
|
1970
|
+
message: "Email format is not correct",
|
|
1971
|
+
},
|
|
1972
|
+
{
|
|
1973
|
+
name: "password",
|
|
1974
|
+
message: "Password should be at least 8 characters, including one capital letter, one number and one special character",
|
|
1975
|
+
},
|
|
1976
|
+
{
|
|
1977
|
+
name: "mask",
|
|
1978
|
+
message: "Invalid data",
|
|
1979
|
+
},
|
|
1980
|
+
],
|
|
1981
|
+
};
|
|
1982
|
+
class NgxNzFormlyModule {
|
|
1983
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgxNzFormlyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1984
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: NgxNzFormlyModule, declarations: [FormlyFieldInputComponent,
|
|
1985
|
+
FormlyFieldCheckboxComponent,
|
|
1986
|
+
FormlyFieldSwitchComponent,
|
|
1987
|
+
FormlyFieldSelectComponent,
|
|
1988
|
+
FormlyButtonComponent,
|
|
1989
|
+
FormlyFieldRadioComponent,
|
|
1990
|
+
FormlyLabelWrapperComponent,
|
|
1991
|
+
FormlyDefaultWrapperComponent], imports: [CommonModule,
|
|
1992
|
+
FormlyModule,
|
|
1993
|
+
ReactiveFormsModule,
|
|
1994
|
+
NgxMaskModule,
|
|
1995
|
+
NzInputModule,
|
|
1996
|
+
NzButtonModule,
|
|
1997
|
+
NzIconModule,
|
|
1998
|
+
NzCheckboxModule,
|
|
1999
|
+
NzSwitchModule,
|
|
2000
|
+
NzInputNumberModule,
|
|
2001
|
+
NzSelectModule,
|
|
2002
|
+
NzRadioModule] });
|
|
2003
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgxNzFormlyModule, imports: [CommonModule,
|
|
2004
|
+
FormlyModule,
|
|
2005
|
+
ReactiveFormsModule,
|
|
2006
|
+
NgxMaskModule,
|
|
2007
|
+
NzInputModule,
|
|
2008
|
+
NzButtonModule,
|
|
2009
|
+
NzIconModule,
|
|
2010
|
+
NzCheckboxModule,
|
|
2011
|
+
NzSwitchModule,
|
|
2012
|
+
NzInputNumberModule,
|
|
2013
|
+
NzSelectModule,
|
|
2014
|
+
NzRadioModule] });
|
|
2015
|
+
}
|
|
2016
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgxNzFormlyModule, decorators: [{
|
|
2017
|
+
type: NgModule,
|
|
2018
|
+
args: [{
|
|
2019
|
+
declarations: [
|
|
2020
|
+
FormlyFieldInputComponent,
|
|
2021
|
+
FormlyFieldCheckboxComponent,
|
|
2022
|
+
FormlyFieldSwitchComponent,
|
|
2023
|
+
FormlyFieldSelectComponent,
|
|
2024
|
+
FormlyButtonComponent,
|
|
2025
|
+
FormlyFieldRadioComponent,
|
|
2026
|
+
FormlyLabelWrapperComponent,
|
|
2027
|
+
FormlyDefaultWrapperComponent
|
|
2028
|
+
],
|
|
2029
|
+
imports: [
|
|
2030
|
+
CommonModule,
|
|
2031
|
+
FormlyModule,
|
|
2032
|
+
ReactiveFormsModule,
|
|
2033
|
+
NgxMaskModule,
|
|
2034
|
+
NzInputModule,
|
|
2035
|
+
NzButtonModule,
|
|
2036
|
+
NzIconModule,
|
|
2037
|
+
NzCheckboxModule,
|
|
2038
|
+
NzSwitchModule,
|
|
2039
|
+
NzInputNumberModule,
|
|
2040
|
+
NzSelectModule,
|
|
2041
|
+
NzRadioModule,
|
|
2042
|
+
],
|
|
2043
|
+
exports: [],
|
|
2044
|
+
}]
|
|
2045
|
+
}] });
|
|
2046
|
+
|
|
2047
|
+
var InputMask;
|
|
2048
|
+
(function (InputMask) {
|
|
2049
|
+
InputMask["PHONE"] = "phone";
|
|
2050
|
+
})(InputMask || (InputMask = {}));
|
|
2051
|
+
|
|
2052
|
+
class FormlyFieldBuilder {
|
|
2053
|
+
input(key, configOverrides) {
|
|
2054
|
+
return {
|
|
2055
|
+
key,
|
|
2056
|
+
type: "input",
|
|
2057
|
+
...configOverrides,
|
|
2058
|
+
};
|
|
2059
|
+
}
|
|
2060
|
+
checkbox(key, configOverrides) {
|
|
2061
|
+
return {
|
|
2062
|
+
key,
|
|
2063
|
+
type: "checkbox",
|
|
2064
|
+
...configOverrides,
|
|
2065
|
+
};
|
|
2066
|
+
}
|
|
2067
|
+
switch(key, configOverrides) {
|
|
2068
|
+
return {
|
|
2069
|
+
key,
|
|
2070
|
+
type: "switch",
|
|
2071
|
+
...configOverrides,
|
|
2072
|
+
};
|
|
2073
|
+
}
|
|
2074
|
+
radio(key, configOverrides) {
|
|
2075
|
+
return {
|
|
2076
|
+
key,
|
|
2077
|
+
type: "radio",
|
|
2078
|
+
...configOverrides,
|
|
2079
|
+
};
|
|
2080
|
+
}
|
|
2081
|
+
select(key, configOverrides) {
|
|
2082
|
+
return {
|
|
2083
|
+
key,
|
|
2084
|
+
type: "select",
|
|
2085
|
+
...configOverrides,
|
|
2086
|
+
};
|
|
2087
|
+
}
|
|
2088
|
+
button(configOverrides) {
|
|
2089
|
+
return {
|
|
2090
|
+
type: "button",
|
|
2091
|
+
...configOverrides,
|
|
2092
|
+
};
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
/**
|
|
2097
|
+
* Generated bundle index. Do not edit.
|
|
2098
|
+
*/
|
|
2099
|
+
|
|
2100
|
+
export { FormlyFieldBuilder, FormlyForRoot, NgxNzFormlyModule, emailValidator, maxLengthMessage, maxLengthValidator, maxValueMessage, maxValueValidator, minLengthMessage, minLengthValidator, minValueMessage, minValueValidator, passwordValidator };
|
|
2101
|
+
//# sourceMappingURL=ngx-nz-formly.mjs.map
|