@zat-design/sisyphus-react 4.1.3-beta.6 → 4.2.0-beta.1

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 (120) hide show
  1. package/README.md +19 -0
  2. package/dist/index.esm.css +1 -1
  3. package/dist/less.esm.css +1 -1
  4. package/es/ProAction/components/CheckModalContent/index.js +1 -2
  5. package/es/ProAction/index.js +1 -3
  6. package/es/ProDrawerForm/components/ProDrawer/index.js +1 -2
  7. package/es/ProDrawerForm/components/ProModal/index.js +1 -2
  8. package/es/ProEditLabel/components/RenderProForm.js +1 -3
  9. package/es/ProEditLabel/index.js +1 -3
  10. package/es/ProEditTable/components/ActionButton/index.js +1 -2
  11. package/es/ProEditTable/components/RcTable/BaseTable.js +1 -3
  12. package/es/ProEditTable/components/RcTable/DraggableTable.js +1 -2
  13. package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +1 -2
  14. package/es/ProEditTable/components/RenderField/index.js +1 -2
  15. package/es/ProEditTable/components/Summary/index.js +1 -2
  16. package/es/ProEditTable/components/Validator/index.js +1 -2
  17. package/es/ProEditTable/index.js +12 -10
  18. package/es/ProEditTable/utils/index.js +5 -2
  19. package/es/ProEditTable/utils/useShouldUpdateForTable.js +7 -7
  20. package/es/ProEnum/index.js +1 -2
  21. package/es/ProForm/components/FormFooter/index.js +1 -2
  22. package/es/ProForm/components/base/Checkbox/index.js +1 -2
  23. package/es/ProForm/components/base/Input/index.js +1 -2
  24. package/es/ProForm/components/base/InputNumber/index.js +1 -3
  25. package/es/ProForm/components/base/Select/index.js +1 -2
  26. package/es/ProForm/components/base/Switch/index.js +1 -2
  27. package/es/ProForm/components/base/SwitchCheckbox/index.js +1 -2
  28. package/es/ProForm/components/combination/Container/index.js +1 -3
  29. package/es/ProForm/components/combination/FormList/components/ActionButton.js +2 -4
  30. package/es/ProForm/components/combination/FormList/components/BlockFields.js +1 -2
  31. package/es/ProForm/components/combination/FormList/components/Empty.js +1 -3
  32. package/es/ProForm/components/combination/FormList/components/LineFields.js +1 -2
  33. package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +2 -4
  34. package/es/ProForm/components/combination/FormList/index.js +1 -2
  35. package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +1 -2
  36. package/es/ProForm/components/combination/Group/component/ComRender.js +4 -6
  37. package/es/ProForm/components/combination/Group/utils/index.d.ts +11 -11
  38. package/es/ProForm/components/combination/ProCascader/index.js +1 -2
  39. package/es/ProForm/components/combination/ProModalSelect/index.js +1 -3
  40. package/es/ProForm/components/combination/ProNumberRange/index.js +1 -2
  41. package/es/ProForm/components/combination/ProRangeLimit/index.js +1 -2
  42. package/es/ProForm/components/combination/ProTimeLimit/index.js +1 -2
  43. package/es/ProForm/components/render/ChangedWrapper.js +1 -2
  44. package/es/ProForm/components/render/ConfirmWrapper.js +1 -2
  45. package/es/ProForm/components/render/Render.js +1 -3
  46. package/es/ProForm/components/render/RenderFields.js +1 -2
  47. package/es/ProForm/index.js +1 -2
  48. package/es/ProForm/style/index.less +1 -0
  49. package/es/ProForm/utils/useForm.js +9 -5
  50. package/es/ProIcon/index.js +1 -2
  51. package/es/ProLayout/components/Layout/Header/index.js +1 -3
  52. package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +1 -2
  53. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +1 -3
  54. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +6 -13
  55. package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +1 -2
  56. package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +4 -3
  57. package/es/ProLayout/components/Layout/Menu/index.js +1 -3
  58. package/es/ProLayout/components/Layout/Notice/index.js +1 -2
  59. package/es/ProLayout/components/ProCollapse/index.js +1 -2
  60. package/es/ProLayout/components/ProHeader/index.js +1 -3
  61. package/es/ProLayout/components/TabsManager/components/TabItem.js +1 -2
  62. package/es/ProLayout/components/TabsManager/components/TabsHeader.js +1 -2
  63. package/es/ProLayout/components/TabsManager/index.js +1 -2
  64. package/es/ProLayout/index.js +1 -2
  65. package/es/ProLayout/style/index.less +1 -1
  66. package/es/ProSelect/components/AdaptiveTooltip.js +1 -2
  67. package/es/ProSelect/index.js +1 -3
  68. package/es/ProStep/components/Anchor/index.d.ts +1 -1
  69. package/es/ProStep/components/Anchor/index.js +1 -2
  70. package/es/ProStep/components/Item/index.d.ts +0 -1
  71. package/es/ProStep/components/Step/index.js +1 -2
  72. package/es/ProStep/index.d.ts +2 -2
  73. package/es/ProStep/index.js +1 -2
  74. package/es/ProTable/components/FormatColumn/index.js +1 -3
  75. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +1 -3
  76. package/es/ProTable/components/RenderColumn/index.js +1 -3
  77. package/es/ProTable/components/RenderEmptyText/index.js +1 -2
  78. package/es/ProTable/components/RenderSummary/index.js +1 -2
  79. package/es/ProTable/components/RenderTableHeader/index.js +1 -2
  80. package/es/ProTable/components/TooltipTitle/index.js +1 -2
  81. package/es/ProTable/index.js +1 -3
  82. package/es/ProTabs/components/Card/index.js +1 -2
  83. package/es/ProThemeTools/component/ProTools/index.js +1 -2
  84. package/es/ProThemeTools/index.js +1 -2
  85. package/es/ProTooltip/index.js +3 -3
  86. package/es/ProTree/components/List.js +1 -3
  87. package/es/ProTree/components/ProTree.js +1 -2
  88. package/es/ProTree/components/ProTreeSelect/index.js +1 -3
  89. package/es/ProTree/components/SearchTitle.js +1 -2
  90. package/es/ProTree/components/Tree.js +1 -2
  91. package/es/ProTreeModal/components/Cascader.js +1 -3
  92. package/es/ProTreeModal/components/List.js +1 -3
  93. package/es/ProTreeModal/components/SearchTitle.js +1 -2
  94. package/es/ProTreeModal/components/SortableItem.js +1 -2
  95. package/es/ProTreeModal/components/Tree.js +1 -3
  96. package/es/ProTreeModal/components/Trigger.js +1 -2
  97. package/es/ProTreeModal/index.js +1 -3
  98. package/es/ProUpload/components/ButtonRender.js +1 -2
  99. package/es/ProUpload/components/DragRender.js +2 -3
  100. package/es/ProUpload/components/Example.js +1 -2
  101. package/es/ProUpload/components/FileItem.js +1 -2
  102. package/es/ProUpload/components/ImageRender.js +1 -3
  103. package/es/ProUpload/index.js +1 -2
  104. package/es/ProViewer/index.js +1 -2
  105. package/lib/ProEditTable/index.js +11 -7
  106. package/lib/ProEditTable/utils/index.js +4 -0
  107. package/lib/ProEditTable/utils/useShouldUpdateForTable.js +7 -7
  108. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +2 -2
  109. package/lib/ProForm/components/combination/Group/component/ComRender.js +3 -3
  110. package/lib/ProForm/style/index.less +1 -0
  111. package/lib/ProForm/utils/useForm.js +8 -4
  112. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +6 -13
  113. package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +4 -3
  114. package/lib/ProLayout/style/index.less +1 -1
  115. package/lib/ProStep/components/Anchor/index.d.ts +1 -1
  116. package/lib/ProStep/components/Item/index.d.ts +0 -1
  117. package/lib/ProStep/index.d.ts +2 -2
  118. package/lib/ProTooltip/index.js +3 -3
  119. package/lib/ProUpload/components/DragRender.js +1 -1
  120. package/package.json +15 -11
@@ -1,6 +1,5 @@
1
1
  import "./index.less";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
3
  var CheckModalContent = props => {
5
4
  var _ref = props !== null && props !== void 0 ? props : {},
6
5
  errorTitle = _ref.errorTitle,
@@ -20,9 +20,7 @@ import CheckModalContent from "./components/CheckModalContent";
20
20
  import { ProDrawerForm } from "../index";
21
21
  import locale from "../locale";
22
22
  import "./index.less";
23
- import { Fragment as _Fragment } from "react/jsx-runtime";
24
- import { jsx as _jsx } from "react/jsx-runtime";
25
- import { jsxs as _jsxs } from "react/jsx-runtime";
23
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
26
24
  var ProAction = props => {
27
25
  var _config$, _config$2, _locale$ProAction2, _config$index;
28
26
  var children = props.children,
@@ -27,8 +27,7 @@ import locale from "../../../locale";
27
27
  /**
28
28
  * 抽屉组件
29
29
  */
30
- import { jsx as _jsx } from "react/jsx-runtime";
31
- import { jsxs as _jsxs } from "react/jsx-runtime";
30
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
32
31
  var ProDrawer = _ref => {
33
32
  var form = _ref.form,
34
33
  title = _ref.title,
@@ -20,8 +20,7 @@ import { Space, Button, Modal } from 'antd';
20
20
  import { useScroll, useSize } from 'ahooks';
21
21
  import classnames from 'classnames';
22
22
  import { isArray } from 'lodash';
23
- import { jsx as _jsx } from "react/jsx-runtime";
24
- import { jsxs as _jsxs } from "react/jsx-runtime";
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
24
  /**
26
25
  * 弹窗组件
27
26
  */
@@ -9,9 +9,7 @@ import { InfoCircleOutlined } from '@ant-design/icons';
9
9
  import { Space } from 'antd';
10
10
  import { ProForm } from "../../index";
11
11
  import { matchFormValue } from "../utils";
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { jsxs as _jsxs } from "react/jsx-runtime";
14
- import { Fragment as _Fragment } from "react/jsx-runtime";
12
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
15
13
  var RenderProForm = props => {
16
14
  var _props3, _props6, _props7;
17
15
  var columns = [];
@@ -23,9 +23,7 @@ import React, { useEffect, useRef } from 'react';
23
23
  import { omit } from 'lodash';
24
24
  import RenderProForm from "./components/RenderProForm";
25
25
  import { matchFormValue } from "./utils";
26
- import { jsx as _jsx } from "react/jsx-runtime";
27
- import { jsxs as _jsxs } from "react/jsx-runtime";
28
- import { Fragment as _Fragment } from "react/jsx-runtime";
26
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
29
27
  var ProEditLabel = _ref => {
30
28
  var _ref$open = _ref.open,
31
29
  open = _ref$open === void 0 ? false : _ref$open,
@@ -8,8 +8,7 @@ import { Button, Popconfirm } from 'antd';
8
8
  import { isFunction, omit } from 'lodash';
9
9
  import { iconMap } from "../../utils/config";
10
10
  import locale from "../../../locale";
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- import { Fragment as _Fragment } from "react/jsx-runtime";
11
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
13
12
  var OMIT_DOM_INVALID_KEYS = ['buttonProps', 'isEditable', 'onEvent', 'isSelectModal'];
14
13
 
15
14
  // 渲染操作按钮
@@ -16,9 +16,7 @@ import { memo, useCallback } from 'react';
16
16
  import { Badge, Table } from 'antd';
17
17
  import { isFunction } from 'lodash';
18
18
  import useEditTableError from "../../utils/useEditTableError";
19
- import { jsx as _jsx } from "react/jsx-runtime";
20
- import { jsxs as _jsxs } from "react/jsx-runtime";
21
- import { Fragment as _Fragment } from "react/jsx-runtime";
19
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
22
20
  var BaseTable = _ref => {
23
21
  var _value$;
24
22
  var tableProps = _ref.tableProps,
@@ -14,8 +14,7 @@ import { arrayMove, useSortable, SortableContext, verticalListSortingStrategy }
14
14
  import { CSS } from '@dnd-kit/utilities';
15
15
  import dragSvg from "../../../assets/drag.svg";
16
16
  import ProIcon from "../../../ProIcon";
17
- import { jsx as _jsx } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
18
  var Row = props => {
20
19
  var _restProps$className;
21
20
  var disabled = props.disabled,
@@ -15,8 +15,7 @@ import { useProConfig } from "../../../ProConfigProvider";
15
15
  import { isEmpty } from "../../../utils";
16
16
 
17
17
  /** 克隆子元素时需从 props 中剔除,避免透传到 div 等 DOM 导致 React 警告 */
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
19
- import { jsx as _jsx } from "react/jsx-runtime";
18
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
20
19
  var OMIT_FROM_DOM_KEYS = ['disabled',
21
20
  // div 不支持 disabled,且值可能非 string/number
22
21
  'toCSTString', 'toISOString', 'format', 'switchValue', 'precision', 'clearNotShow', 'dependNames'];
@@ -39,8 +39,7 @@ import ListChangedWrapper from "./ListChangedWrapper";
39
39
  import useShouldUpdateForTable from "../../utils/useShouldUpdateForTable";
40
40
 
41
41
  /** 列配置中不应透传到 Form.Item 或 DOM 的字段(与 ProForm Render 保持一致) */
42
- import { Fragment as _Fragment } from "react/jsx-runtime";
43
- import { jsx as _jsx } from "react/jsx-runtime";
42
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
44
43
  var OMIT_FORM_ITEM_AND_DOM_KEYS = ['format', 'toISOString', 'toCSTString', 'switchValue', 'precision', 'clearNotShow', 'dependNames', 'shouldCellUpdate' // 表格内部性能优化属性,不应传递给 Form.Item
45
44
  ];
46
45
  var RenderField = _ref => {
@@ -1,8 +1,7 @@
1
1
  import { Table, Space } from 'antd';
2
2
  import { tools } from '@zat-design/utils';
3
3
  import { valueTypeRender } from "../../../ProUtils/utils";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- import { jsxs as _jsxs } from "react/jsx-runtime";
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
5
  var calc = tools.calc;
7
6
  var formatSummaryColumns = (columns, _ref) => {
8
7
  var rowSelection = _ref.rowSelection;
@@ -1,7 +1,6 @@
1
1
  import { memo } from 'react';
2
2
  import { Form, message } from 'antd';
3
- import { Fragment as _Fragment } from "react/jsx-runtime";
4
- import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
5
4
  var Validator = _ref => {
6
5
  var name = _ref.name,
7
6
  virtualKey = _ref.virtualKey,
@@ -1,5 +1,5 @@
1
1
  var _excluded = ["value", "onChange", "onDrag", "onDragEnd", "className", "columns", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "toolbarSticky", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "requiredAlign", "summary", "max", "headerRender", "pagination", "rowKey", "rowDisabled", "rowDraggable", "footerRender", "scroll", "actionDirection", "diffConfig"],
2
- _excluded2 = ["_dragIndex"];
2
+ _excluded2 = ["_dragIndex", "_rowIndex"];
3
3
  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; }
4
4
  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; }
5
5
  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; }
@@ -28,9 +28,7 @@ import ProForm from "../ProForm";
28
28
  import Empty from "../assets/empty.png";
29
29
  import locale, { formatMessage } from "../locale";
30
30
  import { BaseTable, DraggableTable } from "./components/RcTable";
31
- import { jsx as _jsx } from "react/jsx-runtime";
32
- import { Fragment as _Fragment } from "react/jsx-runtime";
33
- import { jsxs as _jsxs } from "react/jsx-runtime";
31
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
34
32
  var ProEditTable = (_ref, ref) => {
35
33
  var _resetProps$id, _resetProps$id$split, _ref2, _formFieldProps$shoul, _themeConfig$data2;
36
34
  var _ref$value = _ref.value,
@@ -427,14 +425,16 @@ var ProEditTable = (_ref, ref) => {
427
425
  var TableComponent = draggable ? DraggableTable : BaseTable;
428
426
 
429
427
  // 给每个 record 附加编辑状态标识,让 shouldCellUpdate 能检测到状态变化
430
- // draggable 时同时注入 _dragIndex,供 shouldCellUpdate 感知行位置变化(拖拽后同一行数据不变但位置变了)
428
+ // 始终注入 _rowIndex,供 shouldCellUpdate 感知行位置变化(增删行后同一行数据不变但位置变了)
429
+ // draggable 时同时注入 _dragIndex
431
430
  var enrichedValue = useMemo(() => {
432
- if (!virtualKey && !draggable) return value;
433
- return value === null || value === void 0 ? void 0 : value.map((record, idx) => _objectSpread(_objectSpread(_objectSpread({}, record), virtualKey ? {
431
+ return value === null || value === void 0 ? void 0 : value.map((record, idx) => _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, record), virtualKey ? {
434
432
  _isEditing: editingKeys.includes(record.rowKey) || record._addFlag
435
433
  } : {}), draggable ? {
436
434
  _dragIndex: idx
437
- } : {}));
435
+ } : {}), {}, {
436
+ _rowIndex: idx
437
+ }));
438
438
  }, [value, virtualKey, editingKeys, draggable]);
439
439
  var tableRowKey = useMemo(() => buildTableRowKey(rowKey), [rowKey]);
440
440
  var tableProps = useMemo(() => ({
@@ -461,10 +461,12 @@ var ProEditTable = (_ref, ref) => {
461
461
  handlePageChange
462
462
  }), [_className, _columns, _rowClassName, disabled, editingKeys, formatMessage, handlePageChange, headerRender, isHideCheckBox, locale, page, pagination, renderRowSelection, rowDraggable, rowKey, tableRowKey, scroll, _summary, tableRef, enrichedValue, virtualKey]);
463
463
 
464
- // 拖拽排序后,enrichedValue 中含 _dragIndex(内部字段),需清除后再传给外部 onChange
464
+ // 拖拽排序后,enrichedValue 中含 _dragIndex/_rowIndex(内部字段),需清除后再传给外部 onChange
465
465
  var handleDragChange = useCallback(newValue => {
466
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
466
467
  var cleanValue = newValue === null || newValue === void 0 ? void 0 : newValue.map(_ref6 => {
467
- var _ = _ref6._dragIndex,
468
+ var _d = _ref6._dragIndex,
469
+ _r = _ref6._rowIndex,
468
470
  rest = _objectWithoutProperties(_ref6, _excluded2);
469
471
  return rest;
470
472
  });
@@ -22,8 +22,7 @@ import { filterInternalFields } from "../../ProForm/utils";
22
22
  import ProTooltip from "../../ProTooltip";
23
23
  import { RenderField, ActionButton } from "../components";
24
24
  import locale from "../../locale";
25
- import { jsx as _jsx } from "react/jsx-runtime";
26
- import { jsxs as _jsxs } from "react/jsx-runtime";
25
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
27
26
  var columnDataSourceRefCache = new Map();
28
27
  /** 追踪 component 函数引用,用于检测外部状态(如异步 list)变化导致的闭包更新 */
29
28
  var columnComponentRefCache = new Map();
@@ -407,6 +406,10 @@ export var transformColumns = function transformColumns() {
407
406
  if ((record === null || record === void 0 ? void 0 : record.rowKey) !== (prevRecord === null || prevRecord === void 0 ? void 0 : prevRecord.rowKey)) {
408
407
  return true;
409
408
  }
409
+ // 行位置变化时(增删其他行导致 index 移位),需强制重渲染以更新 Form.Item name 路径
410
+ if ((record === null || record === void 0 ? void 0 : record._rowIndex) !== (prevRecord === null || prevRecord === void 0 ? void 0 : prevRecord._rowIndex)) {
411
+ return true;
412
+ }
410
413
  // 拖拽排序时,行数据不变但位置(_dragIndex)变化,需强制重渲染以更新 cellName(Form.Item name)
411
414
  if ((record === null || record === void 0 ? void 0 : record._dragIndex) !== (prevRecord === null || prevRecord === void 0 ? void 0 : prevRecord._dragIndex)) {
412
415
  return true;
@@ -14,13 +14,13 @@ var useShouldUpdateForTable = props => {
14
14
  shouldUpdateDebounce = props.shouldUpdateDebounce;
15
15
 
16
16
  // refs 存储当前值
17
- var isEditableRef = useRef();
18
- var requiredRef = useRef();
19
- var rulesRef = useRef();
20
- var fieldPropsRef = useRef();
21
- var desensitizationRef = useRef();
22
- var valueTypeRef = useRef();
23
- var componentRef = useRef();
17
+ var isEditableRef = useRef(undefined);
18
+ var requiredRef = useRef(undefined);
19
+ var rulesRef = useRef(undefined);
20
+ var fieldPropsRef = useRef(undefined);
21
+ var desensitizationRef = useRef(undefined);
22
+ var valueTypeRef = useRef(undefined);
23
+ var componentRef = useRef(undefined);
24
24
  var _useState = useState({}),
25
25
  _useState2 = _slicedToArray(_useState, 2),
26
26
  reRender = _useState2[1];
@@ -27,8 +27,7 @@ import getEnumLabel from "./utils/getEnumLabel";
27
27
  import useEnum from "./hooks/useEnum";
28
28
  import locale from "../locale";
29
29
  import { useFieldProps } from "../ProForm/utils/useFieldProps";
30
- import { jsx as _jsx } from "react/jsx-runtime";
31
- import { Fragment as _Fragment } from "react/jsx-runtime";
30
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
32
31
  var ProEnum = props => {
33
32
  var _otherProps$isView, _enumProps$showCodeNa;
34
33
  var code = props.code,
@@ -7,8 +7,7 @@ import { Space, Button } from 'antd';
7
7
  import React, { useEffect, useMemo } from 'react';
8
8
  import { useProConfig } from "../../../ProConfigProvider";
9
9
  import locale from "../../../locale";
10
- import { jsx as _jsx } from "react/jsx-runtime";
11
- import { jsxs as _jsxs } from "react/jsx-runtime";
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
11
  export var PRO_FORM_CACHE = 'PRO_FORM_CACHE';
13
12
  var FormFooter = props => {
14
13
  var initialConfig = useProConfig('FormFooter');
@@ -6,13 +6,12 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
6
6
  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); }
7
7
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
8
8
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
9
- import React from 'react';
9
+ import React, { createElement as _createElement } from 'react';
10
10
  import { Checkbox as AntCheckbox } from 'antd';
11
11
  import Container from "../../Container";
12
12
  import { useProConfig } from "../../../../ProConfigProvider";
13
13
  import ProForm from "../../../index";
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
- import { createElement as _createElement } from "react";
16
15
  var Checkbox = props => {
17
16
  var _props$dataSource = props.dataSource,
18
17
  dataSource = _props$dataSource === void 0 ? [] : _props$dataSource,
@@ -18,8 +18,7 @@ import { maskStringRangeWithRegex } from "../../../utils/valueType";
18
18
 
19
19
  // 参数优先级
20
20
  // 组件内默认值 < config默认值 < props
21
- import { jsx as _jsx } from "react/jsx-runtime";
22
- import { jsxs as _jsxs } from "react/jsx-runtime";
21
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
22
  var Input = function Input(props) {
24
23
  var label = props.label,
25
24
  form = props.form,
@@ -23,9 +23,7 @@ import Container from "../../Container";
23
23
  import { getDecimalDigits } from "../../../utils/index";
24
24
  import locale from "../../../../locale";
25
25
  import ProForm from "../../../../ProForm";
26
- import { Fragment as _Fragment } from "react/jsx-runtime";
27
- import { jsx as _jsx } from "react/jsx-runtime";
28
- import { jsxs as _jsxs } from "react/jsx-runtime";
26
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
29
27
  var calc = tools.calc;
30
28
  var rangeReg = /^[([](-?\d+(\.\d+)?)?,\s*(-?\d+(\.\d+)?)?[)\]]$/;
31
29
 
@@ -13,8 +13,7 @@ import Container from "../../Container";
13
13
  import { useProConfig } from "../../../../ProConfigProvider";
14
14
  import locale from "../../../../locale";
15
15
  import ProForm from "../../../index";
16
- import { jsxs as _jsxs } from "react/jsx-runtime";
17
- import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
18
17
  var Select = props => {
19
18
  var _props$dataSource = props.dataSource,
20
19
  dataSource = _props$dataSource === void 0 ? [] : _props$dataSource,
@@ -13,8 +13,7 @@ import { useProConfig } from "../../../../ProConfigProvider";
13
13
  import Container from "../../Container";
14
14
  import locale from "../../../../locale";
15
15
  import ProForm from "../../../../ProForm";
16
- import { Fragment as _Fragment } from "react/jsx-runtime";
17
- import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
18
17
  var Switch = props => {
19
18
  var disabled = props.disabled,
20
19
  otherProps = props.otherProps,
@@ -13,8 +13,7 @@ import classnames from 'classnames';
13
13
  import { useProConfig } from "../../../../ProConfigProvider";
14
14
  import locale from "../../../../locale";
15
15
  import ProForm from "../../../../ProForm";
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
17
  var SwitchCheckbox = props => {
19
18
  var onChange = props.onChange,
20
19
  disabled = props.disabled,
@@ -9,9 +9,7 @@ import classnames from 'classnames';
9
9
  import RenderFields from "../../render/RenderFields";
10
10
  import ProCollapse from "../../../../ProLayout/components/ProCollapse";
11
11
  import ProForm from "../../../../ProForm";
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { Fragment as _Fragment } from "react/jsx-runtime";
14
- import { jsxs as _jsxs } from "react/jsx-runtime";
12
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
15
13
  var Container = props => {
16
14
  var children = props.children,
17
15
  className = props.className,
@@ -13,15 +13,13 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
13
13
  import { Button, Popconfirm, Space } from 'antd';
14
14
  import { isFunction, omit } from 'lodash';
15
15
  import classNames from 'classnames';
16
- import React, { useMemo } from 'react';
16
+ import React, { useMemo, createElement as _createElement } from 'react';
17
17
  import { CopyOutlined, PlusSquareOutlined, ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons';
18
18
  import ProIcon from "../../../../../ProIcon";
19
19
  import locale from "../../../../../locale";
20
20
  import deleteSvg from "../../../../../assets/delete.svg";
21
21
  import close2Svg from "../../../../../assets/close2.svg";
22
- import { jsx as _jsx } from "react/jsx-runtime";
23
- import { Fragment as _Fragment } from "react/jsx-runtime";
24
- import { createElement as _createElement } from "react";
22
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
25
23
  var filterKeys = ['actionType'];
26
24
  var getDefaultActions = mode => {
27
25
  var originActions = {
@@ -6,8 +6,7 @@ import ActionButton from "./ActionButton";
6
6
  import RenderFields from "../../../render/RenderFields";
7
7
  import ProCollapse from "../../../../../ProLayout/components/ProCollapse";
8
8
  import { memoWith } from "../utils";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- import { jsxs as _jsxs } from "react/jsx-runtime";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
10
  var MemoRenderFields = /*#__PURE__*/React.memo(RenderFields, memoWith);
12
11
  var BlockFields = props => {
13
12
  var title = props.title,
@@ -5,9 +5,7 @@ import { Button } from 'antd';
5
5
  import { isFunction } from 'lodash';
6
6
  import EmptyImg from "../../../../../assets/empty.png";
7
7
  import locale from "../../../../../locale";
8
- import { jsx as _jsx } from "react/jsx-runtime";
9
- import { Fragment as _Fragment } from "react/jsx-runtime";
10
- import { jsxs as _jsxs } from "react/jsx-runtime";
8
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
11
9
  // 空列表状态
12
10
  var Empty = _ref => {
13
11
  var disabled = _ref.disabled,
@@ -13,8 +13,7 @@ import ProIcon from "../../../../../ProIcon";
13
13
  import ActionButton from "./ActionButton";
14
14
  import RenderFields from "../../../render/RenderFields";
15
15
  import { memoWith } from "../utils";
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
17
  var MemoRenderFields = /*#__PURE__*/React.memo(RenderFields, memoWith);
19
18
  var LineFields = props => {
20
19
  var mode = props.mode,
@@ -10,14 +10,12 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  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; }
11
11
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
12
12
  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); }
13
- /* eslint-disable react/no-array-index-key */
14
13
  import { Space, Button } from 'antd';
15
14
  import { PlusOutlined } from '@ant-design/icons';
16
15
  import { isFunction, omit } from 'lodash';
17
16
  import React, { useMemo } from 'react';
18
17
  import locale from "../../../../../locale";
19
- import { jsx as _jsx } from "react/jsx-runtime";
20
- import { Fragment as _Fragment } from "react/jsx-runtime";
18
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
21
19
  var actions = {
22
20
  add: {
23
21
  onClick: (value, _ref) => {
@@ -32,7 +30,7 @@ var actions = {
32
30
  var defaultActionProps = [{
33
31
  type: 'add'
34
32
  }];
35
- var filterKeys = ['actionType'];
33
+ var filterKeys = ['actionType', 'addIndex'];
36
34
  var ToolbarButton = props => {
37
35
  var namePath = props.namePath,
38
36
  form = props.form,
@@ -16,8 +16,7 @@ import LineFields from "./components/LineFields";
16
16
  import Empty from "./components/Empty";
17
17
  import ProForm from "../../../../ProForm";
18
18
  import { useProConfig } from "../../../../ProConfigProvider";
19
- import { jsx as _jsx } from "react/jsx-runtime";
20
- import { jsxs as _jsxs } from "react/jsx-runtime";
19
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
20
  var FormList = (props, ref) => {
22
21
  var columns = props.columns,
23
22
  min = props.min,
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import "./index.less";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- import { jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
4
  var AddonWrapper = props => {
6
5
  var before = props.before,
7
6
  after = props.after,
@@ -13,9 +13,7 @@ import ConfirmWrapper from "../../../../components/render/ConfirmWrapper";
13
13
  import { FieldProvider } from "../../../../utils/useFieldProps";
14
14
  import * as componentMap from "../../../../../index";
15
15
  import AddonWrapper from "./AddonWrapper";
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { Fragment as _Fragment } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
19
17
  // 这里的key与组件内参数一致, 决定使用哪个包裹组件
20
18
  var wrapperMap = {
21
19
  confirm: ConfirmWrapper,
@@ -66,11 +64,11 @@ var ComRender = props => {
66
64
  }));
67
65
  var nextProps = mergedGetValueProps(fieldProps.value);
68
66
  var componentProps = omit(_objectSpread(_objectSpread(_objectSpread({}, fieldProps), rest), nextProps), ['onFieldChange']);
69
- var isSeparator = (props === null || props === void 0 || (_props$component = props.component) === null || _props$component === void 0 || (_props$component = _props$component.props) === null || _props$component === void 0 ? void 0 : _props$component.className) === 'group-separator';
67
+ var componentElementProps = props === null || props === void 0 || (_props$component = props.component) === null || _props$component === void 0 ? void 0 : _props$component.props;
68
+ var isSeparator = (componentElementProps === null || componentElementProps === void 0 ? void 0 : componentElementProps.className) === 'group-separator';
70
69
  if (isSeparator && isView) {
71
- var _props$component2;
72
70
  return /*#__PURE__*/_jsxs(_Fragment, {
73
- children: [" ", props === null || props === void 0 || (_props$component2 = props.component) === null || _props$component2 === void 0 || (_props$component2 = _props$component2.props) === null || _props$component2 === void 0 ? void 0 : _props$component2.children, " "]
71
+ children: [" ", componentElementProps === null || componentElementProps === void 0 ? void 0 : componentElementProps.children, " "]
74
72
  });
75
73
  }
76
74
  if (viewRender && isView) {
@@ -75,35 +75,36 @@ export declare const useFormItemProps: (column: FlexibleGroupColumnType, context
75
75
  confirm?: boolean | import("antd").ModalFuncProps | import("../../../render/propsType").FunctionArgs<any, boolean | import("antd").ModalFuncProps>;
76
76
  show?: boolean | ReactiveFunction<any, boolean>;
77
77
  component?: React.ReactNode | ReactiveFunction<any, React.ReactNode>;
78
- id?: string;
78
+ trim?: boolean;
79
+ normalize?: (value: any, prevValue: any, allValues: import("@rc-component/form/lib/interface").Store) => any;
80
+ children?: React.ReactNode | ((form: FormInstance<any>) => React.ReactNode);
81
+ style?: React.CSSProperties;
82
+ htmlFor?: string;
79
83
  className?: string;
80
84
  hidden?: boolean;
81
- style?: React.CSSProperties;
82
- children?: React.ReactNode | ((form: FormInstance<any>) => React.ReactNode);
85
+ id?: string;
83
86
  onReset?: () => void;
84
87
  prefixCls?: string;
85
- status?: "" | "warning" | "error" | "success" | "validating";
86
88
  rootClassName?: string;
87
- isView?: boolean;
89
+ status?: "" | "warning" | "error" | "success" | "validating";
90
+ vertical?: boolean;
91
+ validateTrigger?: string | false | string[];
92
+ preserve?: boolean;
88
93
  colon?: boolean;
89
- htmlFor?: string;
90
94
  labelAlign?: import("antd/es/form/interface").FormLabelAlign;
91
95
  labelCol?: import("antd").ColProps;
92
- vertical?: boolean;
93
96
  getValueFromEvent?: (...args: import("@rc-component/form/lib/interface").EventArgs) => any;
94
- normalize?: (value: any, prevValue: any, allValues: import("@rc-component/form/lib/interface").Store) => any;
95
97
  shouldUpdate?: import("@rc-component/form/lib/Field").ShouldUpdate<any>;
96
98
  trigger?: string;
97
- validateTrigger?: string | false | string[];
98
99
  validateDebounce?: number;
99
100
  valuePropName?: string;
100
101
  getValueProps?: ((value: any) => Record<string, unknown>) & ((value: any) => Record<string, unknown>);
101
102
  messageVariables?: Record<string, string>;
102
103
  initialValue?: any;
103
104
  onMetaChange?: (meta: import("@rc-component/form/lib/Field").MetaEvent) => void;
104
- preserve?: boolean;
105
105
  isListField?: boolean;
106
106
  isList?: boolean;
107
+ isView?: boolean;
107
108
  noStyle?: boolean;
108
109
  hasFeedback?: boolean | {
109
110
  icons: import("antd/es/form/FormItem").FeedbackIcons;
@@ -121,7 +122,6 @@ export declare const useFormItemProps: (column: FlexibleGroupColumnType, context
121
122
  index?: number;
122
123
  }) => string | React.ReactElement<any, any>;
123
124
  viewType?: import("../../../render/propsType").ViewType;
124
- trim?: boolean;
125
125
  upperCase?: boolean;
126
126
  toISOString?: boolean;
127
127
  toCSTString?: boolean;
@@ -23,8 +23,7 @@ import useEnum from "../../../../ProEnum/hooks/useEnum";
23
23
  import locale from "../../../../locale";
24
24
  import ProForm from "../../..";
25
25
  import Container from "../../Container";
26
- import { jsx as _jsx } from "react/jsx-runtime";
27
- import { jsxs as _jsxs } from "react/jsx-runtime";
26
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
27
  var defaultFieldNames = {
29
28
  label: 'name',
30
29
  value: 'code',
@@ -30,9 +30,7 @@ import viewSvg from "../../../../assets/view.svg";
30
30
  import useRequestList from "./hooks/useRequestList";
31
31
  import locale from "../../../../locale";
32
32
  import { hideTooltipIfOpen } from "./utils";
33
- import { jsx as _jsx } from "react/jsx-runtime";
34
- import { jsxs as _jsxs } from "react/jsx-runtime";
35
- import { Fragment as _Fragment } from "react/jsx-runtime";
33
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
36
34
  var ProModalSelect = (props, ref) => {
37
35
  var _useRequest$options, _useRequest$options2, _useRequest$options3, _formColumns$;
38
36
  var value = props.value,
@@ -18,8 +18,7 @@ import { tools } from '@zat-design/utils';
18
18
  import Container from "../../Container";
19
19
  import locale from "../../../../locale";
20
20
  import ProForm from "../../../../ProForm";
21
- import { jsx as _jsx } from "react/jsx-runtime";
22
- import { jsxs as _jsxs } from "react/jsx-runtime";
21
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
22
  var formatAmount = tools.formatAmount;
24
23
  var ProNumberRange = props => {
25
24
  var _ref2, _valueProps, _ref3, _ref4, _value$, _valueProps2, _ref5, _ref6, _value$2, _valueProps3, _valueProps4;
@@ -21,8 +21,7 @@ import { useProConfig } from "../../../../ProConfigProvider";
21
21
  import Container from "../../Container";
22
22
  import locale from "../../../../locale";
23
23
  import ProForm from "../../../../ProForm";
24
- import { jsxs as _jsxs } from "react/jsx-runtime";
25
- import { jsx as _jsx } from "react/jsx-runtime";
24
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
26
25
  var defaultPickerValue = [dayjs(), dayjs()];
27
26
  var useControlled = props => {
28
27
  var _useState = useState(),
@@ -24,8 +24,7 @@ import useControlled from "./hooks/useControlled";
24
24
  import ProRangeLimit from "../ProRangeLimit";
25
25
  import locale from "../../../../locale";
26
26
  import ProForm from "../../../../ProForm";
27
- import { jsx as _jsx } from "react/jsx-runtime";
28
- import { jsxs as _jsxs } from "react/jsx-runtime";
27
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
29
28
  // 永久有效默认值
30
29
 
31
30
  export var ProTimeLimit = props => {
@@ -13,8 +13,7 @@ import React, { useMemo } from 'react';
13
13
  import { diffOriginal } from "../../utils/diffOriginal";
14
14
  import { useProConfig } from "../../../ProConfigProvider";
15
15
  import { isEmpty } from "../../../utils";
16
- import { jsxs as _jsxs } from "react/jsx-runtime";
17
- import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
18
17
  var componentsWithFloatWindow = ['Select', 'ProSelect', 'ProEnum', 'ProTimeLimit', 'ProModalSelect', 'ProCascader', 'DataPicker', 'RangePicker', 'TimePicker'];
19
18
  var ChangedWrapper = props => {
20
19
  var _diffConfig$toolTip, _children$props, _children$props2, _children$props3;