ngx-formly-zorro-antd 14.3.0 → 14.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (295) hide show
  1. package/README.md +1 -1
  2. package/autocomplete/autocomplete.props.d.ts +38 -38
  3. package/autocomplete/index.d.ts +5 -5
  4. package/autocomplete/public_api.d.ts +1 -1
  5. package/button/button.module.d.ts +11 -11
  6. package/button/button.type.d.ts +66 -66
  7. package/button/index.d.ts +5 -5
  8. package/button/public_api.d.ts +2 -2
  9. package/card/card.module.d.ts +10 -10
  10. package/card/card.wrapper.d.ts +58 -58
  11. package/card/index.d.ts +5 -5
  12. package/card/public_api.d.ts +2 -2
  13. package/cascader/cascader.module.d.ts +12 -12
  14. package/cascader/cascader.type.d.ts +152 -152
  15. package/cascader/index.d.ts +5 -5
  16. package/cascader/public_api.d.ts +2 -2
  17. package/checkbox/checkbox.module.d.ts +12 -12
  18. package/checkbox/checkbox.type.d.ts +35 -35
  19. package/checkbox/index.d.ts +5 -5
  20. package/checkbox/public_api.d.ts +2 -2
  21. package/datepicker/datepicker.module.d.ts +12 -12
  22. package/datepicker/datepicker.props.d.ts +149 -149
  23. package/datepicker/datepicker.type.d.ts +32 -32
  24. package/datepicker/index.d.ts +5 -5
  25. package/datepicker/public_api.d.ts +2 -2
  26. package/esm2020/autocomplete/autocomplete.props.mjs +2 -2
  27. package/esm2020/autocomplete/ngx-formly-zorro-antd-autocomplete.mjs +4 -4
  28. package/esm2020/autocomplete/public_api.mjs +2 -2
  29. package/esm2020/button/button.module.mjs +61 -61
  30. package/esm2020/button/button.type.mjs +110 -110
  31. package/esm2020/button/ngx-formly-zorro-antd-button.mjs +4 -4
  32. package/esm2020/button/public_api.mjs +3 -3
  33. package/esm2020/card/card.module.mjs +43 -43
  34. package/esm2020/card/card.wrapper.mjs +47 -47
  35. package/esm2020/card/ngx-formly-zorro-antd-card.mjs +4 -4
  36. package/esm2020/card/public_api.mjs +3 -3
  37. package/esm2020/cascader/cascader.module.mjs +51 -51
  38. package/esm2020/cascader/cascader.type.mjs +112 -112
  39. package/esm2020/cascader/ngx-formly-zorro-antd-cascader.mjs +4 -4
  40. package/esm2020/cascader/public_api.mjs +3 -3
  41. package/esm2020/checkbox/checkbox.module.mjs +59 -59
  42. package/esm2020/checkbox/checkbox.type.mjs +69 -69
  43. package/esm2020/checkbox/ngx-formly-zorro-antd-checkbox.mjs +4 -4
  44. package/esm2020/checkbox/public_api.mjs +3 -3
  45. package/esm2020/datepicker/datepicker.module.mjs +51 -51
  46. package/esm2020/datepicker/datepicker.props.mjs +2 -2
  47. package/esm2020/datepicker/datepicker.type.mjs +196 -196
  48. package/esm2020/datepicker/ngx-formly-zorro-antd-datepicker.mjs +4 -4
  49. package/esm2020/datepicker/public_api.mjs +3 -3
  50. package/esm2020/form-field/form-field.module.mjs +45 -45
  51. package/esm2020/form-field/form-field.props.mjs +2 -2
  52. package/esm2020/form-field/form-field.wrapper.mjs +127 -127
  53. package/esm2020/form-field/ngx-formly-zorro-antd-form-field.mjs +4 -4
  54. package/esm2020/form-field/public_api.mjs +2 -2
  55. package/esm2020/grid/grid.module.mjs +41 -41
  56. package/esm2020/grid/grid.props.mjs +2 -2
  57. package/esm2020/grid/grid.type.mjs +71 -71
  58. package/esm2020/grid/ngx-formly-zorro-antd-grid.mjs +4 -4
  59. package/esm2020/grid/public_api.mjs +3 -3
  60. package/esm2020/index.mjs +2 -2
  61. package/esm2020/input/input.module.mjs +89 -89
  62. package/esm2020/input/input.props.mjs +2 -2
  63. package/esm2020/input/input.type.mjs +309 -309
  64. package/esm2020/input/ngx-formly-zorro-antd-input.mjs +4 -4
  65. package/esm2020/input/public_api.mjs +3 -3
  66. package/esm2020/input-group/input-group.module.mjs +47 -47
  67. package/esm2020/input-group/input-group.props.mjs +2 -2
  68. package/esm2020/input-group/input-group.type.mjs +71 -71
  69. package/esm2020/input-group/ngx-formly-zorro-antd-input-group.mjs +4 -4
  70. package/esm2020/input-group/public_api.mjs +3 -3
  71. package/esm2020/input-number/input-number.module.mjs +59 -59
  72. package/esm2020/input-number/input-number.props.mjs +2 -2
  73. package/esm2020/input-number/input-number.type.mjs +128 -128
  74. package/esm2020/input-number/ngx-formly-zorro-antd-input-number.mjs +4 -4
  75. package/esm2020/input-number/public_api.mjs +3 -3
  76. package/esm2020/lib/ui-ng-zorro-antd.mjs +2 -2
  77. package/esm2020/lib/ui-ng-zorro-antd.module.mjs +97 -97
  78. package/esm2020/ngx-formly-zorro-antd.mjs +4 -4
  79. package/esm2020/radio/ngx-formly-zorro-antd-radio.mjs +4 -4
  80. package/esm2020/radio/public_api.mjs +3 -3
  81. package/esm2020/radio/radio.module.mjs +59 -59
  82. package/esm2020/radio/radio.type.mjs +96 -96
  83. package/esm2020/rate/ngx-formly-zorro-antd-rate.mjs +4 -4
  84. package/esm2020/rate/public_api.mjs +3 -3
  85. package/esm2020/rate/rate.module.mjs +51 -51
  86. package/esm2020/rate/rate.type.mjs +63 -63
  87. package/esm2020/select/ngx-formly-zorro-antd-select.mjs +4 -4
  88. package/esm2020/select/public_api.mjs +3 -3
  89. package/esm2020/select/select.module.mjs +57 -57
  90. package/esm2020/select/select.props.mjs +2 -2
  91. package/esm2020/select/select.type.mjs +170 -170
  92. package/esm2020/slider/ngx-formly-zorro-antd-slider.mjs +4 -4
  93. package/esm2020/slider/public_api.mjs +3 -3
  94. package/esm2020/slider/slider.module.mjs +51 -51
  95. package/esm2020/slider/slider.type.mjs +67 -67
  96. package/esm2020/switch/ngx-formly-zorro-antd-switch.mjs +4 -4
  97. package/esm2020/switch/public_api.mjs +3 -3
  98. package/esm2020/switch/switch.module.mjs +51 -51
  99. package/esm2020/switch/switch.type.mjs +53 -53
  100. package/esm2020/tabs/ngx-formly-zorro-antd-tabs.mjs +4 -4
  101. package/esm2020/tabs/public_api.mjs +3 -3
  102. package/esm2020/tabs/tabs.module.mjs +41 -41
  103. package/esm2020/tabs/tabs.props.mjs +2 -2
  104. package/esm2020/tabs/tabs.wrapper.mjs +115 -115
  105. package/esm2020/textarea/ngx-formly-zorro-antd-textarea.mjs +4 -4
  106. package/esm2020/textarea/public_api.mjs +3 -3
  107. package/esm2020/textarea/textarea.module.mjs +55 -55
  108. package/esm2020/textarea/textarea.type.mjs +141 -141
  109. package/esm2020/timepicker/ngx-formly-zorro-antd-timepicker.mjs +4 -4
  110. package/esm2020/timepicker/public_api.mjs +3 -3
  111. package/esm2020/timepicker/timepicker.module.mjs +51 -51
  112. package/esm2020/timepicker/timepicker.type.mjs +96 -96
  113. package/esm2020/transfer/ngx-formly-zorro-antd-transfer.mjs +4 -4
  114. package/esm2020/transfer/public_api.mjs +3 -3
  115. package/esm2020/transfer/transfer.component.mjs +128 -128
  116. package/esm2020/transfer/transfer.module.mjs +52 -52
  117. package/esm2020/transfer/transfer.type.mjs +87 -87
  118. package/esm2020/tree-select/ngx-formly-zorro-antd-tree-select.mjs +4 -4
  119. package/esm2020/tree-select/public_api.mjs +3 -3
  120. package/esm2020/tree-select/tree-select.module.mjs +51 -51
  121. package/esm2020/tree-select/tree-select.type.mjs +100 -101
  122. package/esm2020/upload/ngx-formly-zorro-antd-upload.mjs +4 -4
  123. package/esm2020/upload/public_api.mjs +3 -3
  124. package/esm2020/upload/upload.component.mjs +253 -253
  125. package/esm2020/upload/upload.module.mjs +60 -60
  126. package/esm2020/upload/upload.props.mjs +2 -2
  127. package/esm2020/upload/upload.type.mjs +129 -129
  128. package/fesm2015/ngx-formly-zorro-antd-autocomplete.mjs +2 -2
  129. package/fesm2015/ngx-formly-zorro-antd-button.mjs +152 -152
  130. package/fesm2015/ngx-formly-zorro-antd-button.mjs.map +1 -1
  131. package/fesm2015/ngx-formly-zorro-antd-card.mjs +77 -77
  132. package/fesm2015/ngx-formly-zorro-antd-card.mjs.map +1 -1
  133. package/fesm2015/ngx-formly-zorro-antd-cascader.mjs +145 -145
  134. package/fesm2015/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
  135. package/fesm2015/ngx-formly-zorro-antd-checkbox.mjs +110 -110
  136. package/fesm2015/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
  137. package/fesm2015/ngx-formly-zorro-antd-datepicker.mjs +229 -229
  138. package/fesm2015/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
  139. package/fesm2015/ngx-formly-zorro-antd-form-field.mjs +155 -155
  140. package/fesm2015/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
  141. package/fesm2015/ngx-formly-zorro-antd-grid.mjs +97 -97
  142. package/fesm2015/ngx-formly-zorro-antd-grid.mjs.map +1 -1
  143. package/fesm2015/ngx-formly-zorro-antd-input-group.mjs +102 -102
  144. package/fesm2015/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
  145. package/fesm2015/ngx-formly-zorro-antd-input-number.mjs +169 -169
  146. package/fesm2015/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
  147. package/fesm2015/ngx-formly-zorro-antd-input.mjs +376 -376
  148. package/fesm2015/ngx-formly-zorro-antd-input.mjs.map +1 -1
  149. package/fesm2015/ngx-formly-zorro-antd-radio.mjs +134 -134
  150. package/fesm2015/ngx-formly-zorro-antd-radio.mjs.map +1 -1
  151. package/fesm2015/ngx-formly-zorro-antd-rate.mjs +97 -97
  152. package/fesm2015/ngx-formly-zorro-antd-rate.mjs.map +1 -1
  153. package/fesm2015/ngx-formly-zorro-antd-select.mjs +206 -206
  154. package/fesm2015/ngx-formly-zorro-antd-select.mjs.map +1 -1
  155. package/fesm2015/ngx-formly-zorro-antd-slider.mjs +101 -101
  156. package/fesm2015/ngx-formly-zorro-antd-slider.mjs.map +1 -1
  157. package/fesm2015/ngx-formly-zorro-antd-switch.mjs +87 -87
  158. package/fesm2015/ngx-formly-zorro-antd-switch.mjs.map +1 -1
  159. package/fesm2015/ngx-formly-zorro-antd-tabs.mjs +141 -141
  160. package/fesm2015/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
  161. package/fesm2015/ngx-formly-zorro-antd-textarea.mjs +176 -176
  162. package/fesm2015/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
  163. package/fesm2015/ngx-formly-zorro-antd-timepicker.mjs +129 -129
  164. package/fesm2015/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
  165. package/fesm2015/ngx-formly-zorro-antd-transfer.mjs +241 -241
  166. package/fesm2015/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
  167. package/fesm2015/ngx-formly-zorro-antd-tree-select.mjs +133 -134
  168. package/fesm2015/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
  169. package/fesm2015/ngx-formly-zorro-antd-upload.mjs +410 -410
  170. package/fesm2015/ngx-formly-zorro-antd-upload.mjs.map +1 -1
  171. package/fesm2015/ngx-formly-zorro-antd.mjs +74 -74
  172. package/fesm2015/ngx-formly-zorro-antd.mjs.map +1 -1
  173. package/fesm2020/ngx-formly-zorro-antd-autocomplete.mjs +2 -2
  174. package/fesm2020/ngx-formly-zorro-antd-button.mjs +152 -152
  175. package/fesm2020/ngx-formly-zorro-antd-button.mjs.map +1 -1
  176. package/fesm2020/ngx-formly-zorro-antd-card.mjs +77 -77
  177. package/fesm2020/ngx-formly-zorro-antd-card.mjs.map +1 -1
  178. package/fesm2020/ngx-formly-zorro-antd-cascader.mjs +145 -145
  179. package/fesm2020/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
  180. package/fesm2020/ngx-formly-zorro-antd-checkbox.mjs +110 -110
  181. package/fesm2020/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
  182. package/fesm2020/ngx-formly-zorro-antd-datepicker.mjs +229 -229
  183. package/fesm2020/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
  184. package/fesm2020/ngx-formly-zorro-antd-form-field.mjs +155 -155
  185. package/fesm2020/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
  186. package/fesm2020/ngx-formly-zorro-antd-grid.mjs +97 -97
  187. package/fesm2020/ngx-formly-zorro-antd-grid.mjs.map +1 -1
  188. package/fesm2020/ngx-formly-zorro-antd-input-group.mjs +102 -102
  189. package/fesm2020/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
  190. package/fesm2020/ngx-formly-zorro-antd-input-number.mjs +169 -169
  191. package/fesm2020/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
  192. package/fesm2020/ngx-formly-zorro-antd-input.mjs +376 -376
  193. package/fesm2020/ngx-formly-zorro-antd-input.mjs.map +1 -1
  194. package/fesm2020/ngx-formly-zorro-antd-radio.mjs +134 -134
  195. package/fesm2020/ngx-formly-zorro-antd-radio.mjs.map +1 -1
  196. package/fesm2020/ngx-formly-zorro-antd-rate.mjs +97 -97
  197. package/fesm2020/ngx-formly-zorro-antd-rate.mjs.map +1 -1
  198. package/fesm2020/ngx-formly-zorro-antd-select.mjs +206 -206
  199. package/fesm2020/ngx-formly-zorro-antd-select.mjs.map +1 -1
  200. package/fesm2020/ngx-formly-zorro-antd-slider.mjs +101 -101
  201. package/fesm2020/ngx-formly-zorro-antd-slider.mjs.map +1 -1
  202. package/fesm2020/ngx-formly-zorro-antd-switch.mjs +87 -87
  203. package/fesm2020/ngx-formly-zorro-antd-switch.mjs.map +1 -1
  204. package/fesm2020/ngx-formly-zorro-antd-tabs.mjs +141 -141
  205. package/fesm2020/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
  206. package/fesm2020/ngx-formly-zorro-antd-textarea.mjs +176 -176
  207. package/fesm2020/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
  208. package/fesm2020/ngx-formly-zorro-antd-timepicker.mjs +129 -129
  209. package/fesm2020/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
  210. package/fesm2020/ngx-formly-zorro-antd-transfer.mjs +241 -241
  211. package/fesm2020/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
  212. package/fesm2020/ngx-formly-zorro-antd-tree-select.mjs +133 -134
  213. package/fesm2020/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
  214. package/fesm2020/ngx-formly-zorro-antd-upload.mjs +409 -409
  215. package/fesm2020/ngx-formly-zorro-antd-upload.mjs.map +1 -1
  216. package/fesm2020/ngx-formly-zorro-antd.mjs +74 -74
  217. package/fesm2020/ngx-formly-zorro-antd.mjs.map +1 -1
  218. package/form-field/form-field.module.d.ts +11 -11
  219. package/form-field/form-field.props.d.ts +105 -105
  220. package/form-field/form-field.wrapper.d.ts +9 -9
  221. package/form-field/index.d.ts +5 -5
  222. package/form-field/public_api.d.ts +3 -3
  223. package/grid/grid.module.d.ts +10 -10
  224. package/grid/grid.props.d.ts +44 -44
  225. package/grid/grid.type.d.ts +11 -11
  226. package/grid/index.d.ts +5 -5
  227. package/grid/public_api.d.ts +3 -3
  228. package/index.d.ts +1 -1
  229. package/input/index.d.ts +5 -5
  230. package/input/input.module.d.ts +14 -14
  231. package/input/input.props.d.ts +36 -36
  232. package/input/input.type.d.ts +26 -26
  233. package/input/public_api.d.ts +2 -2
  234. package/input-group/index.d.ts +5 -5
  235. package/input-group/input-group.module.d.ts +11 -11
  236. package/input-group/input-group.props.d.ts +56 -56
  237. package/input-group/input-group.type.d.ts +22 -22
  238. package/input-group/public_api.d.ts +3 -3
  239. package/input-number/index.d.ts +5 -5
  240. package/input-number/input-number.module.d.ts +12 -12
  241. package/input-number/input-number.props.d.ts +81 -81
  242. package/input-number/input-number.type.d.ts +24 -24
  243. package/input-number/public_api.d.ts +2 -2
  244. package/lib/ui-ng-zorro-antd.d.ts +1 -1
  245. package/lib/ui-ng-zorro-antd.module.d.ts +27 -27
  246. package/package.json +1 -1
  247. package/radio/index.d.ts +5 -5
  248. package/radio/public_api.d.ts +2 -2
  249. package/radio/radio.module.d.ts +14 -14
  250. package/radio/radio.type.d.ts +38 -38
  251. package/rate/index.d.ts +5 -5
  252. package/rate/public_api.d.ts +2 -2
  253. package/rate/rate.module.d.ts +12 -12
  254. package/rate/rate.type.d.ts +57 -57
  255. package/select/index.d.ts +5 -5
  256. package/select/public_api.d.ts +2 -2
  257. package/select/select.module.d.ts +13 -13
  258. package/select/select.props.d.ts +171 -171
  259. package/select/select.type.d.ts +36 -36
  260. package/slider/index.d.ts +5 -5
  261. package/slider/public_api.d.ts +2 -2
  262. package/slider/slider.module.d.ts +12 -12
  263. package/slider/slider.type.d.ts +76 -76
  264. package/switch/index.d.ts +5 -5
  265. package/switch/public_api.d.ts +2 -2
  266. package/switch/switch.module.d.ts +12 -12
  267. package/switch/switch.type.d.ts +44 -44
  268. package/tabs/index.d.ts +5 -5
  269. package/tabs/public_api.d.ts +2 -2
  270. package/tabs/tabs.module.d.ts +10 -10
  271. package/tabs/tabs.props.d.ts +126 -126
  272. package/tabs/tabs.wrapper.d.ts +28 -28
  273. package/textarea/index.d.ts +5 -5
  274. package/textarea/public_api.d.ts +2 -2
  275. package/textarea/textarea.module.d.ts +13 -13
  276. package/textarea/textarea.type.d.ts +39 -39
  277. package/timepicker/index.d.ts +5 -5
  278. package/timepicker/public_api.d.ts +2 -2
  279. package/timepicker/timepicker.module.d.ts +12 -12
  280. package/timepicker/timepicker.type.d.ts +138 -138
  281. package/transfer/index.d.ts +5 -5
  282. package/transfer/public_api.d.ts +2 -2
  283. package/transfer/transfer.component.d.ts +26 -26
  284. package/transfer/transfer.module.d.ts +13 -13
  285. package/transfer/transfer.type.d.ts +118 -118
  286. package/tree-select/index.d.ts +5 -5
  287. package/tree-select/public_api.d.ts +2 -2
  288. package/tree-select/tree-select.module.d.ts +12 -12
  289. package/tree-select/tree-select.type.d.ts +163 -164
  290. package/upload/index.d.ts +5 -5
  291. package/upload/public_api.d.ts +2 -2
  292. package/upload/upload.component.d.ts +33 -33
  293. package/upload/upload.module.d.ts +15 -15
  294. package/upload/upload.props.d.ts +173 -173
  295. package/upload/upload.type.d.ts +29 -29
@@ -16,421 +16,421 @@ import { NzIconModule } from 'ng-zorro-antd/icon';
16
16
  import * as i4 from 'ng-zorro-antd/core/transition-patch';
17
17
  import * as i5 from 'ng-zorro-antd/core/wave';
18
18
 
19
- /* eslint-disable @typescript-eslint/no-empty-function */
20
- class UploadNzComponent extends NzUploadComponent {
21
- constructor() {
22
- super(...arguments);
23
- /** 上传按钮的图标 */
24
- this.nzeUploadButtonIcon = {
25
- type: 'cloud-upload'
26
- };
27
- /** 样式名 */
28
- this.className = '';
29
- this.onChange = () => { };
30
- this.onTouched = () => { };
31
- }
32
- writeValue() { }
33
- registerOnChange(fn) {
34
- this.onChange = fn;
35
- }
36
- registerOnTouched(fn) {
37
- this.onTouched = fn;
38
- }
39
- setDisabledState(isDisabled) {
40
- this.nzDisabled = isDisabled;
41
- }
42
- fileListChange(list) {
43
- this.nzFileListChange.emit(list);
44
- }
45
- change(value) {
46
- this.nzChange.emit(value);
47
- if (['removed', 'success'].includes(value.type ?? '')) {
48
- if (this.resultMap instanceof Function) {
49
- this.onChange(this.resultMap(value.fileList.filter(x => x.status === 'done')));
50
- }
51
- else {
52
- this.onChange(value.fileList.filter(x => x.status === 'done'));
53
- }
54
- }
55
- }
56
- }
57
- UploadNzComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: UploadNzComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
58
- UploadNzComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: UploadNzComponent, selector: "formly-nz-upload", inputs: { nzeText: "nzeText", nzeHint: "nzeHint", nzeShowUploadButton: "nzeShowUploadButton", nzeUploadButton: "nzeUploadButton", nzeUploadButtonIcon: "nzeUploadButtonIcon", className: "className", resultMap: "resultMap" }, providers: [
59
- {
60
- provide: NG_VALUE_ACCESSOR,
61
- useExisting: forwardRef(() => UploadNzComponent),
62
- multi: true
63
- }
64
- ], usesInheritance: true, ngImport: i0, template: `
65
- <nz-upload
66
- [nzType]="nzType"
67
- [nzAccept]="nzAccept"
68
- [nzAction]="nzAction"
69
- [nzDirectory]="nzDirectory"
70
- [nzBeforeUpload]="nzBeforeUpload"
71
- [nzCustomRequest]="nzCustomRequest"
72
- [nzData]="nzData"
73
- [nzDisabled]="nzDisabled"
74
- [(nzFileList)]="nzFileList"
75
- [nzLimit]="nzLimit"
76
- [nzSize]="nzSize"
77
- [nzFileType]="nzFileType"
78
- [nzFilter]="nzFilter"
79
- [nzHeaders]="nzHeaders"
80
- [nzListType]="nzListType"
81
- [nzMultiple]="nzMultiple"
82
- [nzName]="nzName"
83
- [nzShowUploadList]="nzShowUploadList"
84
- [nzShowButton]="nzShowButton"
85
- [nzWithCredentials]="nzWithCredentials"
86
- [nzOpenFileDialogOnClick]="nzOpenFileDialogOnClick"
87
- [nzPreview]="nzPreview"
88
- [nzPreviewFile]="nzPreviewFile"
89
- [nzPreviewIsImage]="nzPreviewIsImage"
90
- [nzRemove]="nzRemove"
91
- [nzDownload]="nzDownload"
92
- [nzTransformFile]="nzTransformFile"
93
- [nzIconRender]="nzIconRender"
94
- [nzFileListRender]="nzFileListRender"
95
- [ngClass]="className"
96
- (nzChange)="change($event)"
97
- (nzFileListChange)="fileListChange($event)"
98
- >
99
- <ng-container [ngSwitch]="nzType">
100
- <ng-container *ngSwitchCase="'drag'">
101
- <p class="ant-upload-drag-icon">
102
- <span
103
- *ngIf="nzeUploadButtonIcon"
104
- nz-icon
105
- [nzType]="nzeUploadButtonIcon.type"
106
- [nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
107
- [nzSpin]="nzeUploadButtonIcon.spin!!"
108
- [nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
109
- ></span>
110
- </p>
111
- <p class="ant-upload-text">{{ nzeText }}</p>
112
- <p class="ant-upload-hint">{{ nzeHint }}</p>
113
- </ng-container>
114
- <ng-container *ngSwitchDefault>
115
- <button
116
- type="button"
117
- nz-button
118
- [disabled]="nzDisabled!!"
119
- *ngIf="nzeShowUploadButton !== false"
120
- >
121
- <span
122
- *ngIf="nzeUploadButtonIcon"
123
- nz-icon
124
- [nzType]="nzeUploadButtonIcon.type"
125
- [nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
126
- [nzSpin]="nzeUploadButtonIcon.spin!!"
127
- [nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
128
- ></span>
129
- {{ nzeText }}
130
- </button>
131
-
132
- <div *ngIf="nzeShowUploadButton === false">
133
- <span
134
- *ngIf="nzeUploadButtonIcon"
135
- nz-icon
136
- [nzType]="nzeUploadButtonIcon.type"
137
- [nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
138
- [nzSpin]="nzeUploadButtonIcon.spin!!"
139
- [nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
140
- ></span>
141
- {{ nzeText }}
142
- <div class="ant-upload-hint" style="margin-top: 8px">{{ nzeHint }}</div>
143
- </div>
144
- </ng-container>
145
- </ng-container>
146
- </nz-upload>
147
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i2.NzUploadComponent, selector: "nz-upload", inputs: ["nzType", "nzLimit", "nzSize", "nzFileType", "nzAccept", "nzAction", "nzDirectory", "nzOpenFileDialogOnClick", "nzBeforeUpload", "nzCustomRequest", "nzData", "nzFilter", "nzFileList", "nzDisabled", "nzHeaders", "nzListType", "nzMultiple", "nzName", "nzShowUploadList", "nzShowButton", "nzWithCredentials", "nzRemove", "nzPreview", "nzPreviewFile", "nzPreviewIsImage", "nzTransformFile", "nzDownload", "nzIconRender", "nzFileListRender"], outputs: ["nzChange", "nzFileListChange"], exportAs: ["nzUpload"] }, { kind: "component", type: i3.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i4.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i5.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "directive", type: i6.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: UploadNzComponent, decorators: [{
149
- type: Component,
150
- args: [{
151
- selector: 'formly-nz-upload',
152
- template: `
153
- <nz-upload
154
- [nzType]="nzType"
155
- [nzAccept]="nzAccept"
156
- [nzAction]="nzAction"
157
- [nzDirectory]="nzDirectory"
158
- [nzBeforeUpload]="nzBeforeUpload"
159
- [nzCustomRequest]="nzCustomRequest"
160
- [nzData]="nzData"
161
- [nzDisabled]="nzDisabled"
162
- [(nzFileList)]="nzFileList"
163
- [nzLimit]="nzLimit"
164
- [nzSize]="nzSize"
165
- [nzFileType]="nzFileType"
166
- [nzFilter]="nzFilter"
167
- [nzHeaders]="nzHeaders"
168
- [nzListType]="nzListType"
169
- [nzMultiple]="nzMultiple"
170
- [nzName]="nzName"
171
- [nzShowUploadList]="nzShowUploadList"
172
- [nzShowButton]="nzShowButton"
173
- [nzWithCredentials]="nzWithCredentials"
174
- [nzOpenFileDialogOnClick]="nzOpenFileDialogOnClick"
175
- [nzPreview]="nzPreview"
176
- [nzPreviewFile]="nzPreviewFile"
177
- [nzPreviewIsImage]="nzPreviewIsImage"
178
- [nzRemove]="nzRemove"
179
- [nzDownload]="nzDownload"
180
- [nzTransformFile]="nzTransformFile"
181
- [nzIconRender]="nzIconRender"
182
- [nzFileListRender]="nzFileListRender"
183
- [ngClass]="className"
184
- (nzChange)="change($event)"
185
- (nzFileListChange)="fileListChange($event)"
186
- >
187
- <ng-container [ngSwitch]="nzType">
188
- <ng-container *ngSwitchCase="'drag'">
189
- <p class="ant-upload-drag-icon">
190
- <span
191
- *ngIf="nzeUploadButtonIcon"
192
- nz-icon
193
- [nzType]="nzeUploadButtonIcon.type"
194
- [nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
195
- [nzSpin]="nzeUploadButtonIcon.spin!!"
196
- [nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
197
- ></span>
198
- </p>
199
- <p class="ant-upload-text">{{ nzeText }}</p>
200
- <p class="ant-upload-hint">{{ nzeHint }}</p>
201
- </ng-container>
202
- <ng-container *ngSwitchDefault>
203
- <button
204
- type="button"
205
- nz-button
206
- [disabled]="nzDisabled!!"
207
- *ngIf="nzeShowUploadButton !== false"
208
- >
209
- <span
210
- *ngIf="nzeUploadButtonIcon"
211
- nz-icon
212
- [nzType]="nzeUploadButtonIcon.type"
213
- [nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
214
- [nzSpin]="nzeUploadButtonIcon.spin!!"
215
- [nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
216
- ></span>
217
- {{ nzeText }}
218
- </button>
219
-
220
- <div *ngIf="nzeShowUploadButton === false">
221
- <span
222
- *ngIf="nzeUploadButtonIcon"
223
- nz-icon
224
- [nzType]="nzeUploadButtonIcon.type"
225
- [nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
226
- [nzSpin]="nzeUploadButtonIcon.spin!!"
227
- [nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
228
- ></span>
229
- {{ nzeText }}
230
- <div class="ant-upload-hint" style="margin-top: 8px">{{ nzeHint }}</div>
231
- </div>
232
- </ng-container>
233
- </ng-container>
234
- </nz-upload>
235
- `,
236
- encapsulation: ViewEncapsulation.None,
237
- changeDetection: ChangeDetectionStrategy.OnPush,
238
- providers: [
239
- {
240
- provide: NG_VALUE_ACCESSOR,
241
- useExisting: forwardRef(() => UploadNzComponent),
242
- multi: true
243
- }
244
- ]
245
- }]
246
- }], propDecorators: { nzeText: [{
247
- type: Input
248
- }], nzeHint: [{
249
- type: Input
250
- }], nzeShowUploadButton: [{
251
- type: Input
252
- }], nzeUploadButton: [{
253
- type: Input
254
- }], nzeUploadButtonIcon: [{
255
- type: Input
256
- }], className: [{
257
- type: Input
258
- }], resultMap: [{
259
- type: Input
19
+ /* eslint-disable @typescript-eslint/no-empty-function */
20
+ class UploadNzComponent extends NzUploadComponent {
21
+ constructor() {
22
+ super(...arguments);
23
+ /** 上传按钮的图标 */
24
+ this.nzeUploadButtonIcon = {
25
+ type: 'cloud-upload'
26
+ };
27
+ /** 样式名 */
28
+ this.className = '';
29
+ this.onChange = () => { };
30
+ this.onTouched = () => { };
31
+ }
32
+ writeValue() { }
33
+ registerOnChange(fn) {
34
+ this.onChange = fn;
35
+ }
36
+ registerOnTouched(fn) {
37
+ this.onTouched = fn;
38
+ }
39
+ setDisabledState(isDisabled) {
40
+ this.nzDisabled = isDisabled;
41
+ }
42
+ fileListChange(list) {
43
+ this.nzFileListChange.emit(list);
44
+ }
45
+ change(value) {
46
+ this.nzChange.emit(value);
47
+ if (['removed', 'success'].includes(value.type ?? '')) {
48
+ if (this.resultMap instanceof Function) {
49
+ this.onChange(this.resultMap(value.fileList.filter(x => x.status === 'done')));
50
+ }
51
+ else {
52
+ this.onChange(value.fileList.filter(x => x.status === 'done'));
53
+ }
54
+ }
55
+ }
56
+ }
57
+ UploadNzComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: UploadNzComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
58
+ UploadNzComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: UploadNzComponent, selector: "formly-nz-upload", inputs: { nzeText: "nzeText", nzeHint: "nzeHint", nzeShowUploadButton: "nzeShowUploadButton", nzeUploadButton: "nzeUploadButton", nzeUploadButtonIcon: "nzeUploadButtonIcon", className: "className", resultMap: "resultMap" }, providers: [
59
+ {
60
+ provide: NG_VALUE_ACCESSOR,
61
+ useExisting: forwardRef(() => UploadNzComponent),
62
+ multi: true
63
+ }
64
+ ], usesInheritance: true, ngImport: i0, template: `
65
+ <nz-upload
66
+ [nzType]="nzType"
67
+ [nzAccept]="nzAccept"
68
+ [nzAction]="nzAction"
69
+ [nzDirectory]="nzDirectory"
70
+ [nzBeforeUpload]="nzBeforeUpload"
71
+ [nzCustomRequest]="nzCustomRequest"
72
+ [nzData]="nzData"
73
+ [nzDisabled]="nzDisabled"
74
+ [(nzFileList)]="nzFileList"
75
+ [nzLimit]="nzLimit"
76
+ [nzSize]="nzSize"
77
+ [nzFileType]="nzFileType"
78
+ [nzFilter]="nzFilter"
79
+ [nzHeaders]="nzHeaders"
80
+ [nzListType]="nzListType"
81
+ [nzMultiple]="nzMultiple"
82
+ [nzName]="nzName"
83
+ [nzShowUploadList]="nzShowUploadList"
84
+ [nzShowButton]="nzShowButton"
85
+ [nzWithCredentials]="nzWithCredentials"
86
+ [nzOpenFileDialogOnClick]="nzOpenFileDialogOnClick"
87
+ [nzPreview]="nzPreview"
88
+ [nzPreviewFile]="nzPreviewFile"
89
+ [nzPreviewIsImage]="nzPreviewIsImage"
90
+ [nzRemove]="nzRemove"
91
+ [nzDownload]="nzDownload"
92
+ [nzTransformFile]="nzTransformFile"
93
+ [nzIconRender]="nzIconRender"
94
+ [nzFileListRender]="nzFileListRender"
95
+ [ngClass]="className"
96
+ (nzChange)="change($event)"
97
+ (nzFileListChange)="fileListChange($event)"
98
+ >
99
+ <ng-container [ngSwitch]="nzType">
100
+ <ng-container *ngSwitchCase="'drag'">
101
+ <p class="ant-upload-drag-icon">
102
+ <span
103
+ *ngIf="nzeUploadButtonIcon"
104
+ nz-icon
105
+ [nzType]="nzeUploadButtonIcon.type"
106
+ [nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
107
+ [nzSpin]="nzeUploadButtonIcon.spin!!"
108
+ [nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
109
+ ></span>
110
+ </p>
111
+ <p class="ant-upload-text">{{ nzeText }}</p>
112
+ <p class="ant-upload-hint">{{ nzeHint }}</p>
113
+ </ng-container>
114
+ <ng-container *ngSwitchDefault>
115
+ <button
116
+ type="button"
117
+ nz-button
118
+ [disabled]="nzDisabled!!"
119
+ *ngIf="nzeShowUploadButton !== false"
120
+ >
121
+ <span
122
+ *ngIf="nzeUploadButtonIcon"
123
+ nz-icon
124
+ [nzType]="nzeUploadButtonIcon.type"
125
+ [nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
126
+ [nzSpin]="nzeUploadButtonIcon.spin!!"
127
+ [nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
128
+ ></span>
129
+ {{ nzeText }}
130
+ </button>
131
+
132
+ <div *ngIf="nzeShowUploadButton === false">
133
+ <span
134
+ *ngIf="nzeUploadButtonIcon"
135
+ nz-icon
136
+ [nzType]="nzeUploadButtonIcon.type"
137
+ [nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
138
+ [nzSpin]="nzeUploadButtonIcon.spin!!"
139
+ [nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
140
+ ></span>
141
+ {{ nzeText }}
142
+ <div class="ant-upload-hint" style="margin-top: 8px">{{ nzeHint }}</div>
143
+ </div>
144
+ </ng-container>
145
+ </ng-container>
146
+ </nz-upload>
147
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i2.NzUploadComponent, selector: "nz-upload", inputs: ["nzType", "nzLimit", "nzSize", "nzFileType", "nzAccept", "nzAction", "nzDirectory", "nzOpenFileDialogOnClick", "nzBeforeUpload", "nzCustomRequest", "nzData", "nzFilter", "nzFileList", "nzDisabled", "nzHeaders", "nzListType", "nzMultiple", "nzName", "nzShowUploadList", "nzShowButton", "nzWithCredentials", "nzRemove", "nzPreview", "nzPreviewFile", "nzPreviewIsImage", "nzTransformFile", "nzDownload", "nzIconRender", "nzFileListRender"], outputs: ["nzChange", "nzFileListChange"], exportAs: ["nzUpload"] }, { kind: "component", type: i3.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i4.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i5.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "directive", type: i6.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: UploadNzComponent, decorators: [{
149
+ type: Component,
150
+ args: [{
151
+ selector: 'formly-nz-upload',
152
+ template: `
153
+ <nz-upload
154
+ [nzType]="nzType"
155
+ [nzAccept]="nzAccept"
156
+ [nzAction]="nzAction"
157
+ [nzDirectory]="nzDirectory"
158
+ [nzBeforeUpload]="nzBeforeUpload"
159
+ [nzCustomRequest]="nzCustomRequest"
160
+ [nzData]="nzData"
161
+ [nzDisabled]="nzDisabled"
162
+ [(nzFileList)]="nzFileList"
163
+ [nzLimit]="nzLimit"
164
+ [nzSize]="nzSize"
165
+ [nzFileType]="nzFileType"
166
+ [nzFilter]="nzFilter"
167
+ [nzHeaders]="nzHeaders"
168
+ [nzListType]="nzListType"
169
+ [nzMultiple]="nzMultiple"
170
+ [nzName]="nzName"
171
+ [nzShowUploadList]="nzShowUploadList"
172
+ [nzShowButton]="nzShowButton"
173
+ [nzWithCredentials]="nzWithCredentials"
174
+ [nzOpenFileDialogOnClick]="nzOpenFileDialogOnClick"
175
+ [nzPreview]="nzPreview"
176
+ [nzPreviewFile]="nzPreviewFile"
177
+ [nzPreviewIsImage]="nzPreviewIsImage"
178
+ [nzRemove]="nzRemove"
179
+ [nzDownload]="nzDownload"
180
+ [nzTransformFile]="nzTransformFile"
181
+ [nzIconRender]="nzIconRender"
182
+ [nzFileListRender]="nzFileListRender"
183
+ [ngClass]="className"
184
+ (nzChange)="change($event)"
185
+ (nzFileListChange)="fileListChange($event)"
186
+ >
187
+ <ng-container [ngSwitch]="nzType">
188
+ <ng-container *ngSwitchCase="'drag'">
189
+ <p class="ant-upload-drag-icon">
190
+ <span
191
+ *ngIf="nzeUploadButtonIcon"
192
+ nz-icon
193
+ [nzType]="nzeUploadButtonIcon.type"
194
+ [nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
195
+ [nzSpin]="nzeUploadButtonIcon.spin!!"
196
+ [nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
197
+ ></span>
198
+ </p>
199
+ <p class="ant-upload-text">{{ nzeText }}</p>
200
+ <p class="ant-upload-hint">{{ nzeHint }}</p>
201
+ </ng-container>
202
+ <ng-container *ngSwitchDefault>
203
+ <button
204
+ type="button"
205
+ nz-button
206
+ [disabled]="nzDisabled!!"
207
+ *ngIf="nzeShowUploadButton !== false"
208
+ >
209
+ <span
210
+ *ngIf="nzeUploadButtonIcon"
211
+ nz-icon
212
+ [nzType]="nzeUploadButtonIcon.type"
213
+ [nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
214
+ [nzSpin]="nzeUploadButtonIcon.spin!!"
215
+ [nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
216
+ ></span>
217
+ {{ nzeText }}
218
+ </button>
219
+
220
+ <div *ngIf="nzeShowUploadButton === false">
221
+ <span
222
+ *ngIf="nzeUploadButtonIcon"
223
+ nz-icon
224
+ [nzType]="nzeUploadButtonIcon.type"
225
+ [nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
226
+ [nzSpin]="nzeUploadButtonIcon.spin!!"
227
+ [nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
228
+ ></span>
229
+ {{ nzeText }}
230
+ <div class="ant-upload-hint" style="margin-top: 8px">{{ nzeHint }}</div>
231
+ </div>
232
+ </ng-container>
233
+ </ng-container>
234
+ </nz-upload>
235
+ `,
236
+ encapsulation: ViewEncapsulation.None,
237
+ changeDetection: ChangeDetectionStrategy.OnPush,
238
+ providers: [
239
+ {
240
+ provide: NG_VALUE_ACCESSOR,
241
+ useExisting: forwardRef(() => UploadNzComponent),
242
+ multi: true
243
+ }
244
+ ]
245
+ }]
246
+ }], propDecorators: { nzeText: [{
247
+ type: Input
248
+ }], nzeHint: [{
249
+ type: Input
250
+ }], nzeShowUploadButton: [{
251
+ type: Input
252
+ }], nzeUploadButton: [{
253
+ type: Input
254
+ }], nzeUploadButtonIcon: [{
255
+ type: Input
256
+ }], className: [{
257
+ type: Input
258
+ }], resultMap: [{
259
+ type: Input
260
260
  }] } });
261
261
 
262
- class FormlyFieldUpload extends FieldType {
263
- constructor() {
264
- super(...arguments);
265
- this.defaultOptions = {
266
- props: {
267
- listType: 'text',
268
- name: 'file',
269
- showUploadList: true,
270
- showButton: true,
271
- openFileDialogOnClick: true,
272
- showUploadButton: true,
273
- limit: 0,
274
- size: 0,
275
- fileList: [],
276
- filter: [],
277
- text: ''
278
- }
279
- };
280
- }
281
- ngOnInit() {
282
- const type = this.props.type;
283
- if (type) {
284
- this.upload.nzType = type;
285
- }
286
- }
287
- }
288
- FormlyFieldUpload.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldUpload, deps: null, target: i0.ɵɵFactoryTarget.Component });
289
- FormlyFieldUpload.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: FormlyFieldUpload, selector: "formly-field-upload", viewQueries: [{ propertyName: "upload", first: true, predicate: ["upload"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `<formly-nz-upload
290
- #upload
291
- [formControl]="formControl"
292
- [formlyAttributes]="field"
293
- [nzAccept]="props['accept']"
294
- [nzAction]="props['action']"
295
- [nzDirectory]="props['directory']!!"
296
- [nzBeforeUpload]="props['beforeUpload']"
297
- [nzCustomRequest]="props['customRequest']"
298
- [nzData]="props['data']"
299
- [nzDisabled]="props['disabled']!!"
300
- [(nzFileList)]="props['fileList']"
301
- [nzLimit]="props['limit']"
302
- [nzSize]="props['size']"
303
- [nzFileType]="props['fileType']"
304
- [nzFilter]="props['filter']!"
305
- [nzHeaders]="props['headers']"
306
- [nzListType]="props['listType']!"
307
- [nzMultiple]="props['multiple']!!"
308
- [nzName]="props['name'] || ''"
309
- [nzShowUploadList]="props['showUploadList']"
310
- [nzShowButton]="props['showButton']!!"
311
- [nzWithCredentials]="props['withCredentials']!!"
312
- [nzOpenFileDialogOnClick]="props['openFileDialogOnClick']!!"
313
- [nzPreview]="props['preview']"
314
- [nzPreviewFile]="props['previewFile']"
315
- [nzPreviewIsImage]="props['previewIsImage']"
316
- [nzRemove]="props['remove']"
317
- (nzChange)="props.change && props.change(field, $event)"
318
- [nzDownload]="props['download']"
319
- [nzTransformFile]="props['transformFile']"
320
- [nzIconRender]="props['iconRender'] ?? null"
321
- [nzFileListRender]="props['fileListRender'] ?? null"
322
- [resultMap]="props['resultMap']"
323
- [nzeHint]="props['hint']"
324
- [nzeText]="props['text']"
325
- [nzeUploadButtonIcon]="props['uploadButtonIcon']"
326
- [nzeShowUploadButton]="props['showUploadButton']"
327
- [className]="props['className'] || ''"
328
- (nzFileListChange)="props['fileListChange'] && props['fileListChange'](field, $event)"
329
- >
330
- </formly-nz-upload>`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type: UploadNzComponent, selector: "formly-nz-upload", inputs: ["nzeText", "nzeHint", "nzeShowUploadButton", "nzeUploadButton", "nzeUploadButtonIcon", "className", "resultMap"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
331
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldUpload, decorators: [{
332
- type: Component,
333
- args: [{
334
- selector: 'formly-field-upload',
335
- template: `<formly-nz-upload
336
- #upload
337
- [formControl]="formControl"
338
- [formlyAttributes]="field"
339
- [nzAccept]="props['accept']"
340
- [nzAction]="props['action']"
341
- [nzDirectory]="props['directory']!!"
342
- [nzBeforeUpload]="props['beforeUpload']"
343
- [nzCustomRequest]="props['customRequest']"
344
- [nzData]="props['data']"
345
- [nzDisabled]="props['disabled']!!"
346
- [(nzFileList)]="props['fileList']"
347
- [nzLimit]="props['limit']"
348
- [nzSize]="props['size']"
349
- [nzFileType]="props['fileType']"
350
- [nzFilter]="props['filter']!"
351
- [nzHeaders]="props['headers']"
352
- [nzListType]="props['listType']!"
353
- [nzMultiple]="props['multiple']!!"
354
- [nzName]="props['name'] || ''"
355
- [nzShowUploadList]="props['showUploadList']"
356
- [nzShowButton]="props['showButton']!!"
357
- [nzWithCredentials]="props['withCredentials']!!"
358
- [nzOpenFileDialogOnClick]="props['openFileDialogOnClick']!!"
359
- [nzPreview]="props['preview']"
360
- [nzPreviewFile]="props['previewFile']"
361
- [nzPreviewIsImage]="props['previewIsImage']"
362
- [nzRemove]="props['remove']"
363
- (nzChange)="props.change && props.change(field, $event)"
364
- [nzDownload]="props['download']"
365
- [nzTransformFile]="props['transformFile']"
366
- [nzIconRender]="props['iconRender'] ?? null"
367
- [nzFileListRender]="props['fileListRender'] ?? null"
368
- [resultMap]="props['resultMap']"
369
- [nzeHint]="props['hint']"
370
- [nzeText]="props['text']"
371
- [nzeUploadButtonIcon]="props['uploadButtonIcon']"
372
- [nzeShowUploadButton]="props['showUploadButton']"
373
- [className]="props['className'] || ''"
374
- (nzFileListChange)="props['fileListChange'] && props['fileListChange'](field, $event)"
375
- >
376
- </formly-nz-upload>`,
377
- changeDetection: ChangeDetectionStrategy.OnPush
378
- }]
379
- }], propDecorators: { upload: [{
380
- type: ViewChild,
381
- args: ['upload', { static: true }]
262
+ class FormlyFieldUpload extends FieldType {
263
+ constructor() {
264
+ super(...arguments);
265
+ this.defaultOptions = {
266
+ props: {
267
+ listType: 'text',
268
+ name: 'file',
269
+ showUploadList: true,
270
+ showButton: true,
271
+ openFileDialogOnClick: true,
272
+ showUploadButton: true,
273
+ limit: 0,
274
+ size: 0,
275
+ fileList: [],
276
+ filter: [],
277
+ text: ''
278
+ }
279
+ };
280
+ }
281
+ ngOnInit() {
282
+ const type = this.props.type;
283
+ if (type) {
284
+ this.upload.nzType = type;
285
+ }
286
+ }
287
+ }
288
+ FormlyFieldUpload.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldUpload, deps: null, target: i0.ɵɵFactoryTarget.Component });
289
+ FormlyFieldUpload.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: FormlyFieldUpload, selector: "formly-field-upload", viewQueries: [{ propertyName: "upload", first: true, predicate: ["upload"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `<formly-nz-upload
290
+ #upload
291
+ [formControl]="formControl"
292
+ [formlyAttributes]="field"
293
+ [nzAccept]="props['accept']"
294
+ [nzAction]="props['action']"
295
+ [nzDirectory]="props['directory']!!"
296
+ [nzBeforeUpload]="props['beforeUpload']"
297
+ [nzCustomRequest]="props['customRequest']"
298
+ [nzData]="props['data']"
299
+ [nzDisabled]="props['disabled']!!"
300
+ [(nzFileList)]="props['fileList']"
301
+ [nzLimit]="props['limit']"
302
+ [nzSize]="props['size']"
303
+ [nzFileType]="props['fileType']"
304
+ [nzFilter]="props['filter']!"
305
+ [nzHeaders]="props['headers']"
306
+ [nzListType]="props['listType']!"
307
+ [nzMultiple]="props['multiple']!!"
308
+ [nzName]="props['name'] || ''"
309
+ [nzShowUploadList]="props['showUploadList']"
310
+ [nzShowButton]="props['showButton']!!"
311
+ [nzWithCredentials]="props['withCredentials']!!"
312
+ [nzOpenFileDialogOnClick]="props['openFileDialogOnClick']!!"
313
+ [nzPreview]="props['preview']"
314
+ [nzPreviewFile]="props['previewFile']"
315
+ [nzPreviewIsImage]="props['previewIsImage']"
316
+ [nzRemove]="props['remove']"
317
+ (nzChange)="props.change && props.change(field, $event)"
318
+ [nzDownload]="props['download']"
319
+ [nzTransformFile]="props['transformFile']"
320
+ [nzIconRender]="props['iconRender'] ?? null"
321
+ [nzFileListRender]="props['fileListRender'] ?? null"
322
+ [resultMap]="props['resultMap']"
323
+ [nzeHint]="props['hint']"
324
+ [nzeText]="props['text']"
325
+ [nzeUploadButtonIcon]="props['uploadButtonIcon']"
326
+ [nzeShowUploadButton]="props['showUploadButton']"
327
+ [className]="props['className'] || ''"
328
+ (nzFileListChange)="props['fileListChange'] && props['fileListChange'](field, $event)"
329
+ >
330
+ </formly-nz-upload>`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type: UploadNzComponent, selector: "formly-nz-upload", inputs: ["nzeText", "nzeHint", "nzeShowUploadButton", "nzeUploadButton", "nzeUploadButtonIcon", "className", "resultMap"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
331
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldUpload, decorators: [{
332
+ type: Component,
333
+ args: [{
334
+ selector: 'formly-field-upload',
335
+ template: `<formly-nz-upload
336
+ #upload
337
+ [formControl]="formControl"
338
+ [formlyAttributes]="field"
339
+ [nzAccept]="props['accept']"
340
+ [nzAction]="props['action']"
341
+ [nzDirectory]="props['directory']!!"
342
+ [nzBeforeUpload]="props['beforeUpload']"
343
+ [nzCustomRequest]="props['customRequest']"
344
+ [nzData]="props['data']"
345
+ [nzDisabled]="props['disabled']!!"
346
+ [(nzFileList)]="props['fileList']"
347
+ [nzLimit]="props['limit']"
348
+ [nzSize]="props['size']"
349
+ [nzFileType]="props['fileType']"
350
+ [nzFilter]="props['filter']!"
351
+ [nzHeaders]="props['headers']"
352
+ [nzListType]="props['listType']!"
353
+ [nzMultiple]="props['multiple']!!"
354
+ [nzName]="props['name'] || ''"
355
+ [nzShowUploadList]="props['showUploadList']"
356
+ [nzShowButton]="props['showButton']!!"
357
+ [nzWithCredentials]="props['withCredentials']!!"
358
+ [nzOpenFileDialogOnClick]="props['openFileDialogOnClick']!!"
359
+ [nzPreview]="props['preview']"
360
+ [nzPreviewFile]="props['previewFile']"
361
+ [nzPreviewIsImage]="props['previewIsImage']"
362
+ [nzRemove]="props['remove']"
363
+ (nzChange)="props.change && props.change(field, $event)"
364
+ [nzDownload]="props['download']"
365
+ [nzTransformFile]="props['transformFile']"
366
+ [nzIconRender]="props['iconRender'] ?? null"
367
+ [nzFileListRender]="props['fileListRender'] ?? null"
368
+ [resultMap]="props['resultMap']"
369
+ [nzeHint]="props['hint']"
370
+ [nzeText]="props['text']"
371
+ [nzeUploadButtonIcon]="props['uploadButtonIcon']"
372
+ [nzeShowUploadButton]="props['showUploadButton']"
373
+ [className]="props['className'] || ''"
374
+ (nzFileListChange)="props['fileListChange'] && props['fileListChange'](field, $event)"
375
+ >
376
+ </formly-nz-upload>`,
377
+ changeDetection: ChangeDetectionStrategy.OnPush
378
+ }]
379
+ }], propDecorators: { upload: [{
380
+ type: ViewChild,
381
+ args: ['upload', { static: true }]
382
382
  }] } });
383
383
 
384
- class FormlyNzUploadModule {
385
- }
386
- FormlyNzUploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
387
- FormlyNzUploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, declarations: [FormlyFieldUpload, UploadNzComponent], imports: [CommonModule,
388
- ReactiveFormsModule,
389
- FormlyNzFormFieldModule,
390
- NzUploadModule,
391
- NzButtonModule,
392
- NzIconModule, i2$1.FormlyModule] });
393
- FormlyNzUploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, imports: [CommonModule,
394
- ReactiveFormsModule,
395
- FormlyNzFormFieldModule,
396
- NzUploadModule,
397
- NzButtonModule,
398
- NzIconModule,
399
- FormlyModule.forChild({
400
- types: [
401
- {
402
- name: 'upload',
403
- component: FormlyFieldUpload,
404
- wrappers: ['form-field']
405
- }
406
- ]
407
- })] });
408
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, decorators: [{
409
- type: NgModule,
410
- args: [{
411
- declarations: [FormlyFieldUpload, UploadNzComponent],
412
- imports: [
413
- CommonModule,
414
- ReactiveFormsModule,
415
- FormlyNzFormFieldModule,
416
- NzUploadModule,
417
- NzButtonModule,
418
- NzIconModule,
419
- FormlyModule.forChild({
420
- types: [
421
- {
422
- name: 'upload',
423
- component: FormlyFieldUpload,
424
- wrappers: ['form-field']
425
- }
426
- ]
427
- })
428
- ]
429
- }]
384
+ class FormlyNzUploadModule {
385
+ }
386
+ FormlyNzUploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
387
+ FormlyNzUploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, declarations: [FormlyFieldUpload, UploadNzComponent], imports: [CommonModule,
388
+ ReactiveFormsModule,
389
+ FormlyNzFormFieldModule,
390
+ NzUploadModule,
391
+ NzButtonModule,
392
+ NzIconModule, i2$1.FormlyModule] });
393
+ FormlyNzUploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, imports: [CommonModule,
394
+ ReactiveFormsModule,
395
+ FormlyNzFormFieldModule,
396
+ NzUploadModule,
397
+ NzButtonModule,
398
+ NzIconModule,
399
+ FormlyModule.forChild({
400
+ types: [
401
+ {
402
+ name: 'upload',
403
+ component: FormlyFieldUpload,
404
+ wrappers: ['form-field']
405
+ }
406
+ ]
407
+ })] });
408
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, decorators: [{
409
+ type: NgModule,
410
+ args: [{
411
+ declarations: [FormlyFieldUpload, UploadNzComponent],
412
+ imports: [
413
+ CommonModule,
414
+ ReactiveFormsModule,
415
+ FormlyNzFormFieldModule,
416
+ NzUploadModule,
417
+ NzButtonModule,
418
+ NzIconModule,
419
+ FormlyModule.forChild({
420
+ types: [
421
+ {
422
+ name: 'upload',
423
+ component: FormlyFieldUpload,
424
+ wrappers: ['form-field']
425
+ }
426
+ ]
427
+ })
428
+ ]
429
+ }]
430
430
  }] });
431
431
 
432
- /**
433
- * Generated bundle index. Do not edit.
432
+ /**
433
+ * Generated bundle index. Do not edit.
434
434
  */
435
435
 
436
436
  export { FormlyFieldUpload, FormlyNzUploadModule };