@zat-design/sisyphus-react 3.9.2-beta.7 → 3.9.2-beta.9

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 (226) hide show
  1. package/.vscode/extensions.json +5 -0
  2. package/es/ProAction/index.js +5 -5
  3. package/es/ProConfigProvider/index.js +3 -3
  4. package/es/ProDownload/index.d.ts +1 -1
  5. package/es/ProDownload/index.js +3 -3
  6. package/es/ProDownload/utils.js +3 -3
  7. package/es/ProDrawerForm/components/ProDrawer/index.js +4 -4
  8. package/es/ProDrawerForm/components/ProModal/index.js +3 -3
  9. package/es/ProEditLabel/index.js +3 -3
  10. package/es/ProEditTable/components/ActionButton/index.d.ts +1 -1
  11. package/es/ProEditTable/components/ActionButton/index.js +3 -3
  12. package/es/ProEditTable/components/RcTable/BaseTable.d.ts +1 -1
  13. package/es/ProEditTable/components/RcTable/DraggableTable.d.ts +1 -1
  14. package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +1 -1
  15. package/es/ProEditTable/components/RenderField/index.d.ts +1 -1
  16. package/es/ProEditTable/components/RenderField/index.js +5 -5
  17. package/es/ProEditTable/components/RenderToolbar/index.d.ts +1 -1
  18. package/es/ProEditTable/components/RenderToolbar/index.js +1 -1
  19. package/es/ProEditTable/components/Summary/index.d.ts +1 -1
  20. package/es/ProEditTable/index.js +7 -3
  21. package/es/ProEditTable/utils/config.d.ts +1 -1
  22. package/es/ProEditTable/utils/config.js +2 -2
  23. package/es/ProEditTable/utils/index.js +5 -5
  24. package/es/ProEditTable/utils/tools.js +4 -4
  25. package/es/ProEnum/components/Group.d.ts +1 -1
  26. package/es/ProEnum/components/Tag.d.ts +1 -1
  27. package/es/ProEnum/hooks/useEnumRequest.js +2 -2
  28. package/es/ProEnum/index.d.ts +2 -2
  29. package/es/ProEnum/index.js +1 -1
  30. package/es/ProEnum/utils/eventCenter.js +1 -2
  31. package/es/ProEnum/utils/getEnumLabel.d.ts +1 -1
  32. package/es/ProForm/components/base/Input/index.d.ts +1 -1
  33. package/es/ProForm/components/combination/FormList/components/ActionButton.js +11 -8
  34. package/es/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
  35. package/es/ProForm/components/combination/FormList/components/LineFields.js +2 -1
  36. package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +7 -4
  37. package/es/ProForm/components/combination/FormList/index.js +1 -1
  38. package/es/ProForm/components/combination/FormList/utils.js +1 -1
  39. package/es/ProForm/components/combination/Group/component/ComRender.js +1 -1
  40. package/es/ProForm/components/combination/ProCascader/index.d.ts +1 -1
  41. package/es/ProForm/components/combination/ProCascader/index.js +15 -11
  42. package/es/ProForm/components/combination/ProCascader/propsType.d.ts +2 -0
  43. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +1 -1
  44. package/es/ProForm/components/combination/ProModalSelect/index.js +5 -5
  45. package/es/ProForm/components/old/InputRange/index.d.ts +1 -1
  46. package/es/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
  47. package/es/ProForm/components/old/ProAddress/index.d.ts +1 -2
  48. package/es/ProForm/components/old/ProAddress/index.js +1 -1
  49. package/es/ProForm/components/old/ProRangeBox/index.d.ts +1 -2
  50. package/es/ProForm/components/render/ChangedWrapper.js +6 -4
  51. package/es/ProForm/components/render/ConfirmWrapper.js +1 -1
  52. package/es/ProForm/components/render/Render.js +14 -10
  53. package/es/ProForm/index.js +12 -9
  54. package/es/ProForm/utils/index.js +14 -10
  55. package/es/ProForm/utils/useForm.js +1 -1
  56. package/es/ProIcon/index.js +39 -22
  57. package/es/ProIcon/propsTypes.d.ts +2 -0
  58. package/es/ProIcon/utils/index.js +4 -3
  59. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +1 -1
  60. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -3
  61. package/es/ProLayout/components/ProCollapse/index.d.ts +1 -1
  62. package/es/ProLayout/components/ProFooter/index.d.ts +1 -1
  63. package/es/ProLayout/components/ProHeader/components/Copy/index.d.ts +1 -1
  64. package/es/ProLayout/components/ProHeader/index.d.ts +1 -1
  65. package/es/ProLayout/index.d.ts +4 -4
  66. package/es/ProLayout/utils/index.js +9 -9
  67. package/es/ProSelect/components/AdaptiveTooltip.d.ts +1 -1
  68. package/es/ProSelect/index.d.ts +1 -1
  69. package/es/ProStep/components/Anchor/index.d.ts +1 -1
  70. package/es/ProStep/components/Item/index.d.ts +1 -1
  71. package/es/ProStep/components/Listener/index.js +1 -1
  72. package/es/ProStep/components/Step/index.d.ts +1 -1
  73. package/es/ProStep/index.d.ts +2 -2
  74. package/es/ProStep/index.js +3 -3
  75. package/es/ProTable/components/FormatColumn/index.js +3 -3
  76. package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +1 -1
  77. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +2 -2
  78. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +9 -8
  79. package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +1 -1
  80. package/es/ProTable/components/RenderFooter/index.d.ts +1 -1
  81. package/es/ProTable/components/RenderTableHeader/index.d.ts +1 -1
  82. package/es/ProTable/components/TableResizable/index.d.ts +1 -1
  83. package/es/ProTable/hooks/useAntdTable.js +3 -3
  84. package/es/ProTable/index.d.ts +1 -1
  85. package/es/ProTable/index.js +2 -2
  86. package/es/ProTabs/components/Card/index.d.ts +1 -1
  87. package/es/ProThemeTools/component/ProTools/index.d.ts +1 -1
  88. package/es/ProThemeTools/index.d.ts +1 -1
  89. package/es/ProTooltip/index.d.ts +1 -1
  90. package/es/ProTree/components/AdaptiveTooltip.d.ts +1 -1
  91. package/es/ProTree/components/CloseIcon.d.ts +1 -2
  92. package/es/ProTree/components/List.d.ts +1 -1
  93. package/es/ProTree/components/ProTree.d.ts +1 -1
  94. package/es/ProTree/components/ProTree.js +1 -1
  95. package/es/ProTree/components/ProTreeSelect/index.d.ts +1 -1
  96. package/es/ProTree/components/ProTreeSelect/index.js +20 -20
  97. package/es/ProTree/components/SearchTitle.d.ts +1 -1
  98. package/es/ProTree/components/Tree.d.ts +1 -1
  99. package/es/ProTree/components/Tree.js +4 -4
  100. package/es/ProTree/index.d.ts +1 -1
  101. package/es/ProTree/utils.js +12 -11
  102. package/es/ProTreeModal/components/Cascader.d.ts +1 -1
  103. package/es/ProTreeModal/components/CloseIcon.d.ts +1 -2
  104. package/es/ProTreeModal/components/SearchTitle.d.ts +1 -1
  105. package/es/ProTreeModal/components/Tree.js +6 -6
  106. package/es/ProTreeModal/components/Trigger.d.ts +1 -1
  107. package/es/ProTreeModal/index.d.ts +1 -1
  108. package/es/ProTreeModal/index.js +3 -3
  109. package/es/ProTreeModal/utils.js +16 -14
  110. package/es/ProUpload/components/DraggableUploadListItem.d.ts +1 -1
  111. package/es/ProUpload/components/ImageRender.js +1 -1
  112. package/es/ProViewer/index.js +2 -2
  113. package/es/old/ProEditableTable/index.js +4 -4
  114. package/lib/ProAction/index.js +5 -5
  115. package/lib/ProConfigProvider/index.js +2 -2
  116. package/lib/ProDownload/index.d.ts +1 -1
  117. package/lib/ProDownload/index.js +3 -3
  118. package/lib/ProDownload/utils.js +3 -3
  119. package/lib/ProDrawerForm/components/ProDrawer/index.js +4 -4
  120. package/lib/ProDrawerForm/components/ProModal/index.js +3 -3
  121. package/lib/ProEditLabel/index.js +3 -3
  122. package/lib/ProEditTable/components/ActionButton/index.d.ts +1 -1
  123. package/lib/ProEditTable/components/ActionButton/index.js +3 -3
  124. package/lib/ProEditTable/components/RcTable/BaseTable.d.ts +1 -1
  125. package/lib/ProEditTable/components/RcTable/DraggableTable.d.ts +1 -1
  126. package/lib/ProEditTable/components/RcTable/VirtualTable.d.ts +1 -1
  127. package/lib/ProEditTable/components/RenderField/index.d.ts +1 -1
  128. package/lib/ProEditTable/components/RenderField/index.js +5 -5
  129. package/lib/ProEditTable/components/RenderToolbar/index.d.ts +1 -1
  130. package/lib/ProEditTable/components/RenderToolbar/index.js +1 -1
  131. package/lib/ProEditTable/components/Summary/index.d.ts +1 -1
  132. package/lib/ProEditTable/index.js +6 -2
  133. package/lib/ProEditTable/utils/config.d.ts +1 -1
  134. package/lib/ProEditTable/utils/config.js +2 -2
  135. package/lib/ProEditTable/utils/index.js +5 -5
  136. package/lib/ProEditTable/utils/tools.js +4 -4
  137. package/lib/ProEnum/components/Group.d.ts +1 -1
  138. package/lib/ProEnum/components/Tag.d.ts +1 -1
  139. package/lib/ProEnum/hooks/useEnumRequest.js +2 -2
  140. package/lib/ProEnum/index.d.ts +2 -2
  141. package/lib/ProEnum/index.js +1 -1
  142. package/lib/ProEnum/utils/eventCenter.js +1 -2
  143. package/lib/ProEnum/utils/getEnumLabel.d.ts +1 -1
  144. package/lib/ProForm/components/base/Input/index.d.ts +1 -1
  145. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +10 -7
  146. package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
  147. package/lib/ProForm/components/combination/FormList/components/LineFields.js +2 -1
  148. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +5 -3
  149. package/lib/ProForm/components/combination/FormList/index.js +1 -1
  150. package/lib/ProForm/components/combination/FormList/utils.js +1 -1
  151. package/lib/ProForm/components/combination/Group/component/ComRender.js +1 -1
  152. package/lib/ProForm/components/combination/ProCascader/index.d.ts +1 -1
  153. package/lib/ProForm/components/combination/ProCascader/index.js +15 -11
  154. package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +2 -0
  155. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +1 -1
  156. package/lib/ProForm/components/combination/ProModalSelect/index.js +5 -5
  157. package/lib/ProForm/components/old/InputRange/index.d.ts +1 -1
  158. package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
  159. package/lib/ProForm/components/old/ProAddress/index.d.ts +1 -2
  160. package/lib/ProForm/components/old/ProAddress/index.js +1 -1
  161. package/lib/ProForm/components/old/ProRangeBox/index.d.ts +1 -2
  162. package/lib/ProForm/components/render/ChangedWrapper.js +6 -4
  163. package/lib/ProForm/components/render/ConfirmWrapper.js +1 -1
  164. package/lib/ProForm/components/render/Render.js +14 -10
  165. package/lib/ProForm/index.js +11 -8
  166. package/lib/ProForm/utils/index.js +10 -10
  167. package/lib/ProForm/utils/useForm.js +1 -1
  168. package/lib/ProIcon/index.js +37 -22
  169. package/lib/ProIcon/propsTypes.d.ts +2 -0
  170. package/lib/ProIcon/utils/index.js +3 -3
  171. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +1 -1
  172. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -3
  173. package/lib/ProLayout/components/ProCollapse/index.d.ts +1 -1
  174. package/lib/ProLayout/components/ProFooter/index.d.ts +1 -1
  175. package/lib/ProLayout/components/ProHeader/components/Copy/index.d.ts +1 -1
  176. package/lib/ProLayout/components/ProHeader/index.d.ts +1 -1
  177. package/lib/ProLayout/index.d.ts +4 -4
  178. package/lib/ProLayout/utils/index.js +9 -9
  179. package/lib/ProSelect/components/AdaptiveTooltip.d.ts +1 -1
  180. package/lib/ProSelect/index.d.ts +1 -1
  181. package/lib/ProStep/components/Anchor/index.d.ts +1 -1
  182. package/lib/ProStep/components/Item/index.d.ts +1 -1
  183. package/lib/ProStep/components/Listener/index.js +1 -1
  184. package/lib/ProStep/components/Step/index.d.ts +1 -1
  185. package/lib/ProStep/index.d.ts +2 -2
  186. package/lib/ProStep/index.js +3 -3
  187. package/lib/ProTable/components/FormatColumn/index.js +3 -3
  188. package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +1 -1
  189. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +2 -2
  190. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +8 -8
  191. package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +1 -1
  192. package/lib/ProTable/components/RenderFooter/index.d.ts +1 -1
  193. package/lib/ProTable/components/RenderTableHeader/index.d.ts +1 -1
  194. package/lib/ProTable/components/TableResizable/index.d.ts +1 -1
  195. package/lib/ProTable/hooks/useAntdTable.js +3 -3
  196. package/lib/ProTable/index.d.ts +1 -1
  197. package/lib/ProTable/index.js +2 -2
  198. package/lib/ProTabs/components/Card/index.d.ts +1 -1
  199. package/lib/ProThemeTools/component/ProTools/index.d.ts +1 -1
  200. package/lib/ProThemeTools/index.d.ts +1 -1
  201. package/lib/ProTooltip/index.d.ts +1 -1
  202. package/lib/ProTree/components/AdaptiveTooltip.d.ts +1 -1
  203. package/lib/ProTree/components/CloseIcon.d.ts +1 -2
  204. package/lib/ProTree/components/List.d.ts +1 -1
  205. package/lib/ProTree/components/ProTree.d.ts +1 -1
  206. package/lib/ProTree/components/ProTree.js +1 -1
  207. package/lib/ProTree/components/ProTreeSelect/index.d.ts +1 -1
  208. package/lib/ProTree/components/ProTreeSelect/index.js +20 -20
  209. package/lib/ProTree/components/SearchTitle.d.ts +1 -1
  210. package/lib/ProTree/components/Tree.d.ts +1 -1
  211. package/lib/ProTree/components/Tree.js +4 -4
  212. package/lib/ProTree/index.d.ts +1 -1
  213. package/lib/ProTree/utils.js +11 -11
  214. package/lib/ProTreeModal/components/Cascader.d.ts +1 -1
  215. package/lib/ProTreeModal/components/CloseIcon.d.ts +1 -2
  216. package/lib/ProTreeModal/components/SearchTitle.d.ts +1 -1
  217. package/lib/ProTreeModal/components/Tree.js +6 -6
  218. package/lib/ProTreeModal/components/Trigger.d.ts +1 -1
  219. package/lib/ProTreeModal/index.d.ts +1 -1
  220. package/lib/ProTreeModal/index.js +3 -3
  221. package/lib/ProTreeModal/utils.js +13 -13
  222. package/lib/ProUpload/components/DraggableUploadListItem.d.ts +1 -1
  223. package/lib/ProUpload/components/ImageRender.js +1 -1
  224. package/lib/ProViewer/index.js +2 -2
  225. package/lib/old/ProEditableTable/index.js +4 -4
  226. package/package.json +1 -1
@@ -19,6 +19,7 @@ var _ProIcon = _interopRequireDefault(require("../../../../../ProIcon"));
19
19
  var _locale = _interopRequireDefault(require("../../../../../locale"));
20
20
  var _excluded = ["label", "onClick", "onHandle", "type", "needConfirm", "confirmProps", "title"],
21
21
  _excluded2 = ["onClick", "label"];
22
+ var filterKeys = ['actionType'];
22
23
  var getDefaultActions = function getDefaultActions(mode) {
23
24
  var originActions = {
24
25
  add: {
@@ -43,9 +44,11 @@ var getDefaultActions = function getDefaultActions(mode) {
43
44
  label: "".concat(_locale.default.ProForm.formListActions[1]),
44
45
  icon: mode === 'less' ? (0, _jsxRuntime.jsx)(_ProIcon.default, {
45
46
  type: "solid-close",
46
- className: "single-delete"
47
+ className: "single-delete",
48
+ buttonIcon: false
47
49
  }) : (0, _jsxRuntime.jsx)(_ProIcon.default, {
48
- type: "delete"
50
+ type: "delete",
51
+ buttonIcon: false
49
52
  })
50
53
  },
51
54
  copy: {
@@ -134,7 +137,7 @@ var ActionButton = function ActionButton(props) {
134
137
  return _actionProps;
135
138
  }, [props.actionProps]);
136
139
  var handleClick = /*#__PURE__*/function () {
137
- var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(defaultCallback, callback, index, item) {
140
+ var _ref6 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(defaultCallback, callback, index, item) {
138
141
  var value, data;
139
142
  return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
140
143
  while (1) switch (_context.prev = _context.next) {
@@ -241,14 +244,14 @@ var ActionButton = function ActionButton(props) {
241
244
  handleClick(internalOnClick, _onClick, index, item);
242
245
  }
243
246
  }, _confirmProps), {}, {
244
- children: (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, defaultRest), rest), {}, {
247
+ children: (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, defaultRest), (0, _lodash.omit)(rest, filterKeys)), {}, {
245
248
  type: "text",
246
249
  onClick: function onClick(e) {
247
250
  return e.stopPropagation();
248
251
  },
249
252
  children: label || defaultLabel
250
253
  }))
251
- }), "".concat(item === null || item === void 0 ? void 0 : item.type).concat(index)) : (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, defaultRest), rest), {}, {
254
+ }), "".concat(item === null || item === void 0 ? void 0 : item.type).concat(index)) : (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, defaultRest), (0, _lodash.omit)(rest, filterKeys)), {}, {
252
255
  type: "text",
253
256
  onClick: function onClick(e) {
254
257
  e.stopPropagation();
@@ -266,14 +269,14 @@ var ActionButton = function ActionButton(props) {
266
269
  return customClick(_onClick, index);
267
270
  }
268
271
  }, _confirmProps), {}, {
269
- children: (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, rest), {}, {
272
+ children: (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(rest, filterKeys)), {}, {
270
273
  type: "text",
271
274
  onClick: function onClick(e) {
272
275
  return e.stopPropagation();
273
276
  },
274
277
  children: label
275
278
  }))
276
- }), "".concat(item === null || item === void 0 ? void 0 : item.type).concat(index)) : ( /*#__PURE__*/(0, _react.createElement)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, rest), {}, {
279
+ }), "".concat(item === null || item === void 0 ? void 0 : item.type).concat(index)) : (/*#__PURE__*/(0, _react.createElement)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(rest, filterKeys)), {}, {
277
280
  key: "".concat(item === null || item === void 0 ? void 0 : item.type).concat(index),
278
281
  type: "text",
279
282
  onClick: function onClick(e) {
@@ -20,7 +20,7 @@ var BlockTitle = function BlockTitle(props) {
20
20
  if (!title) {
21
21
  return (0, _jsxRuntime.jsx)("div", {});
22
22
  }
23
- if ( /*#__PURE__*/_react.default.isValidElement(title)) {
23
+ if (/*#__PURE__*/_react.default.isValidElement(title)) {
24
24
  return title;
25
25
  }
26
26
  var titleContent = title;
@@ -68,7 +68,8 @@ var LineFields = function LineFields(props) {
68
68
  ref: setActivatorNodeRef,
69
69
  children: (0, _jsxRuntime.jsx)(_ProIcon.default, {
70
70
  className: "drag-icon",
71
- type: "drag"
71
+ type: "drag",
72
+ buttonIcon: false
72
73
  })
73
74
  })), (0, _jsxRuntime.jsx)(_antd.Row, {
74
75
  gutter: isLess ? 0 : 24,
@@ -18,6 +18,7 @@ var _react = require("react");
18
18
  var _locale = _interopRequireDefault(require("../../../../../locale"));
19
19
  var _excluded = ["label", "onClick", "onHandle", "type"],
20
20
  _excluded2 = ["onClick", "label"];
21
+ /* eslint-disable react/no-array-index-key */
21
22
  var actions = {
22
23
  add: {
23
24
  onClick: function onClick(value, _ref) {
@@ -31,6 +32,7 @@ var actions = {
31
32
  var defaultActionProps = [{
32
33
  type: 'add'
33
34
  }];
35
+ var filterKeys = ['actionType'];
34
36
  var ToolbarButton = function ToolbarButton(props) {
35
37
  var namePath = props.namePath,
36
38
  form = props.form,
@@ -59,7 +61,7 @@ var ToolbarButton = function ToolbarButton(props) {
59
61
  return _toolbarProps;
60
62
  }, [props.toolbarProps]);
61
63
  var handleClick = /*#__PURE__*/function () {
62
- var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(defaultCallback, callback, item) {
64
+ var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(defaultCallback, callback, item) {
63
65
  var value, data;
64
66
  return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
65
67
  while (1) switch (_context.prev = _context.next) {
@@ -132,7 +134,7 @@ var ToolbarButton = function ToolbarButton(props) {
132
134
  if (max && max <= fields.length && type === 'add') {
133
135
  return false;
134
136
  }
135
- return (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, actions[type]), rest), {}, {
137
+ return (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, actions[type]), (0, _lodash.omit)(rest, filterKeys)), {}, {
136
138
  type: "link",
137
139
  onClick: function onClick() {
138
140
  return handleClick(internalOnClick, _onClick, item);
@@ -140,7 +142,7 @@ var ToolbarButton = function ToolbarButton(props) {
140
142
  children: label || defaultLabel
141
143
  }), "".concat(type).concat(index));
142
144
  }
143
- return (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, rest), {}, {
145
+ return (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(rest, filterKeys)), {}, {
144
146
  type: "link",
145
147
  onClick: function onClick() {
146
148
  return customClick(_onClick2, item);
@@ -101,7 +101,7 @@ var FormList = function FormList(props, ref) {
101
101
  }),
102
102
  strategy: _sortable.verticalListSortingStrategy,
103
103
  children: [_fields.map(function (field, index) {
104
- var namePath = [].concat((0, _toConsumableArray2.default)(_namePath), [index]);
104
+ var namePath = [].concat((0, _toConsumableArray2.default)(_namePath), [field.name]);
105
105
  var _columns = processColumns(index, namePath);
106
106
  return mode === 'block' ? (0, _jsxRuntime.jsx)(_BlockFields.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
107
107
  columns: _columns,
@@ -30,7 +30,7 @@ var namesPathTransform = exports.namesPathTransform = function namesPathTransfor
30
30
  // 比较memo
31
31
  var memoWith = exports.memoWith = function memoWith(pre, next) {
32
32
  return (0, _lodash.isEqualWith)(pre, next, function (objValue, othValue) {
33
- if ( /*#__PURE__*/_react.default.isValidElement(objValue) && /*#__PURE__*/_react.default.isValidElement(othValue)) {
33
+ if (/*#__PURE__*/_react.default.isValidElement(objValue) && /*#__PURE__*/_react.default.isValidElement(othValue)) {
34
34
  return true;
35
35
  }
36
36
  // 移除解决formlist函数里不更新问题
@@ -68,7 +68,7 @@ var ComRender = function ComRender(props) {
68
68
  children: viewRender(componentProps)
69
69
  });
70
70
  }
71
- var Component = component ? ( /*#__PURE__*/_react.default.cloneElement(component, (0, _objectSpread3.default)({}, componentProps))) : (0, _jsxRuntime.jsx)(TypeComponent, (0, _objectSpread3.default)({}, componentProps));
71
+ var Component = component ? (/*#__PURE__*/_react.default.cloneElement(component, (0, _objectSpread3.default)({}, componentProps))) : (0, _jsxRuntime.jsx)(TypeComponent, (0, _objectSpread3.default)({}, componentProps));
72
72
  var Com = getComRender(Component, props, componentProps);
73
73
  return (0, _jsxRuntime.jsx)(_useFieldProps.FieldProvider, {
74
74
  value: (0, _objectSpread3.default)((0, _objectSpread3.default)({}, contextProps), {}, {
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { ProCascaderProps } from './propsType';
3
- declare const _default: import("react").MemoExoticComponent<(props: ProCascaderProps) => JSX.Element>;
3
+ declare const _default: import("react").MemoExoticComponent<(props: ProCascaderProps) => import("react/jsx-runtime").JSX.Element>;
4
4
  export default _default;
@@ -22,16 +22,16 @@ var _useEnum = _interopRequireDefault(require("../../../../ProEnum/hooks/useEnum
22
22
  var _locale = _interopRequireDefault(require("../../../../locale"));
23
23
  var _ = _interopRequireDefault(require("../../.."));
24
24
  var _Container = _interopRequireDefault(require("../../Container"));
25
- var _excluded = ["className", "hasDetail", "detailMaxLength", "fieldNames", "value", "disabled", "dataSource", "onChange", "useRequest", "transformResponse", "level", "isView", "enumCode", "code", "tooltip", "separator", "detailPlaceholder"];
25
+ var _excluded = ["className", "hasDetail", "detailMaxLength", "fieldNames", "value", "disabled", "dataSource", "onChange", "useRequest", "transformResponse", "level", "isView", "enumCode", "code", "tooltip", "separator", "detailPlaceholder", "scrollFollowParent"];
26
26
  var Text = _antd.Typography.Text;
27
27
  var defaultFieldNames = {
28
28
  label: 'name',
29
29
  value: 'code',
30
30
  children: 'children'
31
31
  };
32
- var filterDataSource = function filterDataSource(dataSource, level, fieldNames) {
32
+ var _filterDataSource = function filterDataSource(dataSource, level, fieldNames) {
33
33
  return dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
34
- return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, item), {}, (0, _defineProperty2.default)({}, (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children', level === 1 ? [] : filterDataSource(item === null || item === void 0 ? void 0 : item[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children'], level - 1, fieldNames)));
34
+ return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, item), {}, (0, _defineProperty2.default)({}, (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children', level === 1 ? [] : _filterDataSource(item === null || item === void 0 ? void 0 : item[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children'], level - 1, fieldNames)));
35
35
  });
36
36
  };
37
37
  var getViewLabel = function getViewLabel(_ref) {
@@ -87,6 +87,7 @@ var ProCascader = function ProCascader(props) {
87
87
  _props$separator = props.separator,
88
88
  separator = _props$separator === void 0 ? '/' : _props$separator,
89
89
  detailPlaceholder = props.detailPlaceholder,
90
+ scrollFollowParent = props.scrollFollowParent,
90
91
  otherProps = (0, _objectWithoutProperties2.default)(props, _excluded);
91
92
  var _ref3 = _.default.useFieldProps() || {},
92
93
  isViewCon = _ref3.isView,
@@ -107,7 +108,7 @@ var ProCascader = function ProCascader(props) {
107
108
  }, [dics === null || dics === void 0 ? void 0 : dics[addressCode], enumData]);
108
109
  var realDataSource = (0, _react.useMemo)(function () {
109
110
  var innerDataSource = dataSource || (addressCode ? enumDataSource : []);
110
- var result = (0, _index.transformDataName)(isAddressMode && realLevel === 2 ? filterDataSource(innerDataSource, level, fieldNames) : innerDataSource, fieldNames);
111
+ var result = (0, _index.transformDataName)(isAddressMode && realLevel === 2 ? _filterDataSource(innerDataSource, level, fieldNames) : innerDataSource, fieldNames);
111
112
  return result;
112
113
  }, [isAddressMode, addressCode, realLevel, dataSource, enumDataSource === null || enumDataSource === void 0 ? void 0 : enumDataSource.length]);
113
114
  var _useRequest = (0, _objectSpread3.default)({}, useRequest),
@@ -123,7 +124,7 @@ var ProCascader = function ProCascader(props) {
123
124
  defaultLabel = _useState4[0],
124
125
  setDefaultLabel = _useState4[1];
125
126
  var getFirstLevelOptions = /*#__PURE__*/function () {
126
- var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
127
+ var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
127
128
  var _yield$service, data, newData, transFormData, serviceData;
128
129
  return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
129
130
  while (1) switch (_context.prev = _context.next) {
@@ -142,7 +143,7 @@ var ProCascader = function ProCascader(props) {
142
143
  value: fieldNames.value,
143
144
  children: (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children'
144
145
  });
145
- serviceData = isAddressMode && realLevel === 2 ? filterDataSource(transFormData, level, fieldNames) : transFormData;
146
+ serviceData = isAddressMode && realLevel === 2 ? _filterDataSource(transFormData, level, fieldNames) : transFormData;
146
147
  setServiceData(serviceData);
147
148
  case 9:
148
149
  case "end":
@@ -212,7 +213,7 @@ var ProCascader = function ProCascader(props) {
212
213
  })) === null || _ref5$filter === void 0 ? void 0 : _ref5$filter.join(separator)) || '-' : (defaultLabel === null || defaultLabel === void 0 ? void 0 : (_defaultLabel$filter = defaultLabel.filter(function (item) {
213
214
  return !!item;
214
215
  })) === null || _defaultLabel$filter === void 0 ? void 0 : _defaultLabel$filter.join(separator)) || '-';
215
- var findSelectedOptions = function findSelectedOptions(options, value) {
216
+ var _findSelectedOptions = function findSelectedOptions(options, value) {
216
217
  var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
217
218
  var _value = value !== null && value !== void 0 ? value : [];
218
219
  // 基准情况:如果 value 数组为空,且 path 不为空,说明找到了完整的路径
@@ -231,7 +232,7 @@ var ProCascader = function ProCascader(props) {
231
232
  if (foundOption) {
232
233
  // 如果找到了匹配的选项,并且还有更多的 value 需要匹配,递归地在子选项中查找
233
234
  if (_value.length > 1 && foundOption.children) {
234
- return findSelectedOptions(foundOption.children, _value.slice(1), [].concat((0, _toConsumableArray2.default)(path), [foundOption]));
235
+ return _findSelectedOptions(foundOption.children, _value.slice(1), [].concat((0, _toConsumableArray2.default)(path), [foundOption]));
235
236
  }
236
237
  // 如果没有更多的 value 需要匹配,返回当前选项(以及之前的路径)
237
238
  return [].concat((0, _toConsumableArray2.default)(path), [foundOption]);
@@ -240,7 +241,7 @@ var ProCascader = function ProCascader(props) {
240
241
  return null;
241
242
  };
242
243
  var _selectedOptions = (0, _react.useMemo)(function () {
243
- return findSelectedOptions(service ? serviceData : realDataSource, addressValue);
244
+ return _findSelectedOptions(service ? serviceData : realDataSource, addressValue);
244
245
  }, [service, serviceData, realDataSource, addressValue]);
245
246
  var handleAddressChange = function handleAddressChange(e) {
246
247
  var cascaderValue = value === null || value === void 0 ? void 0 : value.slice(0, realLevel);
@@ -273,8 +274,11 @@ var ProCascader = function ProCascader(props) {
273
274
  filter: handlefilter,
274
275
  limit: 1000
275
276
  },
276
- onChange: handleChange
277
- }, (0, _lodash.omit)(otherProps, 'otherProps'))), hasDetail && (tooltip && disabled && detail ? (0, _jsxRuntime.jsx)(_antd.Tooltip, {
277
+ onChange: handleChange,
278
+ getPopupContainer: function getPopupContainer(trigger) {
279
+ return scrollFollowParent ? trigger.parentElement : document.body;
280
+ }
281
+ }, (0, _lodash.omit)(otherProps, ['otherProps', 'scrollFollowParent']))), hasDetail && (tooltip && disabled && detail ? (0, _jsxRuntime.jsx)(_antd.Tooltip, {
278
282
  title: detail,
279
283
  children: (0, _jsxRuntime.jsx)("span", {
280
284
  className: "pro-address-detail",
@@ -34,4 +34,6 @@ export interface ProCascaderProps {
34
34
  separator?: string;
35
35
  /** 详情框占位符 */
36
36
  detailPlaceholder?: string;
37
+ /** 浮窗是否跟随父级 */
38
+ scrollFollowParent?: boolean;
37
39
  }
@@ -33,7 +33,7 @@ var useDefaultOptions = function useDefaultOptions(options) {
33
33
  });
34
34
  };
35
35
  var defaultService = /*#__PURE__*/function () {
36
- var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
36
+ var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
37
37
  return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
38
38
  while (1) switch (_context.prev = _context.next) {
39
39
  case 0:
@@ -255,7 +255,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
255
255
  onChange(val, option);
256
256
  };
257
257
  var handleClick = /*#__PURE__*/function () {
258
- var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
258
+ var _ref7 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
259
259
  var _yield$beforeOpen, res;
260
260
  return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
261
261
  while (1) switch (_context.prev = _context.next) {
@@ -322,7 +322,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
322
322
  }
323
323
  };
324
324
  var handleFinish = /*#__PURE__*/function () {
325
- var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2() {
325
+ var _ref8 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2() {
326
326
  var _nextSelectedRows, _nextSelectedRows2, nextSelectedRows, record, flag, res;
327
327
  return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
328
328
  while (1) switch (_context2.prev = _context2.next) {
@@ -387,7 +387,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
387
387
  };
388
388
  }();
389
389
  var handleSearch = /*#__PURE__*/function () {
390
- var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee3() {
390
+ var _ref9 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee3() {
391
391
  var values;
392
392
  return (0, _regeneratorRuntime2.default)().wrap(function _callee3$(_context3) {
393
393
  while (1) switch (_context3.prev = _context3.next) {
@@ -460,7 +460,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
460
460
  };
461
461
  // 初始化回显,当传入initParams时,前端用来回险
462
462
  var getInitValues = /*#__PURE__*/function () {
463
- var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee4() {
463
+ var _ref10 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee4() {
464
464
  var _useRequest$options2, _useRequest$options3, queryBean, page, params, res, _res$data2, _list, list, _data, nextSelectRowKeys;
465
465
  return (0, _regeneratorRuntime2.default)().wrap(function _callee4$(_context4) {
466
466
  while (1) switch (_context4.prev = _context4.next) {
@@ -520,7 +520,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
520
520
  }();
521
521
  // 初始化回显,当传入initParams时,前端用来回险
522
522
  var getDefaultOneValues = /*#__PURE__*/function () {
523
- var _ref11 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee5() {
523
+ var _ref11 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee5() {
524
524
  var _useRequest$options4, _useRequest$options5;
525
525
  var queryBean, page, params, res, _res$data3, _list2, list, _data2, nextSelectRowKeys;
526
526
  return (0, _regeneratorRuntime2.default)().wrap(function _callee5$(_context5) {
@@ -12,5 +12,5 @@ export interface InputRangeProps {
12
12
  isPositiveInteger?: boolean;
13
13
  precision?: number;
14
14
  }
15
- declare const InputRange: ({ value, onChange, min, max, group, disabled, precision, isPositiveInteger, }: InputRangeProps) => JSX.Element;
15
+ declare const InputRange: ({ value, onChange, min, max, group, disabled, precision, isPositiveInteger, }: InputRangeProps) => import("react/jsx-runtime").JSX.Element;
16
16
  export default InputRange;
@@ -1,3 +1,3 @@
1
1
  import { comPropsType } from './propsTypes';
2
- declare const InputWithSuffix: (props: comPropsType) => JSX.Element;
2
+ declare const InputWithSuffix: (props: comPropsType) => import("react/jsx-runtime").JSX.Element;
3
3
  export default InputWithSuffix;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ProAddressPropsType } from './propsTypes';
3
2
  export declare const transferAddressInfoToRegion: () => {
4
3
  normalize: (value: any) => {
@@ -24,5 +23,5 @@ export declare const transferAddressInfoToRegion: () => {
24
23
  };
25
24
  };
26
25
  };
27
- export declare function ProAddress({ ...props }: ProAddressPropsType): JSX.Element;
26
+ export declare function ProAddress({ ...props }: ProAddressPropsType): import("react/jsx-runtime").JSX.Element;
28
27
  export default ProAddress;
@@ -93,7 +93,7 @@ function ProAddress(_ref3) {
93
93
  secondCitys = _useState6[0],
94
94
  setSecondCitys = _useState6[1];
95
95
  var queryCity = /*#__PURE__*/function () {
96
- var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(code, type) {
96
+ var _ref5 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(code, type) {
97
97
  var cityList, _cityList, newList, _secondCitys;
98
98
  return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
99
99
  while (1) switch (_context.prev = _context.next) {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { ProRangeBoxPropsType } from './propsType';
3
- export default function ProRangeBox({ configOption }: ProRangeBoxPropsType): JSX.Element;
2
+ export default function ProRangeBox({ configOption }: ProRangeBoxPropsType): import("react/jsx-runtime").JSX.Element;
@@ -18,6 +18,7 @@ var _diffOriginal = require("../../utils/diffOriginal");
18
18
  var _ProConfigProvider = require("../../../ProConfigProvider");
19
19
  var _utils = require("../../../utils");
20
20
  var _excluded = ["name", "names", "namesStr", "form", "equalWith", "children", "type", "diffConfig", "valuePropName", "normalize", "getValueProps", "viewRender"];
21
+ var componentsWithFloatWindow = ['Select', 'ProSelect', 'ProEnum', 'ProTimeLimit', 'ProModalSelect', 'ProCascader', 'DataPicker', 'RangePicker', 'TimePicker'];
21
22
  var ChangedWrapper = function ChangedWrapper(props) {
22
23
  var _diffConfig$toolTip, _children$props, _children$props2, _children$props3;
23
24
  var name = props.name,
@@ -103,6 +104,9 @@ var ChangedWrapper = function ChangedWrapper(props) {
103
104
  'pro-form-item-add': isAdd
104
105
  });
105
106
  var open = tipOpenCalc();
107
+ var scrollFollowParentConfig = componentsWithFloatWindow.includes(type) ? {
108
+ scrollFollowParent: scrollFollowParent
109
+ } : {};
106
110
  return (0, _jsxRuntime.jsx)(_antd.Tooltip, {
107
111
  open: open,
108
112
  getPopupContainer: function getPopupContainer(trigger) {
@@ -120,8 +124,7 @@ var ChangedWrapper = function ChangedWrapper(props) {
120
124
  children: ["\u521D\u59CB\u503C\uFF1A", tipContent]
121
125
  }), _showEllipse && (0, _jsxRuntime.jsxs)(_antd.Space, {
122
126
  className: "current-value-container",
123
- children: ["\u5F53\u524D\u503C\uFF1A", /*#__PURE__*/_react.default.isValidElement(children) ? /*#__PURE__*/_react.default.cloneElement(children, (0, _objectSpread3.default)((0, _objectSpread3.default)((0, _objectSpread3.default)({}, children.props), rest), {}, {
124
- scrollFollowParent: scrollFollowParent,
127
+ children: ["\u5F53\u524D\u503C\uFF1A", /*#__PURE__*/_react.default.isValidElement(children) ? /*#__PURE__*/_react.default.cloneElement(children, (0, _objectSpread3.default)((0, _objectSpread3.default)((0, _objectSpread3.default)((0, _objectSpread3.default)({}, children.props), rest), scrollFollowParentConfig), {}, {
125
128
  isView: true
126
129
  })) : undefined]
127
130
  })]
@@ -129,8 +132,7 @@ var ChangedWrapper = function ChangedWrapper(props) {
129
132
  children: (0, _jsxRuntime.jsx)("div", {
130
133
  className: diffClassName,
131
134
  style: style,
132
- children: /*#__PURE__*/_react.default.isValidElement(children) ? /*#__PURE__*/_react.default.cloneElement(children, (0, _objectSpread3.default)((0, _objectSpread3.default)((0, _objectSpread3.default)({}, children.props), rest), {}, {
133
- scrollFollowParent: scrollFollowParent,
135
+ children: /*#__PURE__*/_react.default.isValidElement(children) ? /*#__PURE__*/_react.default.cloneElement(children, (0, _objectSpread3.default)((0, _objectSpread3.default)((0, _objectSpread3.default)((0, _objectSpread3.default)({}, children.props), rest), scrollFollowParentConfig), {}, {
134
136
  otherProps: (0, _objectSpread3.default)((0, _objectSpread3.default)({}, (_children$props3 = children.props) === null || _children$props3 === void 0 ? void 0 : _children$props3.otherProps), {}, {
135
137
  isDiffChange: isChanged
136
138
  })
@@ -28,7 +28,7 @@ var ConfirmWrapper = function ConfirmWrapper(props) {
28
28
  var _ProForm$useFieldProp = _index.default.useFieldProps(),
29
29
  form = _ProForm$useFieldProp.form;
30
30
  var handleChange = /*#__PURE__*/function () {
31
- var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(value) {
31
+ var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(value) {
32
32
  var _len,
33
33
  other,
34
34
  _key,
@@ -136,6 +136,12 @@ var Render = function Render(props) {
136
136
  var transforms = Array.isArray(otherProps === null || otherProps === void 0 ? void 0 : otherProps.names) ? (0, _transformNames.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherFormItemProps), valueTypeTransform()),
137
137
  // 合并valueType的transform
138
138
  form, otherProps.names, namesStr, otherProps.type) : valueTypeTransform();
139
+ /**
140
+ * globalControl 全局控制优先
141
+ * globalControl true时,优先级 全局【formDisabled】> formitem上【column.disabled】 > 组件上【fieldProps.disabled】
142
+ * globalControl false时,优先级 组件上【fieldProps.disabled】 > formitem上【column.disabled】 > 全局【formDisabled】
143
+ */
144
+ var lastDisabled = globalControl ? (_ref2 = (_ref3 = formDisabled !== null && formDisabled !== void 0 ? formDisabled : _disabled) !== null && _ref3 !== void 0 ? _ref3 : _fieldProps === null || _fieldProps === void 0 ? void 0 : _fieldProps.disabled) !== null && _ref2 !== void 0 ? _ref2 : componentProps === null || componentProps === void 0 ? void 0 : componentProps.disabled : (_ref4 = (_ref5 = _disabled !== null && _disabled !== void 0 ? _disabled : _fieldProps === null || _fieldProps === void 0 ? void 0 : _fieldProps.disabled) !== null && _ref5 !== void 0 ? _ref5 : componentProps === null || componentProps === void 0 ? void 0 : componentProps.disabled) !== null && _ref4 !== void 0 ? _ref4 : formDisabled;
139
145
  // ↑↑↑↑↑↑ formItem参数整理 ↑↑↑↑↑↑
140
146
  Object.assign(otherFormItemProps, transforms, {
141
147
  names: otherProps.names
@@ -148,6 +154,10 @@ var Render = function Render(props) {
148
154
  } : null, (0, _objectSpread2.default)({}, (0, _index.isTrim)(type, trim, (0, _ProConfigProvider.useProConfig)())), // 优先取传进来的,其次取ProConfigProvider配置的
149
155
  (0, _objectSpread2.default)({}, (0, _index.isUpperCase)(type, upperCase)), {
150
156
  validateFirst: true
157
+ },
158
+ // 当某一规则校验不通过时,是否停止剩下的规则的校验
159
+ {
160
+ disabled: lastDisabled
151
161
  });
152
162
  // 添加label宽度
153
163
  if (labelWidth) {
@@ -157,12 +167,6 @@ var Render = function Render(props) {
157
167
  }
158
168
  /** 移除多余参数,防止透传给formItem报错 */
159
169
  var _otherFormItemProps = (0, _lodash.omit)(otherFormItemProps, ['component', 'names', 'format', 'toISOString', 'toCSTString', 'switchValue', 'precision', 'clearNotShow', 'dependNames']);
160
- /**
161
- * globalControl 全局控制优先
162
- * globalControl true时,优先级 全局【formDisabled】> formitem上【column.disabled】 > 组件上【fieldProps.disabled】
163
- * globalControl false时,优先级 组件上【fieldProps.disabled】 > formitem上【column.disabled】 > 全局【formDisabled】
164
- */
165
- var lastDisabled = globalControl ? (_ref2 = (_ref3 = formDisabled !== null && formDisabled !== void 0 ? formDisabled : _disabled) !== null && _ref3 !== void 0 ? _ref3 : _fieldProps === null || _fieldProps === void 0 ? void 0 : _fieldProps.disabled) !== null && _ref2 !== void 0 ? _ref2 : componentProps === null || componentProps === void 0 ? void 0 : componentProps.disabled : (_ref4 = (_ref5 = _disabled !== null && _disabled !== void 0 ? _disabled : _fieldProps === null || _fieldProps === void 0 ? void 0 : _fieldProps.disabled) !== null && _ref5 !== void 0 ? _ref5 : componentProps === null || componentProps === void 0 ? void 0 : componentProps.disabled) !== null && _ref4 !== void 0 ? _ref4 : formDisabled;
166
170
  /**
167
171
  * 最新fieldProps: 更新后的组件Props
168
172
  */
@@ -241,7 +245,7 @@ var Render = function Render(props) {
241
245
  _args = functionArgs([].concat(args));
242
246
  }
243
247
  var inList = _otherFormItemProps === null || _otherFormItemProps === void 0 ? void 0 : (_otherFormItemProps$n3 = _otherFormItemProps.namePath) === null || _otherFormItemProps$n3 === void 0 ? void 0 : _otherFormItemProps$n3.length;
244
- if ( /*#__PURE__*/_react.default.isValidElement(AutoComponent)) {
248
+ if (/*#__PURE__*/_react.default.isValidElement(AutoComponent)) {
245
249
  var _AutoComponent$props$, _AutoComponent$props, _lastComponentProps$c;
246
250
  ((_AutoComponent$props$ = (_AutoComponent$props = AutoComponent === null || AutoComponent === void 0 ? void 0 : AutoComponent.props)[changeKey]) === null || _AutoComponent$props$ === void 0 ? void 0 : _AutoComponent$props$.call.apply(_AutoComponent$props$, [_AutoComponent$props].concat((0, _toConsumableArray2.default)(_args)))) || ((_lastComponentProps$c = lastComponentProps[changeKey]) === null || _lastComponentProps$c === void 0 ? void 0 : _lastComponentProps$c.call.apply(_lastComponentProps$c, [lastComponentProps].concat((0, _toConsumableArray2.default)(_args))));
247
251
  return false;
@@ -291,7 +295,7 @@ var Render = function Render(props) {
291
295
  * onBlur参数重置 (value, record, { form, index, namePath, option }) => void
292
296
  */
293
297
  var handleBlur = /*#__PURE__*/function () {
294
- var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
298
+ var _ref7 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
295
299
  var _len3,
296
300
  args,
297
301
  _key3,
@@ -374,7 +378,7 @@ var Render = function Render(props) {
374
378
  if (originComponent) {
375
379
  delete childProps.otherProps;
376
380
  }
377
- var child = /*#__PURE__*/_react.default.isValidElement(AutoComponent) ? ( /*#__PURE__*/_react.default.cloneElement(AutoComponent, childProps)) : (0, _jsxRuntime.jsx)(AutoComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(lastComponentProps, [].concat(lastComponentPropsFilter, ['debounceWait']))), {}, {
381
+ var child = /*#__PURE__*/_react.default.isValidElement(AutoComponent) ? (/*#__PURE__*/_react.default.cloneElement(AutoComponent, childProps)) : (0, _jsxRuntime.jsx)(AutoComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(lastComponentProps, [].concat(lastComponentPropsFilter, ['debounceWait']))), {}, {
378
382
  otherProps: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
379
383
  show: show,
380
384
  disabled: lastDisabled,
@@ -401,7 +405,7 @@ var Render = function Render(props) {
401
405
  };
402
406
  }
403
407
  // 需要过滤掉的form_item的key
404
- var filterFormItemKey = ['onFieldChange', 'shouldUpdate', 'namePath', 'isView', 'parentNames', 'space', 'before', 'after', 'globalControl', 'listName'];
408
+ var filterFormItemKey = ['onFieldChange', 'shouldUpdate', 'namePath', 'isView', 'parentNames', 'space', 'before', 'after', 'globalControl', 'listName', 'fixed'];
405
409
  if (type === 'FormList') {
406
410
  lastComponentProps.disabled = lastDisabled;
407
411
  var lessMode = lastComponentProps.mode === 'less';
@@ -92,12 +92,15 @@ var ProForm = function ProForm(props, ref) {
92
92
  (0, _react.useMemo)(function () {
93
93
  if (formKey && forms[formKey] !== form) {
94
94
  forms[formKey] = form;
95
- dispatch({
96
- type: 'set',
97
- payload: {
98
- forms: (0, _objectSpread2.default)({}, forms)
99
- }
100
- });
95
+ // fix: Cannot update a component (`ProConfigProvider`) while rendering a different component (`ForwardRef(ProForm)`).
96
+ setTimeout(function () {
97
+ dispatch({
98
+ type: 'set',
99
+ payload: {
100
+ forms: (0, _objectSpread2.default)({}, forms)
101
+ }
102
+ });
103
+ }, 300);
101
104
  }
102
105
  // 销毁
103
106
  return function () {
@@ -201,7 +204,7 @@ var ProForm = function ProForm(props, ref) {
201
204
  if (isView || disabled) {
202
205
  // 查看或禁用模式
203
206
  footerEle = null;
204
- } else if ( /*#__PURE__*/_react.default.isValidElement(footer)) {
207
+ } else if (/*#__PURE__*/_react.default.isValidElement(footer)) {
205
208
  // 传入组件渲染组件
206
209
  footerEle = footer;
207
210
  } else if (footer === undefined || footer || (0, _lodash.isObject)(footer)) {
@@ -238,7 +241,7 @@ var ProForm = function ProForm(props, ref) {
238
241
  },
239
242
  className: cls,
240
243
  form: form
241
- }, formProps), config), otherProps), {}, {
244
+ }, formProps), (0, _lodash.omit)(config, ['isDiffAll'])), otherProps), {}, {
242
245
  labelAlign: (_ref = labelAlign !== null && labelAlign !== void 0 ? labelAlign : config.labelAlign) !== null && _ref !== void 0 ? _ref : 'left',
243
246
  onValuesChange: handleValuesChange,
244
247
  onFinish: handleFinish,
@@ -136,7 +136,7 @@ var splitNameStr = exports.splitNameStr = function splitNameStr(name) {
136
136
  });
137
137
  };
138
138
  // 过滤掉字段名中包含 '-' 的字段
139
- var filterInternalFields = exports.filterInternalFields = function filterInternalFields(values, optimize) {
139
+ var _filterInternalFields = exports.filterInternalFields = function filterInternalFields(values, optimize) {
140
140
  if (optimize) {
141
141
  return values;
142
142
  }
@@ -150,20 +150,20 @@ var filterInternalFields = exports.filterInternalFields = function filterInterna
150
150
  }
151
151
  if (Array.isArray(nextValues)) {
152
152
  return nextValues.map(function (item) {
153
- return filterInternalFields(item);
153
+ return _filterInternalFields(item);
154
154
  });
155
155
  }
156
156
  if ((0, _lodash.isObject)(nextValues)) {
157
157
  var result = {};
158
158
  Object.keys(nextValues).forEach(function (key) {
159
159
  if (key.includes('-')) return;
160
- result[key] = filterInternalFields(nextValues[key]);
160
+ result[key] = _filterInternalFields(nextValues[key]);
161
161
  });
162
162
  return result;
163
163
  }
164
164
  return nextValues;
165
165
  };
166
- var getAllNamePath = exports.getAllNamePath = function getAllNamePath(object) {
166
+ var _getAllNamePath = exports.getAllNamePath = function getAllNamePath(object) {
167
167
  var currentPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
168
168
  var keys = Object.keys(object);
169
169
  var resultKeys = [];
@@ -177,7 +177,7 @@ var getAllNamePath = exports.getAllNamePath = function getAllNamePath(object) {
177
177
  }
178
178
  // 深度获取对象key
179
179
  if ((0, _lodash.isObject)(value)) {
180
- resultKeys.concat(getAllNamePath(value, [].concat((0, _toConsumableArray2.default)(currentPath), [key])));
180
+ resultKeys.concat(_getAllNamePath(value, [].concat((0, _toConsumableArray2.default)(currentPath), [key])));
181
181
  }
182
182
  resultKeys.push([].concat((0, _toConsumableArray2.default)(currentPath), [key]));
183
183
  });
@@ -320,7 +320,7 @@ var customEqualForFun = exports.customEqualForFun = function customEqualForFun(v
320
320
  /**
321
321
  * 查询数据中是否包含rowKey
322
322
  */
323
- var hasRowKey = exports.hasRowKey = function hasRowKey(obj) {
323
+ var _hasRowKey = exports.hasRowKey = function hasRowKey(obj) {
324
324
  if ((0, _typeof2.default)(obj) !== 'object' || obj === null) {
325
325
  return false;
326
326
  }
@@ -330,7 +330,7 @@ var hasRowKey = exports.hasRowKey = function hasRowKey(obj) {
330
330
  return true;
331
331
  }
332
332
  return keys.some(function (key) {
333
- return hasRowKey(obj[key]);
333
+ return _hasRowKey(obj[key]);
334
334
  });
335
335
  };
336
336
  /**
@@ -346,7 +346,7 @@ var view = exports.view = function view(obj) {
346
346
  return true;
347
347
  }
348
348
  return keys.some(function (key) {
349
- return hasRowKey(obj[key]);
349
+ return _hasRowKey(obj[key]);
350
350
  });
351
351
  };
352
352
  /**
@@ -382,7 +382,7 @@ var deleteForPath = exports.deleteForPath = function deleteForPath(values, nameP
382
382
  * @param value 选中值
383
383
  * @returns {}
384
384
  */
385
- var findOptionByValue = exports.findOptionByValue = function findOptionByValue(treeData, value, fieldNames) {
385
+ var _findOptionByValue = exports.findOptionByValue = function findOptionByValue(treeData, value, fieldNames) {
386
386
  if ((0, _lodash.isObject)(value)) {
387
387
  return value;
388
388
  }
@@ -392,7 +392,7 @@ var findOptionByValue = exports.findOptionByValue = function findOptionByValue(t
392
392
  return (0, _lodash.omit)(node, ['children', fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]);
393
393
  }
394
394
  if (node.children) {
395
- var foundNode = findOptionByValue(node[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children'], value, fieldNames);
395
+ var foundNode = _findOptionByValue(node[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children'], value, fieldNames);
396
396
  if (foundNode) {
397
397
  return (0, _lodash.omit)(foundNode, ['children', fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]);
398
398
  }
@@ -44,7 +44,7 @@ var useForm = exports.useForm = function useForm(originForm, options) {
44
44
  return getFieldsValue(nameList, filterFunc);
45
45
  };
46
46
  var _validateFields = /*#__PURE__*/function () {
47
- var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(nameList) {
47
+ var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(nameList) {
48
48
  var _rest$,
49
49
  _len,
50
50
  rest,