ngx-formly-zorro-antd 17.1.0 → 17.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. package/README.md +1 -1
  2. package/autocomplete/package.json +3 -0
  3. package/button/package.json +3 -0
  4. package/button-group/package.json +3 -0
  5. package/card/card.module.d.ts +1 -1
  6. package/card/package.json +3 -0
  7. package/card-wrapper/package.json +3 -0
  8. package/cascader/package.json +3 -0
  9. package/checkbox/package.json +3 -0
  10. package/common/package.json +3 -0
  11. package/datepicker/package.json +3 -0
  12. package/esm2022/autocomplete/autocomplete.props.mjs +1 -1
  13. package/esm2022/autocomplete/public_api.mjs +1 -1
  14. package/esm2022/button/button.module.mjs +1 -1
  15. package/esm2022/button/button.type.mjs +123 -123
  16. package/esm2022/button/public_api.mjs +1 -1
  17. package/esm2022/button-group/button-group.module.mjs +1 -1
  18. package/esm2022/button-group/button-group.type.mjs +67 -67
  19. package/esm2022/button-group/public_api.mjs +1 -1
  20. package/esm2022/card/card.module.mjs +3 -4
  21. package/esm2022/card/card.type.mjs +51 -51
  22. package/esm2022/card/public_api.mjs +1 -1
  23. package/esm2022/card-wrapper/card-wrapper.module.mjs +1 -1
  24. package/esm2022/card-wrapper/card-wrapper.props.mjs +1 -1
  25. package/esm2022/card-wrapper/card.wrapper.mjs +37 -37
  26. package/esm2022/card-wrapper/public_api.mjs +1 -1
  27. package/esm2022/cascader/cascader.module.mjs +1 -1
  28. package/esm2022/cascader/cascader.type.mjs +65 -65
  29. package/esm2022/cascader/public_api.mjs +1 -1
  30. package/esm2022/checkbox/checkbox.module.mjs +1 -1
  31. package/esm2022/checkbox/checkbox.type.mjs +39 -39
  32. package/esm2022/checkbox/public_api.mjs +1 -1
  33. package/esm2022/common/common.module.mjs +1 -1
  34. package/esm2022/common/formly-box-templates.directive.mjs +1 -1
  35. package/esm2022/common/formly-utils.mjs +1 -1
  36. package/esm2022/common/interface.mjs +1 -1
  37. package/esm2022/common/public_api.mjs +1 -1
  38. package/esm2022/datepicker/datepicker.module.mjs +1 -1
  39. package/esm2022/datepicker/datepicker.props.mjs +1 -1
  40. package/esm2022/datepicker/datepicker.type.mjs +149 -149
  41. package/esm2022/datepicker/public_api.mjs +1 -1
  42. package/esm2022/extension/public_api.mjs +1 -1
  43. package/esm2022/extension/value-changes-extension.mjs +1 -1
  44. package/esm2022/form-field/form-field.module.mjs +1 -1
  45. package/esm2022/form-field/form-field.props.mjs +1 -1
  46. package/esm2022/form-field/form-field.wrapper.mjs +159 -125
  47. package/esm2022/form-field/public_api.mjs +1 -1
  48. package/esm2022/grid/grid.module.mjs +1 -1
  49. package/esm2022/grid/grid.props.mjs +1 -1
  50. package/esm2022/grid/grid.type.mjs +59 -59
  51. package/esm2022/grid/public_api.mjs +1 -1
  52. package/esm2022/index.mjs +1 -1
  53. package/esm2022/input/input.module.mjs +1 -1
  54. package/esm2022/input/input.props.mjs +1 -1
  55. package/esm2022/input/input.type.mjs +275 -275
  56. package/esm2022/input/public_api.mjs +1 -1
  57. package/esm2022/input-group/input-group.module.mjs +1 -1
  58. package/esm2022/input-group/input-group.props.mjs +1 -1
  59. package/esm2022/input-group/input-group.type.mjs +39 -39
  60. package/esm2022/input-group/public_api.mjs +1 -1
  61. package/esm2022/input-number/input-number.module.mjs +1 -1
  62. package/esm2022/input-number/input-number.props.mjs +1 -1
  63. package/esm2022/input-number/input-number.type.mjs +89 -89
  64. package/esm2022/input-number/public_api.mjs +1 -1
  65. package/esm2022/lib/ui-ng-zorro-antd.mjs +1 -1
  66. package/esm2022/lib/ui-ng-zorro-antd.module.mjs +1 -1
  67. package/esm2022/radio/public_api.mjs +1 -1
  68. package/esm2022/radio/radio.module.mjs +1 -1
  69. package/esm2022/radio/radio.type.mjs +81 -81
  70. package/esm2022/rate/public_api.mjs +1 -1
  71. package/esm2022/rate/rate.module.mjs +1 -1
  72. package/esm2022/rate/rate.type.mjs +33 -33
  73. package/esm2022/ref-template/public_api.mjs +1 -1
  74. package/esm2022/ref-template/ref-template.module.mjs +1 -1
  75. package/esm2022/ref-template/ref-template.type.mjs +9 -9
  76. package/esm2022/select/public_api.mjs +1 -1
  77. package/esm2022/select/select.module.mjs +1 -1
  78. package/esm2022/select/select.props.mjs +1 -1
  79. package/esm2022/select/select.type.mjs +123 -123
  80. package/esm2022/slider/public_api.mjs +1 -1
  81. package/esm2022/slider/slider.module.mjs +1 -1
  82. package/esm2022/slider/slider.type.mjs +33 -33
  83. package/esm2022/space/public_api.mjs +1 -1
  84. package/esm2022/space/space.module.mjs +1 -1
  85. package/esm2022/space/space.type.mjs +27 -27
  86. package/esm2022/switch/public_api.mjs +1 -1
  87. package/esm2022/switch/switch.module.mjs +1 -1
  88. package/esm2022/switch/switch.type.mjs +25 -25
  89. package/esm2022/tabs/public_api.mjs +1 -1
  90. package/esm2022/tabs/tabs.module.mjs +1 -1
  91. package/esm2022/tabs/tabs.props.mjs +1 -1
  92. package/esm2022/tabs/tabs.wrapper.mjs +79 -79
  93. package/esm2022/text-value/public_api.mjs +1 -1
  94. package/esm2022/text-value/text-value.module.mjs +1 -1
  95. package/esm2022/text-value/text-value.type.mjs +19 -19
  96. package/esm2022/textarea/public_api.mjs +1 -1
  97. package/esm2022/textarea/textarea.module.mjs +1 -1
  98. package/esm2022/textarea/textarea.type.mjs +113 -113
  99. package/esm2022/timepicker/public_api.mjs +1 -1
  100. package/esm2022/timepicker/timepicker.module.mjs +1 -1
  101. package/esm2022/timepicker/timepicker.type.mjs +61 -61
  102. package/esm2022/transfer/public_api.mjs +1 -1
  103. package/esm2022/transfer/transfer.component.mjs +49 -49
  104. package/esm2022/transfer/transfer.module.mjs +1 -1
  105. package/esm2022/transfer/transfer.type.mjs +47 -47
  106. package/esm2022/tree-select/public_api.mjs +1 -1
  107. package/esm2022/tree-select/tree-select.module.mjs +1 -1
  108. package/esm2022/tree-select/tree-select.type.mjs +69 -69
  109. package/esm2022/upload/public_api.mjs +1 -1
  110. package/esm2022/upload/upload.component.mjs +143 -143
  111. package/esm2022/upload/upload.module.mjs +1 -1
  112. package/esm2022/upload/upload.props.mjs +1 -1
  113. package/esm2022/upload/upload.type.mjs +83 -83
  114. package/extension/package.json +3 -0
  115. package/fesm2022/ngx-formly-zorro-antd-button-group.mjs +66 -66
  116. package/fesm2022/ngx-formly-zorro-antd-button-group.mjs.map +1 -1
  117. package/fesm2022/ngx-formly-zorro-antd-button.mjs +122 -122
  118. package/fesm2022/ngx-formly-zorro-antd-button.mjs.map +1 -1
  119. package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs +36 -36
  120. package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs.map +1 -1
  121. package/fesm2022/ngx-formly-zorro-antd-card.mjs +52 -53
  122. package/fesm2022/ngx-formly-zorro-antd-card.mjs.map +1 -1
  123. package/fesm2022/ngx-formly-zorro-antd-cascader.mjs +64 -64
  124. package/fesm2022/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
  125. package/fesm2022/ngx-formly-zorro-antd-checkbox.mjs +38 -38
  126. package/fesm2022/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
  127. package/fesm2022/ngx-formly-zorro-antd-common.mjs.map +1 -1
  128. package/fesm2022/ngx-formly-zorro-antd-datepicker.mjs +148 -148
  129. package/fesm2022/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
  130. package/fesm2022/ngx-formly-zorro-antd-extension.mjs.map +1 -1
  131. package/fesm2022/ngx-formly-zorro-antd-form-field.mjs +158 -124
  132. package/fesm2022/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
  133. package/fesm2022/ngx-formly-zorro-antd-grid.mjs +58 -58
  134. package/fesm2022/ngx-formly-zorro-antd-grid.mjs.map +1 -1
  135. package/fesm2022/ngx-formly-zorro-antd-input-group.mjs +38 -38
  136. package/fesm2022/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
  137. package/fesm2022/ngx-formly-zorro-antd-input-number.mjs +88 -88
  138. package/fesm2022/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
  139. package/fesm2022/ngx-formly-zorro-antd-input.mjs +274 -274
  140. package/fesm2022/ngx-formly-zorro-antd-input.mjs.map +1 -1
  141. package/fesm2022/ngx-formly-zorro-antd-radio.mjs +80 -80
  142. package/fesm2022/ngx-formly-zorro-antd-radio.mjs.map +1 -1
  143. package/fesm2022/ngx-formly-zorro-antd-rate.mjs +32 -32
  144. package/fesm2022/ngx-formly-zorro-antd-rate.mjs.map +1 -1
  145. package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs +8 -8
  146. package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs.map +1 -1
  147. package/fesm2022/ngx-formly-zorro-antd-select.mjs +122 -122
  148. package/fesm2022/ngx-formly-zorro-antd-select.mjs.map +1 -1
  149. package/fesm2022/ngx-formly-zorro-antd-slider.mjs +32 -32
  150. package/fesm2022/ngx-formly-zorro-antd-slider.mjs.map +1 -1
  151. package/fesm2022/ngx-formly-zorro-antd-space.mjs +26 -26
  152. package/fesm2022/ngx-formly-zorro-antd-space.mjs.map +1 -1
  153. package/fesm2022/ngx-formly-zorro-antd-switch.mjs +24 -24
  154. package/fesm2022/ngx-formly-zorro-antd-switch.mjs.map +1 -1
  155. package/fesm2022/ngx-formly-zorro-antd-tabs.mjs +78 -78
  156. package/fesm2022/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
  157. package/fesm2022/ngx-formly-zorro-antd-text-value.mjs +18 -18
  158. package/fesm2022/ngx-formly-zorro-antd-text-value.mjs.map +1 -1
  159. package/fesm2022/ngx-formly-zorro-antd-textarea.mjs +112 -112
  160. package/fesm2022/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
  161. package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs +60 -60
  162. package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
  163. package/fesm2022/ngx-formly-zorro-antd-transfer.mjs +94 -94
  164. package/fesm2022/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
  165. package/fesm2022/ngx-formly-zorro-antd-tree-select.mjs +68 -68
  166. package/fesm2022/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
  167. package/fesm2022/ngx-formly-zorro-antd-upload.mjs +224 -224
  168. package/fesm2022/ngx-formly-zorro-antd-upload.mjs.map +1 -1
  169. package/fesm2022/ngx-formly-zorro-antd.mjs.map +1 -1
  170. package/form-field/form-field.props.d.ts +16 -0
  171. package/form-field/form-field.wrapper.d.ts +4 -0
  172. package/form-field/package.json +3 -0
  173. package/grid/package.json +3 -0
  174. package/input/package.json +3 -0
  175. package/input-group/package.json +3 -0
  176. package/input-number/package.json +3 -0
  177. package/package.json +12 -12
  178. package/radio/package.json +3 -0
  179. package/rate/package.json +3 -0
  180. package/ref-template/package.json +3 -0
  181. package/select/package.json +3 -0
  182. package/slider/package.json +3 -0
  183. package/space/package.json +3 -0
  184. package/switch/package.json +3 -0
  185. package/tabs/package.json +3 -0
  186. package/text-value/package.json +3 -0
  187. package/textarea/package.json +3 -0
  188. package/timepicker/package.json +3 -0
  189. package/transfer/package.json +3 -0
  190. package/tree-select/package.json +3 -0
  191. package/upload/package.json +3 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-zorro-antd-switch.mjs","sources":["../../../../packages/formlyantd/switch/src/switch.type.ts","../../../../packages/formlyantd/switch/src/switch.module.ts","../../../../packages/formlyantd/switch/src/ngx-formly-zorro-antd-switch.ts"],"sourcesContent":["import { Component, Type, TemplateRef, 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\nimport type { NzSizeDSType } from 'ng-zorro-antd/core/types';\r\n\r\ninterface SwitchProps extends FormlyFieldProps {\r\n /**\r\n * 选中时的内容\r\n */\r\n checkedChildren?: string | TemplateRef<void> | null;\r\n\r\n /**\r\n * 非选中时的内容\r\n */\r\n unCheckedChildren?: string | TemplateRef<void> | null;\r\n\r\n /**\r\n * 开关大小\r\n */\r\n size?: NzSizeDSType;\r\n\r\n /**\r\n * 加载中的开关\r\n * @default false\r\n */\r\n loading?: boolean;\r\n\r\n /**\r\n * 是否完全由用户控制状态\r\n * @default false\r\n */\r\n control?: boolean;\r\n}\r\n\r\nexport interface FormlySwitchFieldConfig extends NzFormlyFieldConfig<SwitchProps> {\r\n type: 'switch' | Type<FormlyFieldSwitch>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-switch',\r\n template: `\r\n <nz-switch\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzId]=\"id\"\r\n [nzCheckedChildren]=\"props['checkedChildren'] ?? null\"\r\n [nzUnCheckedChildren]=\"props['unCheckedChildren'] ?? null\"\r\n [nzSize]=\"props['size']!\"\r\n [nzLoading]=\"props['loading']!!\"\r\n [nzControl]=\"props['control']!!\"\r\n (ngModelChange)=\"props.change && props.change(field, $event)\"\r\n ></nz-switch>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldSwitch extends FieldType<FieldTypeConfig<SwitchProps>> {\r\n override defaultOptions = {\r\n props: {\r\n size: 'default' as const,\r\n loading: false,\r\n control: false\r\n }\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 { FormlyFieldSwitch } from './switch.type';\r\n\r\nimport { NzSwitchModule } from 'ng-zorro-antd/switch';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldSwitch],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormlyNzFormFieldModule,\r\n\r\n NzSwitchModule,\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'switch',\r\n component: FormlyFieldSwitch,\r\n wrappers: ['form-field']\r\n }\r\n ]\r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BAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,SAAS,EAAE,iBAAiB;wBAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAnBhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBAEvB,cAAc;wBACd,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;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-zorro-antd-switch.mjs","sources":["../../../../packages/formlyantd/switch/src/switch.type.ts","../../../../packages/formlyantd/switch/src/switch.module.ts","../../../../packages/formlyantd/switch/src/ngx-formly-zorro-antd-switch.ts"],"sourcesContent":["import { Component, Type, TemplateRef, 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\nimport type { NzSizeDSType } from 'ng-zorro-antd/core/types';\n\ninterface SwitchProps extends FormlyFieldProps {\n /**\n * 选中时的内容\n */\n checkedChildren?: string | TemplateRef<void> | null;\n\n /**\n * 非选中时的内容\n */\n unCheckedChildren?: string | TemplateRef<void> | null;\n\n /**\n * 开关大小\n */\n size?: NzSizeDSType;\n\n /**\n * 加载中的开关\n * @default false\n */\n loading?: boolean;\n\n /**\n * 是否完全由用户控制状态\n * @default false\n */\n control?: boolean;\n}\n\nexport interface FormlySwitchFieldConfig extends NzFormlyFieldConfig<SwitchProps> {\n type: 'switch' | Type<FormlyFieldSwitch>;\n}\n\n@Component({\n selector: 'formly-field-switch',\n template: `\n <nz-switch\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzId]=\"id\"\n [nzCheckedChildren]=\"props['checkedChildren'] ?? null\"\n [nzUnCheckedChildren]=\"props['unCheckedChildren'] ?? null\"\n [nzSize]=\"props['size']!\"\n [nzLoading]=\"props['loading']!!\"\n [nzControl]=\"props['control']!!\"\n (ngModelChange)=\"props.change && props.change(field, $event)\"\n ></nz-switch>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSwitch extends FieldType<FieldTypeConfig<SwitchProps>> {\n override defaultOptions = {\n props: {\n size: 'default' as const,\n loading: false,\n control: false\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { FormlyFieldSwitch } from './switch.type';\n\nimport { NzSwitchModule } from 'ng-zorro-antd/switch';\n\n@NgModule({\n declarations: [FormlyFieldSwitch],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n\n NzSwitchModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'switch',\n component: FormlyFieldSwitch,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AAyDM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AAjB9E,IAAA,WAAA,GAAA;;AAkBW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,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AY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBAEvB,cAAc;wBACd,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;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
@@ -28,90 +28,90 @@ class FormlyWrapperTabs extends FieldWrapper {
28
28
  };
29
29
  }
30
30
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyWrapperTabs, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
31
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: FormlyWrapperTabs, selector: "formly-wrapper-tabs", usesInheritance: true, ngImport: i0, template: `<nz-tabset
32
- [(nzSelectedIndex)]="props['selectedIndex']"
33
- [nzAnimated]="props['animated']!"
34
- [nzSize]="props['size']!"
35
- [nzTabBarExtraContent]="props['tabBarExtraContent']"
36
- [nzTabBarStyle]="props['tabBarStyle'] ?? null"
37
- [nzTabPosition]="props['tabPosition']!"
38
- [nzType]="props['type']!"
39
- [nzTabBarGutter]="props['tabBarGutter']"
40
- [nzHideAll]="props['hideAll']!!"
41
- [nzLinkRouter]="props['linkRouter']!!"
42
- [nzLinkExact]="props['linkExact']!!"
43
- [nzCanDeactivate]="props['canDeactivate'] ?? null"
44
- [nzHideAdd]="props['hideAdd']!!"
45
- [nzAddIcon]="props['addIcon']!"
46
- (nzSelectedIndexChange)="
47
- props['selectedIndexChange'] && props['selectedIndexChange'](field, $event)
48
- "
49
- (nzSelectChange)="
50
- props['selectChange'] && props['selectChange'](field, $event.index, $event.tab)
51
- "
52
- (nzAdd)="props['onAdd'] && props['onAdd'](field)"
53
- (nzClose)="props['onClose'] && props['onClose'](field, $event.index)"
54
- >
55
- @for (tab of field.fieldGroup; track tab.id) {
56
- <nz-tab
57
- [nzTitle]="tab.props?.label || ''"
58
- [nzForceRender]="tab.props!['tab']?.forceRender"
59
- [nzDisabled]="tab.props!['tab']?.disabled"
60
- (nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click(field)"
61
- (nzContextmenu)="
62
- tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)
63
- "
64
- (nzSelect)="tab.props!['tab']?.select && tab.props!['tab']?.select(field)"
65
- (nzDeselect)="tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)"
66
- >
67
- <formly-field [field]="tab"></formly-field>
68
- </nz-tab>
69
- }
31
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: FormlyWrapperTabs, selector: "formly-wrapper-tabs", usesInheritance: true, ngImport: i0, template: `<nz-tabset
32
+ [(nzSelectedIndex)]="props['selectedIndex']"
33
+ [nzAnimated]="props['animated']!"
34
+ [nzSize]="props['size']!"
35
+ [nzTabBarExtraContent]="props['tabBarExtraContent']"
36
+ [nzTabBarStyle]="props['tabBarStyle'] ?? null"
37
+ [nzTabPosition]="props['tabPosition']!"
38
+ [nzType]="props['type']!"
39
+ [nzTabBarGutter]="props['tabBarGutter']"
40
+ [nzHideAll]="props['hideAll']!!"
41
+ [nzLinkRouter]="props['linkRouter']!!"
42
+ [nzLinkExact]="props['linkExact']!!"
43
+ [nzCanDeactivate]="props['canDeactivate'] ?? null"
44
+ [nzHideAdd]="props['hideAdd']!!"
45
+ [nzAddIcon]="props['addIcon']!"
46
+ (nzSelectedIndexChange)="
47
+ props['selectedIndexChange'] && props['selectedIndexChange'](field, $event)
48
+ "
49
+ (nzSelectChange)="
50
+ props['selectChange'] && props['selectChange'](field, $event.index, $event.tab)
51
+ "
52
+ (nzAdd)="props['onAdd'] && props['onAdd'](field)"
53
+ (nzClose)="props['onClose'] && props['onClose'](field, $event.index)"
54
+ >
55
+ @for (tab of field.fieldGroup; track tab.id) {
56
+ <nz-tab
57
+ [nzTitle]="tab.props?.label || ''"
58
+ [nzForceRender]="tab.props!['tab']?.forceRender"
59
+ [nzDisabled]="tab.props!['tab']?.disabled"
60
+ (nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click(field)"
61
+ (nzContextmenu)="
62
+ tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)
63
+ "
64
+ (nzSelect)="tab.props!['tab']?.select && tab.props!['tab']?.select(field)"
65
+ (nzDeselect)="tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)"
66
+ >
67
+ <formly-field [field]="tab"></formly-field>
68
+ </nz-tab>
69
+ }
70
70
  </nz-tabset>`, isInline: true, dependencies: [{ kind: "component", type: i1.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { kind: "component", type: i1.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "component", type: i2.FormlyField, selector: "formly-field", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
71
71
  }
72
72
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyWrapperTabs, decorators: [{
73
73
  type: Component,
74
74
  args: [{
75
75
  selector: 'formly-wrapper-tabs',
76
- template: `<nz-tabset
77
- [(nzSelectedIndex)]="props['selectedIndex']"
78
- [nzAnimated]="props['animated']!"
79
- [nzSize]="props['size']!"
80
- [nzTabBarExtraContent]="props['tabBarExtraContent']"
81
- [nzTabBarStyle]="props['tabBarStyle'] ?? null"
82
- [nzTabPosition]="props['tabPosition']!"
83
- [nzType]="props['type']!"
84
- [nzTabBarGutter]="props['tabBarGutter']"
85
- [nzHideAll]="props['hideAll']!!"
86
- [nzLinkRouter]="props['linkRouter']!!"
87
- [nzLinkExact]="props['linkExact']!!"
88
- [nzCanDeactivate]="props['canDeactivate'] ?? null"
89
- [nzHideAdd]="props['hideAdd']!!"
90
- [nzAddIcon]="props['addIcon']!"
91
- (nzSelectedIndexChange)="
92
- props['selectedIndexChange'] && props['selectedIndexChange'](field, $event)
93
- "
94
- (nzSelectChange)="
95
- props['selectChange'] && props['selectChange'](field, $event.index, $event.tab)
96
- "
97
- (nzAdd)="props['onAdd'] && props['onAdd'](field)"
98
- (nzClose)="props['onClose'] && props['onClose'](field, $event.index)"
99
- >
100
- @for (tab of field.fieldGroup; track tab.id) {
101
- <nz-tab
102
- [nzTitle]="tab.props?.label || ''"
103
- [nzForceRender]="tab.props!['tab']?.forceRender"
104
- [nzDisabled]="tab.props!['tab']?.disabled"
105
- (nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click(field)"
106
- (nzContextmenu)="
107
- tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)
108
- "
109
- (nzSelect)="tab.props!['tab']?.select && tab.props!['tab']?.select(field)"
110
- (nzDeselect)="tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)"
111
- >
112
- <formly-field [field]="tab"></formly-field>
113
- </nz-tab>
114
- }
76
+ template: `<nz-tabset
77
+ [(nzSelectedIndex)]="props['selectedIndex']"
78
+ [nzAnimated]="props['animated']!"
79
+ [nzSize]="props['size']!"
80
+ [nzTabBarExtraContent]="props['tabBarExtraContent']"
81
+ [nzTabBarStyle]="props['tabBarStyle'] ?? null"
82
+ [nzTabPosition]="props['tabPosition']!"
83
+ [nzType]="props['type']!"
84
+ [nzTabBarGutter]="props['tabBarGutter']"
85
+ [nzHideAll]="props['hideAll']!!"
86
+ [nzLinkRouter]="props['linkRouter']!!"
87
+ [nzLinkExact]="props['linkExact']!!"
88
+ [nzCanDeactivate]="props['canDeactivate'] ?? null"
89
+ [nzHideAdd]="props['hideAdd']!!"
90
+ [nzAddIcon]="props['addIcon']!"
91
+ (nzSelectedIndexChange)="
92
+ props['selectedIndexChange'] && props['selectedIndexChange'](field, $event)
93
+ "
94
+ (nzSelectChange)="
95
+ props['selectChange'] && props['selectChange'](field, $event.index, $event.tab)
96
+ "
97
+ (nzAdd)="props['onAdd'] && props['onAdd'](field)"
98
+ (nzClose)="props['onClose'] && props['onClose'](field, $event.index)"
99
+ >
100
+ @for (tab of field.fieldGroup; track tab.id) {
101
+ <nz-tab
102
+ [nzTitle]="tab.props?.label || ''"
103
+ [nzForceRender]="tab.props!['tab']?.forceRender"
104
+ [nzDisabled]="tab.props!['tab']?.disabled"
105
+ (nzClick)="tab.props!['tab']?.click && tab.props!['tab']?.click(field)"
106
+ (nzContextmenu)="
107
+ tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)
108
+ "
109
+ (nzSelect)="tab.props!['tab']?.select && tab.props!['tab']?.select(field)"
110
+ (nzDeselect)="tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)"
111
+ >
112
+ <formly-field [field]="tab"></formly-field>
113
+ </nz-tab>
114
+ }
115
115
  </nz-tabset>`,
116
116
  changeDetection: ChangeDetectionStrategy.OnPush
117
117
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-zorro-antd-tabs.mjs","sources":["../../../../packages/formlyantd/tabs/src/tabs.wrapper.ts","../../../../packages/formlyantd/tabs/src/tabs.module.ts","../../../../packages/formlyantd/tabs/src/ngx-formly-zorro-antd-tabs.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldWrapper } from '@ngx-formly/core';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport type { TabsProps } from './tabs.props';\r\n\r\nexport interface FormlyTabsWrapperConfig extends NzFormlyFieldConfig<TabsProps> {\r\n wrappers: ('tabs' | Type<FormlyWrapperTabs>)[];\r\n}\r\n\r\n@Component({\r\n selector: 'formly-wrapper-tabs',\r\n template: `<nz-tabset\r\n [(nzSelectedIndex)]=\"props['selectedIndex']\"\r\n [nzAnimated]=\"props['animated']!\"\r\n [nzSize]=\"props['size']!\"\r\n [nzTabBarExtraContent]=\"props['tabBarExtraContent']\"\r\n [nzTabBarStyle]=\"props['tabBarStyle'] ?? null\"\r\n [nzTabPosition]=\"props['tabPosition']!\"\r\n [nzType]=\"props['type']!\"\r\n [nzTabBarGutter]=\"props['tabBarGutter']\"\r\n [nzHideAll]=\"props['hideAll']!!\"\r\n [nzLinkRouter]=\"props['linkRouter']!!\"\r\n [nzLinkExact]=\"props['linkExact']!!\"\r\n [nzCanDeactivate]=\"props['canDeactivate'] ?? null\"\r\n [nzHideAdd]=\"props['hideAdd']!!\"\r\n [nzAddIcon]=\"props['addIcon']!\"\r\n (nzSelectedIndexChange)=\"\r\n props['selectedIndexChange'] && props['selectedIndexChange'](field, $event)\r\n \"\r\n (nzSelectChange)=\"\r\n props['selectChange'] && props['selectChange'](field, $event.index, $event.tab)\r\n \"\r\n (nzAdd)=\"props['onAdd'] && props['onAdd'](field)\"\r\n (nzClose)=\"props['onClose'] && props['onClose'](field, $event.index)\"\r\n >\r\n @for (tab of field.fieldGroup; track tab.id) {\r\n <nz-tab\r\n [nzTitle]=\"tab.props?.label || ''\"\r\n [nzForceRender]=\"tab.props!['tab']?.forceRender\"\r\n [nzDisabled]=\"tab.props!['tab']?.disabled\"\r\n (nzClick)=\"tab.props!['tab']?.click && tab.props!['tab']?.click(field)\"\r\n (nzContextmenu)=\"\r\n tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)\r\n \"\r\n (nzSelect)=\"tab.props!['tab']?.select && tab.props!['tab']?.select(field)\"\r\n (nzDeselect)=\"tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)\"\r\n >\r\n <formly-field [field]=\"tab\"></formly-field>\r\n </nz-tab>\r\n }\r\n </nz-tabset>`,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyWrapperTabs extends FieldWrapper<NzFormlyFieldConfig<TabsProps>> {\r\n override defaultOptions = {\r\n props: {\r\n animated: true,\r\n size: 'default' as const,\r\n type: 'line' as const,\r\n tabPosition: 'top' as const,\r\n hideAll: false,\r\n linkRouter: false,\r\n linkExact: true,\r\n centered: false,\r\n hideAdd: false,\r\n tab: {\r\n forceRender: false,\r\n disabled: false\r\n }\r\n }\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\n\r\nimport { FormlyWrapperTabs } from './tabs.wrapper';\r\nimport { NzTabsModule } from 'ng-zorro-antd/tabs';\r\n\r\n@NgModule({\r\n declarations: [FormlyWrapperTabs],\r\n imports: [\r\n CommonModule,\r\n\r\n NzTabsModule,\r\n\r\n FormlyModule.forChild({\r\n wrappers: [\r\n {\r\n name: 'tabs',\r\n component: FormlyWrapperTabs\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzTabsModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;AAqDM,MAAO,iBAAkB,SAAQ,YAA4C,CAAA;AA5CnF,IAAA,WAAA,GAAA;;AA6CW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,QAAQ,EAAE,IAAI;AACd,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,IAAI,EAAE,MAAe;AACrB,gBAAA,WAAW,EAA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Y,CAAC,QAAQ,CAAC;AACpB,gBAAA,QAAQ,EAAE;AACR,oBAAA;AACE,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,SAAS,EAAE,iBAAiB;AAC7B,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAjB9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBAEZ,YAAY;wBAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,QAAQ,EAAE;AACR,gCAAA;AACE,oCAAA,IAAI,EAAE,MAAM;AACZ,oCAAA,SAAS,EAAE,iBAAiB;AAC7B,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-zorro-antd-tabs.mjs","sources":["../../../../packages/formlyantd/tabs/src/tabs.wrapper.ts","../../../../packages/formlyantd/tabs/src/tabs.module.ts","../../../../packages/formlyantd/tabs/src/ngx-formly-zorro-antd-tabs.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { TabsProps } from './tabs.props';\n\nexport interface FormlyTabsWrapperConfig extends NzFormlyFieldConfig<TabsProps> {\n wrappers: ('tabs' | Type<FormlyWrapperTabs>)[];\n}\n\n@Component({\n selector: 'formly-wrapper-tabs',\n template: `<nz-tabset\n [(nzSelectedIndex)]=\"props['selectedIndex']\"\n [nzAnimated]=\"props['animated']!\"\n [nzSize]=\"props['size']!\"\n [nzTabBarExtraContent]=\"props['tabBarExtraContent']\"\n [nzTabBarStyle]=\"props['tabBarStyle'] ?? null\"\n [nzTabPosition]=\"props['tabPosition']!\"\n [nzType]=\"props['type']!\"\n [nzTabBarGutter]=\"props['tabBarGutter']\"\n [nzHideAll]=\"props['hideAll']!!\"\n [nzLinkRouter]=\"props['linkRouter']!!\"\n [nzLinkExact]=\"props['linkExact']!!\"\n [nzCanDeactivate]=\"props['canDeactivate'] ?? null\"\n [nzHideAdd]=\"props['hideAdd']!!\"\n [nzAddIcon]=\"props['addIcon']!\"\n (nzSelectedIndexChange)=\"\n props['selectedIndexChange'] && props['selectedIndexChange'](field, $event)\n \"\n (nzSelectChange)=\"\n props['selectChange'] && props['selectChange'](field, $event.index, $event.tab)\n \"\n (nzAdd)=\"props['onAdd'] && props['onAdd'](field)\"\n (nzClose)=\"props['onClose'] && props['onClose'](field, $event.index)\"\n >\n @for (tab of field.fieldGroup; track tab.id) {\n <nz-tab\n [nzTitle]=\"tab.props?.label || ''\"\n [nzForceRender]=\"tab.props!['tab']?.forceRender\"\n [nzDisabled]=\"tab.props!['tab']?.disabled\"\n (nzClick)=\"tab.props!['tab']?.click && tab.props!['tab']?.click(field)\"\n (nzContextmenu)=\"\n tab.props!['tab']?.contextmenu && tab.props!['tab']?.contextmenu(field, $event)\n \"\n (nzSelect)=\"tab.props!['tab']?.select && tab.props!['tab']?.select(field)\"\n (nzDeselect)=\"tab.props!['tab']?.deselect && tab.props!['tab']?.deselect(field)\"\n >\n <formly-field [field]=\"tab\"></formly-field>\n </nz-tab>\n }\n </nz-tabset>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyWrapperTabs extends FieldWrapper<NzFormlyFieldConfig<TabsProps>> {\n override defaultOptions = {\n props: {\n animated: true,\n size: 'default' as const,\n type: 'line' as const,\n tabPosition: 'top' as const,\n hideAll: false,\n linkRouter: false,\n linkExact: true,\n centered: false,\n hideAdd: false,\n tab: {\n forceRender: false,\n disabled: false\n }\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\n\nimport { FormlyWrapperTabs } from './tabs.wrapper';\nimport { NzTabsModule } from 'ng-zorro-antd/tabs';\n\n@NgModule({\n declarations: [FormlyWrapperTabs],\n imports: [\n CommonModule,\n\n NzTabsModule,\n\n FormlyModule.forChild({\n wrappers: [\n {\n name: 'tabs',\n component: FormlyWrapperTabs\n }\n ]\n })\n ]\n})\nexport class FormlyNzTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;AAqDM,MAAO,iBAAkB,SAAQ,YAA4C,CAAA;AA5CnF,IAAA,WAAA,GAAA;;AA6CW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,QAAQ,EAAE,IAAI;AACd,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,IAAI,EAAE,MAAe;AACrB,gBAAA,WAAW,EAAE,KAAc;AAC3B,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,GAAG,EAAE;AACH,oBAAA,WAAW,EAAE,KAAK;AAClB,oBAAA,QAAQ,EAAE,KAAK;AAChB,iBAAA;AACF,aAAA;SACF,CAAC;AACH,KAAA;8GAlBY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,EA1ClB,QAAA,EAAA,qBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;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
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>
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
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
57
  }
58
58
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldTextValue, decorators: [{
59
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>
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
69
  `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".wrap-text{word-break:break-all}\n"] }]
70
70
  }] });
71
71
 
@@ -1 +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,CAAC,WAAY,CAAC,KAAK,CAAC;AACtC,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;AAE1D,QAAA,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;AAChC,YAAA,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;AAClB,SAAA;QAED,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO,IAAI,CAAC,MAAM,CAAC;AACpB,SAAA;QACD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE;AAC7C,YAAA,IAAI,CAAC,MAAM,GAAG,MAAmB,CAAC;AAClC,YAAA,OAAO,MAAM,CAAC;AACf,SAAA;AACD,QAAA,OAAO,EAAE,CAAC,MA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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;;;;"}
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';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport { Observable, of, Subscription, isObservable } from 'rxjs';\nimport { isPromise } from '@pkt/ng.core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\n\ninterface TextValueProps extends FormlyFieldProps {\n /**\n * 格式化函数\n * @param value 表单值\n * @param field 当前字段\n */\n format?: (\n value: NzSafeAny,\n field: NzFormlyFieldConfig<TextValueProps>\n ) => Observable<NzSafeAny> | Promise<NzSafeAny> | NzSafeAny | null;\n\n /**\n * 默认显示文本\n */\n defaultText?: string;\n}\n\nexport interface FormlyTextValueFieldConfig extends NzFormlyFieldConfig<TextValueProps> {\n type: 'text' | Type<FormlyFieldTextValue>;\n}\n\n@Component({\n selector: 'formly-field-text-value',\n template: `\n <nz-form-text\n class=\"wrap-text\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['ngClass']\"\n [ngStyle]=\"props['ngStyle']\"\n >\n {{ textValue$ | async | defaultify: props.defaultText }}\n </nz-form-text>\n `,\n styles: [\n `\n .wrap-text {\n word-break: break-all;\n }\n `\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldTextValue<T = NzSafeAny>\n extends FieldType<FieldTypeConfig<TextValueProps>>\n implements OnInit, OnDestroy\n{\n private result?: Observable<T> | Promise<T>;\n private subscription?: Subscription;\n\n override defaultOptions = {\n props: {\n defaultText: '--'\n }\n };\n\n ngOnInit(): void {\n this.subscription = this.formControl!.valueChanges.subscribe(() => {\n this.result = undefined;\n });\n }\n\n get textValue$() {\n const value = this.formControl!.value;\n const format = this.props.format || this.formState.format;\n\n if (typeof format !== 'function') {\n return of(value);\n }\n\n if (this.result) {\n return this.result;\n }\n const result = format(value, this.field);\n if (isPromise(result) || isObservable(result)) {\n this.result = result as NzSafeAny;\n return result;\n }\n return of(result);\n }\n\n ngOnDestroy(): void {\n this.subscription?.unsubscribe();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { DefaultifyPipe } from '@pkt/ng.core';\nimport { FormlyFieldTextValue } from './text-value.type';\n\nimport { NzFormModule } from 'ng-zorro-antd/form';\n\n@NgModule({\n declarations: [FormlyFieldTextValue],\n imports: [\n CommonModule,\n NzFormModule,\n DefaultifyPipe,\n FormlyModule.forChild({\n types: [\n {\n name: 'text',\n component: FormlyFieldTextValue,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzTextValueModule {}\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,C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24,124 @@ class FormlyFieldTextarea extends FieldType {
24
24
  };
25
25
  }
26
26
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldTextarea, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
27
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: FormlyFieldTextarea, selector: "formly-field-textarea", usesInheritance: true, ngImport: i0, template: `
28
- @switch (props.type) {
29
- @case ('count') {
30
- <nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
31
- <textarea
32
- [formControl]="formControl"
33
- [formlyAttributes]="field"
34
- [ngClass]="props['ngClass']"
35
- [ngStyle]="props['ngStyle']"
36
- [attr.rows]="props.rows"
37
- [attr.cols]="props.cols"
38
- [nzBorderless]="props['borderless']!!"
39
- [nzAutosize]="props['autosize']!!"
40
- nz-input
41
- ></textarea>
42
- </nz-textarea-count>
43
- }
44
- @case ('clear') {
45
- <nz-input-group
46
- class="ant-input-affix-wrapper-textarea-with-clear-btn"
47
- [nzSuffix]="textAreaClearTpl"
48
- >
49
- <ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
50
- </nz-input-group>
51
- }
52
- @default {
53
- <ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
54
- }
55
- }
56
-
57
- <ng-template #textareaTpl>
58
- <textarea
59
- [formControl]="formControl"
60
- [formlyAttributes]="field"
61
- [ngClass]="props['ngClass']"
62
- [ngStyle]="props['ngStyle']"
63
- [attr.rows]="props.rows"
64
- [attr.cols]="props.cols"
65
- nz-input
66
- [nzBorderless]="props['borderless']!!"
67
- [nzAutosize]="props['autosize']!!"
68
- ></textarea>
69
- </ng-template>
70
-
71
- <!-- 清除数据 -->
72
- <ng-template #textAreaClearTpl>
73
- @if (formControl.value && !props['disabled'] && !props['readonly']) {
74
- <span
75
- nz-icon
76
- class="ant-input-clear-icon"
77
- nzTheme="fill"
78
- nzType="close-circle"
79
- (click)="formControl.reset()"
80
- ></span>
81
- }
82
- </ng-template>
27
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: FormlyFieldTextarea, selector: "formly-field-textarea", usesInheritance: true, ngImport: i0, template: `
28
+ @switch (props.type) {
29
+ @case ('count') {
30
+ <nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
31
+ <textarea
32
+ [formControl]="formControl"
33
+ [formlyAttributes]="field"
34
+ [ngClass]="props['ngClass']"
35
+ [ngStyle]="props['ngStyle']"
36
+ [attr.rows]="props.rows"
37
+ [attr.cols]="props.cols"
38
+ [nzBorderless]="props['borderless']!!"
39
+ [nzAutosize]="props['autosize']!!"
40
+ nz-input
41
+ ></textarea>
42
+ </nz-textarea-count>
43
+ }
44
+ @case ('clear') {
45
+ <nz-input-group
46
+ class="ant-input-affix-wrapper-textarea-with-clear-btn"
47
+ [nzSuffix]="textAreaClearTpl"
48
+ >
49
+ <ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
50
+ </nz-input-group>
51
+ }
52
+ @default {
53
+ <ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
54
+ }
55
+ }
56
+
57
+ <ng-template #textareaTpl>
58
+ <textarea
59
+ [formControl]="formControl"
60
+ [formlyAttributes]="field"
61
+ [ngClass]="props['ngClass']"
62
+ [ngStyle]="props['ngStyle']"
63
+ [attr.rows]="props.rows"
64
+ [attr.cols]="props.cols"
65
+ nz-input
66
+ [nzBorderless]="props['borderless']!!"
67
+ [nzAutosize]="props['autosize']!!"
68
+ ></textarea>
69
+ </ng-template>
70
+
71
+ <!-- 清除数据 -->
72
+ <ng-template #textAreaClearTpl>
73
+ @if (formControl.value && !props['disabled'] && !props['readonly']) {
74
+ <span
75
+ nz-icon
76
+ class="ant-input-clear-icon"
77
+ nzTheme="fill"
78
+ nzType="close-circle"
79
+ (click)="formControl.reset()"
80
+ ></span>
81
+ }
82
+ </ng-template>
83
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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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
84
  }
85
85
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldTextarea, decorators: [{
86
86
  type: Component,
87
87
  args: [{
88
88
  selector: 'formly-field-textarea',
89
- template: `
90
- @switch (props.type) {
91
- @case ('count') {
92
- <nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
93
- <textarea
94
- [formControl]="formControl"
95
- [formlyAttributes]="field"
96
- [ngClass]="props['ngClass']"
97
- [ngStyle]="props['ngStyle']"
98
- [attr.rows]="props.rows"
99
- [attr.cols]="props.cols"
100
- [nzBorderless]="props['borderless']!!"
101
- [nzAutosize]="props['autosize']!!"
102
- nz-input
103
- ></textarea>
104
- </nz-textarea-count>
105
- }
106
- @case ('clear') {
107
- <nz-input-group
108
- class="ant-input-affix-wrapper-textarea-with-clear-btn"
109
- [nzSuffix]="textAreaClearTpl"
110
- >
111
- <ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
112
- </nz-input-group>
113
- }
114
- @default {
115
- <ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
116
- }
117
- }
118
-
119
- <ng-template #textareaTpl>
120
- <textarea
121
- [formControl]="formControl"
122
- [formlyAttributes]="field"
123
- [ngClass]="props['ngClass']"
124
- [ngStyle]="props['ngStyle']"
125
- [attr.rows]="props.rows"
126
- [attr.cols]="props.cols"
127
- nz-input
128
- [nzBorderless]="props['borderless']!!"
129
- [nzAutosize]="props['autosize']!!"
130
- ></textarea>
131
- </ng-template>
132
-
133
- <!-- 清除数据 -->
134
- <ng-template #textAreaClearTpl>
135
- @if (formControl.value && !props['disabled'] && !props['readonly']) {
136
- <span
137
- nz-icon
138
- class="ant-input-clear-icon"
139
- nzTheme="fill"
140
- nzType="close-circle"
141
- (click)="formControl.reset()"
142
- ></span>
143
- }
144
- </ng-template>
89
+ template: `
90
+ @switch (props.type) {
91
+ @case ('count') {
92
+ <nz-textarea-count [nzMaxCharacterCount]="props['maxCharacterCount'] || 0">
93
+ <textarea
94
+ [formControl]="formControl"
95
+ [formlyAttributes]="field"
96
+ [ngClass]="props['ngClass']"
97
+ [ngStyle]="props['ngStyle']"
98
+ [attr.rows]="props.rows"
99
+ [attr.cols]="props.cols"
100
+ [nzBorderless]="props['borderless']!!"
101
+ [nzAutosize]="props['autosize']!!"
102
+ nz-input
103
+ ></textarea>
104
+ </nz-textarea-count>
105
+ }
106
+ @case ('clear') {
107
+ <nz-input-group
108
+ class="ant-input-affix-wrapper-textarea-with-clear-btn"
109
+ [nzSuffix]="textAreaClearTpl"
110
+ >
111
+ <ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
112
+ </nz-input-group>
113
+ }
114
+ @default {
115
+ <ng-container *ngTemplateOutlet="textareaTpl"> </ng-container>
116
+ }
117
+ }
118
+
119
+ <ng-template #textareaTpl>
120
+ <textarea
121
+ [formControl]="formControl"
122
+ [formlyAttributes]="field"
123
+ [ngClass]="props['ngClass']"
124
+ [ngStyle]="props['ngStyle']"
125
+ [attr.rows]="props.rows"
126
+ [attr.cols]="props.cols"
127
+ nz-input
128
+ [nzBorderless]="props['borderless']!!"
129
+ [nzAutosize]="props['autosize']!!"
130
+ ></textarea>
131
+ </ng-template>
132
+
133
+ <!-- 清除数据 -->
134
+ <ng-template #textAreaClearTpl>
135
+ @if (formControl.value && !props['disabled'] && !props['readonly']) {
136
+ <span
137
+ nz-icon
138
+ class="ant-input-clear-icon"
139
+ nzTheme="fill"
140
+ nzType="close-circle"
141
+ (click)="formControl.reset()"
142
+ ></span>
143
+ }
144
+ </ng-template>
145
145
  `,
146
146
  changeDetection: ChangeDetectionStrategy.OnPush
147
147
  }]