@zat-design/sisyphus-react 3.13.18 → 3.13.19-beta.10

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 (432) hide show
  1. package/es/FormsProvider/index.js +9 -7
  2. package/es/ProAction/components/CheckModalContent/index.js +14 -14
  3. package/es/ProAction/index.js +46 -47
  4. package/es/ProConfigProvider/index.js +32 -17
  5. package/es/ProDownload/index.js +66 -73
  6. package/es/ProDownload/utils.js +26 -23
  7. package/es/ProDrawerForm/components/ProDrawer/index.js +43 -39
  8. package/es/ProDrawerForm/components/ProModal/index.js +25 -23
  9. package/es/ProDrawerForm/components/index.js +2 -2
  10. package/es/ProDrawerForm/index.js +19 -21
  11. package/es/ProDrawerForm/utils/index.js +1 -1
  12. package/es/ProEditLabel/components/RenderProForm.js +30 -26
  13. package/es/ProEditLabel/index.js +49 -36
  14. package/es/ProEditLabel/utils/index.js +4 -3
  15. package/es/ProEditTable/components/ActionButton/index.js +83 -76
  16. package/es/ProEditTable/components/RcTable/BaseTable.js +24 -24
  17. package/es/ProEditTable/components/RcTable/DraggableTable.js +34 -41
  18. package/es/ProEditTable/components/RcTable/VirtualTable.js +4 -3
  19. package/es/ProEditTable/components/RcTable/index.js +3 -3
  20. package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +61 -58
  21. package/es/ProEditTable/components/RenderField/index.js +151 -145
  22. package/es/ProEditTable/components/RenderToolbar/index.js +37 -42
  23. package/es/ProEditTable/components/Summary/index.js +22 -21
  24. package/es/ProEditTable/components/Validator/index.js +11 -10
  25. package/es/ProEditTable/components/index.js +5 -5
  26. package/es/ProEditTable/index.d.ts +1 -1
  27. package/es/ProEditTable/index.js +170 -173
  28. package/es/ProEditTable/utils/config.js +42 -46
  29. package/es/ProEditTable/utils/diffOriginal.js +34 -19
  30. package/es/ProEditTable/utils/getDefaultProps.js +12 -13
  31. package/es/ProEditTable/utils/index.js +102 -99
  32. package/es/ProEditTable/utils/tools.js +88 -91
  33. package/es/ProEditTable/utils/transform.js +7 -11
  34. package/es/ProEditTable/utils/useEditTableError.js +22 -13
  35. package/es/ProEnum/components/Group.js +23 -27
  36. package/es/ProEnum/components/Tag.js +14 -16
  37. package/es/ProEnum/hooks/useEnum.js +32 -14
  38. package/es/ProEnum/hooks/useEnumRequest.js +42 -42
  39. package/es/ProEnum/hooks/useFrequentEnumRequest.d.ts +14 -0
  40. package/es/ProEnum/hooks/useFrequentEnumRequest.js +76 -0
  41. package/es/ProEnum/index.js +97 -97
  42. package/es/ProEnum/propsType.d.ts +29 -0
  43. package/es/ProEnum/utils/eventCenter.js +23 -32
  44. package/es/ProEnum/utils/frequentEnum.d.ts +40 -0
  45. package/es/ProEnum/utils/frequentEnum.js +91 -0
  46. package/es/ProEnum/utils/getEnumLabel.js +16 -21
  47. package/es/ProEnum/utils/index.js +12 -7
  48. package/es/ProForm/components/Container.js +8 -6
  49. package/es/ProForm/components/FormFooter/index.js +21 -19
  50. package/es/ProForm/components/base/Checkbox/index.js +16 -15
  51. package/es/ProForm/components/base/DatePicker/index.js +23 -20
  52. package/es/ProForm/components/base/Input/index.js +20 -18
  53. package/es/ProForm/components/base/InputNumber/index.js +57 -53
  54. package/es/ProForm/components/base/Radio/index.js +15 -15
  55. package/es/ProForm/components/base/RangePicker/index.js +24 -29
  56. package/es/ProForm/components/base/RangePicker/useDateRange.js +3 -3
  57. package/es/ProForm/components/base/Select/index.js +17 -15
  58. package/es/ProForm/components/base/Switch/index.js +16 -15
  59. package/es/ProForm/components/base/SwitchCheckbox/index.js +19 -18
  60. package/es/ProForm/components/base/TextArea/index.js +18 -17
  61. package/es/ProForm/components/base/TimePicker/index.js +10 -9
  62. package/es/ProForm/components/combination/Container/index.js +25 -23
  63. package/es/ProForm/components/combination/FormList/components/ActionButton.js +80 -92
  64. package/es/ProForm/components/combination/FormList/components/BlockFields.js +21 -19
  65. package/es/ProForm/components/combination/FormList/components/BlockTitle.js +7 -7
  66. package/es/ProForm/components/combination/FormList/components/Empty.js +21 -20
  67. package/es/ProForm/components/combination/FormList/components/LineFields.js +19 -18
  68. package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +45 -51
  69. package/es/ProForm/components/combination/FormList/index.js +43 -51
  70. package/es/ProForm/components/combination/FormList/utils.js +9 -9
  71. package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +8 -6
  72. package/es/ProForm/components/combination/Group/component/ComRender.js +33 -29
  73. package/es/ProForm/components/combination/Group/hooks/index.js +49 -47
  74. package/es/ProForm/components/combination/Group/index.js +38 -37
  75. package/es/ProForm/components/combination/Group/utils.js +56 -50
  76. package/es/ProForm/components/combination/ProCascader/index.js +81 -85
  77. package/es/ProForm/components/combination/ProCascader/utils/index.js +6 -6
  78. package/es/ProForm/components/combination/ProCombination/index.js +41 -37
  79. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +31 -25
  80. package/es/ProForm/components/combination/ProModalSelect/index.js +166 -173
  81. package/es/ProForm/components/combination/ProModalSelect/utils/index.js +1 -1
  82. package/es/ProForm/components/combination/ProNumberRange/index.js +46 -51
  83. package/es/ProForm/components/combination/ProNumberRange/style/index.less +5 -0
  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 -120
  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 +31 -15
  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 -60
  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.d.ts +14 -0
  256. package/lib/ProEnum/hooks/useFrequentEnumRequest.js +83 -0
  257. package/lib/ProEnum/index.js +85 -86
  258. package/lib/ProEnum/propsType.d.ts +29 -0
  259. package/lib/ProEnum/utils/eventCenter.js +23 -32
  260. package/lib/ProEnum/utils/frequentEnum.d.ts +40 -0
  261. package/lib/ProEnum/utils/frequentEnum.js +99 -0
  262. package/lib/ProEnum/utils/getEnumLabel.js +15 -21
  263. package/lib/ProEnum/utils/index.js +12 -7
  264. package/lib/ProForm/components/Container.js +7 -5
  265. package/lib/ProForm/components/FormFooter/index.js +19 -17
  266. package/lib/ProForm/components/base/Checkbox/index.js +14 -13
  267. package/lib/ProForm/components/base/DatePicker/index.js +20 -17
  268. package/lib/ProForm/components/base/Input/index.js +15 -15
  269. package/lib/ProForm/components/base/InputNumber/index.js +51 -48
  270. package/lib/ProForm/components/base/Radio/index.js +13 -13
  271. package/lib/ProForm/components/base/RangePicker/index.js +19 -22
  272. package/lib/ProForm/components/base/RangePicker/useDateRange.js +5 -4
  273. package/lib/ProForm/components/base/Select/index.js +14 -12
  274. package/lib/ProForm/components/base/Switch/index.js +11 -11
  275. package/lib/ProForm/components/base/SwitchCheckbox/index.js +16 -15
  276. package/lib/ProForm/components/base/TextArea/index.js +14 -13
  277. package/lib/ProForm/components/base/TimePicker/index.js +6 -5
  278. package/lib/ProForm/components/combination/Container/index.js +22 -21
  279. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +77 -89
  280. package/lib/ProForm/components/combination/FormList/components/BlockFields.js +17 -15
  281. package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +7 -7
  282. package/lib/ProForm/components/combination/FormList/components/Empty.js +17 -18
  283. package/lib/ProForm/components/combination/FormList/components/LineFields.js +14 -14
  284. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +43 -48
  285. package/lib/ProForm/components/combination/FormList/index.js +35 -43
  286. package/lib/ProForm/components/combination/FormList/utils.js +11 -10
  287. package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +7 -5
  288. package/lib/ProForm/components/combination/Group/component/ComRender.js +30 -28
  289. package/lib/ProForm/components/combination/Group/hooks/index.js +48 -45
  290. package/lib/ProForm/components/combination/Group/index.js +34 -35
  291. package/lib/ProForm/components/combination/Group/utils.js +62 -50
  292. package/lib/ProForm/components/combination/ProCascader/index.js +75 -80
  293. package/lib/ProForm/components/combination/ProCascader/utils/index.js +8 -7
  294. package/lib/ProForm/components/combination/ProCombination/index.js +35 -31
  295. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +30 -24
  296. package/lib/ProForm/components/combination/ProModalSelect/index.js +171 -180
  297. package/lib/ProForm/components/combination/ProModalSelect/utils/index.js +3 -2
  298. package/lib/ProForm/components/combination/ProNumberRange/index.js +42 -48
  299. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +5 -0
  300. package/lib/ProForm/components/combination/ProRangeLimit/index.js +35 -35
  301. package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +3 -3
  302. package/lib/ProForm/components/combination/ProTimeLimit/index.js +37 -34
  303. package/lib/ProForm/components/index.d.ts +1 -0
  304. package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +35 -33
  305. package/lib/ProForm/components/old/EnumSelect/index.js +50 -58
  306. package/lib/ProForm/components/old/InputRange/index.js +16 -16
  307. package/lib/ProForm/components/old/InputWithSuffix/index.js +4 -4
  308. package/lib/ProForm/components/old/ProAddress/index.js +53 -75
  309. package/lib/ProForm/components/old/ProCertNo/index.js +16 -17
  310. package/lib/ProForm/components/old/ProCertValidity/index.js +17 -18
  311. package/lib/ProForm/components/old/ProRangeBox/index.js +24 -24
  312. package/lib/ProForm/components/render/ChangedWrapper.js +35 -35
  313. package/lib/ProForm/components/render/ConfirmWrapper.js +14 -17
  314. package/lib/ProForm/components/render/Render.js +138 -125
  315. package/lib/ProForm/components/render/RenderFields.js +57 -43
  316. package/lib/ProForm/components/render/propsType.js +26 -1
  317. package/lib/ProForm/index.js +74 -61
  318. package/lib/ProForm/propsType.d.ts +1 -1
  319. package/lib/ProForm/propsType.js +5 -1
  320. package/lib/ProForm/utils/diffOriginal.js +30 -17
  321. package/lib/ProForm/utils/getDefaultProps.js +12 -12
  322. package/lib/ProForm/utils/index.js +127 -106
  323. package/lib/ProForm/utils/processDependencies.js +15 -6
  324. package/lib/ProForm/utils/rulesCreator.js +21 -21
  325. package/lib/ProForm/utils/transformNames.js +6 -6
  326. package/lib/ProForm/utils/transformValue.js +14 -11
  327. package/lib/ProForm/utils/useDeepCompareMemo.js +7 -6
  328. package/lib/ProForm/utils/useFieldProps.js +2 -3
  329. package/lib/ProForm/utils/useForm.js +33 -31
  330. package/lib/ProForm/utils/useRules.js +25 -28
  331. package/lib/ProForm/utils/useShouldUpdate.js +82 -85
  332. package/lib/ProForm/utils/useWatch.js +36 -14
  333. package/lib/ProForm/utils/valueType.js +52 -52
  334. package/lib/ProIcon/config/index.js +2 -0
  335. package/lib/ProIcon/index.js +47 -44
  336. package/lib/ProIcon/utils/index.js +10 -8
  337. package/lib/ProLayout/components/Layout/Header/index.js +10 -10
  338. package/lib/ProLayout/components/Layout/Icon/Icon.js +8 -7
  339. package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +37 -36
  340. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +49 -52
  341. package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +8 -8
  342. package/lib/ProLayout/components/Layout/Menu/index.js +17 -16
  343. package/lib/ProLayout/components/Layout/Notice/index.js +8 -8
  344. package/lib/ProLayout/components/ProCollapse/index.js +32 -30
  345. package/lib/ProLayout/components/ProFooter/index.js +14 -16
  346. package/lib/ProLayout/components/ProHeader/components/Copy/index.js +7 -7
  347. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +6 -7
  348. package/lib/ProLayout/components/ProHeader/index.js +131 -120
  349. package/lib/ProLayout/components/ProHeader/utils/index.js +3 -2
  350. package/lib/ProLayout/index.d.ts +1 -1
  351. package/lib/ProLayout/index.js +22 -21
  352. package/lib/ProLayout/utils/index.js +42 -33
  353. package/lib/ProSelect/components/AdaptiveTooltip.js +9 -11
  354. package/lib/ProSelect/index.js +82 -93
  355. package/lib/ProSelect/utils/index.js +29 -34
  356. package/lib/ProStep/components/Anchor/index.d.ts +1 -0
  357. package/lib/ProStep/components/Anchor/index.js +25 -24
  358. package/lib/ProStep/components/Item/index.d.ts +1 -0
  359. package/lib/ProStep/components/Item/index.js +24 -20
  360. package/lib/ProStep/components/Listener/index.js +9 -13
  361. package/lib/ProStep/components/Step/index.js +20 -21
  362. package/lib/ProStep/index.js +45 -49
  363. package/lib/ProStep/utils/index.js +16 -12
  364. package/lib/ProStepTab/index.js +60 -38
  365. package/lib/ProTable/components/FormatColumn/index.js +100 -104
  366. package/lib/ProTable/components/RcTable/components/BaseTable/index.js +5 -7
  367. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +34 -48
  368. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +25 -23
  369. package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +5 -7
  370. package/lib/ProTable/components/RenderColumn/index.js +46 -48
  371. package/lib/ProTable/components/RenderEmptyText/index.js +6 -6
  372. package/lib/ProTable/components/RenderFooter/index.js +3 -3
  373. package/lib/ProTable/components/RenderSummary/index.js +11 -12
  374. package/lib/ProTable/components/RenderTableHeader/index.js +14 -13
  375. package/lib/ProTable/components/RenderTabs/index.js +27 -32
  376. package/lib/ProTable/components/TableResizable/index.js +16 -15
  377. package/lib/ProTable/components/TooltipTitle/index.js +5 -5
  378. package/lib/ProTable/hooks/useAntdTable.js +103 -116
  379. package/lib/ProTable/index.js +149 -169
  380. package/lib/ProTable/utils/index.js +33 -22
  381. package/lib/ProTabs/components/Card/index.js +14 -14
  382. package/lib/ProTabs/index.js +24 -24
  383. package/lib/ProThemeTools/component/ProTools/index.js +66 -65
  384. package/lib/ProThemeTools/index.js +43 -29
  385. package/lib/ProThemeTools/utils/index.js +25 -18
  386. package/lib/ProTooltip/index.js +44 -46
  387. package/lib/ProTree/components/AdaptiveTooltip.js +5 -7
  388. package/lib/ProTree/components/CloseIcon.js +5 -5
  389. package/lib/ProTree/components/List.js +18 -22
  390. package/lib/ProTree/components/ProTree.js +77 -96
  391. package/lib/ProTree/components/ProTreeSelect/index.js +126 -117
  392. package/lib/ProTree/components/SearchTitle.js +8 -8
  393. package/lib/ProTree/components/Tree.js +53 -55
  394. package/lib/ProTree/index.js +4 -4
  395. package/lib/ProTree/utils.js +34 -25
  396. package/lib/ProTreeModal/components/Cascader.js +28 -32
  397. package/lib/ProTreeModal/components/CloseIcon.js +5 -5
  398. package/lib/ProTreeModal/components/List.js +69 -89
  399. package/lib/ProTreeModal/components/SearchTitle.js +4 -4
  400. package/lib/ProTreeModal/components/SortableItem.js +11 -12
  401. package/lib/ProTreeModal/components/Tree.js +44 -49
  402. package/lib/ProTreeModal/components/Trigger.js +26 -26
  403. package/lib/ProTreeModal/index.js +157 -199
  404. package/lib/ProTreeModal/utils.js +43 -35
  405. package/lib/ProUpload/components/ButtonRender.js +29 -33
  406. package/lib/ProUpload/components/DragRender.js +50 -48
  407. package/lib/ProUpload/components/DraggableUploadListItem.js +7 -5
  408. package/lib/ProUpload/components/Example.js +13 -11
  409. package/lib/ProUpload/components/FileItem.js +58 -50
  410. package/lib/ProUpload/components/ImageRender.js +89 -93
  411. package/lib/ProUpload/index.js +68 -76
  412. package/lib/ProUpload/uitls.js +5 -3
  413. package/lib/ProUtils/utils/index.js +10 -14
  414. package/lib/ProViewer/index.js +26 -24
  415. package/lib/ProViewer/propsType.js +1 -5
  416. package/lib/ProWaterMark/index.js +5 -4
  417. package/lib/index.d.ts +1 -1
  418. package/lib/locale/index.js +6 -2
  419. package/lib/old/ProCertValidity/index.js +17 -18
  420. package/lib/old/ProEditableTable/index.js +153 -156
  421. package/lib/old/ProEditableTable/utils.js +61 -62
  422. package/lib/tokens.js +1 -0
  423. package/lib/utils/index.js +16 -13
  424. package/package.json +8 -8
  425. package/dist/index.esm.css +0 -6338
  426. package/dist/index.esm.js +0 -3
  427. package/dist/less.esm.css +0 -5762
  428. package/dist/less.esm.js +0 -3
  429. package/tests/__mocks__/fileMock.js +0 -1
  430. package/tests/__mocks__/zatUtils.js +0 -27
  431. package/tests/setup.ts +0 -477
  432. package/tests/test-utils.tsx +0 -81
@@ -1,44 +1,51 @@
1
- import _isObject from "lodash/isObject";
2
- import _isFunction from "lodash/isFunction";
3
- import _isEqual from "lodash/isEqual";
4
- import { isEmpty } from '../../utils';
1
+ import { isEqual, isFunction, isObject } from 'lodash';
2
+ import { isEmpty } from "../../utils";
3
+
4
+ // 比较策略接口
5
+
5
6
  // 数字类型标准化函数
6
- var normalizeNumberValue = function normalizeNumberValue(value) {
7
+ var normalizeNumberValue = value => {
7
8
  if (value === null || value === undefined || value === '') return null;
8
9
  var num = Number(value);
9
10
  return Number.isNaN(num) ? null : num;
10
11
  };
12
+
11
13
  // InputNumber 比较策略
12
14
  var inputNumberStrategy = {
13
- compare: function compare(val1, val2) {
15
+ compare: (val1, val2) => {
14
16
  var num1 = normalizeNumberValue(val1);
15
17
  var num2 = normalizeNumberValue(val2);
16
18
  return num1 === num2;
17
19
  }
18
20
  };
21
+
19
22
  // ProNumberRange 比较策略
20
23
  var proNumberRangeStrategy = {
21
- compare: function compare(val1, val2) {
24
+ compare: (val1, val2) => {
22
25
  if (!Array.isArray(val1) || !Array.isArray(val2)) return false;
23
26
  if (val1.length !== val2.length) return false;
24
- return val1.every(function (item, index) {
27
+ return val1.every((item, index) => {
25
28
  var num1 = normalizeNumberValue(item);
26
29
  var num2 = normalizeNumberValue(val2[index]);
27
30
  return num1 === num2;
28
31
  });
29
32
  }
30
33
  };
34
+
31
35
  // 数字类型处理函数
32
- var handleNumberTypeDiff = function handleNumberTypeDiff(params) {
36
+ var handleNumberTypeDiff = params => {
33
37
  var originalValue = params.originalValue,
34
38
  value = params.value,
35
39
  type = params.type;
36
40
  var isEmptyVal = isEmpty(value);
37
41
  var isEmptyOrg = isEmpty(originalValue);
42
+
38
43
  // 都为空视为相等
39
44
  if (isEmptyOrg && isEmptyVal) return 'same';
45
+
40
46
  // 如果原始值为空 且当前有值的话 视为新增
41
47
  if (isEmptyOrg && !isEmptyVal) return 'add';
48
+
42
49
  // 根据类型选择对应的比较策略
43
50
  var compareStrategy;
44
51
  if (type === 'InputNumber') {
@@ -50,15 +57,17 @@ var handleNumberTypeDiff = function handleNumberTypeDiff(params) {
50
57
  }
51
58
  return compareStrategy.compare(value, originalValue) ? 'same' : 'changed';
52
59
  };
60
+
53
61
  // 过滤对象中undefined字段
54
62
  // 防止{a: '1'} {a: '1', b: undefined | null}被认为不相等
55
- var filterObject = function filterObject(data) {
56
- if (!_isObject(data) || data === null) return data;
63
+ var filterObject = data => {
64
+ if (!isObject(data) || data === null) return data;
65
+
57
66
  // ['1', undefined] ['1', ''] 视为相等
58
67
  if (Array.isArray(data)) {
59
68
  // 数组中全是empty值的话 视为null
60
69
  var isFillNull = true;
61
- var arr = data.map(function (item) {
70
+ var arr = data.map(item => {
62
71
  if (isEmpty(item)) {
63
72
  return null;
64
73
  }
@@ -68,22 +77,24 @@ var filterObject = function filterObject(data) {
68
77
  return isFillNull ? null : arr;
69
78
  }
70
79
  var resData = {};
71
- Object.keys(data).forEach(function (key) {
80
+ Object.keys(data).forEach(key => {
72
81
  if (!isEmpty(data[key])) {
73
82
  resData[key] = data[key];
74
83
  }
75
84
  });
85
+
76
86
  // 空对象视为null 比较时 null undefined {} [] '' 视为相等
77
87
  if (!Object.keys(resData).length) return null;
78
88
  return resData;
79
89
  };
80
- export var diffOriginal = function diffOriginal(params) {
90
+ export var diffOriginal = params => {
81
91
  var originalValue = params.originalValue,
82
92
  value = params.value,
83
93
  onDiff = params.onDiff,
84
94
  type = params.type;
95
+
85
96
  // 支持传入自定义比较事件
86
- if (_isFunction(onDiff)) {
97
+ if (isFunction(onDiff)) {
87
98
  var diffRes = onDiff(originalValue, value);
88
99
  // 如果返回undefined走内置比较逻辑
89
100
  if (diffRes !== undefined) {
@@ -96,14 +107,17 @@ export var diffOriginal = function diffOriginal(params) {
96
107
  if (['InputNumber', 'ProNumberRange'].includes(type)) {
97
108
  return handleNumberTypeDiff(params);
98
109
  }
110
+
99
111
  // 其他类型使用原有逻辑
100
112
  var _value = filterObject(value);
101
113
  var _originalValue = filterObject(originalValue);
102
114
  var isEmptyVal = isEmpty(_value);
103
115
  var isEmptyOrg = isEmpty(_originalValue);
116
+
104
117
  // 都为空视为相等
105
118
  if (isEmptyOrg && isEmptyVal) return 'same';
119
+
106
120
  // 如果原始值为空 且当前有值的话 视为新增
107
121
  if (isEmptyOrg && !isEmptyVal) return 'add';
108
- return _isEqual(_value, _originalValue) ? 'same' : 'changed';
122
+ return isEqual(_value, _originalValue) ? 'same' : 'changed';
109
123
  };
@@ -1,31 +1,31 @@
1
- import _isEqual from "lodash/isEqual";
2
- import _get from "lodash/get";
1
+ import { get, isEqual } from 'lodash';
3
2
  var defaultPropsMap = {
4
- ProSelect: function ProSelect(props) {
3
+ ProSelect: props => {
5
4
  var fieldProps = props.fieldProps,
6
5
  name = props.name,
7
6
  namePath = props.namePath;
8
7
  var _ref = fieldProps || {},
9
8
  filterInList = _ref.filterInList;
10
9
  var defaultProps = {};
10
+
11
11
  // formList场景传入列表过滤时
12
12
  if (filterInList && namePath && name) {
13
13
  var _listName = namePath.slice(0, -1);
14
14
  var _namePath = name.slice(1);
15
- defaultProps.shouldUpdate = function (preValues, curValues) {
16
- var preListValue = _get(preValues, _listName).map(function (item) {
17
- return _get(item, _namePath);
15
+ defaultProps.shouldUpdate = (preValues, curValues) => {
16
+ var preListValue = get(preValues, _listName).map(item => {
17
+ return get(item, _namePath);
18
18
  });
19
- var curListValue = _get(curValues, _listName).map(function (item) {
20
- return _get(item, _namePath);
19
+ var curListValue = get(curValues, _listName).map(item => {
20
+ return get(item, _namePath);
21
21
  });
22
- return !_isEqual(preListValue, curListValue);
22
+ return !isEqual(preListValue, curListValue);
23
23
  };
24
24
  }
25
25
  return defaultProps;
26
26
  }
27
27
  };
28
- export var getDefaultProps = function getDefaultProps(props) {
28
+ export var getDefaultProps = props => {
29
29
  var _defaultPropsMap$type;
30
30
  var type = props.type;
31
31
  return (_defaultPropsMap$type = defaultPropsMap[type]) === null || _defaultPropsMap$type === void 0 ? void 0 : _defaultPropsMap$type.call(defaultPropsMap, props);
@@ -1,16 +1,11 @@
1
1
  import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
2
- import _typeof from "@babel/runtime/helpers/esm/typeof";
3
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
4
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
- import _isNaN from "lodash/isNaN";
6
- import _omit from "lodash/omit";
7
- import _set from "lodash/set";
8
- import _get from "lodash/get";
9
- import _isFunction from "lodash/isFunction";
10
- import _isObject from "lodash/isObject";
3
+ /* eslint-disable no-restricted-syntax */
4
+
11
5
  import React, { useState } from 'react';
12
6
  import moment from 'moment';
13
- export var getLayout = function getLayout(params) {
7
+ import _, { isObject, isFunction, get, set, omit, isNaN } from 'lodash';
8
+ export var getLayout = params => {
14
9
  var _params$span = params.span,
15
10
  span = _params$span === void 0 ? 8 : _params$span,
16
11
  form = params.form;
@@ -23,16 +18,17 @@ export var getLayout = function getLayout(params) {
23
18
  colProps: {
24
19
  span: span || 8
25
20
  },
26
- onCancel: function onCancel() {
21
+ onCancel: () => {
27
22
  form.resetFields();
28
23
  },
29
- onOk: function onOk() {
24
+ onOk: () => {
30
25
  form.submit();
31
26
  }
32
27
  };
33
28
  };
29
+
34
30
  // 受控状态
35
- export var useControlled = function useControlled(props) {
31
+ export var useControlled = props => {
36
32
  var value = props.value,
37
33
  onChange = props.onChange;
38
34
  var _useState = useState(value || false),
@@ -44,65 +40,66 @@ export var useControlled = function useControlled(props) {
44
40
  }
45
41
  return [state, setState];
46
42
  };
47
- export var isSelect = function isSelect(props) {
43
+ export var isSelect = props => {
48
44
  var dataSource = props.dataSource,
49
45
  type = props.type;
50
46
  return (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) || ['Select', 'ProSelect', 'ProEnum', 'DatePicker', 'RangePicker', 'ProCascader', 'ProTimeLimit', 'ProModalSelect', 'ProTreeModal', 'ProUpload', 'TimePicker'].includes(type);
51
47
  };
48
+
52
49
  /**
53
50
  * Input TextArea 移除前后空格
54
51
  * @param type 组件类型
55
52
  * @param trim 是否移除前后空格
56
53
  * @returns {}
57
54
  */
58
- export var isTrim = function isTrim(type, trim, configData) {
55
+ export var isTrim = (type, trim, configData) => {
59
56
  var _state$type;
60
57
  var result = {};
61
58
  var _ref = configData || {},
62
59
  _ref$state = _ref.state,
63
60
  state = _ref$state === void 0 ? {} : _ref$state;
64
- var _trim = trim || (state === null || state === void 0 ? void 0 : (_state$type = state[type]) === null || _state$type === void 0 ? void 0 : _state$type.trim);
61
+ var _trim = trim || (state === null || state === void 0 || (_state$type = state[type]) === null || _state$type === void 0 ? void 0 : _state$type.trim);
65
62
  if (['Input', 'ProCombination'].includes(type) && _trim) {
66
- result.getValueFromEvent = function (event) {
63
+ result.getValueFromEvent = event => {
67
64
  var _event$target$value;
68
65
  if (Array.isArray(event)) {
69
- return event.map(function (value) {
70
- return (value === null || value === void 0 ? void 0 : value.trim()) || '';
71
- });
66
+ return event.map(value => (value === null || value === void 0 ? void 0 : value.trim()) || '');
72
67
  }
73
68
  return ((_event$target$value = event.target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.trim()) || '';
74
69
  };
75
70
  }
76
71
  return result;
77
72
  };
73
+
78
74
  /**
79
75
  * Input TextArea 小写自动转大写
80
76
  * @param type 组件类型
81
77
  * @param upperCase 是否小写转大写
82
78
  * @returns {}
83
79
  */
84
- export var isUpperCase = function isUpperCase(type, upperCase) {
80
+ export var isUpperCase = (type, upperCase) => {
85
81
  var result = {};
86
82
  if (['Input', 'ProCombination'].includes(type) && upperCase) {
87
- result.getValueFromEvent = function (event) {
88
- var _event$target, _event$target$value2;
83
+ result.getValueFromEvent = event => {
84
+ var _event$target;
89
85
  if (Array.isArray(event)) {
90
- return event.map(function (value) {
86
+ return event.map(value => {
91
87
  var newValue = value === null || value === void 0 ? void 0 : value.replace(/[^a-zA-Z]/g, '');
92
88
  return (newValue === null || newValue === void 0 ? void 0 : newValue.toUpperCase()) || '';
93
89
  });
94
90
  }
95
- var newValue = (_event$target = event.target) === null || _event$target === void 0 ? void 0 : (_event$target$value2 = _event$target.value) === null || _event$target$value2 === void 0 ? void 0 : _event$target$value2.replace(/[^a-zA-Z]/g, '');
91
+ var newValue = (_event$target = event.target) === null || _event$target === void 0 || (_event$target = _event$target.value) === null || _event$target === void 0 ? void 0 : _event$target.replace(/[^a-zA-Z]/g, '');
96
92
  return newValue.toUpperCase() || '';
97
93
  };
98
94
  }
99
95
  return result;
100
96
  };
97
+
101
98
  // 剔除otherProps 组成对象返回
102
- export var weedOutProps = function weedOutProps(data, keys) {
99
+ export var weedOutProps = (data, keys) => {
103
100
  var obj = {};
104
101
  var weedOut = {};
105
- Object.keys(data).forEach(function (key) {
102
+ Object.keys(data).forEach(key => {
106
103
  var included = keys.includes(key);
107
104
  if (included) {
108
105
  weedOut[key] = data[key];
@@ -112,89 +109,88 @@ export var weedOutProps = function weedOutProps(data, keys) {
112
109
  });
113
110
  return [obj, weedOut];
114
111
  };
112
+
115
113
  // 对比字段变化
116
- export var diffField = function diffField(prevValues, curValues, names) {
117
- return names.some(function (name) {
118
- return _get(prevValues, name) !== _get(curValues, name);
114
+ export var diffField = (prevValues, curValues, names) => {
115
+ return names.some(name => {
116
+ return _.get(prevValues, name) !== _.get(curValues, name);
119
117
  });
120
118
  };
119
+
121
120
  // 表单name展开
122
- export var splitNameStr = function splitNameStr(name) {
123
- return name.split('-').map(function (keyStr) {
124
- return keyStr.split('_');
125
- });
121
+ export var splitNameStr = name => {
122
+ return name.split('-').map(keyStr => keyStr.split('_'));
126
123
  };
124
+
127
125
  // 过滤掉字段名中包含 '-' 的字段
128
- var _filterInternalFields = function filterInternalFields(values, optimize) {
126
+ export var filterInternalFields = (values, optimize) => {
129
127
  if (optimize) {
130
128
  return values;
131
129
  }
132
130
  var nextValues = values;
133
131
  // fix: braft-editor对象不可遍历 Moment不过滤
134
- if ((values === null || values === void 0 ? void 0 : values._immutable) || moment.isMoment(values)) {
132
+ if (values !== null && values !== void 0 && values._immutable || moment.isMoment(values)) {
135
133
  return nextValues;
136
134
  }
137
135
  if (values instanceof File) {
138
136
  return nextValues;
139
137
  }
140
138
  if (Array.isArray(nextValues)) {
141
- return nextValues.map(function (item) {
142
- return _filterInternalFields(item);
139
+ return nextValues.map(item => {
140
+ return filterInternalFields(item);
143
141
  });
144
142
  }
145
- if (_isObject(nextValues)) {
143
+ if (isObject(nextValues)) {
146
144
  var result = {};
147
- Object.keys(nextValues).forEach(function (key) {
145
+ Object.keys(nextValues).forEach(key => {
148
146
  if (key.includes('-') || key.startsWith('__')) return;
149
- result[key] = _filterInternalFields(nextValues[key]);
147
+ result[key] = filterInternalFields(nextValues[key]);
150
148
  });
151
149
  return result;
152
150
  }
153
151
  return nextValues;
154
152
  };
155
- export { _filterInternalFields as filterInternalFields };
156
- var _getAllNamePath = function getAllNamePath(object) {
153
+ export var getAllNamePath = function getAllNamePath(object) {
157
154
  var currentPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
158
155
  var keys = Object.keys(object);
159
156
  var resultKeys = [];
160
- keys.forEach(function (key) {
157
+ keys.forEach(key => {
161
158
  var value = object[key];
159
+
162
160
  // 拆开组合key (组合key只可能存在于最外层)
163
161
  if (key.includes('-')) {
164
- resultKeys.concat(key.split('-').map(function (keyStr) {
165
- return keyStr.split('_');
166
- }));
162
+ resultKeys.concat(key.split('-').map(keyStr => keyStr.split('_')));
167
163
  }
164
+
168
165
  // 深度获取对象key
169
- if (_isObject(value)) {
170
- resultKeys.concat(_getAllNamePath(value, [].concat(_toConsumableArray(currentPath), [key])));
166
+ if (isObject(value)) {
167
+ resultKeys.concat(getAllNamePath(value, [...currentPath, key]));
171
168
  }
172
- resultKeys.push([].concat(_toConsumableArray(currentPath), [key]));
169
+ resultKeys.push([...currentPath, key]);
173
170
  });
174
171
  return resultKeys;
175
172
  };
173
+
176
174
  // 判断一个字段值是否算空
177
- export { _getAllNamePath as getAllNamePath };
178
175
  var nullList = [undefined, 'null', '""', '[]'];
179
- export var isNullValue = function isNullValue(value) {
176
+ export var isNullValue = value => {
180
177
  return nullList.includes(JSON.stringify(value));
181
178
  };
179
+
182
180
  /**
183
181
  * 判断数组中是否包含空值 一个为空则为true
184
182
  * @param arr 值
185
183
  * @returns boole
186
184
  */
187
- export var isNotFullArray = function isNotFullArray(arr, length, required) {
185
+ export var isNotFullArray = (arr, length, required) => {
188
186
  if (!Array.isArray(arr)) {
189
187
  return false;
190
188
  }
191
- if (Array.isArray(required) && required.some(function (item) {
192
- return item === false;
193
- })) {
189
+ if (Array.isArray(required) && required.some(item => item === false)) {
194
190
  return false;
195
191
  }
196
192
  if (arr.length < length) return true;
197
- return arr.some(function (item) {
193
+ return arr.some(item => {
198
194
  if (item === undefined || item === null) {
199
195
  return true;
200
196
  }
@@ -207,14 +203,15 @@ export var isNotFullArray = function isNotFullArray(arr, length, required) {
207
203
  return false;
208
204
  });
209
205
  };
206
+
210
207
  /**
211
208
  * 判断数组中值是否都为空 全部为空则为true
212
209
  * @param arr 值
213
210
  * @returns boole
214
211
  */
215
- export var isNullArray = function isNullArray(arr) {
212
+ export var isNullArray = arr => {
216
213
  if (!Array.isArray(arr)) return !arr;
217
- return arr.every(function (item) {
214
+ return arr.every(item => {
218
215
  if (item === undefined || item === null) {
219
216
  return true;
220
217
  }
@@ -227,14 +224,15 @@ export var isNullArray = function isNullArray(arr) {
227
224
  return false;
228
225
  });
229
226
  };
227
+
230
228
  /**
231
229
  * 判断数组中值是否全部为空 如果值不是数组返回false
232
230
  * @param arr 值
233
231
  * @returns boole
234
232
  */
235
- export var isEmptyArray = function isEmptyArray(arr) {
233
+ export var isEmptyArray = arr => {
236
234
  if (!Array.isArray(arr)) return false;
237
- return arr.every(function (item) {
235
+ return arr.every(item => {
238
236
  if (item === undefined || item === null) {
239
237
  return true;
240
238
  }
@@ -253,6 +251,7 @@ export function toArray(value) {
253
251
  }
254
252
  return Array.isArray(value) ? value : [value];
255
253
  }
254
+
256
255
  /**
257
256
  * 初始化值names值合并
258
257
  * @param obj AnyObject
@@ -265,50 +264,50 @@ export function initialValuesToNames() {
265
264
  if (!Array.isArray(columns)) {
266
265
  return result;
267
266
  }
268
- columns.forEach(function (item) {
267
+ columns.forEach(item => {
269
268
  if (Array.isArray(item === null || item === void 0 ? void 0 : item.names)) {
270
269
  var _item$names;
271
- var key = (_item$names = item.names) === null || _item$names === void 0 ? void 0 : _item$names.map(function (name) {
270
+ var _key = (_item$names = item.names) === null || _item$names === void 0 ? void 0 : _item$names.map(name => {
272
271
  return Array.isArray(name) ? name.join('_') : name;
273
272
  }).join('-');
274
- var formInitialValue = item.names.map(function (name, index) {
273
+ var formInitialValue = item.names.map((name, index) => {
275
274
  if (item.initialValue) {
276
- _set(values, name, item.initialValue[index]);
275
+ set(values, name, item.initialValue[index]);
277
276
  }
278
- return _get(values, name);
277
+ return get(values, name);
279
278
  });
279
+
280
280
  // 过滤掉不存在的初始值 防止names字段值为空数组
281
- var namesInitialValue = formInitialValue.filter(function (item) {
282
- return item !== undefined;
283
- });
281
+ var namesInitialValue = formInitialValue.filter(item => item !== undefined);
284
282
  if (namesInitialValue.length) {
285
- values[key] = formInitialValue;
283
+ values[_key] = formInitialValue;
286
284
  }
287
285
  }
288
286
  });
289
287
  return values;
290
288
  }
289
+
291
290
  /**
292
291
  * 获取数组含数字的新数组
293
292
  * @returns ['group-7x19no', 0, 'abc'] =>['group-7x19no', 0]
294
293
  */
295
294
  export function getArrayBeforeNumber(arr) {
296
- var index = arr.findIndex(function (item) {
297
- return typeof item === 'number';
298
- });
295
+ var index = arr.findIndex(item => typeof item === 'number');
299
296
  return index !== -1 ? arr.slice(0, index + 1) : arr;
300
297
  }
298
+
301
299
  // 自定义深比对 如果两边都是函数类型则认为相等
302
- export var customEqualForFun = function customEqualForFun(value, other) {
303
- if (_isFunction(value) && _isFunction(other) || /*#__PURE__*/React.isValidElement(value) && /*#__PURE__*/React.isValidElement(other)) {
300
+ export var customEqualForFun = (value, other) => {
301
+ if (isFunction(value) && isFunction(other) || /*#__PURE__*/React.isValidElement(value) && /*#__PURE__*/React.isValidElement(other)) {
304
302
  return true;
305
303
  }
306
304
  };
305
+
307
306
  /**
308
307
  * 查询数据中是否包含rowKey
309
308
  */
310
- var _hasRowKey = function hasRowKey(obj) {
311
- if (_typeof(obj) !== 'object' || obj === null) {
309
+ export var hasRowKey = obj => {
310
+ if (typeof obj !== 'object' || obj === null) {
312
311
  return false;
313
312
  }
314
313
  var keys = Object.keys(obj);
@@ -316,16 +315,14 @@ var _hasRowKey = function hasRowKey(obj) {
316
315
  if (rowKeyExists) {
317
316
  return true;
318
317
  }
319
- return keys.some(function (key) {
320
- return _hasRowKey(obj[key]);
321
- });
318
+ return keys.some(key => hasRowKey(obj[key]));
322
319
  };
320
+
323
321
  /**
324
322
  * 查询数据中是否包含rowKey
325
323
  */
326
- export { _hasRowKey as hasRowKey };
327
- export var view = function view(obj) {
328
- if (_typeof(obj) !== 'object' || obj === null) {
324
+ export var view = obj => {
325
+ if (typeof obj !== 'object' || obj === null) {
329
326
  return false;
330
327
  }
331
328
  var keys = Object.keys(obj);
@@ -333,28 +330,27 @@ export var view = function view(obj) {
333
330
  if (rowKeyExists) {
334
331
  return true;
335
332
  }
336
- return keys.some(function (key) {
337
- return _hasRowKey(obj[key]);
338
- });
333
+ return keys.some(key => hasRowKey(obj[key]));
339
334
  };
335
+
340
336
  /**
341
337
  * 获取小数点后的位数
342
338
  * @param num 数字
343
339
  * @returns 位数
344
340
  */
345
- export var getDecimalDigits = function getDecimalDigits(num) {
341
+ export var getDecimalDigits = num => {
346
342
  var match = num.toString().match(/\.(\d+)/);
347
343
  return match ? match[1].length : 0;
348
344
  };
349
- export var deleteForPath = function deleteForPath(values, namePath) {
345
+ export var deleteForPath = (values, namePath) => {
350
346
  if (Array.isArray(namePath)) {
351
347
  var current = values;
352
- namePath.every(function (nameItem, index) {
348
+ namePath.every((nameItem, index) => {
353
349
  if (index === namePath.length - 1) {
354
350
  delete current[nameItem];
355
351
  return false;
356
352
  }
357
- if (_typeof(current[nameItem]) !== 'object') {
353
+ if (typeof current[nameItem] !== 'object') {
358
354
  return false;
359
355
  }
360
356
  current = current[nameItem];
@@ -364,70 +360,69 @@ export var deleteForPath = function deleteForPath(values, namePath) {
364
360
  }
365
361
  delete values[namePath];
366
362
  };
363
+
367
364
  /**
368
365
  * 获取树状结构option
369
366
  * @param treeData 树数据源
370
367
  * @param value 选中值
371
368
  * @returns {}
372
369
  */
373
- var _findOptionByValue = function findOptionByValue(treeData, value, fieldNames) {
374
- if (_isObject(value)) {
370
+ export var findOptionByValue = (treeData, value, fieldNames) => {
371
+ if (isObject(value)) {
375
372
  return value;
376
373
  }
377
374
  for (var i = 0; i < (treeData === null || treeData === void 0 ? void 0 : treeData.length); i++) {
378
375
  var node = treeData[i];
379
376
  if (node[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) || 'value'] === value) {
380
- return _omit(node, ['children', fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]);
377
+ return omit(node, ['children', fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]);
381
378
  }
382
379
  if (node.children) {
383
- var foundNode = _findOptionByValue(node[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children'], value, fieldNames);
380
+ var foundNode = findOptionByValue(node[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children'], value, fieldNames);
384
381
  if (foundNode) {
385
- return _omit(foundNode, ['children', fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]);
382
+ return omit(foundNode, ['children', fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]);
386
383
  }
387
384
  }
388
385
  }
389
386
  };
387
+
390
388
  /**
391
389
  * 对比依赖列表中的 值是否变更
392
390
  */
393
- export { _findOptionByValue as findOptionByValue };
394
- export var equalDependencies = function equalDependencies(dependencies, prevValues, currentValues) {
395
- if (dependencies === null || dependencies === void 0 ? void 0 : dependencies.length) {
396
- return dependencies.some(function (namePath) {
397
- var prevValue = _get(prevValues, namePath);
398
- var currentValue = _get(currentValues, namePath);
391
+ export var equalDependencies = (dependencies, prevValues, currentValues) => {
392
+ if (dependencies !== null && dependencies !== void 0 && dependencies.length) {
393
+ return dependencies.some(namePath => {
394
+ var prevValue = get(prevValues, namePath);
395
+ var currentValue = get(currentValues, namePath);
399
396
  return prevValue !== currentValue;
400
397
  });
401
398
  }
402
399
  return false;
403
400
  };
401
+
404
402
  /** 解析namePath */
405
- export var parseNamePath = function parseNamePath(input) {
403
+ export var parseNamePath = input => {
406
404
  var parts = input.split('_');
407
- if (parts.every(function (item) {
408
- return _isNaN(Number(item));
409
- })) {
405
+ if (parts.every(item => isNaN(Number(item)))) {
410
406
  return [input];
411
407
  }
412
- var result = parts.map(function (item) {
413
- return _isNaN(Number(item)) ? item : Number(item);
408
+ var result = parts.map(item => {
409
+ return isNaN(Number(item)) ? item : Number(item);
414
410
  });
415
411
  return [result];
416
412
  };
413
+
417
414
  /**
418
415
  * 获取表单所有字段路径的简化函数
419
416
  * @param form 表单实例
420
417
  * @returns 所有字段路径数组
421
418
  */
422
- export var getFormFieldPaths = function getFormFieldPaths(form) {
419
+ export var getFormFieldPaths = form => {
423
420
  try {
424
421
  // @ts-ignore
425
422
  var _form$getInternalHook = form.getInternalHooks('RC_FORM_INTERNAL_HOOKS'),
426
423
  getFields = _form$getInternalHook.getFields;
427
424
  var allFields = getFields();
428
- return allFields.map(function (field) {
429
- return field.name;
430
- });
425
+ return allFields.map(field => field.name);
431
426
  } catch (error) {
432
427
  console.error('获取表单字段失败:', error);
433
428
  return [];