@zat-design/sisyphus-react 4.0.0-beta.8 → 4.0.0

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 (443) hide show
  1. package/babel.config.js.backup +13 -0
  2. package/dist/index.esm.css +1 -1
  3. package/dist/less.esm.css +1 -1
  4. package/es/ProAction/index.js +14 -4
  5. package/es/ProConfigProvider/index.js +11 -2
  6. package/es/ProDownload/index.js +16 -5
  7. package/es/ProDownload/utils.js +8 -3
  8. package/es/ProDrawerForm/components/ProDrawer/index.js +14 -4
  9. package/es/ProDrawerForm/components/ProModal/index.js +14 -4
  10. package/es/ProDrawerForm/index.js +13 -3
  11. package/es/ProEditLabel/components/RenderProForm.js +5 -1
  12. package/es/ProEditLabel/index.js +16 -5
  13. package/es/ProEditTable/components/ActionButton/index.js +5 -1
  14. package/es/ProEditTable/components/RcTable/BaseTable.js +13 -3
  15. package/es/ProEditTable/components/RcTable/DraggableTable.js +12 -5
  16. package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +7 -2
  17. package/es/ProEditTable/components/RenderField/index.js +54 -29
  18. package/es/ProEditTable/components/RenderToolbar/index.js +10 -4
  19. package/es/ProEditTable/index.js +16 -5
  20. package/es/ProEditTable/propsType.d.ts +12 -6
  21. package/es/ProEditTable/style/index.less +30 -3
  22. package/es/ProEditTable/utils/config.js +8 -3
  23. package/es/ProEditTable/utils/index.js +13 -9
  24. package/es/ProEditTable/utils/tools.js +22 -10
  25. package/es/ProEditTable/utils/useEditTableError.js +6 -1
  26. package/es/ProEditTable/utils/useShouldUpdateForTable.js +16 -7
  27. package/es/ProEnum/components/Group.js +6 -1
  28. package/es/ProEnum/components/Tag.js +6 -1
  29. package/es/ProEnum/hooks/useEnum.d.ts +8 -0
  30. package/es/ProEnum/hooks/useEnum.js +76 -4
  31. package/es/ProEnum/hooks/useEnumRequest.js +8 -3
  32. package/es/ProEnum/hooks/useFrequentEnumRequest.js +8 -3
  33. package/es/ProEnum/index.js +25 -15
  34. package/es/ProEnum/utils/eventCenter.js +3 -1
  35. package/es/ProEnum/utils/frequentEnum.js +5 -1
  36. package/es/ProEnum/utils/index.js +2 -1
  37. package/es/ProForm/components/FormFooter/index.js +5 -1
  38. package/es/ProForm/components/base/Checkbox/index.js +7 -2
  39. package/es/ProForm/components/base/DatePicker/index.js +7 -2
  40. package/es/ProForm/components/base/DatePicker/useDateLimit.js +6 -1
  41. package/es/ProForm/components/base/Input/index.js +7 -2
  42. package/es/ProForm/components/base/InputNumber/index.js +13 -3
  43. package/es/ProForm/components/base/Radio/index.js +7 -2
  44. package/es/ProForm/components/base/RangePicker/index.d.ts +7 -1
  45. package/es/ProForm/components/base/RangePicker/index.js +50 -4
  46. package/es/ProForm/components/base/RangePicker/useDateRange.js +6 -1
  47. package/es/ProForm/components/base/Select/index.js +7 -2
  48. package/es/ProForm/components/base/Switch/index.js +7 -2
  49. package/es/ProForm/components/base/SwitchCheckbox/index.js +7 -2
  50. package/es/ProForm/components/base/TextArea/index.js +7 -2
  51. package/es/ProForm/components/base/TimePicker/index.js +7 -2
  52. package/es/ProForm/components/combination/Container/index.js +5 -1
  53. package/es/ProForm/components/combination/Container/style/index.less +5 -0
  54. package/es/ProForm/components/combination/FormList/components/ActionButton.d.ts +1 -0
  55. package/es/ProForm/components/combination/FormList/components/ActionButton.js +94 -7
  56. package/es/ProForm/components/combination/FormList/components/BlockFields.d.ts +2 -0
  57. package/es/ProForm/components/combination/FormList/components/BlockFields.js +63 -6
  58. package/es/ProForm/components/combination/FormList/components/Empty.js +14 -4
  59. package/es/ProForm/components/combination/FormList/components/LineFields.d.ts +1 -0
  60. package/es/ProForm/components/combination/FormList/components/LineFields.js +9 -3
  61. package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +48 -13
  62. package/es/ProForm/components/combination/FormList/index.js +108 -61
  63. package/es/ProForm/components/combination/FormList/propsType.d.ts +7 -2
  64. package/es/ProForm/components/combination/FormList/style/index.less +41 -0
  65. package/es/ProForm/components/combination/FormList/utils.d.ts +6 -0
  66. package/es/ProForm/components/combination/FormList/utils.js +17 -0
  67. package/es/ProForm/components/combination/Group/component/ComRender.d.ts +3 -0
  68. package/es/ProForm/components/combination/Group/component/ComRender.js +70 -3
  69. package/es/ProForm/components/combination/Group/component/FlexibleGroup.d.ts +10 -0
  70. package/es/ProForm/components/combination/Group/component/FlexibleGroup.js +351 -0
  71. package/es/ProForm/components/combination/Group/hooks/index.d.ts +16 -1
  72. package/es/ProForm/components/combination/Group/hooks/index.js +107 -4
  73. package/es/ProForm/components/combination/Group/index.d.ts +3 -4
  74. package/es/ProForm/components/combination/Group/index.js +108 -24
  75. package/es/ProForm/components/combination/Group/propsType.d.ts +44 -1
  76. package/es/ProForm/components/combination/Group/style/index.less +425 -3
  77. package/es/ProForm/components/combination/Group/utils/index.d.ts +154 -0
  78. package/es/ProForm/components/combination/Group/utils/index.js +428 -0
  79. package/es/ProForm/components/combination/ProCascader/index.js +13 -3
  80. package/es/ProForm/components/combination/ProCascader/utils/index.js +7 -2
  81. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +14 -4
  82. package/es/ProForm/components/combination/ProModalSelect/index.js +16 -5
  83. package/es/ProForm/components/combination/ProNumberRange/index.js +24 -12
  84. package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +4 -0
  85. package/es/ProForm/components/combination/ProNumberRange/style/index.less +14 -7
  86. package/es/ProForm/components/combination/ProRangeLimit/index.js +13 -3
  87. package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +6 -1
  88. package/es/ProForm/components/combination/ProTimeLimit/index.js +13 -3
  89. package/es/ProForm/components/render/ChangedWrapper.js +7 -2
  90. package/es/ProForm/components/render/ConfirmWrapper.js +10 -4
  91. package/es/ProForm/components/render/CustomComponentViewWrapper.d.ts +30 -0
  92. package/es/ProForm/components/render/CustomComponentViewWrapper.js +120 -0
  93. package/es/ProForm/components/render/Render.js +71 -16
  94. package/es/ProForm/components/render/RenderFields.js +7 -2
  95. package/es/ProForm/index.js +13 -3
  96. package/es/ProForm/propsType.d.ts +7 -0
  97. package/es/ProForm/style/index.less +11 -2
  98. package/es/ProForm/utils/index.js +7 -2
  99. package/es/ProForm/utils/rulesCreator.js +5 -1
  100. package/es/ProForm/utils/transformValue.js +5 -1
  101. package/es/ProForm/utils/useForm.js +15 -5
  102. package/es/ProForm/utils/useShouldUpdate.js +93 -35
  103. package/es/ProForm/utils/useWatch.js +9 -4
  104. package/es/ProForm/utils/valueType.js +11 -2
  105. package/es/ProIcon/index.js +13 -3
  106. package/es/ProIcon/utils/index.js +5 -1
  107. package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +19 -14
  108. package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +6 -2
  109. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +48 -31
  110. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +3 -12
  111. package/es/ProLayout/components/Layout/Notice/style/index.less +4 -0
  112. package/es/ProLayout/components/ProCollapse/index.js +5 -1
  113. package/es/ProLayout/components/ProCollapse/style/index.less +9 -9
  114. package/es/ProLayout/components/ProFooter/index.js +6 -2
  115. package/es/ProLayout/components/ProHeader/index.js +33 -19
  116. package/es/ProLayout/components/TabsManager/components/TabContextMenu.d.ts +7 -0
  117. package/es/ProLayout/components/TabsManager/components/TabContextMenu.js +100 -0
  118. package/es/ProLayout/components/TabsManager/components/TabItem.d.ts +26 -0
  119. package/es/ProLayout/components/TabsManager/components/TabItem.js +61 -0
  120. package/es/ProLayout/components/TabsManager/components/TabsContext.d.ts +6 -0
  121. package/es/ProLayout/components/TabsManager/components/TabsContext.js +5 -0
  122. package/es/ProLayout/components/TabsManager/hooks/useActiveTab.d.ts +6 -0
  123. package/es/ProLayout/components/TabsManager/hooks/useActiveTab.js +14 -0
  124. package/es/ProLayout/components/TabsManager/hooks/useProLayoutTabs.d.ts +18 -0
  125. package/es/ProLayout/components/TabsManager/hooks/useProLayoutTabs.js +26 -0
  126. package/es/ProLayout/components/TabsManager/hooks/useTabsCache.d.ts +31 -0
  127. package/es/ProLayout/components/TabsManager/hooks/useTabsCache.js +96 -0
  128. package/es/ProLayout/components/TabsManager/hooks/useTabsState.d.ts +5 -0
  129. package/es/ProLayout/components/TabsManager/hooks/useTabsState.js +364 -0
  130. package/es/ProLayout/components/TabsManager/index.d.ts +8 -0
  131. package/es/ProLayout/components/TabsManager/index.js +180 -0
  132. package/es/ProLayout/components/TabsManager/propTypes.d.ts +74 -0
  133. package/es/ProLayout/components/TabsManager/propTypes.js +16 -0
  134. package/es/ProLayout/components/TabsManager/style/index.less +179 -0
  135. package/es/ProLayout/components/TabsManager/utils/index.d.ts +38 -0
  136. package/es/ProLayout/components/TabsManager/utils/index.js +106 -0
  137. package/es/ProLayout/index.d.ts +21 -4
  138. package/es/ProLayout/index.js +107 -14
  139. package/es/ProLayout/propTypes.d.ts +139 -1
  140. package/es/ProLayout/propTypes.js +37 -1
  141. package/es/ProLayout/utils/index.js +16 -7
  142. package/es/ProSelect/components/AdaptiveTooltip.js +6 -1
  143. package/es/ProSelect/index.js +13 -3
  144. package/es/ProSelect/utils/index.js +3 -1
  145. package/es/ProStep/components/Item/index.js +8 -2
  146. package/es/ProStep/components/Listener/index.js +10 -4
  147. package/es/ProStep/components/Step/index.js +11 -2
  148. package/es/ProStep/index.js +16 -5
  149. package/es/ProStep/utils/index.js +5 -1
  150. package/es/ProStepTab/index.js +19 -8
  151. package/es/ProTable/components/FormatColumn/index.js +7 -2
  152. package/es/ProTable/components/RcTable/components/BaseTable/index.js +7 -2
  153. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +10 -4
  154. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +5 -1
  155. package/es/ProTable/components/RcTable/components/DraggableTable/index.js +7 -2
  156. package/es/ProTable/components/RenderColumn/index.js +11 -2
  157. package/es/ProTable/components/RenderTabs/index.js +11 -2
  158. package/es/ProTable/components/TableResizable/index.js +13 -3
  159. package/es/ProTable/components/TooltipTitle/index.js +3 -5
  160. package/es/ProTable/hooks/useAntdTable.js +69 -35
  161. package/es/ProTable/index.js +16 -5
  162. package/es/ProTable/style/index.less +3 -0
  163. package/es/ProTable/utils/index.js +6 -1
  164. package/es/ProTabs/index.js +13 -3
  165. package/es/ProThemeTools/component/ProTools/index.js +11 -2
  166. package/es/ProThemeTools/context/ThemeContext.js +11 -2
  167. package/es/ProThemeTools/index.js +13 -3
  168. package/es/ProThemeTools/utils/index.js +5 -1
  169. package/es/ProTooltip/index.js +13 -3
  170. package/es/ProTree/components/CloseIcon.js +5 -1
  171. package/es/ProTree/components/List.js +7 -2
  172. package/es/ProTree/components/ProTree.js +16 -5
  173. package/es/ProTree/components/ProTreeSelect/index.js +119 -75
  174. package/es/ProTree/components/Tree.js +16 -5
  175. package/es/ProTree/index.js +5 -1
  176. package/es/ProTree/utils.js +8 -2
  177. package/es/ProTreeModal/components/Cascader.js +11 -2
  178. package/es/ProTreeModal/components/CloseIcon.js +5 -1
  179. package/es/ProTreeModal/components/List.js +6 -1
  180. package/es/ProTreeModal/components/SortableItem.js +5 -1
  181. package/es/ProTreeModal/components/Tree.js +13 -3
  182. package/es/ProTreeModal/components/Trigger.js +11 -2
  183. package/es/ProTreeModal/index.js +11 -2
  184. package/es/ProTreeModal/style/index.less +6 -0
  185. package/es/ProTreeModal/utils.js +8 -2
  186. package/es/ProUpload/components/ButtonRender.js +8 -3
  187. package/es/ProUpload/components/DragRender.d.ts +1 -0
  188. package/es/ProUpload/components/DragRender.js +10 -2
  189. package/es/ProUpload/components/DraggableUploadListItem.js +5 -1
  190. package/es/ProUpload/components/Example.js +11 -2
  191. package/es/ProUpload/components/ImageRender.js +14 -4
  192. package/es/ProUpload/index.js +17 -5
  193. package/es/ProUpload/propsType.d.ts +5 -0
  194. package/es/ProViewer/index.js +14 -4
  195. package/es/ProWaterMark/index.js +5 -1
  196. package/es/index.d.ts +1 -2
  197. package/es/index.js +1 -0
  198. package/es/locale/en_US.d.ts +9 -0
  199. package/es/locale/en_US.js +9 -0
  200. package/es/locale/zh_CN.d.ts +9 -0
  201. package/es/locale/zh_CN.js +9 -0
  202. package/es/style/theme/antd.less +11 -35
  203. package/es/utils/index.js +6 -1
  204. package/jest.config.js +3 -1
  205. package/lib/FormsProvider/index.js +2 -1
  206. package/lib/ProAction/index.js +20 -10
  207. package/lib/ProConfigProvider/index.js +29 -19
  208. package/lib/ProDownload/index.js +29 -17
  209. package/lib/ProDownload/utils.js +14 -12
  210. package/lib/ProDrawerForm/components/ProDrawer/index.js +27 -16
  211. package/lib/ProDrawerForm/components/ProModal/index.js +21 -10
  212. package/lib/ProDrawerForm/components/index.js +2 -2
  213. package/lib/ProDrawerForm/index.js +20 -9
  214. package/lib/ProEditLabel/components/RenderProForm.js +9 -6
  215. package/lib/ProEditLabel/index.js +30 -18
  216. package/lib/ProEditTable/components/ActionButton/index.js +14 -11
  217. package/lib/ProEditTable/components/RcTable/BaseTable.js +19 -9
  218. package/lib/ProEditTable/components/RcTable/DraggableTable.js +24 -16
  219. package/lib/ProEditTable/components/RcTable/index.js +2 -2
  220. package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +16 -10
  221. package/lib/ProEditTable/components/RenderField/index.js +76 -50
  222. package/lib/ProEditTable/components/RenderToolbar/index.js +18 -12
  223. package/lib/ProEditTable/components/index.js +2 -2
  224. package/lib/ProEditTable/index.js +33 -21
  225. package/lib/ProEditTable/propsType.d.ts +12 -6
  226. package/lib/ProEditTable/style/index.less +30 -3
  227. package/lib/ProEditTable/utils/config.js +20 -15
  228. package/lib/ProEditTable/utils/index.js +22 -18
  229. package/lib/ProEditTable/utils/tools.js +30 -21
  230. package/lib/ProEditTable/utils/useEditTableError.js +7 -3
  231. package/lib/ProEditTable/utils/useShouldUpdateForTable.js +17 -9
  232. package/lib/ProEnum/components/Group.js +8 -3
  233. package/lib/ProEnum/components/Tag.js +8 -3
  234. package/lib/ProEnum/hooks/useEnum.d.ts +8 -0
  235. package/lib/ProEnum/hooks/useEnum.js +76 -4
  236. package/lib/ProEnum/hooks/useEnumRequest.js +23 -18
  237. package/lib/ProEnum/hooks/useFrequentEnumRequest.js +12 -8
  238. package/lib/ProEnum/index.js +37 -26
  239. package/lib/ProEnum/utils/eventCenter.js +4 -3
  240. package/lib/ProEnum/utils/frequentEnum.js +6 -3
  241. package/lib/ProEnum/utils/index.js +3 -3
  242. package/lib/ProForm/components/Container.js +1 -1
  243. package/lib/ProForm/components/FormFooter/index.js +11 -6
  244. package/lib/ProForm/components/base/Checkbox/index.js +13 -7
  245. package/lib/ProForm/components/base/DatePicker/index.js +11 -6
  246. package/lib/ProForm/components/base/DatePicker/useDateLimit.js +7 -3
  247. package/lib/ProForm/components/base/Input/index.js +11 -6
  248. package/lib/ProForm/components/base/InputNumber/index.js +21 -10
  249. package/lib/ProForm/components/base/Radio/index.js +10 -5
  250. package/lib/ProForm/components/base/RangePicker/index.d.ts +7 -1
  251. package/lib/ProForm/components/base/RangePicker/index.js +55 -9
  252. package/lib/ProForm/components/base/RangePicker/useDateRange.js +7 -3
  253. package/lib/ProForm/components/base/Select/index.js +10 -5
  254. package/lib/ProForm/components/base/Switch/index.js +10 -5
  255. package/lib/ProForm/components/base/SwitchCheckbox/index.js +12 -6
  256. package/lib/ProForm/components/base/TextArea/index.js +10 -5
  257. package/lib/ProForm/components/base/TimePicker/index.js +10 -5
  258. package/lib/ProForm/components/combination/Container/index.js +11 -6
  259. package/lib/ProForm/components/combination/Container/style/index.less +5 -0
  260. package/lib/ProForm/components/combination/FormList/components/ActionButton.d.ts +1 -0
  261. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +108 -20
  262. package/lib/ProForm/components/combination/FormList/components/BlockFields.d.ts +2 -0
  263. package/lib/ProForm/components/combination/FormList/components/BlockFields.js +65 -8
  264. package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
  265. package/lib/ProForm/components/combination/FormList/components/Empty.js +17 -7
  266. package/lib/ProForm/components/combination/FormList/components/LineFields.d.ts +1 -0
  267. package/lib/ProForm/components/combination/FormList/components/LineFields.js +11 -5
  268. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +58 -23
  269. package/lib/ProForm/components/combination/FormList/index.js +113 -65
  270. package/lib/ProForm/components/combination/FormList/propsType.d.ts +7 -2
  271. package/lib/ProForm/components/combination/FormList/style/index.less +41 -0
  272. package/lib/ProForm/components/combination/FormList/utils.d.ts +6 -0
  273. package/lib/ProForm/components/combination/FormList/utils.js +20 -2
  274. package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +1 -1
  275. package/lib/ProForm/components/combination/Group/component/ComRender.d.ts +3 -0
  276. package/lib/ProForm/components/combination/Group/component/ComRender.js +79 -11
  277. package/lib/ProForm/components/combination/Group/component/FlexibleGroup.d.ts +10 -0
  278. package/lib/ProForm/components/combination/Group/component/FlexibleGroup.js +360 -0
  279. package/lib/ProForm/components/combination/Group/hooks/index.d.ts +16 -1
  280. package/lib/ProForm/components/combination/Group/hooks/index.js +111 -9
  281. package/lib/ProForm/components/combination/Group/index.d.ts +3 -4
  282. package/lib/ProForm/components/combination/Group/index.js +111 -27
  283. package/lib/ProForm/components/combination/Group/propsType.d.ts +44 -1
  284. package/lib/ProForm/components/combination/Group/style/index.less +425 -3
  285. package/lib/ProForm/components/combination/Group/utils/index.d.ts +154 -0
  286. package/lib/ProForm/components/combination/Group/utils/index.js +444 -0
  287. package/lib/ProForm/components/combination/ProCascader/index.js +20 -10
  288. package/lib/ProForm/components/combination/ProCascader/utils/index.js +9 -5
  289. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +25 -15
  290. package/lib/ProForm/components/combination/ProModalSelect/index.js +53 -41
  291. package/lib/ProForm/components/combination/ProNumberRange/index.js +28 -16
  292. package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +4 -0
  293. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +14 -7
  294. package/lib/ProForm/components/combination/ProRangeLimit/index.js +29 -18
  295. package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +8 -3
  296. package/lib/ProForm/components/combination/ProTimeLimit/index.js +26 -15
  297. package/lib/ProForm/components/index.js +2 -2
  298. package/lib/ProForm/components/render/ChangedWrapper.js +16 -10
  299. package/lib/ProForm/components/render/ConfirmWrapper.js +19 -13
  300. package/lib/ProForm/components/render/CustomComponentViewWrapper.d.ts +30 -0
  301. package/lib/ProForm/components/render/CustomComponentViewWrapper.js +127 -0
  302. package/lib/ProForm/components/render/Render.js +93 -37
  303. package/lib/ProForm/components/render/RenderFields.js +15 -9
  304. package/lib/ProForm/index.js +23 -12
  305. package/lib/ProForm/propsType.d.ts +7 -0
  306. package/lib/ProForm/style/index.less +11 -2
  307. package/lib/ProForm/utils/index.js +12 -8
  308. package/lib/ProForm/utils/rulesCreator.js +8 -4
  309. package/lib/ProForm/utils/transformValue.js +6 -3
  310. package/lib/ProForm/utils/useFieldProps.js +2 -1
  311. package/lib/ProForm/utils/useForm.js +21 -12
  312. package/lib/ProForm/utils/useRules.js +1 -1
  313. package/lib/ProForm/utils/useShouldUpdate.js +94 -37
  314. package/lib/ProForm/utils/useWatch.js +11 -6
  315. package/lib/ProForm/utils/valueType.js +15 -6
  316. package/lib/ProIcon/index.js +26 -16
  317. package/lib/ProIcon/utils/index.js +7 -4
  318. package/lib/ProLayout/components/Layout/Header/index.js +1 -1
  319. package/lib/ProLayout/components/Layout/Icon/Icon.js +2 -1
  320. package/lib/ProLayout/components/Layout/Icon/index.js +1 -1
  321. package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +24 -19
  322. package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +6 -2
  323. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +50 -33
  324. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +3 -12
  325. package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +1 -1
  326. package/lib/ProLayout/components/Layout/Menu/index.js +1 -1
  327. package/lib/ProLayout/components/Layout/Notice/index.js +1 -1
  328. package/lib/ProLayout/components/Layout/Notice/style/index.less +4 -0
  329. package/lib/ProLayout/components/Layout/index.js +2 -2
  330. package/lib/ProLayout/components/ProCollapse/index.js +10 -6
  331. package/lib/ProLayout/components/ProCollapse/style/index.less +9 -9
  332. package/lib/ProLayout/components/ProFooter/index.js +8 -4
  333. package/lib/ProLayout/components/ProHeader/components/Copy/index.js +1 -1
  334. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +1 -1
  335. package/lib/ProLayout/components/ProHeader/components/index.js +2 -2
  336. package/lib/ProLayout/components/ProHeader/index.js +41 -27
  337. package/lib/ProLayout/components/TabsManager/components/TabContextMenu.d.ts +7 -0
  338. package/lib/ProLayout/components/TabsManager/components/TabContextMenu.js +106 -0
  339. package/lib/ProLayout/components/TabsManager/components/TabItem.d.ts +26 -0
  340. package/lib/ProLayout/components/TabsManager/components/TabItem.js +67 -0
  341. package/lib/ProLayout/components/TabsManager/components/TabsContext.d.ts +6 -0
  342. package/lib/ProLayout/components/TabsManager/components/TabsContext.js +11 -0
  343. package/lib/ProLayout/components/TabsManager/hooks/useActiveTab.d.ts +6 -0
  344. package/lib/ProLayout/components/TabsManager/hooks/useActiveTab.js +20 -0
  345. package/lib/ProLayout/components/TabsManager/hooks/useProLayoutTabs.d.ts +18 -0
  346. package/lib/ProLayout/components/TabsManager/hooks/useProLayoutTabs.js +31 -0
  347. package/lib/ProLayout/components/TabsManager/hooks/useTabsCache.d.ts +31 -0
  348. package/lib/ProLayout/components/TabsManager/hooks/useTabsCache.js +103 -0
  349. package/lib/ProLayout/components/TabsManager/hooks/useTabsState.d.ts +5 -0
  350. package/lib/ProLayout/components/TabsManager/hooks/useTabsState.js +370 -0
  351. package/lib/ProLayout/components/TabsManager/index.d.ts +8 -0
  352. package/lib/ProLayout/components/TabsManager/index.js +183 -0
  353. package/lib/ProLayout/components/TabsManager/propTypes.d.ts +74 -0
  354. package/lib/ProLayout/components/TabsManager/propTypes.js +22 -0
  355. package/lib/ProLayout/components/TabsManager/style/index.less +179 -0
  356. package/lib/ProLayout/components/TabsManager/utils/index.d.ts +38 -0
  357. package/lib/ProLayout/components/TabsManager/utils/index.js +119 -0
  358. package/lib/ProLayout/components/index.js +2 -2
  359. package/lib/ProLayout/index.d.ts +21 -4
  360. package/lib/ProLayout/index.js +122 -21
  361. package/lib/ProLayout/propTypes.d.ts +139 -1
  362. package/lib/ProLayout/propTypes.js +40 -1
  363. package/lib/ProLayout/utils/index.js +18 -13
  364. package/lib/ProSelect/components/AdaptiveTooltip.js +7 -3
  365. package/lib/ProSelect/index.js +23 -12
  366. package/lib/ProSelect/utils/index.js +8 -8
  367. package/lib/ProStep/components/Anchor/index.js +1 -1
  368. package/lib/ProStep/components/Item/index.js +15 -9
  369. package/lib/ProStep/components/Listener/index.js +15 -9
  370. package/lib/ProStep/components/Step/index.js +17 -7
  371. package/lib/ProStep/index.js +30 -19
  372. package/lib/ProStep/utils/index.js +6 -3
  373. package/lib/ProStepTab/index.js +33 -22
  374. package/lib/ProTable/components/FormatColumn/index.js +22 -16
  375. package/lib/ProTable/components/RcTable/components/BaseTable/index.js +9 -5
  376. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +22 -16
  377. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +8 -5
  378. package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +11 -6
  379. package/lib/ProTable/components/RcTable/index.js +2 -2
  380. package/lib/ProTable/components/RenderColumn/index.js +17 -8
  381. package/lib/ProTable/components/RenderTabs/index.js +16 -7
  382. package/lib/ProTable/components/TableResizable/index.js +19 -9
  383. package/lib/ProTable/components/TooltipTitle/index.js +3 -6
  384. package/lib/ProTable/components/index.js +2 -2
  385. package/lib/ProTable/hooks/useAntdTable.js +94 -60
  386. package/lib/ProTable/index.js +41 -29
  387. package/lib/ProTable/style/index.less +3 -0
  388. package/lib/ProTable/utils/index.js +7 -3
  389. package/lib/ProTabs/components/index.js +2 -2
  390. package/lib/ProTabs/index.js +23 -12
  391. package/lib/ProThemeTools/component/ProTools/index.js +21 -11
  392. package/lib/ProThemeTools/component/index.js +2 -2
  393. package/lib/ProThemeTools/context/ThemeContext.js +20 -16
  394. package/lib/ProThemeTools/index.js +22 -12
  395. package/lib/ProThemeTools/utils/index.js +6 -3
  396. package/lib/ProTooltip/index.js +30 -20
  397. package/lib/ProTree/components/CloseIcon.js +6 -3
  398. package/lib/ProTree/components/List.js +10 -5
  399. package/lib/ProTree/components/ProTree.js +23 -12
  400. package/lib/ProTree/components/ProTreeSelect/index.js +138 -93
  401. package/lib/ProTree/components/SearchTitle.js +1 -1
  402. package/lib/ProTree/components/Tree.js +28 -16
  403. package/lib/ProTree/components/index.js +2 -2
  404. package/lib/ProTree/index.js +9 -5
  405. package/lib/ProTree/utils.js +16 -11
  406. package/lib/ProTreeModal/components/Cascader.js +14 -5
  407. package/lib/ProTreeModal/components/CloseIcon.js +6 -3
  408. package/lib/ProTreeModal/components/List.js +11 -7
  409. package/lib/ProTreeModal/components/SortableItem.js +10 -6
  410. package/lib/ProTreeModal/components/Tree.js +24 -13
  411. package/lib/ProTreeModal/components/Trigger.js +19 -9
  412. package/lib/ProTreeModal/components/index.js +2 -2
  413. package/lib/ProTreeModal/index.js +16 -6
  414. package/lib/ProTreeModal/style/index.less +6 -0
  415. package/lib/ProTreeModal/utils.js +17 -14
  416. package/lib/ProUpload/components/ButtonRender.js +14 -9
  417. package/lib/ProUpload/components/DragRender.d.ts +1 -0
  418. package/lib/ProUpload/components/DragRender.js +13 -5
  419. package/lib/ProUpload/components/DraggableUploadListItem.js +7 -3
  420. package/lib/ProUpload/components/Example.js +16 -6
  421. package/lib/ProUpload/components/FileItem.js +1 -1
  422. package/lib/ProUpload/components/ImageRender.js +20 -10
  423. package/lib/ProUpload/index.js +31 -18
  424. package/lib/ProUpload/propsType.d.ts +5 -0
  425. package/lib/ProViewer/index.js +22 -14
  426. package/lib/ProWaterMark/index.js +7 -3
  427. package/lib/index.d.ts +1 -2
  428. package/lib/index.js +4 -3
  429. package/lib/locale/en_US.d.ts +9 -0
  430. package/lib/locale/en_US.js +9 -0
  431. package/lib/locale/index.js +1 -1
  432. package/lib/locale/zh_CN.d.ts +9 -0
  433. package/lib/locale/zh_CN.js +9 -0
  434. package/lib/style/theme/antd.less +11 -35
  435. package/lib/utils/index.js +9 -4
  436. package/package.json +14 -17
  437. package/package.json.backup-antd5 +159 -0
  438. package/es/ProForm/components/combination/Group/utils.d.ts +0 -54
  439. package/es/ProForm/components/combination/Group/utils.js +0 -196
  440. package/es/assets/tip.svg +0 -1
  441. package/lib/ProForm/components/combination/Group/utils.d.ts +0 -54
  442. package/lib/ProForm/components/combination/Group/utils.js +0 -210
  443. package/lib/assets/tip.svg +0 -1
@@ -1,18 +1,19 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
- exports.useTransformColumns = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
6
+ exports.useTransformColumns = exports.useResetProEditTable = exports.checkShouldShow = void 0;
9
7
  var _react = require("react");
10
8
  var _lodash = require("lodash");
11
9
  var _useDeepCompareMemo = require("../../../../utils/useDeepCompareMemo");
12
10
  var _tools = require("../../../../../ProEditTable/utils/tools");
13
11
  var _utils = require("../utils");
14
- /* eslint-disable no-lonely-if */
15
-
12
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
16
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /* eslint-disable no-lonely-if */
16
17
  /** 转换columns */
17
18
  var useTransformColumns = params => {
18
19
  var form = params.form,
@@ -131,7 +132,6 @@ var useTransformColumns = params => {
131
132
  form,
132
133
  option: args === null || args === void 0 ? void 0 : args[1]
133
134
  });
134
-
135
135
  // 如果是在可编辑表格或formList内部, 储存当前行的值, 并在变更后更新到表单里
136
136
  if (namePath !== null && namePath !== void 0 && namePath.length && !(0, _lodash.isEqual)(originRow, values)) {
137
137
  var _Object$keys, _Object$keys$map;
@@ -166,12 +166,12 @@ var useTransformColumns = params => {
166
166
  }
167
167
  return reactiveProps.disabled || groupProps.disabled;
168
168
  };
169
- return (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, column), {}, {
169
+ return _objectSpread(_objectSpread(_objectSpread({}, column), {}, {
170
170
  name: columnName
171
171
  }, reactiveProps), {}, {
172
172
  disabled: getLastDisabled(),
173
173
  getValueProps: transform === null || transform === void 0 ? void 0 : transform.getValueProps,
174
- fieldProps: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, column === null || column === void 0 ? void 0 : column.fieldProps), reactiveProps === null || reactiveProps === void 0 ? void 0 : reactiveProps.fieldProps), {}, {
174
+ fieldProps: _objectSpread(_objectSpread(_objectSpread({}, column === null || column === void 0 ? void 0 : column.fieldProps), reactiveProps === null || reactiveProps === void 0 ? void 0 : reactiveProps.fieldProps), {}, {
175
175
  onChange: handleChange,
176
176
  onBlur: handleBlur,
177
177
  value: value === null || value === void 0 ? void 0 : value[index]
@@ -179,4 +179,106 @@ var useTransformColumns = params => {
179
179
  });
180
180
  });
181
181
  };
182
- exports.useTransformColumns = useTransformColumns;
182
+
183
+ /**
184
+ * 检查子项是否应该显示(纯函数,不执行副作用)
185
+ */
186
+ exports.useTransformColumns = useTransformColumns;
187
+ var checkShouldShow = (child, form, namePath, index) => {
188
+ var show = child.show;
189
+
190
+ // 如果没有配置 show,默认显示
191
+ if (show === undefined || show === true) {
192
+ return true;
193
+ }
194
+
195
+ // 如果 show 是 false,不显示
196
+ if (show === false) {
197
+ return false;
198
+ }
199
+
200
+ // 如果 show 是函数,需要获取表单值来评估
201
+ if ((0, _lodash.isFunction)(show)) {
202
+ var values = {};
203
+ if (namePath) {
204
+ // FormList 场景:取当前行数据
205
+ values = form.getFieldValue(namePath) || {};
206
+ } else {
207
+ // 普通场景:取整个表单值
208
+ values = form.getFieldsValue(true);
209
+ }
210
+ return Boolean(show(values, {
211
+ form,
212
+ index,
213
+ namePath
214
+ }));
215
+ }
216
+ return true;
217
+ };
218
+ exports.checkShouldShow = checkShouldShow;
219
+ /**
220
+ * ProEditTable 场景下,当字段的 show 从 true 变为 false 时,自动重置字段值
221
+ * 使用 useEffect 在副作用中执行重置,避免在渲染过程中调用 setState
222
+ */
223
+ var useResetProEditTable = params => {
224
+ var children = params.children,
225
+ form = params.form,
226
+ namePath = params.namePath,
227
+ source = params.source;
228
+
229
+ // 用于跟踪每个子项的显示状态
230
+ var showStateRef = (0, _react.useRef)(new Map());
231
+ // 用于存储重置定时器
232
+ var resetTimersRef = (0, _react.useRef)(new Map());
233
+ (0, _react.useEffect)(() => {
234
+ // 只在 ProEditTable 场景下执行重置逻辑
235
+ if (source !== 'ProEditTable') {
236
+ return;
237
+ }
238
+
239
+ // 检查每个子项的显示状态
240
+ children.forEach(child => {
241
+ var childNamePath = child.namePath || namePath;
242
+ var childIndex = child.index;
243
+
244
+ // 生成唯一 key 用于跟踪状态
245
+ var childKey = child.name ? Array.isArray(child.name) ? `${JSON.stringify(childNamePath)}-${JSON.stringify(child.name)}` : `${JSON.stringify(childNamePath)}-${child.name}` : `child-${children.indexOf(child)}`;
246
+
247
+ // 计算当前显示状态
248
+ var currentShow = checkShouldShow(child, form, childNamePath, childIndex);
249
+ var previousShow = showStateRef.current.get(childKey);
250
+
251
+ // 如果状态发生变化,且从显示变为隐藏,执行重置
252
+ if (previousShow !== undefined && previousShow === true && currentShow === false) {
253
+ // 清除之前的定时器
254
+ var existingTimer = resetTimersRef.current.get(childKey);
255
+ if (existingTimer) {
256
+ clearTimeout(existingTimer);
257
+ }
258
+
259
+ // 延迟执行重置,避免在渲染过程中调用
260
+ var timer = setTimeout(() => {
261
+ if (Array.isArray(child.name)) {
262
+ form.resetFields([[...childNamePath, ...child.name]]);
263
+ } else {
264
+ form.resetFields([[...childNamePath, child.name]]);
265
+ }
266
+ resetTimersRef.current.delete(childKey);
267
+ }, 300);
268
+ resetTimersRef.current.set(childKey, timer);
269
+ }
270
+
271
+ // 更新显示状态
272
+ showStateRef.current.set(childKey, currentShow);
273
+ });
274
+
275
+ // 清理函数:组件卸载时清除所有定时器
276
+ return () => {
277
+ resetTimersRef.current.forEach(timer => {
278
+ clearTimeout(timer);
279
+ });
280
+ resetTimersRef.current.clear();
281
+ };
282
+ }, [children, namePath, source, form]);
283
+ };
284
+ exports.useResetProEditTable = useResetProEditTable;
@@ -1,10 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { GroupType } from './propsType';
3
3
  /**
4
- * 1. 外层过滤FormItem相关属性, 但是子元素上的 required [disabled] [show] rules [fieldProps] [component] 需要取到并
5
- * 2.
6
- *
7
- * render内部能力 show, component, value, onChange, disabled, clearNotShow, fieldProps
4
+ * Group组件 - 支持传统模式和灵活模式
5
+ * - 有names属性 → 传统数组模式(保持向后兼容)
6
+ * - 无names属性 → 新的灵活模式(子组件必须配置name)
8
7
  */
9
8
  declare const Group: React.FC<GroupType>;
10
9
  export default Group;
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.default = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
7
  var _antd = require("antd");
10
8
  var _react = _interopRequireDefault(require("react"));
11
9
  var _lodash = require("lodash");
@@ -14,17 +12,22 @@ var _utils = require("./utils");
14
12
  var _hooks = require("./hooks");
15
13
  var _ProForm = _interopRequireDefault(require("../../../../ProForm"));
16
14
  var _ComRender = _interopRequireDefault(require("./component/ComRender"));
15
+ var _FlexibleGroup = _interopRequireDefault(require("./component/FlexibleGroup"));
17
16
  var _jsxRuntime = require("react/jsx-runtime");
18
- /**
19
- * 1. 外层过滤FormItem相关属性, 但是子元素上的 required [disabled] [show] rules [fieldProps] [component] 需要取到并
20
- * 2.
21
- *
22
- * render内部能力 show, component, value, onChange, disabled, clearNotShow, fieldProps
23
- */var Group = props => {
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
19
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
20
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
22
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
23
+ * 传统数组模式Group组件(保持向后兼容)
24
+ */
25
+ var LegacyGroup = props => {
26
+ var _ref, _fieldProps;
24
27
  var children = props.children,
25
28
  className = props.className,
26
29
  _props$space = props.space,
27
- space = _props$space === void 0 ? {
30
+ propsSpace = _props$space === void 0 ? {
28
31
  size: 12
29
32
  } : _props$space,
30
33
  value = props.value,
@@ -33,8 +36,15 @@ var _jsxRuntime = require("react/jsx-runtime");
33
36
  id = props.id,
34
37
  isParentView = props.isView,
35
38
  formDisabled = props.disabled,
36
- _props$split = props.split,
37
- split = _props$split === void 0 ? '/' : _props$split;
39
+ separator = props.separator,
40
+ split = props.split;
41
+
42
+ // 向后兼容处理:优先使用 separator,如果没有则使用 split,最后使用默认值
43
+ var finalSeparator = (_ref = separator !== null && separator !== void 0 ? separator : split) !== null && _ref !== void 0 ? _ref : '/';
44
+
45
+ // 支持从 fieldProps.space 获取 space 配置
46
+ var fieldPropsSpace = (_fieldProps = props.fieldProps) === null || _fieldProps === void 0 ? void 0 : _fieldProps.space;
47
+ var space = fieldPropsSpace || propsSpace;
38
48
  var contextProps = _ProForm.default.useFieldProps() || {};
39
49
  var names = contextProps.names,
40
50
  name = contextProps.name,
@@ -67,6 +77,7 @@ var _jsxRuntime = require("react/jsx-runtime");
67
77
  var columns = (0, _utils.insertSeparator)(columnsProps, space);
68
78
  var nextClassName = (0, _classnames.default)({
69
79
  'pro-group': true,
80
+ 'pro-group-unflexible': true,
70
81
  'pro-group-diy-width': columns.some(item => {
71
82
  var _item$fieldProps;
72
83
  return item === null || item === void 0 || (_item$fieldProps = item.fieldProps) === null || _item$fieldProps === void 0 || (_item$fieldProps = _item$fieldProps.style) === null || _item$fieldProps === void 0 ? void 0 : _item$fieldProps.width;
@@ -80,26 +91,71 @@ var _jsxRuntime = require("react/jsx-runtime");
80
91
  if (nextIsView && (0, _lodash.isEmpty)(value)) {
81
92
  return (otherProps === null || otherProps === void 0 ? void 0 : otherProps.viewEmpty) || '-';
82
93
  }
94
+
95
+ // compact模式专用:为每个字段创建可见的Form.Item,并应用宽度样式
96
+ var renderCompactFormItems = () => {
97
+ var elements = [];
98
+ columns.forEach((column, index) => {
99
+ var _column$fieldProps;
100
+ // 检测是否有自定义宽度
101
+ var childWidth = column === null || column === void 0 || (_column$fieldProps = column.fieldProps) === null || _column$fieldProps === void 0 || (_column$fieldProps = _column$fieldProps.style) === null || _column$fieldProps === void 0 ? void 0 : _column$fieldProps.width;
102
+ var formItemStyle = childWidth ? {
103
+ width: childWidth
104
+ } : undefined;
105
+ var formItemClassName = childWidth ? 'pro-group-form-item pro-group-form-item-has-width' : 'pro-group-form-item';
106
+
107
+ // 创建新的 column 对象,避免直接修改原对象
108
+ var newColumn = _objectSpread({}, column);
109
+ newColumn.otherProps = otherProps;
110
+
111
+ // 如果子组件有自定义宽度,将子组件的宽度改为 100%,让它填充 Form.Item
112
+ if (childWidth) {
113
+ var _newColumn$fieldProps;
114
+ newColumn.fieldProps = _objectSpread(_objectSpread({}, newColumn.fieldProps), {}, {
115
+ style: _objectSpread(_objectSpread({}, (_newColumn$fieldProps = newColumn.fieldProps) === null || _newColumn$fieldProps === void 0 ? void 0 : _newColumn$fieldProps.style), {}, {
116
+ width: '100%'
117
+ })
118
+ });
119
+ }
120
+
121
+ // 自定义间隔移除对应参数
122
+ if (newColumn !== null && newColumn !== void 0 && newColumn.separator) {
123
+ delete newColumn.separator;
124
+ delete newColumn.otherProps;
125
+ }
126
+
127
+ // 传统模式 compact 模式:将 Form.Item 相关的 props 传递给 ComRender
128
+ // ComRender 内部会处理 Form.Item 的渲染,避免嵌套
129
+ var dependencies = names && names.length > 0 ? names.filter(n => n !== newColumn.name) : undefined;
130
+ var formElement = /*#__PURE__*/(0, _jsxRuntime.jsx)(_ComRender.default, _objectSpread({
131
+ contextProps: contextProps,
132
+ isView: nextIsView,
133
+ formItemClassName: formItemClassName,
134
+ formItemStyle: formItemStyle,
135
+ dependencies: dependencies
136
+ }, newColumn), newColumn.name || index);
137
+ elements.push(formElement);
138
+
139
+ // 添加分隔符
140
+ if (newColumn !== null && newColumn !== void 0 && newColumn.separator && index < columns.length - 1) {
141
+ elements.push( /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
142
+ className: "pro-group-separator-compact",
143
+ children: newColumn.separator
144
+ }, `separator-${newColumn.name || index}`));
145
+ }
146
+ });
147
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
148
+ className: "ant-space ant-space-horizontal ant-space-compact pro-group-compact-container",
149
+ children: elements
150
+ });
151
+ };
83
152
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
84
153
  className: nextClassName,
85
154
  id: id,
86
- children: (space.compact || space !== null && space !== void 0 && space.separator) && !nextIsView ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Space.Compact, {
87
- children: columns.map((column, index) => {
88
- column.otherProps = otherProps;
89
- // 自定义间隔移除对应参数
90
- if (column !== null && column !== void 0 && column.separator) {
91
- delete column.separator;
92
- delete column.otherProps;
93
- }
94
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ComRender.default, (0, _objectSpread2.default)({
95
- contextProps: contextProps,
96
- isView: nextIsView
97
- }, column), column.name || index);
98
- })
99
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Space, (0, _objectSpread2.default)((0, _objectSpread2.default)({
155
+ children: (space.compact || space !== null && space !== void 0 && space.separator) && !nextIsView ? renderCompactFormItems() : /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Space, _objectSpread(_objectSpread({
100
156
  align: "start"
101
157
  }, (0, _lodash.omit)(space, ['separator', 'compact'])), {}, {
102
- split: nextIsView ? split : null,
158
+ separator: nextIsView ? finalSeparator : null,
103
159
  size: nextIsView ? 0 : space.size,
104
160
  children: columns.map((column, index) => {
105
161
  column.otherProps = otherProps;
@@ -107,7 +163,7 @@ var _jsxRuntime = require("react/jsx-runtime");
107
163
  delete column.separator;
108
164
  delete column.otherProps;
109
165
  }
110
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ComRender.default, (0, _objectSpread2.default)({
166
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ComRender.default, _objectSpread({
111
167
  contextProps: contextProps,
112
168
  isView: nextIsView
113
169
  }, column), column.name || index);
@@ -115,4 +171,32 @@ var _jsxRuntime = require("react/jsx-runtime");
115
171
  }))
116
172
  });
117
173
  };
174
+
175
+ /**
176
+ * Group组件 - 支持传统模式和灵活模式
177
+ * - 有names属性 → 传统数组模式(保持向后兼容)
178
+ * - 无names属性 → 新的灵活模式(子组件必须配置name)
179
+ */
180
+ var Group = props => {
181
+ var _ref2 = props,
182
+ children = _ref2.children,
183
+ names = _ref2.names,
184
+ otherProps = _ref2.otherProps;
185
+
186
+ // names可能在props.names或props.otherProps.names中(来自ProForm的传递)
187
+ var actualNames = names || (otherProps === null || otherProps === void 0 ? void 0 : otherProps.names);
188
+
189
+ // 模式检测:基于names属性判断使用哪种模式
190
+ // 传统模式:有names属性且为非空数组
191
+ // 灵活模式:无names属性或names为空,children中的子项必须配置name
192
+ var isLegacyMode = Array.isArray(actualNames) && actualNames.length > 0;
193
+ if (isLegacyMode) {
194
+ // 传统模式:使用names数组管理值,确保names被传递给LegacyGroup
195
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(LegacyGroup, _objectSpread(_objectSpread({}, props), {}, {
196
+ names: actualNames
197
+ }));
198
+ }
199
+ // 灵活模式:子组件独立管理name和rules
200
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FlexibleGroup.default, _objectSpread({}, props));
201
+ };
118
202
  var _default = exports.default = Group;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { FormItemProps, ModalFuncProps, SpaceProps } from 'antd';
3
+ import type { RuleObject } from 'antd/es/form';
3
4
  import { FormInstance } from 'antd/es/form/Form';
4
5
  import { NamePath } from 'antd/lib/form/interface';
5
6
  import type { ColumnTypeMap, FunctionArgs, ProFormValueType, ReactiveFunction, ViewType } from '../../render/propsType';
@@ -18,7 +19,9 @@ export interface SpaceType extends SpaceProps {
18
19
  size?: number;
19
20
  }
20
21
  export interface GroupType {
21
- children?: GroupColumnType[];
22
+ children?: GroupColumnType[] | FlexibleGroupColumnType[];
23
+ /** 传统模式:字段名称数组(与children索引对应) */
24
+ names?: NamePath[];
22
25
  space?: SpaceType;
23
26
  className?: string;
24
27
  id?: string;
@@ -28,6 +31,10 @@ export interface GroupType {
28
31
  onChange?: (value: any[] | null, options?: any[]) => void;
29
32
  otherProps?: any;
30
33
  /** 分隔符 */
34
+ separator?: string | React.ReactNode;
35
+ /**
36
+ * @deprecated 已弃用,请使用 separator 替代
37
+ */
31
38
  split?: string | React.ReactNode;
32
39
  }
33
40
  export type GroupColumnType<Values = any> = {
@@ -54,6 +61,42 @@ export type GroupColumnType<Values = any> = {
54
61
  getValueProps?: (value: any) => Record<string, unknown>;
55
62
  desensitization?: [number, number] | ReactiveFunction<Values, [number, number]>;
56
63
  } & ColumnTypeMap & FormItemProps;
64
+ /**
65
+ * 灵活模式子组件类型定义(新模式)
66
+ */
67
+ export interface FlexibleGroupColumnType<Values = any> extends Omit<GroupColumnType<Values>, 'names' | 'tooltip' | 'rules'> {
68
+ /** 字段名称,新模式下必须 */
69
+ name: NamePath;
70
+ /** 字段标签 */
71
+ label?: React.ReactNode;
72
+ /** 校验规则,支持函数化 */
73
+ rules?: RuleObject[] | ReactiveFunction<Values, RuleObject[]>;
74
+ /** 是否必填 */
75
+ required?: boolean;
76
+ /** 字段依赖 */
77
+ dependencies?: NamePath[];
78
+ /** 提示信息 */
79
+ tooltip?: string | {
80
+ title: string;
81
+ icon?: React.ReactNode;
82
+ };
83
+ /** 额外信息 */
84
+ extra?: React.ReactNode;
85
+ /** 前置内容 */
86
+ before?: React.ReactNode;
87
+ /** 后置内容 */
88
+ after?: React.ReactNode;
89
+ /** 确认操作 */
90
+ confirm?: boolean | ModalFuncProps | FunctionArgs<Values, boolean | ModalFuncProps>;
91
+ /** 显示控制,支持函数化 */
92
+ show?: boolean | ReactiveFunction<Values, boolean>;
93
+ /** 禁用状态,支持函数化 */
94
+ disabled?: boolean | ReactiveFunction<Values, boolean>;
95
+ /** 自定义组件,支持函数化 */
96
+ component?: React.ReactNode | ReactiveFunction<Values, React.ReactNode>;
97
+ /** 字段属性,支持函数化 */
98
+ fieldProps?: any | ReactiveFunction<Values, any>;
99
+ }
57
100
  /**
58
101
  * 兼容旧命名导出
59
102
  */