@zat-design/sisyphus-react 3.13.19-beta.1 → 3.13.19-beta.11

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 (422) hide show
  1. package/dist/index.esm.css +1 -6344
  2. package/dist/index.min.js +1 -0
  3. package/dist/less.esm.css +1 -5768
  4. package/dist/less.min.js +1 -0
  5. package/es/FormsProvider/index.js +9 -7
  6. package/es/ProAction/components/CheckModalContent/index.js +14 -14
  7. package/es/ProAction/index.js +46 -47
  8. package/es/ProConfigProvider/index.js +26 -20
  9. package/es/ProDownload/index.js +66 -73
  10. package/es/ProDownload/utils.js +26 -23
  11. package/es/ProDrawerForm/components/ProDrawer/index.js +43 -39
  12. package/es/ProDrawerForm/components/ProModal/index.js +25 -23
  13. package/es/ProDrawerForm/components/index.js +2 -2
  14. package/es/ProDrawerForm/index.js +19 -21
  15. package/es/ProDrawerForm/utils/index.js +1 -1
  16. package/es/ProEditLabel/components/RenderProForm.js +30 -26
  17. package/es/ProEditLabel/index.js +49 -36
  18. package/es/ProEditLabel/utils/index.js +4 -3
  19. package/es/ProEditTable/components/ActionButton/index.js +83 -76
  20. package/es/ProEditTable/components/RcTable/BaseTable.js +24 -24
  21. package/es/ProEditTable/components/RcTable/DraggableTable.js +34 -41
  22. package/es/ProEditTable/components/RcTable/VirtualTable.js +4 -3
  23. package/es/ProEditTable/components/RcTable/index.js +3 -3
  24. package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +61 -57
  25. package/es/ProEditTable/components/RenderField/index.js +151 -145
  26. package/es/ProEditTable/components/RenderToolbar/index.js +37 -42
  27. package/es/ProEditTable/components/Summary/index.js +22 -21
  28. package/es/ProEditTable/components/Validator/index.js +11 -10
  29. package/es/ProEditTable/components/index.js +5 -5
  30. package/es/ProEditTable/index.d.ts +1 -1
  31. package/es/ProEditTable/index.js +170 -173
  32. package/es/ProEditTable/utils/config.js +42 -46
  33. package/es/ProEditTable/utils/diffOriginal.js +34 -19
  34. package/es/ProEditTable/utils/getDefaultProps.js +12 -13
  35. package/es/ProEditTable/utils/index.js +102 -99
  36. package/es/ProEditTable/utils/tools.js +88 -91
  37. package/es/ProEditTable/utils/transform.js +7 -11
  38. package/es/ProEditTable/utils/useEditTableError.js +22 -13
  39. package/es/ProEnum/components/Group.js +23 -27
  40. package/es/ProEnum/components/Tag.js +14 -16
  41. package/es/ProEnum/hooks/useEnum.js +32 -14
  42. package/es/ProEnum/hooks/useEnumRequest.js +42 -42
  43. package/es/ProEnum/hooks/useFrequentEnumRequest.js +17 -19
  44. package/es/ProEnum/index.js +80 -89
  45. package/es/ProEnum/utils/eventCenter.js +23 -32
  46. package/es/ProEnum/utils/frequentEnum.js +16 -4
  47. package/es/ProEnum/utils/getEnumLabel.js +16 -21
  48. package/es/ProEnum/utils/index.js +12 -7
  49. package/es/ProForm/components/Container.js +8 -6
  50. package/es/ProForm/components/FormFooter/index.js +21 -19
  51. package/es/ProForm/components/base/Checkbox/index.js +16 -15
  52. package/es/ProForm/components/base/DatePicker/index.js +23 -20
  53. package/es/ProForm/components/base/Input/index.js +20 -18
  54. package/es/ProForm/components/base/InputNumber/index.js +57 -53
  55. package/es/ProForm/components/base/Radio/index.js +15 -15
  56. package/es/ProForm/components/base/RangePicker/index.js +24 -29
  57. package/es/ProForm/components/base/RangePicker/useDateRange.js +3 -3
  58. package/es/ProForm/components/base/Select/index.js +17 -15
  59. package/es/ProForm/components/base/Switch/index.js +16 -15
  60. package/es/ProForm/components/base/SwitchCheckbox/index.js +19 -18
  61. package/es/ProForm/components/base/TextArea/index.js +18 -17
  62. package/es/ProForm/components/base/TimePicker/index.js +10 -9
  63. package/es/ProForm/components/combination/Container/index.js +25 -23
  64. package/es/ProForm/components/combination/FormList/components/ActionButton.js +80 -92
  65. package/es/ProForm/components/combination/FormList/components/BlockFields.js +21 -19
  66. package/es/ProForm/components/combination/FormList/components/BlockTitle.js +7 -7
  67. package/es/ProForm/components/combination/FormList/components/Empty.js +21 -20
  68. package/es/ProForm/components/combination/FormList/components/LineFields.js +19 -18
  69. package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +45 -51
  70. package/es/ProForm/components/combination/FormList/index.js +43 -51
  71. package/es/ProForm/components/combination/FormList/utils.js +9 -9
  72. package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +8 -6
  73. package/es/ProForm/components/combination/Group/component/ComRender.js +33 -29
  74. package/es/ProForm/components/combination/Group/hooks/index.js +49 -47
  75. package/es/ProForm/components/combination/Group/index.js +38 -37
  76. package/es/ProForm/components/combination/Group/utils.js +56 -50
  77. package/es/ProForm/components/combination/ProCascader/index.js +81 -85
  78. package/es/ProForm/components/combination/ProCascader/utils/index.js +6 -6
  79. package/es/ProForm/components/combination/ProCombination/index.js +41 -37
  80. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +31 -25
  81. package/es/ProForm/components/combination/ProModalSelect/index.js +166 -173
  82. package/es/ProForm/components/combination/ProModalSelect/utils/index.js +1 -1
  83. package/es/ProForm/components/combination/ProNumberRange/index.js +46 -51
  84. package/es/ProForm/components/combination/ProRangeLimit/index.js +39 -39
  85. package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +3 -3
  86. package/es/ProForm/components/combination/ProTimeLimit/index.js +43 -40
  87. package/es/ProForm/components/index.d.ts +1 -0
  88. package/es/ProForm/components/index.js +40 -35
  89. package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +30 -28
  90. package/es/ProForm/components/old/EnumSelect/index.js +55 -62
  91. package/es/ProForm/components/old/InputRange/index.js +17 -16
  92. package/es/ProForm/components/old/InputWithSuffix/index.js +6 -5
  93. package/es/ProForm/components/old/ProAddress/index.js +53 -75
  94. package/es/ProForm/components/old/ProCertNo/index.js +17 -17
  95. package/es/ProForm/components/old/ProCertValidity/index.js +19 -21
  96. package/es/ProForm/components/old/ProRangeBox/index.js +25 -24
  97. package/es/ProForm/components/render/ChangedWrapper.js +34 -33
  98. package/es/ProForm/components/render/ConfirmWrapper.js +16 -18
  99. package/es/ProForm/components/render/Render.js +150 -135
  100. package/es/ProForm/components/render/RenderFields.js +65 -50
  101. package/es/ProForm/components/render/propsType.js +25 -0
  102. package/es/ProForm/index.js +83 -70
  103. package/es/ProForm/propsType.d.ts +1 -1
  104. package/es/ProForm/propsType.js +5 -1
  105. package/es/ProForm/utils/diffOriginal.js +30 -16
  106. package/es/ProForm/utils/getDefaultProps.js +10 -10
  107. package/es/ProForm/utils/index.js +105 -110
  108. package/es/ProForm/utils/processDependencies.js +15 -5
  109. package/es/ProForm/utils/rulesCreator.js +21 -22
  110. package/es/ProForm/utils/transformNames.js +7 -6
  111. package/es/ProForm/utils/transformValue.js +16 -13
  112. package/es/ProForm/utils/useDeepCompareMemo.js +6 -4
  113. package/es/ProForm/utils/useFieldProps.js +1 -3
  114. package/es/ProForm/utils/useForm.js +36 -34
  115. package/es/ProForm/utils/useRules.js +28 -31
  116. package/es/ProForm/utils/useShouldUpdate.js +83 -86
  117. package/es/ProForm/utils/useWatch.js +36 -14
  118. package/es/ProForm/utils/valueType.js +51 -52
  119. package/es/ProIcon/config/index.js +2 -0
  120. package/es/ProIcon/index.js +53 -49
  121. package/es/ProIcon/utils/index.js +8 -9
  122. package/es/ProLayout/components/Layout/Header/index.js +13 -11
  123. package/es/ProLayout/components/Layout/Icon/Icon.js +7 -7
  124. package/es/ProLayout/components/Layout/Icon/index.js +1 -1
  125. package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +42 -40
  126. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +51 -52
  127. package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +10 -9
  128. package/es/ProLayout/components/Layout/Menu/index.js +20 -18
  129. package/es/ProLayout/components/Layout/Notice/index.js +12 -11
  130. package/es/ProLayout/components/Layout/index.js +4 -4
  131. package/es/ProLayout/components/ProCollapse/index.js +35 -32
  132. package/es/ProLayout/components/ProFooter/index.js +13 -15
  133. package/es/ProLayout/components/ProHeader/components/Copy/index.js +9 -9
  134. package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +8 -7
  135. package/es/ProLayout/components/ProHeader/components/index.js +2 -2
  136. package/es/ProLayout/components/ProHeader/index.js +129 -118
  137. package/es/ProLayout/components/ProHeader/utils/index.js +1 -1
  138. package/es/ProLayout/components/index.js +3 -3
  139. package/es/ProLayout/index.d.ts +1 -1
  140. package/es/ProLayout/index.js +28 -25
  141. package/es/ProLayout/utils/index.js +37 -35
  142. package/es/ProSelect/components/AdaptiveTooltip.js +10 -11
  143. package/es/ProSelect/index.js +87 -99
  144. package/es/ProSelect/utils/index.js +27 -33
  145. package/es/ProStep/components/Anchor/index.d.ts +1 -0
  146. package/es/ProStep/components/Anchor/index.js +26 -25
  147. package/es/ProStep/components/Item/index.d.ts +1 -0
  148. package/es/ProStep/components/Item/index.js +26 -22
  149. package/es/ProStep/components/Listener/index.js +11 -15
  150. package/es/ProStep/components/Step/index.js +24 -25
  151. package/es/ProStep/index.js +51 -53
  152. package/es/ProStep/utils/index.js +13 -12
  153. package/es/ProStepTab/index.js +59 -37
  154. package/es/ProTable/components/FormatColumn/index.js +106 -110
  155. package/es/ProTable/components/RcTable/components/BaseTable/index.js +7 -9
  156. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +36 -50
  157. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +24 -24
  158. package/es/ProTable/components/RcTable/components/DraggableTable/index.js +8 -10
  159. package/es/ProTable/components/RcTable/index.js +2 -2
  160. package/es/ProTable/components/RenderColumn/index.js +51 -51
  161. package/es/ProTable/components/RenderEmptyText/index.js +8 -7
  162. package/es/ProTable/components/RenderFooter/index.js +3 -3
  163. package/es/ProTable/components/RenderSummary/index.js +13 -13
  164. package/es/ProTable/components/RenderTableHeader/index.js +16 -14
  165. package/es/ProTable/components/RenderTabs/index.js +28 -33
  166. package/es/ProTable/components/TableResizable/index.js +17 -16
  167. package/es/ProTable/components/TooltipTitle/index.js +7 -6
  168. package/es/ProTable/components/index.js +11 -6
  169. package/es/ProTable/hooks/useAntdTable.js +106 -119
  170. package/es/ProTable/index.js +158 -176
  171. package/es/ProTable/utils/index.js +25 -21
  172. package/es/ProTabs/components/Card/index.js +15 -14
  173. package/es/ProTabs/components/index.js +1 -1
  174. package/es/ProTabs/index.js +24 -25
  175. package/es/ProThemeTools/component/ProTools/index.js +69 -68
  176. package/es/ProThemeTools/component/index.js +1 -1
  177. package/es/ProThemeTools/index.js +47 -33
  178. package/es/ProThemeTools/utils/index.js +20 -17
  179. package/es/ProTooltip/index.js +44 -46
  180. package/es/ProTree/components/AdaptiveTooltip.js +5 -7
  181. package/es/ProTree/components/CloseIcon.js +5 -5
  182. package/es/ProTree/components/List.js +22 -24
  183. package/es/ProTree/components/ProTree.js +84 -102
  184. package/es/ProTree/components/ProTreeSelect/index.js +128 -119
  185. package/es/ProTree/components/SearchTitle.js +10 -9
  186. package/es/ProTree/components/Tree.js +57 -58
  187. package/es/ProTree/components/index.js +4 -4
  188. package/es/ProTree/index.js +6 -6
  189. package/es/ProTree/utils.js +29 -22
  190. package/es/ProTreeModal/components/Cascader.js +31 -33
  191. package/es/ProTreeModal/components/CloseIcon.js +5 -5
  192. package/es/ProTreeModal/components/List.js +74 -93
  193. package/es/ProTreeModal/components/SearchTitle.js +5 -4
  194. package/es/ProTreeModal/components/SortableItem.js +14 -14
  195. package/es/ProTreeModal/components/Tree.js +49 -53
  196. package/es/ProTreeModal/components/Trigger.js +29 -28
  197. package/es/ProTreeModal/components/index.js +6 -6
  198. package/es/ProTreeModal/index.js +166 -206
  199. package/es/ProTreeModal/utils.js +37 -33
  200. package/es/ProUpload/components/ButtonRender.js +33 -36
  201. package/es/ProUpload/components/DragRender.js +54 -51
  202. package/es/ProUpload/components/DraggableUploadListItem.js +5 -4
  203. package/es/ProUpload/components/Example.js +13 -12
  204. package/es/ProUpload/components/FileItem.js +63 -58
  205. package/es/ProUpload/components/ImageRender.js +98 -100
  206. package/es/ProUpload/index.js +75 -82
  207. package/es/ProUpload/uitls.js +3 -3
  208. package/es/ProUtils/utils/index.js +10 -14
  209. package/es/ProViewer/index.js +29 -25
  210. package/es/ProViewer/propsType.js +0 -1
  211. package/es/ProWaterMark/index.js +5 -4
  212. package/es/index.d.ts +1 -1
  213. package/es/index.js +38 -29
  214. package/es/locale/index.js +7 -4
  215. package/es/old/ProCertValidity/index.js +19 -21
  216. package/es/old/ProEditableTable/index.js +156 -156
  217. package/es/old/ProEditableTable/utils.js +61 -63
  218. package/es/tokens.js +1 -0
  219. package/es/utils/index.js +12 -12
  220. package/lib/FormsProvider/index.js +11 -7
  221. package/lib/ProAction/components/CheckModalContent/index.js +11 -13
  222. package/lib/ProAction/index.js +40 -43
  223. package/lib/ProConfigProvider/index.js +24 -17
  224. package/lib/ProDownload/index.js +65 -71
  225. package/lib/ProDownload/utils.js +25 -22
  226. package/lib/ProDrawerForm/components/ProDrawer/index.js +39 -38
  227. package/lib/ProDrawerForm/components/ProModal/index.js +23 -22
  228. package/lib/ProDrawerForm/index.js +18 -18
  229. package/lib/ProDrawerForm/utils/index.js +3 -2
  230. package/lib/ProEditLabel/components/RenderProForm.js +26 -24
  231. package/lib/ProEditLabel/index.js +46 -35
  232. package/lib/ProEditLabel/utils/index.js +6 -5
  233. package/lib/ProEditTable/components/ActionButton/index.js +79 -74
  234. package/lib/ProEditTable/components/RcTable/BaseTable.js +21 -23
  235. package/lib/ProEditTable/components/RcTable/DraggableTable.js +32 -40
  236. package/lib/ProEditTable/components/RcTable/VirtualTable.js +3 -3
  237. package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +62 -59
  238. package/lib/ProEditTable/components/RenderField/index.js +137 -132
  239. package/lib/ProEditTable/components/RenderToolbar/index.js +34 -41
  240. package/lib/ProEditTable/components/Summary/index.js +20 -20
  241. package/lib/ProEditTable/components/Validator/index.js +10 -10
  242. package/lib/ProEditTable/index.d.ts +1 -1
  243. package/lib/ProEditTable/index.js +159 -164
  244. package/lib/ProEditTable/utils/config.js +40 -44
  245. package/lib/ProEditTable/utils/diffOriginal.js +36 -21
  246. package/lib/ProEditTable/utils/getDefaultProps.js +14 -15
  247. package/lib/ProEditTable/utils/index.js +97 -97
  248. package/lib/ProEditTable/utils/tools.js +96 -91
  249. package/lib/ProEditTable/utils/transform.js +7 -11
  250. package/lib/ProEditTable/utils/useEditTableError.js +22 -13
  251. package/lib/ProEnum/components/Group.js +23 -27
  252. package/lib/ProEnum/components/Tag.js +14 -16
  253. package/lib/ProEnum/hooks/useEnum.js +30 -12
  254. package/lib/ProEnum/hooks/useEnumRequest.js +39 -39
  255. package/lib/ProEnum/hooks/useFrequentEnumRequest.js +16 -18
  256. package/lib/ProEnum/index.js +68 -78
  257. package/lib/ProEnum/utils/eventCenter.js +23 -32
  258. package/lib/ProEnum/utils/frequentEnum.js +14 -3
  259. package/lib/ProEnum/utils/getEnumLabel.js +15 -21
  260. package/lib/ProEnum/utils/index.js +12 -7
  261. package/lib/ProForm/components/Container.js +7 -5
  262. package/lib/ProForm/components/FormFooter/index.js +19 -17
  263. package/lib/ProForm/components/base/Checkbox/index.js +14 -13
  264. package/lib/ProForm/components/base/DatePicker/index.js +20 -17
  265. package/lib/ProForm/components/base/Input/index.js +15 -15
  266. package/lib/ProForm/components/base/InputNumber/index.js +51 -48
  267. package/lib/ProForm/components/base/Radio/index.js +13 -13
  268. package/lib/ProForm/components/base/RangePicker/index.js +19 -22
  269. package/lib/ProForm/components/base/RangePicker/useDateRange.js +5 -4
  270. package/lib/ProForm/components/base/Select/index.js +14 -12
  271. package/lib/ProForm/components/base/Switch/index.js +11 -11
  272. package/lib/ProForm/components/base/SwitchCheckbox/index.js +16 -15
  273. package/lib/ProForm/components/base/TextArea/index.js +14 -13
  274. package/lib/ProForm/components/base/TimePicker/index.js +6 -5
  275. package/lib/ProForm/components/combination/Container/index.js +22 -21
  276. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +77 -89
  277. package/lib/ProForm/components/combination/FormList/components/BlockFields.js +17 -15
  278. package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +7 -7
  279. package/lib/ProForm/components/combination/FormList/components/Empty.js +17 -18
  280. package/lib/ProForm/components/combination/FormList/components/LineFields.js +14 -14
  281. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +43 -48
  282. package/lib/ProForm/components/combination/FormList/index.js +35 -43
  283. package/lib/ProForm/components/combination/FormList/utils.js +11 -10
  284. package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +7 -5
  285. package/lib/ProForm/components/combination/Group/component/ComRender.js +30 -28
  286. package/lib/ProForm/components/combination/Group/hooks/index.js +48 -45
  287. package/lib/ProForm/components/combination/Group/index.js +34 -35
  288. package/lib/ProForm/components/combination/Group/utils.js +62 -50
  289. package/lib/ProForm/components/combination/ProCascader/index.js +75 -80
  290. package/lib/ProForm/components/combination/ProCascader/utils/index.js +8 -7
  291. package/lib/ProForm/components/combination/ProCombination/index.js +35 -31
  292. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +30 -24
  293. package/lib/ProForm/components/combination/ProModalSelect/index.js +171 -180
  294. package/lib/ProForm/components/combination/ProModalSelect/utils/index.js +3 -2
  295. package/lib/ProForm/components/combination/ProNumberRange/index.js +42 -48
  296. package/lib/ProForm/components/combination/ProRangeLimit/index.js +35 -35
  297. package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +3 -3
  298. package/lib/ProForm/components/combination/ProTimeLimit/index.js +37 -34
  299. package/lib/ProForm/components/index.d.ts +1 -0
  300. package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +35 -33
  301. package/lib/ProForm/components/old/EnumSelect/index.js +50 -58
  302. package/lib/ProForm/components/old/InputRange/index.js +16 -16
  303. package/lib/ProForm/components/old/InputWithSuffix/index.js +4 -4
  304. package/lib/ProForm/components/old/ProAddress/index.js +53 -75
  305. package/lib/ProForm/components/old/ProCertNo/index.js +16 -17
  306. package/lib/ProForm/components/old/ProCertValidity/index.js +17 -18
  307. package/lib/ProForm/components/old/ProRangeBox/index.js +24 -24
  308. package/lib/ProForm/components/render/ChangedWrapper.js +35 -35
  309. package/lib/ProForm/components/render/ConfirmWrapper.js +14 -17
  310. package/lib/ProForm/components/render/Render.js +138 -125
  311. package/lib/ProForm/components/render/RenderFields.js +57 -43
  312. package/lib/ProForm/components/render/propsType.js +26 -1
  313. package/lib/ProForm/index.js +74 -61
  314. package/lib/ProForm/propsType.d.ts +1 -1
  315. package/lib/ProForm/propsType.js +5 -1
  316. package/lib/ProForm/utils/diffOriginal.js +30 -17
  317. package/lib/ProForm/utils/getDefaultProps.js +12 -12
  318. package/lib/ProForm/utils/index.js +127 -106
  319. package/lib/ProForm/utils/processDependencies.js +15 -6
  320. package/lib/ProForm/utils/rulesCreator.js +21 -21
  321. package/lib/ProForm/utils/transformNames.js +6 -6
  322. package/lib/ProForm/utils/transformValue.js +14 -11
  323. package/lib/ProForm/utils/useDeepCompareMemo.js +7 -6
  324. package/lib/ProForm/utils/useFieldProps.js +2 -3
  325. package/lib/ProForm/utils/useForm.js +33 -31
  326. package/lib/ProForm/utils/useRules.js +25 -28
  327. package/lib/ProForm/utils/useShouldUpdate.js +82 -85
  328. package/lib/ProForm/utils/useWatch.js +36 -14
  329. package/lib/ProForm/utils/valueType.js +52 -52
  330. package/lib/ProIcon/config/index.js +2 -0
  331. package/lib/ProIcon/index.js +47 -44
  332. package/lib/ProIcon/utils/index.js +10 -8
  333. package/lib/ProLayout/components/Layout/Header/index.js +10 -10
  334. package/lib/ProLayout/components/Layout/Icon/Icon.js +8 -7
  335. package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +37 -36
  336. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +49 -52
  337. package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +8 -8
  338. package/lib/ProLayout/components/Layout/Menu/index.js +17 -16
  339. package/lib/ProLayout/components/Layout/Notice/index.js +8 -8
  340. package/lib/ProLayout/components/ProCollapse/index.js +32 -30
  341. package/lib/ProLayout/components/ProFooter/index.js +14 -16
  342. package/lib/ProLayout/components/ProHeader/components/Copy/index.js +7 -7
  343. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +6 -7
  344. package/lib/ProLayout/components/ProHeader/index.js +131 -120
  345. package/lib/ProLayout/components/ProHeader/utils/index.js +3 -2
  346. package/lib/ProLayout/index.d.ts +1 -1
  347. package/lib/ProLayout/index.js +22 -21
  348. package/lib/ProLayout/utils/index.js +42 -33
  349. package/lib/ProSelect/components/AdaptiveTooltip.js +9 -11
  350. package/lib/ProSelect/index.js +82 -93
  351. package/lib/ProSelect/utils/index.js +29 -34
  352. package/lib/ProStep/components/Anchor/index.d.ts +1 -0
  353. package/lib/ProStep/components/Anchor/index.js +25 -24
  354. package/lib/ProStep/components/Item/index.d.ts +1 -0
  355. package/lib/ProStep/components/Item/index.js +24 -20
  356. package/lib/ProStep/components/Listener/index.js +9 -13
  357. package/lib/ProStep/components/Step/index.js +20 -21
  358. package/lib/ProStep/index.js +45 -49
  359. package/lib/ProStep/utils/index.js +16 -12
  360. package/lib/ProStepTab/index.js +60 -38
  361. package/lib/ProTable/components/FormatColumn/index.js +100 -104
  362. package/lib/ProTable/components/RcTable/components/BaseTable/index.js +5 -7
  363. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +34 -48
  364. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +25 -23
  365. package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +5 -7
  366. package/lib/ProTable/components/RenderColumn/index.js +46 -48
  367. package/lib/ProTable/components/RenderEmptyText/index.js +6 -6
  368. package/lib/ProTable/components/RenderFooter/index.js +3 -3
  369. package/lib/ProTable/components/RenderSummary/index.js +11 -12
  370. package/lib/ProTable/components/RenderTableHeader/index.js +14 -13
  371. package/lib/ProTable/components/RenderTabs/index.js +27 -32
  372. package/lib/ProTable/components/TableResizable/index.js +16 -15
  373. package/lib/ProTable/components/TooltipTitle/index.js +5 -5
  374. package/lib/ProTable/hooks/useAntdTable.js +103 -116
  375. package/lib/ProTable/index.js +149 -169
  376. package/lib/ProTable/utils/index.js +33 -22
  377. package/lib/ProTabs/components/Card/index.js +14 -14
  378. package/lib/ProTabs/index.js +24 -24
  379. package/lib/ProThemeTools/component/ProTools/index.js +66 -65
  380. package/lib/ProThemeTools/index.js +43 -29
  381. package/lib/ProThemeTools/utils/index.js +25 -18
  382. package/lib/ProTooltip/index.js +44 -46
  383. package/lib/ProTree/components/AdaptiveTooltip.js +5 -7
  384. package/lib/ProTree/components/CloseIcon.js +5 -5
  385. package/lib/ProTree/components/List.js +18 -22
  386. package/lib/ProTree/components/ProTree.js +77 -96
  387. package/lib/ProTree/components/ProTreeSelect/index.js +126 -116
  388. package/lib/ProTree/components/SearchTitle.js +8 -8
  389. package/lib/ProTree/components/Tree.js +53 -55
  390. package/lib/ProTree/index.js +4 -4
  391. package/lib/ProTree/utils.js +34 -25
  392. package/lib/ProTreeModal/components/Cascader.js +28 -32
  393. package/lib/ProTreeModal/components/CloseIcon.js +5 -5
  394. package/lib/ProTreeModal/components/List.js +69 -89
  395. package/lib/ProTreeModal/components/SearchTitle.js +4 -4
  396. package/lib/ProTreeModal/components/SortableItem.js +11 -12
  397. package/lib/ProTreeModal/components/Tree.js +44 -49
  398. package/lib/ProTreeModal/components/Trigger.js +26 -26
  399. package/lib/ProTreeModal/index.js +157 -199
  400. package/lib/ProTreeModal/utils.js +43 -35
  401. package/lib/ProUpload/components/ButtonRender.js +29 -33
  402. package/lib/ProUpload/components/DragRender.js +50 -48
  403. package/lib/ProUpload/components/DraggableUploadListItem.js +7 -5
  404. package/lib/ProUpload/components/Example.js +13 -11
  405. package/lib/ProUpload/components/FileItem.js +58 -50
  406. package/lib/ProUpload/components/ImageRender.js +89 -93
  407. package/lib/ProUpload/index.js +68 -76
  408. package/lib/ProUpload/uitls.js +5 -3
  409. package/lib/ProUtils/utils/index.js +10 -14
  410. package/lib/ProViewer/index.js +26 -24
  411. package/lib/ProViewer/propsType.js +1 -5
  412. package/lib/ProWaterMark/index.js +5 -4
  413. package/lib/index.d.ts +1 -1
  414. package/lib/locale/index.js +6 -2
  415. package/lib/old/ProCertValidity/index.js +17 -18
  416. package/lib/old/ProEditableTable/index.js +153 -156
  417. package/lib/old/ProEditableTable/utils.js +61 -62
  418. package/lib/tokens.js +1 -0
  419. package/lib/utils/index.js +16 -13
  420. package/package.json +8 -8
  421. package/dist/index.esm.js +0 -3
  422. package/dist/less.esm.js +0 -3
@@ -1,33 +1,30 @@
1
1
  import "antd/es/affix/style";
2
2
  import _Affix from "antd/es/affix";
3
- import _typeof from "@babel/runtime/helpers/esm/typeof";
4
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
5
4
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
6
5
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
7
6
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
8
7
  import "antd/es/config-provider/style";
9
8
  import _ConfigProvider from "antd/es/config-provider";
10
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
11
9
  import "antd/es/form/style";
12
10
  import _Form from "antd/es/form";
13
11
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
14
- import _set from "lodash/set";
15
- import _isBoolean from "lodash/isBoolean";
16
- import _isArray from "lodash/isArray";
17
- import _get from "lodash/get";
18
12
  var _excluded = ["value", "onChange", "onDrag", "onDragEnd", "className", "columns", "type", "mode", "stripe", "draggable", "virtual", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "toolbarSticky", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "requiredAlign", "summary", "max", "headerRender", "pagination", "rowKey", "rowDisabled", "rowDraggable", "footerRender", "scroll", "actionDirection", "diffConfig"];
19
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
20
13
  import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
14
+ import { get, isArray, isBoolean, set } from 'lodash';
21
15
  import { useDeepCompareEffect, useLocalStorageState, useSetState } from 'ahooks';
22
16
  import classnames from 'classnames';
23
- import { transformColumns } from './utils';
24
- import { getRandom, getNamePath, handleScrollToError, onPageCheck } from './utils/tools';
25
- import { Validator, Summary, RenderToolbar } from './components';
26
- import ProForm from '../ProForm';
27
- import Empty from '../assets/empty.png';
28
- import locale, { formatMessage } from '../locale';
29
- import { BaseTable, DraggableTable, VirtualTable } from './components/RcTable';
30
- var ProEditTable = function ProEditTable(_ref, ref) {
17
+ import { transformColumns } from "./utils";
18
+ import { getRandom, getNamePath, handleScrollToError, onPageCheck } from "./utils/tools";
19
+ import { Validator, Summary, RenderToolbar } from "./components";
20
+ import ProForm from "../ProForm";
21
+ import Empty from "../assets/empty.png";
22
+ import locale, { formatMessage } from "../locale";
23
+ import { BaseTable, DraggableTable, VirtualTable } from "./components/RcTable";
24
+ import { jsx as _jsx } from "react/jsx-runtime";
25
+ import { Fragment as _Fragment } from "react/jsx-runtime";
26
+ import { jsxs as _jsxs } from "react/jsx-runtime";
27
+ var ProEditTable = (_ref, ref) => {
31
28
  var _resetProps$id, _resetProps$id$split, _themeConfig$data2, _resetProps$otherProp;
32
29
  var value = _ref.value,
33
30
  onChange = _ref.onChange,
@@ -69,15 +66,16 @@ var ProEditTable = function ProEditTable(_ref, ref) {
69
66
  var formFieldProps = ProForm.useFieldProps() || {};
70
67
  var affixRef = useRef(null);
71
68
  var form = contentForm || (formFieldProps === null || formFieldProps === void 0 ? void 0 : formFieldProps.form) || (resetProps === null || resetProps === void 0 ? void 0 : resetProps.form);
72
- var name = (formFieldProps === null || formFieldProps === void 0 ? void 0 : formFieldProps.name) || (resetProps === null || resetProps === void 0 ? void 0 : resetProps.name) || (resetProps === null || resetProps === void 0 ? void 0 : (_resetProps$id = resetProps.id) === null || _resetProps$id === void 0 ? void 0 : (_resetProps$id$split = _resetProps$id.split) === null || _resetProps$id$split === void 0 ? void 0 : _resetProps$id$split.call(_resetProps$id, '_'));
69
+ var name = (formFieldProps === null || formFieldProps === void 0 ? void 0 : formFieldProps.name) || (resetProps === null || resetProps === void 0 ? void 0 : resetProps.name) || (resetProps === null || resetProps === void 0 || (_resetProps$id = resetProps.id) === null || _resetProps$id === void 0 || (_resetProps$id$split = _resetProps$id.split) === null || _resetProps$id$split === void 0 ? void 0 : _resetProps$id$split.call(_resetProps$id, '_'));
73
70
  var _formFieldProps$isVie = formFieldProps.isView,
74
71
  isView = _formFieldProps$isVie === void 0 ? false : _formFieldProps$isVie,
75
72
  _formFieldProps$viewE = formFieldProps.viewEmpty,
76
73
  viewEmpty = _formFieldProps$viewE === void 0 ? '-' : _formFieldProps$viewE,
77
74
  namePath = formFieldProps.namePath;
75
+
78
76
  // 判断是否在formList内
79
- if (namePath === null || namePath === void 0 ? void 0 : namePath.length) {
80
- name = [].concat(_toConsumableArray(namePath), _toConsumableArray(name.slice(1)));
77
+ if (namePath !== null && namePath !== void 0 && namePath.length) {
78
+ name = [...namePath, ...name.slice(1)];
81
79
  disabled = (formFieldProps === null || formFieldProps === void 0 ? void 0 : formFieldProps.disabled) || disabled; // formFieldProps?.disabled可能是函数??
82
80
  }
83
81
  var tableRef = useRef(null);
@@ -89,17 +87,23 @@ var ProEditTable = function ProEditTable(_ref, ref) {
89
87
  var _useLocalStorageState = useLocalStorageState('themeConfig'),
90
88
  _useLocalStorageState2 = _slicedToArray(_useLocalStorageState, 1),
91
89
  themeConfig = _useLocalStorageState2[0];
92
- var requiredAlign = useMemo(function () {
90
+ var requiredAlign = useMemo(() => {
93
91
  var _ref2, _themeConfig$data$zau, _themeConfig$data;
94
- return (_ref2 = (_themeConfig$data$zau = themeConfig === null || themeConfig === void 0 ? void 0 : (_themeConfig$data = themeConfig.data) === null || _themeConfig$data === void 0 ? void 0 : _themeConfig$data.zauiFormAlign) !== null && _themeConfig$data$zau !== void 0 ? _themeConfig$data$zau : configRequiredAlign) !== null && _ref2 !== void 0 ? _ref2 : 'left';
95
- }, [themeConfig === null || themeConfig === void 0 ? void 0 : (_themeConfig$data2 = themeConfig.data) === null || _themeConfig$data2 === void 0 ? void 0 : _themeConfig$data2.zauiFormAlign, configRequiredAlign]);
92
+ return (_ref2 = (_themeConfig$data$zau = themeConfig === null || themeConfig === void 0 || (_themeConfig$data = themeConfig.data) === null || _themeConfig$data === void 0 ? void 0 : _themeConfig$data.zauiFormAlign) !== null && _themeConfig$data$zau !== void 0 ? _themeConfig$data$zau : configRequiredAlign) !== null && _ref2 !== void 0 ? _ref2 : 'left';
93
+ }, [themeConfig === null || themeConfig === void 0 || (_themeConfig$data2 = themeConfig.data) === null || _themeConfig$data2 === void 0 ? void 0 : _themeConfig$data2.zauiFormAlign, configRequiredAlign]);
96
94
  var _useSetState = useSetState({
97
95
  cellNamePath: [],
96
+ // hover模式下正在编辑的单元格路径
98
97
  forceUpdate: {},
98
+ // 表格内部强制刷新开关
99
99
  editingKeys: [],
100
+ // 正在编辑行的row-key集合
100
101
  selectedRowKeys: [],
102
+ // 当前选中行的row-key集合
101
103
  selectedRows: [],
104
+ // 当前选中行的row-key集合
102
105
  virtualKey: type === 'single' || mode === 'single' ? getRandom() : '',
106
+ // 单行编辑生成个随机formItem的key
103
107
  page: {
104
108
  pageNum: 1,
105
109
  pageSize: (pagination === null || pagination === void 0 ? void 0 : pagination.pageSize) || 10
@@ -115,15 +119,16 @@ var ProEditTable = function ProEditTable(_ref, ref) {
115
119
  selectedRowKeys = state.selectedRowKeys,
116
120
  selectedRows = state.selectedRows,
117
121
  page = state.page;
118
- var virtualRowName = getNamePath(_isArray(name) ? name : [name], virtualKey);
122
+ var virtualRowName = getNamePath(isArray(name) ? name : [name], virtualKey);
123
+
119
124
  // 样式处理
120
125
  var _className = classnames({
121
126
  'pro-edit-table': true,
122
127
  'pro-edit-table-drag': draggable,
123
128
  'pro-table-no-stripe': !stripe,
124
- className: className
129
+ className
125
130
  });
126
- var getRowKey = function getRowKey(record) {
131
+ var getRowKey = record => {
127
132
  var key = record.rowKey || getRandom();
128
133
  if (rowKey) {
129
134
  var _ref3;
@@ -131,43 +136,38 @@ var ProEditTable = function ProEditTable(_ref, ref) {
131
136
  }
132
137
  return key;
133
138
  };
134
- var originalValues = useMemo(function () {
139
+ var originalValues = useMemo(() => {
135
140
  var _originalArr$every, _originalArr$some;
136
141
  var nextOriginalValues;
137
142
  // 原始值也需要设置对应的rowkey,后续比对通过rowkey对比
138
- var originalArr = _get(resetProps === null || resetProps === void 0 ? void 0 : resetProps.originalValues, name);
139
- var isOriginalAllHasKey = originalArr ? originalArr === null || originalArr === void 0 ? void 0 : (_originalArr$every = originalArr.every) === null || _originalArr$every === void 0 ? void 0 : _originalArr$every.call(originalArr, function (item) {
140
- return item.rowKey;
141
- }) : true;
142
- var isNeedCoverOriginal = originalArr === null || originalArr === void 0 ? void 0 : (_originalArr$some = originalArr.some) === null || _originalArr$some === void 0 ? void 0 : _originalArr$some.call(originalArr, function (item) {
143
- return item.rowKey !== getRowKey(item);
144
- });
143
+ var originalArr = get(resetProps === null || resetProps === void 0 ? void 0 : resetProps.originalValues, name);
144
+ var isOriginalAllHasKey = originalArr ? originalArr === null || originalArr === void 0 || (_originalArr$every = originalArr.every) === null || _originalArr$every === void 0 ? void 0 : _originalArr$every.call(originalArr, item => item.rowKey) : true;
145
+ var isNeedCoverOriginal = originalArr === null || originalArr === void 0 || (_originalArr$some = originalArr.some) === null || _originalArr$some === void 0 ? void 0 : _originalArr$some.call(originalArr, item => item.rowKey !== getRowKey(item));
145
146
  // 初始化默认生成row-key
146
- if ((originalArr === null || originalArr === void 0 ? void 0 : originalArr.length) && (!isOriginalAllHasKey || isNeedCoverOriginal)) {
147
+ if (originalArr !== null && originalArr !== void 0 && originalArr.length && (!isOriginalAllHasKey || isNeedCoverOriginal)) {
147
148
  var _originalArr$forEach;
148
- originalArr === null || originalArr === void 0 ? void 0 : (_originalArr$forEach = originalArr.forEach) === null || _originalArr$forEach === void 0 ? void 0 : _originalArr$forEach.call(originalArr, function (item) {
149
+ originalArr === null || originalArr === void 0 || (_originalArr$forEach = originalArr.forEach) === null || _originalArr$forEach === void 0 || _originalArr$forEach.call(originalArr, item => {
149
150
  item.rowKey = getRowKey(item);
150
151
  });
151
152
  }
152
- if (originalArr === null || originalArr === void 0 ? void 0 : originalArr.length) {
153
+ if (originalArr !== null && originalArr !== void 0 && originalArr.length) {
153
154
  nextOriginalValues = {};
154
- _set(nextOriginalValues, name, originalArr);
155
+ set(nextOriginalValues, name, originalArr);
155
156
  }
156
157
  return nextOriginalValues;
157
158
  }, [resetProps === null || resetProps === void 0 ? void 0 : resetProps.originalValues]);
158
- var getIsNew = function getIsNew(record) {
159
+ var getIsNew = record => {
159
160
  var _originalArr$find;
160
- var originalArr = _get(originalValues, name);
161
- if (!(originalArr === null || originalArr === void 0 ? void 0 : originalArr.length)) {
161
+ var originalArr = get(originalValues, name);
162
+ if (!(originalArr !== null && originalArr !== void 0 && originalArr.length)) {
162
163
  return false;
163
164
  }
164
- return !(originalArr === null || originalArr === void 0 ? void 0 : (_originalArr$find = originalArr.find) === null || _originalArr$find === void 0 ? void 0 : _originalArr$find.call(originalArr, function (item) {
165
- return getRowKey(item) === getRowKey(record);
166
- }));
165
+ return !(originalArr !== null && originalArr !== void 0 && (_originalArr$find = originalArr.find) !== null && _originalArr$find !== void 0 && _originalArr$find.call(originalArr, item => getRowKey(item) === getRowKey(record)));
167
166
  };
167
+
168
168
  // 分页变更
169
- var handlePageChange = useCallback(/*#__PURE__*/function () {
170
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(current, pageSize) {
169
+ var handlePageChange = useCallback( /*#__PURE__*/function () {
170
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(current, pageSize) {
171
171
  return _regeneratorRuntime().wrap(function _callee$(_context) {
172
172
  while (1) switch (_context.prev = _context.next) {
173
173
  case 0:
@@ -183,7 +183,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
183
183
  setState({
184
184
  page: {
185
185
  pageNum: current,
186
- pageSize: pageSize
186
+ pageSize
187
187
  }
188
188
  });
189
189
  return _context.abrupt("return");
@@ -217,61 +217,62 @@ var ProEditTable = function ProEditTable(_ref, ref) {
217
217
  };
218
218
  }(), [pagination, page.pageSize, form, name]);
219
219
  var config = _objectSpread({
220
- form: form,
221
- mode: mode,
222
- isView: isView,
223
- viewEmpty: viewEmpty,
224
- disabled: disabled,
225
- cellNamePath: cellNamePath,
226
- forceUpdate: forceUpdate,
227
- insertType: insertType,
228
- emptyBtnText: emptyBtnText,
229
- editingKeys: editingKeys,
230
- actionWidth: actionWidth,
231
- actionProps: actionProps,
232
- toolbarProps: toolbarProps,
233
- setState: setState,
234
- selectedRowKeys: selectedRowKeys,
235
- selectedRows: selectedRows,
236
- onlyOneLineMsg: onlyOneLineMsg,
237
- deletePoConfirmMsg: deletePoConfirmMsg,
238
- mulDeletePoConfirmMsg: mulDeletePoConfirmMsg,
239
- virtualKey: virtualKey,
240
- requiredAlign: requiredAlign,
241
- name: _isArray(name) ? name : [name],
242
- namePath: namePath,
243
- tableRef: tableRef,
244
- max: max,
220
+ form,
221
+ mode,
222
+ isView,
223
+ viewEmpty,
224
+ disabled,
225
+ cellNamePath,
226
+ forceUpdate,
227
+ insertType,
228
+ emptyBtnText,
229
+ editingKeys,
230
+ actionWidth,
231
+ actionProps,
232
+ toolbarProps,
233
+ setState,
234
+ selectedRowKeys,
235
+ selectedRows,
236
+ onlyOneLineMsg,
237
+ deletePoConfirmMsg,
238
+ mulDeletePoConfirmMsg,
239
+ virtualKey,
240
+ requiredAlign,
241
+ name: isArray(name) ? name : [name],
242
+ // name需要处理成namePath形式,为兼容多路径
243
+ namePath,
244
+ tableRef,
245
+ max,
245
246
  tableLength: value === null || value === void 0 ? void 0 : value.length,
246
- page: page,
247
- originalValues: originalValues,
248
- prefixCls: prefixCls,
249
- rowDisabled: rowDisabled,
250
- actionDirection: actionDirection,
251
- diffConfig: _objectSpread(_objectSpread({}, resetProps === null || resetProps === void 0 ? void 0 : (_resetProps$otherProp = resetProps.otherProps) === null || _resetProps$otherProp === void 0 ? void 0 : _resetProps$otherProp.diffConfig), diffConfig),
252
- getIsNew: getIsNew,
253
- handlePageChange: handlePageChange
247
+ page,
248
+ originalValues,
249
+ prefixCls,
250
+ rowDisabled,
251
+ actionDirection,
252
+ diffConfig: _objectSpread(_objectSpread({}, resetProps === null || resetProps === void 0 || (_resetProps$otherProp = resetProps.otherProps) === null || _resetProps$otherProp === void 0 ? void 0 : _resetProps$otherProp.diffConfig), diffConfig),
253
+ getIsNew,
254
+ handlePageChange
254
255
  }, resetProps);
256
+
255
257
  // 编辑行设置下样式
256
- var _rowClassName = function _rowClassName(record) {
258
+ var _rowClassName = record => {
257
259
  var isEdit = !virtualKey || editingKeys.includes(record.rowKey);
258
260
  var className = isEdit ? 'is-editing' : '';
259
261
  if (getIsNew(record)) {
260
- return "is-new-row ".concat(className);
262
+ return `is-new-row ${className}`;
261
263
  }
262
264
  return className;
263
265
  };
266
+
264
267
  // 判断是否禁止添加、批量删除
265
- var isForbiddenBtn = useCallback(function (type) {
268
+ var isForbiddenBtn = useCallback(type => {
266
269
  // 当工具栏不渲染时,都不渲染
267
270
  if (toolbarProps === false) {
268
271
  return true;
269
272
  }
270
273
  // 通过配置项配置show 为 false 开启关闭添加与批量删除
271
274
  if (Array.isArray(toolbarProps)) {
272
- var addBtnConfig = toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.find(function (item) {
273
- return item.type === type;
274
- });
275
+ var addBtnConfig = toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.find(item => item.type === type);
275
276
  if (typeof (addBtnConfig === null || addBtnConfig === void 0 ? void 0 : addBtnConfig.show) === 'function') {
276
277
  var result = addBtnConfig.show();
277
278
  addBtnConfig.show = result;
@@ -280,19 +281,21 @@ var ProEditTable = function ProEditTable(_ref, ref) {
280
281
  }
281
282
  return false;
282
283
  }, [toolbarProps]);
284
+
283
285
  // 是否隐藏勾选框
284
286
  var isHideCheckBox = isForbiddenBtn('mulDelete');
287
+
285
288
  // 复选框
286
289
  var _rowSelection = _objectSpread({
287
290
  fixed: true,
288
- selectedRowKeys: selectedRowKeys,
289
- onChange: function onChange(selectedRowKeys, selectedRows) {
291
+ selectedRowKeys,
292
+ onChange: (selectedRowKeys, selectedRows) => {
290
293
  setState({
291
- selectedRowKeys: selectedRowKeys,
292
- selectedRows: selectedRows
294
+ selectedRowKeys,
295
+ selectedRows
293
296
  });
294
297
  },
295
- getCheckboxProps: function getCheckboxProps(record) {
298
+ getCheckboxProps(record) {
296
299
  if (rowDisabled) {
297
300
  var _disabled = rowDisabled(record);
298
301
  return {
@@ -303,33 +306,33 @@ var ProEditTable = function ProEditTable(_ref, ref) {
303
306
  },
304
307
  hideSelectAll: isHideCheckBox
305
308
  }, rowSelection);
309
+
306
310
  // 空列表状态
307
- var empty = function empty() {
308
- var _toolbarProps$filter;
309
- return _jsxs("div", {
311
+ var empty = () => {
312
+ var _filter, _ref5;
313
+ return /*#__PURE__*/_jsxs("div", {
310
314
  className: "com-empty",
311
- children: [_jsx("img", {
315
+ children: [/*#__PURE__*/_jsx("img", {
312
316
  className: "img",
313
317
  src: Empty,
314
318
  alt: "Empty"
315
- }), _jsx("div", {
319
+ }), /*#__PURE__*/_jsx("div", {
316
320
  className: "content",
317
- children: disabled || isForbiddenBtn('add') ? locale.ProEditTable.noData : _jsxs(_Fragment, {
318
- children: [locale.ProEditTable.noData, "\uFF0C", _jsx(RenderToolbar, _objectSpread({}, _objectSpread(_objectSpread({}, config), {}, {
319
- toolbarProps: toolbarProps === null || toolbarProps === void 0 ? void 0 : (_toolbarProps$filter = toolbarProps.filter) === null || _toolbarProps$filter === void 0 ? void 0 : _toolbarProps$filter.call(toolbarProps, function (item) {
320
- return item.type === 'add' || (item === null || item === void 0 ? void 0 : item.persistence);
321
- }),
321
+ children: disabled || isForbiddenBtn('add') ? locale.ProEditTable.noData : /*#__PURE__*/_jsxs(_Fragment, {
322
+ children: [locale.ProEditTable.noData, "\uFF0C", /*#__PURE__*/_jsx(RenderToolbar, _objectSpread({}, _objectSpread(_objectSpread({}, config), {}, {
323
+ toolbarProps: toolbarProps === null || toolbarProps === void 0 || (_filter = (_ref5 = toolbarProps).filter) === null || _filter === void 0 ? void 0 : _filter.call(_ref5, item => item.type === 'add' || (item === null || item === void 0 ? void 0 : item.persistence)),
322
324
  dataSource: []
323
325
  })))]
324
326
  })
325
327
  })]
326
328
  });
327
329
  };
330
+
328
331
  /**
329
332
  * 渲染表格选择器
330
333
  * @returns rowSelection
331
334
  */
332
- var renderRowSelection = function renderRowSelection() {
335
+ var renderRowSelection = () => {
333
336
  if (disabled || isView) {
334
337
  return null;
335
338
  }
@@ -341,128 +344,121 @@ var ProEditTable = function ProEditTable(_ref, ref) {
341
344
  }
342
345
  return null;
343
346
  };
344
- useDeepCompareEffect(function () {
347
+ useDeepCompareEffect(() => {
345
348
  valueChangeRef.current += 1;
346
349
  // 在这里根据需要计算新的数组
347
350
  }, [value, config.name]);
348
- var _columns = useMemo(function () {
351
+ var _columns = useMemo(() => {
349
352
  return transformColumns(columns, config);
350
353
  }, [valueChangeRef.current, disabled, forceUpdate, columns, page, actionProps, editingKeys, cellNamePath, value === null || value === void 0 ? void 0 : value.length]);
351
- var initDataSource = function initDataSource() {
354
+ var initDataSource = () => {
352
355
  var _value$every, _value$some;
353
- var isAllHasKey = value === null || value === void 0 ? void 0 : (_value$every = value.every) === null || _value$every === void 0 ? void 0 : _value$every.call(value, function (item) {
354
- return item.rowKey;
355
- });
356
+ var isAllHasKey = value === null || value === void 0 || (_value$every = value.every) === null || _value$every === void 0 ? void 0 : _value$every.call(value, item => item.rowKey);
357
+
356
358
  // 检测当前rowkey是否与制定key的值是否一致,不一致,则执行覆盖
357
- var isNeedCover = value === null || value === void 0 ? void 0 : (_value$some = value.some) === null || _value$some === void 0 ? void 0 : _value$some.call(value, function (item) {
358
- return item.rowKey !== getRowKey(item);
359
- });
359
+ var isNeedCover = value === null || value === void 0 || (_value$some = value.some) === null || _value$some === void 0 ? void 0 : _value$some.call(value, item => item.rowKey !== getRowKey(item));
360
360
  // 初始化默认生成row-key
361
- if ((value === null || value === void 0 ? void 0 : value.length) && (!isAllHasKey || isNeedCover)) {
362
- var nextValues = value === null || value === void 0 ? void 0 : value.map(function (item) {
361
+ if (value !== null && value !== void 0 && value.length && (!isAllHasKey || isNeedCover)) {
362
+ var nextValues = value === null || value === void 0 ? void 0 : value.map(item => {
363
363
  return _objectSpread(_objectSpread({}, item), {}, {
364
364
  rowKey: getRowKey(item)
365
365
  });
366
366
  });
367
- onChange === null || onChange === void 0 ? void 0 : onChange(nextValues);
367
+ onChange === null || onChange === void 0 || onChange(nextValues);
368
368
  if (virtualKey) {
369
369
  form.setFieldValue(virtualRowName, nextValues);
370
370
  }
371
371
  }
372
372
  };
373
- useEffect(function () {
373
+ useEffect(() => {
374
374
  initDataSource();
375
375
  }, [value, originalValues]);
376
- useImperativeHandle((resetProps === null || resetProps === void 0 ? void 0 : resetProps.ref) || ref, function () {
376
+ useImperativeHandle((resetProps === null || resetProps === void 0 ? void 0 : resetProps.ref) || ref, () => {
377
377
  return {
378
- getInternalState: function getInternalState() {
379
- return state;
380
- },
378
+ getInternalState: () => state,
381
379
  setInternalState: setState
382
380
  };
383
381
  });
384
- useEffect(function () {
382
+ useEffect(() => {
385
383
  if (toolbarSticky) {
386
- var updatePos = function updatePos() {
384
+ var updatePos = () => {
387
385
  var _affixRef$current, _affixRef$current$upd;
388
- affixRef === null || affixRef === void 0 ? void 0 : (_affixRef$current = affixRef.current) === null || _affixRef$current === void 0 ? void 0 : (_affixRef$current$upd = _affixRef$current.updatePosition) === null || _affixRef$current$upd === void 0 ? void 0 : _affixRef$current$upd.call(_affixRef$current);
386
+ affixRef === null || affixRef === void 0 || (_affixRef$current = affixRef.current) === null || _affixRef$current === void 0 || (_affixRef$current$upd = _affixRef$current.updatePosition) === null || _affixRef$current$upd === void 0 || _affixRef$current$upd.call(_affixRef$current);
389
387
  };
390
388
  window.addEventListener('scroll', updatePos, true);
391
- return function () {
389
+ return () => {
392
390
  window.removeEventListener('scroll', updatePos, true);
393
391
  };
394
392
  }
395
393
  }, [toolbarSticky]);
396
- var _toolbarSticky = _isBoolean(toolbarSticky) ? {} : toolbarSticky;
397
- var _summary = _typeof(summary) === 'object' ? function (data) {
398
- return _jsx(Summary, {
399
- data: data,
400
- summary: summary,
401
- rowSelection: renderRowSelection()
402
- });
403
- } : summary;
394
+ var _toolbarSticky = isBoolean(toolbarSticky) ? {} : toolbarSticky;
395
+ var _summary = typeof summary === 'object' ? data => /*#__PURE__*/_jsx(Summary, {
396
+ data: data,
397
+ summary: summary,
398
+ rowSelection: renderRowSelection()
399
+ }) : summary;
404
400
  var TableComponent = draggable ? DraggableTable : virtual ? VirtualTable : BaseTable;
405
- return _jsxs(_Fragment, {
406
- children: [_jsxs(_ConfigProvider, {
407
- renderEmpty: (value === null || value === void 0 ? void 0 : value.length) ? undefined : empty,
408
- children: [_jsx(TableComponent, _objectSpread(_objectSpread({}, resetProps), {}, {
401
+ return /*#__PURE__*/_jsxs(_Fragment, {
402
+ children: [/*#__PURE__*/_jsxs(_ConfigProvider, {
403
+ renderEmpty: value !== null && value !== void 0 && value.length ? undefined : empty,
404
+ children: [/*#__PURE__*/_jsx(TableComponent, _objectSpread(_objectSpread({}, resetProps), {}, {
409
405
  draggableProps: {
410
- onChange: onChange,
411
- onDrag: onDrag,
412
- onDragEnd: onDragEnd,
413
- draggable: draggable
406
+ onChange,
407
+ onDrag,
408
+ onDragEnd,
409
+ draggable
414
410
  },
415
411
  tableProps: {
416
- value: value,
417
- headerRender: headerRender,
418
- tableRef: tableRef,
412
+ value,
413
+ headerRender,
414
+ tableRef,
419
415
  className: _className,
420
416
  columns: _columns,
421
- renderRowSelection: renderRowSelection,
417
+ renderRowSelection,
422
418
  rowClassName: _rowClassName,
423
- disabled: disabled,
424
- virtualKey: virtualKey,
425
- editingKeys: editingKeys,
426
- isHideCheckBox: isHideCheckBox,
427
- rowDraggable: rowDraggable,
428
- pagination: pagination,
429
- scroll: scroll,
419
+ disabled,
420
+ virtualKey,
421
+ editingKeys,
422
+ isHideCheckBox,
423
+ rowDraggable,
424
+ pagination,
425
+ scroll,
430
426
  summary: _summary,
431
- page: page,
432
- formatMessage: formatMessage,
433
- locale: locale,
434
- handlePageChange: handlePageChange
427
+ page,
428
+ formatMessage,
429
+ locale,
430
+ handlePageChange
435
431
  }
436
- })), !isView && (value === null || value === void 0 ? void 0 : value.length) ? toolbarSticky ? _jsx(_Affix, _objectSpread(_objectSpread({
432
+ })), !isView && value !== null && value !== void 0 && value.length ? toolbarSticky ? /*#__PURE__*/_jsx(_Affix, _objectSpread(_objectSpread({
437
433
  ref: affixRef
438
434
  }, _toolbarSticky), {}, {
439
- children: _jsx("div", {
440
- className: "pro-edit-table-toolbar".concat(pagination ? ' pro-edit-table-toolbar-fixed' : ''),
441
- children: _jsx(RenderToolbar, _objectSpread({}, config))
435
+ children: /*#__PURE__*/_jsx("div", {
436
+ className: `pro-edit-table-toolbar${pagination ? ' pro-edit-table-toolbar-fixed' : ''}`,
437
+ children: /*#__PURE__*/_jsx(RenderToolbar, _objectSpread({}, config))
442
438
  })
443
- })) : _jsx("div", {
444
- className: "pro-edit-table-toolbar".concat(pagination ? ' pro-edit-table-toolbar-fixed' : ''),
445
- children: _jsx(RenderToolbar, _objectSpread({}, config))
446
- }) : null, footerRender ? _jsx("div", {
439
+ })) : /*#__PURE__*/_jsx("div", {
440
+ className: `pro-edit-table-toolbar${pagination ? ' pro-edit-table-toolbar-fixed' : ''}`,
441
+ children: /*#__PURE__*/_jsx(RenderToolbar, _objectSpread({}, config))
442
+ }) : null, footerRender ? /*#__PURE__*/_jsx("div", {
447
443
  className: "pro-edit-table-footer",
448
444
  children: footerRender
449
- }) : null, pagination ? _jsx("div", {
450
- id: "pro-edit-table-pagination-".concat(config.name.join('-')),
451
- onClick: function onClick() {
445
+ }) : null, pagination ? /*#__PURE__*/_jsx("div", {
446
+ id: `pro-edit-table-pagination-${config.name.join('-')}`,
447
+ onClick: () => {
452
448
  onPageCheck({
453
- form: form,
454
- name: name,
455
- value: value,
456
- columns: columns,
457
- page: page,
458
- pagination: pagination,
459
- isView: isView,
460
- disabled: disabled,
461
- setState: setState
449
+ form,
450
+ name,
451
+ value,
452
+ columns,
453
+ page,
454
+ pagination,
455
+ isView,
456
+ disabled,
457
+ setState
462
458
  });
463
459
  }
464
460
  }) : null]
465
- }), _jsx(Validator, {
461
+ }), /*#__PURE__*/_jsx(Validator, {
466
462
  name: name,
467
463
  virtualKey: virtualKey,
468
464
  editingKeys: editingKeys,
@@ -488,5 +484,6 @@ ForwardProEditTable.defaultProps = {
488
484
  deletePoConfirmMsg: locale.ProEditTable.deletePoConfirmMsg,
489
485
  mulDeletePoConfirmMsg: locale.ProEditTable.mulDeletePoConfirmMsg
490
486
  };
487
+
491
488
  // 导出组件
492
489
  export default ForwardProEditTable;