@zat-design/sisyphus-react 3.8.3-beta.5 → 3.8.3-beta.7
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/dist/index.esm.css +10 -0
- package/dist/less.esm.css +10 -0
- package/es/ProAction/index.js +5 -5
- package/es/ProDownload/index.d.ts +1 -1
- package/es/ProDownload/index.js +3 -3
- package/es/ProDownload/utils.js +3 -3
- package/es/ProDrawerForm/components/ProDrawer/index.js +4 -4
- package/es/ProDrawerForm/components/ProModal/index.js +3 -3
- package/es/ProEditLabel/index.js +3 -3
- package/es/ProEditTable/components/ActionButton/index.d.ts +1 -1
- package/es/ProEditTable/components/ActionButton/index.js +3 -3
- package/es/ProEditTable/components/RcTable/BaseTable.d.ts +1 -1
- package/es/ProEditTable/components/RcTable/DraggableTable.d.ts +1 -1
- package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +1 -1
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +1 -1
- package/es/ProEditTable/components/RenderField/index.d.ts +1 -1
- package/es/ProEditTable/components/RenderField/index.js +5 -5
- package/es/ProEditTable/components/RenderToolbar/index.d.ts +1 -1
- package/es/ProEditTable/components/RenderToolbar/index.js +1 -1
- package/es/ProEditTable/components/Summary/index.d.ts +1 -1
- package/es/ProEditTable/utils/config.d.ts +1 -1
- package/es/ProEditTable/utils/config.js +2 -2
- package/es/ProEditTable/utils/index.js +5 -5
- package/es/ProEditTable/utils/tools.js +4 -4
- package/es/ProEnum/components/Group.d.ts +1 -1
- package/es/ProEnum/components/Tag.d.ts +1 -1
- package/es/ProEnum/hooks/useEnumRequest.js +2 -2
- package/es/ProEnum/index.d.ts +2 -2
- package/es/ProEnum/index.js +1 -1
- package/es/ProEnum/utils/eventCenter.js +2 -1
- package/es/ProEnum/utils/getEnumLabel.d.ts +1 -1
- package/es/ProForm/components/base/Input/index.d.ts +1 -1
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
- package/es/ProForm/components/combination/FormList/components/BlockFields.d.ts +2 -0
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +4 -2
- package/es/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
- package/es/ProForm/components/combination/FormList/components/LineFields.d.ts +2 -0
- package/es/ProForm/components/combination/FormList/components/LineFields.js +4 -2
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +1 -1
- package/es/ProForm/components/combination/FormList/index.js +14 -3
- package/es/ProForm/components/combination/FormList/utils.js +1 -1
- package/es/ProForm/components/combination/Group/component/ComRender.js +1 -1
- package/es/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/index.js +8 -8
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +22 -8
- package/es/ProForm/components/old/InputRange/index.d.ts +1 -1
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +2 -1
- package/es/ProForm/components/old/ProAddress/index.js +1 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +2 -1
- package/es/ProForm/components/render/ConfirmWrapper.js +1 -1
- package/es/ProForm/components/render/Render.js +3 -3
- package/es/ProForm/components/render/RenderFields.js +2 -1
- package/es/ProForm/index.js +1 -1
- package/es/ProForm/propsType.d.ts +1 -0
- package/es/ProForm/utils/index.js +10 -14
- package/es/ProForm/utils/useForm.js +1 -1
- package/es/ProIcon/utils/index.js +3 -4
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +1 -1
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -3
- package/es/ProLayout/components/ProCollapse/index.d.ts +1 -1
- package/es/ProLayout/components/ProFooter/index.d.ts +1 -1
- package/es/ProLayout/components/ProHeader/components/Copy/index.d.ts +1 -1
- package/es/ProLayout/components/ProHeader/index.d.ts +1 -1
- package/es/ProLayout/index.d.ts +4 -4
- package/es/ProLayout/utils/index.js +9 -9
- package/es/ProSelect/components/AdaptiveTooltip.d.ts +1 -1
- package/es/ProSelect/index.d.ts +1 -1
- package/es/ProStep/components/Anchor/index.d.ts +1 -1
- package/es/ProStep/components/Item/index.d.ts +1 -1
- package/es/ProStep/components/Listener/index.js +1 -1
- package/es/ProStep/components/Step/index.d.ts +1 -1
- package/es/ProStep/index.d.ts +2 -2
- package/es/ProStep/index.js +3 -3
- package/es/ProTable/components/FormatColumn/index.d.ts +2 -1
- package/es/ProTable/components/FormatColumn/index.js +36 -15
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +1 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +2 -2
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +8 -9
- package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -0
- package/es/ProTable/components/RenderColumn/index.js +3 -2
- package/es/ProTable/components/RenderFooter/index.d.ts +1 -1
- package/es/ProTable/components/RenderTableHeader/index.d.ts +1 -1
- package/es/ProTable/components/TableResizable/index.d.ts +1 -1
- package/es/ProTable/hooks/useAntdTable.js +3 -3
- package/es/ProTable/index.d.ts +1 -1
- package/es/ProTable/index.js +10 -9
- package/es/ProTable/style/index.less +14 -0
- package/es/ProTabs/components/Card/index.d.ts +1 -1
- package/es/ProThemeTools/component/ProTools/index.d.ts +1 -1
- package/es/ProThemeTools/index.d.ts +1 -1
- package/es/ProTooltip/index.d.ts +1 -1
- package/es/ProTree/components/AdaptiveTooltip.d.ts +1 -1
- package/es/ProTree/components/CloseIcon.d.ts +2 -1
- package/es/ProTree/components/List.d.ts +1 -1
- package/es/ProTree/components/ProTree.d.ts +1 -1
- package/es/ProTree/components/ProTree.js +1 -1
- package/es/ProTree/components/ProTreeSelect/index.d.ts +1 -1
- package/es/ProTree/components/ProTreeSelect/index.js +18 -18
- package/es/ProTree/components/SearchTitle.d.ts +1 -1
- package/es/ProTree/components/Tree.d.ts +1 -1
- package/es/ProTree/components/Tree.js +4 -4
- package/es/ProTree/index.d.ts +1 -1
- package/es/ProTree/utils.js +11 -12
- package/es/ProTreeModal/components/Cascader.d.ts +1 -1
- package/es/ProTreeModal/components/CloseIcon.d.ts +2 -1
- package/es/ProTreeModal/components/SearchTitle.d.ts +1 -1
- package/es/ProTreeModal/components/Tree.js +6 -6
- package/es/ProTreeModal/components/Trigger.d.ts +1 -1
- package/es/ProTreeModal/index.d.ts +1 -1
- package/es/ProTreeModal/index.js +3 -3
- package/es/ProTreeModal/utils.js +14 -16
- package/es/ProUpload/components/DraggableUploadListItem.d.ts +1 -1
- package/es/ProUpload/components/ImageRender.js +1 -1
- package/es/ProViewer/index.js +2 -2
- package/es/old/ProEditableTable/index.js +4 -4
- package/lib/ProAction/index.js +5 -5
- package/lib/ProDownload/index.d.ts +1 -1
- package/lib/ProDownload/index.js +3 -3
- package/lib/ProDownload/utils.js +3 -3
- package/lib/ProDrawerForm/components/ProDrawer/index.js +4 -4
- package/lib/ProDrawerForm/components/ProModal/index.js +3 -3
- package/lib/ProEditLabel/index.js +3 -3
- package/lib/ProEditTable/components/ActionButton/index.d.ts +1 -1
- package/lib/ProEditTable/components/ActionButton/index.js +3 -3
- package/lib/ProEditTable/components/RcTable/BaseTable.d.ts +1 -1
- package/lib/ProEditTable/components/RcTable/DraggableTable.d.ts +1 -1
- package/lib/ProEditTable/components/RcTable/VirtualTable.d.ts +1 -1
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +1 -1
- package/lib/ProEditTable/components/RenderField/index.d.ts +1 -1
- package/lib/ProEditTable/components/RenderField/index.js +5 -5
- package/lib/ProEditTable/components/RenderToolbar/index.d.ts +1 -1
- package/lib/ProEditTable/components/RenderToolbar/index.js +1 -1
- package/lib/ProEditTable/components/Summary/index.d.ts +1 -1
- package/lib/ProEditTable/utils/config.d.ts +1 -1
- package/lib/ProEditTable/utils/config.js +2 -2
- package/lib/ProEditTable/utils/index.js +5 -5
- package/lib/ProEditTable/utils/tools.js +4 -4
- package/lib/ProEnum/components/Group.d.ts +1 -1
- package/lib/ProEnum/components/Tag.d.ts +1 -1
- package/lib/ProEnum/hooks/useEnumRequest.js +2 -2
- package/lib/ProEnum/index.d.ts +2 -2
- package/lib/ProEnum/index.js +1 -1
- package/lib/ProEnum/utils/eventCenter.js +2 -1
- package/lib/ProEnum/utils/getEnumLabel.d.ts +1 -1
- package/lib/ProForm/components/base/Input/index.d.ts +1 -1
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
- package/lib/ProForm/components/combination/FormList/components/BlockFields.d.ts +2 -0
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +4 -2
- package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
- package/lib/ProForm/components/combination/FormList/components/LineFields.d.ts +2 -0
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +4 -2
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +1 -1
- package/lib/ProForm/components/combination/FormList/index.js +14 -3
- package/lib/ProForm/components/combination/FormList/utils.js +1 -1
- package/lib/ProForm/components/combination/Group/component/ComRender.js +1 -1
- package/lib/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/index.js +8 -8
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +22 -8
- package/lib/ProForm/components/old/InputRange/index.d.ts +1 -1
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProAddress/index.d.ts +2 -1
- package/lib/ProForm/components/old/ProAddress/index.js +1 -1
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +2 -1
- package/lib/ProForm/components/render/ConfirmWrapper.js +1 -1
- package/lib/ProForm/components/render/Render.js +3 -3
- package/lib/ProForm/components/render/RenderFields.js +2 -1
- package/lib/ProForm/index.js +1 -1
- package/lib/ProForm/propsType.d.ts +1 -0
- package/lib/ProForm/utils/index.js +10 -10
- package/lib/ProForm/utils/useForm.js +1 -1
- package/lib/ProIcon/utils/index.js +3 -3
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +1 -1
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -3
- package/lib/ProLayout/components/ProCollapse/index.d.ts +1 -1
- package/lib/ProLayout/components/ProFooter/index.d.ts +1 -1
- package/lib/ProLayout/components/ProHeader/components/Copy/index.d.ts +1 -1
- package/lib/ProLayout/components/ProHeader/index.d.ts +1 -1
- package/lib/ProLayout/index.d.ts +4 -4
- package/lib/ProLayout/utils/index.js +9 -9
- package/lib/ProSelect/components/AdaptiveTooltip.d.ts +1 -1
- package/lib/ProSelect/index.d.ts +1 -1
- package/lib/ProStep/components/Anchor/index.d.ts +1 -1
- package/lib/ProStep/components/Item/index.d.ts +1 -1
- package/lib/ProStep/components/Listener/index.js +1 -1
- package/lib/ProStep/components/Step/index.d.ts +1 -1
- package/lib/ProStep/index.d.ts +2 -2
- package/lib/ProStep/index.js +3 -3
- package/lib/ProTable/components/FormatColumn/index.d.ts +2 -1
- package/lib/ProTable/components/FormatColumn/index.js +36 -15
- package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +1 -1
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +2 -2
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +8 -8
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -0
- package/lib/ProTable/components/RenderColumn/index.js +3 -2
- package/lib/ProTable/components/RenderFooter/index.d.ts +1 -1
- package/lib/ProTable/components/RenderTableHeader/index.d.ts +1 -1
- package/lib/ProTable/components/TableResizable/index.d.ts +1 -1
- package/lib/ProTable/hooks/useAntdTable.js +3 -3
- package/lib/ProTable/index.d.ts +1 -1
- package/lib/ProTable/index.js +10 -9
- package/lib/ProTable/style/index.less +14 -0
- package/lib/ProTabs/components/Card/index.d.ts +1 -1
- package/lib/ProThemeTools/component/ProTools/index.d.ts +1 -1
- package/lib/ProThemeTools/index.d.ts +1 -1
- package/lib/ProTooltip/index.d.ts +1 -1
- package/lib/ProTree/components/AdaptiveTooltip.d.ts +1 -1
- package/lib/ProTree/components/CloseIcon.d.ts +2 -1
- package/lib/ProTree/components/List.d.ts +1 -1
- package/lib/ProTree/components/ProTree.d.ts +1 -1
- package/lib/ProTree/components/ProTree.js +1 -1
- package/lib/ProTree/components/ProTreeSelect/index.d.ts +1 -1
- package/lib/ProTree/components/ProTreeSelect/index.js +18 -18
- package/lib/ProTree/components/SearchTitle.d.ts +1 -1
- package/lib/ProTree/components/Tree.d.ts +1 -1
- package/lib/ProTree/components/Tree.js +4 -4
- package/lib/ProTree/index.d.ts +1 -1
- package/lib/ProTree/utils.js +11 -11
- package/lib/ProTreeModal/components/Cascader.d.ts +1 -1
- package/lib/ProTreeModal/components/CloseIcon.d.ts +2 -1
- package/lib/ProTreeModal/components/SearchTitle.d.ts +1 -1
- package/lib/ProTreeModal/components/Tree.js +6 -6
- package/lib/ProTreeModal/components/Trigger.d.ts +1 -1
- package/lib/ProTreeModal/index.d.ts +1 -1
- package/lib/ProTreeModal/index.js +3 -3
- package/lib/ProTreeModal/utils.js +13 -13
- package/lib/ProUpload/components/DraggableUploadListItem.d.ts +1 -1
- package/lib/ProUpload/components/ImageRender.js +1 -1
- package/lib/ProViewer/index.js +2 -2
- package/lib/old/ProEditableTable/index.js +4 -4
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ export var getIdsByPathName = function getIdsByPathName(menus, activeMenu) {
|
|
|
15
15
|
_pathName = activeMenu;
|
|
16
16
|
}
|
|
17
17
|
var result;
|
|
18
|
-
var
|
|
18
|
+
var menuDeep = function menuDeep(menuDeepItem) {
|
|
19
19
|
for (var i = 0; i <= menuDeepItem.length - 1; i++) {
|
|
20
20
|
var item = menuDeepItem[i];
|
|
21
21
|
// 只包含一级菜单时,解决URL:/endorsement/demo/123无法选中问题
|
|
@@ -24,7 +24,7 @@ export var getIdsByPathName = function getIdsByPathName(menus, activeMenu) {
|
|
|
24
24
|
break;
|
|
25
25
|
}
|
|
26
26
|
if (Array.isArray(item.children) && item.children.length) {
|
|
27
|
-
|
|
27
|
+
menuDeep(item.children);
|
|
28
28
|
} else if (((item === null || item === void 0 ? void 0 : item.url) && _pathName.includes(item.url.split('?')[0]) || (item === null || item === void 0 ? void 0 : item.redirectUrl) && _pathName.includes(item.redirectUrl.split('?')[0])) && !result) {
|
|
29
29
|
// 当循环到最后一层时判断URL是否包含最后一层的URL,解决URL在URL中不存在的场景
|
|
30
30
|
result = item.keyIdPath;
|
|
@@ -32,7 +32,7 @@ export var getIdsByPathName = function getIdsByPathName(menus, activeMenu) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
menuDeep(menus);
|
|
36
36
|
return result || [];
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
@@ -42,7 +42,7 @@ export var getIdsByPathName = function getIdsByPathName(menus, activeMenu) {
|
|
|
42
42
|
*/
|
|
43
43
|
export var transformMenu = function transformMenu(menuData, pathPrefix) {
|
|
44
44
|
var data = _toConsumableArray(menuData);
|
|
45
|
-
var
|
|
45
|
+
var menuDeep = function menuDeep(menuDeepItem) {
|
|
46
46
|
if (!Array.isArray(menuDeepItem) || !menuDeepItem.length) {
|
|
47
47
|
return [];
|
|
48
48
|
}
|
|
@@ -75,11 +75,11 @@ export var transformMenu = function transformMenu(menuData, pathPrefix) {
|
|
|
75
75
|
childrenItem.keyUrlPath = _toConsumableArray(item.keyUrlPath);
|
|
76
76
|
childrenItem.keyIdPath = _toConsumableArray(item.keyIdPath);
|
|
77
77
|
});
|
|
78
|
-
|
|
78
|
+
menuDeep(item.children);
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
};
|
|
82
|
-
|
|
82
|
+
menuDeep(data);
|
|
83
83
|
return data;
|
|
84
84
|
};
|
|
85
85
|
/**
|
|
@@ -134,7 +134,7 @@ export var getPathNameKey = function getPathNameKey(_ref) {
|
|
|
134
134
|
var menus = _ref.menus,
|
|
135
135
|
pathName = _ref.pathName;
|
|
136
136
|
var result;
|
|
137
|
-
var
|
|
137
|
+
var menuDeep = function menuDeep(menuDeepItem) {
|
|
138
138
|
if (!Array.isArray(menuDeepItem) || !menuDeepItem.length) {
|
|
139
139
|
return [];
|
|
140
140
|
}
|
|
@@ -148,7 +148,7 @@ export var getPathNameKey = function getPathNameKey(_ref) {
|
|
|
148
148
|
break;
|
|
149
149
|
}
|
|
150
150
|
if (Array.isArray(item.children) && item.children.length) {
|
|
151
|
-
|
|
151
|
+
menuDeep(item.children);
|
|
152
152
|
} else if (((item === null || item === void 0 ? void 0 : item.url) && pathName.includes(item.url.split('?')[0]) || (item === null || item === void 0 ? void 0 : item.redirectUrl) && pathName.includes(item.redirectUrl.split('?')[0])) && !result) {
|
|
153
153
|
// URL未匹配时,循环到最后一层时判断URL是否包含最后一层的URL,解决URL在URL中不存在的场景
|
|
154
154
|
result = item.keyIdPath;
|
|
@@ -156,6 +156,6 @@ export var getPathNameKey = function getPathNameKey(_ref) {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
|
-
|
|
159
|
+
menuDeep(menus);
|
|
160
160
|
return result;
|
|
161
161
|
};
|
package/es/ProSelect/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PropSelectProps, ProSelectAction } from './propsType';
|
|
3
3
|
import './index.less';
|
|
4
|
-
export declare const ProSelect: (props: PropSelectProps, ref: React.Ref<ProSelectAction> | undefined) =>
|
|
4
|
+
export declare const ProSelect: (props: PropSelectProps, ref: React.Ref<ProSelectAction> | undefined) => JSX.Element;
|
|
5
5
|
declare const _default: React.ForwardRefExoticComponent<PropSelectProps & React.RefAttributes<ProSelectAction>>;
|
|
6
6
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const MenuItem: (props: any) =>
|
|
1
|
+
export declare const MenuItem: (props: any) => JSX.Element;
|
|
2
2
|
export default MenuItem;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ProStepItem } from '../../propsType';
|
|
2
|
-
declare const _default: ({ id, title, collapse: collapseItem, children, ...restProps }: ProStepItem) =>
|
|
2
|
+
declare const _default: ({ id, title, collapse: collapseItem, children, ...restProps }: ProStepItem) => JSX.Element;
|
|
3
3
|
export default _default;
|
|
@@ -14,7 +14,7 @@ export default (function (_ref) {
|
|
|
14
14
|
var _useStep = useStep(),
|
|
15
15
|
notify = _useStep.notify;
|
|
16
16
|
return /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, props), {}, {
|
|
17
|
-
onClick: throttle(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
17
|
+
onClick: throttle( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
18
18
|
var values;
|
|
19
19
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
20
20
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProStepPropsType } from '../../propsType';
|
|
2
2
|
export declare const Step: ({ fixedTop, dataSource, activeKey, errorCollection, style, targetOffset, scrollToError, }: ProStepPropsType & {
|
|
3
3
|
errorCollection: object;
|
|
4
|
-
}) =>
|
|
4
|
+
}) => JSX.Element;
|
|
5
5
|
export default Step;
|
package/es/ProStep/index.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ import './style/index.less';
|
|
|
4
4
|
export declare const ProStepContext: import("react").Context<any>;
|
|
5
5
|
export declare const useStep: () => any;
|
|
6
6
|
declare const ProStep: {
|
|
7
|
-
({ children, ...resetProps }: ProStepPropsType):
|
|
7
|
+
({ children, ...resetProps }: ProStepPropsType): JSX.Element;
|
|
8
8
|
useStep: () => any;
|
|
9
|
-
Item: ({ id, title, collapse: collapseItem, children, ...restProps }: import("./propsType").ProStepItem) =>
|
|
9
|
+
Item: ({ id, title, collapse: collapseItem, children, ...restProps }: import("./propsType").ProStepItem) => JSX.Element;
|
|
10
10
|
Listener: ({ children, delayTime, excludes, ...props }: any) => import("react").DetailedReactHTMLElement<any, HTMLElement>;
|
|
11
11
|
};
|
|
12
12
|
export default ProStep;
|
package/es/ProStep/index.js
CHANGED
|
@@ -82,7 +82,7 @@ var ProStep = function ProStep(_ref) {
|
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
84
|
var subEvent = /*#__PURE__*/function () {
|
|
85
|
-
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
85
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
86
86
|
var value, _form$validateFields, _error$errorFields;
|
|
87
87
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
88
88
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -128,7 +128,7 @@ var ProStep = function ProStep(_ref) {
|
|
|
128
128
|
registerMap.current[id] = record;
|
|
129
129
|
};
|
|
130
130
|
var notify = /*#__PURE__*/function () {
|
|
131
|
-
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
131
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
132
132
|
var _ref7, excludes, triggerIds, events, res, nextErrorCollection;
|
|
133
133
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
134
134
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -167,7 +167,7 @@ var ProStep = function ProStep(_ref) {
|
|
|
167
167
|
};
|
|
168
168
|
}();
|
|
169
169
|
var triggerTo = /*#__PURE__*/function () {
|
|
170
|
-
var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(keys) {
|
|
170
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(keys) {
|
|
171
171
|
var events, result, nextErrorCollection;
|
|
172
172
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
173
173
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ProTableColumn } from '../../propsType';
|
|
3
|
-
export declare const formatColumn: ({ column, originalObj, dataSourceObj, rowKey, diffToolTip, wrapToolTipProps, scroll, onUpdateMinWidth, }: {
|
|
3
|
+
export declare const formatColumn: ({ column, originalObj, dataSourceObj, rowKey, diffToolTip, wrapToolTipProps, scroll, onUpdateMinWidth, isInNewRow, }: {
|
|
4
4
|
column: ProTableColumn;
|
|
5
5
|
originalObj: any;
|
|
6
6
|
dataSourceObj: any;
|
|
@@ -9,6 +9,7 @@ export declare const formatColumn: ({ column, originalObj, dataSourceObj, rowKey
|
|
|
9
9
|
wrapToolTipProps?: any;
|
|
10
10
|
scroll?: any;
|
|
11
11
|
onUpdateMinWidth?: any;
|
|
12
|
+
isInNewRow?: any;
|
|
12
13
|
}) => void;
|
|
13
14
|
/**
|
|
14
15
|
* 查找最近的父级className
|
|
@@ -51,7 +51,8 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
51
51
|
diffToolTip = _ref2.diffToolTip,
|
|
52
52
|
wrapToolTipProps = _ref2.wrapToolTipProps,
|
|
53
53
|
scroll = _ref2.scroll,
|
|
54
|
-
onUpdateMinWidth = _ref2.onUpdateMinWidth
|
|
54
|
+
onUpdateMinWidth = _ref2.onUpdateMinWidth,
|
|
55
|
+
isInNewRow = _ref2.isInNewRow;
|
|
55
56
|
var title = column.title,
|
|
56
57
|
valueType = column.valueType,
|
|
57
58
|
_column$format = column.format,
|
|
@@ -119,6 +120,7 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
119
120
|
var _value = isFn ? originalRender === null || originalRender === void 0 ? void 0 : originalRender(value, record !== null && record !== void 0 ? record : {}, index) : undefined;
|
|
120
121
|
var originalValue = getOriginalValue(value, record !== null && record !== void 0 ? record : {}, originalObj, rowKey, dataIndex);
|
|
121
122
|
var originalRenderValue = isFn ? originalRender === null || originalRender === void 0 ? void 0 : originalRender(originalValue, (_originalObj$record$r = originalObj === null || originalObj === void 0 ? void 0 : originalObj[record === null || record === void 0 ? void 0 : record[rowKey]]) !== null && _originalObj$record$r !== void 0 ? _originalObj$record$r : {}, index) : undefined;
|
|
123
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
122
124
|
return _jsx(RenderColumn, {
|
|
123
125
|
valueType: valueType,
|
|
124
126
|
originalValue: originalValue === undefined ? undefined : originalRenderValue,
|
|
@@ -129,7 +131,8 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
129
131
|
currentValue: _value,
|
|
130
132
|
originalDiffTip: _originalDiffTip,
|
|
131
133
|
toolTipProps: _toolTipProps,
|
|
132
|
-
minWidth: minWidth
|
|
134
|
+
minWidth: minWidth,
|
|
135
|
+
isInNewRowFlag: isInNewRowFlag
|
|
133
136
|
});
|
|
134
137
|
};
|
|
135
138
|
return;
|
|
@@ -171,6 +174,7 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
171
174
|
size: 8,
|
|
172
175
|
children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
|
|
173
176
|
});
|
|
177
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
174
178
|
return _jsx(RenderColumn, {
|
|
175
179
|
valueType: valueType,
|
|
176
180
|
originalValue: originalValue === undefined ? undefined : originalRenderValue,
|
|
@@ -181,7 +185,8 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
181
185
|
currentValue: renderValue,
|
|
182
186
|
originalDiffTip: _originalDiffTip,
|
|
183
187
|
toolTipProps: _toolTipProps,
|
|
184
|
-
minWidth: minWidth
|
|
188
|
+
minWidth: minWidth,
|
|
189
|
+
isInNewRowFlag: isInNewRowFlag
|
|
185
190
|
});
|
|
186
191
|
};
|
|
187
192
|
// 千分位, 千分位带CNY前缀
|
|
@@ -207,6 +212,7 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
207
212
|
children: "-"
|
|
208
213
|
});
|
|
209
214
|
}
|
|
215
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
210
216
|
return _jsx(RenderColumn, {
|
|
211
217
|
valueType: valueType,
|
|
212
218
|
originalValue: originalValue === undefined ? undefined : originalRenderValue,
|
|
@@ -217,7 +223,8 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
217
223
|
currentValue: renderValue,
|
|
218
224
|
originalDiffTip: _originalDiffTip,
|
|
219
225
|
toolTipProps: _toolTipProps,
|
|
220
|
-
minWidth: minWidth
|
|
226
|
+
minWidth: minWidth,
|
|
227
|
+
isInNewRowFlag: isInNewRowFlag
|
|
221
228
|
});
|
|
222
229
|
};
|
|
223
230
|
} else if (['datePicker', 'date', 'dateTime', 'dateStartTime', 'dateEndTime', 'dateStartEndTime'].includes(valueType)) {
|
|
@@ -266,6 +273,7 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
266
273
|
children: "-"
|
|
267
274
|
});
|
|
268
275
|
}
|
|
276
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
269
277
|
return _jsx(RenderColumn, {
|
|
270
278
|
valueType: valueType,
|
|
271
279
|
originalValue: originalValue === undefined ? undefined : originalRenderValue,
|
|
@@ -276,7 +284,8 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
276
284
|
currentValue: renderValue,
|
|
277
285
|
originalDiffTip: _originalDiffTip,
|
|
278
286
|
toolTipProps: _toolTipProps,
|
|
279
|
-
minWidth: minWidth
|
|
287
|
+
minWidth: minWidth,
|
|
288
|
+
isInNewRowFlag: isInNewRowFlag
|
|
280
289
|
});
|
|
281
290
|
};
|
|
282
291
|
} else if (['enumName', 'enumCodeName'].includes(valueType)) {
|
|
@@ -305,6 +314,7 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
305
314
|
size: 8,
|
|
306
315
|
children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
|
|
307
316
|
});
|
|
317
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
308
318
|
return _jsx(RenderColumn, {
|
|
309
319
|
valueType: valueType,
|
|
310
320
|
originalValue: originalValue === undefined ? undefined : originalRenderValue,
|
|
@@ -315,7 +325,8 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
315
325
|
currentValue: renderValue,
|
|
316
326
|
originalDiffTip: _originalDiffTip,
|
|
317
327
|
toolTipProps: _toolTipProps,
|
|
318
|
-
minWidth: minWidth
|
|
328
|
+
minWidth: minWidth,
|
|
329
|
+
isInNewRowFlag: isInNewRowFlag
|
|
319
330
|
});
|
|
320
331
|
};
|
|
321
332
|
} else if (precision || prefix || suffix) {
|
|
@@ -338,6 +349,7 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
338
349
|
children: "-"
|
|
339
350
|
});
|
|
340
351
|
}
|
|
352
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
341
353
|
return _jsx(RenderColumn, {
|
|
342
354
|
valueType: valueType,
|
|
343
355
|
originalValue: originalValue === undefined ? undefined : originalRenderValue,
|
|
@@ -348,7 +360,8 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
348
360
|
currentValue: renderValue,
|
|
349
361
|
originalDiffTip: _originalDiffTip,
|
|
350
362
|
toolTipProps: _toolTipProps,
|
|
351
|
-
minWidth: minWidth
|
|
363
|
+
minWidth: minWidth,
|
|
364
|
+
isInNewRowFlag: isInNewRowFlag
|
|
352
365
|
});
|
|
353
366
|
};
|
|
354
367
|
} else if (valueType === 'address') {
|
|
@@ -392,21 +405,24 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
392
405
|
value: realValue,
|
|
393
406
|
tooltip: false
|
|
394
407
|
});
|
|
408
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
395
409
|
return _jsx(RenderColumn, {
|
|
396
410
|
valueType: valueType,
|
|
397
411
|
originalValue: originalRealValue === undefined ? undefined : originalRenderValue,
|
|
398
412
|
ellipsis: ellipsis !== null && ellipsis !== void 0 ? ellipsis : true,
|
|
399
413
|
width: width,
|
|
400
414
|
node: renderNode,
|
|
401
|
-
value:
|
|
415
|
+
value: renderValue,
|
|
402
416
|
currentValue: renderValue,
|
|
403
417
|
originalDiffTip: _originalDiffTip,
|
|
404
418
|
toolTipProps: _toolTipProps,
|
|
405
|
-
minWidth: minWidth
|
|
419
|
+
minWidth: minWidth,
|
|
420
|
+
isInNewRowFlag: isInNewRowFlag
|
|
406
421
|
});
|
|
407
422
|
};
|
|
408
423
|
} else if (copyable) {
|
|
409
424
|
column.render = function (value, record, index) {
|
|
425
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
410
426
|
return _jsxs(_Space, {
|
|
411
427
|
size: 8,
|
|
412
428
|
children: [prefixNode(value, record, index), _jsx(RenderColumn, {
|
|
@@ -418,7 +434,8 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
418
434
|
value: value,
|
|
419
435
|
currentValue: value,
|
|
420
436
|
toolTipProps: _toolTipProps,
|
|
421
|
-
minWidth: minWidth
|
|
437
|
+
minWidth: minWidth,
|
|
438
|
+
isInNewRowFlag: isInNewRowFlag
|
|
422
439
|
}), suffixNode(value, record, index)]
|
|
423
440
|
});
|
|
424
441
|
};
|
|
@@ -433,6 +450,7 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
433
450
|
children: "-"
|
|
434
451
|
});
|
|
435
452
|
}
|
|
453
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
436
454
|
return _jsxs(_Space, {
|
|
437
455
|
size: 8,
|
|
438
456
|
children: [prefixNode(value, record, index), _jsx(RenderColumn, {
|
|
@@ -445,7 +463,8 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
445
463
|
currentValue: value || '-',
|
|
446
464
|
originalDiffTip: _originalDiffTip,
|
|
447
465
|
toolTipProps: _toolTipProps,
|
|
448
|
-
minWidth: minWidth
|
|
466
|
+
minWidth: minWidth,
|
|
467
|
+
isInNewRowFlag: isInNewRowFlag
|
|
449
468
|
}), suffixNode(value, record, index)]
|
|
450
469
|
});
|
|
451
470
|
};
|
|
@@ -464,6 +483,7 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
464
483
|
children: "-"
|
|
465
484
|
});
|
|
466
485
|
}
|
|
486
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
467
487
|
return _jsx(RenderColumn, {
|
|
468
488
|
valueType: valueType,
|
|
469
489
|
originalValue: originalValue === undefined ? undefined : originalValue || '-',
|
|
@@ -474,7 +494,8 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
|
474
494
|
currentValue: value || '-',
|
|
475
495
|
originalDiffTip: _originalDiffTip,
|
|
476
496
|
toolTipProps: _toolTipProps,
|
|
477
|
-
minWidth: minWidth
|
|
497
|
+
minWidth: minWidth,
|
|
498
|
+
isInNewRowFlag: isInNewRowFlag
|
|
478
499
|
});
|
|
479
500
|
};
|
|
480
501
|
}
|
|
@@ -492,14 +513,14 @@ export var getParentElement = function getParentElement(element, name) {
|
|
|
492
513
|
if (!element || !name) {
|
|
493
514
|
return result;
|
|
494
515
|
}
|
|
495
|
-
var
|
|
516
|
+
var searchDom = function searchDom(element, name) {
|
|
496
517
|
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'className';
|
|
497
518
|
if (element.parentElement[type] === name) {
|
|
498
519
|
result = element.parentElement;
|
|
499
520
|
return false;
|
|
500
521
|
}
|
|
501
|
-
|
|
522
|
+
searchDom(element.parentElement, name, type = 'className');
|
|
502
523
|
};
|
|
503
|
-
|
|
524
|
+
searchDom(element, name, type = 'className');
|
|
504
525
|
return result;
|
|
505
526
|
};
|
package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js
CHANGED
|
@@ -74,7 +74,7 @@ var DndWrapper = function DndWrapper(_ref2) {
|
|
|
74
74
|
onDragStartGuard = _ref2.onDragStartGuard,
|
|
75
75
|
onDragEndGuard = _ref2.onDragEndGuard;
|
|
76
76
|
var onDragStart = /*#__PURE__*/function () {
|
|
77
|
-
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref3) {
|
|
77
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref3) {
|
|
78
78
|
var active, _transformedValue, activeObject;
|
|
79
79
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
80
80
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -105,7 +105,7 @@ var DndWrapper = function DndWrapper(_ref2) {
|
|
|
105
105
|
};
|
|
106
106
|
}();
|
|
107
107
|
var onDragEnd = /*#__PURE__*/function () {
|
|
108
|
-
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref5) {
|
|
108
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref5) {
|
|
109
109
|
var active, over, transformedValue, activeObject, overObject, activeLevel, activeParentId, overLevel, overParentId, nextDataSource, _flatTree, activeIndex, overIndex, nextValue;
|
|
110
110
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
111
111
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -9,7 +9,7 @@ export var getRowKey = function getRowKey(rowKey, record) {
|
|
|
9
9
|
}
|
|
10
10
|
return key;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
12
|
+
export var addLevelAndParentId = function addLevelAndParentId(tree, rowKey) {
|
|
13
13
|
var currentLevel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
14
14
|
var currentParentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
15
15
|
return tree.map(function (node) {
|
|
@@ -18,12 +18,11 @@ var _addLevelAndParentId = function addLevelAndParentId(tree, rowKey) {
|
|
|
18
18
|
newNode.parentId = currentParentId;
|
|
19
19
|
newNode.rowKey = getRowKey(rowKey, node);
|
|
20
20
|
if (node.children) {
|
|
21
|
-
newNode.children =
|
|
21
|
+
newNode.children = addLevelAndParentId(node.children, rowKey, currentLevel + 1, newNode.rowKey);
|
|
22
22
|
}
|
|
23
23
|
return newNode;
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
|
-
export { _addLevelAndParentId as addLevelAndParentId };
|
|
27
26
|
export function getFinalChildrenKey(tree, meta, options) {
|
|
28
27
|
if (typeof options.getChildrenKey === 'function') {
|
|
29
28
|
var dynamicChildrenKey = options.getChildrenKey(tree, meta);
|
|
@@ -34,7 +33,7 @@ export function getFinalChildrenKey(tree, meta, options) {
|
|
|
34
33
|
return options.childrenKey;
|
|
35
34
|
}
|
|
36
35
|
// 前置深度优先遍历
|
|
37
|
-
var
|
|
36
|
+
var treeNodePreImpl = function treeNodePreImpl(treeItem, callback, options) {
|
|
38
37
|
var callbackResult = callback(treeItem, options);
|
|
39
38
|
if (callbackResult) {
|
|
40
39
|
return treeItem;
|
|
@@ -46,7 +45,7 @@ var _treeNodePreImpl = function treeNodePreImpl(treeItem, callback, options) {
|
|
|
46
45
|
}
|
|
47
46
|
for (var i = 0, count = children.length; i < count; i++) {
|
|
48
47
|
var childItem = children[i];
|
|
49
|
-
var findOne =
|
|
48
|
+
var findOne = treeNodePreImpl(childItem, callback, _objectSpread(_objectSpread({}, options), {}, {
|
|
50
49
|
parents: [].concat(_toConsumableArray(options.parents), [treeItem]),
|
|
51
50
|
depth: options.depth + 1
|
|
52
51
|
}));
|
|
@@ -57,7 +56,7 @@ var _treeNodePreImpl = function treeNodePreImpl(treeItem, callback, options) {
|
|
|
57
56
|
return undefined;
|
|
58
57
|
};
|
|
59
58
|
var treeNodeStrategies = {
|
|
60
|
-
pre:
|
|
59
|
+
pre: treeNodePreImpl
|
|
61
60
|
};
|
|
62
61
|
export function treeNodeFind(tree, callback, options) {
|
|
63
62
|
var _options$childrenKey, _options$strategy;
|
|
@@ -122,7 +121,7 @@ export function createTreeFromArray(array, options) {
|
|
|
122
121
|
return result;
|
|
123
122
|
}
|
|
124
123
|
// 前置遍历
|
|
125
|
-
var
|
|
124
|
+
var treeForEachPreImpl = function treeForEachPreImpl(treeItem, callback, options) {
|
|
126
125
|
callback(treeItem, options);
|
|
127
126
|
var finalChildrenKey = getFinalChildrenKey(treeItem, options, options);
|
|
128
127
|
var children = treeItem === null || treeItem === void 0 ? void 0 : treeItem[finalChildrenKey];
|
|
@@ -132,12 +131,12 @@ var _treeForEachPreImpl = function treeForEachPreImpl(treeItem, callback, option
|
|
|
132
131
|
depth: options.depth + 1
|
|
133
132
|
});
|
|
134
133
|
children.forEach(function (childItem) {
|
|
135
|
-
|
|
134
|
+
treeForEachPreImpl(childItem, callback, nextLevelOptions);
|
|
136
135
|
});
|
|
137
136
|
}
|
|
138
137
|
};
|
|
139
138
|
var treeForEachStrategies = {
|
|
140
|
-
pre:
|
|
139
|
+
pre: treeForEachPreImpl
|
|
141
140
|
};
|
|
142
141
|
export function treeForEach(tree, callback, options) {
|
|
143
142
|
var _options$childrenKey2, _options$strategy2;
|
|
@@ -24,14 +24,15 @@ var RenderColumn = function RenderColumn(props) {
|
|
|
24
24
|
originalDiffTip = props.originalDiffTip,
|
|
25
25
|
_props$toolTipProps = props.toolTipProps,
|
|
26
26
|
toolTipProps = _props$toolTipProps === void 0 ? {} : _props$toolTipProps,
|
|
27
|
-
minWidth = props.minWidth
|
|
27
|
+
minWidth = props.minWidth,
|
|
28
|
+
isInNewRowFlag = props.isInNewRowFlag;
|
|
28
29
|
var _useSetState = useSetState({
|
|
29
30
|
tooltip: false
|
|
30
31
|
}),
|
|
31
32
|
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
32
33
|
tooltip = _useSetState2[0].tooltip,
|
|
33
34
|
setState = _useSetState2[1];
|
|
34
|
-
if (originalValue !== undefined) {
|
|
35
|
+
if (originalValue !== undefined && !isInNewRowFlag) {
|
|
35
36
|
var renderNode = value ? node : '-';
|
|
36
37
|
if (ellipsis || originalDiffTip) {
|
|
37
38
|
if (ellipsis) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const RenderFooter: (props: any) =>
|
|
1
|
+
declare const RenderFooter: (props: any) => JSX.Element;
|
|
2
2
|
export default RenderFooter;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const RenderTableHeader: (props: any) =>
|
|
1
|
+
declare const RenderTableHeader: (props: any) => JSX.Element;
|
|
2
2
|
export default RenderTableHeader;
|
|
@@ -276,7 +276,7 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
|
276
276
|
}
|
|
277
277
|
};
|
|
278
278
|
var handleRefresh = /*#__PURE__*/function () {
|
|
279
|
-
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
279
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
280
280
|
var res;
|
|
281
281
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
282
282
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -388,7 +388,7 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
|
388
388
|
total: total
|
|
389
389
|
}),
|
|
390
390
|
onSelect: function () {
|
|
391
|
-
var _onSelect = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(changeableRowKeys) {
|
|
391
|
+
var _onSelect = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(changeableRowKeys) {
|
|
392
392
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
393
393
|
while (1) switch (_context2.prev = _context2.next) {
|
|
394
394
|
case 0:
|
|
@@ -412,7 +412,7 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
|
412
412
|
key: 'uncheckAll',
|
|
413
413
|
text: locale === null || locale === void 0 ? void 0 : (_locale$ProTable4 = locale.ProTable) === null || _locale$ProTable4 === void 0 ? void 0 : _locale$ProTable4.deselect,
|
|
414
414
|
onSelect: function () {
|
|
415
|
-
var _onSelect2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
415
|
+
var _onSelect2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
416
416
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
417
417
|
while (1) switch (_context3.prev = _context3.next) {
|
|
418
418
|
case 0:
|
package/es/ProTable/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const defaultPage: {
|
|
|
5
5
|
pageNum: number;
|
|
6
6
|
pageSize: number;
|
|
7
7
|
};
|
|
8
|
-
declare function ProTable(props: ProTableProps):
|
|
8
|
+
declare function ProTable(props: ProTableProps): JSX.Element;
|
|
9
9
|
declare namespace ProTable {
|
|
10
10
|
var defaultProps: {
|
|
11
11
|
quickConfig: boolean;
|
package/es/ProTable/index.js
CHANGED
|
@@ -183,6 +183,11 @@ function ProTable(props) {
|
|
|
183
183
|
setCurColumns(nextColumns);
|
|
184
184
|
};
|
|
185
185
|
};
|
|
186
|
+
var _rowClassName = function _rowClassName(record, index) {
|
|
187
|
+
if (originalDataSource && !originalObj.hasOwnProperty(get(record, 'rowKey'))) {
|
|
188
|
+
return 'new-cell';
|
|
189
|
+
}
|
|
190
|
+
};
|
|
186
191
|
var columns = useMemo(function () {
|
|
187
192
|
var newColumns = curColumns.map(function (item, index) {
|
|
188
193
|
var _propsColumnObj$getCo2;
|
|
@@ -215,11 +220,12 @@ function ProTable(props) {
|
|
|
215
220
|
scroll: _scroll,
|
|
216
221
|
onUpdateMinWidth: function onUpdateMinWidth(w) {
|
|
217
222
|
curColumns[index].minWidth = w;
|
|
218
|
-
}
|
|
223
|
+
},
|
|
224
|
+
isInNewRow: _rowClassName
|
|
219
225
|
});
|
|
220
226
|
});
|
|
221
227
|
return newColumns;
|
|
222
|
-
}, [curColumns, handleResize, _scroll]);
|
|
228
|
+
}, [curColumns, handleResize, _scroll, originalDataSource, originalObj, _rowClassName]);
|
|
223
229
|
var _columns = useMemo(function () {
|
|
224
230
|
return columns === null || columns === void 0 ? void 0 : columns.filter(function (item, index) {
|
|
225
231
|
var show = item.show;
|
|
@@ -240,7 +246,7 @@ function ProTable(props) {
|
|
|
240
246
|
_scroll = props === null || props === void 0 ? void 0 : props.scroll;
|
|
241
247
|
}
|
|
242
248
|
var handleColumnConfig = /*#__PURE__*/function () {
|
|
243
|
-
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(checkList) {
|
|
249
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(checkList) {
|
|
244
250
|
var newColumns, _columnConfig$onColum, catchColumns;
|
|
245
251
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
246
252
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -349,7 +355,7 @@ function ProTable(props) {
|
|
|
349
355
|
return _rowSelection;
|
|
350
356
|
};
|
|
351
357
|
var onDataSourceChange = /*#__PURE__*/function () {
|
|
352
|
-
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(nextDataSource) {
|
|
358
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(nextDataSource) {
|
|
353
359
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
354
360
|
while (1) switch (_context2.prev = _context2.next) {
|
|
355
361
|
case 0:
|
|
@@ -368,11 +374,6 @@ function ProTable(props) {
|
|
|
368
374
|
return _ref7.apply(this, arguments);
|
|
369
375
|
};
|
|
370
376
|
}();
|
|
371
|
-
var _rowClassName = function _rowClassName(record, index) {
|
|
372
|
-
if (originalDataSource && !originalObj.hasOwnProperty(get(record, 'rowKey'))) {
|
|
373
|
-
return 'new-cell';
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
377
|
var TableComponent = draggable ? DraggableTable : BaseTable;
|
|
377
378
|
// 标记样式
|
|
378
379
|
var tagStyle = {
|
|
@@ -272,8 +272,22 @@
|
|
|
272
272
|
.@{ant-prefix}-table-cell .varied-cell {
|
|
273
273
|
margin-left: -8px;
|
|
274
274
|
padding: var(--zaui-space-size-xs, 4px) var(--zaui-space-size-sm, 8px);
|
|
275
|
+
|
|
275
276
|
background: var(--zaui-contract-bg; #fffaa1) !important;
|
|
276
277
|
border-radius: var(--zaui-border-radius, 8px);
|
|
278
|
+
.pro-form-view-container {
|
|
279
|
+
overflow: hidden;
|
|
280
|
+
white-space: nowrap;
|
|
281
|
+
text-overflow: ellipsis;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.@{ant-prefix}-table-cell .@{ant-prefix}-typography-ellipsis {
|
|
286
|
+
.pro-form-view-container {
|
|
287
|
+
overflow: hidden;
|
|
288
|
+
white-space: nowrap;
|
|
289
|
+
text-overflow: ellipsis;
|
|
290
|
+
}
|
|
277
291
|
}
|
|
278
292
|
|
|
279
293
|
.varied-cell.empty-cell {
|