@zat-design/sisyphus-react 4.1.2-beta.1 → 4.1.2-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claudeignore +40 -0
- package/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/ProEditTable/components/RcTable/BaseTable.js +12 -16
- package/es/ProEditTable/components/RcTable/DraggableTable.js +11 -16
- package/es/ProEditTable/components/RenderField/index.js +292 -97
- package/es/ProEditTable/index.js +14 -4
- package/es/ProEditTable/propsType.d.ts +6 -1
- package/es/ProEditTable/style/index.less +8 -0
- package/es/ProEditTable/utils/index.js +66 -24
- package/es/ProEditTable/utils/useShouldUpdateForTable.d.ts +1 -0
- package/es/ProEditTable/utils/useShouldUpdateForTable.js +37 -10
- package/es/ProForm/components/base/DatePicker/index.js +1 -7
- package/es/ProForm/components/base/RangePicker/index.js +62 -8
- package/es/ProForm/components/combination/Group/component/ComRender.d.ts +2 -0
- package/es/ProForm/components/combination/Group/component/ComRender.js +15 -11
- package/es/ProForm/components/combination/Group/component/FlexibleGroup.js +61 -7
- package/es/ProForm/components/combination/Group/style/index.less +26 -1
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/es/ProForm/propsType.d.ts +3 -3
- package/es/ProForm/utils/transformValue.d.ts +1 -1
- package/es/ProForm/utils/useForm.d.ts +1 -1
- package/es/ProForm/utils/useWatch.d.ts +2 -1
- package/es/ProForm/utils/useWatch.js +3 -1
- package/es/ProSelect/index.js +117 -62
- package/es/ProUpload/propsType.d.ts +1 -1
- package/es/ProUpload/style/index.less +3 -3
- package/lib/ProEditTable/components/RcTable/BaseTable.js +11 -15
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +11 -16
- package/lib/ProEditTable/components/RenderField/index.js +292 -97
- package/lib/ProEditTable/index.js +14 -4
- package/lib/ProEditTable/propsType.d.ts +6 -1
- package/lib/ProEditTable/style/index.less +8 -0
- package/lib/ProEditTable/utils/index.js +67 -23
- package/lib/ProEditTable/utils/useShouldUpdateForTable.d.ts +1 -0
- package/lib/ProEditTable/utils/useShouldUpdateForTable.js +37 -10
- package/lib/ProForm/components/base/DatePicker/index.js +1 -7
- package/lib/ProForm/components/base/RangePicker/index.js +62 -8
- package/lib/ProForm/components/combination/Group/component/ComRender.d.ts +2 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.js +15 -11
- package/lib/ProForm/components/combination/Group/component/FlexibleGroup.js +61 -7
- package/lib/ProForm/components/combination/Group/style/index.less +26 -1
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/lib/ProForm/propsType.d.ts +3 -3
- package/lib/ProForm/utils/transformValue.d.ts +1 -1
- package/lib/ProForm/utils/useForm.d.ts +1 -1
- package/lib/ProForm/utils/useWatch.d.ts +2 -1
- package/lib/ProForm/utils/useWatch.js +3 -1
- package/lib/ProSelect/index.js +115 -61
- package/lib/ProUpload/propsType.d.ts +1 -1
- package/lib/ProUpload/style/index.less +3 -3
- package/package.json +4 -2
|
@@ -14,7 +14,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
14
14
|
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; }
|
|
15
15
|
import { memo, useCallback } from 'react';
|
|
16
16
|
import { Badge, Table } from 'antd';
|
|
17
|
-
import { isFunction
|
|
17
|
+
import { isFunction } from 'lodash';
|
|
18
18
|
import useEditTableError from "../../utils/useEditTableError";
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -51,23 +51,19 @@ var BaseTable = _ref => {
|
|
|
51
51
|
_useEditTableError2 = _slicedToArray(_useEditTableError, 1),
|
|
52
52
|
errorLength = _useEditTableError2[0];
|
|
53
53
|
var getScroll = useCallback(() => {
|
|
54
|
-
if (scroll
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
if (!scroll) return null;
|
|
55
|
+
var result = {};
|
|
56
|
+
|
|
57
|
+
// 处理 x 轴
|
|
58
|
+
if (scroll.x !== undefined) {
|
|
59
|
+
result.x = scroll.x;
|
|
59
60
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
|
|
62
|
+
// 处理 y 轴:支持数字和字符串(如 calc 表达式)
|
|
63
|
+
if (scroll.y !== undefined) {
|
|
64
|
+
result.y = scroll.y;
|
|
64
65
|
}
|
|
65
|
-
|
|
66
|
-
return {
|
|
67
|
-
y: Number(scroll === null || scroll === void 0 ? void 0 : scroll.y)
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
return null;
|
|
66
|
+
return Object.keys(result).length > 0 ? result : null;
|
|
71
67
|
}, [scroll]);
|
|
72
68
|
var nextTableProps = _objectSpread(_objectSpread({
|
|
73
69
|
className,
|
|
@@ -10,7 +10,6 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
10
10
|
import { Table } from 'antd';
|
|
11
11
|
import React, { memo, useCallback } from 'react';
|
|
12
12
|
import { DndContext } from '@dnd-kit/core';
|
|
13
|
-
import { isNumber } from 'lodash';
|
|
14
13
|
import { arrayMove, useSortable, SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
15
14
|
import { CSS } from '@dnd-kit/utilities';
|
|
16
15
|
import dragSvg from "../../../assets/drag.svg";
|
|
@@ -142,23 +141,19 @@ var DraggableTable = _ref3 => {
|
|
|
142
141
|
draggable = draggableProps.draggable,
|
|
143
142
|
onDragEnd = draggableProps.onDragEnd;
|
|
144
143
|
var getScroll = useCallback(() => {
|
|
145
|
-
if (scroll
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
if (scroll !== null && scroll !== void 0 && scroll.x && !isNumber(scroll === null || scroll === void 0 ? void 0 : scroll.y)) {
|
|
152
|
-
return {
|
|
153
|
-
x: scroll === null || scroll === void 0 ? void 0 : scroll.x
|
|
154
|
-
};
|
|
144
|
+
if (!scroll) return null;
|
|
145
|
+
var result = {};
|
|
146
|
+
|
|
147
|
+
// 处理 x 轴
|
|
148
|
+
if (scroll.x !== undefined) {
|
|
149
|
+
result.x = scroll.x;
|
|
155
150
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
151
|
+
|
|
152
|
+
// 处理 y 轴:支持数字和字符串(如 calc 表达式)
|
|
153
|
+
if (scroll.y !== undefined) {
|
|
154
|
+
result.y = scroll.y;
|
|
160
155
|
}
|
|
161
|
-
return null;
|
|
156
|
+
return Object.keys(result).length > 0 ? result : null;
|
|
162
157
|
}, [scroll]);
|
|
163
158
|
var nextTableProps = _objectSpread(_objectSpread({
|
|
164
159
|
className,
|