ngx-nz-formly 0.0.11 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/fesm2022/ngx-nz-formly.mjs +1475 -1330
  2. package/fesm2022/ngx-nz-formly.mjs.map +1 -1
  3. package/ngx-nz-formly.min.css +1 -0
  4. package/package.json +16 -11
  5. package/types/ngx-nz-formly.d.ts +330 -0
  6. package/README.md +0 -400
  7. package/esm2022/index.mjs +0 -5
  8. package/esm2022/lib/components/nz-formly-button/nz-formly-button.component.mjs +0 -21
  9. package/esm2022/lib/components/nz-formly-field-checkbox/nz-formly-field-checkbox.component.mjs +0 -39
  10. package/esm2022/lib/components/nz-formly-field-input/nz-formly-field-input.component.mjs +0 -107
  11. package/esm2022/lib/components/nz-formly-field-input/phone-mask.config.mjs +0 -1463
  12. package/esm2022/lib/components/nz-formly-field-radio/nz-formly-field-radio.component.mjs +0 -40
  13. package/esm2022/lib/components/nz-formly-field-select/nz-formly-field-select.component.mjs +0 -40
  14. package/esm2022/lib/components/nz-formly-field-slider/nz-formly-field-slider.component.mjs +0 -39
  15. package/esm2022/lib/components/nz-formly-field-switch/nz-formly-field-switch.component.mjs +0 -39
  16. package/esm2022/lib/components/nz-formly-field-textarea/nz-formly-field-textarea.component.mjs +0 -39
  17. package/esm2022/lib/ngx-nz-formly-props.model.mjs +0 -6
  18. package/esm2022/lib/ngx-nz-formly-type-safe.model.mjs +0 -58
  19. package/esm2022/lib/ngx-nz-formly-validators.mjs +0 -52
  20. package/esm2022/lib/ngx-nz-formly.module.mjs +0 -315
  21. package/esm2022/lib/wrappers/nz-formly-default-wrapper/nz-formly-default-wrapper.component.mjs +0 -14
  22. package/esm2022/lib/wrappers/nz-formly-label-wrapper/nz-formly-label-wrapper.component.mjs +0 -13
  23. package/esm2022/ngx-nz-formly.mjs +0 -5
  24. package/index.d.ts +0 -4
  25. package/lib/components/nz-formly-button/nz-formly-button.component.d.ts +0 -8
  26. package/lib/components/nz-formly-field-checkbox/nz-formly-field-checkbox.component.d.ts +0 -14
  27. package/lib/components/nz-formly-field-input/nz-formly-field-input.component.d.ts +0 -24
  28. package/lib/components/nz-formly-field-input/phone-mask.config.d.ts +0 -11
  29. package/lib/components/nz-formly-field-radio/nz-formly-field-radio.component.d.ts +0 -14
  30. package/lib/components/nz-formly-field-select/nz-formly-field-select.component.d.ts +0 -14
  31. package/lib/components/nz-formly-field-slider/nz-formly-field-slider.component.d.ts +0 -14
  32. package/lib/components/nz-formly-field-switch/nz-formly-field-switch.component.d.ts +0 -14
  33. package/lib/components/nz-formly-field-textarea/nz-formly-field-textarea.component.d.ts +0 -14
  34. package/lib/ngx-nz-formly-props.model.d.ts +0 -164
  35. package/lib/ngx-nz-formly-type-safe.model.d.ts +0 -20
  36. package/lib/ngx-nz-formly-validators.d.ts +0 -16
  37. package/lib/ngx-nz-formly.module.d.ts +0 -2
  38. package/lib/wrappers/nz-formly-default-wrapper/nz-formly-default-wrapper.component.d.ts +0 -7
  39. package/lib/wrappers/nz-formly-label-wrapper/nz-formly-label-wrapper.component.d.ts +0 -7
@@ -1,1522 +1,1742 @@
1
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';
2
+ import { Injectable, NgModule, Component, inject, DestroyRef, makeEnvironmentProviders, importProvidersFrom, provideAppInitializer } from '@angular/core';
3
+ import * as i2$1 from '@ngx-formly/core';
4
+ import { FormlyModule, FieldType, FieldWrapper } from '@ngx-formly/core';
5
+ import * as i1$1 from '@angular/forms';
6
+ import { ReactiveFormsModule, RequiredValidator } from '@angular/forms';
6
7
  import * as i1 from '@angular/common';
7
8
  import { CommonModule } from '@angular/common';
8
- import * as i2$1 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';
9
+ import * as i2 from 'ng-zorro-antd/button';
10
+ import { NzButtonModule } from 'ng-zorro-antd/button';
11
+ import * as i3 from 'ng-zorro-antd/core/transition-patch';
12
+ import * as i4 from 'ng-zorro-antd/core/wave';
13
+ import * as i3$1 from 'ng-zorro-antd/checkbox';
14
+ import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
15
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
16
+ import { tap } from 'rxjs';
17
+ import * as i1$2 from '@angular/cdk/bidi';
18
+ import { BidiModule } from '@angular/cdk/bidi';
19
+ import * as i4$1 from 'ng-zorro-antd/date-picker';
20
+ import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
21
+ import { NZ_DATE_LOCALE, fa_IR, NZ_I18N } from 'ng-zorro-antd/i18n';
22
+ import * as i3$2 from 'ng-zorro-antd/input';
13
23
  import { NzInputModule } from 'ng-zorro-antd/input';
14
- import * as i6 from 'ng-zorro-antd/core/transition-patch';
15
- import * as i7 from 'ng-zorro-antd/icon';
24
+ import * as i4$2 from 'ng-zorro-antd/icon';
16
25
  import { NzIconModule } from 'ng-zorro-antd/icon';
17
- import * as i3 from 'ng-zorro-antd/checkbox';
18
- import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
19
- import * as i2$2 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$1 from 'ng-zorro-antd/switch';
25
- import { NzSwitchModule } from 'ng-zorro-antd/switch';
26
- import * as i4$3 from 'ng-zorro-antd/radio';
26
+ import { NgxMaskDirective } from 'ngx-mask';
27
+ import * as i3$3 from 'ng-zorro-antd/radio';
27
28
  import { NzRadioModule } from 'ng-zorro-antd/radio';
28
- import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
29
- import * as i3$2 from 'ng-zorro-antd/slider';
29
+ import * as i3$4 from 'ng-zorro-antd/select';
30
+ import { NzSelectModule } from 'ng-zorro-antd/select';
31
+ import * as i3$5 from 'ng-zorro-antd/slider';
30
32
  import { NzSliderModule } from 'ng-zorro-antd/slider';
33
+ import * as i3$6 from 'ng-zorro-antd/switch';
34
+ import { NzSwitchModule } from 'ng-zorro-antd/switch';
35
+ import * as i1$3 from 'ng-zorro-antd/upload';
36
+ import { NzUploadModule } from 'ng-zorro-antd/upload';
37
+ import { faIR } from 'date-fns-jalali/locale';
38
+ import { CandyDate } from 'ng-zorro-antd/core/time';
39
+ import { getYear, getMonth, getDate, setDate } from 'date-fns-jalali';
40
+
41
+ class NzFormlyFieldBuilder {
42
+ input(key, configOverrides) {
43
+ return {
44
+ key,
45
+ type: 'input',
46
+ ...configOverrides
47
+ };
48
+ }
49
+ textarea(key, configOverrides) {
50
+ return {
51
+ key,
52
+ type: 'textarea',
53
+ ...configOverrides
54
+ };
55
+ }
56
+ checkbox(key, configOverrides) {
57
+ return {
58
+ key,
59
+ type: 'checkbox',
60
+ ...configOverrides
61
+ };
62
+ }
63
+ switch(key, configOverrides) {
64
+ return {
65
+ key,
66
+ type: 'switch',
67
+ ...configOverrides
68
+ };
69
+ }
70
+ radio(key, configOverrides) {
71
+ return {
72
+ key,
73
+ type: 'radio',
74
+ ...configOverrides
75
+ };
76
+ }
77
+ select(key, configOverrides) {
78
+ return {
79
+ key,
80
+ type: 'select',
81
+ ...configOverrides
82
+ };
83
+ }
84
+ slider(key, configOverrides) {
85
+ return {
86
+ key,
87
+ type: 'slider',
88
+ ...configOverrides
89
+ };
90
+ }
91
+ button(configOverrides) {
92
+ return {
93
+ type: 'button',
94
+ ...configOverrides
95
+ };
96
+ }
97
+ uploader(configOverrides) {
98
+ return {
99
+ type: 'uploader',
100
+ ...configOverrides
101
+ };
102
+ }
103
+ datePicker(key, configOverrides) {
104
+ return {
105
+ key,
106
+ type: 'datePicker',
107
+ ...configOverrides
108
+ };
109
+ }
110
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
111
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldBuilder }); }
112
+ }
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldBuilder, decorators: [{
114
+ type: Injectable
115
+ }] });
116
+
117
+ /**
118
+ * Back-compat shim for NgModule-based consumers. The field types/wrappers are
119
+ * now standalone components resolved by Formly at runtime, so this module only
120
+ * provides the builder and re-exports FormlyModule. Existing setups that import
121
+ * NgxNzFormlyModule and call `FormlyModule.forRoot(NzFormlyForRoot)` keep
122
+ * working. New apps should prefer `provideNgxNzFormly()`.
123
+ */
124
+ class NgxNzFormlyModule {
125
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NgxNzFormlyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
126
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.18", ngImport: i0, type: NgxNzFormlyModule, imports: [FormlyModule], exports: [FormlyModule] }); }
127
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NgxNzFormlyModule, providers: [NzFormlyFieldBuilder], imports: [FormlyModule, FormlyModule] }); }
128
+ }
129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NgxNzFormlyModule, decorators: [{
130
+ type: NgModule,
131
+ args: [{
132
+ imports: [FormlyModule],
133
+ providers: [NzFormlyFieldBuilder],
134
+ exports: [FormlyModule]
135
+ }]
136
+ }] });
137
+
138
+ function minLengthValidator(control, field) {
139
+ if (field.props?.minLen)
140
+ return control.value?.length < field.props?.minLen ? { minLen: true } : null;
141
+ return null;
142
+ }
143
+ function minLengthMessage(field) {
144
+ return `Field must be at least ${field.props?.minLen} characters`;
145
+ }
146
+ function maxLengthValidator(control, field) {
147
+ if (field.props?.maxLen)
148
+ return control.value?.length > field.props?.maxLen ? { maxLen: true } : null;
149
+ return null;
150
+ }
151
+ function maxLengthMessage(field) {
152
+ return `Field must be at most ${field.props?.maxLen} characters`;
153
+ }
154
+ function minValueValidator(control, field) {
155
+ if (field.props?.minValue && control.value != null)
156
+ return Number(control.value) < field.props.minValue ? { minValue: false } : null;
157
+ return null;
158
+ }
159
+ function minValueMessage(field) {
160
+ return `Field value must be more than ${field.props?.minValue}`;
161
+ }
162
+ function maxValueValidator(control, field) {
163
+ if (field.props?.maxValue && control.value != null)
164
+ return Number(control.value) > field.props.maxValue ? { maxValue: true } : null;
165
+ return null;
166
+ }
167
+ function maxValueMessage(field) {
168
+ return `Field value must be less than ${field.props?.maxValue}`;
169
+ }
170
+ function emailValidator(control) {
171
+ const REGEX = /^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/;
172
+ return REGEX.test(control.value) ? null : { email: true };
173
+ }
174
+ function passwordValidator(control, field) {
175
+ if (field.props?.type === 'password') {
176
+ const REGEX = /^(?=.*[A-Z])(?=.*\d)(?=.*[\W_])[A-Za-z\d\W_]{8,}$/;
177
+ return REGEX.test(control.value) ? null : { password: true };
178
+ }
179
+ return null;
180
+ }
181
+
182
+ class NzFormlyButtonComponent extends FieldType {
183
+ onClick() {
184
+ if (typeof this.props?.click == 'function') {
185
+ this.props.click();
186
+ }
187
+ }
188
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
189
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: NzFormlyButtonComponent, isStandalone: true, selector: "app-nz-formly-button", usesInheritance: true, ngImport: i0, template: "<button\n nz-button\n type=\"button\"\n [disabled]=\"props.disabled\"\n [nzGhost]=\"props.nzGhost\"\n [nzLoading]=\"props.nzLoading\"\n [nzShape]=\"props.nzShape\"\n [nzSize]=\"props.nzSize\"\n [nzType]=\"props.nzType\"\n [nzBlock]=\"props.nzBlock\"\n [nzDanger]=\"props.nzDanger\"\n [ngClass]=\"props.classList\"\n (click)=\"onClick()\"\n>\n {{ props.text }}\n</button>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2.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.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }] }); }
190
+ }
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyButtonComponent, decorators: [{
192
+ type: Component,
193
+ args: [{ selector: 'app-nz-formly-button', imports: [CommonModule, NzButtonModule], template: "<button\n nz-button\n type=\"button\"\n [disabled]=\"props.disabled\"\n [nzGhost]=\"props.nzGhost\"\n [nzLoading]=\"props.nzLoading\"\n [nzShape]=\"props.nzShape\"\n [nzSize]=\"props.nzSize\"\n [nzType]=\"props.nzType\"\n [nzBlock]=\"props.nzBlock\"\n [nzDanger]=\"props.nzDanger\"\n [ngClass]=\"props.classList\"\n (click)=\"onClick()\"\n>\n {{ props.text }}\n</button>\n" }]
194
+ }] });
195
+
196
+ class NzFormlyFieldCheckboxComponent extends FieldType {
197
+ constructor() {
198
+ super(...arguments);
199
+ this.destroyRef = inject(DestroyRef);
200
+ }
201
+ get fieldID() {
202
+ return 'control-' + this.field.key;
203
+ }
204
+ ngOnInit() {
205
+ this.onValueChange();
206
+ }
207
+ onValueChange() {
208
+ this.formControl.valueChanges
209
+ .pipe(takeUntilDestroyed(this.destroyRef), tap((value) => {
210
+ if (typeof this.props?.change == 'function') {
211
+ this.props.change(this.field, value);
212
+ }
213
+ }))
214
+ .subscribe();
215
+ }
216
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
217
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: NzFormlyFieldCheckboxComponent, isStandalone: true, selector: "app-nz-formly-field-checkbox", usesInheritance: true, ngImport: i0, template: "<label\n nz-checkbox\n class=\"nz-formly-checkbox-label\"\n [nzId]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzDisabled]=\"props.nzDisabled\"\n>\n {{ props.label }}\n</label>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: i3$1.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }] }); }
218
+ }
219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldCheckboxComponent, decorators: [{
220
+ type: Component,
221
+ args: [{ selector: 'app-nz-formly-field-checkbox', imports: [CommonModule, ReactiveFormsModule, FormlyModule, NzCheckboxModule], template: "<label\n nz-checkbox\n class=\"nz-formly-checkbox-label\"\n [nzId]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzDisabled]=\"props.nzDisabled\"\n>\n {{ props.label }}\n</label>\n" }]
222
+ }] });
223
+
224
+ class NzFormlyFieldDatePickerComponent extends FieldType {
225
+ constructor() {
226
+ super(...arguments);
227
+ this.dateLocale = inject(NZ_DATE_LOCALE, { optional: true });
228
+ }
229
+ get fieldID() {
230
+ return 'control-' + this.field.key;
231
+ }
232
+ get status() {
233
+ return this.formControl.touched && this.formControl.invalid ? 'error' : '';
234
+ }
235
+ /**
236
+ * RTL when a Jalali (Persian) date locale is active, so the calendar grid and
237
+ * input read right-to-left. Falls back to LTR for Gregorian. Can be forced
238
+ * per field via `props.rtl`.
239
+ */
240
+ get dir() {
241
+ const code = this.dateLocale?.code;
242
+ return code?.startsWith('fa') ? 'rtl' : 'ltr';
243
+ }
244
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldDatePickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
245
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: NzFormlyFieldDatePickerComponent, isStandalone: true, selector: "app-nz-formly-field-date-picker", usesInheritance: true, ngImport: i0, template: "<div [dir]=\"dir\">\n <nz-date-picker\n [nzId]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzAllowClear]=\"props.nzAllowClear\"\n [nzAutoFocus]=\"props.nzAutoFocus\"\n [nzDisabled]=\"props.nzDisabled\"\n [nzVariant]=\"props.nzBorderless ? 'borderless' : 'outlined'\"\n [nzInline]=\"props.nzInline\"\n [nzFormat]=\"props.nzFormat\"\n [nzMode]=\"props.nzMode\"\n [nzPlaceHolder]=\"props.nzPlaceholder\"\n [nzSize]=\"props.nzSize\"\n [nzStatus]=\"status\"\n [nzDefaultPickerValue]=\"props.nzDefaultPickerValue\"\n [nzDisabledDate]=\"props.nzDisabledDate\"\n [nzDropdownClassName]=\"props.nzDropdownClassName\"\n [nzPopupStyle]=\"props.nzPopupStyle\"\n [nzShowToday]=\"props.nzShowToday\"\n [nzShowNow]=\"props.nzShowNow\"\n [nzShowWeekNumber]=\"props.nzShowWeekNumber\"\n ></nz-date-picker>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: BidiModule }, { kind: "directive", type: i1$2.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i4$1.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzInline", "nzAllowClear", "nzAutoFocus", "nzDisabled", "nzInputReadOnly", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzVariant", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }] }); }
246
+ }
247
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldDatePickerComponent, decorators: [{
248
+ type: Component,
249
+ args: [{ selector: 'app-nz-formly-field-date-picker', imports: [CommonModule, BidiModule, ReactiveFormsModule, FormlyModule, NzDatePickerModule], template: "<div [dir]=\"dir\">\n <nz-date-picker\n [nzId]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzAllowClear]=\"props.nzAllowClear\"\n [nzAutoFocus]=\"props.nzAutoFocus\"\n [nzDisabled]=\"props.nzDisabled\"\n [nzVariant]=\"props.nzBorderless ? 'borderless' : 'outlined'\"\n [nzInline]=\"props.nzInline\"\n [nzFormat]=\"props.nzFormat\"\n [nzMode]=\"props.nzMode\"\n [nzPlaceHolder]=\"props.nzPlaceholder\"\n [nzSize]=\"props.nzSize\"\n [nzStatus]=\"status\"\n [nzDefaultPickerValue]=\"props.nzDefaultPickerValue\"\n [nzDisabledDate]=\"props.nzDisabledDate\"\n [nzDropdownClassName]=\"props.nzDropdownClassName\"\n [nzPopupStyle]=\"props.nzPopupStyle\"\n [nzShowToday]=\"props.nzShowToday\"\n [nzShowNow]=\"props.nzShowNow\"\n [nzShowWeekNumber]=\"props.nzShowWeekNumber\"\n ></nz-date-picker>\n</div>\n" }]
250
+ }] });
31
251
 
32
252
  const CountryMasks2 = [
33
253
  {
34
- countryShortName: "AC",
35
- prefix: "+247",
36
- globalMask: "+247-####",
254
+ countryShortName: 'AC',
255
+ prefix: '+247',
256
+ globalMask: '+247-####'
37
257
  },
38
258
  {
39
- countryShortName: "AD",
40
- prefix: "+376",
41
- globalMask: "+376-###-###",
259
+ countryShortName: 'AD',
260
+ prefix: '+376',
261
+ globalMask: '+376-###-###'
42
262
  },
43
263
  {
44
- countryShortName: "AE",
45
- prefix: "+9715",
46
- globalMask: "+971-5#-###-####",
264
+ countryShortName: 'AE',
265
+ prefix: '+9715',
266
+ globalMask: '+971-5#-###-####'
47
267
  },
48
268
  {
49
- countryShortName: "AE",
50
- prefix: "+971",
51
- globalMask: "+971-#-###-####",
269
+ countryShortName: 'AE',
270
+ prefix: '+971',
271
+ globalMask: '+971-#-###-####'
52
272
  },
53
273
  {
54
- countryShortName: "AF",
55
- prefix: "+93",
56
- globalMask: "+93-##-###-####",
274
+ countryShortName: 'AF',
275
+ prefix: '+93',
276
+ globalMask: '+93-##-###-####'
57
277
  },
58
278
  {
59
- countryShortName: "AG",
60
- prefix: "+1268",
61
- globalMask: "+1(268)###-####",
279
+ countryShortName: 'AG',
280
+ prefix: '+1268',
281
+ globalMask: '+1(268)###-####'
62
282
  },
63
283
  {
64
- countryShortName: "AI",
65
- prefix: "+1264",
66
- globalMask: "+1(264)###-####",
284
+ countryShortName: 'AI',
285
+ prefix: '+1264',
286
+ globalMask: '+1(264)###-####'
67
287
  },
68
288
  {
69
- countryShortName: "AL",
70
- prefix: "+355",
71
- globalMask: "+355(###)###-###",
289
+ countryShortName: 'AL',
290
+ prefix: '+355',
291
+ globalMask: '+355(###)###-###'
72
292
  },
73
293
  {
74
- countryShortName: "AM",
75
- prefix: "+374",
76
- globalMask: "+374-##-###-###",
294
+ countryShortName: 'AM',
295
+ prefix: '+374',
296
+ globalMask: '+374-##-###-###'
77
297
  },
78
298
  {
79
- countryShortName: "AN",
80
- prefix: "+599",
81
- globalMask: "+599-###-####",
299
+ countryShortName: 'AN',
300
+ prefix: '+599',
301
+ globalMask: '+599-###-####'
82
302
  },
83
303
  {
84
- countryShortName: "AN",
85
- prefix: "+5999",
86
- globalMask: "+599-9###-####",
304
+ countryShortName: 'AN',
305
+ prefix: '+5999',
306
+ globalMask: '+599-9###-####'
87
307
  },
88
308
  {
89
- countryShortName: "AO",
90
- prefix: "+244",
91
- globalMask: "+244(###)###-###",
309
+ countryShortName: 'AO',
310
+ prefix: '+244',
311
+ globalMask: '+244(###)###-###'
92
312
  },
93
313
  {
94
- countryShortName: "AQ",
95
- prefix: "+6721",
96
- globalMask: "+672-1##-###",
314
+ countryShortName: 'AQ',
315
+ prefix: '+6721',
316
+ globalMask: '+672-1##-###'
97
317
  },
98
318
  {
99
- countryShortName: "AR",
100
- prefix: "+54",
101
- globalMask: "+54(###)###-####",
319
+ countryShortName: 'AR',
320
+ prefix: '+54',
321
+ globalMask: '+54(###)###-####'
102
322
  },
103
323
  {
104
- countryShortName: "AS",
105
- prefix: "+1684",
106
- globalMask: "+1(684)###-####",
324
+ countryShortName: 'AS',
325
+ prefix: '+1684',
326
+ globalMask: '+1(684)###-####'
107
327
  },
108
328
  {
109
- countryShortName: "AT",
110
- prefix: "+43",
111
- globalMask: "+43(###)###-####",
329
+ countryShortName: 'AT',
330
+ prefix: '+43',
331
+ globalMask: '+43(###)###-####'
112
332
  },
113
333
  {
114
- countryShortName: "AU",
115
- prefix: "+61",
116
- globalMask: "+61-#-####-####",
334
+ countryShortName: 'AU',
335
+ prefix: '+61',
336
+ globalMask: '+61-#-####-####'
117
337
  },
118
338
  {
119
- countryShortName: "AW",
120
- prefix: "+297",
121
- globalMask: "+297-###-####",
339
+ countryShortName: 'AW',
340
+ prefix: '+297',
341
+ globalMask: '+297-###-####'
122
342
  },
123
343
  {
124
- countryShortName: "AZ",
125
- prefix: "+994",
126
- globalMask: "+994-##-###-##-##",
344
+ countryShortName: 'AZ',
345
+ prefix: '+994',
346
+ globalMask: '+994-##-###-##-##'
127
347
  },
128
348
  {
129
- countryShortName: "BA",
130
- prefix: "+387",
131
- globalMask: "+387-##-#####",
349
+ countryShortName: 'BA',
350
+ prefix: '+387',
351
+ globalMask: '+387-##-#####'
132
352
  },
133
353
  {
134
- countryShortName: "BA",
135
- prefix: "+387",
136
- globalMask: "+387-##-####",
354
+ countryShortName: 'BA',
355
+ prefix: '+387',
356
+ globalMask: '+387-##-####'
137
357
  },
138
358
  {
139
- countryShortName: "BB",
140
- prefix: "+1246",
141
- globalMask: "+1(246)###-####",
359
+ countryShortName: 'BB',
360
+ prefix: '+1246',
361
+ globalMask: '+1(246)###-####'
142
362
  },
143
363
  {
144
- countryShortName: "BD",
145
- prefix: "+880",
146
- globalMask: "+880-##-###-###",
364
+ countryShortName: 'BD',
365
+ prefix: '+880',
366
+ globalMask: '+880-##-###-###'
147
367
  },
148
368
  {
149
- countryShortName: "BE",
150
- prefix: "+32",
151
- globalMask: "+32(###)###-###",
369
+ countryShortName: 'BE',
370
+ prefix: '+32',
371
+ globalMask: '+32(###)###-###'
152
372
  },
153
373
  {
154
- countryShortName: "BF",
155
- prefix: "+226",
156
- globalMask: "+226-##-##-####",
374
+ countryShortName: 'BF',
375
+ prefix: '+226',
376
+ globalMask: '+226-##-##-####'
157
377
  },
158
378
  {
159
- countryShortName: "BG",
160
- prefix: "+359",
161
- globalMask: "+359(###)###-###",
379
+ countryShortName: 'BG',
380
+ prefix: '+359',
381
+ globalMask: '+359(###)###-###'
162
382
  },
163
383
  {
164
- countryShortName: "BH",
165
- prefix: "+973",
166
- globalMask: "+973-####-####",
384
+ countryShortName: 'BH',
385
+ prefix: '+973',
386
+ globalMask: '+973-####-####'
167
387
  },
168
388
  {
169
- countryShortName: "BI",
170
- prefix: "+257",
171
- globalMask: "+257-##-##-####",
389
+ countryShortName: 'BI',
390
+ prefix: '+257',
391
+ globalMask: '+257-##-##-####'
172
392
  },
173
393
  {
174
- countryShortName: "BJ",
175
- prefix: "+229",
176
- globalMask: "+229-##-##-####",
394
+ countryShortName: 'BJ',
395
+ prefix: '+229',
396
+ globalMask: '+229-##-##-####'
177
397
  },
178
398
  {
179
- countryShortName: "BM",
180
- prefix: "+1441",
181
- globalMask: "+1(441)###-####",
399
+ countryShortName: 'BM',
400
+ prefix: '+1441',
401
+ globalMask: '+1(441)###-####'
182
402
  },
183
403
  {
184
- countryShortName: "BN",
185
- prefix: "+673",
186
- globalMask: "+673-###-####",
404
+ countryShortName: 'BN',
405
+ prefix: '+673',
406
+ globalMask: '+673-###-####'
187
407
  },
188
408
  {
189
- countryShortName: "BO",
190
- prefix: "+591",
191
- globalMask: "+591-#-###-####",
409
+ countryShortName: 'BO',
410
+ prefix: '+591',
411
+ globalMask: '+591-#-###-####'
192
412
  },
193
413
  {
194
- countryShortName: "BR",
195
- prefix: "+55",
196
- globalMask: "+55(##)####-####",
414
+ countryShortName: 'BR',
415
+ prefix: '+55',
416
+ globalMask: '+55(##)####-####'
197
417
  },
198
418
  {
199
- countryShortName: "BR",
200
- prefix: "+55",
201
- globalMask: "+55(##)9####-####",
419
+ countryShortName: 'BR',
420
+ prefix: '+55',
421
+ globalMask: '+55(##)9####-####'
202
422
  },
203
423
  {
204
- countryShortName: "BS",
205
- prefix: "+1242",
206
- globalMask: "+1(242)###-####",
424
+ countryShortName: 'BS',
425
+ prefix: '+1242',
426
+ globalMask: '+1(242)###-####'
207
427
  },
208
428
  {
209
- countryShortName: "BT",
210
- prefix: "+97517",
211
- globalMask: "+975-17-###-###",
429
+ countryShortName: 'BT',
430
+ prefix: '+97517',
431
+ globalMask: '+975-17-###-###'
212
432
  },
213
433
  {
214
- countryShortName: "BT",
215
- prefix: "+975",
216
- globalMask: "+975-#-###-###",
434
+ countryShortName: 'BT',
435
+ prefix: '+975',
436
+ globalMask: '+975-#-###-###'
217
437
  },
218
438
  {
219
- countryShortName: "BW",
220
- prefix: "+267",
221
- globalMask: "+267-##-###-###",
439
+ countryShortName: 'BW',
440
+ prefix: '+267',
441
+ globalMask: '+267-##-###-###'
222
442
  },
223
443
  {
224
- countryShortName: "BY",
225
- prefix: "+375",
226
- globalMask: "+375(##)###-##-##",
444
+ countryShortName: 'BY',
445
+ prefix: '+375',
446
+ globalMask: '+375(##)###-##-##'
227
447
  },
228
448
  {
229
- countryShortName: "BZ",
230
- prefix: "+501",
231
- globalMask: "+501-###-####",
449
+ countryShortName: 'BZ',
450
+ prefix: '+501',
451
+ globalMask: '+501-###-####'
232
452
  },
233
453
  {
234
- countryShortName: "US & CA",
235
- prefix: "+1",
236
- globalMask: "+1(###)###-####",
454
+ countryShortName: 'US & CA',
455
+ prefix: '+1',
456
+ globalMask: '+1(###)###-####'
237
457
  },
238
458
  {
239
- countryShortName: "CD",
240
- prefix: "+243",
241
- globalMask: "+243(###)###-###",
459
+ countryShortName: 'CD',
460
+ prefix: '+243',
461
+ globalMask: '+243(###)###-###'
242
462
  },
243
463
  {
244
- countryShortName: "CF",
245
- prefix: "+236",
246
- globalMask: "+236-##-##-####",
464
+ countryShortName: 'CF',
465
+ prefix: '+236',
466
+ globalMask: '+236-##-##-####'
247
467
  },
248
468
  {
249
- countryShortName: "CG",
250
- prefix: "+242",
251
- globalMask: "+242-##-###-####",
469
+ countryShortName: 'CG',
470
+ prefix: '+242',
471
+ globalMask: '+242-##-###-####'
252
472
  },
253
473
  {
254
- countryShortName: "CH",
255
- prefix: "+41",
256
- globalMask: "+41-##-###-####",
474
+ countryShortName: 'CH',
475
+ prefix: '+41',
476
+ globalMask: '+41-##-###-####'
257
477
  },
258
478
  {
259
- countryShortName: "CI",
260
- prefix: "+225",
261
- globalMask: "+225-##-###-###",
479
+ countryShortName: 'CI',
480
+ prefix: '+225',
481
+ globalMask: '+225-##-###-###'
262
482
  },
263
483
  {
264
- countryShortName: "CK",
265
- prefix: "+682",
266
- globalMask: "+682-##-###",
484
+ countryShortName: 'CK',
485
+ prefix: '+682',
486
+ globalMask: '+682-##-###'
267
487
  },
268
488
  {
269
- countryShortName: "CL",
270
- prefix: "+56",
271
- globalMask: "+56-#-####-####",
489
+ countryShortName: 'CL',
490
+ prefix: '+56',
491
+ globalMask: '+56-#-####-####'
272
492
  },
273
493
  {
274
- countryShortName: "CM",
275
- prefix: "+237",
276
- globalMask: "+237-####-####",
494
+ countryShortName: 'CM',
495
+ prefix: '+237',
496
+ globalMask: '+237-####-####'
277
497
  },
278
498
  {
279
- countryShortName: "CN",
280
- prefix: "+86",
281
- globalMask: "+86(###)####-####",
499
+ countryShortName: 'CN',
500
+ prefix: '+86',
501
+ globalMask: '+86(###)####-####'
282
502
  },
283
503
  {
284
- countryShortName: "CN",
285
- prefix: "+86",
286
- globalMask: "+86(###)####-###",
504
+ countryShortName: 'CN',
505
+ prefix: '+86',
506
+ globalMask: '+86(###)####-###'
287
507
  },
288
508
  {
289
- countryShortName: "CN",
290
- prefix: "+86",
291
- globalMask: "+86-##-#####-#####",
509
+ countryShortName: 'CN',
510
+ prefix: '+86',
511
+ globalMask: '+86-##-#####-#####'
292
512
  },
293
513
  {
294
- countryShortName: "CO",
295
- prefix: "+57",
296
- globalMask: "+57(###)###-####",
514
+ countryShortName: 'CO',
515
+ prefix: '+57',
516
+ globalMask: '+57(###)###-####'
297
517
  },
298
518
  {
299
- countryShortName: "CR",
300
- prefix: "+506",
301
- globalMask: "+506-####-####",
519
+ countryShortName: 'CR',
520
+ prefix: '+506',
521
+ globalMask: '+506-####-####'
302
522
  },
303
523
  {
304
- countryShortName: "CU",
305
- prefix: "+53",
306
- globalMask: "+53-#-###-####",
524
+ countryShortName: 'CU',
525
+ prefix: '+53',
526
+ globalMask: '+53-#-###-####'
307
527
  },
308
528
  {
309
- countryShortName: "CV",
310
- prefix: "+238",
311
- globalMask: "+238(###)##-##",
529
+ countryShortName: 'CV',
530
+ prefix: '+238',
531
+ globalMask: '+238(###)##-##'
312
532
  },
313
533
  {
314
- countryShortName: "CW",
315
- prefix: "+599",
316
- globalMask: "+599-###-####",
534
+ countryShortName: 'CW',
535
+ prefix: '+599',
536
+ globalMask: '+599-###-####'
317
537
  },
318
538
  {
319
- countryShortName: "CY",
320
- prefix: "+357",
321
- globalMask: "+357-##-###-###",
539
+ countryShortName: 'CY',
540
+ prefix: '+357',
541
+ globalMask: '+357-##-###-###'
322
542
  },
323
543
  {
324
- countryShortName: "CZ",
325
- prefix: "+420",
326
- globalMask: "+420(###)###-###",
544
+ countryShortName: 'CZ',
545
+ prefix: '+420',
546
+ globalMask: '+420(###)###-###'
327
547
  },
328
548
  {
329
- countryShortName: "DE",
330
- prefix: "+49",
331
- globalMask: "+49(####)###-####",
549
+ countryShortName: 'DE',
550
+ prefix: '+49',
551
+ globalMask: '+49(####)###-####'
332
552
  },
333
553
  {
334
- countryShortName: "DE",
335
- prefix: "+49",
336
- globalMask: "+49(###)###-####",
554
+ countryShortName: 'DE',
555
+ prefix: '+49',
556
+ globalMask: '+49(###)###-####'
337
557
  },
338
558
  {
339
- countryShortName: "DE",
340
- prefix: "+49",
341
- globalMask: "+49(###)##-####",
559
+ countryShortName: 'DE',
560
+ prefix: '+49',
561
+ globalMask: '+49(###)##-####'
342
562
  },
343
563
  {
344
- countryShortName: "DE",
345
- prefix: "+49",
346
- globalMask: "+49(###)##-###",
564
+ countryShortName: 'DE',
565
+ prefix: '+49',
566
+ globalMask: '+49(###)##-###'
347
567
  },
348
568
  {
349
- countryShortName: "DE",
350
- prefix: "+49",
351
- globalMask: "+49(###)##-##",
569
+ countryShortName: 'DE',
570
+ prefix: '+49',
571
+ globalMask: '+49(###)##-##'
352
572
  },
353
573
  {
354
- countryShortName: "DE",
355
- prefix: "+49",
356
- globalMask: "+49-###-###",
574
+ countryShortName: 'DE',
575
+ prefix: '+49',
576
+ globalMask: '+49-###-###'
357
577
  },
358
578
  {
359
- countryShortName: "DJ",
360
- prefix: "+253",
361
- globalMask: "+253-##-##-##-##",
579
+ countryShortName: 'DJ',
580
+ prefix: '+253',
581
+ globalMask: '+253-##-##-##-##'
362
582
  },
363
583
  {
364
- countryShortName: "DK",
365
- prefix: "+45",
366
- globalMask: "+45-##-##-##-##",
584
+ countryShortName: 'DK',
585
+ prefix: '+45',
586
+ globalMask: '+45-##-##-##-##'
367
587
  },
368
588
  {
369
- countryShortName: "DM",
370
- prefix: "+1767",
371
- globalMask: "+1(767)###-####",
589
+ countryShortName: 'DM',
590
+ prefix: '+1767',
591
+ globalMask: '+1(767)###-####'
372
592
  },
373
593
  {
374
- countryShortName: "DO",
375
- prefix: "+1809",
376
- globalMask: "+1(809)###-####",
594
+ countryShortName: 'DO',
595
+ prefix: '+1809',
596
+ globalMask: '+1(809)###-####'
377
597
  },
378
598
  {
379
- countryShortName: "DO",
380
- prefix: "+1829",
381
- globalMask: "+1(829)###-####",
599
+ countryShortName: 'DO',
600
+ prefix: '+1829',
601
+ globalMask: '+1(829)###-####'
382
602
  },
383
603
  {
384
- countryShortName: "DO",
385
- prefix: "+1849",
386
- globalMask: "+1(849)###-####",
604
+ countryShortName: 'DO',
605
+ prefix: '+1849',
606
+ globalMask: '+1(849)###-####'
387
607
  },
388
608
  {
389
- countryShortName: "DZ",
390
- prefix: "+213",
391
- globalMask: "+213-##-###-####",
609
+ countryShortName: 'DZ',
610
+ prefix: '+213',
611
+ globalMask: '+213-##-###-####'
392
612
  },
393
613
  {
394
- countryShortName: "EC",
395
- prefix: "+593",
396
- globalMask: "+593-##-###-####",
614
+ countryShortName: 'EC',
615
+ prefix: '+593',
616
+ globalMask: '+593-##-###-####'
397
617
  },
398
618
  {
399
- countryShortName: "EC",
400
- prefix: "+593",
401
- globalMask: "+593-#-###-####",
619
+ countryShortName: 'EC',
620
+ prefix: '+593',
621
+ globalMask: '+593-#-###-####'
402
622
  },
403
623
  {
404
- countryShortName: "EE",
405
- prefix: "+372",
406
- globalMask: "+372-####-####",
624
+ countryShortName: 'EE',
625
+ prefix: '+372',
626
+ globalMask: '+372-####-####'
407
627
  },
408
628
  {
409
- countryShortName: "EE",
410
- prefix: "+372",
411
- globalMask: "+372-###-####",
629
+ countryShortName: 'EE',
630
+ prefix: '+372',
631
+ globalMask: '+372-###-####'
412
632
  },
413
633
  {
414
- countryShortName: "EG",
415
- prefix: "+20",
416
- globalMask: "+20(###)###-####",
634
+ countryShortName: 'EG',
635
+ prefix: '+20',
636
+ globalMask: '+20(###)###-####'
417
637
  },
418
638
  {
419
- countryShortName: "ER",
420
- prefix: "+291",
421
- globalMask: "+291-#-###-###",
639
+ countryShortName: 'ER',
640
+ prefix: '+291',
641
+ globalMask: '+291-#-###-###'
422
642
  },
423
643
  {
424
- countryShortName: "ES",
425
- prefix: "+34",
426
- globalMask: "+34(###)###-###",
644
+ countryShortName: 'ES',
645
+ prefix: '+34',
646
+ globalMask: '+34(###)###-###'
427
647
  },
428
648
  {
429
- countryShortName: "ET",
430
- prefix: "+251",
431
- globalMask: "+251-##-###-####",
649
+ countryShortName: 'ET',
650
+ prefix: '+251',
651
+ globalMask: '+251-##-###-####'
432
652
  },
433
653
  {
434
- countryShortName: "FI",
435
- prefix: "+358",
436
- globalMask: "+358(###)###-##-##",
654
+ countryShortName: 'FI',
655
+ prefix: '+358',
656
+ globalMask: '+358(###)###-##-##'
437
657
  },
438
658
  {
439
- countryShortName: "FJ",
440
- prefix: "+679",
441
- globalMask: "+679-##-#####",
659
+ countryShortName: 'FJ',
660
+ prefix: '+679',
661
+ globalMask: '+679-##-#####'
442
662
  },
443
663
  {
444
- countryShortName: "FK",
445
- prefix: "+500",
446
- globalMask: "+500-#####",
664
+ countryShortName: 'FK',
665
+ prefix: '+500',
666
+ globalMask: '+500-#####'
447
667
  },
448
668
  {
449
- countryShortName: "FM",
450
- prefix: "+691",
451
- globalMask: "+691-###-####",
669
+ countryShortName: 'FM',
670
+ prefix: '+691',
671
+ globalMask: '+691-###-####'
452
672
  },
453
673
  {
454
- countryShortName: "FO",
455
- prefix: "+298",
456
- globalMask: "+298-###-###",
674
+ countryShortName: 'FO',
675
+ prefix: '+298',
676
+ globalMask: '+298-###-###'
457
677
  },
458
678
  {
459
- countryShortName: "FR",
460
- prefix: "+262",
461
- globalMask: "+262-#####-####",
679
+ countryShortName: 'FR',
680
+ prefix: '+262',
681
+ globalMask: '+262-#####-####'
462
682
  },
463
683
  {
464
- countryShortName: "FR",
465
- prefix: "+33",
466
- globalMask: "+33(###)###-###",
684
+ countryShortName: 'FR',
685
+ prefix: '+33',
686
+ globalMask: '+33(###)###-###'
467
687
  },
468
688
  {
469
- countryShortName: "FR",
470
- prefix: "+508",
471
- globalMask: "+508-##-####",
689
+ countryShortName: 'FR',
690
+ prefix: '+508',
691
+ globalMask: '+508-##-####'
472
692
  },
473
693
  {
474
- countryShortName: "FR",
475
- prefix: "+590",
476
- globalMask: "+590(###)###-###",
694
+ countryShortName: 'FR',
695
+ prefix: '+590',
696
+ globalMask: '+590(###)###-###'
477
697
  },
478
698
  {
479
- countryShortName: "GA",
480
- prefix: "+241",
481
- globalMask: "+241-#-##-##-##",
699
+ countryShortName: 'GA',
700
+ prefix: '+241',
701
+ globalMask: '+241-#-##-##-##'
482
702
  },
483
703
  {
484
- countryShortName: "GD",
485
- prefix: "+1473",
486
- globalMask: "+1(473)###-####",
704
+ countryShortName: 'GD',
705
+ prefix: '+1473',
706
+ globalMask: '+1(473)###-####'
487
707
  },
488
708
  {
489
- countryShortName: "GE",
490
- prefix: "+995",
491
- globalMask: "+995(###)###-###",
709
+ countryShortName: 'GE',
710
+ prefix: '+995',
711
+ globalMask: '+995(###)###-###'
492
712
  },
493
713
  {
494
- countryShortName: "GF",
495
- prefix: "+594",
496
- globalMask: "+594-#####-####",
714
+ countryShortName: 'GF',
715
+ prefix: '+594',
716
+ globalMask: '+594-#####-####'
497
717
  },
498
718
  {
499
- countryShortName: "GH",
500
- prefix: "+233",
501
- globalMask: "+233(###)###-###",
719
+ countryShortName: 'GH',
720
+ prefix: '+233',
721
+ globalMask: '+233(###)###-###'
502
722
  },
503
723
  {
504
- countryShortName: "GI",
505
- prefix: "+350",
506
- globalMask: "+350-###-#####",
724
+ countryShortName: 'GI',
725
+ prefix: '+350',
726
+ globalMask: '+350-###-#####'
507
727
  },
508
728
  {
509
- countryShortName: "GL",
510
- prefix: "+299",
511
- globalMask: "+299-##-##-##",
729
+ countryShortName: 'GL',
730
+ prefix: '+299',
731
+ globalMask: '+299-##-##-##'
512
732
  },
513
733
  {
514
- countryShortName: "GM",
515
- prefix: "+220",
516
- globalMask: "+220(###)##-##",
734
+ countryShortName: 'GM',
735
+ prefix: '+220',
736
+ globalMask: '+220(###)##-##'
517
737
  },
518
738
  {
519
- countryShortName: "GN",
520
- prefix: "+224",
521
- globalMask: "+224-##-###-###",
739
+ countryShortName: 'GN',
740
+ prefix: '+224',
741
+ globalMask: '+224-##-###-###'
522
742
  },
523
743
  {
524
- countryShortName: "GQ",
525
- prefix: "+240",
526
- globalMask: "+240-##-###-####",
744
+ countryShortName: 'GQ',
745
+ prefix: '+240',
746
+ globalMask: '+240-##-###-####'
527
747
  },
528
748
  {
529
- countryShortName: "GR",
530
- prefix: "+30",
531
- globalMask: "+30(###)###-####",
749
+ countryShortName: 'GR',
750
+ prefix: '+30',
751
+ globalMask: '+30(###)###-####'
532
752
  },
533
753
  {
534
- countryShortName: "GT",
535
- prefix: "+502",
536
- globalMask: "+502-#-###-####",
754
+ countryShortName: 'GT',
755
+ prefix: '+502',
756
+ globalMask: '+502-#-###-####'
537
757
  },
538
758
  {
539
- countryShortName: "GU",
540
- prefix: "+1671",
541
- globalMask: "+1(671)###-####",
759
+ countryShortName: 'GU',
760
+ prefix: '+1671',
761
+ globalMask: '+1(671)###-####'
542
762
  },
543
763
  {
544
- countryShortName: "GW",
545
- prefix: "+245",
546
- globalMask: "+245-#-######",
764
+ countryShortName: 'GW',
765
+ prefix: '+245',
766
+ globalMask: '+245-#-######'
547
767
  },
548
768
  {
549
- countryShortName: "GY",
550
- prefix: "+592",
551
- globalMask: "+592-###-####",
769
+ countryShortName: 'GY',
770
+ prefix: '+592',
771
+ globalMask: '+592-###-####'
552
772
  },
553
773
  {
554
- countryShortName: "HK",
555
- prefix: "+852",
556
- globalMask: "+852-####-####",
774
+ countryShortName: 'HK',
775
+ prefix: '+852',
776
+ globalMask: '+852-####-####'
557
777
  },
558
778
  {
559
- countryShortName: "HN",
560
- prefix: "+504",
561
- globalMask: "+504-####-####",
779
+ countryShortName: 'HN',
780
+ prefix: '+504',
781
+ globalMask: '+504-####-####'
562
782
  },
563
783
  {
564
- countryShortName: "HR",
565
- prefix: "+385",
566
- globalMask: "+385-##-###-###",
784
+ countryShortName: 'HR',
785
+ prefix: '+385',
786
+ globalMask: '+385-##-###-###'
567
787
  },
568
788
  {
569
- countryShortName: "HT",
570
- prefix: "+509",
571
- globalMask: "+509-##-##-####",
789
+ countryShortName: 'HT',
790
+ prefix: '+509',
791
+ globalMask: '+509-##-##-####'
572
792
  },
573
793
  {
574
- countryShortName: "HU",
575
- prefix: "+36",
576
- globalMask: "+36(###)###-###",
794
+ countryShortName: 'HU',
795
+ prefix: '+36',
796
+ globalMask: '+36(###)###-###'
577
797
  },
578
798
  {
579
- countryShortName: "ID",
580
- prefix: "+628",
581
- globalMask: "+62(8##)###-####",
799
+ countryShortName: 'ID',
800
+ prefix: '+628',
801
+ globalMask: '+62(8##)###-####'
582
802
  },
583
803
  {
584
- countryShortName: "ID",
585
- prefix: "+62",
586
- globalMask: "+62-##-###-##",
804
+ countryShortName: 'ID',
805
+ prefix: '+62',
806
+ globalMask: '+62-##-###-##'
587
807
  },
588
808
  {
589
- countryShortName: "ID",
590
- prefix: "+62",
591
- globalMask: "+62-##-###-###",
809
+ countryShortName: 'ID',
810
+ prefix: '+62',
811
+ globalMask: '+62-##-###-###'
592
812
  },
593
813
  {
594
- countryShortName: "ID",
595
- prefix: "+62",
596
- globalMask: "+62-##-###-####",
814
+ countryShortName: 'ID',
815
+ prefix: '+62',
816
+ globalMask: '+62-##-###-####'
597
817
  },
598
818
  {
599
- countryShortName: "ID",
600
- prefix: "+628",
601
- globalMask: "+62(8##)###-###",
819
+ countryShortName: 'ID',
820
+ prefix: '+628',
821
+ globalMask: '+62(8##)###-###'
602
822
  },
603
823
  {
604
- countryShortName: "ID",
605
- prefix: "+628",
606
- globalMask: "+62(8##)###-##-###",
824
+ countryShortName: 'ID',
825
+ prefix: '+628',
826
+ globalMask: '+62(8##)###-##-###'
607
827
  },
608
828
  {
609
- countryShortName: "IE",
610
- prefix: "+353",
611
- globalMask: "+353(###)###-###",
829
+ countryShortName: 'IE',
830
+ prefix: '+353',
831
+ globalMask: '+353(###)###-###'
612
832
  },
613
833
  {
614
- countryShortName: "IL",
615
- prefix: "+9725",
616
- globalMask: "+972-5#-###-####",
834
+ countryShortName: 'IL',
835
+ prefix: '+9725',
836
+ globalMask: '+972-5#-###-####'
617
837
  },
618
838
  {
619
- countryShortName: "IL",
620
- prefix: "+972",
621
- globalMask: "+972-#-###-####",
839
+ countryShortName: 'IL',
840
+ prefix: '+972',
841
+ globalMask: '+972-#-###-####'
622
842
  },
623
843
  {
624
- countryShortName: "IN",
625
- prefix: "+91",
626
- globalMask: "+91(####)###-###",
844
+ countryShortName: 'IN',
845
+ prefix: '+91',
846
+ globalMask: '+91(####)###-###'
627
847
  },
628
848
  {
629
- countryShortName: "IO",
630
- prefix: "+246",
631
- globalMask: "+246-###-####",
849
+ countryShortName: 'IO',
850
+ prefix: '+246',
851
+ globalMask: '+246-###-####'
632
852
  },
633
853
  {
634
- countryShortName: "IQ",
635
- prefix: "+964",
636
- globalMask: "+964(###)###-####",
854
+ countryShortName: 'IQ',
855
+ prefix: '+964',
856
+ globalMask: '+964(###)###-####'
637
857
  },
638
858
  {
639
- countryShortName: "IR",
640
- prefix: "+98",
641
- globalMask: "+98(###)###-####",
859
+ countryShortName: 'IR',
860
+ prefix: '+98',
861
+ globalMask: '+98(###)###-####'
642
862
  },
643
863
  {
644
- countryShortName: "IS",
645
- prefix: "+354",
646
- globalMask: "+354-###-####",
864
+ countryShortName: 'IS',
865
+ prefix: '+354',
866
+ globalMask: '+354-###-####'
647
867
  },
648
868
  {
649
- countryShortName: "IT",
650
- prefix: "+39",
651
- globalMask: "+39(###)####-###",
869
+ countryShortName: 'IT',
870
+ prefix: '+39',
871
+ globalMask: '+39(###)####-###'
652
872
  },
653
873
  {
654
- countryShortName: "JM",
655
- prefix: "+1876",
656
- globalMask: "+1(876)###-####",
874
+ countryShortName: 'JM',
875
+ prefix: '+1876',
876
+ globalMask: '+1(876)###-####'
657
877
  },
658
878
  {
659
- countryShortName: "JO",
660
- prefix: "+962",
661
- globalMask: "+962-#-####-####",
879
+ countryShortName: 'JO',
880
+ prefix: '+962',
881
+ globalMask: '+962-#-####-####'
662
882
  },
663
883
  {
664
- countryShortName: "JP",
665
- prefix: "+81",
666
- globalMask: "+81-##-####-####",
884
+ countryShortName: 'JP',
885
+ prefix: '+81',
886
+ globalMask: '+81-##-####-####'
667
887
  },
668
888
  {
669
- countryShortName: "JP",
670
- prefix: "+81",
671
- globalMask: "+81(###)###-###",
889
+ countryShortName: 'JP',
890
+ prefix: '+81',
891
+ globalMask: '+81(###)###-###'
672
892
  },
673
893
  {
674
- countryShortName: "KE",
675
- prefix: "+254",
676
- globalMask: "+254-###-######",
894
+ countryShortName: 'KE',
895
+ prefix: '+254',
896
+ globalMask: '+254-###-######'
677
897
  },
678
898
  {
679
- countryShortName: "KG",
680
- prefix: "+996",
681
- globalMask: "+996(###)###-###",
899
+ countryShortName: 'KG',
900
+ prefix: '+996',
901
+ globalMask: '+996(###)###-###'
682
902
  },
683
903
  {
684
- countryShortName: "KH",
685
- prefix: "+855",
686
- globalMask: "+855-##-###-###",
904
+ countryShortName: 'KH',
905
+ prefix: '+855',
906
+ globalMask: '+855-##-###-###'
687
907
  },
688
908
  {
689
- countryShortName: "KI",
690
- prefix: "+686",
691
- globalMask: "+686-##-###",
909
+ countryShortName: 'KI',
910
+ prefix: '+686',
911
+ globalMask: '+686-##-###'
692
912
  },
693
913
  {
694
- countryShortName: "KM",
695
- prefix: "+269",
696
- globalMask: "+269-##-#####",
914
+ countryShortName: 'KM',
915
+ prefix: '+269',
916
+ globalMask: '+269-##-#####'
697
917
  },
698
918
  {
699
- countryShortName: "KN",
700
- prefix: "+1869",
701
- globalMask: "+1(869)###-####",
919
+ countryShortName: 'KN',
920
+ prefix: '+1869',
921
+ globalMask: '+1(869)###-####'
702
922
  },
703
923
  {
704
- countryShortName: "KP",
705
- prefix: "+850191",
706
- globalMask: "+850-191-###-####",
924
+ countryShortName: 'KP',
925
+ prefix: '+850191',
926
+ globalMask: '+850-191-###-####'
707
927
  },
708
928
  {
709
- countryShortName: "KP",
710
- prefix: "+850",
711
- globalMask: "+850-##-###-###",
929
+ countryShortName: 'KP',
930
+ prefix: '+850',
931
+ globalMask: '+850-##-###-###'
712
932
  },
713
933
  {
714
- countryShortName: "KP",
715
- prefix: "+850",
716
- globalMask: "+850-###-####-###",
934
+ countryShortName: 'KP',
935
+ prefix: '+850',
936
+ globalMask: '+850-###-####-###'
717
937
  },
718
938
  {
719
- countryShortName: "KP",
720
- prefix: "+850",
721
- globalMask: "+850-###-###",
939
+ countryShortName: 'KP',
940
+ prefix: '+850',
941
+ globalMask: '+850-###-###'
722
942
  },
723
943
  {
724
- countryShortName: "KP",
725
- prefix: "+850",
726
- globalMask: "+850-####-####",
944
+ countryShortName: 'KP',
945
+ prefix: '+850',
946
+ globalMask: '+850-####-####'
727
947
  },
728
948
  {
729
- countryShortName: "KP",
730
- prefix: "+850",
731
- globalMask: "+850-####-#############",
949
+ countryShortName: 'KP',
950
+ prefix: '+850',
951
+ globalMask: '+850-####-#############'
732
952
  },
733
953
  {
734
- countryShortName: "KR",
735
- prefix: "+82",
736
- globalMask: "+82-##-###-####",
954
+ countryShortName: 'KR',
955
+ prefix: '+82',
956
+ globalMask: '+82-##-###-####'
737
957
  },
738
958
  {
739
- countryShortName: "KW",
740
- prefix: "+965",
741
- globalMask: "+965-####-####",
959
+ countryShortName: 'KW',
960
+ prefix: '+965',
961
+ globalMask: '+965-####-####'
742
962
  },
743
963
  {
744
- countryShortName: "KY",
745
- prefix: "+1345",
746
- globalMask: "+1(345)###-####",
964
+ countryShortName: 'KY',
965
+ prefix: '+1345',
966
+ globalMask: '+1(345)###-####'
747
967
  },
748
968
  {
749
- countryShortName: "KZ",
750
- prefix: "+76",
751
- globalMask: "+7(6##)###-##-##",
969
+ countryShortName: 'KZ',
970
+ prefix: '+76',
971
+ globalMask: '+7(6##)###-##-##'
752
972
  },
753
973
  {
754
- countryShortName: "KZ",
755
- prefix: "+77",
756
- globalMask: "+7(7##)###-##-##",
974
+ countryShortName: 'KZ',
975
+ prefix: '+77',
976
+ globalMask: '+7(7##)###-##-##'
757
977
  },
758
978
  {
759
- countryShortName: "LA",
760
- prefix: "+85620",
761
- globalMask: "+856(20##)###-###",
979
+ countryShortName: 'LA',
980
+ prefix: '+85620',
981
+ globalMask: '+856(20##)###-###'
762
982
  },
763
983
  {
764
- countryShortName: "LA",
765
- prefix: "+856",
766
- globalMask: "+856-##-###-###",
984
+ countryShortName: 'LA',
985
+ prefix: '+856',
986
+ globalMask: '+856-##-###-###'
767
987
  },
768
988
  {
769
- countryShortName: "LB",
770
- prefix: "+961",
771
- globalMask: "+961-##-###-###",
989
+ countryShortName: 'LB',
990
+ prefix: '+961',
991
+ globalMask: '+961-##-###-###'
772
992
  },
773
993
  {
774
- countryShortName: "LB",
775
- prefix: "+961",
776
- globalMask: "+961-#-###-###",
994
+ countryShortName: 'LB',
995
+ prefix: '+961',
996
+ globalMask: '+961-#-###-###'
777
997
  },
778
998
  {
779
- countryShortName: "LC",
780
- prefix: "+1758",
781
- globalMask: "+1(758)###-####",
999
+ countryShortName: 'LC',
1000
+ prefix: '+1758',
1001
+ globalMask: '+1(758)###-####'
782
1002
  },
783
1003
  {
784
- countryShortName: "LI",
785
- prefix: "+423",
786
- globalMask: "+423(###)###-####",
1004
+ countryShortName: 'LI',
1005
+ prefix: '+423',
1006
+ globalMask: '+423(###)###-####'
787
1007
  },
788
1008
  {
789
- countryShortName: "LK",
790
- prefix: "+94",
791
- globalMask: "+94-##-###-####",
1009
+ countryShortName: 'LK',
1010
+ prefix: '+94',
1011
+ globalMask: '+94-##-###-####'
792
1012
  },
793
1013
  {
794
- countryShortName: "LR",
795
- prefix: "+231",
796
- globalMask: "+231-##-###-###",
1014
+ countryShortName: 'LR',
1015
+ prefix: '+231',
1016
+ globalMask: '+231-##-###-###'
797
1017
  },
798
1018
  {
799
- countryShortName: "LS",
800
- prefix: "+266",
801
- globalMask: "+266-#-###-####",
1019
+ countryShortName: 'LS',
1020
+ prefix: '+266',
1021
+ globalMask: '+266-#-###-####'
802
1022
  },
803
1023
  {
804
- countryShortName: "LT",
805
- prefix: "+370",
806
- globalMask: "+370(###)##-###",
1024
+ countryShortName: 'LT',
1025
+ prefix: '+370',
1026
+ globalMask: '+370(###)##-###'
807
1027
  },
808
1028
  {
809
- countryShortName: "LU",
810
- prefix: "+352",
811
- globalMask: "+352(###)###-###",
1029
+ countryShortName: 'LU',
1030
+ prefix: '+352',
1031
+ globalMask: '+352(###)###-###'
812
1032
  },
813
1033
  {
814
- countryShortName: "LV",
815
- prefix: "+371",
816
- globalMask: "+371-##-###-###",
1034
+ countryShortName: 'LV',
1035
+ prefix: '+371',
1036
+ globalMask: '+371-##-###-###'
817
1037
  },
818
1038
  {
819
- countryShortName: "LY",
820
- prefix: "+218",
821
- globalMask: "+218-##-###-###",
1039
+ countryShortName: 'LY',
1040
+ prefix: '+218',
1041
+ globalMask: '+218-##-###-###'
822
1042
  },
823
1043
  {
824
- countryShortName: "LY",
825
- prefix: "+21821",
826
- globalMask: "+218-21-###-####",
1044
+ countryShortName: 'LY',
1045
+ prefix: '+21821',
1046
+ globalMask: '+218-21-###-####'
827
1047
  },
828
1048
  {
829
- countryShortName: "MA",
830
- prefix: "+212",
831
- globalMask: "+212-##-####-###",
1049
+ countryShortName: 'MA',
1050
+ prefix: '+212',
1051
+ globalMask: '+212-##-####-###'
832
1052
  },
833
1053
  {
834
- countryShortName: "MC",
835
- prefix: "+377",
836
- globalMask: "+377(###)###-###",
1054
+ countryShortName: 'MC',
1055
+ prefix: '+377',
1056
+ globalMask: '+377(###)###-###'
837
1057
  },
838
1058
  {
839
- countryShortName: "MC",
840
- prefix: "+377",
841
- globalMask: "+377-##-###-###",
1059
+ countryShortName: 'MC',
1060
+ prefix: '+377',
1061
+ globalMask: '+377-##-###-###'
842
1062
  },
843
1063
  {
844
- countryShortName: "MD",
845
- prefix: "+373",
846
- globalMask: "+373-####-####",
1064
+ countryShortName: 'MD',
1065
+ prefix: '+373',
1066
+ globalMask: '+373-####-####'
847
1067
  },
848
1068
  {
849
- countryShortName: "ME",
850
- prefix: "+382",
851
- globalMask: "+382-##-###-###",
1069
+ countryShortName: 'ME',
1070
+ prefix: '+382',
1071
+ globalMask: '+382-##-###-###'
852
1072
  },
853
1073
  {
854
- countryShortName: "MG",
855
- prefix: "+261",
856
- globalMask: "+261-##-##-#####",
1074
+ countryShortName: 'MG',
1075
+ prefix: '+261',
1076
+ globalMask: '+261-##-##-#####'
857
1077
  },
858
1078
  {
859
- countryShortName: "MH",
860
- prefix: "+692",
861
- globalMask: "+692-###-####",
1079
+ countryShortName: 'MH',
1080
+ prefix: '+692',
1081
+ globalMask: '+692-###-####'
862
1082
  },
863
1083
  {
864
- countryShortName: "MK",
865
- prefix: "+389",
866
- globalMask: "+389-##-###-###",
1084
+ countryShortName: 'MK',
1085
+ prefix: '+389',
1086
+ globalMask: '+389-##-###-###'
867
1087
  },
868
1088
  {
869
- countryShortName: "ML",
870
- prefix: "+223",
871
- globalMask: "+223-##-##-####",
1089
+ countryShortName: 'ML',
1090
+ prefix: '+223',
1091
+ globalMask: '+223-##-##-####'
872
1092
  },
873
1093
  {
874
- countryShortName: "MM",
875
- prefix: "+95",
876
- globalMask: "+95-##-###-###",
1094
+ countryShortName: 'MM',
1095
+ prefix: '+95',
1096
+ globalMask: '+95-##-###-###'
877
1097
  },
878
1098
  {
879
- countryShortName: "MM",
880
- prefix: "+95",
881
- globalMask: "+95-#-###-###",
1099
+ countryShortName: 'MM',
1100
+ prefix: '+95',
1101
+ globalMask: '+95-#-###-###'
882
1102
  },
883
1103
  {
884
- countryShortName: "MM",
885
- prefix: "+95",
886
- globalMask: "+95-###-###",
1104
+ countryShortName: 'MM',
1105
+ prefix: '+95',
1106
+ globalMask: '+95-###-###'
887
1107
  },
888
1108
  {
889
- countryShortName: "MN",
890
- prefix: "+976",
891
- globalMask: "+976-##-##-####",
1109
+ countryShortName: 'MN',
1110
+ prefix: '+976',
1111
+ globalMask: '+976-##-##-####'
892
1112
  },
893
1113
  {
894
- countryShortName: "MO",
895
- prefix: "+853",
896
- globalMask: "+853-####-####",
1114
+ countryShortName: 'MO',
1115
+ prefix: '+853',
1116
+ globalMask: '+853-####-####'
897
1117
  },
898
1118
  {
899
- countryShortName: "MP",
900
- prefix: "+1670",
901
- globalMask: "+1(670)###-####",
1119
+ countryShortName: 'MP',
1120
+ prefix: '+1670',
1121
+ globalMask: '+1(670)###-####'
902
1122
  },
903
1123
  {
904
- countryShortName: "MQ",
905
- prefix: "+596",
906
- globalMask: "+596(###)##-##-##",
1124
+ countryShortName: 'MQ',
1125
+ prefix: '+596',
1126
+ globalMask: '+596(###)##-##-##'
907
1127
  },
908
1128
  {
909
- countryShortName: "MR",
910
- prefix: "+222",
911
- globalMask: "+222-##-##-####",
1129
+ countryShortName: 'MR',
1130
+ prefix: '+222',
1131
+ globalMask: '+222-##-##-####'
912
1132
  },
913
1133
  {
914
- countryShortName: "MS",
915
- prefix: "+1664",
916
- globalMask: "+1(664)###-####",
1134
+ countryShortName: 'MS',
1135
+ prefix: '+1664',
1136
+ globalMask: '+1(664)###-####'
917
1137
  },
918
1138
  {
919
- countryShortName: "MT",
920
- prefix: "+356",
921
- globalMask: "+356-####-####",
1139
+ countryShortName: 'MT',
1140
+ prefix: '+356',
1141
+ globalMask: '+356-####-####'
922
1142
  },
923
1143
  {
924
- countryShortName: "MU",
925
- prefix: "+230",
926
- globalMask: "+230-###-####",
1144
+ countryShortName: 'MU',
1145
+ prefix: '+230',
1146
+ globalMask: '+230-###-####'
927
1147
  },
928
1148
  {
929
- countryShortName: "MV",
930
- prefix: "+960",
931
- globalMask: "+960-###-####",
1149
+ countryShortName: 'MV',
1150
+ prefix: '+960',
1151
+ globalMask: '+960-###-####'
932
1152
  },
933
1153
  {
934
- countryShortName: "MW",
935
- prefix: "+2651",
936
- globalMask: "+265-1-###-###",
1154
+ countryShortName: 'MW',
1155
+ prefix: '+2651',
1156
+ globalMask: '+265-1-###-###'
937
1157
  },
938
1158
  {
939
- countryShortName: "MW",
940
- prefix: "+265",
941
- globalMask: "+265-#-####-####",
1159
+ countryShortName: 'MW',
1160
+ prefix: '+265',
1161
+ globalMask: '+265-#-####-####'
942
1162
  },
943
1163
  {
944
- countryShortName: "MX",
945
- prefix: "+52",
946
- globalMask: "+52(###)###-####",
1164
+ countryShortName: 'MX',
1165
+ prefix: '+52',
1166
+ globalMask: '+52(###)###-####'
947
1167
  },
948
1168
  {
949
- countryShortName: "MX",
950
- prefix: "+52",
951
- globalMask: "+52-##-##-####",
1169
+ countryShortName: 'MX',
1170
+ prefix: '+52',
1171
+ globalMask: '+52-##-##-####'
952
1172
  },
953
1173
  {
954
- countryShortName: "MY",
955
- prefix: "+60",
956
- globalMask: "+60-##-###-####",
1174
+ countryShortName: 'MY',
1175
+ prefix: '+60',
1176
+ globalMask: '+60-##-###-####'
957
1177
  },
958
1178
  {
959
- countryShortName: "MY",
960
- prefix: "+60",
961
- globalMask: "+60(###)###-###",
1179
+ countryShortName: 'MY',
1180
+ prefix: '+60',
1181
+ globalMask: '+60(###)###-###'
962
1182
  },
963
1183
  {
964
- countryShortName: "MY",
965
- prefix: "+60",
966
- globalMask: "+60-##-###-###",
1184
+ countryShortName: 'MY',
1185
+ prefix: '+60',
1186
+ globalMask: '+60-##-###-###'
967
1187
  },
968
1188
  {
969
- countryShortName: "MY",
970
- prefix: "+60",
971
- globalMask: "+60-#-###-###",
1189
+ countryShortName: 'MY',
1190
+ prefix: '+60',
1191
+ globalMask: '+60-#-###-###'
972
1192
  },
973
1193
  {
974
- countryShortName: "MZ",
975
- prefix: "+258",
976
- globalMask: "+258-##-###-###",
1194
+ countryShortName: 'MZ',
1195
+ prefix: '+258',
1196
+ globalMask: '+258-##-###-###'
977
1197
  },
978
1198
  {
979
- countryShortName: "NA",
980
- prefix: "+264",
981
- globalMask: "+264-##-###-####",
1199
+ countryShortName: 'NA',
1200
+ prefix: '+264',
1201
+ globalMask: '+264-##-###-####'
982
1202
  },
983
1203
  {
984
- countryShortName: "NC",
985
- prefix: "+687",
986
- globalMask: "+687-##-####",
1204
+ countryShortName: 'NC',
1205
+ prefix: '+687',
1206
+ globalMask: '+687-##-####'
987
1207
  },
988
1208
  {
989
- countryShortName: "NE",
990
- prefix: "+227",
991
- globalMask: "+227-##-##-####",
1209
+ countryShortName: 'NE',
1210
+ prefix: '+227',
1211
+ globalMask: '+227-##-##-####'
992
1212
  },
993
1213
  {
994
- countryShortName: "NF",
995
- prefix: "+6723",
996
- globalMask: "+672-3##-###",
1214
+ countryShortName: 'NF',
1215
+ prefix: '+6723',
1216
+ globalMask: '+672-3##-###'
997
1217
  },
998
1218
  {
999
- countryShortName: "NG",
1000
- prefix: "+234",
1001
- globalMask: "+234(###)###-####",
1219
+ countryShortName: 'NG',
1220
+ prefix: '+234',
1221
+ globalMask: '+234(###)###-####'
1002
1222
  },
1003
1223
  {
1004
- countryShortName: "NG",
1005
- prefix: "+234",
1006
- globalMask: "+234-##-###-###",
1224
+ countryShortName: 'NG',
1225
+ prefix: '+234',
1226
+ globalMask: '+234-##-###-###'
1007
1227
  },
1008
1228
  {
1009
- countryShortName: "NG",
1010
- prefix: "+234",
1011
- globalMask: "+234-##-###-##",
1229
+ countryShortName: 'NG',
1230
+ prefix: '+234',
1231
+ globalMask: '+234-##-###-##'
1012
1232
  },
1013
1233
  {
1014
- countryShortName: "NG",
1015
- prefix: "+234",
1016
- globalMask: "+234(###)###-####",
1234
+ countryShortName: 'NG',
1235
+ prefix: '+234',
1236
+ globalMask: '+234(###)###-####'
1017
1237
  },
1018
1238
  {
1019
- countryShortName: "NI",
1020
- prefix: "+505",
1021
- globalMask: "+505-####-####",
1239
+ countryShortName: 'NI',
1240
+ prefix: '+505',
1241
+ globalMask: '+505-####-####'
1022
1242
  },
1023
1243
  {
1024
- countryShortName: "NL",
1025
- prefix: "+31",
1026
- globalMask: "+31-##-###-####",
1244
+ countryShortName: 'NL',
1245
+ prefix: '+31',
1246
+ globalMask: '+31-##-###-####'
1027
1247
  },
1028
1248
  {
1029
- countryShortName: "NO",
1030
- prefix: "+47",
1031
- globalMask: "+47(###)##-###",
1249
+ countryShortName: 'NO',
1250
+ prefix: '+47',
1251
+ globalMask: '+47(###)##-###'
1032
1252
  },
1033
1253
  {
1034
- countryShortName: "NP",
1035
- prefix: "+977",
1036
- globalMask: "+977-##-###-###",
1254
+ countryShortName: 'NP',
1255
+ prefix: '+977',
1256
+ globalMask: '+977-##-###-###'
1037
1257
  },
1038
1258
  {
1039
- countryShortName: "NR",
1040
- prefix: "+674",
1041
- globalMask: "+674-###-####",
1259
+ countryShortName: 'NR',
1260
+ prefix: '+674',
1261
+ globalMask: '+674-###-####'
1042
1262
  },
1043
1263
  {
1044
- countryShortName: "NU",
1045
- prefix: "+683",
1046
- globalMask: "+683-####",
1264
+ countryShortName: 'NU',
1265
+ prefix: '+683',
1266
+ globalMask: '+683-####'
1047
1267
  },
1048
1268
  {
1049
- countryShortName: "NZ",
1050
- prefix: "+64",
1051
- globalMask: "+64(###)###-###",
1269
+ countryShortName: 'NZ',
1270
+ prefix: '+64',
1271
+ globalMask: '+64(###)###-###'
1052
1272
  },
1053
1273
  {
1054
- countryShortName: "NZ",
1055
- prefix: "+64",
1056
- globalMask: "+64-##-###-###",
1274
+ countryShortName: 'NZ',
1275
+ prefix: '+64',
1276
+ globalMask: '+64-##-###-###'
1057
1277
  },
1058
1278
  {
1059
- countryShortName: "NZ",
1060
- prefix: "+64",
1061
- globalMask: "+64(###)###-####",
1279
+ countryShortName: 'NZ',
1280
+ prefix: '+64',
1281
+ globalMask: '+64(###)###-####'
1062
1282
  },
1063
1283
  {
1064
- countryShortName: "OM",
1065
- prefix: "+968",
1066
- globalMask: "+968-##-###-###",
1284
+ countryShortName: 'OM',
1285
+ prefix: '+968',
1286
+ globalMask: '+968-##-###-###'
1067
1287
  },
1068
1288
  {
1069
- countryShortName: "PA",
1070
- prefix: "+507",
1071
- globalMask: "+507-###-####",
1289
+ countryShortName: 'PA',
1290
+ prefix: '+507',
1291
+ globalMask: '+507-###-####'
1072
1292
  },
1073
1293
  {
1074
- countryShortName: "PE",
1075
- prefix: "+51",
1076
- globalMask: "+51(###)###-###",
1294
+ countryShortName: 'PE',
1295
+ prefix: '+51',
1296
+ globalMask: '+51(###)###-###'
1077
1297
  },
1078
1298
  {
1079
- countryShortName: "PF",
1080
- prefix: "+689",
1081
- globalMask: "+689-##-##-##",
1299
+ countryShortName: 'PF',
1300
+ prefix: '+689',
1301
+ globalMask: '+689-##-##-##'
1082
1302
  },
1083
1303
  {
1084
- countryShortName: "PG",
1085
- prefix: "+675",
1086
- globalMask: "+675(###)##-###",
1304
+ countryShortName: 'PG',
1305
+ prefix: '+675',
1306
+ globalMask: '+675(###)##-###'
1087
1307
  },
1088
1308
  {
1089
- countryShortName: "PH",
1090
- prefix: "+63",
1091
- globalMask: "+63(###)###-####",
1309
+ countryShortName: 'PH',
1310
+ prefix: '+63',
1311
+ globalMask: '+63(###)###-####'
1092
1312
  },
1093
1313
  {
1094
- countryShortName: "PK",
1095
- prefix: "+92",
1096
- globalMask: "+92(###)###-####",
1314
+ countryShortName: 'PK',
1315
+ prefix: '+92',
1316
+ globalMask: '+92(###)###-####'
1097
1317
  },
1098
1318
  {
1099
- countryShortName: "PL",
1100
- prefix: "+48",
1101
- globalMask: "+48(###)###-###",
1319
+ countryShortName: 'PL',
1320
+ prefix: '+48',
1321
+ globalMask: '+48(###)###-###'
1102
1322
  },
1103
1323
  {
1104
- countryShortName: "PS",
1105
- prefix: "+970",
1106
- globalMask: "+970-##-###-####",
1324
+ countryShortName: 'PS',
1325
+ prefix: '+970',
1326
+ globalMask: '+970-##-###-####'
1107
1327
  },
1108
1328
  {
1109
- countryShortName: "PT",
1110
- prefix: "+351",
1111
- globalMask: "+351-##-###-####",
1329
+ countryShortName: 'PT',
1330
+ prefix: '+351',
1331
+ globalMask: '+351-##-###-####'
1112
1332
  },
1113
1333
  {
1114
- countryShortName: "PW",
1115
- prefix: "+680",
1116
- globalMask: "+680-###-####",
1334
+ countryShortName: 'PW',
1335
+ prefix: '+680',
1336
+ globalMask: '+680-###-####'
1117
1337
  },
1118
1338
  {
1119
- countryShortName: "PY",
1120
- prefix: "+595",
1121
- globalMask: "+595(###)###-###",
1339
+ countryShortName: 'PY',
1340
+ prefix: '+595',
1341
+ globalMask: '+595(###)###-###'
1122
1342
  },
1123
1343
  {
1124
- countryShortName: "QA",
1125
- prefix: "+974",
1126
- globalMask: "+974-####-####",
1344
+ countryShortName: 'QA',
1345
+ prefix: '+974',
1346
+ globalMask: '+974-####-####'
1127
1347
  },
1128
1348
  {
1129
- countryShortName: "RE",
1130
- prefix: "+262",
1131
- globalMask: "+262-#####-####",
1349
+ countryShortName: 'RE',
1350
+ prefix: '+262',
1351
+ globalMask: '+262-#####-####'
1132
1352
  },
1133
1353
  {
1134
- countryShortName: "RO",
1135
- prefix: "+40",
1136
- globalMask: "+40-##-###-####",
1354
+ countryShortName: 'RO',
1355
+ prefix: '+40',
1356
+ globalMask: '+40-##-###-####'
1137
1357
  },
1138
1358
  {
1139
- countryShortName: "RS",
1140
- prefix: "+381",
1141
- globalMask: "+381-##-###-####",
1359
+ countryShortName: 'RS',
1360
+ prefix: '+381',
1361
+ globalMask: '+381-##-###-####'
1142
1362
  },
1143
1363
  {
1144
- countryShortName: "RU",
1145
- prefix: "+7",
1146
- globalMask: "+7(###)###-##-##",
1364
+ countryShortName: 'RU',
1365
+ prefix: '+7',
1366
+ globalMask: '+7(###)###-##-##'
1147
1367
  },
1148
1368
  {
1149
- countryShortName: "RW",
1150
- prefix: "+250",
1151
- globalMask: "+250(###)###-###",
1369
+ countryShortName: 'RW',
1370
+ prefix: '+250',
1371
+ globalMask: '+250(###)###-###'
1152
1372
  },
1153
1373
  {
1154
- countryShortName: "SA",
1155
- prefix: "+9665",
1156
- globalMask: "+966-5-####-####",
1374
+ countryShortName: 'SA',
1375
+ prefix: '+9665',
1376
+ globalMask: '+966-5-####-####'
1157
1377
  },
1158
1378
  {
1159
- countryShortName: "SA",
1160
- prefix: "+966",
1161
- globalMask: "+966-#-###-####",
1379
+ countryShortName: 'SA',
1380
+ prefix: '+966',
1381
+ globalMask: '+966-#-###-####'
1162
1382
  },
1163
1383
  {
1164
- countryShortName: "SB",
1165
- prefix: "+677",
1166
- globalMask: "+677-###-####",
1384
+ countryShortName: 'SB',
1385
+ prefix: '+677',
1386
+ globalMask: '+677-###-####'
1167
1387
  },
1168
1388
  {
1169
- countryShortName: "SB",
1170
- prefix: "+677",
1171
- globalMask: "+677-#####",
1389
+ countryShortName: 'SB',
1390
+ prefix: '+677',
1391
+ globalMask: '+677-#####'
1172
1392
  },
1173
1393
  {
1174
- countryShortName: "SC",
1175
- prefix: "+248",
1176
- globalMask: "+248-#-###-###",
1394
+ countryShortName: 'SC',
1395
+ prefix: '+248',
1396
+ globalMask: '+248-#-###-###'
1177
1397
  },
1178
1398
  {
1179
- countryShortName: "SD",
1180
- prefix: "+249",
1181
- globalMask: "+249-##-###-####",
1399
+ countryShortName: 'SD',
1400
+ prefix: '+249',
1401
+ globalMask: '+249-##-###-####'
1182
1402
  },
1183
1403
  {
1184
- countryShortName: "SE",
1185
- prefix: "+46",
1186
- globalMask: "+46-##-###-####",
1404
+ countryShortName: 'SE',
1405
+ prefix: '+46',
1406
+ globalMask: '+46-##-###-####'
1187
1407
  },
1188
1408
  {
1189
- countryShortName: "SG",
1190
- prefix: "+65",
1191
- globalMask: "+65-####-####",
1409
+ countryShortName: 'SG',
1410
+ prefix: '+65',
1411
+ globalMask: '+65-####-####'
1192
1412
  },
1193
1413
  {
1194
- countryShortName: "SH",
1195
- prefix: "+290",
1196
- globalMask: "+290-####",
1414
+ countryShortName: 'SH',
1415
+ prefix: '+290',
1416
+ globalMask: '+290-####'
1197
1417
  },
1198
1418
  {
1199
- countryShortName: "SH",
1200
- prefix: "+290",
1201
- globalMask: "+290-####",
1419
+ countryShortName: 'SH',
1420
+ prefix: '+290',
1421
+ globalMask: '+290-####'
1202
1422
  },
1203
1423
  {
1204
- countryShortName: "SI",
1205
- prefix: "+386",
1206
- globalMask: "+386-##-###-###",
1424
+ countryShortName: 'SI',
1425
+ prefix: '+386',
1426
+ globalMask: '+386-##-###-###'
1207
1427
  },
1208
1428
  {
1209
- countryShortName: "SK",
1210
- prefix: "+421",
1211
- globalMask: "+421(###)###-###",
1429
+ countryShortName: 'SK',
1430
+ prefix: '+421',
1431
+ globalMask: '+421(###)###-###'
1212
1432
  },
1213
1433
  {
1214
- countryShortName: "SL",
1215
- prefix: "+232",
1216
- globalMask: "+232-##-######",
1434
+ countryShortName: 'SL',
1435
+ prefix: '+232',
1436
+ globalMask: '+232-##-######'
1217
1437
  },
1218
1438
  {
1219
- countryShortName: "SM",
1220
- prefix: "+378",
1221
- globalMask: "+378-####-######",
1439
+ countryShortName: 'SM',
1440
+ prefix: '+378',
1441
+ globalMask: '+378-####-######'
1222
1442
  },
1223
1443
  {
1224
- countryShortName: "SN",
1225
- prefix: "+221",
1226
- globalMask: "+221-##-###-####",
1444
+ countryShortName: 'SN',
1445
+ prefix: '+221',
1446
+ globalMask: '+221-##-###-####'
1227
1447
  },
1228
1448
  {
1229
- countryShortName: "SO",
1230
- prefix: "+252",
1231
- globalMask: "+252-##-###-###",
1449
+ countryShortName: 'SO',
1450
+ prefix: '+252',
1451
+ globalMask: '+252-##-###-###'
1232
1452
  },
1233
1453
  {
1234
- countryShortName: "SO",
1235
- prefix: "+252",
1236
- globalMask: "+252-#-###-###",
1454
+ countryShortName: 'SO',
1455
+ prefix: '+252',
1456
+ globalMask: '+252-#-###-###'
1237
1457
  },
1238
1458
  {
1239
- countryShortName: "SO",
1240
- prefix: "+252",
1241
- globalMask: "+252-#-###-###",
1459
+ countryShortName: 'SO',
1460
+ prefix: '+252',
1461
+ globalMask: '+252-#-###-###'
1242
1462
  },
1243
1463
  {
1244
- countryShortName: "SR",
1245
- prefix: "+597",
1246
- globalMask: "+597-###-####",
1464
+ countryShortName: 'SR',
1465
+ prefix: '+597',
1466
+ globalMask: '+597-###-####'
1247
1467
  },
1248
1468
  {
1249
- countryShortName: "SR",
1250
- prefix: "+597",
1251
- globalMask: "+597-###-###",
1469
+ countryShortName: 'SR',
1470
+ prefix: '+597',
1471
+ globalMask: '+597-###-###'
1252
1472
  },
1253
1473
  {
1254
- countryShortName: "SS",
1255
- prefix: "+211",
1256
- globalMask: "+211-##-###-####",
1474
+ countryShortName: 'SS',
1475
+ prefix: '+211',
1476
+ globalMask: '+211-##-###-####'
1257
1477
  },
1258
1478
  {
1259
- countryShortName: "ST",
1260
- prefix: "+239",
1261
- globalMask: "+239-##-#####",
1479
+ countryShortName: 'ST',
1480
+ prefix: '+239',
1481
+ globalMask: '+239-##-#####'
1262
1482
  },
1263
1483
  {
1264
- countryShortName: "SV",
1265
- prefix: "+503",
1266
- globalMask: "+503-##-##-####",
1484
+ countryShortName: 'SV',
1485
+ prefix: '+503',
1486
+ globalMask: '+503-##-##-####'
1267
1487
  },
1268
1488
  {
1269
- countryShortName: "SX",
1270
- prefix: "+1721",
1271
- globalMask: "+1(721)###-####",
1489
+ countryShortName: 'SX',
1490
+ prefix: '+1721',
1491
+ globalMask: '+1(721)###-####'
1272
1492
  },
1273
1493
  {
1274
- countryShortName: "SY",
1275
- prefix: "+963",
1276
- globalMask: "+963-##-####-###",
1494
+ countryShortName: 'SY',
1495
+ prefix: '+963',
1496
+ globalMask: '+963-##-####-###'
1277
1497
  },
1278
1498
  {
1279
- countryShortName: "SZ",
1280
- prefix: "+268",
1281
- globalMask: "+268-##-##-####",
1499
+ countryShortName: 'SZ',
1500
+ prefix: '+268',
1501
+ globalMask: '+268-##-##-####'
1282
1502
  },
1283
1503
  {
1284
- countryShortName: "TC",
1285
- prefix: "+1649",
1286
- globalMask: "+1(649)###-####",
1504
+ countryShortName: 'TC',
1505
+ prefix: '+1649',
1506
+ globalMask: '+1(649)###-####'
1287
1507
  },
1288
1508
  {
1289
- countryShortName: "TD",
1290
- prefix: "+235",
1291
- globalMask: "+235-##-##-##-##",
1509
+ countryShortName: 'TD',
1510
+ prefix: '+235',
1511
+ globalMask: '+235-##-##-##-##'
1292
1512
  },
1293
1513
  {
1294
- countryShortName: "TG",
1295
- prefix: "+228",
1296
- globalMask: "+228-##-###-###",
1514
+ countryShortName: 'TG',
1515
+ prefix: '+228',
1516
+ globalMask: '+228-##-###-###'
1297
1517
  },
1298
1518
  {
1299
- countryShortName: "TH",
1300
- prefix: "+66",
1301
- globalMask: "+66-##-###-####",
1519
+ countryShortName: 'TH',
1520
+ prefix: '+66',
1521
+ globalMask: '+66-##-###-####'
1302
1522
  },
1303
1523
  {
1304
- countryShortName: "TH",
1305
- prefix: "+66",
1306
- globalMask: "+66-##-###-###",
1524
+ countryShortName: 'TH',
1525
+ prefix: '+66',
1526
+ globalMask: '+66-##-###-###'
1307
1527
  },
1308
1528
  {
1309
- countryShortName: "TJ",
1310
- prefix: "+992",
1311
- globalMask: "+992-##-###-####",
1529
+ countryShortName: 'TJ',
1530
+ prefix: '+992',
1531
+ globalMask: '+992-##-###-####'
1312
1532
  },
1313
1533
  {
1314
- countryShortName: "TK",
1315
- prefix: "+690",
1316
- globalMask: "+690-####",
1534
+ countryShortName: 'TK',
1535
+ prefix: '+690',
1536
+ globalMask: '+690-####'
1317
1537
  },
1318
1538
  {
1319
- countryShortName: "TL",
1320
- prefix: "+670",
1321
- globalMask: "+670-###-####",
1539
+ countryShortName: 'TL',
1540
+ prefix: '+670',
1541
+ globalMask: '+670-###-####'
1322
1542
  },
1323
1543
  {
1324
- countryShortName: "TL",
1325
- prefix: "+67077",
1326
- globalMask: "+670-77#-#####",
1544
+ countryShortName: 'TL',
1545
+ prefix: '+67077',
1546
+ globalMask: '+670-77#-#####'
1327
1547
  },
1328
1548
  {
1329
- countryShortName: "TL",
1330
- prefix: "+67078",
1331
- globalMask: "+670-78#-#####",
1549
+ countryShortName: 'TL',
1550
+ prefix: '+67078',
1551
+ globalMask: '+670-78#-#####'
1332
1552
  },
1333
1553
  {
1334
- countryShortName: "TM",
1335
- prefix: "+993",
1336
- globalMask: "+993-#-###-####",
1554
+ countryShortName: 'TM',
1555
+ prefix: '+993',
1556
+ globalMask: '+993-#-###-####'
1337
1557
  },
1338
1558
  {
1339
- countryShortName: "TN",
1340
- prefix: "+216",
1341
- globalMask: "+216-##-###-###",
1559
+ countryShortName: 'TN',
1560
+ prefix: '+216',
1561
+ globalMask: '+216-##-###-###'
1342
1562
  },
1343
1563
  {
1344
- countryShortName: "TO",
1345
- prefix: "+676",
1346
- globalMask: "+676-#####",
1564
+ countryShortName: 'TO',
1565
+ prefix: '+676',
1566
+ globalMask: '+676-#####'
1347
1567
  },
1348
1568
  {
1349
- countryShortName: "TR",
1350
- prefix: "+90",
1351
- globalMask: "+90(###)###-####",
1569
+ countryShortName: 'TR',
1570
+ prefix: '+90',
1571
+ globalMask: '+90(###)###-####'
1352
1572
  },
1353
1573
  {
1354
- countryShortName: "TT",
1355
- prefix: "+1868",
1356
- globalMask: "+1(868)###-####",
1574
+ countryShortName: 'TT',
1575
+ prefix: '+1868',
1576
+ globalMask: '+1(868)###-####'
1357
1577
  },
1358
1578
  {
1359
- countryShortName: "TV",
1360
- prefix: "+68890",
1361
- globalMask: "+688-90####",
1579
+ countryShortName: 'TV',
1580
+ prefix: '+68890',
1581
+ globalMask: '+688-90####'
1362
1582
  },
1363
1583
  {
1364
- countryShortName: "TV",
1365
- prefix: "+6882",
1366
- globalMask: "+688-2####",
1584
+ countryShortName: 'TV',
1585
+ prefix: '+6882',
1586
+ globalMask: '+688-2####'
1367
1587
  },
1368
1588
  {
1369
- countryShortName: "TW",
1370
- prefix: "+886",
1371
- globalMask: "+886-#-####-####",
1589
+ countryShortName: 'TW',
1590
+ prefix: '+886',
1591
+ globalMask: '+886-#-####-####'
1372
1592
  },
1373
1593
  {
1374
- countryShortName: "TW",
1375
- prefix: "+886",
1376
- globalMask: "+886-####-####",
1594
+ countryShortName: 'TW',
1595
+ prefix: '+886',
1596
+ globalMask: '+886-####-####'
1377
1597
  },
1378
1598
  {
1379
- countryShortName: "TZ",
1380
- prefix: "+255",
1381
- globalMask: "+255-##-###-####",
1599
+ countryShortName: 'TZ',
1600
+ prefix: '+255',
1601
+ globalMask: '+255-##-###-####'
1382
1602
  },
1383
1603
  {
1384
- countryShortName: "UA",
1385
- prefix: "+380",
1386
- globalMask: "+380(##)###-##-##",
1604
+ countryShortName: 'UA',
1605
+ prefix: '+380',
1606
+ globalMask: '+380(##)###-##-##'
1387
1607
  },
1388
1608
  {
1389
- countryShortName: "UG",
1390
- prefix: "+256",
1391
- globalMask: "+256(###)###-###",
1609
+ countryShortName: 'UG',
1610
+ prefix: '+256',
1611
+ globalMask: '+256(###)###-###'
1392
1612
  },
1393
1613
  {
1394
- countryShortName: "UK",
1395
- prefix: "+44",
1396
- globalMask: "+44-##-####-####",
1614
+ countryShortName: 'UK',
1615
+ prefix: '+44',
1616
+ globalMask: '+44-##-####-####'
1397
1617
  },
1398
1618
  {
1399
- countryShortName: "UY",
1400
- prefix: "+598",
1401
- globalMask: "+598-#-###-##-##",
1619
+ countryShortName: 'UY',
1620
+ prefix: '+598',
1621
+ globalMask: '+598-#-###-##-##'
1402
1622
  },
1403
1623
  {
1404
- countryShortName: "UZ",
1405
- prefix: "+998",
1406
- globalMask: "+998-##-###-####",
1624
+ countryShortName: 'UZ',
1625
+ prefix: '+998',
1626
+ globalMask: '+998-##-###-####'
1407
1627
  },
1408
1628
  {
1409
- countryShortName: "VA",
1410
- prefix: "+396698",
1411
- globalMask: "+39-6-698-#####",
1629
+ countryShortName: 'VA',
1630
+ prefix: '+396698',
1631
+ globalMask: '+39-6-698-#####'
1412
1632
  },
1413
1633
  {
1414
- countryShortName: "VC",
1415
- prefix: "+1784",
1416
- globalMask: "+1(784)###-####",
1634
+ countryShortName: 'VC',
1635
+ prefix: '+1784',
1636
+ globalMask: '+1(784)###-####'
1417
1637
  },
1418
1638
  {
1419
- countryShortName: "VE",
1420
- prefix: "+58",
1421
- globalMask: "+58(###)###-####",
1639
+ countryShortName: 'VE',
1640
+ prefix: '+58',
1641
+ globalMask: '+58(###)###-####'
1422
1642
  },
1423
1643
  {
1424
- countryShortName: "VG",
1425
- prefix: "+1284",
1426
- globalMask: "+1(284)###-####",
1644
+ countryShortName: 'VG',
1645
+ prefix: '+1284',
1646
+ globalMask: '+1(284)###-####'
1427
1647
  },
1428
1648
  {
1429
- countryShortName: "VI",
1430
- prefix: "+1340",
1431
- globalMask: "+1(340)###-####",
1649
+ countryShortName: 'VI',
1650
+ prefix: '+1340',
1651
+ globalMask: '+1(340)###-####'
1432
1652
  },
1433
1653
  {
1434
- countryShortName: "VN",
1435
- prefix: "+84",
1436
- globalMask: "+84-##-####-###",
1654
+ countryShortName: 'VN',
1655
+ prefix: '+84',
1656
+ globalMask: '+84-##-####-###'
1437
1657
  },
1438
1658
  {
1439
- countryShortName: "VN",
1440
- prefix: "+84",
1441
- globalMask: "+84(###)####-###",
1659
+ countryShortName: 'VN',
1660
+ prefix: '+84',
1661
+ globalMask: '+84(###)####-###'
1442
1662
  },
1443
1663
  {
1444
- countryShortName: "VU",
1445
- prefix: "+678",
1446
- globalMask: "+678-##-#####",
1664
+ countryShortName: 'VU',
1665
+ prefix: '+678',
1666
+ globalMask: '+678-##-#####'
1447
1667
  },
1448
1668
  {
1449
- countryShortName: "VU",
1450
- prefix: "+678",
1451
- globalMask: "+678-#####",
1669
+ countryShortName: 'VU',
1670
+ prefix: '+678',
1671
+ globalMask: '+678-#####'
1452
1672
  },
1453
1673
  {
1454
- countryShortName: "WF",
1455
- prefix: "+681",
1456
- globalMask: "+681-##-####",
1674
+ countryShortName: 'WF',
1675
+ prefix: '+681',
1676
+ globalMask: '+681-##-####'
1457
1677
  },
1458
1678
  {
1459
- countryShortName: "WS",
1460
- prefix: "+685",
1461
- globalMask: "+685-##-####",
1679
+ countryShortName: 'WS',
1680
+ prefix: '+685',
1681
+ globalMask: '+685-##-####'
1462
1682
  },
1463
1683
  {
1464
- countryShortName: "YE",
1465
- prefix: "+967",
1466
- globalMask: "+967-###-###-###",
1684
+ countryShortName: 'YE',
1685
+ prefix: '+967',
1686
+ globalMask: '+967-###-###-###'
1467
1687
  },
1468
1688
  {
1469
- countryShortName: "YE",
1470
- prefix: "+967",
1471
- globalMask: "+967-#-###-###",
1689
+ countryShortName: 'YE',
1690
+ prefix: '+967',
1691
+ globalMask: '+967-#-###-###'
1472
1692
  },
1473
1693
  {
1474
- countryShortName: "YE",
1475
- prefix: "+967",
1476
- globalMask: "+967-##-###-###",
1694
+ countryShortName: 'YE',
1695
+ prefix: '+967',
1696
+ globalMask: '+967-##-###-###'
1477
1697
  },
1478
1698
  {
1479
- countryShortName: "ZA",
1480
- prefix: "+27",
1481
- globalMask: "+27-##-###-####",
1699
+ countryShortName: 'ZA',
1700
+ prefix: '+27',
1701
+ globalMask: '+27-##-###-####'
1482
1702
  },
1483
1703
  {
1484
- countryShortName: "ZM",
1485
- prefix: "+260",
1486
- globalMask: "+260-##-###-####",
1704
+ countryShortName: 'ZM',
1705
+ prefix: '+260',
1706
+ globalMask: '+260-##-###-####'
1487
1707
  },
1488
1708
  {
1489
- countryShortName: "ZW",
1490
- prefix: "+263",
1491
- globalMask: "+263-#-######",
1492
- },
1709
+ countryShortName: 'ZW',
1710
+ prefix: '+263',
1711
+ globalMask: '+263-#-######'
1712
+ }
1493
1713
  ];
1494
1714
 
1495
1715
  const DefaultPhoneMask = {
1496
- countryShortName: "IR",
1497
- prefix: "+98",
1498
- globalMask: "+00(000)000-0000",
1716
+ countryShortName: 'IR',
1717
+ prefix: '+98',
1718
+ globalMask: '+00(000)000-0000'
1499
1719
  };
1500
1720
  class NzFormlyFieldInputComponent extends FieldType {
1501
1721
  constructor() {
1502
1722
  super(...arguments);
1503
- this.unSubscribeAll$ = new Subject();
1723
+ this.destroyRef = inject(DestroyRef);
1504
1724
  }
1505
1725
  get type() {
1506
- return this.props.type ?? "text";
1726
+ return this.props.type ?? 'text';
1507
1727
  }
1508
1728
  get fieldID() {
1509
- return "control-" + this.field.key;
1729
+ return 'control-' + this.field.key;
1510
1730
  }
1511
1731
  get status() {
1512
- return this.formControl.touched && this.formControl.invalid ? "error" : "";
1732
+ return this.formControl.touched && this.formControl.invalid ? 'error' : '';
1513
1733
  }
1514
1734
  ngAfterViewInit() {
1515
1735
  this.createInitState();
1516
1736
  this.onValueChange();
1517
1737
  }
1518
1738
  createInitState() {
1519
- if (this.props.mask === "phone") {
1739
+ if (this.props.mask === 'phone') {
1520
1740
  this.mask = DefaultPhoneMask.globalMask;
1521
1741
  this.handlePhoneMask();
1522
1742
  }
@@ -1526,17 +1746,17 @@ class NzFormlyFieldInputComponent extends FieldType {
1526
1746
  }
1527
1747
  handlePhoneMask() {
1528
1748
  this.formControl.valueChanges
1529
- .pipe(takeUntil(this.unSubscribeAll$), tap((value) => {
1530
- if (value == "") {
1749
+ .pipe(takeUntilDestroyed(this.destroyRef), tap((value) => {
1750
+ if (value == '') {
1531
1751
  // hint: without setTimeout we don't have Ctrl + A -> delete
1532
1752
  setTimeout(() => {
1533
1753
  this.mask = DefaultPhoneMask.globalMask;
1534
1754
  });
1535
1755
  }
1536
1756
  else {
1537
- let mask = this.findAppropriateMask(value);
1757
+ const mask = this.findAppropriateMask(value);
1538
1758
  if (mask && this.mask !== mask.globalMask) {
1539
- this.mask = mask.globalMask?.replace(/#|[1-9]/g, "0");
1759
+ this.mask = mask.globalMask?.replace(/#|[1-9]/g, '0');
1540
1760
  }
1541
1761
  }
1542
1762
  }))
@@ -1544,15 +1764,15 @@ class NzFormlyFieldInputComponent extends FieldType {
1544
1764
  }
1545
1765
  onValueChange() {
1546
1766
  this.formControl.valueChanges
1547
- .pipe(takeUntil(this.unSubscribeAll$), debounceTime(300), tap((value) => {
1548
- if (typeof this.props?.change == "function") {
1767
+ .pipe(takeUntilDestroyed(this.destroyRef), tap((value) => {
1768
+ if (typeof this.props?.change == 'function') {
1549
1769
  this.props.change(this.field, value);
1550
1770
  }
1551
1771
  }))
1552
1772
  .subscribe();
1553
1773
  }
1554
1774
  findAppropriateMask(value) {
1555
- let newMask = CountryMasks2.filter(item => this.exactEquality(value, item.prefix)).find(item => value.length <= item.globalMask.length);
1775
+ const newMask = CountryMasks2.filter((item) => this.exactEquality(value, item.prefix)).find((item) => value.length <= item.globalMask.length);
1556
1776
  if (newMask)
1557
1777
  return newMask;
1558
1778
  return null;
@@ -1560,418 +1780,323 @@ class NzFormlyFieldInputComponent extends FieldType {
1560
1780
  exactEquality(str, prefix) {
1561
1781
  // hint: replace function removes all characters except numbers to return clean numeric string
1562
1782
  // hint: index of convince us to match prefix on first index of input value
1563
- let new_str = str.replace(/[^0-9.]/g, "");
1564
- let new_prefix = prefix.replace(/[^0-9.]/g, "");
1783
+ const new_str = str.replace(/[^0-9.]/g, '');
1784
+ const new_prefix = prefix.replace(/[^0-9.]/g, '');
1565
1785
  return new_str.indexOf(new_prefix) == 0;
1566
1786
  }
1567
1787
  changeShowPassword(input) {
1568
- if (input.type === "password") {
1569
- input.type = "text";
1788
+ if (input.type === 'password') {
1789
+ input.type = 'text';
1570
1790
  }
1571
1791
  else {
1572
- input.type = "password";
1792
+ input.type = 'password';
1573
1793
  }
1574
1794
  }
1575
1795
  showPassword(input) {
1576
- return input.type === "text";
1796
+ return input.type === 'text';
1577
1797
  }
1578
- ngOnDestroy() {
1579
- this.unSubscribeAll$.next();
1580
- this.unSubscribeAll$.complete();
1581
- }
1582
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1583
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NzFormlyFieldInputComponent, selector: "app-nz-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 [attr.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: [".show-password{z-index:5;opacity:.6;cursor:pointer;position:absolute;inset-inline-end:10px}\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: i2$1.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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions"], 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: i6.ɵ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"] }] }); }
1798
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1799
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: NzFormlyFieldInputComponent, isStandalone: true, selector: "app-nz-formly-field-input", usesInheritance: true, ngImport: i0, template: "<nz-input-group\n [nzAddOnAfter]=\"props.nzAddOnAfter\"\n [nzAddOnBefore]=\"props.nzAddOnBefore\"\n [nzAddOnAfterIcon]=\"props.nzAddOnAfterIcon\"\n [nzAddOnBeforeIcon]=\"props.nzAddOnBeforeIcon\"\n [nzPrefix]=\"props.nzPrefix\"\n [nzSuffix]=\"props.nzSuffix\"\n [nzSize]=\"props.nzSize || 'default'\"\n>\n <input\n #input\n nz-input\n [id]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"mask\"\n [thousandSeparator]=\"props.thousandSeparator\"\n [type]=\"type\"\n [nzStatus]=\"status\"\n [attr.disabled]=\"props.nzDisabled\"\n [readonly]=\"props.nzReadonly\"\n [placeholder]=\"props.nzPlaceholder\"\n [nzVariant]=\"props.nzBorderless ? 'borderless' : 'outlined'\"\n />\n @if (props.type === 'password') {\n <div class=\"nz-formly-show-password\">\n <span\n nz-icon\n nzTheme=\"outline\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"changeShowPassword(input)\"\n (keyup.enter)=\"changeShowPassword(input)\"\n [nzType]=\"showPassword(input) ? 'eye-invisible' : 'eye'\"\n ></span>\n </div>\n }\n</nz-input-group>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i3$2.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled", "readonly"], exportAs: ["nzInput"] }, { kind: "component", type: i3$2.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i3$2.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i4$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix", "value", "disabled", "touched"], outputs: ["valueChange", "touchedChange", "maskFilled"], exportAs: ["mask", "ngxMask"] }] }); }
1584
1800
  }
1585
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyFieldInputComponent, decorators: [{
1801
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldInputComponent, decorators: [{
1586
1802
  type: Component,
1587
- args: [{ selector: "app-nz-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 [attr.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: [".show-password{z-index:5;opacity:.6;cursor:pointer;position:absolute;inset-inline-end:10px}\n"] }]
1803
+ args: [{ selector: 'app-nz-formly-field-input', imports: [
1804
+ CommonModule,
1805
+ ReactiveFormsModule,
1806
+ FormlyModule,
1807
+ NzInputModule,
1808
+ NzIconModule,
1809
+ NgxMaskDirective
1810
+ ], template: "<nz-input-group\n [nzAddOnAfter]=\"props.nzAddOnAfter\"\n [nzAddOnBefore]=\"props.nzAddOnBefore\"\n [nzAddOnAfterIcon]=\"props.nzAddOnAfterIcon\"\n [nzAddOnBeforeIcon]=\"props.nzAddOnBeforeIcon\"\n [nzPrefix]=\"props.nzPrefix\"\n [nzSuffix]=\"props.nzSuffix\"\n [nzSize]=\"props.nzSize || 'default'\"\n>\n <input\n #input\n nz-input\n [id]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"mask\"\n [thousandSeparator]=\"props.thousandSeparator\"\n [type]=\"type\"\n [nzStatus]=\"status\"\n [attr.disabled]=\"props.nzDisabled\"\n [readonly]=\"props.nzReadonly\"\n [placeholder]=\"props.nzPlaceholder\"\n [nzVariant]=\"props.nzBorderless ? 'borderless' : 'outlined'\"\n />\n @if (props.type === 'password') {\n <div class=\"nz-formly-show-password\">\n <span\n nz-icon\n nzTheme=\"outline\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"changeShowPassword(input)\"\n (keyup.enter)=\"changeShowPassword(input)\"\n [nzType]=\"showPassword(input) ? 'eye-invisible' : 'eye'\"\n ></span>\n </div>\n }\n</nz-input-group>\n" }]
1588
1811
  }] });
1589
1812
 
1590
- class NzFormlyFieldCheckboxComponent extends FieldType {
1813
+ class NzFormlyFieldRadioComponent extends FieldType {
1591
1814
  constructor() {
1592
1815
  super(...arguments);
1593
- this.unSubscribeAll$ = new Subject();
1816
+ this.destroyRef = inject(DestroyRef);
1594
1817
  }
1595
1818
  get fieldID() {
1596
- return "control-" + this.field.key;
1819
+ return 'control-' + this.field.key;
1597
1820
  }
1598
1821
  ngOnInit() {
1599
1822
  this.onValueChange();
1600
1823
  }
1601
1824
  onValueChange() {
1602
1825
  this.formControl.valueChanges
1603
- .pipe(takeUntil(this.unSubscribeAll$), tap((value) => {
1604
- if (typeof this.props?.change == "function") {
1826
+ .pipe(takeUntilDestroyed(this.destroyRef), tap((value) => {
1827
+ if (typeof this.props?.change == 'function') {
1605
1828
  this.props.change(this.field, value);
1606
1829
  }
1607
1830
  }))
1608
1831
  .subscribe();
1609
1832
  }
1610
- ngOnDestroy() {
1611
- this.unSubscribeAll$.next();
1612
- this.unSubscribeAll$.complete();
1613
- }
1614
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyFieldCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1615
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NzFormlyFieldCheckboxComponent, selector: "app-nz-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}\n"], dependencies: [{ kind: "directive", type: i2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }] }); }
1616
- }
1617
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyFieldCheckboxComponent, decorators: [{
1618
- type: Component,
1619
- args: [{ selector: "app-nz-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}\n"] }]
1620
- }] });
1621
-
1622
- class NzFormlyButtonComponent extends FieldType {
1623
- onClick() {
1624
- if (typeof this.props?.click == "function") {
1625
- this.props.click();
1626
- }
1627
- }
1628
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1629
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NzFormlyButtonComponent, selector: "app-nz-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: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i6.ɵ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"] }] }); }
1833
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldRadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1834
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: NzFormlyFieldRadioComponent, isStandalone: true, selector: "app-nz-formly-field-radio", usesInheritance: true, ngImport: i0, template: "<nz-radio-group\n [id]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzName]=\"props.nzName\"\n [nzDisabled]=\"props.nzDisabled\"\n [nzSize]=\"props.nzSize\"\n [nzButtonStyle]=\"props.nzButtonStyle\"\n>\n @if (props.nzType === 'nz-radio') {\n @for (item of props.nzOptions; track item) {\n <label nz-radio [nzDisabled]=\"item.disabled\" [nzValue]=\"item.value\">\n {{ item.label }}\n <div [innerHTML]=\"item.nzCustomContent\"></div>\n </label>\n }\n }\n @if (props.nzType === 'nz-radio-button') {\n @for (item of props.nzOptions; track item) {\n <label nz-radio-button [nzDisabled]=\"item.disabled\" [nzValue]=\"item.value\">\n {{ item.label }}\n <div [innerHTML]=\"item.nzCustomContent\"></div>\n </label>\n }\n }\n</nz-radio-group>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "ngmodule", type: NzRadioModule }, { kind: "component", type: i3$3.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus", "nz-radio-button"], exportAs: ["nzRadio"] }, { kind: "component", type: i3$3.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }] }); }
1630
1835
  }
1631
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyButtonComponent, decorators: [{
1836
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldRadioComponent, decorators: [{
1632
1837
  type: Component,
1633
- args: [{ selector: "app-nz-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" }]
1838
+ args: [{ selector: 'app-nz-formly-field-radio', imports: [CommonModule, ReactiveFormsModule, FormlyModule, NzRadioModule], template: "<nz-radio-group\n [id]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzName]=\"props.nzName\"\n [nzDisabled]=\"props.nzDisabled\"\n [nzSize]=\"props.nzSize\"\n [nzButtonStyle]=\"props.nzButtonStyle\"\n>\n @if (props.nzType === 'nz-radio') {\n @for (item of props.nzOptions; track item) {\n <label nz-radio [nzDisabled]=\"item.disabled\" [nzValue]=\"item.value\">\n {{ item.label }}\n <div [innerHTML]=\"item.nzCustomContent\"></div>\n </label>\n }\n }\n @if (props.nzType === 'nz-radio-button') {\n @for (item of props.nzOptions; track item) {\n <label nz-radio-button [nzDisabled]=\"item.disabled\" [nzValue]=\"item.value\">\n {{ item.label }}\n <div [innerHTML]=\"item.nzCustomContent\"></div>\n </label>\n }\n }\n</nz-radio-group>\n" }]
1634
1839
  }] });
1635
1840
 
1636
1841
  class NzFormlyFieldSelectComponent extends FieldType {
1637
1842
  constructor() {
1638
1843
  super(...arguments);
1639
- this.unSubscribeAll$ = new Subject();
1844
+ this.destroyRef = inject(DestroyRef);
1640
1845
  }
1641
1846
  get fieldID() {
1642
- return "control-" + this.field.key;
1847
+ return 'control-' + this.field.key;
1848
+ }
1849
+ get status() {
1850
+ return this.formControl.touched && this.formControl.invalid ? 'error' : '';
1643
1851
  }
1644
1852
  ngOnInit() {
1645
1853
  this.onValueChange();
1646
1854
  }
1647
1855
  onValueChange() {
1648
1856
  this.formControl.valueChanges
1649
- .pipe(takeUntil(this.unSubscribeAll$), tap((value) => {
1650
- if (typeof this.props?.change == "function") {
1857
+ .pipe(takeUntilDestroyed(this.destroyRef), tap((value) => {
1858
+ if (typeof this.props?.change == 'function') {
1651
1859
  this.props.change(this.field, value);
1652
1860
  }
1653
1861
  }))
1654
1862
  .subscribe();
1655
1863
  }
1656
- ngOnDestroy() {
1657
- this.unSubscribeAll$.next();
1658
- this.unSubscribeAll$.complete();
1659
- }
1660
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyFieldSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1661
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NzFormlyFieldSelectComponent, selector: "app-nz-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 [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{display:block}\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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.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" }] }); }
1864
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1865
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: NzFormlyFieldSelectComponent, isStandalone: true, selector: "app-nz-formly-field-select", usesInheritance: true, ngImport: i0, template: "<nz-select\n [nzId]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [compareWith]=\"props.compareWith\"\n [nzAutoClearSearchValue]=\"props.nzAutoClearSearchValue\"\n [nzAllowClear]=\"props.nzAllowClear\"\n [nzVariant]=\"props.nzBorderless ? 'borderless' : 'outlined'\"\n [nzOpen]=\"props.nzOpen\"\n [nzAutoFocus]=\"props.nzAutoFocus\"\n [nzDisabled]=\"props.nzDisabled\"\n [nzDropdownClassName]=\"props.nzDropdownClassName\"\n [nzDropdownMatchSelectWidth]=\"props.nzDropdownMatchSelectWidth\"\n [nzDropdownStyle]=\"props.nzDropdownStyle\"\n [nzCustomTemplate]=\"props.nzCustomTemplate\"\n [nzServerSearch]=\"props.nzServerSearch\"\n [nzMaxMultipleCount]=\"props.nzMaxMultipleCount\"\n [nzMode]=\"props.nzMode\"\n [nzNotFoundContent]=\"props.nzNotFoundContent\"\n [nzPlacement]=\"props.nzPlacement\"\n [nzPlaceHolder]=\"props.nzPlaceholder\"\n [nzShowArrow]=\"props.nzShowArrow\"\n [nzShowSearch]=\"props.nzShowSearch\"\n [nzSize]=\"props.nzSize\"\n [nzStatus]=\"status\"\n [nzSuffixIcon]=\"props.nzSuffixIcon\"\n [nzRemoveIcon]=\"props.nzRemoveIcon\"\n [nzClearIcon]=\"props.nzClearIcon\"\n [nzMenuItemSelectedIcon]=\"props.nzMenuItemSelectedIcon\"\n [nzTokenSeparators]=\"props.nzTokenSeparators\"\n [nzLoading]=\"props.nzLoading || (props.nzLoadingObs | async)\"\n [nzMaxTagCount]=\"props.nzMaxTagCount\"\n [nzMaxTagPlaceholder]=\"props.nzMaxTagPlaceholder\"\n [nzOptionHeightPx]=\"props.nzOptionHeightPx\"\n [nzOptionOverflowSize]=\"props.nzOptionOverflowSize\"\n [nzSelectOnTab]=\"props.nzSelectOnTab\"\n (nzOpenChange)=\"props?.nzOpenChange($event)\"\n (nzScrollToBottom)=\"props?.nzScrollToBottom()\"\n (nzOnSearch)=\"props?.nzOnSearch($event)\"\n>\n @for (option of props.nzOptions || (props.nzOptionsObs | async); track option) {\n <nz-option\n [nzDisabled]=\"option.disabled\"\n [nzLabel]=\"option.label\"\n [nzValue]=\"props.objectValue ? option : option.value\"\n [nzHide]=\"option.hide\"\n [nzCustomContent]=\"!!option.nzCustomContent\"\n >\n <div [innerHTML]=\"option.nzCustomContent\"></div>\n </nz-option>\n }\n</nz-select>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i3$4.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i3$4.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzVariant", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzPrefix", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus", "nzOnClear"], exportAs: ["nzSelect"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
1662
1866
  }
1663
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyFieldSelectComponent, decorators: [{
1867
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldSelectComponent, decorators: [{
1664
1868
  type: Component,
1665
- args: [{ selector: "app-nz-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 [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{display:block}\n"] }]
1869
+ args: [{ selector: 'app-nz-formly-field-select', imports: [CommonModule, ReactiveFormsModule, FormlyModule, NzSelectModule], template: "<nz-select\n [nzId]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [compareWith]=\"props.compareWith\"\n [nzAutoClearSearchValue]=\"props.nzAutoClearSearchValue\"\n [nzAllowClear]=\"props.nzAllowClear\"\n [nzVariant]=\"props.nzBorderless ? 'borderless' : 'outlined'\"\n [nzOpen]=\"props.nzOpen\"\n [nzAutoFocus]=\"props.nzAutoFocus\"\n [nzDisabled]=\"props.nzDisabled\"\n [nzDropdownClassName]=\"props.nzDropdownClassName\"\n [nzDropdownMatchSelectWidth]=\"props.nzDropdownMatchSelectWidth\"\n [nzDropdownStyle]=\"props.nzDropdownStyle\"\n [nzCustomTemplate]=\"props.nzCustomTemplate\"\n [nzServerSearch]=\"props.nzServerSearch\"\n [nzMaxMultipleCount]=\"props.nzMaxMultipleCount\"\n [nzMode]=\"props.nzMode\"\n [nzNotFoundContent]=\"props.nzNotFoundContent\"\n [nzPlacement]=\"props.nzPlacement\"\n [nzPlaceHolder]=\"props.nzPlaceholder\"\n [nzShowArrow]=\"props.nzShowArrow\"\n [nzShowSearch]=\"props.nzShowSearch\"\n [nzSize]=\"props.nzSize\"\n [nzStatus]=\"status\"\n [nzSuffixIcon]=\"props.nzSuffixIcon\"\n [nzRemoveIcon]=\"props.nzRemoveIcon\"\n [nzClearIcon]=\"props.nzClearIcon\"\n [nzMenuItemSelectedIcon]=\"props.nzMenuItemSelectedIcon\"\n [nzTokenSeparators]=\"props.nzTokenSeparators\"\n [nzLoading]=\"props.nzLoading || (props.nzLoadingObs | async)\"\n [nzMaxTagCount]=\"props.nzMaxTagCount\"\n [nzMaxTagPlaceholder]=\"props.nzMaxTagPlaceholder\"\n [nzOptionHeightPx]=\"props.nzOptionHeightPx\"\n [nzOptionOverflowSize]=\"props.nzOptionOverflowSize\"\n [nzSelectOnTab]=\"props.nzSelectOnTab\"\n (nzOpenChange)=\"props?.nzOpenChange($event)\"\n (nzScrollToBottom)=\"props?.nzScrollToBottom()\"\n (nzOnSearch)=\"props?.nzOnSearch($event)\"\n>\n @for (option of props.nzOptions || (props.nzOptionsObs | async); track option) {\n <nz-option\n [nzDisabled]=\"option.disabled\"\n [nzLabel]=\"option.label\"\n [nzValue]=\"props.objectValue ? option : option.value\"\n [nzHide]=\"option.hide\"\n [nzCustomContent]=\"!!option.nzCustomContent\"\n >\n <div [innerHTML]=\"option.nzCustomContent\"></div>\n </nz-option>\n }\n</nz-select>\n" }]
1666
1870
  }] });
1667
1871
 
1668
- class NzFormlyFieldSwitchComponent extends FieldType {
1872
+ class NzFormlyFieldSliderComponent extends FieldType {
1669
1873
  constructor() {
1670
1874
  super(...arguments);
1671
- this.unSubscribeAll$ = new Subject();
1875
+ this.destroyRef = inject(DestroyRef);
1672
1876
  }
1673
1877
  get fieldID() {
1674
- return "control-" + this.field.key;
1878
+ return 'control-' + this.field.key;
1675
1879
  }
1676
1880
  ngOnInit() {
1677
- this.onValueChanges();
1881
+ this.onValueChange();
1678
1882
  }
1679
- onValueChanges() {
1883
+ onValueChange() {
1680
1884
  this.formControl.valueChanges
1681
- .pipe(takeUntil(this.unSubscribeAll$), tap((value) => {
1682
- if (typeof this.props?.change == "function") {
1885
+ .pipe(takeUntilDestroyed(this.destroyRef), tap((value) => {
1886
+ if (typeof this.props?.change == 'function') {
1683
1887
  this.props.change(this.field, value);
1684
1888
  }
1685
1889
  }))
1686
1890
  .subscribe();
1687
1891
  }
1688
- ngOnDestroy() {
1689
- this.unSubscribeAll$.next();
1690
- this.unSubscribeAll$.complete();
1691
- }
1692
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyFieldSwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1693
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NzFormlyFieldSwitchComponent, selector: "app-nz-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: [""], dependencies: [{ kind: "directive", type: i2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3$1.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }] }); }
1892
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldSliderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1893
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: NzFormlyFieldSliderComponent, isStandalone: true, selector: "app-nz-formly-field-slider", usesInheritance: true, ngImport: i0, template: "<nz-slider\n [id]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzDots]=\"props.nzDots\"\n [nzIncluded]=\"props.nzIncluded\"\n [nzMarks]=\"props.nzMarks\"\n [nzMax]=\"props.nzMax\"\n [nzMin]=\"props.nzMin\"\n [nzRange]=\"props.nzRange\"\n [nzStep]=\"props.nzStep\"\n [nzTipFormatter]=\"props.nzTipFormatter\"\n [nzVertical]=\"props.nzVertical\"\n [nzReverse]=\"props.nzReverse\"\n [nzTooltipVisible]=\"props.nzTooltipVisible\"\n [nzTooltipPlacement]=\"props.nzTooltipPlacement\"\n (change)=\"(props.change)\"\n></nz-slider>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "ngmodule", type: NzSliderModule }, { kind: "component", type: i3$5.NzSliderComponent, selector: "nz-slider", inputs: ["nzDisabled", "nzDots", "nzIncluded", "nzRange", "nzVertical", "nzReverse", "nzDefaultValue", "nzMarks", "nzMax", "nzMin", "nzStep", "nzTooltipVisible", "nzTooltipPlacement", "nzTipFormatter"], outputs: ["nzOnAfterChange"], exportAs: ["nzSlider"] }] }); }
1694
1894
  }
1695
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyFieldSwitchComponent, decorators: [{
1895
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldSliderComponent, decorators: [{
1696
1896
  type: Component,
1697
- args: [{ selector: "app-nz-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" }]
1897
+ args: [{ selector: 'app-nz-formly-field-slider', imports: [CommonModule, ReactiveFormsModule, FormlyModule, NzSliderModule], template: "<nz-slider\n [id]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzDots]=\"props.nzDots\"\n [nzIncluded]=\"props.nzIncluded\"\n [nzMarks]=\"props.nzMarks\"\n [nzMax]=\"props.nzMax\"\n [nzMin]=\"props.nzMin\"\n [nzRange]=\"props.nzRange\"\n [nzStep]=\"props.nzStep\"\n [nzTipFormatter]=\"props.nzTipFormatter\"\n [nzVertical]=\"props.nzVertical\"\n [nzReverse]=\"props.nzReverse\"\n [nzTooltipVisible]=\"props.nzTooltipVisible\"\n [nzTooltipPlacement]=\"props.nzTooltipPlacement\"\n (change)=\"(props.change)\"\n></nz-slider>\n" }]
1698
1898
  }] });
1699
1899
 
1700
- class NzFormlyFieldRadioComponent extends FieldType {
1900
+ class NzFormlyFieldSwitchComponent extends FieldType {
1701
1901
  constructor() {
1702
1902
  super(...arguments);
1703
- this.unSubscribeAll$ = new Subject();
1903
+ this.destroyRef = inject(DestroyRef);
1704
1904
  }
1705
1905
  get fieldID() {
1706
- return "control-" + this.field.key;
1906
+ return 'control-' + this.field.key;
1707
1907
  }
1708
1908
  ngOnInit() {
1709
- this.onValueChange();
1909
+ this.onValueChanges();
1710
1910
  }
1711
- onValueChange() {
1911
+ onValueChanges() {
1712
1912
  this.formControl.valueChanges
1713
- .pipe(takeUntil(this.unSubscribeAll$), tap((value) => {
1714
- if (typeof this.props?.change == "function") {
1913
+ .pipe(takeUntilDestroyed(this.destroyRef), tap((value) => {
1914
+ if (typeof this.props?.change == 'function') {
1715
1915
  this.props.change(this.field, value);
1716
1916
  }
1717
1917
  }))
1718
1918
  .subscribe();
1719
1919
  }
1720
- ngOnDestroy() {
1721
- this.unSubscribeAll$.next();
1722
- this.unSubscribeAll$.complete();
1723
- }
1724
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyFieldRadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1725
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NzFormlyFieldRadioComponent, selector: "app-nz-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: [""], 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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.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"] }] }); }
1920
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldSwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1921
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: NzFormlyFieldSwitchComponent, isStandalone: true, selector: "app-nz-formly-field-switch", usesInheritance: true, ngImport: i0, template: "<nz-switch\n [nzId]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzSize]=\"props.nzSize\"\n [nzLoading]=\"props.nzLoading\"\n [nzDisabled]=\"props.nzDisabled\"\n [nzCheckedChildren]=\"props.nzCheckedChildren\"\n [nzUnCheckedChildren]=\"props.nzUnCheckedChildren\"\n></nz-switch>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "component", type: i3$6.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }] }); }
1726
1922
  }
1727
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyFieldRadioComponent, decorators: [{
1923
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldSwitchComponent, decorators: [{
1728
1924
  type: Component,
1729
- args: [{ selector: "app-nz-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" }]
1925
+ args: [{ selector: 'app-nz-formly-field-switch', imports: [CommonModule, ReactiveFormsModule, FormlyModule, NzSwitchModule], template: "<nz-switch\n [nzId]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzSize]=\"props.nzSize\"\n [nzLoading]=\"props.nzLoading\"\n [nzDisabled]=\"props.nzDisabled\"\n [nzCheckedChildren]=\"props.nzCheckedChildren\"\n [nzUnCheckedChildren]=\"props.nzUnCheckedChildren\"\n></nz-switch>\n" }]
1730
1926
  }] });
1731
1927
 
1732
- class NzFormlyLabelWrapperComponent extends FieldWrapper {
1733
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyLabelWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1734
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NzFormlyLabelWrapperComponent, selector: "app-nz-formly-label-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"nz-formly-label-top\" *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=\"nz-formly-label-inline\" *ngIf=\"props.labelPosition == 'inline'\">\r\n <div class=\"nz-formly-field-wrapper\">\r\n <div [ngStyle]=\"{ width: props.styles?.labelWidth }\">\r\n <ng-container *ngTemplateOutlet=\"Label\"></ng-container>\r\n </div>\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<div\r\n class=\"nz-formly-label-float\"\r\n *ngIf=\"props.labelPosition == 'float'\"\r\n [class.fixed]=\"formControl.value != null && formControl.value != ''\"\r\n>\r\n <ng-container #fieldComponent></ng-container>\r\n <ng-container *ngTemplateOutlet=\"Label\"></ng-container>\r\n</div>\r\n\r\n<ng-template #Label>\r\n <label\r\n class=\"nz-formly-label\"\r\n [ngClass]=\"props.styles?.labelClass\"\r\n *ngIf=\"props.label || (props.labelObs | async)\"\r\n >\r\n {{ props.label || (props.labelObs | async) }}\r\n <span class=\"nz-formly-label-required\" *ngIf=\"props.required\">*</span>\r\n </label>\r\n</ng-template>\r\n", styles: [".nz-formly-field-wrapper{display:flex;align-items:center}@media (max-width: 500px){.nz-formly-field-wrapper{flex-direction:column;align-items:initial}}.nz-formly-label-top .nz-formly-label{font-size:75%;font-weight:500}.nz-formly-label-inline .nz-formly-label{font-size:100%;font-weight:600;position:relative;padding-right:5px}.nz-formly-label-float{position:relative}.nz-formly-label-float .nz-formly-label{top:0;z-index:1;height:100%;display:flex;position:absolute;align-items:center;pointer-events:none;transform-origin:0 0;inset-inline-start:10px;border:1px solid transparent;transition:transform .1s ease-in-out}.nz-formly-label-float:focus-within .nz-formly-label,.nz-formly-label-float.fixed .nz-formly-label{height:20px;background:#fff;padding-left:6px;margin-left:-6px;padding-right:16px;transform:scale(.85) translateY(-10px)}.nz-formly-label-required{color:#f10232;position:relative}\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" }] }); }
1735
- }
1736
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyLabelWrapperComponent, decorators: [{
1737
- type: Component,
1738
- args: [{ selector: "app-nz-formly-label-wrapper", template: "<div class=\"nz-formly-label-top\" *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=\"nz-formly-label-inline\" *ngIf=\"props.labelPosition == 'inline'\">\r\n <div class=\"nz-formly-field-wrapper\">\r\n <div [ngStyle]=\"{ width: props.styles?.labelWidth }\">\r\n <ng-container *ngTemplateOutlet=\"Label\"></ng-container>\r\n </div>\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<div\r\n class=\"nz-formly-label-float\"\r\n *ngIf=\"props.labelPosition == 'float'\"\r\n [class.fixed]=\"formControl.value != null && formControl.value != ''\"\r\n>\r\n <ng-container #fieldComponent></ng-container>\r\n <ng-container *ngTemplateOutlet=\"Label\"></ng-container>\r\n</div>\r\n\r\n<ng-template #Label>\r\n <label\r\n class=\"nz-formly-label\"\r\n [ngClass]=\"props.styles?.labelClass\"\r\n *ngIf=\"props.label || (props.labelObs | async)\"\r\n >\r\n {{ props.label || (props.labelObs | async) }}\r\n <span class=\"nz-formly-label-required\" *ngIf=\"props.required\">*</span>\r\n </label>\r\n</ng-template>\r\n", styles: [".nz-formly-field-wrapper{display:flex;align-items:center}@media (max-width: 500px){.nz-formly-field-wrapper{flex-direction:column;align-items:initial}}.nz-formly-label-top .nz-formly-label{font-size:75%;font-weight:500}.nz-formly-label-inline .nz-formly-label{font-size:100%;font-weight:600;position:relative;padding-right:5px}.nz-formly-label-float{position:relative}.nz-formly-label-float .nz-formly-label{top:0;z-index:1;height:100%;display:flex;position:absolute;align-items:center;pointer-events:none;transform-origin:0 0;inset-inline-start:10px;border:1px solid transparent;transition:transform .1s ease-in-out}.nz-formly-label-float:focus-within .nz-formly-label,.nz-formly-label-float.fixed .nz-formly-label{height:20px;background:#fff;padding-left:6px;margin-left:-6px;padding-right:16px;transform:scale(.85) translateY(-10px)}.nz-formly-label-required{color:#f10232;position:relative}\n"] }]
1739
- }] });
1740
-
1741
- class NzFormlyDefaultWrapperComponent extends FieldWrapper {
1742
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyDefaultWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1743
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NzFormlyDefaultWrapperComponent, selector: "app-nz-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 *ngIf=\"props.showError\"\r\n class=\"nz-formly-error-message\"\r\n [ngClass]=\"{'nz-formly-error-message-visible': formControl.touched && formControl.invalid}\"\r\n [ngStyle]=\"{ 'margin-left': props.labelPosition === 'inline' ? props.styles?.labelWidth ?? '0' : '0' }\"\r\n >\r\n <formly-validation-message [field]=\"field\"></formly-validation-message>\r\n </div>\r\n</div>\r\n", styles: [".nz-formly-error-message{top:-4px;opacity:0;color:#f10232;font-size:85%;font-weight:500;position:relative;transition:all .1s ease-in}.nz-formly-error-message-visible{top:0;opacity:1}@media (max-width: 500px){.nz-formly-error-message{margin:0!important}}\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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }] }); }
1744
- }
1745
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyDefaultWrapperComponent, decorators: [{
1746
- type: Component,
1747
- args: [{ selector: "app-nz-formly-default-wrapper", 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 *ngIf=\"props.showError\"\r\n class=\"nz-formly-error-message\"\r\n [ngClass]=\"{'nz-formly-error-message-visible': formControl.touched && formControl.invalid}\"\r\n [ngStyle]=\"{ 'margin-left': props.labelPosition === 'inline' ? props.styles?.labelWidth ?? '0' : '0' }\"\r\n >\r\n <formly-validation-message [field]=\"field\"></formly-validation-message>\r\n </div>\r\n</div>\r\n", styles: [".nz-formly-error-message{top:-4px;opacity:0;color:#f10232;font-size:85%;font-weight:500;position:relative;transition:all .1s ease-in}.nz-formly-error-message-visible{top:0;opacity:1}@media (max-width: 500px){.nz-formly-error-message{margin:0!important}}\n"] }]
1748
- }] });
1749
-
1750
- function minLengthValidator(control, field) {
1751
- if (field.props?.minLen)
1752
- return control.value?.length < field.props?.minLen
1753
- ? { minLen: true }
1754
- : null;
1755
- return null;
1756
- }
1757
- function minLengthMessage(field) {
1758
- return `Field must be at least ${field.props?.minLen} characters`;
1759
- }
1760
- function maxLengthValidator(control, field) {
1761
- if (field.props?.maxLen)
1762
- return control.value?.length > field.props?.maxLen
1763
- ? { maxLen: true }
1764
- : null;
1765
- return null;
1766
- }
1767
- function maxLengthMessage(field) {
1768
- return `Field must be at most ${field.props?.maxLen} characters`;
1769
- }
1770
- function minValueValidator(control, field) {
1771
- if (field.props?.minValue && control.value != null)
1772
- return Number(control.value) < field.props.minValue
1773
- ? { minValue: false }
1774
- : null;
1775
- return null;
1776
- }
1777
- function minValueMessage(field) {
1778
- return `Field value must be more than ${field.props?.minValue}`;
1779
- }
1780
- function maxValueValidator(control, field) {
1781
- if (field.props?.maxValue && control.value != null)
1782
- return Number(control.value) > field.props.maxValue
1783
- ? { maxValue: true }
1784
- : null;
1785
- return null;
1786
- }
1787
- function maxValueMessage(field) {
1788
- return `Field value must be less than ${field.props?.maxValue}`;
1789
- }
1790
- function emailValidator(control) {
1791
- let REGEX = /^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/;
1792
- return REGEX.test(control.value) ? null : { email: true };
1793
- }
1794
- function passwordValidator(control, field) {
1795
- if (field.props?.type === "password") {
1796
- let REGEX = /^(?=.*[A-Z])(?=.*\d)(?=.*[\W_])[A-Za-z\d\W_]{8,}$/;
1797
- return REGEX.test(control.value) ? null : { password: true };
1798
- }
1799
- return null;
1800
- }
1801
-
1802
1928
  class NzFormlyFieldTextareaComponent extends FieldType {
1803
1929
  constructor() {
1804
1930
  super(...arguments);
1805
- this.unSubscribeAll$ = new Subject();
1931
+ this.destroyRef = inject(DestroyRef);
1806
1932
  }
1807
1933
  get fieldID() {
1808
- return "control-" + this.field.key;
1934
+ return 'control-' + this.field.key;
1935
+ }
1936
+ get status() {
1937
+ return this.formControl.touched && this.formControl.invalid ? 'error' : '';
1809
1938
  }
1810
1939
  ngOnInit() {
1811
1940
  this.onValueChanges();
1812
1941
  }
1813
1942
  onValueChanges() {
1814
1943
  this.formControl.valueChanges
1815
- .pipe(takeUntil(this.unSubscribeAll$), tap((value) => {
1816
- if (typeof this.props?.change == "function") {
1944
+ .pipe(takeUntilDestroyed(this.destroyRef), tap((value) => {
1945
+ if (typeof this.props?.change == 'function') {
1817
1946
  this.props.change(this.field, value);
1818
1947
  }
1819
1948
  }))
1820
1949
  .subscribe();
1821
1950
  }
1822
- ngOnDestroy() {
1823
- this.unSubscribeAll$.next();
1824
- this.unSubscribeAll$.complete();
1825
- }
1826
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyFieldTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1827
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NzFormlyFieldTextareaComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<textarea\r\n nz-input\r\n [id]=\"fieldID\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [attr.disabled]=\"props.disabled\"\r\n [readonly]=\"props.readonly\"\r\n [placeholder]=\"props.placeholder\"\r\n [rows]=\"props.rows\"\r\n [nzBorderless]=\"props.nzBorderless\"\r\n></textarea>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "directive", type: i2$1.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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }] }); }
1951
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1952
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: NzFormlyFieldTextareaComponent, isStandalone: true, selector: "app-nz-formly-field-textarea", usesInheritance: true, ngImport: i0, template: "<textarea\n nz-input\n [id]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzStatus]=\"status\"\n [attr.disabled]=\"props.nzDisabled\"\n [readonly]=\"props.nzReadonly\"\n [placeholder]=\"props.nzPlaceholder\"\n [rows]=\"props.rows\"\n [nzVariant]=\"props.nzBorderless ? 'borderless' : 'outlined'\"\n></textarea>\n@if (props.showTextAreaCount) {\n <div class=\"d-block mt-1 opacity-50\">\n @if (props.maxCount) {\n {{ props.maxCount }}\n <span>/</span>\n }\n {{ formControl.value?.length || 0 }}\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i3$2.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled", "readonly"], exportAs: ["nzInput"] }] }); }
1828
1953
  }
1829
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyFieldTextareaComponent, decorators: [{
1954
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyFieldTextareaComponent, decorators: [{
1830
1955
  type: Component,
1831
- args: [{ selector: "", template: "<textarea\r\n nz-input\r\n [id]=\"fieldID\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [attr.disabled]=\"props.disabled\"\r\n [readonly]=\"props.readonly\"\r\n [placeholder]=\"props.placeholder\"\r\n [rows]=\"props.rows\"\r\n [nzBorderless]=\"props.nzBorderless\"\r\n></textarea>\r\n" }]
1956
+ args: [{ selector: 'app-nz-formly-field-textarea', imports: [CommonModule, ReactiveFormsModule, FormlyModule, NzInputModule], template: "<textarea\n nz-input\n [id]=\"fieldID\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzStatus]=\"status\"\n [attr.disabled]=\"props.nzDisabled\"\n [readonly]=\"props.nzReadonly\"\n [placeholder]=\"props.nzPlaceholder\"\n [rows]=\"props.rows\"\n [nzVariant]=\"props.nzBorderless ? 'borderless' : 'outlined'\"\n></textarea>\n@if (props.showTextAreaCount) {\n <div class=\"d-block mt-1 opacity-50\">\n @if (props.maxCount) {\n {{ props.maxCount }}\n <span>/</span>\n }\n {{ formControl.value?.length || 0 }}\n </div>\n}\n" }]
1832
1957
  }] });
1833
1958
 
1834
- class NzFormlyFieldSliderComponent extends FieldType {
1835
- constructor() {
1836
- super(...arguments);
1837
- this.unSubscribeAll$ = new Subject();
1838
- }
1839
- get fieldID() {
1840
- return "control-" + this.field.key;
1841
- }
1842
- ngOnInit() {
1843
- this.onValueChange();
1959
+ class NzFormlyUploaderComponent extends FieldType {
1960
+ handleChange(event) {
1961
+ if (this.props.nzChange)
1962
+ this.props.nzChange(event);
1844
1963
  }
1845
- onValueChange() {
1846
- this.formControl.valueChanges
1847
- .pipe(takeUntil(this.unSubscribeAll$), tap((value) => {
1848
- if (typeof this.props?.change == "function") {
1849
- this.props.change(this.field, value);
1850
- }
1851
- }))
1852
- .subscribe();
1853
- }
1854
- ngOnDestroy() {
1855
- this.unSubscribeAll$.next();
1856
- this.unSubscribeAll$.complete();
1857
- }
1858
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyFieldSliderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1859
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NzFormlyFieldSliderComponent, selector: "app-nz-formly-field-slider", usesInheritance: true, ngImport: i0, template: "<nz-slider\r\n [id]=\"fieldID\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzDots]=\"props.nzDots\"\r\n [nzIncluded]=\"props.nzIncluded\"\r\n [nzMarks]=\"props.nzMarks\"\r\n [nzMax]=\"props.nzMax\"\r\n [nzMin]=\"props.nzMin\"\r\n [nzRange]=\"props.nzRange\"\r\n [nzStep]=\"props.nzStep\"\r\n [nzTipFormatter]=\"props.nzTipFormatter\"\r\n [nzVertical]=\"props.nzVertical\"\r\n [nzReverse]=\"props.nzReverse\"\r\n [nzTooltipVisible]=\"props.nzTooltipVisible\"\r\n [nzTooltipPlacement]=\"props.nzTooltipPlacement\"\r\n (change)=\"props.change\"\r\n></nz-slider>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3$2.NzSliderComponent, selector: "nz-slider", inputs: ["nzDisabled", "nzDots", "nzIncluded", "nzRange", "nzVertical", "nzReverse", "nzDefaultValue", "nzMarks", "nzMax", "nzMin", "nzStep", "nzTooltipVisible", "nzTooltipPlacement", "nzTipFormatter"], outputs: ["nzOnAfterChange"], exportAs: ["nzSlider"] }] }); }
1964
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyUploaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1965
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: NzFormlyUploaderComponent, isStandalone: true, selector: "app-nz-formly-uploader", usesInheritance: true, ngImport: i0, template: "<nz-upload\n nzType=\"drag\"\n [nzMultiple]=\"props.multiple\"\n [nzAction]=\"props.uploadUrl\"\n [nzDownload]=\"props.nzDownload\"\n (nzChange)=\"handleChange($event)\"\n [nzCustomRequest]=\"props.customRequest\"\n>\n <p class=\"ant-upload-drag-icon\">\n <span nz-icon nzType=\"inbox\"></span>\n </p>\n <p class=\"ant-upload-text\">{{ props.label }}</p>\n @if (props.hint) {\n <p class=\"ant-upload-hint\">\n {{ props.hint }}\n </p>\n }\n</nz-upload>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: NzUploadModule }, { kind: "component", type: i1$3.NzUploadComponent, selector: "nz-upload", inputs: ["nzId", "nzType", "nzLimit", "nzSize", "nzFileType", "nzAccept", "nzAction", "nzDirectory", "nzOpenFileDialogOnClick", "nzBeforeUpload", "nzCustomRequest", "nzData", "nzFilter", "nzFileList", "nzDisabled", "nzHeaders", "nzListType", "nzMultiple", "nzName", "nzShowUploadList", "nzShowButton", "nzWithCredentials", "nzRemove", "nzPreview", "nzPreviewFile", "nzPreviewIsImage", "nzTransformFile", "nzDownload", "nzIconRender", "nzFileListRender", "nzMaxCount"], outputs: ["nzChange", "nzFileListChange"], exportAs: ["nzUpload"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i4$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }] }); }
1966
+ }
1967
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyUploaderComponent, decorators: [{
1968
+ type: Component,
1969
+ args: [{ selector: 'app-nz-formly-uploader', imports: [CommonModule, NzUploadModule, NzIconModule], template: "<nz-upload\n nzType=\"drag\"\n [nzMultiple]=\"props.multiple\"\n [nzAction]=\"props.uploadUrl\"\n [nzDownload]=\"props.nzDownload\"\n (nzChange)=\"handleChange($event)\"\n [nzCustomRequest]=\"props.customRequest\"\n>\n <p class=\"ant-upload-drag-icon\">\n <span nz-icon nzType=\"inbox\"></span>\n </p>\n <p class=\"ant-upload-text\">{{ props.label }}</p>\n @if (props.hint) {\n <p class=\"ant-upload-hint\">\n {{ props.hint }}\n </p>\n }\n</nz-upload>\n" }]
1970
+ }] });
1971
+
1972
+ class NzFormlyDefaultWrapperComponent extends FieldWrapper {
1973
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyDefaultWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1974
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: NzFormlyDefaultWrapperComponent, isStandalone: true, selector: "app-nz-formly-default-wrapper", usesInheritance: true, ngImport: i0, template: "@if (!props.nzHidden) {\n <div\n [id]=\"'wrapper-' + field.key\"\n [classList]=\"props.styles?.wrapperClass ?? ' ' + 'nz-formly-default-wrapper'\"\n >\n <ng-container #fieldComponent></ng-container>\n @if (props.showError) {\n <div\n class=\"nz-formly-error-message\"\n [ngClass]=\"{\n 'nz-formly-error-message-visible': formControl.dirty && formControl.invalid\n }\"\n [style.margin-inline-start]=\"\n props.labelPosition === 'inline' ? (props.styles?.labelWidth ?? '0') : '0'\n \"\n >\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.LegacyFormlyValidationMessage, selector: "formly-validation-message" }] }); }
1860
1975
  }
1861
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NzFormlyFieldSliderComponent, decorators: [{
1976
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyDefaultWrapperComponent, decorators: [{
1862
1977
  type: Component,
1863
- args: [{ selector: "app-nz-formly-field-slider", template: "<nz-slider\r\n [id]=\"fieldID\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzDots]=\"props.nzDots\"\r\n [nzIncluded]=\"props.nzIncluded\"\r\n [nzMarks]=\"props.nzMarks\"\r\n [nzMax]=\"props.nzMax\"\r\n [nzMin]=\"props.nzMin\"\r\n [nzRange]=\"props.nzRange\"\r\n [nzStep]=\"props.nzStep\"\r\n [nzTipFormatter]=\"props.nzTipFormatter\"\r\n [nzVertical]=\"props.nzVertical\"\r\n [nzReverse]=\"props.nzReverse\"\r\n [nzTooltipVisible]=\"props.nzTooltipVisible\"\r\n [nzTooltipPlacement]=\"props.nzTooltipPlacement\"\r\n (change)=\"props.change\"\r\n></nz-slider>\r\n" }]
1978
+ args: [{ selector: 'app-nz-formly-default-wrapper', imports: [CommonModule, FormlyModule], template: "@if (!props.nzHidden) {\n <div\n [id]=\"'wrapper-' + field.key\"\n [classList]=\"props.styles?.wrapperClass ?? ' ' + 'nz-formly-default-wrapper'\"\n >\n <ng-container #fieldComponent></ng-container>\n @if (props.showError) {\n <div\n class=\"nz-formly-error-message\"\n [ngClass]=\"{\n 'nz-formly-error-message-visible': formControl.dirty && formControl.invalid\n }\"\n [style.margin-inline-start]=\"\n props.labelPosition === 'inline' ? (props.styles?.labelWidth ?? '0') : '0'\n \"\n >\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n }\n </div>\n}\n" }]
1864
1979
  }] });
1865
1980
 
1981
+ class NzFormlyLabelWrapperComponent extends FieldWrapper {
1982
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyLabelWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1983
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: NzFormlyLabelWrapperComponent, isStandalone: true, selector: "app-nz-formly-label-wrapper", usesInheritance: true, ngImport: i0, template: "@if (props.labelPosition === 'top') {\n <div class=\"nz-formly-label-top\">\n <ng-container *ngTemplateOutlet=\"Label\"></ng-container>\n <ng-container #fieldComponent></ng-container>\n </div>\n} @else if (props.labelPosition === 'inline') {\n <div class=\"nz-formly-label-inline\">\n <div class=\"nz-formly-field-wrapper\">\n <div [ngStyle]=\"{ width: props.styles?.labelWidth }\">\n <ng-container *ngTemplateOutlet=\"Label\"></ng-container>\n </div>\n <div class=\"flex-grow-1\">\n <ng-container #fieldComponent></ng-container>\n </div>\n </div>\n </div>\n} @else if (props.labelPosition === 'float') {\n <div\n class=\"nz-formly-label-float\"\n [class.fixed]=\"\n formControl.value !== null && formControl.value !== undefined && formControl.value !== ''\n \"\n >\n <ng-container #fieldComponent></ng-container>\n <ng-container *ngTemplateOutlet=\"Label\"></ng-container>\n </div>\n} @else {\n <ng-container #fieldComponent></ng-container>\n}\n\n<ng-template #Label>\n @if (props.label || (props.labelObs | async)) {\n <label class=\"nz-formly-label\" [ngClass]=\"props.styles?.labelClass\">\n <span [innerHTML]=\"props.label || (props.labelObs | async)\"></span>\n @if (props.required) {\n <span class=\"nz-formly-label-required\">*</span>\n }\n </label>\n }\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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" }] }); }
1984
+ }
1985
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: NzFormlyLabelWrapperComponent, decorators: [{
1986
+ type: Component,
1987
+ args: [{ selector: 'app-nz-formly-label-wrapper', imports: [CommonModule], template: "@if (props.labelPosition === 'top') {\n <div class=\"nz-formly-label-top\">\n <ng-container *ngTemplateOutlet=\"Label\"></ng-container>\n <ng-container #fieldComponent></ng-container>\n </div>\n} @else if (props.labelPosition === 'inline') {\n <div class=\"nz-formly-label-inline\">\n <div class=\"nz-formly-field-wrapper\">\n <div [ngStyle]=\"{ width: props.styles?.labelWidth }\">\n <ng-container *ngTemplateOutlet=\"Label\"></ng-container>\n </div>\n <div class=\"flex-grow-1\">\n <ng-container #fieldComponent></ng-container>\n </div>\n </div>\n </div>\n} @else if (props.labelPosition === 'float') {\n <div\n class=\"nz-formly-label-float\"\n [class.fixed]=\"\n formControl.value !== null && formControl.value !== undefined && formControl.value !== ''\n \"\n >\n <ng-container #fieldComponent></ng-container>\n <ng-container *ngTemplateOutlet=\"Label\"></ng-container>\n </div>\n} @else {\n <ng-container #fieldComponent></ng-container>\n}\n\n<ng-template #Label>\n @if (props.label || (props.labelObs | async)) {\n <label class=\"nz-formly-label\" [ngClass]=\"props.styles?.labelClass\">\n <span [innerHTML]=\"props.label || (props.labelObs | async)\"></span>\n @if (props.required) {\n <span class=\"nz-formly-label-required\">*</span>\n }\n </label>\n }\n</ng-template>\n" }]
1988
+ }] });
1989
+
1990
+ const wrapperExtension = (_field) => { };
1991
+
1866
1992
  const NzFormlyForRoot = {
1867
1993
  types: [
1868
1994
  {
1869
- name: "input",
1995
+ name: 'input',
1870
1996
  component: NzFormlyFieldInputComponent,
1871
- wrappers: ["default-wrapper", "label-wrapper"],
1997
+ wrappers: ['default-wrapper', 'label-wrapper'],
1872
1998
  defaultOptions: {
1873
1999
  props: {
1874
- nzSize: "default",
1875
- labelPosition: "inline",
1876
- mask: "",
1877
- thousandSeparator: "",
2000
+ nzSize: 'default',
2001
+ mask: '',
2002
+ thousandSeparator: '',
1878
2003
  showError: true,
1879
- },
1880
- },
2004
+ nzPlaceholder: ''
2005
+ }
2006
+ }
1881
2007
  },
1882
2008
  {
1883
- name: "textarea",
2009
+ name: 'textarea',
1884
2010
  component: NzFormlyFieldTextareaComponent,
1885
- wrappers: ["default-wrapper", "label-wrapper"],
2011
+ wrappers: ['default-wrapper', 'label-wrapper'],
1886
2012
  defaultOptions: {
1887
2013
  props: {
1888
- labelPosition: "inline",
1889
2014
  rows: 4,
1890
- },
1891
- },
2015
+ showError: true,
2016
+ nzPlaceholder: ''
2017
+ }
2018
+ }
1892
2019
  },
1893
2020
  {
1894
- name: "checkbox",
2021
+ name: 'checkbox',
1895
2022
  component: NzFormlyFieldCheckboxComponent,
1896
- wrappers: ["default-wrapper"],
2023
+ wrappers: ['default-wrapper'],
1897
2024
  defaultOptions: {
1898
2025
  props: {
1899
- disabled: false,
2026
+ nzDisabled: false,
1900
2027
  nzAutoFocus: false,
1901
- showError: true,
1902
- },
1903
- },
2028
+ showError: true
2029
+ }
2030
+ }
1904
2031
  },
1905
2032
  {
1906
- name: "switch",
2033
+ name: 'switch',
1907
2034
  component: NzFormlyFieldSwitchComponent,
1908
- wrappers: ["default-wrapper", "label-wrapper"],
2035
+ wrappers: ['default-wrapper', 'label-wrapper'],
1909
2036
  defaultOptions: {
1910
2037
  props: {
1911
- labelPosition: "inline",
1912
- disabled: false,
1913
- nzSize: "default",
2038
+ nzDisabled: false,
2039
+ nzSize: 'default',
1914
2040
  nzLoading: false,
1915
- showError: true,
1916
- },
1917
- },
2041
+ showError: true
2042
+ }
2043
+ }
1918
2044
  },
1919
2045
  {
1920
- name: "radio",
2046
+ name: 'radio',
1921
2047
  component: NzFormlyFieldRadioComponent,
1922
- wrappers: ["default-wrapper", "label-wrapper"],
2048
+ wrappers: ['default-wrapper', 'label-wrapper'],
1923
2049
  defaultOptions: {
1924
2050
  props: {
1925
- labelPosition: "inline",
1926
- disabled: false,
1927
- nzSize: "default",
1928
- nzType: "nz-radio",
1929
- showError: true,
1930
- },
1931
- },
2051
+ nzDisabled: false,
2052
+ nzSize: 'default',
2053
+ nzType: 'nz-radio',
2054
+ showError: true
2055
+ }
2056
+ }
1932
2057
  },
1933
2058
  {
1934
- name: "select",
2059
+ name: 'select',
1935
2060
  component: NzFormlyFieldSelectComponent,
1936
- wrappers: ["default-wrapper", "label-wrapper"],
2061
+ wrappers: ['default-wrapper', 'label-wrapper'],
1937
2062
  defaultOptions: {
1938
2063
  props: {
1939
2064
  objectValue: false,
1940
- labelPosition: "inline",
1941
2065
  nzAutoClearSearchValue: true,
1942
2066
  nzAllowClear: false,
1943
2067
  nzBorderless: false,
1944
2068
  nzOpen: false,
1945
2069
  nzAutoFocus: false,
1946
- disabled: false,
2070
+ nzDisabled: false,
1947
2071
  nzDropdownMatchSelectWidth: true,
1948
2072
  nzServerSearch: false,
1949
2073
  nzMaxMultipleCount: Infinity,
1950
- nzMode: "default",
1951
- nzNotFoundContent: "Not Found",
2074
+ nzMode: 'default',
2075
+ nzPlacement: 'bottomLeft',
2076
+ nzNotFoundContent: 'Not Found',
1952
2077
  nzShowSearch: false,
1953
- nzSize: "default",
2078
+ nzSize: 'default',
1954
2079
  nzTokenSeparators: [],
1955
2080
  nzLoading: false,
1956
2081
  nzOptionHeightPx: 32,
1957
2082
  nzOptionOverflowSize: 8,
1958
2083
  nzSelectOnTab: false,
1959
2084
  showError: true,
2085
+ nzPlaceholder: '',
1960
2086
  nzFilterOption: () => true,
1961
2087
  compareWith: (o1, o2) => o1 === o2,
1962
2088
  nzOpenChange: () => { },
1963
2089
  nzScrollToBottom: () => { },
1964
- nzOnSearch: () => { },
1965
- },
1966
- },
2090
+ nzOnSearch: () => { }
2091
+ }
2092
+ }
1967
2093
  },
1968
2094
  {
1969
- name: "slider",
2095
+ name: 'slider',
1970
2096
  component: NzFormlyFieldSliderComponent,
1971
- wrappers: ["default-wrapper", "label-wrapper"],
2097
+ wrappers: ['default-wrapper', 'label-wrapper'],
1972
2098
  defaultOptions: {
1973
2099
  props: {
1974
- labelPosition: "inline",
1975
2100
  nzDots: false,
1976
2101
  nzIncluded: true,
1977
2102
  nzMarks: {},
@@ -1982,242 +2107,262 @@ const NzFormlyForRoot = {
1982
2107
  nzTipFormatter: (value) => String(value),
1983
2108
  nzVertical: false,
1984
2109
  nzReverse: false,
1985
- nzTooltipVisible: "default",
1986
- },
1987
- },
2110
+ nzTooltipVisible: 'default'
2111
+ }
2112
+ }
1988
2113
  },
1989
2114
  {
1990
- name: "button",
2115
+ name: 'button',
1991
2116
  component: NzFormlyButtonComponent,
1992
- wrappers: ["default-wrapper"],
2117
+ wrappers: ['default-wrapper'],
1993
2118
  defaultOptions: {
1994
2119
  props: {
1995
- text: "",
2120
+ text: '',
1996
2121
  disabled: false,
1997
2122
  nzGhost: false,
1998
2123
  nzLoading: false,
1999
- nzSize: "default",
2124
+ nzSize: 'default',
2000
2125
  nzBlock: false,
2001
2126
  nzDanger: false,
2002
- classList: "",
2003
- click: () => { },
2004
- },
2005
- },
2127
+ classList: '',
2128
+ click: () => { }
2129
+ }
2130
+ }
2006
2131
  },
2132
+ {
2133
+ name: 'uploader',
2134
+ component: NzFormlyUploaderComponent,
2135
+ wrappers: ['default-wrapper'],
2136
+ defaultOptions: {
2137
+ props: {
2138
+ multiple: true
2139
+ }
2140
+ }
2141
+ },
2142
+ {
2143
+ name: 'datePicker',
2144
+ component: NzFormlyFieldDatePickerComponent,
2145
+ wrappers: ['default-wrapper', 'label-wrapper'],
2146
+ defaultOptions: {
2147
+ props: {
2148
+ nzPlaceholder: ''
2149
+ }
2150
+ }
2151
+ }
2007
2152
  ],
2008
2153
  wrappers: [
2009
2154
  {
2010
- name: "default-wrapper",
2011
- component: NzFormlyDefaultWrapperComponent,
2155
+ name: 'default-wrapper',
2156
+ component: NzFormlyDefaultWrapperComponent
2012
2157
  },
2013
2158
  {
2014
- name: "label-wrapper",
2015
- component: NzFormlyLabelWrapperComponent,
2016
- },
2159
+ name: 'label-wrapper',
2160
+ component: NzFormlyLabelWrapperComponent
2161
+ }
2162
+ ],
2163
+ extensions: [
2164
+ {
2165
+ name: 'wrapper-extensions',
2166
+ extension: {
2167
+ onPopulate: wrapperExtension
2168
+ }
2169
+ }
2017
2170
  ],
2018
2171
  validators: [
2019
2172
  {
2020
- name: "required",
2021
- validation: () => RequiredValidator,
2173
+ name: 'required',
2174
+ validation: () => RequiredValidator
2022
2175
  },
2023
2176
  {
2024
- name: "minLen",
2025
- validation: (c, f) => minLengthValidator(c, f),
2177
+ name: 'minLen',
2178
+ validation: (c, f) => minLengthValidator(c, f)
2026
2179
  },
2027
2180
  {
2028
- name: "maxLen",
2029
- validation: (c, f) => maxLengthValidator(c, f),
2181
+ name: 'maxLen',
2182
+ validation: (c, f) => maxLengthValidator(c, f)
2030
2183
  },
2031
2184
  {
2032
- name: "minValue",
2033
- validation: (c, f) => minValueValidator(c, f),
2185
+ name: 'minValue',
2186
+ validation: (c, f) => minValueValidator(c, f)
2034
2187
  },
2035
2188
  {
2036
- name: "maxValue",
2037
- validation: (c, f) => maxValueValidator(c, f),
2189
+ name: 'maxValue',
2190
+ validation: (c, f) => maxValueValidator(c, f)
2038
2191
  },
2039
2192
  {
2040
- name: "email",
2041
- validation: (c) => emailValidator(c),
2193
+ name: 'email',
2194
+ validation: (c) => emailValidator(c)
2042
2195
  },
2043
2196
  {
2044
- name: "password",
2045
- validation: (c, f) => passwordValidator(c, f),
2046
- },
2197
+ name: 'password',
2198
+ validation: (c, f) => passwordValidator(c, f)
2199
+ }
2047
2200
  ],
2048
2201
  validationMessages: [
2049
2202
  {
2050
- name: "required",
2051
- message: "This field is required",
2203
+ name: 'required',
2204
+ message: 'This field is required'
2052
2205
  },
2053
2206
  {
2054
- name: "minLen",
2055
- message: (err, f) => minLengthMessage(f),
2207
+ name: 'minLen',
2208
+ message: (err, f) => minLengthMessage(f)
2056
2209
  },
2057
2210
  {
2058
- name: "maxLen",
2059
- message: (err, f) => maxLengthMessage(f),
2211
+ name: 'maxLen',
2212
+ message: (err, f) => maxLengthMessage(f)
2060
2213
  },
2061
2214
  {
2062
- name: "minValue",
2063
- message: (err, f) => minValueMessage(f),
2215
+ name: 'minValue',
2216
+ message: (err, f) => minValueMessage(f)
2064
2217
  },
2065
2218
  {
2066
- name: "maxValue",
2067
- message: (err, f) => maxValueMessage(f),
2219
+ name: 'maxValue',
2220
+ message: (err, f) => maxValueMessage(f)
2068
2221
  },
2069
2222
  {
2070
- name: "email",
2071
- message: "Email format is not correct",
2223
+ name: 'email',
2224
+ message: 'Email format is not correct'
2072
2225
  },
2073
2226
  {
2074
- name: "password",
2075
- message: "Password should be at least 8 characters, including one capital letter, one number and one special character",
2227
+ name: 'password',
2228
+ message: 'Password should be at least 8 characters, including one capital letter, one number and one special character'
2076
2229
  },
2077
2230
  {
2078
- name: "mask",
2079
- message: "Invalid data",
2080
- },
2081
- ],
2231
+ name: 'mask',
2232
+ message: 'Invalid data'
2233
+ }
2234
+ ]
2082
2235
  };
2083
- class NgxNzFormlyModule {
2084
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgxNzFormlyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2085
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: NgxNzFormlyModule, declarations: [NzFormlyFieldInputComponent,
2086
- NzFormlyFieldTextareaComponent,
2087
- NzFormlyFieldCheckboxComponent,
2088
- NzFormlyFieldSwitchComponent,
2089
- NzFormlyFieldSelectComponent,
2090
- NzFormlyButtonComponent,
2091
- NzFormlyFieldRadioComponent,
2092
- NzFormlyFieldSliderComponent,
2093
- NzFormlyLabelWrapperComponent,
2094
- NzFormlyDefaultWrapperComponent], imports: [CommonModule,
2095
- FormlyModule,
2096
- ReactiveFormsModule,
2097
- NgxMaskModule,
2098
- NzInputModule,
2099
- NzButtonModule,
2100
- NzIconModule,
2101
- NzCheckboxModule,
2102
- NzSwitchModule,
2103
- NzInputNumberModule,
2104
- NzSelectModule,
2105
- NzRadioModule,
2106
- NzSliderModule] }); }
2107
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgxNzFormlyModule, imports: [CommonModule,
2108
- FormlyModule,
2109
- ReactiveFormsModule,
2110
- NgxMaskModule,
2111
- NzInputModule,
2112
- NzButtonModule,
2113
- NzIconModule,
2114
- NzCheckboxModule,
2115
- NzSwitchModule,
2116
- NzInputNumberModule,
2117
- NzSelectModule,
2118
- NzRadioModule,
2119
- NzSliderModule] }); }
2236
+
2237
+ /**
2238
+ * Registers ngx-nz-formly with Formly for a standalone application.
2239
+ *
2240
+ * ```ts
2241
+ * bootstrapApplication(AppComponent, {
2242
+ * providers: [provideAnimations(), provideNgxNzFormly()],
2243
+ * });
2244
+ * ```
2245
+ *
2246
+ * The field types/wrappers are standalone components resolved by Formly at
2247
+ * runtime, so no NgModule import is required. Add `provideNgxMask()` yourself
2248
+ * if you use the masked input.
2249
+ */
2250
+ function provideNgxNzFormly() {
2251
+ return makeEnvironmentProviders([
2252
+ importProvidersFrom(FormlyModule.forRoot(NzFormlyForRoot)),
2253
+ NzFormlyFieldBuilder
2254
+ ]);
2120
2255
  }
2121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgxNzFormlyModule, decorators: [{
2122
- type: NgModule,
2123
- args: [{
2124
- declarations: [
2125
- NzFormlyFieldInputComponent,
2126
- NzFormlyFieldTextareaComponent,
2127
- NzFormlyFieldCheckboxComponent,
2128
- NzFormlyFieldSwitchComponent,
2129
- NzFormlyFieldSelectComponent,
2130
- NzFormlyButtonComponent,
2131
- NzFormlyFieldRadioComponent,
2132
- NzFormlyFieldSliderComponent,
2133
- NzFormlyLabelWrapperComponent,
2134
- NzFormlyDefaultWrapperComponent,
2135
- ],
2136
- imports: [
2137
- CommonModule,
2138
- FormlyModule,
2139
- ReactiveFormsModule,
2140
- NgxMaskModule,
2141
- NzInputModule,
2142
- NzButtonModule,
2143
- NzIconModule,
2144
- NzCheckboxModule,
2145
- NzSwitchModule,
2146
- NzInputNumberModule,
2147
- NzSelectModule,
2148
- NzRadioModule,
2149
- NzSliderModule,
2150
- ],
2151
- exports: [],
2152
- }]
2153
- }] });
2154
2256
 
2155
2257
  var InputMask;
2156
2258
  (function (InputMask) {
2157
2259
  InputMask["PHONE"] = "phone";
2158
2260
  })(InputMask || (InputMask = {}));
2159
2261
 
2160
- class NzFormlyFieldBuilder {
2161
- input(key, configOverrides) {
2162
- return {
2163
- key,
2164
- type: "input",
2165
- ...configOverrides,
2166
- };
2167
- }
2168
- textarea(key, configOverrides) {
2169
- return {
2170
- key,
2171
- type: "textarea",
2172
- ...configOverrides,
2173
- };
2174
- }
2175
- checkbox(key, configOverrides) {
2176
- return {
2177
- key,
2178
- type: "checkbox",
2179
- ...configOverrides,
2180
- };
2181
- }
2182
- switch(key, configOverrides) {
2183
- return {
2184
- key,
2185
- type: "switch",
2186
- ...configOverrides,
2187
- };
2188
- }
2189
- radio(key, configOverrides) {
2190
- return {
2191
- key,
2192
- type: "radio",
2193
- ...configOverrides,
2194
- };
2195
- }
2196
- select(key, configOverrides) {
2197
- return {
2198
- key,
2199
- type: "select",
2200
- ...configOverrides,
2201
- };
2202
- }
2203
- slider(key, configOverrides) {
2204
- return {
2205
- key,
2206
- type: "slider",
2207
- ...configOverrides,
2208
- };
2262
+ /**
2263
+ * A Jalali date-fns locale tuned for ng-zorro's date-picker panel:
2264
+ *
2265
+ * - Weekday column headers: ng-zorro formats them with the date-fns "short"
2266
+ * width, which for faIR is "۱ش/۲ش…". We remap "short" to faIR's "narrow"
2267
+ * width so columns read as single Persian initials (ش ی د س چ پ ج).
2268
+ * - Month labels: ng-zorro uses the "abbreviated" width ("مرد"), so we remap it
2269
+ * to the "wide" (full) names ("مرداد").
2270
+ *
2271
+ * Everything else delegates to the stock faIR locale.
2272
+ */
2273
+ const jalaliDateLocale = {
2274
+ ...faIR,
2275
+ localize: {
2276
+ ...faIR.localize,
2277
+ day: (value, options) => faIR.localize.day(value, {
2278
+ ...options,
2279
+ width: options?.width === 'short' ? 'narrow' : options?.width
2280
+ }),
2281
+ month: (value, options) => faIR.localize.month(value, {
2282
+ ...options,
2283
+ width: options?.width === 'abbreviated' ? 'wide' : options?.width
2284
+ })
2209
2285
  }
2210
- button(configOverrides) {
2211
- return {
2212
- type: "button",
2213
- ...configOverrides,
2214
- };
2286
+ };
2287
+
2288
+ /**
2289
+ * ng-zorro derives its calendar arithmetic from `date-fns`. With the
2290
+ * `date-fns` -> `date-fns-jalali` package override, most `CandyDate` operations
2291
+ * become Jalali-aware, but two things stay on the native (Gregorian) calendar
2292
+ * and break the round-trip that emits the form value:
2293
+ *
2294
+ * 1. The field GETTERS (`getYear/getMonth/getDate`) read raw native fields.
2295
+ * 2. `setDate` uses the native `Date.setDate` (unlike `setYear`/`setMonth`,
2296
+ * which use the overridden date-fns and are therefore Jalali).
2297
+ *
2298
+ * ng-zorro's `DateTableComponent.changeValueFromInside` does:
2299
+ *
2300
+ * activeDate.setYear(value.getYear()).setMonth(value.getMonth()).setDate(value.getDate())
2301
+ *
2302
+ * Mixing Gregorian getters + Jalali `setYear/setMonth` + native `setDate`
2303
+ * corrupts the emitted Date (year ~+621 off, wrong day). This patch aligns all
2304
+ * axes on the Jalali calendar so getter/setter round-trip and the emitted
2305
+ * native Date stays the correct Gregorian instant. Idempotent; call once at app
2306
+ * init (see provideNzFormlyJalali()).
2307
+ */
2308
+ function patchCandyDateForJalali() {
2309
+ const proto = CandyDate.prototype;
2310
+ if (proto.__ngxNzJalaliPatched) {
2311
+ return;
2215
2312
  }
2313
+ proto.getYear = function () {
2314
+ return getYear(this.nativeDate);
2315
+ };
2316
+ proto.getMonth = function () {
2317
+ return getMonth(this.nativeDate);
2318
+ };
2319
+ proto.getDate = function () {
2320
+ return getDate(this.nativeDate);
2321
+ };
2322
+ proto.setDate = function (amount) {
2323
+ return new CandyDate(setDate(this.nativeDate, amount));
2324
+ };
2325
+ proto.__ngxNzJalaliPatched = true;
2326
+ }
2327
+
2328
+ /**
2329
+ * Enables the Jalali (Persian) calendar for ngx-nz-formly's date-picker:
2330
+ * a real Jalali calendar panel, with correct Gregorian `Date` values emitted
2331
+ * to the form control.
2332
+ *
2333
+ * It provides ng-zorro's Persian UI text (`fa_IR`) and a Jalali date-fns locale
2334
+ * (`date-fns-jalali`'s `faIR`) for formatting, and patches `CandyDate`'s field
2335
+ * getters to be Jalali-aware so ng-zorro's getter/setter round-trip no longer
2336
+ * corrupts the value (see patch-candy-date.ts).
2337
+ *
2338
+ * REQUIRED consumer setup: ng-zorro derives its calendar *arithmetic* from the
2339
+ * functions it imports from `date-fns`, which cannot be swapped via DI. To get
2340
+ * a real Jalali calendar you must replace `date-fns` with `date-fns-jalali` at
2341
+ * install time via a package override (npm `overrides` / yarn `resolutions`):
2342
+ *
2343
+ * ```json
2344
+ * "overrides": { "date-fns": "npm:date-fns-jalali@2.30.0-0" }
2345
+ * ```
2346
+ *
2347
+ * (A tsconfig `paths` alias is NOT enough — the esbuild application builder does
2348
+ * not rewrite imports inside already-compiled node_modules.)
2349
+ *
2350
+ * Usage (standalone bootstrap):
2351
+ * ```ts
2352
+ * providers: [provideNgxNzFormly(), provideNzFormlyJalali()]
2353
+ * ```
2354
+ */
2355
+ function provideNzFormlyJalali() {
2356
+ return makeEnvironmentProviders([
2357
+ { provide: NZ_I18N, useValue: fa_IR },
2358
+ { provide: NZ_DATE_LOCALE, useValue: jalaliDateLocale },
2359
+ provideAppInitializer(() => patchCandyDateForJalali())
2360
+ ]);
2216
2361
  }
2217
2362
 
2218
2363
  /**
2219
2364
  * Generated bundle index. Do not edit.
2220
2365
  */
2221
2366
 
2222
- export { NzFormlyFieldBuilder, NzFormlyForRoot, emailValidator, maxLengthMessage, maxLengthValidator, maxValueMessage, maxValueValidator, minLengthMessage, minLengthValidator, minValueMessage, minValueValidator, passwordValidator };
2367
+ export { NgxNzFormlyModule, NzFormlyFieldBuilder, NzFormlyForRoot, emailValidator, maxLengthMessage, maxLengthValidator, maxValueMessage, maxValueValidator, minLengthMessage, minLengthValidator, minValueMessage, minValueValidator, passwordValidator, provideNgxNzFormly, provideNzFormlyJalali };
2223
2368
  //# sourceMappingURL=ngx-nz-formly.mjs.map