ngx-formly-zorro-antd 17.0.3 → 17.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. package/card-wrapper/card-wrapper.props.d.ts +4 -0
  2. package/esm2022/card/card.type.mjs +8 -5
  3. package/esm2022/card-wrapper/card-wrapper.props.mjs +1 -1
  4. package/esm2022/card-wrapper/card.wrapper.mjs +7 -4
  5. package/esm2022/datepicker/datepicker.type.mjs +151 -155
  6. package/esm2022/form-field/form-field.props.mjs +1 -1
  7. package/esm2022/form-field/form-field.wrapper.mjs +53 -53
  8. package/esm2022/grid/grid.props.mjs +1 -1
  9. package/esm2022/input/input.type.mjs +142 -146
  10. package/esm2022/lib/ui-ng-zorro-antd.module.mjs +33 -59
  11. package/esm2022/radio/radio.type.mjs +62 -42
  12. package/esm2022/select/select.type.mjs +26 -24
  13. package/esm2022/space/space.type.mjs +3 -3
  14. package/esm2022/textarea/textarea.type.mjs +18 -22
  15. package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs +7 -4
  16. package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs.map +1 -1
  17. package/fesm2022/ngx-formly-zorro-antd-card.mjs +8 -5
  18. package/fesm2022/ngx-formly-zorro-antd-card.mjs.map +1 -1
  19. package/fesm2022/ngx-formly-zorro-antd-datepicker.mjs +150 -154
  20. package/fesm2022/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
  21. package/fesm2022/ngx-formly-zorro-antd-form-field.mjs +52 -52
  22. package/fesm2022/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
  23. package/fesm2022/ngx-formly-zorro-antd-input.mjs +141 -145
  24. package/fesm2022/ngx-formly-zorro-antd-input.mjs.map +1 -1
  25. package/fesm2022/ngx-formly-zorro-antd-radio.mjs +62 -42
  26. package/fesm2022/ngx-formly-zorro-antd-radio.mjs.map +1 -1
  27. package/fesm2022/ngx-formly-zorro-antd-select.mjs +26 -24
  28. package/fesm2022/ngx-formly-zorro-antd-select.mjs.map +1 -1
  29. package/fesm2022/ngx-formly-zorro-antd-space.mjs +2 -2
  30. package/fesm2022/ngx-formly-zorro-antd-space.mjs.map +1 -1
  31. package/fesm2022/ngx-formly-zorro-antd-textarea.mjs +17 -21
  32. package/fesm2022/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
  33. package/fesm2022/ngx-formly-zorro-antd.mjs +32 -58
  34. package/fesm2022/ngx-formly-zorro-antd.mjs.map +1 -1
  35. package/form-field/form-field.props.d.ts +50 -52
  36. package/grid/grid.props.d.ts +14 -14
  37. package/lib/ui-ng-zorro-antd.module.d.ts +1 -1
  38. package/package.json +18 -18
  39. package/space/space.type.d.ts +2 -1
@@ -1,15 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/common';
3
+ import * as i4 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import * as i2 from '@angular/forms';
5
+ import * as i1 from '@angular/forms';
6
6
  import { ReactiveFormsModule } from '@angular/forms';
7
- import * as i4 from '@ngx-formly/core';
7
+ import * as i3 from '@ngx-formly/core';
8
8
  import { FieldType, FormlyModule } from '@ngx-formly/core';
9
9
  import * as i5 from '@ngx-formly/core/select';
10
10
  import { FormlySelectModule } from '@ngx-formly/core/select';
11
11
  import { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';
12
- import * as i3 from 'ng-zorro-antd/radio';
12
+ import * as i2 from 'ng-zorro-antd/radio';
13
13
  import { NzRadioModule } from 'ng-zorro-antd/radio';
14
14
  import { NzFormModule } from 'ng-zorro-antd/form';
15
15
 
@@ -33,28 +33,38 @@ class FormlyFieldRadio extends FieldType {
33
33
  [nzButtonStyle]="props['buttonStyle']!"
34
34
  >
35
35
  @if (props.type !== 'button') {
36
- <label
37
- *ngFor="let option of props.options | formlySelectOptions: field | async; let i = index"
38
- [id]="id + '_' + i"
39
- [nzDisabled]="option.disabled === true"
40
- [nzValue]="option.value"
41
- nz-radio
42
- >
43
- {{ option.label }}
44
- </label>
36
+ @for (
37
+ option of props.options | formlySelectOptions: field | async;
38
+ track option;
39
+ let i = $index
40
+ ) {
41
+ <label
42
+ [id]="id + '_' + i"
43
+ [nzDisabled]="option.disabled === true"
44
+ [nzValue]="option.value"
45
+ nz-radio
46
+ >
47
+ {{ option.label }}
48
+ </label>
49
+ }
45
50
  } @else {
46
- <label
47
- *ngFor="let option of props.options | formlySelectOptions: field | async; let i = index"
48
- [id]="id + '_' + i"
49
- [nzDisabled]="option.disabled === true"
50
- [nzValue]="option.value"
51
- nz-radio-button
52
- >
53
- {{ option.label }}
54
- </label>
51
+ @for (
52
+ option of props.options | formlySelectOptions: field | async;
53
+ track option;
54
+ let i = $index
55
+ ) {
56
+ <label
57
+ [id]="id + '_' + i"
58
+ [nzDisabled]="option.disabled === true"
59
+ [nzValue]="option.value"
60
+ nz-radio-button
61
+ >
62
+ {{ option.label }}
63
+ </label>
64
+ }
55
65
  }
56
66
  </nz-radio-group>
57
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus"], exportAs: ["nzRadio"] }, { kind: "directive", type: i3.NzRadioButtonDirective, selector: "[nz-radio-button]" }, { kind: "component", type: i3.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }, { kind: "directive", type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.FormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
67
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus"], exportAs: ["nzRadio"] }, { kind: "directive", type: i2.NzRadioButtonDirective, selector: "[nz-radio-button]" }, { kind: "component", type: i2.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }, { kind: "directive", type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.FormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
58
68
  }
59
69
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: FormlyFieldRadio, decorators: [{
60
70
  type: Component,
@@ -69,25 +79,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
69
79
  [nzButtonStyle]="props['buttonStyle']!"
70
80
  >
71
81
  @if (props.type !== 'button') {
72
- <label
73
- *ngFor="let option of props.options | formlySelectOptions: field | async; let i = index"
74
- [id]="id + '_' + i"
75
- [nzDisabled]="option.disabled === true"
76
- [nzValue]="option.value"
77
- nz-radio
78
- >
79
- {{ option.label }}
80
- </label>
82
+ @for (
83
+ option of props.options | formlySelectOptions: field | async;
84
+ track option;
85
+ let i = $index
86
+ ) {
87
+ <label
88
+ [id]="id + '_' + i"
89
+ [nzDisabled]="option.disabled === true"
90
+ [nzValue]="option.value"
91
+ nz-radio
92
+ >
93
+ {{ option.label }}
94
+ </label>
95
+ }
81
96
  } @else {
82
- <label
83
- *ngFor="let option of props.options | formlySelectOptions: field | async; let i = index"
84
- [id]="id + '_' + i"
85
- [nzDisabled]="option.disabled === true"
86
- [nzValue]="option.value"
87
- nz-radio-button
88
- >
89
- {{ option.label }}
90
- </label>
97
+ @for (
98
+ option of props.options | formlySelectOptions: field | async;
99
+ track option;
100
+ let i = $index
101
+ ) {
102
+ <label
103
+ [id]="id + '_' + i"
104
+ [nzDisabled]="option.disabled === true"
105
+ [nzValue]="option.value"
106
+ nz-radio-button
107
+ >
108
+ {{ option.label }}
109
+ </label>
110
+ }
91
111
  }
92
112
  </nz-radio-group>
93
113
  `,
@@ -102,7 +122,7 @@ class FormlyNzRadioModule {
102
122
  FormlyNzFormFieldModule,
103
123
  FormlySelectModule,
104
124
  NzFormModule,
105
- NzRadioModule, i4.FormlyModule] }); }
125
+ NzRadioModule, i3.FormlyModule] }); }
106
126
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: FormlyNzRadioModule, imports: [CommonModule,
107
127
  ReactiveFormsModule,
108
128
  FormlyNzFormFieldModule,
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-zorro-antd-radio.mjs","sources":["../../../../packages/formlyantd/radio/src/radio.type.ts","../../../../packages/formlyantd/radio/src/radio.module.ts","../../../../packages/formlyantd/radio/src/ngx-formly-zorro-antd-radio.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\nimport type { FormlyFieldSelectProps } from '@ngx-formly/core/select';\nimport type { NzSizeLDSType } from 'ng-zorro-antd/core/types';\nimport type { NzRadioButtonStyle } from 'ng-zorro-antd/radio';\n\ninterface RadioProps extends FormlyFieldProps, FormlyFieldSelectProps {\n type?: 'button';\n\n /**\n * nz-radio-group 下所有 input[type=\"radio\"] 的 name 属性\n */\n name?: string | null;\n /**\n * 大小,只对按钮样式生效\n * @default default\n */\n size?: NzSizeLDSType;\n /**\n * RadioButton 的风格样式,目前有描边和填色两种风格\n * @default outline\n */\n buttonStyle?: NzRadioButtonStyle;\n}\n\nexport interface FormlyRadioFieldConfig extends NzFormlyFieldConfig<RadioProps> {\n type: 'radio' | Type<FormlyFieldRadio>;\n}\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <nz-radio-group\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzName]=\"field.name ?? null\"\n [nzSize]=\"props['size']!\"\n [nzButtonStyle]=\"props['buttonStyle']!\"\n >\n @if (props.type !== 'button') {\n <label\n *ngFor=\"let option of props.options | formlySelectOptions: field | async; let i = index\"\n [id]=\"id + '_' + i\"\n [nzDisabled]=\"option.disabled === true\"\n [nzValue]=\"option.value\"\n nz-radio\n >\n {{ option.label }}\n </label>\n } @else {\n <label\n *ngFor=\"let option of props.options | formlySelectOptions: field | async; let i = index\"\n [id]=\"id + '_' + i\"\n [nzDisabled]=\"option.disabled === true\"\n [nzValue]=\"option.value\"\n nz-radio-button\n >\n {{ option.label }}\n </label>\n }\n </nz-radio-group>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldRadio extends FieldType<FieldTypeConfig<RadioProps>> {\n override defaultOptions = {\n props: {\n size: 'default' as const,\n buttonStyle: 'outline' as const\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\nimport { FormlyFieldRadio } from './radio.type';\n\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { NzRadioModule } from 'ng-zorro-antd/radio';\n\n@NgModule({\n declarations: [FormlyFieldRadio],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n FormlySelectModule,\n NzFormModule,\n\n NzRadioModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;AAmEM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AAnC5E,IAAA,WAAA,GAAA;;AAoCW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,WAAW,EAAE,SAAkB;AAChC,aAAA;SACF,CAAC;AACH,KAAA;8GAPY,gBAAgB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,EAjCjB,QAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,cAAA,EAAA,eAAA,CAAA,EAAA,EAAA,EAAA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AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,kBAAkB;wBAClB,YAAY;wBAEZ,aAAa;wBACb,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,OAAO;AACb,oCAAA,SAAS,EAAE,gBAAgB;oCAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AChCD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-zorro-antd-radio.mjs","sources":["../../../../packages/formlyantd/radio/src/radio.type.ts","../../../../packages/formlyantd/radio/src/radio.module.ts","../../../../packages/formlyantd/radio/src/ngx-formly-zorro-antd-radio.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\nimport type { FormlyFieldSelectProps } from '@ngx-formly/core/select';\nimport type { NzSizeLDSType } from 'ng-zorro-antd/core/types';\nimport type { NzRadioButtonStyle } from 'ng-zorro-antd/radio';\n\ninterface RadioProps extends FormlyFieldProps, FormlyFieldSelectProps {\n type?: 'button';\n\n /**\n * nz-radio-group 下所有 input[type=\"radio\"] 的 name 属性\n */\n name?: string | null;\n /**\n * 大小,只对按钮样式生效\n * @default default\n */\n size?: NzSizeLDSType;\n /**\n * RadioButton 的风格样式,目前有描边和填色两种风格\n * @default outline\n */\n buttonStyle?: NzRadioButtonStyle;\n}\n\nexport interface FormlyRadioFieldConfig extends NzFormlyFieldConfig<RadioProps> {\n type: 'radio' | Type<FormlyFieldRadio>;\n}\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <nz-radio-group\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzName]=\"field.name ?? null\"\n [nzSize]=\"props['size']!\"\n [nzButtonStyle]=\"props['buttonStyle']!\"\n >\n @if (props.type !== 'button') {\n @for (\n option of props.options | formlySelectOptions: field | async;\n track option;\n let i = $index\n ) {\n <label\n [id]=\"id + '_' + i\"\n [nzDisabled]=\"option.disabled === true\"\n [nzValue]=\"option.value\"\n nz-radio\n >\n {{ option.label }}\n </label>\n }\n } @else {\n @for (\n option of props.options | formlySelectOptions: field | async;\n track option;\n let i = $index\n ) {\n <label\n [id]=\"id + '_' + i\"\n [nzDisabled]=\"option.disabled === true\"\n [nzValue]=\"option.value\"\n nz-radio-button\n >\n {{ option.label }}\n </label>\n }\n }\n </nz-radio-group>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldRadio extends FieldType<FieldTypeConfig<RadioProps>> {\n override defaultOptions = {\n props: {\n size: 'default' as const,\n buttonStyle: 'outline' as const\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\nimport { FormlyFieldRadio } from './radio.type';\n\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { NzRadioModule } from 'ng-zorro-antd/radio';\n\n@NgModule({\n declarations: [FormlyFieldRadio],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n FormlySelectModule,\n NzFormModule,\n\n NzRadioModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;AA6EM,MAAO,gBAAiB,SAAQ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B,YAAY;YAEZ,aAAa,EAAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA,EAAA;AAYJ,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAlB5B,YAAY;YACZ,mBAAmB;YACnB,uBAAuB;YACvB,kBAAkB;YAClB,YAAY;YAEZ,aAAa;YACb,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,SAAS,EAAE,gBAAgB;wBAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBArB/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,kBAAkB;wBAClB,YAAY;wBAEZ,aAAa;wBACb,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,OAAO;AACb,oCAAA,SAAS,EAAE,gBAAgB;oCAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AChCD;;AAEG;;;;"}
@@ -1,15 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Component, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/common';
3
+ import * as i4 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import * as i2 from '@angular/forms';
5
+ import * as i1 from '@angular/forms';
6
6
  import { ReactiveFormsModule } from '@angular/forms';
7
- import * as i4 from '@ngx-formly/core';
7
+ import * as i3 from '@ngx-formly/core';
8
8
  import { FieldType, FormlyModule } from '@ngx-formly/core';
9
9
  import * as i5 from '@ngx-formly/core/select';
10
10
  import { FormlySelectModule } from '@ngx-formly/core/select';
11
11
  import { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';
12
- import * as i3 from 'ng-zorro-antd/select';
12
+ import * as i2 from 'ng-zorro-antd/select';
13
13
  import { NzSelectModule } from 'ng-zorro-antd/select';
14
14
 
15
15
  class FormlyFieldSelect extends FieldType {
@@ -81,16 +81,17 @@ class FormlyFieldSelect extends FieldType {
81
81
  (nzScrollToBottom)="props['scrollToBottom'] && props['scrollToBottom'](field, $event)"
82
82
  (nzOnSearch)="props['onSearch'] && props['onSearch'](field, $event)"
83
83
  >
84
- <ng-container *ngFor="let item of to.options | formlySelectOptions: field | async">
84
+ @for (item of to.options | formlySelectOptions: field | async; track item) {
85
85
  @if (item.group) {
86
86
  <nz-option-group [nzLabel]="item.label">
87
- <nz-option
88
- *ngFor="let child of item.group"
89
- [nzValue]="child.value"
90
- [nzDisabled]="child.disabled"
91
- [nzLabel]="child.label"
92
- >
93
- </nz-option>
87
+ @for (child of item.group; track child) {
88
+ <nz-option
89
+ [nzValue]="child.value"
90
+ [nzDisabled]="child.disabled"
91
+ [nzLabel]="child.label"
92
+ >
93
+ </nz-option>
94
+ }
94
95
  </nz-option-group>
95
96
  } @else {
96
97
  <nz-option
@@ -99,9 +100,9 @@ class FormlyFieldSelect extends FieldType {
99
100
  [nzLabel]="item.label"
100
101
  ></nz-option>
101
102
  }
102
- </ng-container>
103
+ }
103
104
  </nz-select>
104
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i3.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: "component", type: i3.NzOptionGroupComponent, selector: "nz-option-group", inputs: ["nzLabel"], exportAs: ["nzOptionGroup"] }, { kind: "directive", type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.FormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
105
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i2.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: "component", type: i2.NzOptionGroupComponent, selector: "nz-option-group", inputs: ["nzLabel"], exportAs: ["nzOptionGroup"] }, { kind: "directive", type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.FormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
105
106
  }
106
107
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: FormlyFieldSelect, decorators: [{
107
108
  type: Component,
@@ -145,16 +146,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
145
146
  (nzScrollToBottom)="props['scrollToBottom'] && props['scrollToBottom'](field, $event)"
146
147
  (nzOnSearch)="props['onSearch'] && props['onSearch'](field, $event)"
147
148
  >
148
- <ng-container *ngFor="let item of to.options | formlySelectOptions: field | async">
149
+ @for (item of to.options | formlySelectOptions: field | async; track item) {
149
150
  @if (item.group) {
150
151
  <nz-option-group [nzLabel]="item.label">
151
- <nz-option
152
- *ngFor="let child of item.group"
153
- [nzValue]="child.value"
154
- [nzDisabled]="child.disabled"
155
- [nzLabel]="child.label"
156
- >
157
- </nz-option>
152
+ @for (child of item.group; track child) {
153
+ <nz-option
154
+ [nzValue]="child.value"
155
+ [nzDisabled]="child.disabled"
156
+ [nzLabel]="child.label"
157
+ >
158
+ </nz-option>
159
+ }
158
160
  </nz-option-group>
159
161
  } @else {
160
162
  <nz-option
@@ -163,7 +165,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
163
165
  [nzLabel]="item.label"
164
166
  ></nz-option>
165
167
  }
166
- </ng-container>
168
+ }
167
169
  </nz-select>
168
170
  `,
169
171
  changeDetection: ChangeDetectionStrategy.OnPush
@@ -179,7 +181,7 @@ class FormlyNzSelectModule {
179
181
  ReactiveFormsModule,
180
182
  NzSelectModule,
181
183
  FormlyNzFormFieldModule,
182
- FormlySelectModule, i4.FormlyModule] }); }
184
+ FormlySelectModule, i3.FormlyModule] }); }
183
185
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: FormlyNzSelectModule, imports: [CommonModule,
184
186
  ReactiveFormsModule,
185
187
  NzSelectModule,
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-zorro-antd-select.mjs","sources":["../../../../packages/formlyantd/select/src/select.type.ts","../../../../packages/formlyantd/select/src/select.module.ts","../../../../packages/formlyantd/select/src/ngx-formly-zorro-antd-select.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy, ViewChild, OnInit } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport { NzSelectComponent } from 'ng-zorro-antd/select';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport type { SelectProps } from './select.props';\n\nexport interface FormlySelectFieldConfig extends NzFormlyFieldConfig<SelectProps> {\n type: 'select' | 'enum' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <nz-select\n #select\n [class.ng-dirty]=\"showError\"\n [nzPlaceHolder]=\"props.placeholder ?? ''\"\n [compareWith]=\"props['compareWith']!\"\n [nzAllowClear]=\"props['allowClear']!!\"\n [nzSelectOnTab]=\"props['selectOnTab']!!\"\n [nzAutoClearSearchValue]=\"props['autoClearSearchValue']\"\n [nzBackdrop]=\"props['backdrop']!!\"\n [nzBorderless]=\"props['borderless']\"\n [nzOpen]=\"props['open']!!\"\n [nzDropdownClassName]=\"props['dropdownClassName']\"\n [nzDropdownMatchSelectWidth]=\"props['dropdownMatchSelectWidth']!!\"\n [nzDropdownStyle]=\"props['dropdownStyle'] ?? null\"\n [nzCustomTemplate]=\"props['customTemplate'] ?? null\"\n [nzServerSearch]=\"props['serverSearch']!!\"\n [nzMaxMultipleCount]=\"props['maxMultipleCount']!\"\n [nzMode]=\"props['mode']!\"\n [nzShowSearch]=\"props['showSearch']!!\"\n [nzSize]=\"props['size']!\"\n [nzStatus]=\"props['status']!\"\n [nzLoading]=\"props['loading']!!\"\n [nzPlacement]=\"props['placement']\"\n [nzShowArrow]=\"props['showArrow']!!\"\n [nzMaxTagCount]=\"props['maxTagCount']\"\n [nzMaxTagPlaceholder]=\"props['maxTagPlaceholder'] ?? null\"\n [nzOptionHeightPx]=\"props['optionHeightPx']!\"\n [nzOptionOverflowSize]=\"props['optionOverflowSize']!\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n (ngModelChange)=\"props.change?.(field, $event)\"\n (nzBlur)=\"props.blur?.(field, $event)\"\n (nzFocus)=\"props.focus?.(field, $event)\"\n (nzOpenChange)=\"props['openChange'] && props['openChange'](field, $event)\"\n (nzScrollToBottom)=\"props['scrollToBottom'] && props['scrollToBottom'](field, $event)\"\n (nzOnSearch)=\"props['onSearch'] && props['onSearch'](field, $event)\"\n >\n <ng-container *ngFor=\"let item of to.options | formlySelectOptions: field | async\">\n @if (item.group) {\n <nz-option-group [nzLabel]=\"item.label\">\n <nz-option\n *ngFor=\"let child of item.group\"\n [nzValue]=\"child.value\"\n [nzDisabled]=\"child.disabled\"\n [nzLabel]=\"child.label\"\n >\n </nz-option>\n </nz-option-group>\n } @else {\n <nz-option\n [nzValue]=\"item.value\"\n [nzDisabled]=\"item.disabled\"\n [nzLabel]=\"item.label\"\n ></nz-option>\n }\n </ng-container>\n </nz-select>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig> implements OnInit {\n override defaultOptions = {\n props: {\n compareWith: (o1: NzSafeAny, o2: NzSafeAny) => o1 === o2,\n autoClearSearchValue: true,\n allowClear: false,\n backdrop: false,\n open: false,\n dropdownMatchSelectWidth: true,\n serverSearch: false,\n selectOnTab: false,\n maxMultipleCount: Infinity,\n mode: 'default' as const,\n showSearch: false,\n size: 'default' as const,\n status: '' as const,\n tokenSeparators: [],\n loading: false,\n optionHeightPx: 32,\n optionOverflowSize: 8\n }\n };\n @ViewChild('select', { static: true }) select!: NzSelectComponent;\n ngOnInit(): void {\n if (this.props['filterOption'] instanceof Function) {\n this.select.nzFilterOption = this.props['filterOption'] as NzSafeAny;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { NzSelectModule } from 'ng-zorro-antd/select';\n\nimport { FormlyFieldSelect } from './select.type';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzSelectModule,\n\n FormlyNzFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field']\n },\n { name: 'enum', extends: 'select' }\n ]\n })\n ]\n})\nexport class FormlyNzSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AA0EM,MAAO,iBAAkB,SAAQ,SAA0B,CAAA;AA/DjE,IAAA,WAAA,GAAA;;AAgEW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;gBACL,WAAW,EAAE,CAAC,EAAa,EAAE,EAAa,KAAK,EAAE,KAAK,EAAE;AACxD,gBAAA,oBAAoB,EAAE,IAAI;AAC1B,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,IAAI,EAAE,KAAK;AACX,gBAAA,wBAAwB,EAAE,IAAI;AAC9B,gBAAA,YAAY,EAAE,KAAK;AACnB,gBAAA,WAAW,EAAE,KAAK;AAClB,gBAAA,gBAAgB,EAAE,QAAQ;AAC1B,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,MAAM,EAAE,EAAW;AACnB,gBAAA,eAAe,EAAE,EAAE;AACnB,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,cAAc,EAAE,EAAE;AAClB,gBAAA,kBAAkB,EAAE,CAAC;AACtB,aAAA;SACF,CAAC;AAOH,KAAA;IALC,QAAQ,GAAA;QACN,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,YAAY,QAAQ,EAAE;YAClD,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAc,CAAC;AACtE,SAA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C,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,SAAS,EAAE,iBAAiB;wBAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACD,oBAAA,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;AACpC,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBArBhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBAEd,uBAAuB;wBACvB,kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACD,gCAAA,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;AACpC,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC/BD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-zorro-antd-select.mjs","sources":["../../../../packages/formlyantd/select/src/select.type.ts","../../../../packages/formlyantd/select/src/select.module.ts","../../../../packages/formlyantd/select/src/ngx-formly-zorro-antd-select.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy, ViewChild, OnInit } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport { NzSelectComponent } from 'ng-zorro-antd/select';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport type { SelectProps } from './select.props';\n\nexport interface FormlySelectFieldConfig extends NzFormlyFieldConfig<SelectProps> {\n type: 'select' | 'enum' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <nz-select\n #select\n [class.ng-dirty]=\"showError\"\n [nzPlaceHolder]=\"props.placeholder ?? ''\"\n [compareWith]=\"props['compareWith']!\"\n [nzAllowClear]=\"props['allowClear']!!\"\n [nzSelectOnTab]=\"props['selectOnTab']!!\"\n [nzAutoClearSearchValue]=\"props['autoClearSearchValue']\"\n [nzBackdrop]=\"props['backdrop']!!\"\n [nzBorderless]=\"props['borderless']\"\n [nzOpen]=\"props['open']!!\"\n [nzDropdownClassName]=\"props['dropdownClassName']\"\n [nzDropdownMatchSelectWidth]=\"props['dropdownMatchSelectWidth']!!\"\n [nzDropdownStyle]=\"props['dropdownStyle'] ?? null\"\n [nzCustomTemplate]=\"props['customTemplate'] ?? null\"\n [nzServerSearch]=\"props['serverSearch']!!\"\n [nzMaxMultipleCount]=\"props['maxMultipleCount']!\"\n [nzMode]=\"props['mode']!\"\n [nzShowSearch]=\"props['showSearch']!!\"\n [nzSize]=\"props['size']!\"\n [nzStatus]=\"props['status']!\"\n [nzLoading]=\"props['loading']!!\"\n [nzPlacement]=\"props['placement']\"\n [nzShowArrow]=\"props['showArrow']!!\"\n [nzMaxTagCount]=\"props['maxTagCount']\"\n [nzMaxTagPlaceholder]=\"props['maxTagPlaceholder'] ?? null\"\n [nzOptionHeightPx]=\"props['optionHeightPx']!\"\n [nzOptionOverflowSize]=\"props['optionOverflowSize']!\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n (ngModelChange)=\"props.change?.(field, $event)\"\n (nzBlur)=\"props.blur?.(field, $event)\"\n (nzFocus)=\"props.focus?.(field, $event)\"\n (nzOpenChange)=\"props['openChange'] && props['openChange'](field, $event)\"\n (nzScrollToBottom)=\"props['scrollToBottom'] && props['scrollToBottom'](field, $event)\"\n (nzOnSearch)=\"props['onSearch'] && props['onSearch'](field, $event)\"\n >\n @for (item of to.options | formlySelectOptions: field | async; track item) {\n @if (item.group) {\n <nz-option-group [nzLabel]=\"item.label\">\n @for (child of item.group; track child) {\n <nz-option\n [nzValue]=\"child.value\"\n [nzDisabled]=\"child.disabled\"\n [nzLabel]=\"child.label\"\n >\n </nz-option>\n }\n </nz-option-group>\n } @else {\n <nz-option\n [nzValue]=\"item.value\"\n [nzDisabled]=\"item.disabled\"\n [nzLabel]=\"item.label\"\n ></nz-option>\n }\n }\n </nz-select>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig> implements OnInit {\n override defaultOptions = {\n props: {\n compareWith: (o1: NzSafeAny, o2: NzSafeAny) => o1 === o2,\n autoClearSearchValue: true,\n allowClear: false,\n backdrop: false,\n open: false,\n dropdownMatchSelectWidth: true,\n serverSearch: false,\n selectOnTab: false,\n maxMultipleCount: Infinity,\n mode: 'default' as const,\n showSearch: false,\n size: 'default' as const,\n status: '' as const,\n tokenSeparators: [],\n loading: false,\n optionHeightPx: 32,\n optionOverflowSize: 8\n }\n };\n @ViewChild('select', { static: true }) select!: NzSelectComponent;\n ngOnInit(): void {\n if (this.props['filterOption'] instanceof Function) {\n this.select.nzFilterOption = this.props['filterOption'] as NzSafeAny;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { NzSelectModule } from 'ng-zorro-antd/select';\n\nimport { FormlyFieldSelect } from './select.type';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzSelectModule,\n\n FormlyNzFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field']\n },\n { name: 'enum', extends: 'select' }\n ]\n })\n ]\n})\nexport class FormlyNzSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AA2EM,MAAO,iBAAkB,SAAQ,SAA0B,CAAA;AAhEjE,IAAA,WAAA,GAAA;;AAiEW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;gBACL,WAAW,EAAE,CAAC,EAAa,EAAE,EAAa,KAAK,EAAE,KAAK,EAAE;AACxD,gBAAA,oBAAoB,EAAE,IAAI;AAC1B,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,IAAI,EAAE,KAAK;AACX,gBAAA,wBAAwB,EAAE,IAAI;AAC9B,gBAAA,YAAY,EAAE,KAAK;AACnB,gBAAA,WAAW,EAAE,KAAK;AAClB,gBAAA,gBAAgB,EAAE,QAAQ;AAC1B,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,MAAM,EAAE,EAAW;AACnB,gBAAA,eAAe,EAAE,EAAE;AACnB,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,cAAc,EAAE,EAAE;AAClB,gBAAA,kBAAkB,EAAE,CAAC;AACtB,aAAA;SACF,CAAC;AAOH,KAAA;IALC,QAAQ,GAAA;QACN,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,YAAY,QAAQ,EAAE;YAClD,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAc,CAAC;AACtE,SAAA;KACF;8GA3BU,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAjB,IAAA,SAAA,IAAA,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oBAAoB,EAAA,UAAA,EAAA,CAAA;kBArBhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBAEd,uBAAuB;wBACvB,kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACD,gCAAA,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;AACpC,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC/BD;;AAEG;;;;"}
@@ -30,7 +30,7 @@ class FormlyFieldSpace extends FieldType {
30
30
  [nzAlign]="props.align"
31
31
  [nzDirection]="props.direction!"
32
32
  [nzSplit]="nzSplit ?? null"
33
- [nzWrap]="props.wrap"
33
+ [nzWrap]="props.wrap!!"
34
34
  [formlyAttributes]="field"
35
35
  >
36
36
  @for (g of field.fieldGroup; track g.id) {
@@ -49,7 +49,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
49
49
  [nzAlign]="props.align"
50
50
  [nzDirection]="props.direction!"
51
51
  [nzSplit]="nzSplit ?? null"
52
- [nzWrap]="props.wrap"
52
+ [nzWrap]="props.wrap!!"
53
53
  [formlyAttributes]="field"
54
54
  >
55
55
  @for (g of field.fieldGroup; track g.id) {
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-zorro-antd-space.mjs","sources":["../../../../packages/formlyantd/space/src/space.type.ts","../../../../packages/formlyantd/space/src/space.module.ts","../../../../packages/formlyantd/space/src/ngx-formly-zorro-antd-space.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type, TemplateRef, Optional } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport { FormlyBoxTemplates, resolveTplName } from 'ngx-formly-zorro-antd/common';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { NzSpaceDirection, NzSpaceSize, NzSpaceAlign } from 'ng-zorro-antd/space';\n\ninterface SpaceProps extends FormlyFieldProps {\n type?: 'space';\n\n /**\n * 间距大小\n */\n size?: NzSpaceSize;\n /**\n * 间距方向\n */\n direction?: NzSpaceDirection;\n /**\n * 对齐方式\n */\n align?: NzSpaceAlign;\n /**\n * 是否自动换行,仅在 horizontal 时有效\n */\n wrap?: boolean;\n /**\n * 设置分隔符\n */\n split?: TemplateRef<{\n $implicit: number;\n }> | null;\n splitName?: string;\n}\n\nexport interface FormlySpaceFieldConfig extends NzFormlyFieldConfig<SpaceProps> {\n type: 'space' | Type<FormlyFieldSpace>;\n}\n\n@Component({\n selector: 'formly-field-space',\n template: `\n <nz-space\n [nzSize]=\"props.size!\"\n [nzAlign]=\"props.align\"\n [nzDirection]=\"props.direction!\"\n [nzSplit]=\"nzSplit ?? null\"\n [nzWrap]=\"props.wrap\"\n [formlyAttributes]=\"field\"\n >\n @for (g of field.fieldGroup; track g.id) {\n <formly-field *nzSpaceItem [field]=\"g\"></formly-field>\n }\n </nz-space>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSpace extends FieldType<FieldTypeConfig<SpaceProps>> {\n override defaultOptions = {\n props: {\n size: 'small' as const,\n direction: 'horizontal' as const,\n wrap: false\n }\n };\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\n super();\n }\n get nzSplit() {\n return resolveTplName(this.props, this.fieldTemplates, 'split');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyFieldSpace } from './space.type';\n\nimport { NzSpaceModule } from 'ng-zorro-antd/space';\n\n@NgModule({\n declarations: [FormlyFieldSpace],\n imports: [\n CommonModule,\n NzSpaceModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'space',\n component: FormlyFieldSpace\n }\n ]\n })\n ]\n})\nexport class FormlyNzSpaceModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAyDM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AAQ1E,IAAA,WAAA,CAA+B,cAAkC,EAAA;AAC/D,QAAA,KAAK,EAAE,CAAC;QADqB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;AAPxD,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,OAAgB;AACtB,gBAAA,SAAS,EAAE,YAAqB;AAChC,gBAAA,IAAI,EAAE,KAAK;AACZ,aAAA;SACF,CAAC;KAGD;AACD,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;KACjE;8GAbU,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,EAhBjB,QAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;AAaT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EA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AA,EAAA;AAWJ,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAZ5B,YAAY;YACZ,aAAa;YACb,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,SAAS,EAAE,gBAAgB;AAC5B,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAf/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,OAAO;AACb,oCAAA,SAAS,EAAE,gBAAgB;AAC5B,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-zorro-antd-space.mjs","sources":["../../../../packages/formlyantd/space/src/space.type.ts","../../../../packages/formlyantd/space/src/space.module.ts","../../../../packages/formlyantd/space/src/ngx-formly-zorro-antd-space.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type, TemplateRef, Optional } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport { FormlyBoxTemplates, resolveTplName } from 'ngx-formly-zorro-antd/common';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { NzSpaceDirection, NzSpaceSize, NzSpaceAlign } from 'ng-zorro-antd/space';\n\ninterface SpaceProps extends FormlyFieldProps {\n /**\n * 间距大小\n * @default small\n */\n size?: NzSpaceSize;\n /**\n * 间距方向\n * @default horizontal\n */\n direction?: NzSpaceDirection;\n /**\n * 对齐方式\n */\n align?: NzSpaceAlign;\n /**\n * 是否自动换行,仅在 horizontal 时有效\n */\n wrap?: boolean;\n /**\n * 设置分隔符\n */\n split?: TemplateRef<{\n $implicit: number;\n }> | null;\n splitName?: string;\n}\n\nexport interface FormlySpaceFieldConfig extends NzFormlyFieldConfig<SpaceProps> {\n type: 'space' | Type<FormlyFieldSpace>;\n}\n\n@Component({\n selector: 'formly-field-space',\n template: `\n <nz-space\n [nzSize]=\"props.size!\"\n [nzAlign]=\"props.align\"\n [nzDirection]=\"props.direction!\"\n [nzSplit]=\"nzSplit ?? null\"\n [nzWrap]=\"props.wrap!!\"\n [formlyAttributes]=\"field\"\n >\n @for (g of field.fieldGroup; track g.id) {\n <formly-field *nzSpaceItem [field]=\"g\"></formly-field>\n }\n </nz-space>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSpace extends FieldType<FieldTypeConfig<SpaceProps>> {\n override defaultOptions = {\n props: {\n size: 'small' as const,\n direction: 'horizontal' as const,\n wrap: false\n }\n };\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\n super();\n }\n get nzSplit() {\n return resolveTplName(this.props, this.fieldTemplates, 'split');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyFieldSpace } from './space.type';\n\nimport { NzSpaceModule } from 'ng-zorro-antd/space';\n\n@NgModule({\n declarations: [FormlyFieldSpace],\n imports: [\n CommonModule,\n NzSpaceModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'space',\n component: FormlyFieldSpace\n }\n ]\n })\n ]\n})\nexport class FormlyNzSpaceModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api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,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,SAAS,EAAE,gBAAgB;AAC5B,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAf/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,OAAO;AACb,oCAAA,SAAS,EAAE,gBAAgB;AAC5B,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
@@ -25,8 +25,8 @@ class FormlyFieldTextarea extends FieldType {
25
25
  }
26
26
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: FormlyFieldTextarea, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
27
27
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.3", type: FormlyFieldTextarea, selector: "formly-field-textarea", usesInheritance: true, ngImport: i0, template: `
28
- <ng-container [ngSwitch]="props.type">
29
- <ng-container *ngSwitchCase="'count'">
28
+ @switch (props.type) {
29
+ @case ('count') {
30
30
  <nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
31
31
  <textarea
32
32
  [formControl]="formControl"
@@ -39,21 +39,19 @@ class FormlyFieldTextarea extends FieldType {
39
39
  [nzAutosize]="props['autosize']!!"
40
40
  ></textarea>
41
41
  </nz-textarea-count>
42
- </ng-container>
43
-
44
- <ng-container *ngSwitchCase="'clear'">
42
+ }
43
+ @case ('clear') {
45
44
  <nz-input-group
46
45
  class="ant-input-affix-wrapper-textarea-with-clear-btn"
47
46
  [nzSuffix]="textAreaClearTpl"
48
47
  >
49
48
  <ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
50
49
  </nz-input-group>
51
- </ng-container>
52
-
53
- <ng-container *ngSwitchDefault>
50
+ }
51
+ @default {
54
52
  <ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
55
- </ng-container>
56
- </ng-container>
53
+ }
54
+ }
57
55
 
58
56
  <ng-template #textareaTpl>
59
57
  <textarea
@@ -80,15 +78,15 @@ class FormlyFieldTextarea extends FieldType {
80
78
  ></span>
81
79
  }
82
80
  </ng-template>
83
- `, isInline: true, dependencies: [{ 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.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.NzTextareaCountComponent, selector: "nz-textarea-count", inputs: ["nzMaxCharacterCount", "nzComputeCharacterCount", "nzFormatter"] }, { kind: "directive", type: i3.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i3.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i3.NzAutosizeDirective, selector: "textarea[nzAutosize]", inputs: ["nzAutosize"], exportAs: ["nzAutosize"] }, { kind: "directive", type: i3.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "directive", type: i4.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: i5.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
81
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.NzTextareaCountComponent, selector: "nz-textarea-count", inputs: ["nzMaxCharacterCount", "nzComputeCharacterCount", "nzFormatter"] }, { kind: "directive", type: i3.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i3.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i3.NzAutosizeDirective, selector: "textarea[nzAutosize]", inputs: ["nzAutosize"], exportAs: ["nzAutosize"] }, { kind: "directive", type: i3.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "directive", type: i4.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: i5.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
84
82
  }
85
83
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: FormlyFieldTextarea, decorators: [{
86
84
  type: Component,
87
85
  args: [{
88
86
  selector: 'formly-field-textarea',
89
87
  template: `
90
- <ng-container [ngSwitch]="props.type">
91
- <ng-container *ngSwitchCase="'count'">
88
+ @switch (props.type) {
89
+ @case ('count') {
92
90
  <nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
93
91
  <textarea
94
92
  [formControl]="formControl"
@@ -101,21 +99,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
101
99
  [nzAutosize]="props['autosize']!!"
102
100
  ></textarea>
103
101
  </nz-textarea-count>
104
- </ng-container>
105
-
106
- <ng-container *ngSwitchCase="'clear'">
102
+ }
103
+ @case ('clear') {
107
104
  <nz-input-group
108
105
  class="ant-input-affix-wrapper-textarea-with-clear-btn"
109
106
  [nzSuffix]="textAreaClearTpl"
110
107
  >
111
108
  <ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
112
109
  </nz-input-group>
113
- </ng-container>
114
-
115
- <ng-container *ngSwitchDefault>
110
+ }
111
+ @default {
116
112
  <ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
117
- </ng-container>
118
- </ng-container>
113
+ }
114
+ }
119
115
 
120
116
  <ng-template #textareaTpl>
121
117
  <textarea
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-zorro-antd-textarea.mjs","sources":["../../../../packages/formlyantd/textarea/src/textarea.type.ts","../../../../packages/formlyantd/textarea/src/textarea.module.ts","../../../../packages/formlyantd/textarea/src/ngx-formly-zorro-antd-textarea.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\ninterface TextareaProps extends FormlyFieldProps {\n type?: 'count' | 'clear';\n\n /**\n * 自适应内容高度,可设置为 boolean 或对象:{ minRows: 2, maxRows: 6 }\n * @default false\n */\n autosize?: boolean | { minRows: number; maxRows: number };\n\n /**\n * 是否隐藏边框\n * @default false\n */\n borderless?: boolean;\n\n /**\n * textarea 数字提示显示的最大值\n */\n maxCharacterCount?: number;\n}\n\nexport interface FormlyTextareaFieldConfig extends NzFormlyFieldConfig<TextareaProps> {\n type: 'textarea' | Type<FormlyFieldTextarea>;\n}\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <ng-container [ngSwitch]=\"props.type\">\n <ng-container *ngSwitchCase=\"'count'\">\n <nz-textarea-count [nzMaxCharacterCount]=\"props['maxCharacterCount'] || 0\">\n <textarea\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['className']\"\n [attr.rows]=\"props.rows\"\n [attr.cols]=\"props.cols\"\n nz-input\n [nzBorderless]=\"props['borderless']!!\"\n [nzAutosize]=\"props['autosize']!!\"\n ></textarea>\n </nz-textarea-count>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'clear'\">\n <nz-input-group\n class=\"ant-input-affix-wrapper-textarea-with-clear-btn\"\n [nzSuffix]=\"textAreaClearTpl\"\n >\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\n </nz-input-group>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\n </ng-container>\n </ng-container>\n\n <ng-template #textareaTpl>\n <textarea\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['className']\"\n [attr.rows]=\"props.rows\"\n [attr.cols]=\"props.cols\"\n nz-input\n [nzBorderless]=\"props['borderless']!!\"\n [nzAutosize]=\"props['autosize']!!\"\n ></textarea>\n </ng-template>\n\n <!-- 清除数据 -->\n <ng-template #textAreaClearTpl>\n @if (formControl.value && !props['disabled'] && !props['readonly']) {\n <span\n nz-icon\n class=\"ant-input-clear-icon\"\n nzTheme=\"fill\"\n nzType=\"close-circle\"\n (click)=\"formControl.reset()\"\n ></span>\n }\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldTextarea extends FieldType<FieldTypeConfig<TextareaProps>> {\n override defaultOptions = {\n props: {\n rows: 4,\n autosize: false,\n borderless: false\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { FormlyFieldTextarea } from './textarea.type';\nimport { NzInputModule } from 'ng-zorro-antd/input';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\n@NgModule({\n declarations: [FormlyFieldTextarea],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n NzInputModule,\n NzIconModule,\n\n FormlyModule.forChild({\n types: [\n {\n name: 'textarea',\n component: FormlyFieldTextarea,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzTextareaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AA2FM,MAAO,mBAAoB,SAAQ,SAAyC,CAAA;AA7DlF,IAAA,WAAA,GAAA;;AA8DW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,UAAU,EAAE,KAAK;AAClB,aAAA;SACF,CAAC;AACH,KAAA;8GARY,mBAAmB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,EA3DpB,QAAA,EAAA,uBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gB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,oCAAA,IAAI,EAAE,UAAU;AAChB,oCAAA,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC7BD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-zorro-antd-textarea.mjs","sources":["../../../../packages/formlyantd/textarea/src/textarea.type.ts","../../../../packages/formlyantd/textarea/src/textarea.module.ts","../../../../packages/formlyantd/textarea/src/ngx-formly-zorro-antd-textarea.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\ninterface TextareaProps extends FormlyFieldProps {\n type?: 'count' | 'clear';\n\n /**\n * 自适应内容高度,可设置为 boolean 或对象:{ minRows: 2, maxRows: 6 }\n * @default false\n */\n autosize?: boolean | { minRows: number; maxRows: number };\n\n /**\n * 是否隐藏边框\n * @default false\n */\n borderless?: boolean;\n\n /**\n * textarea 数字提示显示的最大值\n */\n maxCharacterCount?: number;\n}\n\nexport interface FormlyTextareaFieldConfig extends NzFormlyFieldConfig<TextareaProps> {\n type: 'textarea' | Type<FormlyFieldTextarea>;\n}\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n @switch (props.type) {\n @case ('count') {\n <nz-textarea-count [nzMaxCharacterCount]=\"props['maxCharacterCount'] || 0\">\n <textarea\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['className']\"\n [attr.rows]=\"props.rows\"\n [attr.cols]=\"props.cols\"\n nz-input\n [nzBorderless]=\"props['borderless']!!\"\n [nzAutosize]=\"props['autosize']!!\"\n ></textarea>\n </nz-textarea-count>\n }\n @case ('clear') {\n <nz-input-group\n class=\"ant-input-affix-wrapper-textarea-with-clear-btn\"\n [nzSuffix]=\"textAreaClearTpl\"\n >\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\n </nz-input-group>\n }\n @default {\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\n }\n }\n\n <ng-template #textareaTpl>\n <textarea\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['className']\"\n [attr.rows]=\"props.rows\"\n [attr.cols]=\"props.cols\"\n nz-input\n [nzBorderless]=\"props['borderless']!!\"\n [nzAutosize]=\"props['autosize']!!\"\n ></textarea>\n </ng-template>\n\n <!-- 清除数据 -->\n <ng-template #textAreaClearTpl>\n @if (formControl.value && !props['disabled'] && !props['readonly']) {\n <span\n nz-icon\n class=\"ant-input-clear-icon\"\n nzTheme=\"fill\"\n nzType=\"close-circle\"\n (click)=\"formControl.reset()\"\n ></span>\n }\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldTextarea extends FieldType<FieldTypeConfig<TextareaProps>> {\n override defaultOptions = {\n props: {\n rows: 4,\n autosize: false,\n borderless: false\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { FormlyFieldTextarea } from './textarea.type';\nimport { NzInputModule } from 'ng-zorro-antd/input';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\n@NgModule({\n declarations: [FormlyFieldTextarea],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n NzInputModule,\n NzIconModule,\n\n FormlyModule.forChild({\n types: [\n {\n name: 'textarea',\n component: FormlyFieldTextarea,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzTextareaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i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