ngx-formly-zorro-antd 17.0.11 → 17.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. package/autocomplete/autocomplete.props.d.ts +2 -4
  2. package/card-wrapper/card-wrapper.props.d.ts +3 -2
  3. package/common/interface.d.ts +3 -1
  4. package/esm2022/autocomplete/autocomplete.props.mjs +1 -1
  5. package/esm2022/button/button.type.mjs +7 -7
  6. package/esm2022/card/card.type.mjs +3 -3
  7. package/esm2022/card-wrapper/card-wrapper.props.mjs +1 -1
  8. package/esm2022/card-wrapper/card.wrapper.mjs +3 -3
  9. package/esm2022/cascader/cascader.type.mjs +3 -3
  10. package/esm2022/common/interface.mjs +1 -1
  11. package/esm2022/datepicker/datepicker.type.mjs +5 -5
  12. package/esm2022/form-field/form-field.props.mjs +1 -1
  13. package/esm2022/grid/grid.props.mjs +1 -1
  14. package/esm2022/grid/grid.type.mjs +5 -5
  15. package/esm2022/input/input.type.mjs +9 -9
  16. package/esm2022/input-number/input-number.type.mjs +5 -5
  17. package/esm2022/select/select.type.mjs +5 -5
  18. package/esm2022/text-value/ngx-formly-zorro-antd-text-value.mjs +5 -0
  19. package/esm2022/text-value/public_api.mjs +3 -0
  20. package/esm2022/text-value/text-value.module.mjs +46 -0
  21. package/esm2022/text-value/text-value.type.mjs +68 -0
  22. package/esm2022/textarea/textarea.type.mjs +9 -9
  23. package/esm2022/timepicker/timepicker.type.mjs +3 -3
  24. package/esm2022/tree-select/tree-select.type.mjs +3 -3
  25. package/esm2022/upload/upload.component.mjs +5 -5
  26. package/esm2022/upload/upload.type.mjs +8 -7
  27. package/fesm2022/ngx-formly-zorro-antd-button.mjs +6 -6
  28. package/fesm2022/ngx-formly-zorro-antd-button.mjs.map +1 -1
  29. package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs +2 -2
  30. package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs.map +1 -1
  31. package/fesm2022/ngx-formly-zorro-antd-card.mjs +2 -2
  32. package/fesm2022/ngx-formly-zorro-antd-card.mjs.map +1 -1
  33. package/fesm2022/ngx-formly-zorro-antd-cascader.mjs +2 -2
  34. package/fesm2022/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
  35. package/fesm2022/ngx-formly-zorro-antd-datepicker.mjs +4 -4
  36. package/fesm2022/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
  37. package/fesm2022/ngx-formly-zorro-antd-grid.mjs +4 -4
  38. package/fesm2022/ngx-formly-zorro-antd-grid.mjs.map +1 -1
  39. package/fesm2022/ngx-formly-zorro-antd-input-number.mjs +4 -4
  40. package/fesm2022/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
  41. package/fesm2022/ngx-formly-zorro-antd-input.mjs +8 -8
  42. package/fesm2022/ngx-formly-zorro-antd-input.mjs.map +1 -1
  43. package/fesm2022/ngx-formly-zorro-antd-select.mjs +4 -4
  44. package/fesm2022/ngx-formly-zorro-antd-select.mjs.map +1 -1
  45. package/fesm2022/ngx-formly-zorro-antd-text-value.mjs +115 -0
  46. package/fesm2022/ngx-formly-zorro-antd-text-value.mjs.map +1 -0
  47. package/fesm2022/ngx-formly-zorro-antd-textarea.mjs +8 -8
  48. package/fesm2022/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
  49. package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs +2 -2
  50. package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
  51. package/fesm2022/ngx-formly-zorro-antd-tree-select.mjs +2 -2
  52. package/fesm2022/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
  53. package/fesm2022/ngx-formly-zorro-antd-upload.mjs +10 -10
  54. package/fesm2022/ngx-formly-zorro-antd-upload.mjs.map +1 -1
  55. package/form-field/form-field.props.d.ts +8 -16
  56. package/grid/grid.props.d.ts +6 -9
  57. package/package.json +20 -14
  58. package/text-value/index.d.ts +5 -0
  59. package/text-value/public_api.d.ts +2 -0
  60. package/text-value/text-value.module.d.ts +11 -0
  61. package/text-value/text-value.type.d.ts +37 -0
  62. package/tree-select/tree-select.type.d.ts +2 -3
  63. package/upload/upload.component.d.ts +3 -4
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-zorro-antd-grid.mjs","sources":["../../../../packages/formlyantd/grid/src/grid.type.ts","../../../../packages/formlyantd/grid/src/grid.module.ts","../../../../packages/formlyantd/grid/src/ngx-formly-zorro-antd-grid.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport type { GridProps } from './grid.props';\r\n\r\nexport interface FormlyGridFieldConfig extends NzFormlyFieldConfig<GridProps> {\r\n type: 'grid' | Type<FormlyFieldGrid>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-grid',\r\n template: `\r\n <div\r\n nz-row\r\n [ngStyle]=\"props['style']\"\r\n [ngClass]=\"props['className']\"\r\n [nzAlign]=\"props.align ?? null\"\r\n [nzGutter]=\"props.gutter ?? null\"\r\n [nzJustify]=\"props.justify ?? null\"\r\n [formlyAttributes]=\"field\"\r\n >\r\n @for (item of field.fieldGroup; track item.id) {\r\n <formly-field\r\n [field]=\"item\"\r\n nz-col\r\n [nzFlex]=\"item.props?.['flex'] || props.flex\"\r\n [nzOffset]=\"item.props?.['offset'] || props.offset\"\r\n [nzOrder]=\"item.props?.['order'] || props.order\"\r\n [nzPull]=\"item.props?.['pull'] || props.pull\"\r\n [nzPush]=\"item.props?.['push'] || props.push\"\r\n [nzSpan]=\"item.props?.['span'] || props.span\"\r\n [nzXs]=\"item.props?.['xs'] || props.xs\"\r\n [nzSm]=\"item.props?.['sm'] || props.sm\"\r\n [nzMd]=\"item.props?.['md'] || props.md\"\r\n [nzLg]=\"item.props?.['lg'] || props.lg\"\r\n [nzXl]=\"item.props?.['xl'] || props.xl\"\r\n [nzXXl]=\"item.props?.['xxl'] || props.xxl\"\r\n ></formly-field>\r\n }\r\n </div>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldGrid extends FieldType<FieldTypeConfig<GridProps>> {}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\n\r\nimport { FormlyFieldGrid } from './grid.type';\r\n\r\nimport { NzGridModule } from 'ng-zorro-antd/grid';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldGrid],\r\n imports: [\r\n CommonModule,\r\n NzGridModule,\r\n\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'grid',\r\n component: FormlyFieldGrid\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzGridModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;AA2CM,MAAO,eAAgB,SAAQ,SAAqC,CAAA;8GAA7D,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,EAhChB,QAAA,EAAA,mBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BT,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,OAAA,EAAA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AAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAlB,kBAAkB,EAAA,YAAA,EAAA,CAfd,eAAe,CAAA,EAAA,OAAA,EAAA,CAE5B,YAAY;YACZ,YAAY,EAAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA,EAAA;AAYH,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,kBAAkB,YAb3B,YAAY;YACZ,YAAY;YAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,SAAS,EAAE,eAAe;AAC3B,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAhB9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,eAAe,CAAC;AAC/B,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,MAAM;AACZ,oCAAA,SAAS,EAAE,eAAe;AAC3B,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-zorro-antd-grid.mjs","sources":["../../../../packages/formlyantd/grid/src/grid.type.ts","../../../../packages/formlyantd/grid/src/grid.module.ts","../../../../packages/formlyantd/grid/src/ngx-formly-zorro-antd-grid.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport type { GridProps } from './grid.props';\r\n\r\nexport interface FormlyGridFieldConfig extends NzFormlyFieldConfig<GridProps> {\r\n type: 'grid' | Type<FormlyFieldGrid>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-grid',\r\n template: `\r\n <div\r\n nz-row\r\n [ngStyle]=\"props['ngStyle']\"\r\n [ngClass]=\"props['ngClass']\"\r\n [nzAlign]=\"props.align ?? null\"\r\n [nzGutter]=\"props.gutter ?? null\"\r\n [nzJustify]=\"props.justify ?? null\"\r\n [formlyAttributes]=\"field\"\r\n >\r\n @for (item of field.fieldGroup; track item.id) {\r\n <formly-field\r\n [field]=\"item\"\r\n nz-col\r\n [nzFlex]=\"item.props?.['flex'] || props.flex\"\r\n [nzOffset]=\"item.props?.['offset'] || props.offset\"\r\n [nzOrder]=\"item.props?.['order'] || props.order\"\r\n [nzPull]=\"item.props?.['pull'] || props.pull\"\r\n [nzPush]=\"item.props?.['push'] || props.push\"\r\n [nzSpan]=\"item.props?.['span'] || props.span\"\r\n [nzXs]=\"item.props?.['xs'] || props.xs\"\r\n [nzSm]=\"item.props?.['sm'] || props.sm\"\r\n [nzMd]=\"item.props?.['md'] || props.md\"\r\n [nzLg]=\"item.props?.['lg'] || props.lg\"\r\n [nzXl]=\"item.props?.['xl'] || props.xl\"\r\n [nzXXl]=\"item.props?.['xxl'] || props.xxl\"\r\n ></formly-field>\r\n }\r\n </div>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldGrid extends FieldType<FieldTypeConfig<GridProps>> {}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\n\r\nimport { FormlyFieldGrid } from './grid.type';\r\n\r\nimport { NzGridModule } from 'ng-zorro-antd/grid';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldGrid],\r\n imports: [\r\n CommonModule,\r\n NzGridModule,\r\n\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'grid',\r\n component: FormlyFieldGrid\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzGridModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;AA2CM,MAAO,eAAgB,SAAQ,SAAqC,CAAA;8GAA7D,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,EAhChB,QAAA,EAAA,mBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BT,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,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAAA,+CAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,SAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,MAAA,EAAA,M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A,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAb3B,YAAY;YACZ,YAAY;YAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,SAAS,EAAE,eAAe;AAC3B,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAhB9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,eAAe,CAAC;AAC/B,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,MAAM;AACZ,oCAAA,SAAS,EAAE,eAAe;AAC3B,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
@@ -36,7 +36,7 @@ class FormlyFieldInputNumber extends FieldType {
36
36
  @switch (props.type) {
37
37
  @case ('group') {
38
38
  <nz-input-number-group
39
- [ngClass]="props['className']"
39
+ [ngClass]="props['ngClass']"
40
40
  [nzAddOnAfter]="props['addOnAfter']"
41
41
  [nzAddOnBefore]="props['addOnBefore']"
42
42
  [nzPrefix]="props['prefix']"
@@ -70,7 +70,7 @@ class FormlyFieldInputNumber extends FieldType {
70
70
  [nzFormatter]="props['formatter']!"
71
71
  [nzParser]="props['parser']!"
72
72
  [nzInputMode]="props['inputMode']!"
73
- [ngClass]="props['className']"
73
+ [ngClass]="props['ngClass']"
74
74
  (ngModelChange)="props['modelChange'] && props['modelChange'](field, $event)"
75
75
  (nzFocus)="props.focus && props.focus(field, $event)"
76
76
  (nzBlur)="props.blur && props.blur(field, $event)"
@@ -86,7 +86,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
86
86
  @switch (props.type) {
87
87
  @case ('group') {
88
88
  <nz-input-number-group
89
- [ngClass]="props['className']"
89
+ [ngClass]="props['ngClass']"
90
90
  [nzAddOnAfter]="props['addOnAfter']"
91
91
  [nzAddOnBefore]="props['addOnBefore']"
92
92
  [nzPrefix]="props['prefix']"
@@ -120,7 +120,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
120
120
  [nzFormatter]="props['formatter']!"
121
121
  [nzParser]="props['parser']!"
122
122
  [nzInputMode]="props['inputMode']!"
123
- [ngClass]="props['className']"
123
+ [ngClass]="props['ngClass']"
124
124
  (ngModelChange)="props['modelChange'] && props['modelChange'](field, $event)"
125
125
  (nzFocus)="props.focus && props.focus(field, $event)"
126
126
  (nzBlur)="props.blur && props.blur(field, $event)"
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-zorro-antd-input-number.mjs","sources":["../../../../packages/formlyantd/input-number/src/input-number.type.ts","../../../../packages/formlyantd/input-number/src/input-number.module.ts","../../../../packages/formlyantd/input-number/src/ngx-formly-zorro-antd-input-number.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport type { InputNumberProps } from './input-number.props';\r\n\r\nexport interface FormlyInputNumberFieldConfig extends NzFormlyFieldConfig<InputNumberProps> {\r\n type: 'number' | 'integer' | Type<FormlyFieldInputNumber>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-inputnumber',\r\n template: `\r\n @switch (props.type) {\r\n @case ('group') {\r\n <nz-input-number-group\r\n [ngClass]=\"props['className']\"\r\n [nzAddOnAfter]=\"props['addOnAfter']\"\r\n [nzAddOnBefore]=\"props['addOnBefore']\"\r\n [nzPrefix]=\"props['prefix']\"\r\n [nzSuffix]=\"props['suffix']\"\r\n [nzPrefixIcon]=\"props['prefixIcon']\"\r\n [nzSuffixIcon]=\"props['suffixIcon']\"\r\n [nzCompact]=\"props['compact']\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"inputNumberTpl\"></ng-container>\r\n </nz-input-number-group>\r\n }\r\n @default {\r\n <ng-template [ngTemplateOutlet]=\"inputNumberTpl\"></ng-template>\r\n }\r\n }\r\n\r\n <ng-template #inputNumberTpl>\r\n <nz-input-number\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzMax]=\"props.max!\"\r\n [nzMin]=\"props.min!\"\r\n [nzReadOnly]=\"props.readonly!!\"\r\n [nzPlaceHolder]=\"props.placeholder ?? ''\"\r\n [nzSize]=\"props['size']!\"\r\n [nzStatus]=\"props['status']!\"\r\n [nzBorderless]=\"!!props['borderless']\"\r\n [nzPrecision]=\"props['precision']\"\r\n [nzPrecisionMode]=\"props['precisionMode']!\"\r\n [nzStep]=\"props['step'] ?? 1\"\r\n [nzFormatter]=\"props['formatter']!\"\r\n [nzParser]=\"props['parser']!\"\r\n [nzInputMode]=\"props['inputMode']!\"\r\n [ngClass]=\"props['className']\"\r\n (ngModelChange)=\"props['modelChange'] && props['modelChange'](field, $event)\"\r\n (nzFocus)=\"props.focus && props.focus(field, $event)\"\r\n (nzBlur)=\"props.blur && props.blur(field, $event)\"\r\n ></nz-input-number>\r\n </ng-template>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldInputNumber extends FieldType<FieldTypeConfig> {\r\n override defaultOptions = {\r\n props: {\r\n max: Infinity,\r\n min: -Infinity,\r\n parser: (value: string) =>\r\n value\r\n .trim()\r\n .replace(/。/g, '.')\r\n // eslint-disable-next-line no-useless-escape\r\n .replace(/[^\\w\\.-]+/g, ''),\r\n precisionMode: 'toFixed' as const,\r\n size: 'default' as const,\r\n status: '' as const,\r\n step: 1,\r\n inputMode: 'decimal',\r\n formatter: (value: number | string) => value\r\n }\r\n };\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\r\n\r\nimport { FormlyFieldInputNumber } from './input-number.type';\r\nimport { NzInputNumberModule } from 'ng-zorro-antd/input-number';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldInputNumber],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormlyNzFormFieldModule,\r\n NzInputNumberModule,\r\n\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'number',\r\n component: FormlyFieldInputNumber,\r\n wrappers: ['form-field']\r\n },\r\n {\r\n name: 'integer',\r\n extends: 'number'\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzInputNumberModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AA0DM,MAAO,sBAAuB,SAAQ,SAA0B,CAAA;AAjDtE,IAAA,WAAA,GAAA;;AAkDW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,GAAG,EAAE,QAAQ;gBACb,GAAG,EAAE,CAAC,QAAQ;AACd,gBAAA,MAAM,EAAE,CAAC,KAAa,KACpB,KAAK;AACF,qBAAA,IAAI,EAAE;AACN,qBAAA,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;;AAElB,qBAAA,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;AAC9B,gBAAA,aAAa,EAAE,SAAkB;AACjC,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,MAAM,EAAE,EAAW;AACnB,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,SAAS,E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AAA,SAAS,EAAE,sBAAsB;oCACjC,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACD,gCAAA;AACE,oCAAA,IAAI,EAAE,SAAS;AACf,oCAAA,OAAO,EAAE,QAAQ;AAClB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC/BD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-zorro-antd-input-number.mjs","sources":["../../../../packages/formlyantd/input-number/src/input-number.type.ts","../../../../packages/formlyantd/input-number/src/input-number.module.ts","../../../../packages/formlyantd/input-number/src/ngx-formly-zorro-antd-input-number.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport type { InputNumberProps } from './input-number.props';\r\n\r\nexport interface FormlyInputNumberFieldConfig extends NzFormlyFieldConfig<InputNumberProps> {\r\n type: 'number' | 'integer' | Type<FormlyFieldInputNumber>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-inputnumber',\r\n template: `\r\n @switch (props.type) {\r\n @case ('group') {\r\n <nz-input-number-group\r\n [ngClass]=\"props['ngClass']\"\r\n [nzAddOnAfter]=\"props['addOnAfter']\"\r\n [nzAddOnBefore]=\"props['addOnBefore']\"\r\n [nzPrefix]=\"props['prefix']\"\r\n [nzSuffix]=\"props['suffix']\"\r\n [nzPrefixIcon]=\"props['prefixIcon']\"\r\n [nzSuffixIcon]=\"props['suffixIcon']\"\r\n [nzCompact]=\"props['compact']\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"inputNumberTpl\"></ng-container>\r\n </nz-input-number-group>\r\n }\r\n @default {\r\n <ng-template [ngTemplateOutlet]=\"inputNumberTpl\"></ng-template>\r\n }\r\n }\r\n\r\n <ng-template #inputNumberTpl>\r\n <nz-input-number\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzMax]=\"props.max!\"\r\n [nzMin]=\"props.min!\"\r\n [nzReadOnly]=\"props.readonly!!\"\r\n [nzPlaceHolder]=\"props.placeholder ?? ''\"\r\n [nzSize]=\"props['size']!\"\r\n [nzStatus]=\"props['status']!\"\r\n [nzBorderless]=\"!!props['borderless']\"\r\n [nzPrecision]=\"props['precision']\"\r\n [nzPrecisionMode]=\"props['precisionMode']!\"\r\n [nzStep]=\"props['step'] ?? 1\"\r\n [nzFormatter]=\"props['formatter']!\"\r\n [nzParser]=\"props['parser']!\"\r\n [nzInputMode]=\"props['inputMode']!\"\r\n [ngClass]=\"props['ngClass']\"\r\n (ngModelChange)=\"props['modelChange'] && props['modelChange'](field, $event)\"\r\n (nzFocus)=\"props.focus && props.focus(field, $event)\"\r\n (nzBlur)=\"props.blur && props.blur(field, $event)\"\r\n ></nz-input-number>\r\n </ng-template>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldInputNumber extends FieldType<FieldTypeConfig> {\r\n override defaultOptions = {\r\n props: {\r\n max: Infinity,\r\n min: -Infinity,\r\n parser: (value: string) =>\r\n value\r\n .trim()\r\n .replace(/。/g, '.')\r\n // eslint-disable-next-line no-useless-escape\r\n .replace(/[^\\w\\.-]+/g, ''),\r\n precisionMode: 'toFixed' as const,\r\n size: 'default' as const,\r\n status: '' as const,\r\n step: 1,\r\n inputMode: 'decimal',\r\n formatter: (value: number | string) => value\r\n }\r\n };\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\r\n\r\nimport { FormlyFieldInputNumber } from './input-number.type';\r\nimport { NzInputNumberModule } from 'ng-zorro-antd/input-number';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldInputNumber],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormlyNzFormFieldModule,\r\n NzInputNumberModule,\r\n\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'number',\r\n component: FormlyFieldInputNumber,\r\n wrappers: ['form-field']\r\n },\r\n {\r\n name: 'integer',\r\n extends: 'number'\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzInputNumberModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AA0DM,MAAO,sBAAuB,SAAQ,SAA0B,CAAA;AAjDtE,IAAA,WAAA,GAAA;;AAkDW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,GAAG,EAAE,QAAQ;gBACb,GAAG,EAAE,CAAC,QAAQ;AACd,gBAAA,MAAM,EAAE,CAAC,KAAa,KACpB,KAAK;AACF,qBAAA,IAAI,EAAE;AACN,qBAAA,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;;AAElB,qBAAA,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;AAC9B,gBAAA,aAAa,EAAE,SAAkB;AACjC,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,MAAM,EAAE,EAAW;AACnB,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,SAAS,EAAE,SAAS;AACpB,gBAAA,SAAS,EAAE,CAAC,KAAsB,KAAK,KAAK;AAC7C,aAAA;SACF,CAAC;AACH,KAAA;8GAnBY,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EA/CvB,QAAA,EAAA,0BAAA,EAAA,e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,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,YApBlC,YAAY;YACZ,mBAAmB;YACnB,uBAAuB;YACvB,mBAAmB;YAEnB,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,SAAS,EAAE,sBAAsB;wBACjC,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACD,oBAAA;AACE,wBAAA,IAAI,EAAE,SAAS;AACf,wBAAA,OAAO,EAAE,QAAQ;AAClB,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAvBrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;AACtC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,mBAAmB;wBAEnB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,SAAS,EAAE,sBAAsB;oCACjC,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACD,gCAAA;AACE,oCAAA,IAAI,EAAE,SAAS;AACf,oCAAA,OAAO,EAAE,QAAQ;AAClB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC/BD;;AAEG;;;;"}
@@ -123,8 +123,8 @@ class FormlyFieldInput extends FieldType {
123
123
  <input
124
124
  nz-input
125
125
  type="text"
126
- [ngClass]="props['className']"
127
- [ngStyle]="props['style']"
126
+ [ngClass]="props['ngClass']"
127
+ [ngStyle]="props['ngStyle']"
128
128
  [formControl]="formControl"
129
129
  [formlyAttributes]="field"
130
130
  [nzBorderless]="!!props['borderless']!!"
@@ -136,8 +136,8 @@ class FormlyFieldInput extends FieldType {
136
136
  <input
137
137
  nz-input
138
138
  type="text"
139
- [ngClass]="props['className']"
140
- [ngStyle]="props['style']"
139
+ [ngClass]="props['ngClass']"
140
+ [ngStyle]="props['ngStyle']"
141
141
  [formControl]="formControl"
142
142
  [formlyAttributes]="field"
143
143
  [nzSize]="props['size']"
@@ -266,8 +266,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
266
266
  <input
267
267
  nz-input
268
268
  type="text"
269
- [ngClass]="props['className']"
270
- [ngStyle]="props['style']"
269
+ [ngClass]="props['ngClass']"
270
+ [ngStyle]="props['ngStyle']"
271
271
  [formControl]="formControl"
272
272
  [formlyAttributes]="field"
273
273
  [nzBorderless]="!!props['borderless']!!"
@@ -279,8 +279,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
279
279
  <input
280
280
  nz-input
281
281
  type="text"
282
- [ngClass]="props['className']"
283
- [ngStyle]="props['style']"
282
+ [ngClass]="props['ngClass']"
283
+ [ngStyle]="props['ngStyle']"
284
284
  [formControl]="formControl"
285
285
  [formlyAttributes]="field"
286
286
  [nzSize]="props['size']"
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-zorro-antd-input.mjs","sources":["../../../../packages/formlyantd/input/src/input.type.ts","../../../../packages/formlyantd/input/src/input.module.ts","../../../../packages/formlyantd/input/src/ngx-formly-zorro-antd-input.ts"],"sourcesContent":["import { Component, Optional, ChangeDetectionStrategy, Type } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\r\nimport { FormlyBoxTemplates, resolveTplName } from 'ngx-formly-zorro-antd/common';\r\n\r\nimport type { InputProps } from './input.props';\r\n\r\nexport interface FormlyInputFieldConfig extends NzFormlyFieldConfig<InputProps> {\r\n type: 'input' | 'string' | 'password' | Type<FormlyFieldInput>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-input',\r\n template: `\r\n @switch (props.type) {\r\n @case ('password') {\r\n <nz-input-group\r\n [nzPrefixIcon]=\"props['prefixIcon']\"\r\n [nzSuffixIcon]=\"props['suffixIcon']\"\r\n [nzAddOnAfterIcon]=\"props['addOnAfterIcon']\"\r\n [nzAddOnBeforeIcon]=\"props['addOnBeforeIcon']\"\r\n [nzAddOnBefore]=\"addOnBefore\"\r\n [nzAddOnAfter]=\"addOnAfter\"\r\n [nzPrefix]=\"props['prefix']\"\r\n [nzCompact]=\"props['compact']!!\"\r\n [nzSearch]=\"props['search']!!\"\r\n [nzSize]=\"props['size']!\"\r\n [nzStatus]=\"props['status']!\"\r\n [nzSuffix]=\"passwordEyeTpl\"\r\n >\r\n <input\r\n [type]=\"passwordVisible ? 'text' : 'password'\"\r\n nz-input\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzBorderless]=\"props['borderless']!!\"\r\n (ngModelChange)=\"props['modelChange'] && props['modelChange'](field, $event)\"\r\n />\r\n </nz-input-group>\r\n }\r\n @case ('autoComplete') {\r\n <nz-input-group\r\n [nzSize]=\"props['size']\"\r\n [nzPrefixIcon]=\"props['prefixIcon']\"\r\n [nzSuffixIcon]=\"props['suffixIcon']\"\r\n [nzAddOnAfterIcon]=\"props['addOnAfterIcon']\"\r\n [nzAddOnBeforeIcon]=\"props['addOnBeforeIcon']\"\r\n [nzAddOnBefore]=\"addOnBefore\"\r\n [nzAddOnAfter]=\"addOnAfter\"\r\n [nzPrefix]=\"props['prefix']\"\r\n [nzSuffix]=\"props['allowClear']!! ? inputClearTpl : props['suffix']\"\r\n >\r\n <input\r\n nz-input\r\n [nzBorderless]=\"props['borderless']\"\r\n [nzAutocomplete]=\"auto\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n />\r\n <nz-autocomplete\r\n [nzBackfill]=\"props['autocompleteOptions']?.backfill\"\r\n [nzDefaultActiveFirstOption]=\"props['autocompleteOptions']?.defaultActiveFirstOption\"\r\n [nzWidth]=\"props['autocompleteOptions']?.width\"\r\n [nzOverlayClassName]=\"props['autocompleteOptions']?.overlayClassName\"\r\n [nzOverlayStyle]=\"props['autocompleteOptions']?.overlayStyle\"\r\n [compareWith]=\"props['autocompleteOptions']?.compareWith\"\r\n #auto\r\n >\r\n @for (option of props['autocompleteOptions'].dataSource; track option) {\r\n <nz-auto-option [nzLabel]=\"option.label\" [nzValue]=\"option.value\">\r\n {{ option.label }}\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n }\r\n @case ('group') {\r\n <nz-input-group\r\n [nzPrefixIcon]=\"props['prefixIcon']\"\r\n [nzSuffixIcon]=\"props['suffixIcon']\"\r\n [nzAddOnAfterIcon]=\"props['addOnAfterIcon']\"\r\n [nzAddOnBeforeIcon]=\"props['addOnBeforeIcon']\"\r\n [nzAddOnBefore]=\"addOnBefore\"\r\n [nzAddOnAfter]=\"addOnAfter\"\r\n [nzPrefix]=\"props['prefix']\"\r\n [nzSuffix]=\"props['allowClear']!! ? inputClearTpl : props['suffix']\"\r\n [nzCompact]=\"props['compact']!!\"\r\n [nzSearch]=\"props['search']!!\"\r\n [nzSize]=\"props['size']!\"\r\n [nzStatus]=\"props['status']!\"\r\n >\r\n <input\r\n nz-input\r\n type=\"text\"\r\n [ngClass]=\"props['className']\"\r\n [ngStyle]=\"props['style']\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzBorderless]=\"!!props['borderless']!!\"\r\n (ngModelChange)=\"props['modelChange']?.(field, $event)\"\r\n />\r\n </nz-input-group>\r\n }\r\n @default {\r\n <input\r\n nz-input\r\n type=\"text\"\r\n [ngClass]=\"props['className']\"\r\n [ngStyle]=\"props['style']\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzSize]=\"props['size']\"\r\n [nzStatus]=\"props['status']\"\r\n [nzBorderless]=\"props['borderless']!!\"\r\n (ngModelChange)=\"props['modelChange'] && props['modelChange'](field, $event)\"\r\n />\r\n }\r\n }\r\n\r\n <!-- 查看密码 -->\r\n <ng-template #passwordEyeTpl>\r\n <span\r\n nz-icon\r\n class=\"cursor-pointer\"\r\n [nzType]=\"passwordVisible ? 'eye-invisible' : 'eye'\"\r\n (click)=\"passwordVisible = !passwordVisible\"\r\n ></span>\r\n\r\n @if (formControl.value && props['allowClear']!!) {\r\n <span\r\n nz-icon\r\n class=\"ant-input-clear-icon\"\r\n nzTheme=\"fill\"\r\n nzType=\"close-circle\"\r\n (click)=\"formControl.reset()\"\r\n ></span>\r\n }\r\n </ng-template>\r\n <!-- 清除数据 -->\r\n <ng-template #inputClearTpl>\r\n @if (formControl.value && !props['disabled'] && !props['readonly']) {\r\n <span\r\n nz-icon\r\n class=\"ant-input-clear-icon\"\r\n nzTheme=\"fill\"\r\n nzType=\"close-circle\"\r\n (click)=\"formControl.reset()\"\r\n ></span>\r\n }\r\n </ng-template>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldInput extends FieldType<FieldTypeConfig> {\r\n override defaultOptions = {\r\n props: {\r\n borderless: false,\r\n compact: false,\r\n search: false,\r\n allowClear: false,\r\n autocompleteOptions: {\r\n backfill: false,\r\n defaultActiveFirstOption: true,\r\n compareWith: (o1: NzSafeAny, o2: NzSafeAny) => o1 === o2\r\n }\r\n }\r\n };\r\n passwordVisible = false;\r\n\r\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\r\n super();\r\n }\r\n\r\n get addOnBefore() {\r\n return resolveTplName(this.props, this.fieldTemplates, 'addOnBefore');\r\n }\r\n\r\n get addOnAfter() {\r\n return resolveTplName(this.props, this.fieldTemplates, 'addOnAfter');\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\r\n\r\nimport { NzInputModule } from 'ng-zorro-antd/input';\r\nimport { NzAutocompleteModule } from 'ng-zorro-antd/auto-complete';\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\n\r\nimport { FormlyFieldInput } from './input.type';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldInput],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n NzInputModule,\r\n NzAutocompleteModule,\r\n NzIconModule,\r\n\r\n FormlyNzFormFieldModule,\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'input',\r\n component: FormlyFieldInput,\r\n wrappers: ['form-field'],\r\n defaultOptions: {\r\n props: {\r\n type: 'input'\r\n }\r\n }\r\n },\r\n { name: 'string', extends: 'input' },\r\n {\r\n name: 'password',\r\n extends: 'input',\r\n defaultOptions: {\r\n props: {\r\n type: 'password'\r\n }\r\n }\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzInputModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;AA0JM,MAAO,gBAAiB,SAAQ,SAA0B,CAAA;AAgB9D,IAAA,WAAA,CAA+B,cAAkC,EAAA;AAC/D,QAAA,KAAK,EAAE,CAAC;QADqB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;AAfxD,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,MAAM,EAAE,KAAK;AACb,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,mBAAmB,EAAE;A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E,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE;AACpC,oBAAA;AACE,wBAAA,IAAI,EAAE,UAAU;AAChB,wBAAA,OAAO,EAAE,OAAO;AAChB,wBAAA,cAAc,EAAE;AACd,4BAAA,KAAK,EAAE;AACL,gCAAA,IAAI,EAAE,UAAU;AACjB,6BAAA;AACF,yBAAA;AACF,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBApC/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,aAAa;wBACb,oBAAoB;wBACpB,YAAY;wBAEZ,uBAAuB;wBACvB,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;AACxB,oCAAA,cAAc,EAAE;AACd,wCAAA,KAAK,EAAE;AACL,4CAAA,IAAI,EAAE,OAAO;AACd,yCAAA;AACF,qCAAA;AACF,iCAAA;AACD,gCAAA,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE;AACpC,gCAAA;AACE,oCAAA,IAAI,EAAE,UAAU;AAChB,oCAAA,OAAO,EAAE,OAAO;AAChB,oCAAA,cAAc,EAAE;AACd,wCAAA,KAAK,EAAE;AACL,4CAAA,IAAI,EAAE,UAAU;AACjB,yCAAA;AACF,qCAAA;AACF,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC/CD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-zorro-antd-input.mjs","sources":["../../../../packages/formlyantd/input/src/input.type.ts","../../../../packages/formlyantd/input/src/input.module.ts","../../../../packages/formlyantd/input/src/ngx-formly-zorro-antd-input.ts"],"sourcesContent":["import { Component, Optional, ChangeDetectionStrategy, Type } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\r\nimport { FormlyBoxTemplates, resolveTplName } from 'ngx-formly-zorro-antd/common';\r\n\r\nimport type { InputProps } from './input.props';\r\n\r\nexport interface FormlyInputFieldConfig extends NzFormlyFieldConfig<InputProps> {\r\n type: 'input' | 'string' | 'password' | Type<FormlyFieldInput>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-input',\r\n template: `\r\n @switch (props.type) {\r\n @case ('password') {\r\n <nz-input-group\r\n [nzPrefixIcon]=\"props['prefixIcon']\"\r\n [nzSuffixIcon]=\"props['suffixIcon']\"\r\n [nzAddOnAfterIcon]=\"props['addOnAfterIcon']\"\r\n [nzAddOnBeforeIcon]=\"props['addOnBeforeIcon']\"\r\n [nzAddOnBefore]=\"addOnBefore\"\r\n [nzAddOnAfter]=\"addOnAfter\"\r\n [nzPrefix]=\"props['prefix']\"\r\n [nzCompact]=\"props['compact']!!\"\r\n [nzSearch]=\"props['search']!!\"\r\n [nzSize]=\"props['size']!\"\r\n [nzStatus]=\"props['status']!\"\r\n [nzSuffix]=\"passwordEyeTpl\"\r\n >\r\n <input\r\n [type]=\"passwordVisible ? 'text' : 'password'\"\r\n nz-input\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzBorderless]=\"props['borderless']!!\"\r\n (ngModelChange)=\"props['modelChange'] && props['modelChange'](field, $event)\"\r\n />\r\n </nz-input-group>\r\n }\r\n @case ('autoComplete') {\r\n <nz-input-group\r\n [nzSize]=\"props['size']\"\r\n [nzPrefixIcon]=\"props['prefixIcon']\"\r\n [nzSuffixIcon]=\"props['suffixIcon']\"\r\n [nzAddOnAfterIcon]=\"props['addOnAfterIcon']\"\r\n [nzAddOnBeforeIcon]=\"props['addOnBeforeIcon']\"\r\n [nzAddOnBefore]=\"addOnBefore\"\r\n [nzAddOnAfter]=\"addOnAfter\"\r\n [nzPrefix]=\"props['prefix']\"\r\n [nzSuffix]=\"props['allowClear']!! ? inputClearTpl : props['suffix']\"\r\n >\r\n <input\r\n nz-input\r\n [nzBorderless]=\"props['borderless']\"\r\n [nzAutocomplete]=\"auto\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n />\r\n <nz-autocomplete\r\n [nzBackfill]=\"props['autocompleteOptions']?.backfill\"\r\n [nzDefaultActiveFirstOption]=\"props['autocompleteOptions']?.defaultActiveFirstOption\"\r\n [nzWidth]=\"props['autocompleteOptions']?.width\"\r\n [nzOverlayClassName]=\"props['autocompleteOptions']?.overlayClassName\"\r\n [nzOverlayStyle]=\"props['autocompleteOptions']?.overlayStyle\"\r\n [compareWith]=\"props['autocompleteOptions']?.compareWith\"\r\n #auto\r\n >\r\n @for (option of props['autocompleteOptions'].dataSource; track option) {\r\n <nz-auto-option [nzLabel]=\"option.label\" [nzValue]=\"option.value\">\r\n {{ option.label }}\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n }\r\n @case ('group') {\r\n <nz-input-group\r\n [nzPrefixIcon]=\"props['prefixIcon']\"\r\n [nzSuffixIcon]=\"props['suffixIcon']\"\r\n [nzAddOnAfterIcon]=\"props['addOnAfterIcon']\"\r\n [nzAddOnBeforeIcon]=\"props['addOnBeforeIcon']\"\r\n [nzAddOnBefore]=\"addOnBefore\"\r\n [nzAddOnAfter]=\"addOnAfter\"\r\n [nzPrefix]=\"props['prefix']\"\r\n [nzSuffix]=\"props['allowClear']!! ? inputClearTpl : props['suffix']\"\r\n [nzCompact]=\"props['compact']!!\"\r\n [nzSearch]=\"props['search']!!\"\r\n [nzSize]=\"props['size']!\"\r\n [nzStatus]=\"props['status']!\"\r\n >\r\n <input\r\n nz-input\r\n type=\"text\"\r\n [ngClass]=\"props['ngClass']\"\r\n [ngStyle]=\"props['ngStyle']\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzBorderless]=\"!!props['borderless']!!\"\r\n (ngModelChange)=\"props['modelChange']?.(field, $event)\"\r\n />\r\n </nz-input-group>\r\n }\r\n @default {\r\n <input\r\n nz-input\r\n type=\"text\"\r\n [ngClass]=\"props['ngClass']\"\r\n [ngStyle]=\"props['ngStyle']\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzSize]=\"props['size']\"\r\n [nzStatus]=\"props['status']\"\r\n [nzBorderless]=\"props['borderless']!!\"\r\n (ngModelChange)=\"props['modelChange'] && props['modelChange'](field, $event)\"\r\n />\r\n }\r\n }\r\n\r\n <!-- 查看密码 -->\r\n <ng-template #passwordEyeTpl>\r\n <span\r\n nz-icon\r\n class=\"cursor-pointer\"\r\n [nzType]=\"passwordVisible ? 'eye-invisible' : 'eye'\"\r\n (click)=\"passwordVisible = !passwordVisible\"\r\n ></span>\r\n\r\n @if (formControl.value && props['allowClear']!!) {\r\n <span\r\n nz-icon\r\n class=\"ant-input-clear-icon\"\r\n nzTheme=\"fill\"\r\n nzType=\"close-circle\"\r\n (click)=\"formControl.reset()\"\r\n ></span>\r\n }\r\n </ng-template>\r\n <!-- 清除数据 -->\r\n <ng-template #inputClearTpl>\r\n @if (formControl.value && !props['disabled'] && !props['readonly']) {\r\n <span\r\n nz-icon\r\n class=\"ant-input-clear-icon\"\r\n nzTheme=\"fill\"\r\n nzType=\"close-circle\"\r\n (click)=\"formControl.reset()\"\r\n ></span>\r\n }\r\n </ng-template>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldInput extends FieldType<FieldTypeConfig> {\r\n override defaultOptions = {\r\n props: {\r\n borderless: false,\r\n compact: false,\r\n search: false,\r\n allowClear: false,\r\n autocompleteOptions: {\r\n backfill: false,\r\n defaultActiveFirstOption: true,\r\n compareWith: (o1: NzSafeAny, o2: NzSafeAny) => o1 === o2\r\n }\r\n }\r\n };\r\n passwordVisible = false;\r\n\r\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\r\n super();\r\n }\r\n\r\n get addOnBefore() {\r\n return resolveTplName(this.props, this.fieldTemplates, 'addOnBefore');\r\n }\r\n\r\n get addOnAfter() {\r\n return resolveTplName(this.props, this.fieldTemplates, 'addOnAfter');\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\r\n\r\nimport { NzInputModule } from 'ng-zorro-antd/input';\r\nimport { NzAutocompleteModule } from 'ng-zorro-antd/auto-complete';\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\n\r\nimport { FormlyFieldInput } from './input.type';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldInput],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n NzInputModule,\r\n NzAutocompleteModule,\r\n NzIconModule,\r\n\r\n FormlyNzFormFieldModule,\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'input',\r\n component: FormlyFieldInput,\r\n wrappers: ['form-field'],\r\n defaultOptions: {\r\n props: {\r\n type: 'input'\r\n }\r\n }\r\n },\r\n { name: 'string', extends: 'input' },\r\n {\r\n name: 'password',\r\n extends: 'input',\r\n defaultOptions: {\r\n props: {\r\n type: 'password'\r\n }\r\n }\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzInputModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;AA0JM,MAAO,gBAAiB,SAAQ,SAA0B,CAAA;AAgB9D,IAAA,WAAA,CA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U;AAChB,oCAAA,OAAO,EAAE,OAAO;AAChB,oCAAA,cAAc,EAAE;AACd,wCAAA,KAAK,EAAE;AACL,4CAAA,IAAI,EAAE,UAAU;AACjB,yCAAA;AACF,qCAAA;AACF,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC/CD;;AAEG;;;;"}
@@ -48,8 +48,8 @@ class FormlyFieldSelect extends FieldType {
48
48
  <nz-select
49
49
  #select
50
50
  [class.ng-dirty]="showError"
51
- [ngStyle]="props['style']"
52
- [ngClass]="props['className']"
51
+ [ngStyle]="props['ngStyle']"
52
+ [ngClass]="props['ngClass']"
53
53
  [nzPlaceHolder]="props.placeholder ?? null"
54
54
  [compareWith]="props['compareWith']!"
55
55
  [nzAllowClear]="props['allowClear']!!"
@@ -115,8 +115,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
115
115
  <nz-select
116
116
  #select
117
117
  [class.ng-dirty]="showError"
118
- [ngStyle]="props['style']"
119
- [ngClass]="props['className']"
118
+ [ngStyle]="props['ngStyle']"
119
+ [ngClass]="props['ngClass']"
120
120
  [nzPlaceHolder]="props.placeholder ?? null"
121
121
  [compareWith]="props['compareWith']!"
122
122
  [nzAllowClear]="props['allowClear']!!"
@@ -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';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport { NzSelectComponent } from 'ng-zorro-antd/select';\r\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\r\nimport type { SelectProps } from './select.props';\r\n\r\nexport interface FormlySelectFieldConfig extends NzFormlyFieldConfig<SelectProps> {\r\n type: 'select' | 'enum' | Type<FormlyFieldSelect>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-select',\r\n template: `\r\n <nz-select\r\n #select\r\n [class.ng-dirty]=\"showError\"\r\n [ngStyle]=\"props['style']\"\r\n [ngClass]=\"props['className']\"\r\n [nzPlaceHolder]=\"props.placeholder ?? null\"\r\n [compareWith]=\"props['compareWith']!\"\r\n [nzAllowClear]=\"props['allowClear']!!\"\r\n [nzSelectOnTab]=\"props['selectOnTab']!!\"\r\n [nzAutoClearSearchValue]=\"props['autoClearSearchValue']\"\r\n [nzBackdrop]=\"props['backdrop']!!\"\r\n [nzBorderless]=\"props['borderless']\"\r\n [nzOpen]=\"props['open']!!\"\r\n [nzDropdownClassName]=\"props['dropdownClassName']\"\r\n [nzDropdownMatchSelectWidth]=\"props['dropdownMatchSelectWidth']!!\"\r\n [nzDropdownStyle]=\"props['dropdownStyle'] ?? null\"\r\n [nzCustomTemplate]=\"props['customTemplate'] ?? null\"\r\n [nzServerSearch]=\"props['serverSearch']!!\"\r\n [nzMaxMultipleCount]=\"props['maxMultipleCount']!\"\r\n [nzMode]=\"props['mode']!\"\r\n [nzShowSearch]=\"props['showSearch']!!\"\r\n [nzSize]=\"props['size']!\"\r\n [nzStatus]=\"props['status']!\"\r\n [nzLoading]=\"props['loading']!!\"\r\n [nzPlacement]=\"props['placement']\"\r\n [nzShowArrow]=\"props['showArrow']!!\"\r\n [nzMaxTagCount]=\"props['maxTagCount']\"\r\n [nzMaxTagPlaceholder]=\"props['maxTagPlaceholder'] ?? null\"\r\n [nzOptionHeightPx]=\"props['optionHeightPx']!\"\r\n [nzOptionOverflowSize]=\"props['optionOverflowSize']!\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n (ngModelChange)=\"props.change?.(field, $event)\"\r\n (nzBlur)=\"props.blur?.(field, $event)\"\r\n (nzFocus)=\"props.focus?.(field, $event)\"\r\n (nzOpenChange)=\"props['openChange'] && props['openChange'](field, $event)\"\r\n (nzScrollToBottom)=\"props['scrollToBottom'] && props['scrollToBottom'](field, $event)\"\r\n (nzOnSearch)=\"props['onSearch'] && props['onSearch'](field, $event)\"\r\n >\r\n @for (item of to.options | formlySelectOptions: field | async; track item) {\r\n @if (item.group) {\r\n <nz-option-group [nzLabel]=\"item.label\">\r\n @for (child of item.group; track child) {\r\n <nz-option\r\n [nzValue]=\"child.value\"\r\n [nzDisabled]=\"child.disabled\"\r\n [nzLabel]=\"child.label\"\r\n >\r\n </nz-option>\r\n }\r\n </nz-option-group>\r\n } @else {\r\n <nz-option\r\n [nzValue]=\"item.value\"\r\n [nzDisabled]=\"item.disabled\"\r\n [nzLabel]=\"item.label\"\r\n ></nz-option>\r\n }\r\n }\r\n </nz-select>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig> implements OnInit {\r\n override defaultOptions = {\r\n props: {\r\n compareWith: (o1: NzSafeAny, o2: NzSafeAny) => o1 === o2,\r\n autoClearSearchValue: true,\r\n allowClear: false,\r\n backdrop: false,\r\n open: false,\r\n dropdownMatchSelectWidth: true,\r\n serverSearch: false,\r\n selectOnTab: false,\r\n maxMultipleCount: Infinity,\r\n mode: 'default' as const,\r\n showSearch: false,\r\n size: 'default' as const,\r\n status: '' as const,\r\n tokenSeparators: [],\r\n options: [],\r\n loading: false,\r\n optionHeightPx: 32,\r\n optionOverflowSize: 8\r\n }\r\n };\r\n @ViewChild('select', { static: true }) select!: NzSelectComponent;\r\n ngOnInit(): void {\r\n if (this.props['filterOption'] instanceof Function) {\r\n this.select.nzFilterOption = this.props['filterOption'] as NzSafeAny;\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { FormlySelectModule } from '@ngx-formly/core/select';\r\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\r\n\r\nimport { NzSelectModule } from 'ng-zorro-antd/select';\r\n\r\nimport { FormlyFieldSelect } from './select.type';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldSelect],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n NzSelectModule,\r\n\r\n FormlyNzFormFieldModule,\r\n FormlySelectModule,\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'select',\r\n component: FormlyFieldSelect,\r\n wrappers: ['form-field']\r\n },\r\n { name: 'enum', extends: 'select' }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzSelectModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AA6EM,MAAO,iBAAkB,SAAQ,SAA0B,CAAA;AAlEjE,IAAA,WAAA,GAAA;;AAmEW,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,EAAE;AACX,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,cAAc,EAAE,EAAE;AACl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"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';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport { NzSelectComponent } from 'ng-zorro-antd/select';\r\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\r\nimport type { SelectProps } from './select.props';\r\n\r\nexport interface FormlySelectFieldConfig extends NzFormlyFieldConfig<SelectProps> {\r\n type: 'select' | 'enum' | Type<FormlyFieldSelect>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-select',\r\n template: `\r\n <nz-select\r\n #select\r\n [class.ng-dirty]=\"showError\"\r\n [ngStyle]=\"props['ngStyle']\"\r\n [ngClass]=\"props['ngClass']\"\r\n [nzPlaceHolder]=\"props.placeholder ?? null\"\r\n [compareWith]=\"props['compareWith']!\"\r\n [nzAllowClear]=\"props['allowClear']!!\"\r\n [nzSelectOnTab]=\"props['selectOnTab']!!\"\r\n [nzAutoClearSearchValue]=\"props['autoClearSearchValue']\"\r\n [nzBackdrop]=\"props['backdrop']!!\"\r\n [nzBorderless]=\"props['borderless']\"\r\n [nzOpen]=\"props['open']!!\"\r\n [nzDropdownClassName]=\"props['dropdownClassName']\"\r\n [nzDropdownMatchSelectWidth]=\"props['dropdownMatchSelectWidth']!!\"\r\n [nzDropdownStyle]=\"props['dropdownStyle'] ?? null\"\r\n [nzCustomTemplate]=\"props['customTemplate'] ?? null\"\r\n [nzServerSearch]=\"props['serverSearch']!!\"\r\n [nzMaxMultipleCount]=\"props['maxMultipleCount']!\"\r\n [nzMode]=\"props['mode']!\"\r\n [nzShowSearch]=\"props['showSearch']!!\"\r\n [nzSize]=\"props['size']!\"\r\n [nzStatus]=\"props['status']!\"\r\n [nzLoading]=\"props['loading']!!\"\r\n [nzPlacement]=\"props['placement']\"\r\n [nzShowArrow]=\"props['showArrow']!!\"\r\n [nzMaxTagCount]=\"props['maxTagCount']\"\r\n [nzMaxTagPlaceholder]=\"props['maxTagPlaceholder'] ?? null\"\r\n [nzOptionHeightPx]=\"props['optionHeightPx']!\"\r\n [nzOptionOverflowSize]=\"props['optionOverflowSize']!\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n (ngModelChange)=\"props.change?.(field, $event)\"\r\n (nzBlur)=\"props.blur?.(field, $event)\"\r\n (nzFocus)=\"props.focus?.(field, $event)\"\r\n (nzOpenChange)=\"props['openChange'] && props['openChange'](field, $event)\"\r\n (nzScrollToBottom)=\"props['scrollToBottom'] && props['scrollToBottom'](field, $event)\"\r\n (nzOnSearch)=\"props['onSearch'] && props['onSearch'](field, $event)\"\r\n >\r\n @for (item of to.options | formlySelectOptions: field | async; track item) {\r\n @if (item.group) {\r\n <nz-option-group [nzLabel]=\"item.label\">\r\n @for (child of item.group; track child) {\r\n <nz-option\r\n [nzValue]=\"child.value\"\r\n [nzDisabled]=\"child.disabled\"\r\n [nzLabel]=\"child.label\"\r\n >\r\n </nz-option>\r\n }\r\n </nz-option-group>\r\n } @else {\r\n <nz-option\r\n [nzValue]=\"item.value\"\r\n [nzDisabled]=\"item.disabled\"\r\n [nzLabel]=\"item.label\"\r\n ></nz-option>\r\n }\r\n }\r\n </nz-select>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig> implements OnInit {\r\n override defaultOptions = {\r\n props: {\r\n compareWith: (o1: NzSafeAny, o2: NzSafeAny) => o1 === o2,\r\n autoClearSearchValue: true,\r\n allowClear: false,\r\n backdrop: false,\r\n open: false,\r\n dropdownMatchSelectWidth: true,\r\n serverSearch: false,\r\n selectOnTab: false,\r\n maxMultipleCount: Infinity,\r\n mode: 'default' as const,\r\n showSearch: false,\r\n size: 'default' as const,\r\n status: '' as const,\r\n tokenSeparators: [],\r\n options: [],\r\n loading: false,\r\n optionHeightPx: 32,\r\n optionOverflowSize: 8\r\n }\r\n };\r\n @ViewChild('select', { static: true }) select!: NzSelectComponent;\r\n ngOnInit(): void {\r\n if (this.props['filterOption'] instanceof Function) {\r\n this.select.nzFilterOption = this.props['filterOption'] as NzSafeAny;\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { FormlySelectModule } from '@ngx-formly/core/select';\r\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\r\n\r\nimport { NzSelectModule } from 'ng-zorro-antd/select';\r\n\r\nimport { FormlyFieldSelect } from './select.type';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldSelect],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n NzSelectModule,\r\n\r\n FormlyNzFormFieldModule,\r\n FormlySelectModule,\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'select',\r\n component: FormlyFieldSelect,\r\n wrappers: ['form-field']\r\n },\r\n { name: 'enum', extends: 'select' }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzSelectModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AA6EM,MAAO,iBAAkB,SAAQ,SAA0B,CAAA;AAlEjE,IAAA,WAAA,GAAA;;AAmEW,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,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,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;;;;"}
@@ -0,0 +1,115 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i3 from '@ngx-formly/core';
6
+ import { FieldType, FormlyModule } from '@ngx-formly/core';
7
+ import * as i4 from '@pkt/ng.core';
8
+ import { isPromise, DefaultifyPipe } from '@pkt/ng.core';
9
+ import { of, isObservable } from 'rxjs';
10
+ import * as i2 from 'ng-zorro-antd/form';
11
+ import { NzFormModule } from 'ng-zorro-antd/form';
12
+
13
+ class FormlyFieldTextValue extends FieldType {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.defaultOptions = {
17
+ props: {
18
+ defaultText: '--'
19
+ }
20
+ };
21
+ }
22
+ ngOnInit() {
23
+ this.subscription = this.formControl.valueChanges.subscribe(() => {
24
+ this.result = undefined;
25
+ });
26
+ }
27
+ get textValue$() {
28
+ const value = this.formControl.value;
29
+ const format = this.props.format || this.formState.format;
30
+ if (typeof format !== 'function') {
31
+ return of(value);
32
+ }
33
+ if (this.result) {
34
+ return this.result;
35
+ }
36
+ const result = format(value, this.field);
37
+ if (isPromise(result) || isObservable(result)) {
38
+ this.result = result;
39
+ return result;
40
+ }
41
+ return of(result);
42
+ }
43
+ ngOnDestroy() {
44
+ this.subscription?.unsubscribe();
45
+ }
46
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldTextValue, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
47
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: FormlyFieldTextValue, selector: "formly-field-text-value", usesInheritance: true, ngImport: i0, template: `
48
+ <nz-form-text
49
+ class="wrap-text"
50
+ [formlyAttributes]="field"
51
+ [ngClass]="props['ngClass']"
52
+ [ngStyle]="props['ngStyle']"
53
+ >
54
+ {{ textValue$ | async | defaultify: props.defaultText }}
55
+ </nz-form-text>
56
+ `, isInline: true, styles: [".wrap-text{word-break:break-all}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.NzFormTextComponent, selector: "nz-form-text", exportAs: ["nzFormText"] }, { kind: "directive", type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.DefaultifyPipe, name: "defaultify" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
57
+ }
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldTextValue, decorators: [{
59
+ type: Component,
60
+ args: [{ selector: 'formly-field-text-value', template: `
61
+ <nz-form-text
62
+ class="wrap-text"
63
+ [formlyAttributes]="field"
64
+ [ngClass]="props['ngClass']"
65
+ [ngStyle]="props['ngStyle']"
66
+ >
67
+ {{ textValue$ | async | defaultify: props.defaultText }}
68
+ </nz-form-text>
69
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".wrap-text{word-break:break-all}\n"] }]
70
+ }] });
71
+
72
+ class FormlyNzTextValueModule {
73
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyNzTextValueModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
74
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.6", ngImport: i0, type: FormlyNzTextValueModule, declarations: [FormlyFieldTextValue], imports: [CommonModule,
75
+ NzFormModule,
76
+ DefaultifyPipe, i3.FormlyModule] }); }
77
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyNzTextValueModule, imports: [CommonModule,
78
+ NzFormModule,
79
+ FormlyModule.forChild({
80
+ types: [
81
+ {
82
+ name: 'text',
83
+ component: FormlyFieldTextValue,
84
+ wrappers: ['form-field']
85
+ }
86
+ ]
87
+ })] }); }
88
+ }
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyNzTextValueModule, decorators: [{
90
+ type: NgModule,
91
+ args: [{
92
+ declarations: [FormlyFieldTextValue],
93
+ imports: [
94
+ CommonModule,
95
+ NzFormModule,
96
+ DefaultifyPipe,
97
+ FormlyModule.forChild({
98
+ types: [
99
+ {
100
+ name: 'text',
101
+ component: FormlyFieldTextValue,
102
+ wrappers: ['form-field']
103
+ }
104
+ ]
105
+ })
106
+ ]
107
+ }]
108
+ }] });
109
+
110
+ /**
111
+ * Generated bundle index. Do not edit.
112
+ */
113
+
114
+ export { FormlyFieldTextValue, FormlyNzTextValueModule };
115
+ //# sourceMappingURL=ngx-formly-zorro-antd-text-value.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-formly-zorro-antd-text-value.mjs","sources":["../../../../packages/formlyantd/text-value/src/text-value.type.ts","../../../../packages/formlyantd/text-value/src/text-value.module.ts","../../../../packages/formlyantd/text-value/src/ngx-formly-zorro-antd-text-value.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Type, Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport { Observable, of, Subscription, isObservable } from 'rxjs';\r\nimport { isPromise } from '@pkt/ng.core';\r\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\r\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\n\r\ninterface TextValueProps extends FormlyFieldProps {\r\n /**\r\n * 格式化函数\r\n * @param value 表单值\r\n * @param field 当前字段\r\n */\r\n format?: (\r\n value: NzSafeAny,\r\n field: NzFormlyFieldConfig<TextValueProps>\r\n ) => Observable<NzSafeAny> | Promise<NzSafeAny> | NzSafeAny | null;\r\n\r\n /**\r\n * 默认显示文本\r\n */\r\n defaultText?: string;\r\n}\r\n\r\nexport interface FormlyTextValueFieldConfig extends NzFormlyFieldConfig<TextValueProps> {\r\n type: 'text' | Type<FormlyFieldTextValue>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-text-value',\r\n template: `\r\n <nz-form-text\r\n class=\"wrap-text\"\r\n [formlyAttributes]=\"field\"\r\n [ngClass]=\"props['ngClass']\"\r\n [ngStyle]=\"props['ngStyle']\"\r\n >\r\n {{ textValue$ | async | defaultify: props.defaultText }}\r\n </nz-form-text>\r\n `,\r\n styles: [\r\n `\r\n .wrap-text {\r\n word-break: break-all;\r\n }\r\n `\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldTextValue<T = NzSafeAny>\r\n extends FieldType<FieldTypeConfig<TextValueProps>>\r\n implements OnInit, OnDestroy\r\n{\r\n private result?: Observable<T> | Promise<T>;\r\n private subscription?: Subscription;\r\n\r\n override defaultOptions = {\r\n props: {\r\n defaultText: '--'\r\n }\r\n };\r\n\r\n ngOnInit(): void {\r\n this.subscription = this.formControl!.valueChanges.subscribe(() => {\r\n this.result = undefined;\r\n });\r\n }\r\n\r\n get textValue$() {\r\n const value = this.formControl!.value;\r\n const format = this.props.format || this.formState.format;\r\n\r\n if (typeof format !== 'function') {\r\n return of(value);\r\n }\r\n\r\n if (this.result) {\r\n return this.result;\r\n }\r\n const result = format(value, this.field);\r\n if (isPromise(result) || isObservable(result)) {\r\n this.result = result as NzSafeAny;\r\n return result;\r\n }\r\n return of(result);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscription?.unsubscribe();\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { DefaultifyPipe } from '@pkt/ng.core';\r\nimport { FormlyFieldTextValue } from './text-value.type';\r\n\r\nimport { NzFormModule } from 'ng-zorro-antd/form';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldTextValue],\r\n imports: [\r\n CommonModule,\r\n NzFormModule,\r\n DefaultifyPipe,\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'text',\r\n component: FormlyFieldTextValue,\r\n wrappers: ['form-field']\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzTextValueModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AAkDM,MAAO,oBACX,SAAQ,SAA0C,CAAA;AAtBpD,IAAA,WAAA,GAAA;;AA4BW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,WAAW,EAAE,IAAI;AAClB,aAAA;SACF,CAAC;AA8BH,KAAA;IA5BC,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAY,CAAC,YAAY,CAAC,SAAS,CAAC,MAAK;AAChE,YAAA,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;AAC1B,SAAC,CAAC,CAAC;KACJ;AAED,IAAA,IAAI,UAAU,GAAA;AACZ,QAAA,MAAM,KAAK,GAAG,IAAI,CA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,cAAc,EAAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA,EAAA;AAYL,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,uBAAuB,YAdhC,YAAY;YACZ,YAAY;YAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,SAAS,EAAE,oBAAoB;wBAC/B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAjBnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBACZ,cAAc;wBACd,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,MAAM;AACZ,oCAAA,SAAS,EAAE,oBAAoB;oCAC/B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACxBD;;AAEG;;;;"}
@@ -31,8 +31,8 @@ class FormlyFieldTextarea extends FieldType {
31
31
  <textarea
32
32
  [formControl]="formControl"
33
33
  [formlyAttributes]="field"
34
- [ngClass]="props['className']"
35
- [ngStyle]="props['style']"
34
+ [ngClass]="props['ngClass']"
35
+ [ngStyle]="props['ngStyle']"
36
36
  [attr.rows]="props.rows"
37
37
  [attr.cols]="props.cols"
38
38
  [nzBorderless]="props['borderless']!!"
@@ -58,8 +58,8 @@ class FormlyFieldTextarea extends FieldType {
58
58
  <textarea
59
59
  [formControl]="formControl"
60
60
  [formlyAttributes]="field"
61
- [ngClass]="props['className']"
62
- [ngStyle]="props['style']"
61
+ [ngClass]="props['ngClass']"
62
+ [ngStyle]="props['ngStyle']"
63
63
  [attr.rows]="props.rows"
64
64
  [attr.cols]="props.cols"
65
65
  nz-input
@@ -93,8 +93,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
93
93
  <textarea
94
94
  [formControl]="formControl"
95
95
  [formlyAttributes]="field"
96
- [ngClass]="props['className']"
97
- [ngStyle]="props['style']"
96
+ [ngClass]="props['ngClass']"
97
+ [ngStyle]="props['ngStyle']"
98
98
  [attr.rows]="props.rows"
99
99
  [attr.cols]="props.cols"
100
100
  [nzBorderless]="props['borderless']!!"
@@ -120,8 +120,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
120
120
  <textarea
121
121
  [formControl]="formControl"
122
122
  [formlyAttributes]="field"
123
- [ngClass]="props['className']"
124
- [ngStyle]="props['style']"
123
+ [ngClass]="props['ngClass']"
124
+ [ngStyle]="props['ngStyle']"
125
125
  [attr.rows]="props.rows"
126
126
  [attr.cols]="props.cols"
127
127
  nz-input
@@ -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';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\r\n\r\ninterface TextareaProps extends FormlyFieldProps {\r\n type?: 'count' | 'clear';\r\n\r\n /**\r\n * 自适应内容高度,可设置为 boolean 或对象:{ minRows: 2, maxRows: 6 }\r\n * @default false\r\n */\r\n autosize?: boolean | { minRows: number; maxRows: number };\r\n\r\n /**\r\n * 是否隐藏边框\r\n * @default false\r\n */\r\n borderless?: boolean;\r\n\r\n /**\r\n * textarea 数字提示显示的最大值\r\n */\r\n maxCharacterCount?: number;\r\n}\r\n\r\nexport interface FormlyTextareaFieldConfig extends NzFormlyFieldConfig<TextareaProps> {\r\n type: 'textarea' | Type<FormlyFieldTextarea>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-textarea',\r\n template: `\r\n @switch (props.type) {\r\n @case ('count') {\r\n <nz-textarea-count [nzMaxCharacterCount]=\"props['maxCharacterCount'] || 0\">\r\n <textarea\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [ngClass]=\"props['className']\"\r\n [ngStyle]=\"props['style']\"\r\n [attr.rows]=\"props.rows\"\r\n [attr.cols]=\"props.cols\"\r\n [nzBorderless]=\"props['borderless']!!\"\r\n [nzAutosize]=\"props['autosize']!!\"\r\n nz-input\r\n ></textarea>\r\n </nz-textarea-count>\r\n }\r\n @case ('clear') {\r\n <nz-input-group\r\n class=\"ant-input-affix-wrapper-textarea-with-clear-btn\"\r\n [nzSuffix]=\"textAreaClearTpl\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\r\n </nz-input-group>\r\n }\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\r\n }\r\n }\r\n\r\n <ng-template #textareaTpl>\r\n <textarea\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [ngClass]=\"props['className']\"\r\n [ngStyle]=\"props['style']\"\r\n [attr.rows]=\"props.rows\"\r\n [attr.cols]=\"props.cols\"\r\n nz-input\r\n [nzBorderless]=\"props['borderless']!!\"\r\n [nzAutosize]=\"props['autosize']!!\"\r\n ></textarea>\r\n </ng-template>\r\n\r\n <!-- 清除数据 -->\r\n <ng-template #textAreaClearTpl>\r\n @if (formControl.value && !props['disabled'] && !props['readonly']) {\r\n <span\r\n nz-icon\r\n class=\"ant-input-clear-icon\"\r\n nzTheme=\"fill\"\r\n nzType=\"close-circle\"\r\n (click)=\"formControl.reset()\"\r\n ></span>\r\n }\r\n </ng-template>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldTextarea extends FieldType<FieldTypeConfig<TextareaProps>> {\r\n override defaultOptions = {\r\n props: {\r\n rows: 4,\r\n autosize: false,\r\n borderless: false\r\n }\r\n };\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\r\n\r\nimport { FormlyFieldTextarea } from './textarea.type';\r\nimport { NzInputModule } from 'ng-zorro-antd/input';\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldTextarea],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormlyNzFormFieldModule,\r\n NzInputModule,\r\n NzIconModule,\r\n\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'textarea',\r\n component: FormlyFieldTextarea,\r\n wrappers: ['form-field']\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzTextareaModule {}\r\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,aAA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EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,UAAU;AAChB,wBAAA,SAAS,EAAE,mBAAmB;wBAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBApBlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,aAAa;wBACb,YAAY;wBAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,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';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\r\n\r\ninterface TextareaProps extends FormlyFieldProps {\r\n type?: 'count' | 'clear';\r\n\r\n /**\r\n * 自适应内容高度,可设置为 boolean 或对象:{ minRows: 2, maxRows: 6 }\r\n * @default false\r\n */\r\n autosize?: boolean | { minRows: number; maxRows: number };\r\n\r\n /**\r\n * 是否隐藏边框\r\n * @default false\r\n */\r\n borderless?: boolean;\r\n\r\n /**\r\n * textarea 数字提示显示的最大值\r\n */\r\n maxCharacterCount?: number;\r\n}\r\n\r\nexport interface FormlyTextareaFieldConfig extends NzFormlyFieldConfig<TextareaProps> {\r\n type: 'textarea' | Type<FormlyFieldTextarea>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-textarea',\r\n template: `\r\n @switch (props.type) {\r\n @case ('count') {\r\n <nz-textarea-count [nzMaxCharacterCount]=\"props['maxCharacterCount'] || 0\">\r\n <textarea\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [ngClass]=\"props['ngClass']\"\r\n [ngStyle]=\"props['ngStyle']\"\r\n [attr.rows]=\"props.rows\"\r\n [attr.cols]=\"props.cols\"\r\n [nzBorderless]=\"props['borderless']!!\"\r\n [nzAutosize]=\"props['autosize']!!\"\r\n nz-input\r\n ></textarea>\r\n </nz-textarea-count>\r\n }\r\n @case ('clear') {\r\n <nz-input-group\r\n class=\"ant-input-affix-wrapper-textarea-with-clear-btn\"\r\n [nzSuffix]=\"textAreaClearTpl\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\r\n </nz-input-group>\r\n }\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"textareaTpl\"> </ng-container>\r\n }\r\n }\r\n\r\n <ng-template #textareaTpl>\r\n <textarea\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [ngClass]=\"props['ngClass']\"\r\n [ngStyle]=\"props['ngStyle']\"\r\n [attr.rows]=\"props.rows\"\r\n [attr.cols]=\"props.cols\"\r\n nz-input\r\n [nzBorderless]=\"props['borderless']!!\"\r\n [nzAutosize]=\"props['autosize']!!\"\r\n ></textarea>\r\n </ng-template>\r\n\r\n <!-- 清除数据 -->\r\n <ng-template #textAreaClearTpl>\r\n @if (formControl.value && !props['disabled'] && !props['readonly']) {\r\n <span\r\n nz-icon\r\n class=\"ant-input-clear-icon\"\r\n nzTheme=\"fill\"\r\n nzType=\"close-circle\"\r\n (click)=\"formControl.reset()\"\r\n ></span>\r\n }\r\n </ng-template>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldTextarea extends FieldType<FieldTypeConfig<TextareaProps>> {\r\n override defaultOptions = {\r\n props: {\r\n rows: 4,\r\n autosize: false,\r\n borderless: false\r\n }\r\n };\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\r\n\r\nimport { FormlyFieldTextarea } from './textarea.type';\r\nimport { NzInputModule } from 'ng-zorro-antd/input';\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldTextarea],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormlyNzFormFieldModule,\r\n NzInputModule,\r\n NzIconModule,\r\n\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'textarea',\r\n component: FormlyFieldTextarea,\r\n wrappers: ['form-field']\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzTextareaModule {}\r\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,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AAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBApBlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,aAAa;wBACb,YAAY;wBAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,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;;;;"}
@@ -33,7 +33,7 @@ class FormlyFieldTimepicker extends FieldType {
33
33
  [formControl]="formControl"
34
34
  [formlyAttributes]="field"
35
35
  [nzPlaceHolder]="props.placeholder ?? ''"
36
- [ngClass]="props['className']"
36
+ [ngClass]="props['ngClass']"
37
37
  [nzAddOn]="props['addOn']"
38
38
  [nzAllowEmpty]="props['allowEmpty']!!"
39
39
  [nzAutoFocus]="props['autoFocus']!!"
@@ -69,7 +69,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
69
69
  [formControl]="formControl"
70
70
  [formlyAttributes]="field"
71
71
  [nzPlaceHolder]="props.placeholder ?? ''"
72
- [ngClass]="props['className']"
72
+ [ngClass]="props['ngClass']"
73
73
  [nzAddOn]="props['addOn']"
74
74
  [nzAllowEmpty]="props['allowEmpty']!!"
75
75
  [nzAutoFocus]="props['autoFocus']!!"