@zat-design/sisyphus-react 3.13.13 → 4.0.0-beta.2

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 (538) hide show
  1. package/babel.config.js +34 -1
  2. package/dist/index.esm.css +557 -341
  3. package/dist/less.esm.css +527 -309
  4. package/es/FormsProvider/index.d.ts +4 -1
  5. package/es/ProAction/components/CheckModalContent/index.js +0 -8
  6. package/es/ProAction/index.js +45 -48
  7. package/es/ProAction/index.less +2 -2
  8. package/es/ProConfigProvider/index.d.ts +21 -4
  9. package/es/ProConfigProvider/index.js +51 -22
  10. package/es/ProDownload/index.js +62 -65
  11. package/es/ProDownload/style/index.less +2 -2
  12. package/es/ProDownload/utils.js +45 -51
  13. package/es/ProDrawerForm/components/ProDrawer/index.js +64 -69
  14. package/es/ProDrawerForm/components/ProModal/index.js +59 -67
  15. package/es/ProDrawerForm/index.d.ts +2 -1
  16. package/es/ProDrawerForm/index.js +4 -6
  17. package/es/ProDrawerForm/propsType.d.ts +7 -18
  18. package/es/ProDrawerForm/style/index.less +8 -14
  19. package/es/ProEditLabel/components/RenderProForm.js +2 -3
  20. package/es/ProEditLabel/index.js +40 -45
  21. package/es/ProEditLabel/propsType.d.ts +1 -6
  22. package/es/ProEditLabel/style/index.less +4 -3
  23. package/es/ProEditTable/components/ActionButton/index.js +5 -8
  24. package/es/ProEditTable/components/RcTable/BaseTable.js +73 -55
  25. package/es/ProEditTable/components/RcTable/DraggableTable.js +66 -47
  26. package/es/ProEditTable/components/RcTable/index.d.ts +0 -2
  27. package/es/ProEditTable/components/RcTable/index.js +1 -3
  28. package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
  29. package/es/ProEditTable/components/RenderField/index.d.ts +3 -2
  30. package/es/ProEditTable/components/RenderField/index.js +377 -253
  31. package/es/ProEditTable/components/RenderToolbar/index.js +19 -19
  32. package/es/ProEditTable/components/Summary/index.js +5 -8
  33. package/es/ProEditTable/components/Validator/index.js +3 -6
  34. package/es/ProEditTable/index.js +128 -131
  35. package/es/ProEditTable/propsType.d.ts +1 -7
  36. package/es/ProEditTable/style/index.less +3 -7
  37. package/es/ProEditTable/utils/config.js +31 -35
  38. package/es/ProEditTable/utils/index.js +44 -41
  39. package/es/ProEditTable/utils/tools.js +107 -110
  40. package/es/ProEditTable/utils/useEditTableError.js +12 -4
  41. package/es/ProEnum/hooks/useEnumRequest.js +44 -47
  42. package/es/ProEnum/index.js +10 -17
  43. package/es/ProEnum/style/index.less +2 -2
  44. package/es/ProEnum/utils/index.d.ts +1 -0
  45. package/es/ProEnum/utils/index.js +2 -1
  46. package/es/ProForm/components/Container.d.ts +1 -0
  47. package/es/ProForm/components/Container.js +2 -3
  48. package/es/ProForm/components/FormFooter/index.js +13 -13
  49. package/es/ProForm/components/FormFooter/propsType.d.ts +2 -0
  50. package/es/ProForm/components/base/Checkbox/index.js +3 -4
  51. package/es/ProForm/components/base/DatePicker/index.d.ts +1 -3
  52. package/es/ProForm/components/base/DatePicker/index.js +7 -7
  53. package/es/ProForm/components/base/DatePicker/useDateLimit.d.ts +1 -7
  54. package/es/ProForm/components/base/DatePicker/useDateLimit.js +1 -3
  55. package/es/ProForm/components/base/Input/index.js +6 -13
  56. package/es/ProForm/components/base/InputNumber/index.js +3 -6
  57. package/es/ProForm/components/base/Radio/index.js +3 -4
  58. package/es/ProForm/components/base/RangePicker/index.js +6 -7
  59. package/es/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
  60. package/es/ProForm/components/base/Select/index.js +2 -3
  61. package/es/ProForm/components/base/Switch/index.js +2 -3
  62. package/es/ProForm/components/base/SwitchCheckbox/index.js +2 -3
  63. package/es/ProForm/components/base/SwitchCheckbox/style/index.less +2 -2
  64. package/es/ProForm/components/base/TextArea/index.js +3 -4
  65. package/es/ProForm/components/base/TextArea/index.less +12 -2
  66. package/es/ProForm/components/base/TimePicker/index.d.ts +1 -2
  67. package/es/ProForm/components/base/TimePicker/index.js +6 -7
  68. package/es/ProForm/components/base/TimePicker/style/index.less +5 -3
  69. package/es/ProForm/components/combination/Container/style/index.less +2 -2
  70. package/es/ProForm/components/combination/FormList/components/ActionButton.js +28 -26
  71. package/es/ProForm/components/combination/FormList/components/BlockFields.js +3 -6
  72. package/es/ProForm/components/combination/FormList/components/Empty.js +18 -19
  73. package/es/ProForm/components/combination/FormList/components/LineFields.js +2 -3
  74. package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +17 -21
  75. package/es/ProForm/components/combination/FormList/index.js +2 -3
  76. package/es/ProForm/components/combination/FormList/style/index.less +38 -2
  77. package/es/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
  78. package/es/ProForm/components/combination/Group/index.d.ts +2 -8
  79. package/es/ProForm/components/combination/Group/index.js +12 -6
  80. package/es/ProForm/components/combination/Group/style/index.less +7 -87
  81. package/es/ProForm/components/combination/Group/utils.d.ts +1 -1
  82. package/es/ProForm/components/combination/Group/utils.js +4 -5
  83. package/es/ProForm/components/combination/ProCascader/index.js +21 -20
  84. package/es/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
  85. package/es/ProForm/components/combination/ProCascader/style/index.less +2 -2
  86. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +6 -8
  87. package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
  88. package/es/ProForm/components/combination/ProModalSelect/index.js +97 -116
  89. package/es/ProForm/components/combination/ProModalSelect/style/index.less +13 -14
  90. package/es/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
  91. package/es/ProForm/components/combination/ProNumberRange/index.js +17 -16
  92. package/es/ProForm/components/combination/ProNumberRange/style/index.less +5 -52
  93. package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
  94. package/es/ProForm/components/combination/ProRangeLimit/index.js +44 -28
  95. package/es/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
  96. package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
  97. package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
  98. package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
  99. package/es/ProForm/components/combination/ProTimeLimit/index.js +23 -20
  100. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +66 -6
  101. package/es/ProForm/components/index.d.ts +0 -8
  102. package/es/ProForm/components/index.js +1 -10
  103. package/es/ProForm/components/render/ChangedWrapper.js +8 -9
  104. package/es/ProForm/components/render/ConfirmWrapper.js +28 -29
  105. package/es/ProForm/components/render/Render.js +37 -40
  106. package/es/ProForm/components/render/propsType.d.ts +2 -6
  107. package/es/ProForm/index.js +9 -39
  108. package/es/ProForm/style/index.less +6 -16
  109. package/es/ProForm/utils/index.d.ts +15 -1
  110. package/es/ProForm/utils/index.js +63 -14
  111. package/es/ProForm/utils/useDeepCompareMemo.js +4 -4
  112. package/es/ProForm/utils/useForm.js +84 -74
  113. package/es/ProForm/utils/useShouldUpdate.js +14 -14
  114. package/es/ProForm/utils/valueType.js +8 -8
  115. package/es/ProIcon/index.js +10 -13
  116. package/es/ProIcon/style/index.less +2 -2
  117. package/es/ProLayout/components/Layout/Header/index.js +1 -1
  118. package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +11 -10
  119. package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +42 -39
  120. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -4
  121. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +12 -6
  122. package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +9 -5
  123. package/es/ProLayout/components/Layout/Menu/index.js +1 -1
  124. package/es/ProLayout/components/Layout/Menu/style/index.less +2 -2
  125. package/es/ProLayout/components/Layout/Notice/style/index.less +2 -2
  126. package/es/ProLayout/components/ProCollapse/index.js +20 -36
  127. package/es/ProLayout/components/ProCollapse/style/index.less +3 -3
  128. package/es/ProLayout/components/ProFooter/index.js +3 -4
  129. package/es/ProLayout/components/ProFooter/style/index.less +2 -2
  130. package/es/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
  131. package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
  132. package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +9 -9
  133. package/es/ProLayout/components/ProHeader/index.js +43 -46
  134. package/es/ProLayout/components/ProHeader/style/index.less +2 -2
  135. package/es/ProLayout/index.js +7 -6
  136. package/es/ProLayout/style/index.less +4 -3
  137. package/es/ProSelect/components/AdaptiveTooltip.js +2 -3
  138. package/es/ProSelect/index.js +7 -17
  139. package/es/ProSelect/index.less +2 -2
  140. package/es/ProSelect/propsType.d.ts +1 -1
  141. package/es/ProStep/components/Anchor/index.js +2 -3
  142. package/es/ProStep/components/Item/index.js +2 -1
  143. package/es/ProStep/components/Listener/index.js +12 -14
  144. package/es/ProStep/components/Step/index.js +1 -0
  145. package/es/ProStep/index.js +39 -47
  146. package/es/ProStep/style/index.less +4 -4
  147. package/es/ProStepTab/index.js +72 -83
  148. package/es/ProTable/components/FormatColumn/index.js +32 -31
  149. package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
  150. package/es/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
  151. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +39 -37
  152. package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
  153. package/es/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
  154. package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
  155. package/es/ProTable/components/RenderColumn/index.js +15 -18
  156. package/es/ProTable/components/RenderSummary/index.js +4 -5
  157. package/es/ProTable/components/RenderTableHeader/index.js +3 -4
  158. package/es/ProTable/components/RenderTabs/index.js +3 -6
  159. package/es/ProTable/components/TableResizable/index.js +2 -1
  160. package/es/ProTable/components/TooltipTitle/index.js +2 -3
  161. package/es/ProTable/hooks/useAntdTable.js +21 -26
  162. package/es/ProTable/index.js +15 -16
  163. package/es/ProTable/propsType.d.ts +1 -3
  164. package/es/ProTable/style/index.less +5 -5
  165. package/es/ProTabs/components/Card/index.js +5 -10
  166. package/es/ProTabs/index.js +2 -3
  167. package/es/ProTabs/style/index.less +2 -2
  168. package/es/ProThemeTools/component/ProTools/index.js +18 -22
  169. package/es/ProThemeTools/context/ThemeContext.d.ts +31 -0
  170. package/es/ProThemeTools/context/ThemeContext.js +120 -0
  171. package/es/ProThemeTools/index.d.ts +4 -1
  172. package/es/ProThemeTools/index.js +60 -37
  173. package/es/ProThemeTools/style/index.less +3 -3
  174. package/es/ProThemeTools/utils/index.d.ts +16 -6
  175. package/es/ProThemeTools/utils/index.js +28 -24
  176. package/es/ProTooltip/index.js +14 -9
  177. package/es/ProTooltip/style/index.less +2 -2
  178. package/es/ProTree/components/AdaptiveTooltip.js +2 -3
  179. package/es/ProTree/components/List.js +3 -4
  180. package/es/ProTree/components/ProTree.js +19 -26
  181. package/es/ProTree/components/ProTreeSelect/index.js +38 -37
  182. package/es/ProTree/components/ProTreeSelect/style/index.less +2 -2
  183. package/es/ProTree/components/Tree.js +18 -25
  184. package/es/ProTree/index.js +0 -7
  185. package/es/ProTree/propsType.d.ts +1 -1
  186. package/es/ProTree/style/index.less +10 -6
  187. package/es/ProTreeModal/components/Cascader.js +3 -4
  188. package/es/ProTreeModal/components/List.js +11 -17
  189. package/es/ProTreeModal/components/SortableItem.js +2 -3
  190. package/es/ProTreeModal/components/Tree.js +3 -4
  191. package/es/ProTreeModal/components/Trigger.js +6 -11
  192. package/es/ProTreeModal/index.d.ts +0 -1
  193. package/es/ProTreeModal/index.js +14 -24
  194. package/es/ProTreeModal/style/index.less +14 -3
  195. package/es/ProUpload/components/ButtonRender.js +17 -20
  196. package/es/ProUpload/components/DragRender.js +2 -3
  197. package/es/ProUpload/components/FileItem.d.ts +0 -1
  198. package/es/ProUpload/components/FileItem.js +15 -21
  199. package/es/ProUpload/components/ImageRender.js +34 -43
  200. package/es/ProUpload/index.js +3 -4
  201. package/es/ProUpload/style/index.less +173 -12
  202. package/es/ProViewer/index.js +38 -45
  203. package/es/ProViewer/style/index.less +2 -2
  204. package/es/ProWaterMark/index.js +2 -3
  205. package/es/ProWaterMark/propsType.d.ts +5 -24
  206. package/es/global.less +2 -1
  207. package/es/index.d.ts +4 -2
  208. package/es/index.js +2 -3
  209. package/es/locale/en_US.js +1 -1
  210. package/es/locale/index.d.ts +2 -0
  211. package/es/locale/index.js +11 -2
  212. package/es/locale/zh_CN.js +1 -1
  213. package/es/style/components.less +0 -3
  214. package/es/style/theme/antd.less +38 -48
  215. package/es/style/theme/base.less +89 -0
  216. package/es/style/theme/index.less +2 -89
  217. package/es/utils/index.d.ts +7 -0
  218. package/es/utils/index.js +23 -1
  219. package/lib/FormsProvider/index.d.ts +4 -1
  220. package/lib/ProAction/components/CheckModalContent/index.js +0 -9
  221. package/lib/ProAction/index.js +45 -48
  222. package/lib/ProAction/index.less +2 -2
  223. package/lib/ProConfigProvider/index.d.ts +21 -4
  224. package/lib/ProConfigProvider/index.js +60 -31
  225. package/lib/ProDownload/index.js +62 -65
  226. package/lib/ProDownload/style/index.less +2 -2
  227. package/lib/ProDownload/utils.js +45 -54
  228. package/lib/ProDrawerForm/components/ProDrawer/index.js +64 -69
  229. package/lib/ProDrawerForm/components/ProModal/index.js +59 -67
  230. package/lib/ProDrawerForm/index.d.ts +2 -1
  231. package/lib/ProDrawerForm/index.js +4 -6
  232. package/lib/ProDrawerForm/propsType.d.ts +7 -18
  233. package/lib/ProDrawerForm/style/index.less +8 -14
  234. package/lib/ProEditLabel/components/RenderProForm.js +2 -3
  235. package/lib/ProEditLabel/index.js +40 -45
  236. package/lib/ProEditLabel/propsType.d.ts +1 -6
  237. package/lib/ProEditLabel/style/index.less +4 -3
  238. package/lib/ProEditTable/components/ActionButton/index.js +5 -8
  239. package/lib/ProEditTable/components/RcTable/BaseTable.js +72 -54
  240. package/lib/ProEditTable/components/RcTable/DraggableTable.js +65 -46
  241. package/lib/ProEditTable/components/RcTable/index.d.ts +0 -2
  242. package/lib/ProEditTable/components/RcTable/index.js +1 -8
  243. package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
  244. package/lib/ProEditTable/components/RenderField/index.d.ts +3 -2
  245. package/lib/ProEditTable/components/RenderField/index.js +378 -254
  246. package/lib/ProEditTable/components/RenderToolbar/index.js +19 -19
  247. package/lib/ProEditTable/components/Summary/index.js +5 -8
  248. package/lib/ProEditTable/components/Validator/index.js +3 -7
  249. package/lib/ProEditTable/index.js +126 -129
  250. package/lib/ProEditTable/propsType.d.ts +1 -7
  251. package/lib/ProEditTable/style/index.less +3 -7
  252. package/lib/ProEditTable/utils/config.js +31 -35
  253. package/lib/ProEditTable/utils/index.js +44 -41
  254. package/lib/ProEditTable/utils/tools.js +107 -113
  255. package/lib/ProEditTable/utils/useEditTableError.js +12 -4
  256. package/lib/ProEnum/hooks/useEnumRequest.js +43 -46
  257. package/lib/ProEnum/index.js +10 -17
  258. package/lib/ProEnum/style/index.less +2 -2
  259. package/lib/ProEnum/utils/index.d.ts +1 -0
  260. package/lib/ProEnum/utils/index.js +3 -1
  261. package/lib/ProForm/components/Container.d.ts +1 -0
  262. package/lib/ProForm/components/Container.js +2 -3
  263. package/lib/ProForm/components/FormFooter/index.js +13 -13
  264. package/lib/ProForm/components/FormFooter/propsType.d.ts +2 -0
  265. package/lib/ProForm/components/base/Checkbox/index.js +3 -4
  266. package/lib/ProForm/components/base/DatePicker/index.d.ts +1 -3
  267. package/lib/ProForm/components/base/DatePicker/index.js +7 -7
  268. package/lib/ProForm/components/base/DatePicker/useDateLimit.d.ts +1 -7
  269. package/lib/ProForm/components/base/DatePicker/useDateLimit.js +1 -3
  270. package/lib/ProForm/components/base/Input/index.js +6 -13
  271. package/lib/ProForm/components/base/InputNumber/index.js +3 -6
  272. package/lib/ProForm/components/base/Radio/index.js +3 -4
  273. package/lib/ProForm/components/base/RangePicker/index.js +6 -6
  274. package/lib/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
  275. package/lib/ProForm/components/base/Select/index.js +2 -3
  276. package/lib/ProForm/components/base/Switch/index.js +2 -3
  277. package/lib/ProForm/components/base/SwitchCheckbox/index.js +2 -3
  278. package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +2 -2
  279. package/lib/ProForm/components/base/TextArea/index.js +3 -4
  280. package/lib/ProForm/components/base/TextArea/index.less +12 -2
  281. package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -2
  282. package/lib/ProForm/components/base/TimePicker/index.js +6 -7
  283. package/lib/ProForm/components/base/TimePicker/style/index.less +5 -3
  284. package/lib/ProForm/components/combination/Container/style/index.less +2 -2
  285. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +28 -26
  286. package/lib/ProForm/components/combination/FormList/components/BlockFields.js +3 -6
  287. package/lib/ProForm/components/combination/FormList/components/Empty.js +18 -19
  288. package/lib/ProForm/components/combination/FormList/components/LineFields.js +2 -3
  289. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +17 -21
  290. package/lib/ProForm/components/combination/FormList/index.js +2 -3
  291. package/lib/ProForm/components/combination/FormList/style/index.less +38 -2
  292. package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
  293. package/lib/ProForm/components/combination/Group/index.d.ts +2 -8
  294. package/lib/ProForm/components/combination/Group/index.js +13 -6
  295. package/lib/ProForm/components/combination/Group/style/index.less +7 -87
  296. package/lib/ProForm/components/combination/Group/utils.d.ts +1 -1
  297. package/lib/ProForm/components/combination/Group/utils.js +4 -5
  298. package/lib/ProForm/components/combination/ProCascader/index.js +23 -22
  299. package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
  300. package/lib/ProForm/components/combination/ProCascader/style/index.less +2 -2
  301. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +6 -8
  302. package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
  303. package/lib/ProForm/components/combination/ProModalSelect/index.js +97 -116
  304. package/lib/ProForm/components/combination/ProModalSelect/style/index.less +13 -14
  305. package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
  306. package/lib/ProForm/components/combination/ProNumberRange/index.js +17 -16
  307. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +5 -52
  308. package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
  309. package/lib/ProForm/components/combination/ProRangeLimit/index.js +44 -28
  310. package/lib/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
  311. package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
  312. package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
  313. package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
  314. package/lib/ProForm/components/combination/ProTimeLimit/index.js +23 -20
  315. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +66 -6
  316. package/lib/ProForm/components/index.d.ts +0 -8
  317. package/lib/ProForm/components/index.js +1 -63
  318. package/lib/ProForm/components/render/ChangedWrapper.js +8 -9
  319. package/lib/ProForm/components/render/ConfirmWrapper.js +28 -29
  320. package/lib/ProForm/components/render/Render.js +37 -39
  321. package/lib/ProForm/components/render/propsType.d.ts +2 -6
  322. package/lib/ProForm/index.js +8 -38
  323. package/lib/ProForm/style/index.less +6 -16
  324. package/lib/ProForm/utils/index.d.ts +15 -1
  325. package/lib/ProForm/utils/index.js +65 -17
  326. package/lib/ProForm/utils/useDeepCompareMemo.js +4 -4
  327. package/lib/ProForm/utils/useForm.js +83 -73
  328. package/lib/ProForm/utils/useShouldUpdate.js +14 -14
  329. package/lib/ProForm/utils/valueType.js +8 -8
  330. package/lib/ProIcon/index.js +10 -13
  331. package/lib/ProIcon/style/index.less +2 -2
  332. package/lib/ProLayout/components/Layout/Header/index.js +1 -1
  333. package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +11 -10
  334. package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +42 -39
  335. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -4
  336. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +12 -6
  337. package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +9 -5
  338. package/lib/ProLayout/components/Layout/Menu/index.js +1 -1
  339. package/lib/ProLayout/components/Layout/Menu/style/index.less +2 -2
  340. package/lib/ProLayout/components/Layout/Notice/style/index.less +2 -2
  341. package/lib/ProLayout/components/ProCollapse/index.js +20 -36
  342. package/lib/ProLayout/components/ProCollapse/style/index.less +3 -3
  343. package/lib/ProLayout/components/ProFooter/index.js +3 -4
  344. package/lib/ProLayout/components/ProFooter/style/index.less +2 -2
  345. package/lib/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
  346. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
  347. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +9 -9
  348. package/lib/ProLayout/components/ProHeader/index.js +43 -46
  349. package/lib/ProLayout/components/ProHeader/style/index.less +2 -2
  350. package/lib/ProLayout/index.js +7 -6
  351. package/lib/ProLayout/style/index.less +4 -3
  352. package/lib/ProSelect/components/AdaptiveTooltip.js +2 -3
  353. package/lib/ProSelect/index.js +7 -17
  354. package/lib/ProSelect/index.less +2 -2
  355. package/lib/ProSelect/propsType.d.ts +1 -1
  356. package/lib/ProStep/components/Anchor/index.js +2 -3
  357. package/lib/ProStep/components/Item/index.js +2 -1
  358. package/lib/ProStep/components/Listener/index.js +12 -14
  359. package/lib/ProStep/components/Step/index.js +1 -0
  360. package/lib/ProStep/index.js +39 -47
  361. package/lib/ProStep/style/index.less +4 -4
  362. package/lib/ProStepTab/index.js +72 -83
  363. package/lib/ProTable/components/FormatColumn/index.js +32 -31
  364. package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
  365. package/lib/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
  366. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +38 -36
  367. package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
  368. package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
  369. package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
  370. package/lib/ProTable/components/RenderColumn/index.js +15 -18
  371. package/lib/ProTable/components/RenderSummary/index.js +4 -5
  372. package/lib/ProTable/components/RenderTableHeader/index.js +3 -5
  373. package/lib/ProTable/components/RenderTabs/index.js +3 -6
  374. package/lib/ProTable/components/TableResizable/index.js +2 -1
  375. package/lib/ProTable/components/TooltipTitle/index.js +2 -3
  376. package/lib/ProTable/hooks/useAntdTable.js +21 -26
  377. package/lib/ProTable/index.js +15 -16
  378. package/lib/ProTable/propsType.d.ts +1 -3
  379. package/lib/ProTable/style/index.less +5 -5
  380. package/lib/ProTabs/components/Card/index.js +5 -11
  381. package/lib/ProTabs/index.js +2 -3
  382. package/lib/ProTabs/style/index.less +2 -2
  383. package/lib/ProThemeTools/component/ProTools/index.js +18 -22
  384. package/lib/ProThemeTools/context/ThemeContext.d.ts +31 -0
  385. package/lib/ProThemeTools/context/ThemeContext.js +126 -0
  386. package/lib/ProThemeTools/index.d.ts +4 -1
  387. package/lib/ProThemeTools/index.js +69 -35
  388. package/lib/ProThemeTools/style/index.less +3 -3
  389. package/lib/ProThemeTools/utils/index.d.ts +16 -6
  390. package/lib/ProThemeTools/utils/index.js +29 -25
  391. package/lib/ProTooltip/index.js +14 -9
  392. package/lib/ProTooltip/style/index.less +2 -2
  393. package/lib/ProTree/components/AdaptiveTooltip.js +2 -4
  394. package/lib/ProTree/components/List.js +3 -4
  395. package/lib/ProTree/components/ProTree.js +19 -26
  396. package/lib/ProTree/components/ProTreeSelect/index.js +38 -37
  397. package/lib/ProTree/components/ProTreeSelect/style/index.less +2 -2
  398. package/lib/ProTree/components/Tree.js +18 -25
  399. package/lib/ProTree/index.js +0 -8
  400. package/lib/ProTree/propsType.d.ts +1 -1
  401. package/lib/ProTree/style/index.less +10 -6
  402. package/lib/ProTreeModal/components/Cascader.js +3 -4
  403. package/lib/ProTreeModal/components/List.js +11 -17
  404. package/lib/ProTreeModal/components/SortableItem.js +2 -3
  405. package/lib/ProTreeModal/components/Tree.js +3 -4
  406. package/lib/ProTreeModal/components/Trigger.js +6 -11
  407. package/lib/ProTreeModal/index.d.ts +0 -1
  408. package/lib/ProTreeModal/index.js +14 -24
  409. package/lib/ProTreeModal/style/index.less +14 -3
  410. package/lib/ProUpload/components/ButtonRender.js +17 -20
  411. package/lib/ProUpload/components/DragRender.js +2 -3
  412. package/lib/ProUpload/components/FileItem.d.ts +0 -1
  413. package/lib/ProUpload/components/FileItem.js +15 -21
  414. package/lib/ProUpload/components/ImageRender.js +34 -43
  415. package/lib/ProUpload/index.js +3 -4
  416. package/lib/ProUpload/style/index.less +173 -12
  417. package/lib/ProViewer/index.js +39 -47
  418. package/lib/ProViewer/style/index.less +2 -2
  419. package/lib/ProWaterMark/index.js +3 -4
  420. package/lib/ProWaterMark/propsType.d.ts +5 -24
  421. package/lib/global.less +2 -1
  422. package/lib/index.d.ts +4 -2
  423. package/lib/index.js +36 -16
  424. package/lib/locale/en_US.js +1 -1
  425. package/lib/locale/index.d.ts +2 -0
  426. package/lib/locale/index.js +12 -2
  427. package/lib/locale/zh_CN.js +1 -1
  428. package/lib/style/components.less +0 -3
  429. package/lib/style/theme/antd.less +38 -48
  430. package/lib/style/theme/base.less +89 -0
  431. package/lib/style/theme/index.less +2 -89
  432. package/lib/utils/index.d.ts +7 -0
  433. package/lib/utils/index.js +26 -2
  434. package/package.json +31 -18
  435. package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
  436. package/es/ProEditTable/components/RcTable/VirtualTable.js +0 -8
  437. package/es/ProForm/components/combination/ProCombination/index.d.ts +0 -6
  438. package/es/ProForm/components/combination/ProCombination/index.js +0 -204
  439. package/es/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
  440. package/es/ProForm/components/combination/ProCombination/style/index.less +0 -18
  441. package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
  442. package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -108
  443. package/es/ProForm/components/old/EnumSelect/index.d.ts +0 -4
  444. package/es/ProForm/components/old/EnumSelect/index.js +0 -272
  445. package/es/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
  446. package/es/ProForm/components/old/EnumSelect/interface.js +0 -1
  447. package/es/ProForm/components/old/EnumSelect/style/index.less +0 -113
  448. package/es/ProForm/components/old/InputRange/index.d.ts +0 -16
  449. package/es/ProForm/components/old/InputRange/index.js +0 -100
  450. package/es/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
  451. package/es/ProForm/components/old/InputWithSuffix/index.js +0 -46
  452. package/es/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
  453. package/es/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -1
  454. package/es/ProForm/components/old/ProAddress/index.d.ts +0 -27
  455. package/es/ProForm/components/old/ProAddress/index.js +0 -298
  456. package/es/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
  457. package/es/ProForm/components/old/ProAddress/propsTypes.js +0 -1
  458. package/es/ProForm/components/old/ProCertNo/index.d.ts +0 -14
  459. package/es/ProForm/components/old/ProCertNo/index.js +0 -66
  460. package/es/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
  461. package/es/ProForm/components/old/ProCertNo/propsType.js +0 -1
  462. package/es/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
  463. package/es/ProForm/components/old/ProCertValidity/index.js +0 -188
  464. package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
  465. package/es/ProForm/components/old/ProCertValidity/propsType.js +0 -1
  466. package/es/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
  467. package/es/ProForm/components/old/ProRangeBox/index.js +0 -97
  468. package/es/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
  469. package/es/ProForm/components/old/ProRangeBox/propsType.js +0 -1
  470. package/es/ProForm/utils/_useChanged.d.ts +0 -8
  471. package/es/ProForm/utils/_useChanged.js +0 -25
  472. package/es/ProForm/utils/_useListChanged.d.ts +0 -16
  473. package/es/ProForm/utils/_useListChanged.js +0 -93
  474. package/es/ProUpload/style/fileItem.less +0 -159
  475. package/es/old/ProCertValidity/index.d.ts +0 -9
  476. package/es/old/ProCertValidity/index.js +0 -188
  477. package/es/old/ProCertValidity/propsType.d.ts +0 -19
  478. package/es/old/ProCertValidity/propsType.js +0 -1
  479. package/es/old/ProEditableTable/index.d.ts +0 -4
  480. package/es/old/ProEditableTable/index.js +0 -594
  481. package/es/old/ProEditableTable/propsType.d.ts +0 -68
  482. package/es/old/ProEditableTable/propsType.js +0 -1
  483. package/es/old/ProEditableTable/style/index.less +0 -75
  484. package/es/old/ProEditableTable/utils.d.ts +0 -29
  485. package/es/old/ProEditableTable/utils.js +0 -323
  486. package/lib/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
  487. package/lib/ProEditTable/components/RcTable/VirtualTable.js +0 -14
  488. package/lib/ProForm/components/combination/ProCombination/index.d.ts +0 -6
  489. package/lib/ProForm/components/combination/ProCombination/index.js +0 -213
  490. package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
  491. package/lib/ProForm/components/combination/ProCombination/style/index.less +0 -18
  492. package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
  493. package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -115
  494. package/lib/ProForm/components/old/EnumSelect/index.d.ts +0 -4
  495. package/lib/ProForm/components/old/EnumSelect/index.js +0 -279
  496. package/lib/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
  497. package/lib/ProForm/components/old/EnumSelect/interface.js +0 -5
  498. package/lib/ProForm/components/old/EnumSelect/style/index.less +0 -113
  499. package/lib/ProForm/components/old/InputRange/index.d.ts +0 -16
  500. package/lib/ProForm/components/old/InputRange/index.js +0 -108
  501. package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
  502. package/lib/ProForm/components/old/InputWithSuffix/index.js +0 -53
  503. package/lib/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
  504. package/lib/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -5
  505. package/lib/ProForm/components/old/ProAddress/index.d.ts +0 -27
  506. package/lib/ProForm/components/old/ProAddress/index.js +0 -306
  507. package/lib/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
  508. package/lib/ProForm/components/old/ProAddress/propsTypes.js +0 -5
  509. package/lib/ProForm/components/old/ProCertNo/index.d.ts +0 -14
  510. package/lib/ProForm/components/old/ProCertNo/index.js +0 -73
  511. package/lib/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
  512. package/lib/ProForm/components/old/ProCertNo/propsType.js +0 -5
  513. package/lib/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
  514. package/lib/ProForm/components/old/ProCertValidity/index.js +0 -193
  515. package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
  516. package/lib/ProForm/components/old/ProCertValidity/propsType.js +0 -5
  517. package/lib/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
  518. package/lib/ProForm/components/old/ProRangeBox/index.js +0 -105
  519. package/lib/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
  520. package/lib/ProForm/components/old/ProRangeBox/propsType.js +0 -5
  521. package/lib/ProForm/utils/_useChanged.d.ts +0 -8
  522. package/lib/ProForm/utils/_useChanged.js +0 -32
  523. package/lib/ProForm/utils/_useListChanged.d.ts +0 -16
  524. package/lib/ProForm/utils/_useListChanged.js +0 -100
  525. package/lib/ProUpload/style/fileItem.less +0 -159
  526. package/lib/old/ProCertValidity/index.d.ts +0 -9
  527. package/lib/old/ProCertValidity/index.js +0 -193
  528. package/lib/old/ProCertValidity/propsType.d.ts +0 -19
  529. package/lib/old/ProCertValidity/propsType.js +0 -5
  530. package/lib/old/ProEditableTable/index.d.ts +0 -4
  531. package/lib/old/ProEditableTable/index.js +0 -601
  532. package/lib/old/ProEditableTable/propsType.d.ts +0 -68
  533. package/lib/old/ProEditableTable/propsType.js +0 -5
  534. package/lib/old/ProEditableTable/style/index.less +0 -75
  535. package/lib/old/ProEditableTable/utils.d.ts +0 -29
  536. package/lib/old/ProEditableTable/utils.js +0 -330
  537. /package/es/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
  538. /package/lib/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
1
  import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
3
2
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
3
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
@@ -11,6 +10,8 @@ import _isObject from "lodash/isObject";
11
10
  import _isString from "lodash/isString";
12
11
  import _cloneDeepWith from "lodash/cloneDeepWith";
13
12
  import _cloneDeep from "lodash/cloneDeep";
13
+ function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
14
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
14
15
  /* eslint-disable no-await-in-loop */
15
16
  /* eslint-disable no-restricted-syntax */
16
17
  import React from 'react';
@@ -214,12 +215,12 @@ export var handleScrollToError = function handleScrollToError() {
214
215
  var childOffsetTop = 0;
215
216
  while (previousSibling) {
216
217
  if (previousSibling.nodeType === 1) {
217
- var _previousSibling, _previousSibling$clas, _previousSibling$clas2, _previousSibling$clas3;
218
+ var _previousSibling, _previousSibling$clas, _previousSibling$clas2;
218
219
  var _ref4 = previousSibling.getBoundingClientRect() || {},
219
220
  _ref4$width = _ref4.width,
220
221
  width = _ref4$width === void 0 ? 0 : _ref4$width;
221
222
  childOffsetLeft += width;
222
- if ((_previousSibling = previousSibling) === null || _previousSibling === void 0 ? void 0 : (_previousSibling$clas = _previousSibling.classList) === null || _previousSibling$clas === void 0 ? void 0 : (_previousSibling$clas2 = (_previousSibling$clas3 = _previousSibling$clas).contains) === null || _previousSibling$clas2 === void 0 ? void 0 : _previousSibling$clas2.call(_previousSibling$clas3, 'ant-table-cell-fix-left')) {
223
+ if ((_previousSibling = previousSibling) === null || _previousSibling === void 0 ? void 0 : (_previousSibling$clas = _previousSibling.classList) === null || _previousSibling$clas === void 0 ? void 0 : (_previousSibling$clas2 = _previousSibling$clas.contains) === null || _previousSibling$clas2 === void 0 ? void 0 : _previousSibling$clas2.call(_previousSibling$clas, 'ant-table-cell-fix-left')) {
223
224
  childFixedLeft += width;
224
225
  }
225
226
  }
@@ -272,11 +273,11 @@ var _isNull = function isNull(value) {
272
273
  return value === '' || value === undefined || value === null || Array.isArray(value) && value.length === 0;
273
274
  };
274
275
  var handleCheckCellValue = /*#__PURE__*/function () {
275
- var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(column, record) {
276
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(column, record) {
276
277
  var _column$names, _column$names2, _rules2;
277
- var value, _required, _rules, _labelRequired, res, _iterator, _step, rule;
278
- return _regeneratorRuntime().wrap(function _callee$(_context) {
279
- while (1) switch (_context.prev = _context.next) {
278
+ var value, _required, _rules, _labelRequired, res, _iterator, _step, rule, _t, _t2;
279
+ return _regenerator().w(function (_context) {
280
+ while (1) switch (_context.p = _context.n) {
280
281
  case 0:
281
282
  value = null;
282
283
  if (column.name) {
@@ -300,81 +301,78 @@ var handleCheckCellValue = /*#__PURE__*/function () {
300
301
  _labelRequired = column.labelRequired(value, record);
301
302
  }
302
303
  if (!(((_column$names2 = column.names) === null || _column$names2 === void 0 ? void 0 : _column$names2.length) && _labelRequired !== null && _labelRequired !== undefined && _isNull(value))) {
303
- _context.next = 11;
304
+ _context.n = 1;
304
305
  break;
305
306
  }
306
- return _context.abrupt("return", false);
307
- case 11:
307
+ return _context.a(2, false);
308
+ case 1:
308
309
  if (!(_required && _isNull(value))) {
309
- _context.next = 13;
310
+ _context.n = 2;
310
311
  break;
311
312
  }
312
- return _context.abrupt("return", false);
313
- case 13:
313
+ return _context.a(2, false);
314
+ case 2:
314
315
  if (!((_rules2 = _rules) === null || _rules2 === void 0 ? void 0 : _rules2.length)) {
315
- _context.next = 44;
316
+ _context.n = 15;
316
317
  break;
317
318
  }
318
319
  res = true;
319
320
  _iterator = _createForOfIteratorHelper(_rules);
320
- _context.prev = 16;
321
+ _context.p = 3;
321
322
  _iterator.s();
322
- case 18:
323
+ case 4:
323
324
  if ((_step = _iterator.n()).done) {
324
- _context.next = 35;
325
+ _context.n = 11;
325
326
  break;
326
327
  }
327
328
  rule = _step.value;
328
329
  if (res) {
329
- _context.next = 22;
330
+ _context.n = 5;
330
331
  break;
331
332
  }
332
- return _context.abrupt("break", 35);
333
- case 22:
333
+ return _context.a(3, 11);
334
+ case 5:
334
335
  if (rule.required && _isNull(value)) {
335
336
  res = false;
336
337
  }
337
338
  if (!_isFunction(rule.validator)) {
338
- _context.next = 32;
339
+ _context.n = 9;
339
340
  break;
340
341
  }
341
- _context.prev = 24;
342
- _context.next = 27;
342
+ _context.p = 6;
343
+ _context.n = 7;
343
344
  return rule.validator('', value);
344
- case 27:
345
- _context.next = 32;
345
+ case 7:
346
+ _context.n = 9;
346
347
  break;
347
- case 29:
348
- _context.prev = 29;
349
- _context.t0 = _context["catch"](24);
348
+ case 8:
349
+ _context.p = 8;
350
+ _t = _context.v;
350
351
  res = false;
351
- case 32:
352
+ case 9:
352
353
  if (rule.type && !validate[rule.type](value)) {
353
354
  res = false;
354
355
  }
355
- case 33:
356
- _context.next = 18;
356
+ case 10:
357
+ _context.n = 4;
357
358
  break;
358
- case 35:
359
- _context.next = 40;
359
+ case 11:
360
+ _context.n = 13;
360
361
  break;
361
- case 37:
362
- _context.prev = 37;
363
- _context.t1 = _context["catch"](16);
364
- _iterator.e(_context.t1);
365
- case 40:
366
- _context.prev = 40;
362
+ case 12:
363
+ _context.p = 12;
364
+ _t2 = _context.v;
365
+ _iterator.e(_t2);
366
+ case 13:
367
+ _context.p = 13;
367
368
  _iterator.f();
368
- return _context.finish(40);
369
- case 43:
370
- return _context.abrupt("return", res);
371
- case 44:
372
- return _context.abrupt("return", true);
373
- case 45:
374
- case "end":
375
- return _context.stop();
369
+ return _context.f(13);
370
+ case 14:
371
+ return _context.a(2, res);
372
+ case 15:
373
+ return _context.a(2, true);
376
374
  }
377
- }, _callee, null, [[16, 37, 40, 43], [24, 29]]);
375
+ }, _callee, null, [[6, 8], [3, 12, 13, 14]]);
378
376
  }));
379
377
  return function handleCheckCellValue(_x, _x2) {
380
378
  return _ref6.apply(this, arguments);
@@ -384,14 +382,14 @@ var handleCheckCellValue = /*#__PURE__*/function () {
384
382
  * 分页校验
385
383
  */
386
384
  export var onPageCheck = /*#__PURE__*/function () {
387
- var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref7) {
388
- var form, name, value, columns, setState, page, pagination, isView, disabled, pageNum, pageSize, pageArr, flag, errorNum, errorPageNum, _i, _pageArr, item, start, end, nextValues, _iterator2, _step2, record, _iterator3, _step3, column, result, nextState;
389
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
390
- while (1) switch (_context2.prev = _context2.next) {
385
+ var _ref8 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(_ref7) {
386
+ var form, name, value, columns, setState, page, pagination, isView, disabled, pageNum, pageSize, pageArr, flag, errorNum, errorPageNum, _i, _pageArr, item, start, end, nextValues, _iterator2, _step2, record, _iterator3, _step3, column, result, nextState, _t3, _t4, _t5, _t6;
387
+ return _regenerator().w(function (_context2) {
388
+ while (1) switch (_context2.p = _context2.n) {
391
389
  case 0:
392
390
  form = _ref7.form, name = _ref7.name, value = _ref7.value, columns = _ref7.columns, setState = _ref7.setState, page = _ref7.page, pagination = _ref7.pagination, isView = _ref7.isView, disabled = _ref7.disabled;
393
391
  if (!(pagination && !isView && !disabled)) {
394
- _context2.next = 72;
392
+ _context2.n = 24;
395
393
  break;
396
394
  }
397
395
  pageNum = page.pageNum, pageSize = page.pageSize;
@@ -404,18 +402,18 @@ export var onPageCheck = /*#__PURE__*/function () {
404
402
  errorNum = 0;
405
403
  errorPageNum = 0;
406
404
  _i = 0, _pageArr = pageArr;
407
- case 8:
405
+ case 1:
408
406
  if (!(_i < _pageArr.length)) {
409
- _context2.next = 60;
407
+ _context2.n = 20;
410
408
  break;
411
409
  }
412
410
  item = _pageArr[_i];
413
411
  if (!flag) {
414
- _context2.next = 12;
412
+ _context2.n = 2;
415
413
  break;
416
414
  }
417
- return _context2.abrupt("break", 60);
418
- case 12:
415
+ return _context2.a(3, 20);
416
+ case 2:
419
417
  errorNum = 0;
420
418
  // 实现思路:截取每一页数据,手动触发每一行数据的校验,通过column配置的rule规则,
421
419
  // 依次校验每一页数据,有错误就跳出循环,跳转到错误页数,并展示错误单元格数量
@@ -423,77 +421,77 @@ export var onPageCheck = /*#__PURE__*/function () {
423
421
  end = tools.calc(start, '+', pageSize);
424
422
  nextValues = value === null || value === void 0 ? void 0 : value.slice(start, end);
425
423
  _iterator2 = _createForOfIteratorHelper(nextValues);
426
- _context2.prev = 17;
424
+ _context2.p = 3;
427
425
  _iterator2.s();
428
- case 19:
426
+ case 4:
429
427
  if ((_step2 = _iterator2.n()).done) {
430
- _context2.next = 48;
428
+ _context2.n = 15;
431
429
  break;
432
430
  }
433
431
  record = _step2.value;
434
432
  _iterator3 = _createForOfIteratorHelper(columns);
435
- _context2.prev = 22;
433
+ _context2.p = 5;
436
434
  _iterator3.s();
437
- case 24:
435
+ case 6:
438
436
  if ((_step3 = _iterator3.n()).done) {
439
- _context2.next = 38;
437
+ _context2.n = 11;
440
438
  break;
441
439
  }
442
440
  column = _step3.value;
443
- _context2.prev = 26;
444
- _context2.next = 29;
441
+ _context2.p = 7;
442
+ _context2.n = 8;
445
443
  return handleCheckCellValue(column, record);
446
- case 29:
447
- result = _context2.sent;
444
+ case 8:
445
+ result = _context2.v;
448
446
  if (!result) {
449
447
  errorNum += 1;
450
448
  }
451
- _context2.next = 36;
449
+ _context2.n = 10;
452
450
  break;
453
- case 33:
454
- _context2.prev = 33;
455
- _context2.t0 = _context2["catch"](26);
451
+ case 9:
452
+ _context2.p = 9;
453
+ _t3 = _context2.v;
456
454
  errorNum += 1;
457
- case 36:
458
- _context2.next = 24;
455
+ case 10:
456
+ _context2.n = 6;
459
457
  break;
460
- case 38:
461
- _context2.next = 43;
458
+ case 11:
459
+ _context2.n = 13;
462
460
  break;
463
- case 40:
464
- _context2.prev = 40;
465
- _context2.t1 = _context2["catch"](22);
466
- _iterator3.e(_context2.t1);
467
- case 43:
468
- _context2.prev = 43;
461
+ case 12:
462
+ _context2.p = 12;
463
+ _t4 = _context2.v;
464
+ _iterator3.e(_t4);
465
+ case 13:
466
+ _context2.p = 13;
469
467
  _iterator3.f();
470
- return _context2.finish(43);
471
- case 46:
472
- _context2.next = 19;
468
+ return _context2.f(13);
469
+ case 14:
470
+ _context2.n = 4;
473
471
  break;
474
- case 48:
475
- _context2.next = 53;
472
+ case 15:
473
+ _context2.n = 17;
476
474
  break;
477
- case 50:
478
- _context2.prev = 50;
479
- _context2.t2 = _context2["catch"](17);
480
- _iterator2.e(_context2.t2);
481
- case 53:
482
- _context2.prev = 53;
475
+ case 16:
476
+ _context2.p = 16;
477
+ _t5 = _context2.v;
478
+ _iterator2.e(_t5);
479
+ case 17:
480
+ _context2.p = 17;
483
481
  _iterator2.f();
484
- return _context2.finish(53);
485
- case 56:
482
+ return _context2.f(17);
483
+ case 18:
486
484
  if (errorNum > 0) {
487
485
  flag = true;
488
486
  errorPageNum = item;
489
487
  }
490
- case 57:
488
+ case 19:
491
489
  _i++;
492
- _context2.next = 8;
490
+ _context2.n = 1;
493
491
  break;
494
- case 60:
492
+ case 20:
495
493
  if (!(flag && errorNum > 0)) {
496
- _context2.next = 72;
494
+ _context2.n = 24;
497
495
  break;
498
496
  }
499
497
  nextState = {
@@ -506,23 +504,22 @@ export var onPageCheck = /*#__PURE__*/function () {
506
504
  };
507
505
  }
508
506
  setState(nextState);
509
- _context2.prev = 64;
510
- _context2.next = 67;
507
+ _context2.p = 21;
508
+ _context2.n = 22;
511
509
  return form.validateFields([name], {
512
510
  recursive: true
513
511
  });
514
- case 67:
515
- _context2.next = 72;
512
+ case 22:
513
+ _context2.n = 24;
516
514
  break;
517
- case 69:
518
- _context2.prev = 69;
519
- _context2.t3 = _context2["catch"](64);
515
+ case 23:
516
+ _context2.p = 23;
517
+ _t6 = _context2.v;
520
518
  handleScrollToError();
521
- case 72:
522
- case "end":
523
- return _context2.stop();
519
+ case 24:
520
+ return _context2.a(2);
524
521
  }
525
- }, _callee2, null, [[17, 50, 53, 56], [22, 40, 43, 46], [26, 33], [64, 69]]);
522
+ }, _callee2, null, [[21, 23], [7, 9], [5, 12, 13, 14], [3, 16, 17, 18]]);
526
523
  }));
527
524
  return function onPageCheck(_x3) {
528
525
  return _ref8.apply(this, arguments);
@@ -10,8 +10,9 @@ var useEditTableError = function useEditTableError(_ref) {
10
10
  errorLength = _useState2[0],
11
11
  setErrorLength = _useState2[1];
12
12
  useEffect(function () {
13
+ var _containerNode$childr3;
13
14
  // 如果 isEnabled 为 false 或容器节点不存在,直接跳过监听
14
- if (!isEnabled || !containerNode) {
15
+ if (!isEnabled || !containerNode || !(containerNode === null || containerNode === void 0 ? void 0 : containerNode.querySelector)) {
15
16
  return; // 如果未启用监听或容器节点不存在,直接返回
16
17
  }
17
18
  // 防抖处理:将 setErrorLength 函数进行防抖
@@ -25,8 +26,9 @@ var useEditTableError = function useEditTableError(_ref) {
25
26
  var target = mutation.target;
26
27
  // 检查目标节点是否包含指定的类
27
28
  if (target.classList.contains(className)) {
29
+ var _containerNode$childr;
28
30
  // 查找所有包含 className 的节点
29
- var errorNodes = containerNode.querySelectorAll(".".concat(className));
31
+ var errorNodes = containerNode === null || containerNode === void 0 ? void 0 : (_containerNode$childr = containerNode.children[0]) === null || _containerNode$childr === void 0 ? void 0 : _containerNode$childr.querySelectorAll(".".concat(className));
30
32
  // 过滤这些节点,只保留那些类名完全为 `ant-form-item-explain-error` 的节点
31
33
  var validErrorNodes = Array.from(errorNodes).filter(function (node) {
32
34
  return node.classList.length === 1 && node.classList.contains('ant-form-item-explain-error');
@@ -46,8 +48,9 @@ var useEditTableError = function useEditTableError(_ref) {
46
48
  // 检查删除的节点是否包含指定的类名
47
49
  mutation.removedNodes.forEach(function (removedNode) {
48
50
  if (removedNode instanceof HTMLElement && removedNode.classList.contains('ant-table-row')) {
51
+ var _containerNode$childr2;
49
52
  // 更新错误数量
50
- var _errorNodes = containerNode.querySelectorAll(".".concat(className));
53
+ var _errorNodes = containerNode === null || containerNode === void 0 ? void 0 : (_containerNode$childr2 = containerNode.children[0]) === null || _containerNode$childr2 === void 0 ? void 0 : _containerNode$childr2.querySelectorAll(".".concat(className));
51
54
  if (errorLength === 0) {
52
55
  debouncedSetErrorLength(0);
53
56
  }
@@ -68,7 +71,12 @@ var useEditTableError = function useEditTableError(_ref) {
68
71
  childList: true
69
72
  };
70
73
  // 启动 MutationObserver
71
- observer.observe(containerNode.querySelector('tbody'), config);
74
+ var targetNode = containerNode === null || containerNode === void 0 ? void 0 : (_containerNode$childr3 = containerNode.children[0]) === null || _containerNode$childr3 === void 0 ? void 0 : _containerNode$childr3.querySelector('tbody');
75
+ if (targetNode instanceof HTMLElement) {
76
+ observer.observe(targetNode, config);
77
+ } else {
78
+ console.error('warning: tbody element not found or invalid');
79
+ }
72
80
  // 清理 MutationObserver 和防抖定时器
73
81
  return function () {
74
82
  observer.disconnect();
@@ -1,15 +1,16 @@
1
- import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
1
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
2
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
5
4
  import _typeof from "@babel/runtime/helpers/esm/typeof";
6
5
  var _ref;
6
+ function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
7
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
7
8
  import { useEffect } from 'react';
8
9
  import { useDeepCompareEffect, useRequest as useRequestFunc } from 'ahooks';
9
- import { diffCode, getEnumData, setEnumData, cacheFieldNames } from '../utils';
10
+ import { diffCode, getEnumData, setEnumData, cacheFieldNames, baseCacheKey } from '../utils';
10
11
  import locale from '../../locale';
11
12
  import '../utils/eventCenter';
12
- var baseEnumStorage = (_ref = window.localStorage.getItem('zat-design-pro-component-cacheKey') && JSON.parse(window.localStorage.getItem('zat-design-pro-component-cacheKey'))) !== null && _ref !== void 0 ? _ref : null;
13
+ var baseEnumStorage = (_ref = window.localStorage.getItem(baseCacheKey) && JSON.parse(window.localStorage.getItem(baseCacheKey))) !== null && _ref !== void 0 ? _ref : null;
13
14
  var useEnumRequest = function useEnumRequest(props, dispatch) {
14
15
  var _ref2 = props || {},
15
16
  _ref2$main = _ref2.main,
@@ -25,7 +26,7 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
25
26
  children: 'children'
26
27
  } : _ref2$fieldNames,
27
28
  _ref2$cacheKey = _ref2.cacheKey,
28
- cacheKey = _ref2$cacheKey === void 0 ? 'zat-design-pro-component-cacheKey' : _ref2$cacheKey,
29
+ cacheKey = _ref2$cacheKey === void 0 ? baseCacheKey : _ref2$cacheKey,
29
30
  _ref2$requestRefresh = _ref2.requestRefresh,
30
31
  requestRefresh = _ref2$requestRefresh === void 0 ? false : _ref2$requestRefresh,
31
32
  _ref2$storage = _ref2.storage,
@@ -52,40 +53,40 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
52
53
  staleTime: 6e4 * 60
53
54
  }, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options), {}, {
54
55
  setCache: function () {
55
- var _setCache = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
56
+ var _setCache = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(res) {
56
57
  var response, _locale$ProEnum2, _useRequest$options, ignoreCodes, cacheData;
57
- return _regeneratorRuntime().wrap(function _callee$(_context) {
58
- while (1) switch (_context.prev = _context.next) {
58
+ return _regenerator().w(function (_context) {
59
+ while (1) switch (_context.n) {
59
60
  case 0:
60
61
  response = res.data;
61
62
  if (!(transformResponse && typeof transformResponse === 'function')) {
62
- _context.next = 10;
63
+ _context.n = 3;
63
64
  break;
64
65
  }
65
- _context.next = 4;
66
+ _context.n = 1;
66
67
  return transformResponse(res.data);
67
- case 4:
68
- response = _context.sent;
68
+ case 1:
69
+ response = _context.v;
69
70
  if (!(_typeof(response) !== 'object' || response == null)) {
70
- _context.next = 9;
71
+ _context.n = 2;
71
72
  break;
72
73
  }
73
74
  throw new Error(locale === null || locale === void 0 ? void 0 : (_locale$ProEnum2 = locale.ProEnum) === null || _locale$ProEnum2 === void 0 ? void 0 : _locale$ProEnum2.errorMessage);
74
- case 9:
75
+ case 2:
75
76
  res.data = response;
76
- case 10:
77
+ case 3:
77
78
  if (!(_typeof(response) !== 'object' || response === null)) {
78
- _context.next = 12;
79
+ _context.n = 4;
79
80
  break;
80
81
  }
81
82
  throw Error('response enum data must be object');
82
- case 12:
83
+ case 4:
83
84
  if (!(Object.keys(response).length === 0)) {
84
- _context.next = 14;
85
+ _context.n = 5;
85
86
  break;
86
87
  }
87
88
  throw Error('Please return valid enumeration data');
88
- case 14:
89
+ case 5:
89
90
  // 只返回fieldNames对象的key
90
91
  if (clear) {
91
92
  // 忽略清洗的 codes
@@ -94,7 +95,7 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
94
95
  if (!response[key] || !Array.isArray(response[key])) {
95
96
  return;
96
97
  }
97
- var options = _toConsumableArray(response[key]) || [];
98
+ var options = _toConsumableArray(response[key]);
98
99
  if (ignoreCodes.includes(key)) {
99
100
  response[key] = options;
100
101
  } else {
@@ -122,10 +123,7 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
122
123
  logDebug(locale === null || locale === void 0 ? void 0 : (_locale$ProEnum3 = locale.ProEnum) === null || _locale$ProEnum3 === void 0 ? void 0 : _locale$ProEnum3.mainInitByRequest);
123
124
  }, 10000);
124
125
  }
125
- return _context.abrupt("return", res);
126
- case 21:
127
- case "end":
128
- return _context.stop();
126
+ return _context.a(2, res);
129
127
  }
130
128
  }, _callee);
131
129
  }));
@@ -162,20 +160,20 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
162
160
  }
163
161
  }));
164
162
  var mergeData = /*#__PURE__*/function () {
165
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
163
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
166
164
  var cacheData, _useRequest$options2, _useRequest$options3, enumData, cacheCodes, codes, ignoreCodes, diff, response, res, _locale$ProEnum6;
167
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
168
- while (1) switch (_context2.prev = _context2.next) {
165
+ return _regenerator().w(function (_context2) {
166
+ while (1) switch (_context2.n) {
169
167
  case 0:
170
168
  cacheData = getEnumData(storage, cacheKey, baseEnumStorage) || {
171
169
  data: {}
172
170
  };
173
171
  if (!(_typeof(cacheData) === 'object')) {
174
- _context2.next = 28;
172
+ _context2.n = 7;
175
173
  break;
176
174
  }
177
175
  if (!(_typeof(cacheData.data) === 'object' && cacheData.data !== null)) {
178
- _context2.next = 28;
176
+ _context2.n = 7;
179
177
  break;
180
178
  }
181
179
  enumData = cacheData.data;
@@ -184,38 +182,38 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
184
182
  ignoreCodes = (useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options3 = useRequest.options) === null || _useRequest$options3 === void 0 ? void 0 : _useRequest$options3.ignoreCodes) || []; // 忽略清洗的 codes
185
183
  diff = diffCode(cacheCodes, codes);
186
184
  if (!diff) {
187
- _context2.next = 27;
185
+ _context2.n = 6;
188
186
  break;
189
187
  }
190
- _context2.next = 11;
188
+ _context2.n = 1;
191
189
  return useRequest === null || useRequest === void 0 ? void 0 : useRequest.service();
192
- case 11:
193
- res = _context2.sent;
190
+ case 1:
191
+ res = _context2.v;
194
192
  if (!(transformResponse && typeof transformResponse === 'function')) {
195
- _context2.next = 20;
193
+ _context2.n = 4;
196
194
  break;
197
195
  }
198
- _context2.next = 15;
196
+ _context2.n = 2;
199
197
  return transformResponse(res);
200
- case 15:
201
- response = _context2.sent;
198
+ case 2:
199
+ response = _context2.v;
202
200
  if (!(_typeof(response) !== 'object' || response == null)) {
203
- _context2.next = 18;
201
+ _context2.n = 3;
204
202
  break;
205
203
  }
206
204
  throw new Error(locale === null || locale === void 0 ? void 0 : (_locale$ProEnum6 = locale.ProEnum) === null || _locale$ProEnum6 === void 0 ? void 0 : _locale$ProEnum6.errorMessage);
207
- case 18:
208
- _context2.next = 21;
205
+ case 3:
206
+ _context2.n = 5;
209
207
  break;
210
- case 20:
208
+ case 4:
211
209
  if (res.status === 200) {
212
210
  response = res.data;
213
211
  }
214
- case 21:
212
+ case 5:
215
213
  // 只返回fieldNames对象的key
216
214
  if (clear) {
217
215
  Object.keys(response).forEach(function (key) {
218
- var options = _toConsumableArray(response[key]) || [];
216
+ var options = _toConsumableArray(response[key]);
219
217
  if (ignoreCodes.includes(key)) {
220
218
  response[key] = options;
221
219
  } else {
@@ -232,9 +230,9 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
232
230
  type: 'setProEnumDic',
233
231
  payload: _objectSpread(_objectSpread(_objectSpread({}, dics), dataSource), cacheData.data)
234
232
  });
235
- _context2.next = 28;
233
+ _context2.n = 7;
236
234
  break;
237
- case 27:
235
+ case 6:
238
236
  if (dataSource && Object.keys(dataSource)) {
239
237
  // 子系统也可能会有 dataSource
240
238
  dispatch({
@@ -242,9 +240,8 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
242
240
  payload: _objectSpread(_objectSpread({}, dics), dataSource)
243
241
  });
244
242
  }
245
- case 28:
246
- case "end":
247
- return _context2.stop();
243
+ case 7:
244
+ return _context2.a(2);
248
245
  }
249
246
  }, _callee2);
250
247
  }));