ngx-formly-zorro-antd 13.0.0 → 14.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (316) hide show
  1. package/README.md +1 -1
  2. package/autocomplete/autocomplete.props.d.ts +38 -38
  3. package/autocomplete/{ngx-formly-zorro-antd-autocomplete.d.ts → 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/{ngx-formly-zorro-antd-button.d.ts → 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/{ngx-formly-zorro-antd-card.d.ts → 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/{ngx-formly-zorro-antd-cascader.d.ts → 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/{ngx-formly-zorro-antd-checkbox.d.ts → 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 +144 -146
  23. package/datepicker/datepicker.type.d.ts +31 -31
  24. package/datepicker/{ngx-formly-zorro-antd-datepicker.d.ts → 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 -63
  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 -45
  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 -53
  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 -61
  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 -53
  46. package/esm2020/datepicker/datepicker.props.mjs +2 -2
  47. package/esm2020/datepicker/datepicker.type.mjs +191 -189
  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 -47
  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 -43
  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 -91
  62. package/esm2020/input/input.props.mjs +2 -2
  63. package/esm2020/input/input.type.mjs +309 -263
  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 -49
  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 -61
  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 -99
  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 -61
  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 -53
  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 -59
  90. package/esm2020/select/select.props.mjs +2 -2
  91. package/esm2020/select/select.type.mjs +163 -163
  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 -53
  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 -53
  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 -43
  103. package/esm2020/tabs/tabs.props.mjs +2 -2
  104. package/esm2020/tabs/tabs.wrapper.mjs +111 -111
  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 +51 -53
  108. package/esm2020/textarea/textarea.type.mjs +88 -88
  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 -53
  112. package/esm2020/timepicker/timepicker.type.mjs +92 -92
  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 -54
  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 -53
  121. package/esm2020/tree-select/tree-select.type.mjs +98 -98
  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 +174 -174
  125. package/esm2020/upload/upload.module.mjs +60 -62
  126. package/esm2020/upload/upload.type.mjs +119 -119
  127. package/fesm2015/ngx-formly-zorro-antd-autocomplete.mjs +2 -2
  128. package/fesm2015/ngx-formly-zorro-antd-button.mjs +156 -158
  129. package/fesm2015/ngx-formly-zorro-antd-button.mjs.map +1 -1
  130. package/fesm2015/ngx-formly-zorro-antd-card.mjs +77 -79
  131. package/fesm2015/ngx-formly-zorro-antd-card.mjs.map +1 -1
  132. package/fesm2015/ngx-formly-zorro-antd-cascader.mjs +148 -150
  133. package/fesm2015/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
  134. package/fesm2015/ngx-formly-zorro-antd-checkbox.mjs +113 -115
  135. package/fesm2015/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
  136. package/fesm2015/ngx-formly-zorro-antd-datepicker.mjs +227 -227
  137. package/fesm2015/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
  138. package/fesm2015/ngx-formly-zorro-antd-form-field.mjs +159 -161
  139. package/fesm2015/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
  140. package/fesm2015/ngx-formly-zorro-antd-grid.mjs +99 -101
  141. package/fesm2015/ngx-formly-zorro-antd-grid.mjs.map +1 -1
  142. package/fesm2015/ngx-formly-zorro-antd-input-group.mjs +105 -107
  143. package/fesm2015/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
  144. package/fesm2015/ngx-formly-zorro-antd-input-number.mjs +172 -174
  145. package/fesm2015/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
  146. package/fesm2015/ngx-formly-zorro-antd-input.mjs +382 -338
  147. package/fesm2015/ngx-formly-zorro-antd-input.mjs.map +1 -1
  148. package/fesm2015/ngx-formly-zorro-antd-radio.mjs +137 -139
  149. package/fesm2015/ngx-formly-zorro-antd-radio.mjs.map +1 -1
  150. package/fesm2015/ngx-formly-zorro-antd-rate.mjs +99 -101
  151. package/fesm2015/ngx-formly-zorro-antd-rate.mjs.map +1 -1
  152. package/fesm2015/ngx-formly-zorro-antd-select.mjs +202 -204
  153. package/fesm2015/ngx-formly-zorro-antd-select.mjs.map +1 -1
  154. package/fesm2015/ngx-formly-zorro-antd-slider.mjs +103 -105
  155. package/fesm2015/ngx-formly-zorro-antd-slider.mjs.map +1 -1
  156. package/fesm2015/ngx-formly-zorro-antd-switch.mjs +89 -91
  157. package/fesm2015/ngx-formly-zorro-antd-switch.mjs.map +1 -1
  158. package/fesm2015/ngx-formly-zorro-antd-tabs.mjs +140 -142
  159. package/fesm2015/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
  160. package/fesm2015/ngx-formly-zorro-antd-textarea.mjs +124 -126
  161. package/fesm2015/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
  162. package/fesm2015/ngx-formly-zorro-antd-timepicker.mjs +128 -130
  163. package/fesm2015/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
  164. package/fesm2015/ngx-formly-zorro-antd-transfer.mjs +243 -245
  165. package/fesm2015/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
  166. package/fesm2015/ngx-formly-zorro-antd-tree-select.mjs +134 -136
  167. package/fesm2015/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
  168. package/fesm2015/ngx-formly-zorro-antd-upload.mjs +328 -330
  169. package/fesm2015/ngx-formly-zorro-antd-upload.mjs.map +1 -1
  170. package/fesm2015/ngx-formly-zorro-antd.mjs +74 -76
  171. package/fesm2015/ngx-formly-zorro-antd.mjs.map +1 -1
  172. package/fesm2020/ngx-formly-zorro-antd-autocomplete.mjs +2 -2
  173. package/fesm2020/ngx-formly-zorro-antd-button.mjs +156 -158
  174. package/fesm2020/ngx-formly-zorro-antd-button.mjs.map +1 -1
  175. package/fesm2020/ngx-formly-zorro-antd-card.mjs +77 -79
  176. package/fesm2020/ngx-formly-zorro-antd-card.mjs.map +1 -1
  177. package/fesm2020/ngx-formly-zorro-antd-cascader.mjs +148 -150
  178. package/fesm2020/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
  179. package/fesm2020/ngx-formly-zorro-antd-checkbox.mjs +113 -115
  180. package/fesm2020/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
  181. package/fesm2020/ngx-formly-zorro-antd-datepicker.mjs +227 -227
  182. package/fesm2020/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
  183. package/fesm2020/ngx-formly-zorro-antd-form-field.mjs +159 -161
  184. package/fesm2020/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
  185. package/fesm2020/ngx-formly-zorro-antd-grid.mjs +99 -101
  186. package/fesm2020/ngx-formly-zorro-antd-grid.mjs.map +1 -1
  187. package/fesm2020/ngx-formly-zorro-antd-input-group.mjs +105 -107
  188. package/fesm2020/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
  189. package/fesm2020/ngx-formly-zorro-antd-input-number.mjs +172 -174
  190. package/fesm2020/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
  191. package/fesm2020/ngx-formly-zorro-antd-input.mjs +382 -338
  192. package/fesm2020/ngx-formly-zorro-antd-input.mjs.map +1 -1
  193. package/fesm2020/ngx-formly-zorro-antd-radio.mjs +137 -139
  194. package/fesm2020/ngx-formly-zorro-antd-radio.mjs.map +1 -1
  195. package/fesm2020/ngx-formly-zorro-antd-rate.mjs +99 -101
  196. package/fesm2020/ngx-formly-zorro-antd-rate.mjs.map +1 -1
  197. package/fesm2020/ngx-formly-zorro-antd-select.mjs +202 -204
  198. package/fesm2020/ngx-formly-zorro-antd-select.mjs.map +1 -1
  199. package/fesm2020/ngx-formly-zorro-antd-slider.mjs +103 -105
  200. package/fesm2020/ngx-formly-zorro-antd-slider.mjs.map +1 -1
  201. package/fesm2020/ngx-formly-zorro-antd-switch.mjs +89 -91
  202. package/fesm2020/ngx-formly-zorro-antd-switch.mjs.map +1 -1
  203. package/fesm2020/ngx-formly-zorro-antd-tabs.mjs +140 -142
  204. package/fesm2020/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
  205. package/fesm2020/ngx-formly-zorro-antd-textarea.mjs +124 -126
  206. package/fesm2020/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
  207. package/fesm2020/ngx-formly-zorro-antd-timepicker.mjs +128 -130
  208. package/fesm2020/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
  209. package/fesm2020/ngx-formly-zorro-antd-transfer.mjs +243 -245
  210. package/fesm2020/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
  211. package/fesm2020/ngx-formly-zorro-antd-tree-select.mjs +134 -136
  212. package/fesm2020/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
  213. package/fesm2020/ngx-formly-zorro-antd-upload.mjs +327 -329
  214. package/fesm2020/ngx-formly-zorro-antd-upload.mjs.map +1 -1
  215. package/fesm2020/ngx-formly-zorro-antd.mjs +74 -76
  216. package/fesm2020/ngx-formly-zorro-antd.mjs.map +1 -1
  217. package/form-field/form-field.module.d.ts +11 -11
  218. package/form-field/form-field.props.d.ts +105 -105
  219. package/form-field/form-field.wrapper.d.ts +9 -9
  220. package/form-field/{ngx-formly-zorro-antd-form-field.d.ts → index.d.ts} +5 -5
  221. package/form-field/public_api.d.ts +3 -3
  222. package/grid/grid.module.d.ts +10 -10
  223. package/grid/grid.props.d.ts +44 -44
  224. package/grid/grid.type.d.ts +11 -11
  225. package/grid/{ngx-formly-zorro-antd-grid.d.ts → index.d.ts} +5 -5
  226. package/grid/public_api.d.ts +3 -3
  227. package/index.d.ts +1 -1
  228. package/input/{ngx-formly-zorro-antd-input.d.ts → index.d.ts} +5 -5
  229. package/input/input.module.d.ts +14 -14
  230. package/input/input.props.d.ts +36 -33
  231. package/input/input.type.d.ts +26 -26
  232. package/input/public_api.d.ts +2 -2
  233. package/input-group/{ngx-formly-zorro-antd-input-group.d.ts → index.d.ts} +5 -5
  234. package/input-group/input-group.module.d.ts +11 -11
  235. package/input-group/input-group.props.d.ts +56 -56
  236. package/input-group/input-group.type.d.ts +22 -22
  237. package/input-group/public_api.d.ts +3 -3
  238. package/input-number/{ngx-formly-zorro-antd-input-number.d.ts → index.d.ts} +5 -5
  239. package/input-number/input-number.module.d.ts +12 -12
  240. package/input-number/input-number.props.d.ts +81 -78
  241. package/input-number/input-number.type.d.ts +24 -24
  242. package/input-number/public_api.d.ts +2 -2
  243. package/lib/ui-ng-zorro-antd.d.ts +1 -1
  244. package/lib/ui-ng-zorro-antd.module.d.ts +27 -27
  245. package/package.json +34 -30
  246. package/radio/{ngx-formly-zorro-antd-radio.d.ts → index.d.ts} +5 -5
  247. package/radio/public_api.d.ts +2 -2
  248. package/radio/radio.module.d.ts +14 -14
  249. package/radio/radio.type.d.ts +38 -38
  250. package/rate/{ngx-formly-zorro-antd-rate.d.ts → index.d.ts} +5 -5
  251. package/rate/public_api.d.ts +2 -2
  252. package/rate/rate.module.d.ts +12 -12
  253. package/rate/rate.type.d.ts +57 -57
  254. package/select/{ngx-formly-zorro-antd-select.d.ts → index.d.ts} +5 -5
  255. package/select/public_api.d.ts +2 -2
  256. package/select/select.module.d.ts +13 -13
  257. package/select/select.props.d.ts +162 -162
  258. package/select/select.type.d.ts +35 -35
  259. package/slider/{ngx-formly-zorro-antd-slider.d.ts → index.d.ts} +5 -5
  260. package/slider/public_api.d.ts +2 -2
  261. package/slider/slider.module.d.ts +12 -12
  262. package/slider/slider.type.d.ts +76 -76
  263. package/switch/{ngx-formly-zorro-antd-switch.d.ts → index.d.ts} +5 -5
  264. package/switch/public_api.d.ts +2 -2
  265. package/switch/switch.module.d.ts +12 -12
  266. package/switch/switch.type.d.ts +44 -44
  267. package/tabs/{ngx-formly-zorro-antd-tabs.d.ts → index.d.ts} +5 -5
  268. package/tabs/public_api.d.ts +2 -2
  269. package/tabs/tabs.module.d.ts +10 -10
  270. package/tabs/tabs.props.d.ts +126 -126
  271. package/tabs/tabs.wrapper.d.ts +28 -28
  272. package/textarea/{ngx-formly-zorro-antd-textarea.d.ts → index.d.ts} +5 -5
  273. package/textarea/public_api.d.ts +2 -2
  274. package/textarea/textarea.module.d.ts +12 -12
  275. package/textarea/textarea.type.d.ts +38 -38
  276. package/timepicker/{ngx-formly-zorro-antd-timepicker.d.ts → index.d.ts} +5 -5
  277. package/timepicker/public_api.d.ts +2 -2
  278. package/timepicker/timepicker.module.d.ts +12 -12
  279. package/timepicker/timepicker.type.d.ts +131 -131
  280. package/transfer/{ngx-formly-zorro-antd-transfer.d.ts → index.d.ts} +5 -5
  281. package/transfer/public_api.d.ts +2 -2
  282. package/transfer/transfer.component.d.ts +26 -26
  283. package/transfer/transfer.module.d.ts +13 -13
  284. package/transfer/transfer.type.d.ts +118 -118
  285. package/tree-select/{ngx-formly-zorro-antd-tree-select.d.ts → index.d.ts} +5 -5
  286. package/tree-select/public_api.d.ts +2 -2
  287. package/tree-select/tree-select.module.d.ts +12 -12
  288. package/tree-select/tree-select.type.d.ts +158 -158
  289. package/upload/{ngx-formly-zorro-antd-upload.d.ts → index.d.ts} +5 -5
  290. package/upload/public_api.d.ts +2 -2
  291. package/upload/upload.component.d.ts +27 -27
  292. package/upload/upload.module.d.ts +15 -15
  293. package/upload/upload.type.d.ts +173 -173
  294. package/autocomplete/package.json +0 -10
  295. package/button/package.json +0 -10
  296. package/card/package.json +0 -10
  297. package/cascader/package.json +0 -10
  298. package/checkbox/package.json +0 -10
  299. package/datepicker/package.json +0 -10
  300. package/form-field/package.json +0 -10
  301. package/grid/package.json +0 -10
  302. package/input/package.json +0 -10
  303. package/input-group/package.json +0 -10
  304. package/input-number/package.json +0 -10
  305. package/ngx-formly-zorro-antd.d.ts +0 -5
  306. package/radio/package.json +0 -10
  307. package/rate/package.json +0 -10
  308. package/select/package.json +0 -10
  309. package/slider/package.json +0 -10
  310. package/switch/package.json +0 -10
  311. package/tabs/package.json +0 -10
  312. package/textarea/package.json +0 -10
  313. package/timepicker/package.json +0 -10
  314. package/transfer/package.json +0 -10
  315. package/tree-select/package.json +0 -10
  316. package/upload/package.json +0 -10
@@ -1,121 +1,119 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
3
  import { CommonModule } from '@angular/common';
4
- import * as i2 from '@angular/forms';
4
+ import * as i1 from '@angular/forms';
5
5
  import { ReactiveFormsModule } from '@angular/forms';
6
6
  import * as i3 from '@ngx-formly/core';
7
7
  import { FieldType, FormlyModule } from '@ngx-formly/core';
8
8
  import { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';
9
- import * as i1 from 'ng-zorro-antd/slider';
9
+ import * as i2 from 'ng-zorro-antd/slider';
10
10
  import { NzSliderModule } from 'ng-zorro-antd/slider';
11
11
 
12
- class FormlyFieldSlider extends FieldType {
13
- constructor() {
14
- super(...arguments);
15
- this.defaultOptions = {
16
- props: {
17
- max: 100,
18
- min: 0,
19
- step: 1,
20
- dots: false,
21
- included: true,
22
- range: false,
23
- vertical: false,
24
- reverse: false,
25
- tooltipVisible: 'default'
26
- }
27
- };
28
- }
29
- }
30
- FormlyFieldSlider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldSlider, deps: null, target: i0.ɵɵFactoryTarget.Component });
31
- FormlyFieldSlider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FormlyFieldSlider, selector: "formly-field-slider", usesInheritance: true, ngImport: i0, template: `<nz-slider
32
- #slider
33
- [formControl]="formControl"
34
- [formlyAttributes]="field"
35
- [nzDots]="props['dots']!!"
36
- [nzIncluded]="props['included']!!"
37
- [nzMax]="props.max"
38
- [nzMin]="props.min"
39
- [nzRange]="props['range']!!"
40
- [nzStep]="props.step"
41
- [nzTipFormatter]="props['tipFormatter']"
42
- [nzVertical]="props['vertical']!!"
43
- [nzReverse]="props['reverse']!!"
44
- [nzTooltipVisible]="props['tooltipVisible']!"
45
- (ngModelChange)="props.change && props.change(field, $event)"
46
- (nzOnAfterChange)="props['afterChange'] && props['afterChange'](field, $event)"
47
- ></nz-slider>`, isInline: true, components: [{ type: i1.NzSliderComponent, selector: "nz-slider", inputs: ["nzDisabled", "nzDots", "nzIncluded", "nzRange", "nzVertical", "nzReverse", "nzDefaultValue", "nzMarks", "nzMax", "nzMin", "nzStep", "nzTooltipVisible", "nzTooltipPlacement", "nzTipFormatter"], outputs: ["nzOnAfterChange"], exportAs: ["nzSlider"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldSlider, decorators: [{
49
- type: Component,
50
- args: [{
51
- selector: 'formly-field-slider',
52
- template: `<nz-slider
53
- #slider
54
- [formControl]="formControl"
55
- [formlyAttributes]="field"
56
- [nzDots]="props['dots']!!"
57
- [nzIncluded]="props['included']!!"
58
- [nzMax]="props.max"
59
- [nzMin]="props.min"
60
- [nzRange]="props['range']!!"
61
- [nzStep]="props.step"
62
- [nzTipFormatter]="props['tipFormatter']"
63
- [nzVertical]="props['vertical']!!"
64
- [nzReverse]="props['reverse']!!"
65
- [nzTooltipVisible]="props['tooltipVisible']!"
66
- (ngModelChange)="props.change && props.change(field, $event)"
67
- (nzOnAfterChange)="props['afterChange'] && props['afterChange'](field, $event)"
68
- ></nz-slider>`,
69
- changeDetection: ChangeDetectionStrategy.OnPush
70
- }]
12
+ class FormlyFieldSlider extends FieldType {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.defaultOptions = {
16
+ props: {
17
+ max: 100,
18
+ min: 0,
19
+ step: 1,
20
+ dots: false,
21
+ included: true,
22
+ range: false,
23
+ vertical: false,
24
+ reverse: false,
25
+ tooltipVisible: 'default'
26
+ }
27
+ };
28
+ }
29
+ }
30
+ FormlyFieldSlider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldSlider, deps: null, target: i0.ɵɵFactoryTarget.Component });
31
+ FormlyFieldSlider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: FormlyFieldSlider, selector: "formly-field-slider", usesInheritance: true, ngImport: i0, template: `<nz-slider
32
+ #slider
33
+ [formControl]="formControl"
34
+ [formlyAttributes]="field"
35
+ [nzDots]="props['dots']!!"
36
+ [nzIncluded]="props['included']!!"
37
+ [nzMax]="props.max"
38
+ [nzMin]="props.min"
39
+ [nzRange]="props['range']!!"
40
+ [nzStep]="props.step"
41
+ [nzTipFormatter]="props['tipFormatter']"
42
+ [nzVertical]="props['vertical']!!"
43
+ [nzReverse]="props['reverse']!!"
44
+ [nzTooltipVisible]="props['tooltipVisible']!"
45
+ (ngModelChange)="props.change && props.change(field, $event)"
46
+ (nzOnAfterChange)="props['afterChange'] && props['afterChange'](field, $event)"
47
+ ></nz-slider>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.NzSliderComponent, selector: "nz-slider", inputs: ["nzDisabled", "nzDots", "nzIncluded", "nzRange", "nzVertical", "nzReverse", "nzDefaultValue", "nzMarks", "nzMax", "nzMin", "nzStep", "nzTooltipVisible", "nzTooltipPlacement", "nzTipFormatter"], outputs: ["nzOnAfterChange"], exportAs: ["nzSlider"] }, { kind: "directive", type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldSlider, decorators: [{
49
+ type: Component,
50
+ args: [{
51
+ selector: 'formly-field-slider',
52
+ template: `<nz-slider
53
+ #slider
54
+ [formControl]="formControl"
55
+ [formlyAttributes]="field"
56
+ [nzDots]="props['dots']!!"
57
+ [nzIncluded]="props['included']!!"
58
+ [nzMax]="props.max"
59
+ [nzMin]="props.min"
60
+ [nzRange]="props['range']!!"
61
+ [nzStep]="props.step"
62
+ [nzTipFormatter]="props['tipFormatter']"
63
+ [nzVertical]="props['vertical']!!"
64
+ [nzReverse]="props['reverse']!!"
65
+ [nzTooltipVisible]="props['tooltipVisible']!"
66
+ (ngModelChange)="props.change && props.change(field, $event)"
67
+ (nzOnAfterChange)="props['afterChange'] && props['afterChange'](field, $event)"
68
+ ></nz-slider>`,
69
+ changeDetection: ChangeDetectionStrategy.OnPush
70
+ }]
71
71
  }] });
72
72
 
73
- class FormlyNzSliderModule {
74
- }
75
- FormlyNzSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyNzSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
76
- FormlyNzSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyNzSliderModule, declarations: [FormlyFieldSlider], imports: [CommonModule,
77
- ReactiveFormsModule,
78
- FormlyNzFormFieldModule,
79
- NzSliderModule, i3.FormlyModule] });
80
- FormlyNzSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyNzSliderModule, imports: [[
81
- CommonModule,
82
- ReactiveFormsModule,
83
- FormlyNzFormFieldModule,
84
- NzSliderModule,
85
- FormlyModule.forChild({
86
- types: [
87
- {
88
- name: 'slider',
89
- component: FormlyFieldSlider,
90
- wrappers: ['form-field']
91
- }
92
- ]
93
- })
94
- ]] });
95
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyNzSliderModule, decorators: [{
96
- type: NgModule,
97
- args: [{
98
- declarations: [FormlyFieldSlider],
99
- imports: [
100
- CommonModule,
101
- ReactiveFormsModule,
102
- FormlyNzFormFieldModule,
103
- NzSliderModule,
104
- FormlyModule.forChild({
105
- types: [
106
- {
107
- name: 'slider',
108
- component: FormlyFieldSlider,
109
- wrappers: ['form-field']
110
- }
111
- ]
112
- })
113
- ]
114
- }]
73
+ class FormlyNzSliderModule {
74
+ }
75
+ FormlyNzSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
76
+ FormlyNzSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSliderModule, declarations: [FormlyFieldSlider], imports: [CommonModule,
77
+ ReactiveFormsModule,
78
+ FormlyNzFormFieldModule,
79
+ NzSliderModule, i3.FormlyModule] });
80
+ FormlyNzSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSliderModule, imports: [CommonModule,
81
+ ReactiveFormsModule,
82
+ FormlyNzFormFieldModule,
83
+ NzSliderModule,
84
+ FormlyModule.forChild({
85
+ types: [
86
+ {
87
+ name: 'slider',
88
+ component: FormlyFieldSlider,
89
+ wrappers: ['form-field']
90
+ }
91
+ ]
92
+ })] });
93
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSliderModule, decorators: [{
94
+ type: NgModule,
95
+ args: [{
96
+ declarations: [FormlyFieldSlider],
97
+ imports: [
98
+ CommonModule,
99
+ ReactiveFormsModule,
100
+ FormlyNzFormFieldModule,
101
+ NzSliderModule,
102
+ FormlyModule.forChild({
103
+ types: [
104
+ {
105
+ name: 'slider',
106
+ component: FormlyFieldSlider,
107
+ wrappers: ['form-field']
108
+ }
109
+ ]
110
+ })
111
+ ]
112
+ }]
115
113
  }] });
116
114
 
117
- /**
118
- * Generated bundle index. Do not edit.
115
+ /**
116
+ * Generated bundle index. Do not edit.
119
117
  */
120
118
 
121
119
  export { FormlyFieldSlider, FormlyNzSliderModule };
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-zorro-antd-slider.mjs","sources":["../../../../packages/formlyantd/slider/src/slider.type.ts","../../../../packages/formlyantd/slider/src/slider.module.ts","../../../../packages/formlyantd/slider/src/ngx-formly-zorro-antd-slider.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\r\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\r\nimport type { NzSliderShowTooltip } from 'ng-zorro-antd/slider';\r\n\r\ninterface SlideProps extends FormlyFieldProps {\r\n /**\r\n * 是否只能拖拽到刻度上\r\n * @default false\r\n */\r\n dots?: boolean;\r\n\r\n /**\r\n * marks 不为空对象时有效,值为 true 时表示值为包含关系,false 表示并列\r\n * @default true\r\n */\r\n included?: boolean;\r\n\r\n /**\r\n * 刻度标记,key 的类型必须为 number 且取值在闭区间 [min, max] 内,每个标签可以单独设置样式\r\n * @default\r\n * { number: string/HTML } or { number: { style: object, label: string/HTML } }\r\n */\r\n marks?: object;\r\n\r\n /**\r\n * 双滑块模式\r\n * @default false\r\n */\r\n range?: boolean;\r\n\r\n /**\r\n * Slider 会把当前值传给 nzTipFormatter,并在 Tooltip 中显示 nzTipFormatter 的返回值,若为 null,则隐藏 Tooltip。\r\n */\r\n tipFormatter?: (value: number) => string;\r\n\r\n /**\r\n * 值为 true 时,Slider 为垂直方向\r\n * @default false\r\n */\r\n vertical?: boolean;\r\n\r\n /**\r\n * 反向坐标轴\r\n * @default false\r\n */\r\n reverse?: boolean;\r\n\r\n /**\r\n * 值为 always 时总是显示,值为 never 时在任何情况下都不显示\r\n * @default default\r\n */\r\n tooltipVisible?: NzSliderShowTooltip;\r\n\r\n /**\r\n * 设置 Tooltip 的默认位置。\r\n */\r\n tooltipPlacement?: string;\r\n\r\n /**\r\n * 与 onmouseup 触发时机一致,把当前值作为参数传入。\r\n */\r\n afterChange?: (field: FormlyFieldConfig, value: number[] | number) => void;\r\n}\r\n\r\nexport interface FormlySlideFieldConfig extends FormlyFieldConfig<SlideProps> {\r\n type: 'slider' | Type<FormlyFieldSlider>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-slider',\r\n template: `<nz-slider\r\n #slider\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzDots]=\"props['dots']!!\"\r\n [nzIncluded]=\"props['included']!!\"\r\n [nzMax]=\"props.max\"\r\n [nzMin]=\"props.min\"\r\n [nzRange]=\"props['range']!!\"\r\n [nzStep]=\"props.step\"\r\n [nzTipFormatter]=\"props['tipFormatter']\"\r\n [nzVertical]=\"props['vertical']!!\"\r\n [nzReverse]=\"props['reverse']!!\"\r\n [nzTooltipVisible]=\"props['tooltipVisible']!\"\r\n (ngModelChange)=\"props.change && props.change(field, $event)\"\r\n (nzOnAfterChange)=\"props['afterChange'] && props['afterChange'](field, $event)\"\r\n ></nz-slider>`,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldSlider extends FieldType<FieldTypeConfig<SlideProps>> {\r\n override defaultOptions = {\r\n props: {\r\n max: 100,\r\n min: 0,\r\n step: 1,\r\n dots: false,\r\n included: true,\r\n range: false,\r\n vertical: false,\r\n reverse: false,\r\n tooltipVisible: 'default' as const\r\n }\r\n };\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\r\n\r\nimport { FormlyFieldSlider } from './slider.type';\r\nimport { NzSliderModule } from 'ng-zorro-antd/slider';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldSlider],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormlyNzFormFieldModule,\r\n NzSliderModule,\r\n\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'slider',\r\n component: FormlyFieldSlider,\r\n wrappers: ['form-field']\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzSliderModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_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YACP,YAAY;YACZ,mBAAmB;YACnB,uBAAuB;YACvB,cAAc;YAEd,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,SAAS,EAAE,iBAAiB;wBAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC;SACH,CAAA,EAAA,CAAA,CAAA;4FAEU,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;wBACvB,cAAc;wBAEd,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;iBACF,CAAA;;;AC3BD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-zorro-antd-slider.mjs","sources":["../../../../packages/formlyantd/slider/src/slider.type.ts","../../../../packages/formlyantd/slider/src/slider.module.ts","../../../../packages/formlyantd/slider/src/ngx-formly-zorro-antd-slider.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport type { NzSliderShowTooltip } from 'ng-zorro-antd/slider';\n\ninterface SlideProps extends FormlyFieldProps {\n /**\n * 是否只能拖拽到刻度上\n * @default false\n */\n dots?: boolean;\n\n /**\n * marks 不为空对象时有效,值为 true 时表示值为包含关系,false 表示并列\n * @default true\n */\n included?: boolean;\n\n /**\n * 刻度标记,key 的类型必须为 number 且取值在闭区间 [min, max] 内,每个标签可以单独设置样式\n * @default\n * { number: string/HTML } or { number: { style: object, label: string/HTML } }\n */\n marks?: object;\n\n /**\n * 双滑块模式\n * @default false\n */\n range?: boolean;\n\n /**\n * Slider 会把当前值传给 nzTipFormatter,并在 Tooltip 中显示 nzTipFormatter 的返回值,若为 null,则隐藏 Tooltip。\n */\n tipFormatter?: (value: number) => string;\n\n /**\n * 值为 true 时,Slider 为垂直方向\n * @default false\n */\n vertical?: boolean;\n\n /**\n * 反向坐标轴\n * @default false\n */\n reverse?: boolean;\n\n /**\n * 值为 always 时总是显示,值为 never 时在任何情况下都不显示\n * @default default\n */\n tooltipVisible?: NzSliderShowTooltip;\n\n /**\n * 设置 Tooltip 的默认位置。\n */\n tooltipPlacement?: string;\n\n /**\n * 与 onmouseup 触发时机一致,把当前值作为参数传入。\n */\n afterChange?: (field: FormlyFieldConfig, value: number[] | number) => void;\n}\n\nexport interface FormlySlideFieldConfig extends FormlyFieldConfig<SlideProps> {\n type: 'slider' | Type<FormlyFieldSlider>;\n}\n\n@Component({\n selector: 'formly-field-slider',\n template: `<nz-slider\n #slider\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzDots]=\"props['dots']!!\"\n [nzIncluded]=\"props['included']!!\"\n [nzMax]=\"props.max\"\n [nzMin]=\"props.min\"\n [nzRange]=\"props['range']!!\"\n [nzStep]=\"props.step\"\n [nzTipFormatter]=\"props['tipFormatter']\"\n [nzVertical]=\"props['vertical']!!\"\n [nzReverse]=\"props['reverse']!!\"\n [nzTooltipVisible]=\"props['tooltipVisible']!\"\n (ngModelChange)=\"props.change && props.change(field, $event)\"\n (nzOnAfterChange)=\"props['afterChange'] && props['afterChange'](field, $event)\"\n ></nz-slider>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSlider extends FieldType<FieldTypeConfig<SlideProps>> {\n override defaultOptions = {\n props: {\n max: 100,\n min: 0,\n step: 1,\n dots: false,\n included: true,\n range: false,\n vertical: false,\n reverse: false,\n tooltipVisible: 'default' as const\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { FormlyFieldSlider } from './slider.type';\nimport { NzSliderModule } from 'ng-zorro-antd/slider';\n\n@NgModule({\n declarations: [FormlyFieldSlider],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n NzSliderModule,\n\n FormlyModule.forChild({\n types: [\n {\n name: 'slider',\n component: FormlyFieldSlider,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AA0FM,MAAO,iBAAkB,SAAQ,SAAsC,CAAA;AArB7E,IAAA,WAAA,GAAA;;QAsBW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,GAAG,EAAE,GAAG;AACR,gBAAA,GAAG,EAAE,CAAC;AACN,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,IAAI,EAAE,KAAK;AACX,gBAAA,QAAQ,EAAE,IAAI;AACd,gBAAA,KAAK,EAAE,KAAK;AACZ,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,cAAc,EAAE,SAAkB;AACnC,aAAA;SACF,CAAC;KACH;;8GAdY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAA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iB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;AC3BD;;AAEG;;;;"}
@@ -3,105 +3,103 @@ import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
3
  import { CommonModule } from '@angular/common';
4
4
  import * as i3 from '@ngx-formly/core';
5
5
  import { FieldType, FormlyModule } from '@ngx-formly/core';
6
- import * as i2 from '@angular/forms';
6
+ import * as i1 from '@angular/forms';
7
7
  import { ReactiveFormsModule } from '@angular/forms';
8
8
  import { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';
9
- import * as i1 from 'ng-zorro-antd/switch';
9
+ import * as i2 from 'ng-zorro-antd/switch';
10
10
  import { NzSwitchModule } from 'ng-zorro-antd/switch';
11
11
 
12
- class FormlyFieldSwitch extends FieldType {
13
- constructor() {
14
- super(...arguments);
15
- this.defaultOptions = {
16
- props: {
17
- size: 'default',
18
- loading: false,
19
- control: false
20
- }
21
- };
22
- }
23
- }
24
- FormlyFieldSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldSwitch, deps: null, target: i0.ɵɵFactoryTarget.Component });
25
- FormlyFieldSwitch.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FormlyFieldSwitch, selector: "formly-field-switch", usesInheritance: true, ngImport: i0, template: `
26
- <nz-switch
27
- [formControl]="formControl"
28
- [formlyAttributes]="field"
29
- [nzId]="id"
30
- [nzCheckedChildren]="props['checkedChildren'] ?? null"
31
- [nzUnCheckedChildren]="props['unCheckedChildren'] ?? null"
32
- [nzSize]="props['size']!"
33
- [nzLoading]="props['loading']!!"
34
- [nzControl]="props['control']!!"
35
- (ngModelChange)="props.change && props.change(field, $event)"
36
- ></nz-switch>
37
- `, isInline: true, components: [{ type: i1.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldSwitch, decorators: [{
39
- type: Component,
40
- args: [{
41
- selector: 'formly-field-switch',
42
- template: `
43
- <nz-switch
44
- [formControl]="formControl"
45
- [formlyAttributes]="field"
46
- [nzId]="id"
47
- [nzCheckedChildren]="props['checkedChildren'] ?? null"
48
- [nzUnCheckedChildren]="props['unCheckedChildren'] ?? null"
49
- [nzSize]="props['size']!"
50
- [nzLoading]="props['loading']!!"
51
- [nzControl]="props['control']!!"
52
- (ngModelChange)="props.change && props.change(field, $event)"
53
- ></nz-switch>
54
- `,
55
- changeDetection: ChangeDetectionStrategy.OnPush
56
- }]
12
+ class FormlyFieldSwitch extends FieldType {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.defaultOptions = {
16
+ props: {
17
+ size: 'default',
18
+ loading: false,
19
+ control: false
20
+ }
21
+ };
22
+ }
23
+ }
24
+ FormlyFieldSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldSwitch, deps: null, target: i0.ɵɵFactoryTarget.Component });
25
+ FormlyFieldSwitch.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: FormlyFieldSwitch, selector: "formly-field-switch", usesInheritance: true, ngImport: i0, template: `
26
+ <nz-switch
27
+ [formControl]="formControl"
28
+ [formlyAttributes]="field"
29
+ [nzId]="id"
30
+ [nzCheckedChildren]="props['checkedChildren'] ?? null"
31
+ [nzUnCheckedChildren]="props['unCheckedChildren'] ?? null"
32
+ [nzSize]="props['size']!"
33
+ [nzLoading]="props['loading']!!"
34
+ [nzControl]="props['control']!!"
35
+ (ngModelChange)="props.change && props.change(field, $event)"
36
+ ></nz-switch>
37
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "directive", type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldSwitch, decorators: [{
39
+ type: Component,
40
+ args: [{
41
+ selector: 'formly-field-switch',
42
+ template: `
43
+ <nz-switch
44
+ [formControl]="formControl"
45
+ [formlyAttributes]="field"
46
+ [nzId]="id"
47
+ [nzCheckedChildren]="props['checkedChildren'] ?? null"
48
+ [nzUnCheckedChildren]="props['unCheckedChildren'] ?? null"
49
+ [nzSize]="props['size']!"
50
+ [nzLoading]="props['loading']!!"
51
+ [nzControl]="props['control']!!"
52
+ (ngModelChange)="props.change && props.change(field, $event)"
53
+ ></nz-switch>
54
+ `,
55
+ changeDetection: ChangeDetectionStrategy.OnPush
56
+ }]
57
57
  }] });
58
58
 
59
- class FormlyNzSwitchModule {
60
- }
61
- FormlyNzSwitchModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyNzSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
62
- FormlyNzSwitchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyNzSwitchModule, declarations: [FormlyFieldSwitch], imports: [CommonModule,
63
- ReactiveFormsModule,
64
- FormlyNzFormFieldModule,
65
- NzSwitchModule, i3.FormlyModule] });
66
- FormlyNzSwitchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyNzSwitchModule, imports: [[
67
- CommonModule,
68
- ReactiveFormsModule,
69
- FormlyNzFormFieldModule,
70
- NzSwitchModule,
71
- FormlyModule.forChild({
72
- types: [
73
- {
74
- name: 'switch',
75
- component: FormlyFieldSwitch,
76
- wrappers: ['form-field']
77
- }
78
- ]
79
- })
80
- ]] });
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyNzSwitchModule, decorators: [{
82
- type: NgModule,
83
- args: [{
84
- declarations: [FormlyFieldSwitch],
85
- imports: [
86
- CommonModule,
87
- ReactiveFormsModule,
88
- FormlyNzFormFieldModule,
89
- NzSwitchModule,
90
- FormlyModule.forChild({
91
- types: [
92
- {
93
- name: 'switch',
94
- component: FormlyFieldSwitch,
95
- wrappers: ['form-field']
96
- }
97
- ]
98
- })
99
- ]
100
- }]
59
+ class FormlyNzSwitchModule {
60
+ }
61
+ FormlyNzSwitchModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
62
+ FormlyNzSwitchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSwitchModule, declarations: [FormlyFieldSwitch], imports: [CommonModule,
63
+ ReactiveFormsModule,
64
+ FormlyNzFormFieldModule,
65
+ NzSwitchModule, i3.FormlyModule] });
66
+ FormlyNzSwitchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSwitchModule, imports: [CommonModule,
67
+ ReactiveFormsModule,
68
+ FormlyNzFormFieldModule,
69
+ NzSwitchModule,
70
+ FormlyModule.forChild({
71
+ types: [
72
+ {
73
+ name: 'switch',
74
+ component: FormlyFieldSwitch,
75
+ wrappers: ['form-field']
76
+ }
77
+ ]
78
+ })] });
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzSwitchModule, decorators: [{
80
+ type: NgModule,
81
+ args: [{
82
+ declarations: [FormlyFieldSwitch],
83
+ imports: [
84
+ CommonModule,
85
+ ReactiveFormsModule,
86
+ FormlyNzFormFieldModule,
87
+ NzSwitchModule,
88
+ FormlyModule.forChild({
89
+ types: [
90
+ {
91
+ name: 'switch',
92
+ component: FormlyFieldSwitch,
93
+ wrappers: ['form-field']
94
+ }
95
+ ]
96
+ })
97
+ ]
98
+ }]
101
99
  }] });
102
100
 
103
- /**
104
- * Generated bundle index. Do not edit.
101
+ /**
102
+ * Generated bundle index. Do not edit.
105
103
  */
106
104
 
107
105
  export { FormlyFieldSwitch, FormlyNzSwitchModule };
@@ -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, FormlyFieldConfig } from '@ngx-formly/core';\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 FormlyFieldConfig<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\n })\r\n ]\r\n})\r\nexport class FormlyNzSwitchModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AAwDM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AAjB9E,IAAA,WAAA,GAAA;;QAkBW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE,KAAK;AACf,aAAA;SACF,CAAC;KACH;;+GARY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,iBAAiB,EAflB,QAAA,EAAA,qBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;GAYT,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,qBAAA,EAAA,QAAA,EAAA,MAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA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,EAAE,QAAQ;AACd,wBAAA,SAAS,EAAE,iBAAiB;wBAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC;SACH,CAAA,EAAA,CAAA,CAAA;4FAEU,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;iBACF,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, FormlyFieldConfig } from '@ngx-formly/core';\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 FormlyFieldConfig<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":";;;;;;;;;;;AAwDM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AAjB9E,IAAA,WAAA,GAAA;;QAkBW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,OAAO,EAAE,KAAK;AAC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