@zat-design/sisyphus-react 3.11.14 → 3.12.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/dist/index.esm.css +26 -15
  2. package/dist/less.esm.css +26 -15
  3. package/es/ProAction/index.d.ts +2 -2
  4. package/es/ProAction/propsType.d.ts +16 -10
  5. package/es/ProConfigProvider/index.d.ts +7 -7
  6. package/es/ProDownload/index.d.ts +2 -2
  7. package/es/ProDownload/propsType.d.ts +2 -1
  8. package/es/ProDrawerForm/components/ProDrawer/index.d.ts +2 -2
  9. package/es/ProDrawerForm/components/ProDrawer/index.js +12 -2
  10. package/es/ProDrawerForm/components/ProModal/index.d.ts +2 -2
  11. package/es/ProDrawerForm/components/ProModal/index.js +12 -2
  12. package/es/ProDrawerForm/index.d.ts +1 -2
  13. package/es/ProDrawerForm/propsType.d.ts +38 -27
  14. package/es/ProDrawerForm/utils/index.d.ts +2 -2
  15. package/es/ProEditLabel/components/RenderProForm.d.ts +2 -2
  16. package/es/ProEditLabel/index.d.ts +2 -2
  17. package/es/ProEditLabel/propsType.d.ts +135 -8
  18. package/es/ProEditLabel/style/index.less +24 -25
  19. package/es/ProEditTable/components/Summary/index.d.ts +2 -2
  20. package/es/ProEditTable/index.d.ts +2 -2
  21. package/es/ProEditTable/index.js +18 -16
  22. package/es/ProEditTable/propsType.d.ts +243 -106
  23. package/es/ProEditTable/style/index.less +1 -0
  24. package/es/ProEditTable/utils/index.d.ts +1 -1
  25. package/es/ProEditTable/utils/index.js +6 -4
  26. package/es/ProEditTable/utils/tools.d.ts +57 -22
  27. package/es/ProEditTable/utils/tools.js +47 -21
  28. package/es/ProEnum/components/Group.d.ts +2 -2
  29. package/es/ProEnum/components/Tag.d.ts +2 -2
  30. package/es/ProEnum/hooks/useEnum.d.ts +2 -2
  31. package/es/ProEnum/hooks/useEnum.js +46 -17
  32. package/es/ProEnum/hooks/useEnumRequest.d.ts +2 -2
  33. package/es/ProEnum/index.d.ts +2 -2
  34. package/es/ProEnum/propsType.d.ts +231 -42
  35. package/es/ProEnum/propsType.js +0 -6
  36. package/es/ProEnum/utils/index.d.ts +9 -2
  37. package/es/ProEnum/utils/index.js +9 -2
  38. package/es/ProForm/components/FormFooter/index.d.ts +2 -2
  39. package/es/ProForm/components/FormFooter/propsType.d.ts +8 -3
  40. package/es/ProForm/components/base/Checkbox/index.d.ts +2 -2
  41. package/es/ProForm/components/base/Input/index.d.ts +2 -2
  42. package/es/ProForm/components/base/Input/index.js +17 -4
  43. package/es/ProForm/components/base/Input/propsType.d.ts +10 -6
  44. package/es/ProForm/components/base/InputNumber/index.d.ts +2 -2
  45. package/es/ProForm/components/base/Radio/index.d.ts +2 -2
  46. package/es/ProForm/components/base/RangePicker/index.d.ts +2 -2
  47. package/es/ProForm/components/base/Select/index.d.ts +2 -2
  48. package/es/ProForm/components/base/Switch/index.d.ts +2 -2
  49. package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +2 -2
  50. package/es/ProForm/components/base/TextArea/index.d.ts +2 -2
  51. package/es/ProForm/components/base/TimePicker/index.d.ts +2 -2
  52. package/es/ProForm/components/combination/Container/index.d.ts +2 -2
  53. package/es/ProForm/components/combination/Container/propsType.d.ts +10 -6
  54. package/es/ProForm/components/combination/FormList/components/ActionButton.d.ts +4 -4
  55. package/es/ProForm/components/combination/FormList/components/BlockFields.d.ts +4 -4
  56. package/es/ProForm/components/combination/FormList/components/LineFields.d.ts +4 -4
  57. package/es/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +2 -2
  58. package/es/ProForm/components/combination/FormList/index.d.ts +2 -2
  59. package/es/ProForm/components/combination/FormList/propsType.d.ts +18 -10
  60. package/es/ProForm/components/combination/Group/index.d.ts +2 -2
  61. package/es/ProForm/components/combination/Group/propsType.d.ts +10 -5
  62. package/es/ProForm/components/combination/Group/utils.d.ts +6 -6
  63. package/es/ProForm/components/combination/ProCascader/index.d.ts +2 -2
  64. package/es/ProForm/components/combination/ProCascader/propsType.d.ts +8 -3
  65. package/es/ProForm/components/combination/ProCombination/index.d.ts +3 -3
  66. package/es/ProForm/components/combination/ProCombination/propsType.d.ts +10 -5
  67. package/es/ProForm/components/combination/ProModalSelect/index.d.ts +2 -2
  68. package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +58 -5
  69. package/es/ProForm/components/combination/ProNumberRange/index.d.ts +2 -2
  70. package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +7 -3
  71. package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +15 -9
  72. package/es/ProForm/components/old/EnumSelect/index.d.ts +1 -1
  73. package/es/ProForm/components/old/EnumSelect/interface.d.ts +2 -2
  74. package/es/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
  75. package/es/ProForm/components/old/ProAddress/index.d.ts +1 -1
  76. package/es/ProForm/components/old/ProCertNo/index.d.ts +1 -1
  77. package/es/ProForm/components/old/ProCertValidity/index.d.ts +1 -1
  78. package/es/ProForm/components/old/ProRangeBox/index.d.ts +1 -1
  79. package/es/ProForm/components/render/ChangedWrapper.d.ts +2 -2
  80. package/es/ProForm/components/render/ConfirmWrapper.d.ts +2 -2
  81. package/es/ProForm/components/render/Render.d.ts +2 -2
  82. package/es/ProForm/components/render/RenderFields.d.ts +4 -4
  83. package/es/ProForm/components/render/propsType.d.ts +76 -69
  84. package/es/ProForm/index.d.ts +2 -2
  85. package/es/ProForm/index.js +3 -1
  86. package/es/ProForm/propsType.d.ts +26 -17
  87. package/es/ProForm/propsType.js +0 -1
  88. package/es/ProForm/utils/transformValue.d.ts +2 -2
  89. package/es/ProForm/utils/useFieldProps.d.ts +3 -3
  90. package/es/ProForm/utils/useForm.d.ts +2 -1
  91. package/es/ProForm/utils/useForm.js +3 -2
  92. package/es/ProForm/utils/useRules.d.ts +1 -1
  93. package/es/ProForm/utils/useShouldUpdate.d.ts +3 -3
  94. package/es/ProIcon/index.d.ts +2 -2
  95. package/es/ProIcon/propsTypes.d.ts +120 -49
  96. package/es/ProLayout/components/Layout/Header/index.d.ts +2 -2
  97. package/es/ProLayout/components/Layout/Menu/index.d.ts +2 -2
  98. package/es/ProLayout/components/Layout/Notice/index.d.ts +2 -2
  99. package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +9 -2
  100. package/es/ProLayout/components/ProCollapse/index.d.ts +2 -2
  101. package/es/ProLayout/components/ProCollapse/index.js +12 -4
  102. package/es/ProLayout/components/ProFooter/PropTypes.d.ts +18 -1
  103. package/es/ProLayout/components/ProFooter/index.d.ts +2 -2
  104. package/es/ProLayout/components/ProHeader/PropTypes.d.ts +121 -14
  105. package/es/ProLayout/components/ProHeader/index.d.ts +2 -2
  106. package/es/ProLayout/index.d.ts +5 -5
  107. package/es/ProLayout/index.js +6 -2
  108. package/es/ProLayout/propTypes.d.ts +182 -25
  109. package/es/ProLayout/utils/index.d.ts +2 -2
  110. package/es/ProSelect/index.d.ts +3 -3
  111. package/es/ProSelect/propsType.d.ts +141 -31
  112. package/es/ProStep/components/Anchor/index.d.ts +2 -1
  113. package/es/ProStep/components/Item/index.d.ts +2 -2
  114. package/es/ProStep/components/Item/index.js +6 -2
  115. package/es/ProStep/components/Listener/index.d.ts +4 -3
  116. package/es/ProStep/components/Listener/index.js +18 -4
  117. package/es/ProStep/components/Step/index.d.ts +2 -2
  118. package/es/ProStep/index.d.ts +7 -7
  119. package/es/ProStep/index.js +19 -4
  120. package/es/ProStep/propsType.d.ts +200 -12
  121. package/es/ProStep/utils/index.d.ts +17 -4
  122. package/es/ProStep/utils/index.js +11 -2
  123. package/es/ProTable/components/FormatColumn/index.d.ts +2 -2
  124. package/es/ProTable/components/FormatColumn/index.js +5 -8
  125. package/es/ProTable/components/RenderTabs/index.d.ts +4 -0
  126. package/es/ProTable/components/RenderTabs/index.js +78 -0
  127. package/es/ProTable/components/index.d.ts +25 -0
  128. package/es/ProTable/components/index.js +26 -1
  129. package/es/ProTable/hooks/useAntdTable.d.ts +2 -93
  130. package/es/ProTable/hooks/useAntdTable.js +6 -2
  131. package/es/ProTable/index.d.ts +2 -2
  132. package/es/ProTable/index.js +6 -3
  133. package/es/ProTable/propsType.d.ts +630 -39
  134. package/es/ProTable/style/index.less +3 -0
  135. package/es/ProTabs/index.d.ts +2 -2
  136. package/es/ProTabs/index.js +4 -4
  137. package/es/ProTabs/propType.d.ts +66 -9
  138. package/es/ProThemeTools/index.d.ts +2 -2
  139. package/es/ProThemeTools/propsType.d.ts +136 -14
  140. package/es/ProTooltip/index.d.ts +2 -2
  141. package/es/ProTooltip/propsType.d.ts +49 -9
  142. package/es/ProTree/components/List.d.ts +2 -2
  143. package/es/ProTree/components/List.js +2 -2
  144. package/es/ProTree/components/ProTree.d.ts +2 -2
  145. package/es/ProTree/components/ProTreeSelect/index.d.ts +3 -3
  146. package/es/ProTree/components/ProTreeSelect/propsType.d.ts +372 -34
  147. package/es/ProTree/components/SearchTitle.d.ts +2 -2
  148. package/es/ProTree/components/Tree.d.ts +3 -3
  149. package/es/ProTree/index.d.ts +2 -2
  150. package/es/ProTree/index.js +1 -1
  151. package/es/ProTree/propsType.d.ts +694 -103
  152. package/es/ProTree/utils.d.ts +7 -7
  153. package/es/ProTreeModal/components/Cascader.d.ts +3 -3
  154. package/es/ProTreeModal/components/List.d.ts +3 -3
  155. package/es/ProTreeModal/components/Tree.d.ts +2 -2
  156. package/es/ProTreeModal/index.d.ts +2 -2
  157. package/es/ProTreeModal/index.js +2 -2
  158. package/es/ProTreeModal/propsType.d.ts +258 -49
  159. package/es/ProTreeModal/utils.d.ts +7 -7
  160. package/es/ProUpload/components/ButtonRender.d.ts +2 -2
  161. package/es/ProUpload/components/DraggableUploadListItem.d.ts +2 -2
  162. package/es/ProUpload/components/Example.d.ts +2 -2
  163. package/es/ProUpload/components/ImageRender.d.ts +2 -2
  164. package/es/ProUpload/index.d.ts +2 -2
  165. package/es/ProUpload/index.js +7 -9
  166. package/es/ProUpload/propsType.d.ts +65 -8
  167. package/es/ProWaterMark/index.d.ts +2 -2
  168. package/es/ProWaterMark/propsType.d.ts +2 -1
  169. package/es/index.d.ts +15 -6
  170. package/es/index.js +1 -7
  171. package/lib/ProAction/index.d.ts +2 -2
  172. package/lib/ProAction/propsType.d.ts +16 -10
  173. package/lib/ProConfigProvider/index.d.ts +7 -7
  174. package/lib/ProDownload/index.d.ts +2 -2
  175. package/lib/ProDownload/propsType.d.ts +2 -1
  176. package/lib/ProDrawerForm/components/ProDrawer/index.d.ts +2 -2
  177. package/lib/ProDrawerForm/components/ProDrawer/index.js +12 -2
  178. package/lib/ProDrawerForm/components/ProModal/index.d.ts +2 -2
  179. package/lib/ProDrawerForm/components/ProModal/index.js +12 -2
  180. package/lib/ProDrawerForm/index.d.ts +1 -2
  181. package/lib/ProDrawerForm/propsType.d.ts +38 -27
  182. package/lib/ProDrawerForm/utils/index.d.ts +2 -2
  183. package/lib/ProEditLabel/components/RenderProForm.d.ts +2 -2
  184. package/lib/ProEditLabel/index.d.ts +2 -2
  185. package/lib/ProEditLabel/propsType.d.ts +135 -8
  186. package/lib/ProEditLabel/style/index.less +24 -25
  187. package/lib/ProEditTable/components/Summary/index.d.ts +2 -2
  188. package/lib/ProEditTable/index.d.ts +2 -2
  189. package/lib/ProEditTable/index.js +18 -16
  190. package/lib/ProEditTable/propsType.d.ts +243 -106
  191. package/lib/ProEditTable/style/index.less +1 -0
  192. package/lib/ProEditTable/utils/index.d.ts +1 -1
  193. package/lib/ProEditTable/utils/index.js +6 -4
  194. package/lib/ProEditTable/utils/tools.d.ts +57 -22
  195. package/lib/ProEditTable/utils/tools.js +47 -21
  196. package/lib/ProEnum/components/Group.d.ts +2 -2
  197. package/lib/ProEnum/components/Tag.d.ts +2 -2
  198. package/lib/ProEnum/hooks/useEnum.d.ts +2 -2
  199. package/lib/ProEnum/hooks/useEnum.js +48 -17
  200. package/lib/ProEnum/hooks/useEnumRequest.d.ts +2 -2
  201. package/lib/ProEnum/index.d.ts +2 -2
  202. package/lib/ProEnum/propsType.d.ts +231 -42
  203. package/lib/ProEnum/propsType.js +1 -7
  204. package/lib/ProEnum/utils/index.d.ts +9 -2
  205. package/lib/ProEnum/utils/index.js +9 -2
  206. package/lib/ProForm/components/FormFooter/index.d.ts +2 -2
  207. package/lib/ProForm/components/FormFooter/propsType.d.ts +8 -3
  208. package/lib/ProForm/components/base/Checkbox/index.d.ts +2 -2
  209. package/lib/ProForm/components/base/Input/index.d.ts +2 -2
  210. package/lib/ProForm/components/base/Input/index.js +17 -4
  211. package/lib/ProForm/components/base/Input/propsType.d.ts +10 -6
  212. package/lib/ProForm/components/base/InputNumber/index.d.ts +2 -2
  213. package/lib/ProForm/components/base/Radio/index.d.ts +2 -2
  214. package/lib/ProForm/components/base/RangePicker/index.d.ts +2 -2
  215. package/lib/ProForm/components/base/Select/index.d.ts +2 -2
  216. package/lib/ProForm/components/base/Switch/index.d.ts +2 -2
  217. package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +2 -2
  218. package/lib/ProForm/components/base/TextArea/index.d.ts +2 -2
  219. package/lib/ProForm/components/base/TimePicker/index.d.ts +2 -2
  220. package/lib/ProForm/components/combination/Container/index.d.ts +2 -2
  221. package/lib/ProForm/components/combination/Container/propsType.d.ts +10 -6
  222. package/lib/ProForm/components/combination/FormList/components/ActionButton.d.ts +4 -4
  223. package/lib/ProForm/components/combination/FormList/components/BlockFields.d.ts +4 -4
  224. package/lib/ProForm/components/combination/FormList/components/LineFields.d.ts +4 -4
  225. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +2 -2
  226. package/lib/ProForm/components/combination/FormList/index.d.ts +2 -2
  227. package/lib/ProForm/components/combination/FormList/propsType.d.ts +18 -10
  228. package/lib/ProForm/components/combination/Group/index.d.ts +2 -2
  229. package/lib/ProForm/components/combination/Group/propsType.d.ts +10 -5
  230. package/lib/ProForm/components/combination/Group/utils.d.ts +6 -6
  231. package/lib/ProForm/components/combination/ProCascader/index.d.ts +2 -2
  232. package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +8 -3
  233. package/lib/ProForm/components/combination/ProCombination/index.d.ts +3 -3
  234. package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +10 -5
  235. package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +2 -2
  236. package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +58 -5
  237. package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +2 -2
  238. package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +7 -3
  239. package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +15 -9
  240. package/lib/ProForm/components/old/EnumSelect/index.d.ts +1 -1
  241. package/lib/ProForm/components/old/EnumSelect/interface.d.ts +2 -2
  242. package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
  243. package/lib/ProForm/components/old/ProAddress/index.d.ts +1 -1
  244. package/lib/ProForm/components/old/ProCertNo/index.d.ts +1 -1
  245. package/lib/ProForm/components/old/ProCertValidity/index.d.ts +1 -1
  246. package/lib/ProForm/components/old/ProRangeBox/index.d.ts +1 -1
  247. package/lib/ProForm/components/render/ChangedWrapper.d.ts +2 -2
  248. package/lib/ProForm/components/render/ConfirmWrapper.d.ts +2 -2
  249. package/lib/ProForm/components/render/Render.d.ts +2 -2
  250. package/lib/ProForm/components/render/RenderFields.d.ts +4 -4
  251. package/lib/ProForm/components/render/propsType.d.ts +76 -69
  252. package/lib/ProForm/index.d.ts +2 -2
  253. package/lib/ProForm/index.js +3 -1
  254. package/lib/ProForm/propsType.d.ts +26 -17
  255. package/lib/ProForm/propsType.js +0 -15
  256. package/lib/ProForm/utils/transformValue.d.ts +2 -2
  257. package/lib/ProForm/utils/useFieldProps.d.ts +3 -3
  258. package/lib/ProForm/utils/useForm.d.ts +2 -1
  259. package/lib/ProForm/utils/useForm.js +3 -2
  260. package/lib/ProForm/utils/useRules.d.ts +1 -1
  261. package/lib/ProForm/utils/useShouldUpdate.d.ts +3 -3
  262. package/lib/ProIcon/index.d.ts +2 -2
  263. package/lib/ProIcon/propsTypes.d.ts +120 -49
  264. package/lib/ProLayout/components/Layout/Header/index.d.ts +2 -2
  265. package/lib/ProLayout/components/Layout/Menu/index.d.ts +2 -2
  266. package/lib/ProLayout/components/Layout/Notice/index.d.ts +2 -2
  267. package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +9 -2
  268. package/lib/ProLayout/components/ProCollapse/index.d.ts +2 -2
  269. package/lib/ProLayout/components/ProCollapse/index.js +12 -4
  270. package/lib/ProLayout/components/ProFooter/PropTypes.d.ts +18 -1
  271. package/lib/ProLayout/components/ProFooter/index.d.ts +2 -2
  272. package/lib/ProLayout/components/ProHeader/PropTypes.d.ts +121 -14
  273. package/lib/ProLayout/components/ProHeader/index.d.ts +2 -2
  274. package/lib/ProLayout/index.d.ts +5 -5
  275. package/lib/ProLayout/index.js +6 -2
  276. package/lib/ProLayout/propTypes.d.ts +182 -25
  277. package/lib/ProLayout/utils/index.d.ts +2 -2
  278. package/lib/ProSelect/index.d.ts +3 -3
  279. package/lib/ProSelect/propsType.d.ts +141 -31
  280. package/lib/ProStep/components/Anchor/index.d.ts +2 -1
  281. package/lib/ProStep/components/Item/index.d.ts +2 -2
  282. package/lib/ProStep/components/Item/index.js +6 -2
  283. package/lib/ProStep/components/Listener/index.d.ts +4 -3
  284. package/lib/ProStep/components/Listener/index.js +18 -4
  285. package/lib/ProStep/components/Step/index.d.ts +2 -2
  286. package/lib/ProStep/index.d.ts +7 -7
  287. package/lib/ProStep/index.js +19 -4
  288. package/lib/ProStep/propsType.d.ts +200 -12
  289. package/lib/ProStep/utils/index.d.ts +17 -4
  290. package/lib/ProStep/utils/index.js +11 -2
  291. package/lib/ProTable/components/FormatColumn/index.d.ts +2 -2
  292. package/lib/ProTable/components/FormatColumn/index.js +5 -8
  293. package/lib/ProTable/components/RenderTabs/index.d.ts +4 -0
  294. package/lib/ProTable/components/RenderTabs/index.js +82 -0
  295. package/lib/ProTable/components/index.d.ts +25 -0
  296. package/lib/ProTable/components/index.js +8 -1
  297. package/lib/ProTable/hooks/useAntdTable.d.ts +2 -93
  298. package/lib/ProTable/hooks/useAntdTable.js +5 -1
  299. package/lib/ProTable/index.d.ts +2 -2
  300. package/lib/ProTable/index.js +5 -2
  301. package/lib/ProTable/propsType.d.ts +630 -39
  302. package/lib/ProTable/style/index.less +3 -0
  303. package/lib/ProTabs/index.d.ts +2 -2
  304. package/lib/ProTabs/index.js +4 -4
  305. package/lib/ProTabs/propType.d.ts +66 -9
  306. package/lib/ProThemeTools/index.d.ts +2 -2
  307. package/lib/ProThemeTools/propsType.d.ts +136 -14
  308. package/lib/ProTooltip/index.d.ts +2 -2
  309. package/lib/ProTooltip/propsType.d.ts +49 -9
  310. package/lib/ProTree/components/List.d.ts +2 -2
  311. package/lib/ProTree/components/List.js +2 -2
  312. package/lib/ProTree/components/ProTree.d.ts +2 -2
  313. package/lib/ProTree/components/ProTreeSelect/index.d.ts +3 -3
  314. package/lib/ProTree/components/ProTreeSelect/propsType.d.ts +372 -34
  315. package/lib/ProTree/components/SearchTitle.d.ts +2 -2
  316. package/lib/ProTree/components/Tree.d.ts +3 -3
  317. package/lib/ProTree/index.d.ts +2 -2
  318. package/lib/ProTree/index.js +1 -1
  319. package/lib/ProTree/propsType.d.ts +694 -103
  320. package/lib/ProTree/utils.d.ts +7 -7
  321. package/lib/ProTreeModal/components/Cascader.d.ts +3 -3
  322. package/lib/ProTreeModal/components/List.d.ts +3 -3
  323. package/lib/ProTreeModal/components/Tree.d.ts +2 -2
  324. package/lib/ProTreeModal/index.d.ts +2 -2
  325. package/lib/ProTreeModal/index.js +2 -2
  326. package/lib/ProTreeModal/propsType.d.ts +258 -49
  327. package/lib/ProTreeModal/utils.d.ts +7 -7
  328. package/lib/ProUpload/components/ButtonRender.d.ts +2 -2
  329. package/lib/ProUpload/components/DraggableUploadListItem.d.ts +2 -2
  330. package/lib/ProUpload/components/Example.d.ts +2 -2
  331. package/lib/ProUpload/components/ImageRender.d.ts +2 -2
  332. package/lib/ProUpload/index.d.ts +2 -2
  333. package/lib/ProUpload/index.js +7 -9
  334. package/lib/ProUpload/propsType.d.ts +65 -8
  335. package/lib/ProWaterMark/index.d.ts +2 -2
  336. package/lib/ProWaterMark/propsType.d.ts +2 -1
  337. package/lib/index.d.ts +15 -6
  338. package/lib/index.js +7 -71
  339. package/package.json +1 -1
  340. package/.vscode/extensions.json +0 -5
  341. package/test/__mocks__/fileMock.js +0 -0
  342. package/test/__mocks__/styleMock.js +0 -0
@@ -1,49 +1,102 @@
1
1
  import { FormInstance, InputProps, SelectProps, ModalProps } from 'antd';
2
2
  import { Service, Options } from 'ahooks/lib/useRequest/src/types';
3
3
  import React from 'react';
4
- import { ProColumnProps } from '../../render/propsType';
5
- import { ProFormOtherProps } from '../../../propsType';
4
+ import type { ProFormColumnType } from '../../render/propsType';
5
+ import type { ProFormOtherType } from '../../../propsType';
6
+ /**
7
+ * 模态框确认按钮回调函数类型
8
+ * @param list 选中的数据列表
9
+ * @returns 返回布尔值或Promise<布尔值>,用于控制模态框是否关闭
10
+ */
6
11
  type OnOkFunction = (list?: Record<string, any>[]) => boolean | void | Promise<boolean | void>;
12
+ /**
13
+ * 配置选项接口
14
+ */
7
15
  interface ConfigOption {
16
+ /** ahooks的useRequest参数配置 */
8
17
  useRequest?: {
18
+ /** 请求服务 */
9
19
  service?: Service<any, any>;
20
+ /** useRequest选项配置 */
10
21
  options?: Options<any, any> & {
11
22
  page?: any;
12
23
  defaultParams?: any;
13
24
  initParams?: any;
14
25
  };
26
+ /** 初始化参数 */
15
27
  initParams?: any;
16
28
  };
17
- formColumns?: ProColumnProps[];
29
+ /** 表单列配置项 */
30
+ formColumns?: ProFormColumnType[];
31
+ /** 选择模式:单选(radio)或多选(checkbox) */
18
32
  type?: 'radio' | 'checkbox';
33
+ /** 是否开启分页功能 */
19
34
  withPagination?: boolean;
35
+ /** 转换请求参数 */
20
36
  transformParams?: (params: any) => any;
37
+ /** 转换响应数据 */
21
38
  transformResponse?: (data: any[]) => any[];
39
+ /** 模态框属性配置 */
22
40
  modalProps?: ModalProps & {
23
41
  onOk?: OnOkFunction;
24
42
  };
43
+ /** 表格属性配置 */
25
44
  tableProps?: Record<string, any>;
26
45
  }
46
+ /**
47
+ * 模态框选择器属性接口
48
+ */
27
49
  interface ProModalPropsType {
50
+ /** 配置选项 */
28
51
  configOption: ConfigOption;
52
+ /** 值变更回调 */
29
53
  onChange?: (value: number | string | undefined, option?: any) => void;
54
+ /** 弹框标题 */
30
55
  title: ModalProps['title'];
56
+ /** 组件引用 */
31
57
  ref?: React.MutableRefObject<any>;
58
+ /** 自定义格式化显示值 */
32
59
  onFormat?: (value: any) => string;
60
+ /** 自定义选项渲染函数 */
33
61
  optionRender?: (value: any) => string;
62
+ /** 自定义字段名映射 */
34
63
  fieldNames?: any;
64
+ /** 是否为查看模式 */
35
65
  isView?: boolean;
66
+ /** 自定义组件渲染 */
36
67
  customRender?: React.ReactNode;
68
+ /** 自定义空数据展示组件 */
37
69
  viewEmpty?: React.ReactNode;
38
- otherProps?: ProFormOtherProps;
70
+ /** ProForm中传递的其他参数 */
71
+ otherProps?: ProFormOtherType;
72
+ /**
73
+ * 是否将选项的label包装到value中
74
+ * 会将Select的value类型从string变为{value: string, label: ReactNode}格式
75
+ */
39
76
  labelInValue?: boolean;
77
+ /** 是否默认选择列表第一项 */
40
78
  defaultOne?: boolean;
79
+ /** 打开弹框前的校验函数 */
41
80
  beforeOpen?: any;
81
+ /** 打开弹框后的回调函数 */
42
82
  afterOpen?: any;
43
- isTooltip?: any;
83
+ /** 是否启用tooltip提示 */
84
+ isTooltip?: boolean;
85
+ /** 是否以"值-名称"形式展示 */
44
86
  showCodeName?: boolean;
87
+ /** 查询表单实例,用于获取查询表单数据 */
45
88
  searchForm?: FormInstance;
89
+ /** 模糊查询的字段名 */
46
90
  searchKey?: string;
47
91
  }
92
+ /** 模态框选择器属性类型(结合Select和Input属性) */
48
93
  export declare type ProModalSelectPropsType = SelectProps & InputProps & ProModalPropsType;
94
+ /** 配置选项类型 */
95
+ export type ProModalSelectConfigType = ConfigOption;
96
+ /** 模态框属性类型 */
97
+ export type ProModalType = Omit<ProModalPropsType, 'configOption'> & {
98
+ configOption: ProModalSelectConfigType;
99
+ };
100
+ /** 模态框选择器类型(结合Select和Input属性) */
101
+ export type ProModalSelectType = SelectProps & InputProps & ProModalType;
49
102
  export {};
@@ -1,3 +1,3 @@
1
- import { ProNumberRangeProps } from './propsType';
2
- declare const ProNumberRange: (props: ProNumberRangeProps) => any;
1
+ import type { ProNumberRangeType } from './propsType';
2
+ declare const ProNumberRange: (props: ProNumberRangeType) => any;
3
3
  export default ProNumberRange;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { ProFormOtherProps } from '../../../propsType';
3
- export interface ProNumberRangeProps {
2
+ import type { ProFormOtherType } from '../../../propsType';
3
+ export interface ProNumberRangeType {
4
4
  /**
5
5
  * @description 组件的值,[最小值,最大值]
6
6
  * @default []
@@ -75,6 +75,10 @@ export interface ProNumberRangeProps {
75
75
  */
76
76
  separator?: React.ReactNode | string;
77
77
  childProps?: any[];
78
- otherProps?: ProFormOtherProps;
78
+ otherProps?: ProFormOtherType;
79
79
  id?: string;
80
80
  }
81
+ /**
82
+ * 兼容旧命名导出
83
+ */
84
+ export type ProNumberRangeProps = ProNumberRangeType;
@@ -2,20 +2,20 @@ import { DatePickerProps, TimePickerProps } from 'antd';
2
2
  import { PickerPanelDateProps } from 'antd/lib/calendar/generateCalendar';
3
3
  import { Moment } from 'moment';
4
4
  import React from 'react';
5
- import { ProFormOtherProps } from '../../../propsType';
6
- import { Props as ProRangeLimitProps } from '../ProRangeLimit';
7
- import { DistributiveOmit } from '../../../../ProForm/propsType';
5
+ import type { ProFormOtherType } from '../../../propsType';
6
+ import { Props as ProRangeLimitType } from '../ProRangeLimit';
7
+ import type { DistributiveOmit } from '../../../../ProForm/propsType';
8
8
  export type DateType = DatePickerProps['value'];
9
- export type ProTimeLimitProps = DistributiveOmit<DatePickerProps, 'value' | 'onChange' | 'mode'> & {
9
+ export type ProTimeLimitType = DistributiveOmit<DatePickerProps, 'value' | 'onChange' | 'mode'> & {
10
10
  value?: string;
11
- onChange?: (value: ProTimeLimitProps['value'] | null, valueData: Moment) => void;
11
+ onChange?: (value: ProTimeLimitType['value'] | null, valueData: Moment) => void;
12
12
  disabled?: boolean;
13
13
  foreverDate?: string;
14
14
  foreverText?: string;
15
15
  viewEmpty?: React.ReactNode;
16
16
  format?: string;
17
17
  valueType?: 'moment' | 'format' | 'ISO' | 'dateTime' | 'dateStartEndTime';
18
- otherProps?: ProFormOtherProps;
18
+ otherProps?: ProFormOtherType;
19
19
  mode?: 'DatePicker';
20
20
  isView?: boolean;
21
21
  /**
@@ -26,9 +26,15 @@ export type ProTimeLimitProps = DistributiveOmit<DatePickerProps, 'value' | 'onC
26
26
  showTime?: PickerPanelDateProps<Moment>['showTime'];
27
27
  showNow?: boolean;
28
28
  };
29
- export declare const ProTimeLimit: React.FC<ProTimeLimitProps>;
30
- export type ProLimitProps = ProTimeLimitProps | (ProRangeLimitProps & {
29
+ export declare const ProTimeLimit: React.FC<ProTimeLimitType>;
30
+ export type ProLimitType = ProTimeLimitType | (ProRangeLimitType & {
31
31
  mode: 'RangePicker';
32
32
  });
33
- declare const LimitPick: React.FC<ProLimitProps>;
33
+ declare const LimitPick: React.FC<ProLimitType>;
34
34
  export default LimitPick;
35
+ /**
36
+ * 兼容旧命名导出
37
+ */
38
+ export type ProTimeLimitProps = ProTimeLimitType;
39
+ export type ProLimitProps = ProLimitType;
40
+ export type Props = ProRangeLimitType;
@@ -1,4 +1,4 @@
1
1
  import { FC } from 'react';
2
- import { IProps } from './interface';
2
+ import type { IProps } from './interface';
3
3
  declare const EnumSelect: FC<IProps>;
4
4
  export default EnumSelect;
@@ -1,6 +1,6 @@
1
1
  import { InputProps, ModalProps } from 'antd';
2
2
  import React from 'react';
3
- import { ProColumnProps } from '../../render/propsType';
3
+ import type { ProFormColumnType } from '../../render/propsType';
4
4
  type RequestFunction<P = Record<string, any> | void, R = any> = (params: P, ...args: any[]) => Promise<R>;
5
5
  type OnOkFunction = (list: Record<string, any>[]) => boolean;
6
6
  interface IConfigOption {
@@ -8,7 +8,7 @@ interface IConfigOption {
8
8
  fetchOptions: RequestFunction;
9
9
  useRequestOptions: object;
10
10
  conditionKey: string;
11
- conditionColumns: ProColumnProps[];
11
+ conditionColumns: ProFormColumnType[];
12
12
  defaultParams: Record<string, any>;
13
13
  withPagination: boolean;
14
14
  paginationPosition: 'tableBottom' | 'modalBottom';
@@ -1,3 +1,3 @@
1
- import { comPropsType } from './propsTypes';
1
+ import type { comPropsType } from './propsTypes';
2
2
  declare const InputWithSuffix: (props: comPropsType) => import("react/jsx-runtime").JSX.Element;
3
3
  export default InputWithSuffix;
@@ -1,4 +1,4 @@
1
- import { ProAddressPropsType } from './propsTypes';
1
+ import type { ProAddressPropsType } from './propsTypes';
2
2
  export declare const transferAddressInfoToRegion: () => {
3
3
  normalize: (value: any) => {
4
4
  province: any;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { IProps } from './propsType';
2
+ import type { IProps } from './propsType';
3
3
  /**
4
4
  * 证件号码 + 证件类型
5
5
  * @date 2022-01-06
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ProCertValidityPropsType } from './propsType';
2
+ import type { ProCertValidityPropsType } from './propsType';
3
3
  /**
4
4
  * 继承了antd原本DatePicker 与 RangePicker接口,
5
5
  * 可以在这里使用所有原有antd DatePicker的属性和事件,
@@ -1,2 +1,2 @@
1
- import { ProRangeBoxPropsType } from './propsType';
1
+ import type { ProRangeBoxPropsType } from './propsType';
2
2
  export default function ProRangeBox({ configOption }: ProRangeBoxPropsType): import("react/jsx-runtime").JSX.Element;
@@ -2,12 +2,12 @@ import { FormInstance } from 'antd';
2
2
  import { NamePath } from 'antd/lib/form/interface';
3
3
  import React from 'react';
4
4
  import { DiffOriginalParams } from '../../utils/diffOriginal';
5
- import { DiffConfigProps } from '../../propsType';
5
+ import type { DiffConfigType } from '../../propsType';
6
6
  interface Props {
7
7
  name?: NamePath;
8
8
  names?: NamePath[];
9
9
  namesStr?: string;
10
- diffConfig?: DiffConfigProps;
10
+ diffConfig?: DiffConfigType;
11
11
  form: FormInstance;
12
12
  onDiff?: DiffOriginalParams['onDiff'];
13
13
  valuePropName?: string;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { ProFormColumnProps } from '../../propsType';
2
+ import type { ProFormColumnType } from '../../propsType';
3
3
  interface Props<T = any> {
4
4
  value?: T;
5
5
  onChange?: (value: T, ...rest: any[]) => void;
6
- confirm: ProFormColumnProps['confirm'];
6
+ confirm: ProFormColumnType['confirm'];
7
7
  [K: string]: any;
8
8
  }
9
9
  declare const ConfirmWrapper: React.FC<Props>;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import type { RenderProps } from './propsType';
3
- declare const Render: React.FC<RenderProps>;
2
+ import type { RenderType } from './propsType';
3
+ declare const Render: React.FC<RenderType>;
4
4
  export default Render;
@@ -1,11 +1,11 @@
1
1
  import { ColProps } from 'antd';
2
2
  import { FormInstance } from 'antd/es/form/Form';
3
3
  import React from 'react';
4
- import { ProColumnProps } from './propsType';
5
- import { DiffConfigProps } from '../../propsType';
4
+ import type { ProFormColumnType } from './propsType';
5
+ import type { DiffConfigType } from '../../propsType';
6
6
  interface Props<T = any> {
7
7
  isView?: boolean;
8
- columns: ProColumnProps[];
8
+ columns: ProFormColumnType[];
9
9
  disabled?: boolean;
10
10
  form: FormInstance<T>;
11
11
  expand?: boolean | number;
@@ -15,7 +15,7 @@ interface Props<T = any> {
15
15
  viewEmpty?: React.ReactNode;
16
16
  openState?: boolean;
17
17
  labelWidth?: string | number;
18
- diffConfig?: DiffConfigProps;
18
+ diffConfig?: DiffConfigType;
19
19
  clearNotShow?: boolean;
20
20
  requiredOnView?: boolean;
21
21
  required?: boolean | boolean[] | (() => boolean | boolean[]);
@@ -1,45 +1,42 @@
1
- import { ColProps, FormInstance, FormItemProps, ModalFuncProps } from 'antd';
2
- import { NamePath } from 'antd/es/form/interface';
1
+ import type { ColProps, FormInstance, FormItemProps, ModalFuncProps } from 'antd';
2
+ import type { NamePath } from 'antd/es/form/interface';
3
3
  import React from 'react';
4
4
  import { validate, regExp } from '@zat-design/utils';
5
- import { RuleObject } from 'antd/es/form';
6
- import * as componentMap from '../index';
7
- import { IProps as InputProps } from '../base/Input/propsType';
8
- import { Props as InputNumberProps } from '../base/InputNumber';
9
- import { Props as RadioProps } from '../base/Radio';
10
- import { Props as CheckboxProps } from '../base/Checkbox';
11
- import { Props as DatePickerProps } from '../base/DatePicker';
12
- import { Props as RangePickerProps } from '../base/RangePicker';
13
- import { PropsWithRef as FormListProps } from '../combination/FormList/propsType';
14
- import { Props as SelectProps } from '../base/Select';
15
- import { Props as TimePickerProps } from '../base/TimePicker';
16
- import { Props as SwitchProps } from '../base/Switch';
17
- import { Props as SwitchCheckboxProps } from '../base/SwitchCheckbox';
18
- import { Props as TextAreaProps } from '../base/TextArea';
19
- import { ProCascaderProps } from '../combination/ProCascader/propsType';
20
- import { ProCombinationProps } from '../combination/ProCombination/propsType';
21
- import { ProModalSelectPropsType as ProModalSelectProps } from '../combination/ProModalSelect/propsType';
22
- import { ProNumberRangeProps } from '../combination/ProNumberRange/propsType';
23
- import { ProLimitProps } from '../combination/ProTimeLimit';
24
- import { Props as ProRangeLimitProps } from '../combination/ProRangeLimit';
25
- import { CheckboxPropsMap, ProEnum, PropProSelectsMap, PropRadioPropsMap } from '../../../ProEnum/propsType';
26
- import { PropSelectProps as ProSelectProps } from '../../../ProSelect/propsType';
27
- import { ProEditTableProps } from '../../../ProEditTable/propsType';
28
- import { ProTreeModalProps } from '../../../ProTreeModal/propsType';
29
- import { ProUploadProps } from '../../../ProUpload/propsType';
30
- import { ProTreeProps } from '../../../ProTree/propsType';
31
- import { GroupProps as GroupCopyProps } from '../combination/Group/propsType';
32
- import { ProCollapseProps } from '../../../ProLayout/components/ProCollapse/PropTypes';
33
- import { DistributiveOmit, DiffConfigProps } from '../../propsType';
34
- import { DiffOriginalParams } from '../../utils/diffOriginal';
35
- export type ComponentMap = keyof typeof componentMap;
5
+ import type { RuleObject } from 'antd/es/form';
6
+ import type { Props as InputProps } from '../base/Input/propsType';
7
+ import type { Props as InputNumberProps } from '../base/InputNumber';
8
+ import type { Props as RadioProps } from '../base/Radio';
9
+ import type { Props as CheckboxProps } from '../base/Checkbox';
10
+ import type { Props as DatePickerProps } from '../base/DatePicker';
11
+ import type { Props as RangePickerProps } from '../base/RangePicker';
12
+ import type { TypeWithRef as FormListType } from '../combination/FormList/propsType';
13
+ import type { Props as SelectProps } from '../base/Select';
14
+ import type { Props as TimePickerProps } from '../base/TimePicker';
15
+ import type { Props as SwitchProps } from '../base/Switch';
16
+ import type { Props as SwitchCheckboxProps } from '../base/SwitchCheckbox';
17
+ import type { Props as TextAreaProps } from '../base/TextArea';
18
+ import type { ProCascaderType } from '../combination/ProCascader/propsType';
19
+ import type { ProCombinationType } from '../combination/ProCombination/propsType';
20
+ import type { ProModalSelectType } from '../combination/ProModalSelect/propsType';
21
+ import type { ProNumberRangeType } from '../combination/ProNumberRange/propsType';
22
+ import type { ProLimitProps } from '../combination/ProTimeLimit';
23
+ import type { Props as ProRangeLimitProps } from '../combination/ProRangeLimit';
24
+ import type { CheckboxPropsMap, ProEnum, PropProSelectsMap, PropRadioPropsMap } from '../../../ProEnum/propsType';
25
+ import type { PropSelectProps as ProSelectProps } from '../../../ProSelect/propsType';
26
+ import type { ProEditTableType } from '../../../ProEditTable/propsType';
27
+ import type { ProTreeModalType } from '../../../ProTreeModal/propsType';
28
+ import type { ProUploadType } from '../../../ProUpload/propsType';
29
+ import type { ProTreeProps } from '../../../ProTree/propsType';
30
+ import type { GroupType as GroupCopyProps } from '../combination/Group/propsType';
31
+ import type { ProCollapseProps } from '../../../ProLayout/components/ProCollapse/PropTypes';
32
+ import type { DistributiveOmit, DiffConfigType } from '../../propsType';
33
+ import type { DiffOriginalParams } from '../../utils/diffOriginal';
36
34
  type ValidateKey = keyof typeof validate;
37
35
  type RegExpKey = keyof typeof regExp;
38
- interface ExtendType extends Omit<RuleObject, 'type'> {
36
+ export interface ProRule extends Omit<RuleObject, 'type'> {
39
37
  type?: ValidateKey | RegExpKey;
40
38
  message?: string;
41
39
  }
42
- export type ProRule = ExtendType;
43
40
  /**
44
41
  * percent 百分比 permillage 千分比 amount 金额
45
42
  */
@@ -66,9 +63,9 @@ type TransformToFormField<T extends ControlProps, Values> = DistributiveOmit<T,
66
63
  /** ProForm disable时,是否完全受控 */
67
64
  disabledStrictly?: boolean;
68
65
  };
69
- type ProEnumFormProps<Values> = TransformToFormField<ProEnum, Values> | TransformToFormField<ProEnum & PropProSelectsMap, Values> | TransformToFormField<ProEnum & PropRadioPropsMap, Values> | TransformToFormField<ProEnum & CheckboxPropsMap, Values>;
70
- type ProEnumTableProps<Values> = TransformToTableField<ProEnum, Values> | TransformToTableField<ProEnum & PropProSelectsMap, Values> | TransformToTableField<ProEnum & PropRadioPropsMap, Values> | TransformToTableField<ProEnum & CheckboxPropsMap, Values>;
71
- type ProEnumFieldProps<Values, TT> = TT extends 'ProForm' ? ProEnumFormProps<Values> | ReactiveFunction<Values, ProEnumFormProps<Values>> : ProEnumTableProps<Values> | ((text: any, values: Values, index: number) => ProEnumTableProps<Values>);
66
+ type ProEnumFormType<Values> = TransformToFormField<ProEnum, Values> | TransformToFormField<ProEnum & PropProSelectsMap, Values> | TransformToFormField<ProEnum & PropRadioPropsMap, Values> | TransformToFormField<ProEnum & CheckboxPropsMap, Values>;
67
+ type ProEnumTableType<Values> = TransformToTableField<ProEnum, Values> | TransformToTableField<ProEnum & PropProSelectsMap, Values> | TransformToTableField<ProEnum & PropRadioPropsMap, Values> | TransformToTableField<ProEnum & CheckboxPropsMap, Values>;
68
+ type ProEnumFieldType<Values, TT> = TT extends 'ProForm' ? ProEnumFormType<Values> | ReactiveFunction<Values, ProEnumFormType<Values>> : ProEnumTableType<Values> | ((text: any, values: Values, index: number) => ProEnumTableType<Values>);
72
69
  type TransformToTableField<T extends ControlProps, Values> = Omit<T, 'onChange' | 'value' | 'onBlur'> & {
73
70
  value?: T['value'];
74
71
  onChange?: (value: Parameters<T['onChange']>[0], options: Parameters<T['onChange']>[1], record: any, index: number, form: FormInstance<Values>) => void;
@@ -81,83 +78,83 @@ export type ReactiveFunction<Values, R> = (values: Values, { form, index, namePa
81
78
  namePath?: NamePath;
82
79
  [key: string]: any;
83
80
  }) => R;
84
- type FieldProps<T extends ControlProps, Values, TT> = TT extends 'ProForm' ? TransformToFormField<T, Values> | ReactiveFunction<Values, TransformToFormField<T, Values>> : TransformToTableField<T, Values> | ((text: any, values: Values, index: number) => TransformToTableField<T, Values>);
81
+ type FieldType<T extends ControlProps, Values, TT> = TT extends 'ProForm' ? TransformToFormField<T, Values> | ReactiveFunction<Values, TransformToFormField<T, Values>> : TransformToTableField<T, Values> | ((text: any, values: Values, index: number) => TransformToTableField<T, Values>);
85
82
  /**
86
83
  * 值转换
87
84
  */
88
85
  export type ProFormValueType = 'percentage' | 'permillage' | 'thousandth' | 'datePicker' | 'enumName' | 'enumCodeName' | 'address' | 'thousandthCNY' | 'date' | 'dateTime' | 'dateStartTime' | 'dateEndTime' | 'dateStartEndTime' | 'switch' | 'desensitization';
89
- export type ColumnPropsMap<Values = any, T = 'ProForm'> = {
86
+ export type ColumnTypeMap<Values = any, T = 'ProForm'> = {
90
87
  type?: 'Input';
91
- fieldProps?: FieldProps<InputProps, Values, T>;
88
+ fieldProps?: FieldType<InputProps, Values, T>;
92
89
  } | {
93
90
  type?: 'InputNumber';
94
- fieldProps?: FieldProps<InputNumberProps, Values, T>;
91
+ fieldProps?: FieldType<InputNumberProps, Values, T>;
95
92
  } | {
96
93
  type?: 'Radio';
97
- fieldProps?: FieldProps<RadioProps, Values, T>;
94
+ fieldProps?: FieldType<RadioProps, Values, T>;
98
95
  } | {
99
96
  type?: 'Checkbox';
100
- fieldProps?: FieldProps<CheckboxProps, Values, T>;
97
+ fieldProps?: FieldType<CheckboxProps, Values, T>;
101
98
  } | {
102
99
  type?: 'DatePicker';
103
- fieldProps?: FieldProps<DatePickerProps, Values, T>;
100
+ fieldProps?: FieldType<DatePickerProps, Values, T>;
104
101
  } | {
105
102
  type?: 'RangePicker';
106
- fieldProps?: FieldProps<RangePickerProps, Values, T>;
103
+ fieldProps?: FieldType<RangePickerProps, Values, T>;
107
104
  } | {
108
105
  type?: 'FormList';
109
- fieldProps?: FieldProps<Omit<FormListProps, 'fields' | 'operation' | 'meta'>, Values, T>;
106
+ fieldProps?: FieldType<Omit<FormListType, 'fields' | 'operation' | 'meta'>, Values, T>;
110
107
  } | {
111
108
  type?: 'Select';
112
- fieldProps?: FieldProps<SelectProps, Values, T>;
109
+ fieldProps?: FieldType<SelectProps, Values, T>;
113
110
  } | {
114
111
  type?: 'TimePicker';
115
- fieldProps?: FieldProps<TimePickerProps, Values, T>;
112
+ fieldProps?: FieldType<TimePickerProps, Values, T>;
116
113
  } | {
117
114
  type?: 'Switch';
118
- fieldProps?: FieldProps<SwitchProps, Values, T>;
115
+ fieldProps?: FieldType<SwitchProps, Values, T>;
119
116
  } | {
120
117
  type?: 'SwitchCheckbox';
121
- fieldProps?: FieldProps<SwitchCheckboxProps, Values, T>;
118
+ fieldProps?: FieldType<SwitchCheckboxProps, Values, T>;
122
119
  } | {
123
120
  type?: 'TextArea';
124
- fieldProps?: FieldProps<TextAreaProps, Values, T>;
121
+ fieldProps?: FieldType<TextAreaProps, Values, T>;
125
122
  } | {
126
123
  type?: 'ProCascader';
127
- fieldProps?: FieldProps<ProCascaderProps, Values, T>;
124
+ fieldProps?: FieldType<ProCascaderType, Values, T>;
128
125
  } | {
129
126
  type?: 'ProCombination';
130
- fieldProps?: FieldProps<ProCombinationProps, Values, T>;
127
+ fieldProps?: FieldType<ProCombinationType, Values, T>;
131
128
  } | {
132
129
  type?: 'ProModalSelect';
133
- fieldProps?: FieldProps<ProModalSelectProps, Values, T>;
130
+ fieldProps?: FieldType<ProModalSelectType, Values, T>;
134
131
  } | {
135
132
  type?: 'ProNumberRange';
136
- fieldProps?: FieldProps<ProNumberRangeProps, Values, T>;
133
+ fieldProps?: FieldType<ProNumberRangeType, Values, T>;
137
134
  } | {
138
135
  type?: 'ProRangeLimit';
139
- fieldProps?: FieldProps<ProRangeLimitProps, Values, T>;
136
+ fieldProps?: FieldType<ProRangeLimitProps, Values, T>;
140
137
  } | {
141
138
  type?: 'ProTimeLimit';
142
- fieldProps?: FieldProps<ProLimitProps, Values, T>;
139
+ fieldProps?: FieldType<ProLimitProps, Values, T>;
143
140
  } | {
144
141
  type?: 'ProEnum';
145
- fieldProps?: ProEnumFieldProps<Values, T>;
142
+ fieldProps?: ProEnumFieldType<Values, T>;
146
143
  } | {
147
144
  type?: 'ProSelect';
148
- fieldProps?: FieldProps<ProSelectProps, Values, T>;
145
+ fieldProps?: FieldType<ProSelectProps, Values, T>;
149
146
  } | {
150
147
  type?: 'ProEditTable';
151
- fieldProps?: FieldProps<ProEditTableProps, Values, T>;
148
+ fieldProps?: FieldType<ProEditTableType, Values, T>;
152
149
  } | {
153
150
  type?: 'ProTreeModal';
154
- fieldProps?: FieldProps<ProTreeModalProps, Values, T>;
151
+ fieldProps?: FieldType<ProTreeModalType, Values, T>;
155
152
  } | {
156
153
  type?: 'ProUpload';
157
- fieldProps?: FieldProps<ProUploadProps, Values, T>;
154
+ fieldProps?: FieldType<ProUploadType, Values, T>;
158
155
  } | {
159
156
  type?: 'ProTree';
160
- fieldProps?: FieldProps<ProTreeProps, Values, T>;
157
+ fieldProps?: FieldType<ProTreeProps, Values, T>;
161
158
  } | {
162
159
  type?: 'Group';
163
160
  fieldProps?: GroupCopyProps | ReactiveFunction<Values, GroupCopyProps>;
@@ -168,7 +165,7 @@ export type ColumnPropsMap<Values = any, T = 'ProForm'> = {
168
165
  type?: 'Container';
169
166
  fieldProps?: any;
170
167
  };
171
- export interface ProFormColumnProps<Values = any> extends Omit<FormItemProps<Values>, 'rules' | 'required'> {
168
+ export interface ProFormColumn<Values = any> extends Omit<FormItemProps<Values>, 'rules' | 'required'> {
172
169
  component?: React.ReactNode | ReactiveFunction<Values, React.ReactNode>;
173
170
  names?: NamePath[];
174
171
  show?: boolean | ReactiveFunction<Values, boolean>;
@@ -233,11 +230,11 @@ export interface ProFormColumnProps<Values = any> extends Omit<FormItemProps<Val
233
230
  /** 脱敏数据位置下标 */
234
231
  desensitization?: [number, number] | ReactiveFunction<Values, [number, number]>;
235
232
  }
236
- export type ProColumnProps<T = any> = ProFormColumnProps<T> & ColumnPropsMap<T, 'ProForm'>;
233
+ export type ProFormColumnType<T = any> = ProFormColumn<T> & ColumnTypeMap<T, 'ProForm'>;
237
234
  /**
238
235
  * 表单渲染类型
239
236
  */
240
- export interface RenderProps<Values = any> {
237
+ export interface RenderType<Values = any> {
241
238
  formDisabled?: boolean;
242
239
  component: any;
243
240
  formItemProps: FormItemProps<Values> & {
@@ -278,10 +275,20 @@ export interface RenderProps<Values = any> {
278
275
  form: FormInstance<Values>;
279
276
  fieldProps?: ReactiveFunction<Values, React.ReactNode>;
280
277
  isSelect: boolean;
281
- diffConfig: DiffConfigProps;
278
+ diffConfig: DiffConfigType;
282
279
  requiredOnView?: boolean;
283
- confirm?: ProFormColumnProps['confirm'];
280
+ confirm?: ProFormColumnType['confirm'];
284
281
  globalControl?: boolean;
285
282
  [name: string]: any;
286
283
  }
284
+ /**
285
+ * 兼容旧命名导出
286
+ */
287
+ export type ProEnumFormProps<Values> = ProEnumFormType<Values>;
288
+ export type ProEnumTableProps<Values> = ProEnumTableType<Values>;
289
+ export type ProEnumFieldProps<Values, TT> = ProEnumFieldType<Values, TT>;
290
+ export type FieldProps<T extends ControlProps, Values, TT> = FieldType<T, Values, TT>;
291
+ export type ColumnPropsMap<Values = any, T = 'ProForm'> = ColumnTypeMap<Values, T>;
292
+ export type ProColumnProps<Values = any> = ProFormColumnType<Values>;
293
+ export type RenderProps<Values = any> = RenderType<Values>;
287
294
  export {};
@@ -1,10 +1,10 @@
1
1
  import { FormInstance } from 'antd';
2
2
  import React, { ForwardRefRenderFunction } from 'react';
3
3
  import { FormProviderProps } from 'antd/es/form/context';
4
- import { ProFormProps } from './propsType';
4
+ import type { ProFormType } from './propsType';
5
5
  import { useForm } from './utils/useForm';
6
6
  import useWatch from './utils/useWatch';
7
- interface IProForm<T = any> extends ForwardRefRenderFunction<FormInstance<T>, ProFormProps<T>> {
7
+ interface IProForm<T = any> extends ForwardRefRenderFunction<FormInstance<T>, ProFormType<T>> {
8
8
  useForm: typeof useForm;
9
9
  useWatch: typeof useWatch;
10
10
  [key: string]: any;
@@ -73,10 +73,12 @@ var ProForm = function ProForm(props, ref) {
73
73
  desensitizationKey = _props$desensitizatio === void 0 ? 'zat-design-pro-component-desensitization' : _props$desensitizatio,
74
74
  otherProps = _objectWithoutProperties(props, _excluded);
75
75
  var config = useProConfig('ProForm');
76
+ // source: 用于区分是哪个组件调用,用于错误提示
76
77
  var _useForm = useForm(originForm, {
77
78
  scrollToError: scrollToError,
78
79
  optimize: optimize,
79
- formKey: formKey
80
+ formKey: formKey,
81
+ source: 'ProForm'
80
82
  }),
81
83
  _useForm2 = _slicedToArray(_useForm, 1),
82
84
  form = _useForm2[0];