@zat-design/sisyphus-react 3.7.3-beta.2 → 3.7.3-beta.21
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 +92 -2
- package/dist/less.esm.css +89 -2
- package/es/ProAction/index.js +4 -4
- package/es/ProDownload/index.d.ts +1 -1
- package/es/ProEditTable/components/ActionButton/index.d.ts +1 -1
- 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/{ListChanged.d.ts → ListChangedWrapper.d.ts} +4 -3
- package/es/ProEditTable/components/RenderField/{ListChanged.js → ListChangedWrapper.js} +22 -10
- package/es/ProEditTable/components/RenderField/index.d.ts +1 -1
- package/es/ProEditTable/components/RenderField/index.js +3 -3
- package/es/ProEditTable/components/RenderToolbar/index.d.ts +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/tools.js +3 -3
- package/es/ProEnum/components/Group.d.ts +1 -1
- package/es/ProEnum/components/Group.js +10 -2
- package/es/ProEnum/components/Tag.d.ts +1 -1
- package/es/ProEnum/index.d.ts +2 -2
- package/es/ProEnum/index.js +5 -4
- package/es/ProEnum/style/index.less +14 -4
- 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/Container/index.js +5 -3
- package/es/ProForm/components/combination/Container/propsType.d.ts +2 -1
- package/es/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/index.js +7 -7
- package/es/ProForm/components/combination/ProModalSelect/index.js +50 -45
- package/es/ProForm/components/combination/ProNumberRange/index.js +3 -1
- 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/ProRangeBox/index.d.ts +2 -1
- package/es/ProForm/components/render/ChangedWrapper.d.ts +17 -0
- package/es/ProForm/components/render/ChangedWrapper.js +108 -0
- package/es/ProForm/components/render/Render.js +7 -8
- package/es/ProForm/components/render/RenderFields.d.ts +2 -3
- package/es/ProForm/components/render/RenderFields.js +3 -4
- package/es/ProForm/components/render/propsType.d.ts +4 -3
- package/es/ProForm/index.js +3 -6
- package/es/ProForm/propsType.d.ts +13 -2
- package/es/ProForm/style/index.less +102 -4
- package/es/ProForm/utils/diffOriginal.d.ts +4 -4
- package/es/ProForm/utils/diffOriginal.js +18 -7
- package/es/ProForm/utils/index.js +10 -14
- package/es/ProForm/utils/transformValue.js +17 -11
- 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/ProSelect/index.js +3 -4
- package/es/ProSelect/utils/index.js +5 -4
- 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.d.ts +1 -1
- package/es/ProStep/components/Listener/index.js +5 -2
- package/es/ProStep/components/Step/index.d.ts +1 -1
- package/es/ProStep/index.d.ts +3 -3
- package/es/ProStep/index.js +24 -17
- package/es/ProTable/components/FormatColumn/index.d.ts +7 -1
- package/es/ProTable/components/FormatColumn/index.js +17 -11
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +1 -1
- 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/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/index.d.ts +1 -1
- package/es/ProTable/index.js +30 -13
- package/es/ProTable/propsType.d.ts +14 -1
- package/es/ProTable/style/index.less +1 -1
- 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 +4 -0
- package/es/ProTree/components/AdaptiveTooltip.js +55 -0
- package/es/ProTree/components/CloseIcon.d.ts +2 -1
- package/es/ProTree/components/List.d.ts +1 -1
- package/es/ProTree/components/List.js +15 -3
- package/es/ProTree/components/ProTree.d.ts +1 -1
- package/es/ProTree/components/ProTreeSelect/index.d.ts +1 -1
- package/es/ProTree/components/ProTreeSelect/index.js +43 -23
- package/es/ProTree/components/ProTreeSelect/propsType.d.ts +2 -0
- package/es/ProTree/components/ProTreeSelect/style/index.less +2 -2
- package/es/ProTree/components/SearchTitle.d.ts +3 -1
- package/es/ProTree/components/SearchTitle.js +17 -8
- package/es/ProTree/components/Tree.d.ts +1 -1
- package/es/ProTree/components/Tree.js +3 -3
- package/es/ProTree/index.d.ts +1 -1
- package/es/ProTree/style/index.less +14 -0
- 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 +21 -23
- package/es/ProTreeModal/components/Trigger.d.ts +1 -1
- package/es/ProTreeModal/index.d.ts +1 -1
- package/es/ProTreeModal/index.js +62 -7
- package/es/ProTreeModal/utils.d.ts +1 -0
- package/es/ProTreeModal/utils.js +30 -12
- package/es/ProUpload/components/DraggableUploadListItem.d.ts +1 -1
- package/es/style/theme/antd.less +5 -0
- package/es/style/theme/index.less +2 -1
- package/es/style/theme/tokens.less +1 -0
- package/es/utils/index.d.ts +2 -0
- package/es/utils/index.js +13 -0
- package/lib/ProAction/index.js +4 -4
- package/lib/ProDownload/index.d.ts +1 -1
- package/lib/ProEditTable/components/ActionButton/index.d.ts +1 -1
- 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/{ListChanged.d.ts → ListChangedWrapper.d.ts} +4 -3
- package/lib/ProEditTable/components/RenderField/{ListChanged.js → ListChangedWrapper.js} +25 -11
- package/lib/ProEditTable/components/RenderField/index.d.ts +1 -1
- package/lib/ProEditTable/components/RenderField/index.js +3 -3
- package/lib/ProEditTable/components/RenderToolbar/index.d.ts +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/tools.js +3 -3
- package/lib/ProEnum/components/Group.d.ts +1 -1
- package/lib/ProEnum/components/Group.js +10 -2
- package/lib/ProEnum/components/Tag.d.ts +1 -1
- package/lib/ProEnum/index.d.ts +2 -2
- package/lib/ProEnum/index.js +5 -4
- package/lib/ProEnum/style/index.less +14 -4
- 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/Container/index.js +5 -3
- package/lib/ProForm/components/combination/Container/propsType.d.ts +2 -1
- package/lib/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/index.js +7 -7
- package/lib/ProForm/components/combination/ProModalSelect/index.js +49 -44
- package/lib/ProForm/components/combination/ProNumberRange/index.js +3 -1
- 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/ProRangeBox/index.d.ts +2 -1
- package/lib/ProForm/components/render/ChangedWrapper.d.ts +17 -0
- package/lib/ProForm/components/render/ChangedWrapper.js +113 -0
- package/lib/ProForm/components/render/Render.js +7 -8
- package/lib/ProForm/components/render/RenderFields.d.ts +2 -3
- package/lib/ProForm/components/render/RenderFields.js +3 -4
- package/lib/ProForm/components/render/propsType.d.ts +4 -3
- package/lib/ProForm/index.js +3 -6
- package/lib/ProForm/propsType.d.ts +13 -2
- package/lib/ProForm/style/index.less +102 -4
- package/lib/ProForm/utils/diffOriginal.d.ts +4 -4
- package/lib/ProForm/utils/diffOriginal.js +18 -7
- package/lib/ProForm/utils/index.js +10 -10
- package/lib/ProForm/utils/transformValue.js +17 -11
- 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/ProSelect/index.js +3 -4
- package/lib/ProSelect/utils/index.js +5 -4
- 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.d.ts +1 -1
- package/lib/ProStep/components/Listener/index.js +5 -2
- package/lib/ProStep/components/Step/index.d.ts +1 -1
- package/lib/ProStep/index.d.ts +3 -3
- package/lib/ProStep/index.js +24 -17
- package/lib/ProTable/components/FormatColumn/index.d.ts +7 -1
- package/lib/ProTable/components/FormatColumn/index.js +17 -11
- package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +1 -1
- 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/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/index.d.ts +1 -1
- package/lib/ProTable/index.js +30 -13
- package/lib/ProTable/propsType.d.ts +14 -1
- package/lib/ProTable/style/index.less +1 -1
- 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 +4 -0
- package/lib/ProTree/components/AdaptiveTooltip.js +61 -0
- package/lib/ProTree/components/CloseIcon.d.ts +2 -1
- package/lib/ProTree/components/List.d.ts +1 -1
- package/lib/ProTree/components/List.js +15 -3
- package/lib/ProTree/components/ProTree.d.ts +1 -1
- package/lib/ProTree/components/ProTreeSelect/index.d.ts +1 -1
- package/lib/ProTree/components/ProTreeSelect/index.js +43 -23
- package/lib/ProTree/components/ProTreeSelect/propsType.d.ts +2 -0
- package/lib/ProTree/components/ProTreeSelect/style/index.less +2 -2
- package/lib/ProTree/components/SearchTitle.d.ts +3 -1
- package/lib/ProTree/components/SearchTitle.js +19 -7
- package/lib/ProTree/components/Tree.d.ts +1 -1
- package/lib/ProTree/components/Tree.js +3 -3
- package/lib/ProTree/index.d.ts +1 -1
- package/lib/ProTree/style/index.less +14 -0
- 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 +21 -23
- package/lib/ProTreeModal/components/Trigger.d.ts +1 -1
- package/lib/ProTreeModal/index.d.ts +1 -1
- package/lib/ProTreeModal/index.js +61 -6
- package/lib/ProTreeModal/utils.d.ts +1 -0
- package/lib/ProTreeModal/utils.js +31 -11
- package/lib/ProUpload/components/DraggableUploadListItem.d.ts +1 -1
- package/lib/style/theme/antd.less +5 -0
- package/lib/style/theme/index.less +2 -1
- package/lib/style/theme/tokens.less +1 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +19 -0
- package/package.json +1 -1
- package/.vscode/extensions.json +0 -5
- package/es/ProForm/components/render/Changed.d.ts +0 -14
- package/es/ProForm/components/render/Changed.js +0 -64
- package/lib/ProForm/components/render/Changed.d.ts +0 -14
- package/lib/ProForm/components/render/Changed.js +0 -69
- /package/es/ProForm/utils/{useChanged.d.ts → _useChanged.d.ts} +0 -0
- /package/es/ProForm/utils/{useChanged.js → _useChanged.js} +0 -0
- /package/es/ProForm/utils/{useListChanged.d.ts → _useListChanged.d.ts} +0 -0
- /package/es/ProForm/utils/{useListChanged.js → _useListChanged.js} +0 -0
- /package/lib/ProForm/utils/{useChanged.d.ts → _useChanged.d.ts} +0 -0
- /package/lib/ProForm/utils/{useChanged.js → _useChanged.js} +0 -0
- /package/lib/ProForm/utils/{useListChanged.d.ts → _useListChanged.d.ts} +0 -0
- /package/lib/ProForm/utils/{useListChanged.js → _useListChanged.js} +0 -0
|
@@ -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;
|
package/es/ProSelect/index.js
CHANGED
|
@@ -296,8 +296,8 @@ export var ProSelect = function ProSelect(props, ref) {
|
|
|
296
296
|
showArrow: true,
|
|
297
297
|
loading: fetchFunction === null || fetchFunction === void 0 ? void 0 : fetchFunction.loading,
|
|
298
298
|
onChange: handleChange,
|
|
299
|
-
optionLabelProp:
|
|
300
|
-
|
|
299
|
+
optionLabelProp: (otherProps === null || otherProps === void 0 ? void 0 : otherProps.isDiffChange) ? 'label' : 'children',
|
|
300
|
+
// optionLabelProp="label" // 解决warning报错,添加默认值
|
|
301
301
|
showSearch: true,
|
|
302
302
|
filterOption: isFunction(_onSearch) ? false : function (input, option) {
|
|
303
303
|
var _option$children, _option$children$prop;
|
|
@@ -314,16 +314,15 @@ export var ProSelect = function ProSelect(props, ref) {
|
|
|
314
314
|
value: transformValue(),
|
|
315
315
|
children: Array.isArray(newSelectList) && newSelectList.map(function (item) {
|
|
316
316
|
return _jsx(Option, {
|
|
317
|
+
label: item[label],
|
|
317
318
|
value: item[code],
|
|
318
319
|
record: item,
|
|
319
320
|
disabled: !!item.disabled,
|
|
320
321
|
children: _jsx(TooltipOption, {
|
|
321
322
|
title: OptionRender ? OptionRender(item) : selectProps.showCodeName ? "".concat(item[code], "-").concat(item[label]) : item[label],
|
|
322
323
|
children: OptionRender ? _jsx("span", {
|
|
323
|
-
title: OptionRender(item),
|
|
324
324
|
children: OptionRender(item)
|
|
325
325
|
}) : _jsx("span", {
|
|
326
|
-
title: selectProps.showCodeName ? "".concat(item[code], "-").concat(item[label]) : item[label],
|
|
327
326
|
children: selectProps.showCodeName ? "".concat(item[code], "-").concat(item[label]) : item[label]
|
|
328
327
|
})
|
|
329
328
|
}, item[code])
|
|
@@ -30,7 +30,7 @@ var findSelectNameValues = function findSelectNameValues(_ref) {
|
|
|
30
30
|
_iterator.f();
|
|
31
31
|
}
|
|
32
32
|
if (mode === 'multiple') {
|
|
33
|
-
selectValues = [].concat(_toConsumableArray(selectValues), _toConsumableArray(result));
|
|
33
|
+
selectValues = [].concat(_toConsumableArray(selectValues), _toConsumableArray(result || []));
|
|
34
34
|
} else {
|
|
35
35
|
selectValues.push(result);
|
|
36
36
|
}
|
|
@@ -53,13 +53,14 @@ export var getSelectList = function getSelectList(_ref2) {
|
|
|
53
53
|
if (!otherProps) {
|
|
54
54
|
return null;
|
|
55
55
|
}
|
|
56
|
-
var
|
|
56
|
+
var name = otherProps.name,
|
|
57
|
+
listName = otherProps.listName,
|
|
57
58
|
form = otherProps.form;
|
|
58
59
|
var firstNumberIndex = listName.lastIndexOf(listName.findLast(function (item) {
|
|
59
60
|
return typeof item === 'number';
|
|
60
61
|
}));
|
|
61
|
-
var fatherName = listName.slice(0, firstNumberIndex);
|
|
62
|
-
var selectName = listName.slice(firstNumberIndex + 1);
|
|
62
|
+
var fatherName = (name || listName).slice(0, firstNumberIndex);
|
|
63
|
+
var selectName = (name || listName).slice(firstNumberIndex + 1);
|
|
63
64
|
return findSelectNameValues({
|
|
64
65
|
list: form.getFieldValue(fatherName) || [],
|
|
65
66
|
selectName: selectName,
|
|
@@ -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;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const _default: ({ children, delayTime, ...props }: any) => React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
2
|
+
declare const _default: ({ children, delayTime, excludes, ...props }: any) => React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
3
3
|
export default _default;
|
|
@@ -2,13 +2,14 @@ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["children", "delayTime"];
|
|
5
|
+
var _excluded = ["children", "delayTime", "excludes"];
|
|
6
6
|
import { throttle } from 'lodash';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { useStep } from '../../index';
|
|
9
9
|
export default (function (_ref) {
|
|
10
10
|
var children = _ref.children,
|
|
11
11
|
delayTime = _ref.delayTime,
|
|
12
|
+
excludes = _ref.excludes,
|
|
12
13
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
14
|
var _useStep = useStep(),
|
|
14
15
|
notify = _useStep.notify;
|
|
@@ -20,7 +21,9 @@ export default (function (_ref) {
|
|
|
20
21
|
case 0:
|
|
21
22
|
localStorage.setItem('cache-pro-step', '');
|
|
22
23
|
_context.next = 3;
|
|
23
|
-
return notify === null || notify === void 0 ? void 0 : notify(
|
|
24
|
+
return notify === null || notify === void 0 ? void 0 : notify({
|
|
25
|
+
excludes: excludes
|
|
26
|
+
});
|
|
24
27
|
case 3:
|
|
25
28
|
values = _context.sent;
|
|
26
29
|
setTimeout(function () {
|
|
@@ -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) =>
|
|
10
|
-
Listener: ({ children, delayTime, ...props }: any) => import("react").DetailedReactHTMLElement<any, HTMLElement>;
|
|
9
|
+
Item: ({ id, title, collapse: collapseItem, children, ...restProps }: import("./propsType").ProStepItem) => JSX.Element;
|
|
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
|
@@ -128,47 +128,54 @@ 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() {
|
|
132
|
-
var events, res, nextErrorCollection;
|
|
131
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
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) {
|
|
135
135
|
case 0:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
_ref7 = params || {}, excludes = _ref7.excludes;
|
|
137
|
+
triggerIds = Object.keys(registerMap.current); // 排除指定模块不触发校验
|
|
138
|
+
if (excludes === null || excludes === void 0 ? void 0 : excludes.length) {
|
|
139
|
+
triggerIds = triggerIds.filter(function (id) {
|
|
140
|
+
return !excludes.includes(id);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
events = triggerIds.map(function (id) {
|
|
144
|
+
var _registerMap$current$, _registerMap$current$2;
|
|
145
|
+
return (_registerMap$current$ = registerMap.current[id]) === null || _registerMap$current$ === void 0 ? void 0 : (_registerMap$current$2 = _registerMap$current$.subEvent) === null || _registerMap$current$2 === void 0 ? void 0 : _registerMap$current$2.call(_registerMap$current$);
|
|
139
146
|
});
|
|
140
|
-
_context2.next =
|
|
147
|
+
_context2.next = 6;
|
|
141
148
|
return Promise.all(events);
|
|
142
|
-
case
|
|
149
|
+
case 6:
|
|
143
150
|
res = _context2.sent;
|
|
144
151
|
nextErrorCollection = {};
|
|
145
|
-
|
|
146
|
-
var
|
|
147
|
-
errorFields =
|
|
152
|
+
triggerIds.forEach(function (id, index) {
|
|
153
|
+
var _ref8 = (res === null || res === void 0 ? void 0 : res[index]) || {},
|
|
154
|
+
errorFields = _ref8.errorFields;
|
|
148
155
|
nextErrorCollection[id] = (errorFields === null || errorFields === void 0 ? void 0 : errorFields.length) || 0;
|
|
149
156
|
});
|
|
150
157
|
setErrorCollection(nextErrorCollection);
|
|
151
158
|
return _context2.abrupt("return", res);
|
|
152
|
-
case
|
|
159
|
+
case 11:
|
|
153
160
|
case "end":
|
|
154
161
|
return _context2.stop();
|
|
155
162
|
}
|
|
156
163
|
}, _callee2);
|
|
157
164
|
}));
|
|
158
|
-
return function notify() {
|
|
165
|
+
return function notify(_x) {
|
|
159
166
|
return _ref6.apply(this, arguments);
|
|
160
167
|
};
|
|
161
168
|
}();
|
|
162
169
|
var triggerTo = /*#__PURE__*/function () {
|
|
163
|
-
var
|
|
170
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(keys) {
|
|
164
171
|
var events, result, nextErrorCollection;
|
|
165
172
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
166
173
|
while (1) switch (_context3.prev = _context3.next) {
|
|
167
174
|
case 0:
|
|
168
175
|
events = [];
|
|
169
176
|
keys === null || keys === void 0 ? void 0 : keys.forEach(function (key) {
|
|
170
|
-
var _registerMap$current, _registerMap$current
|
|
171
|
-
events.push(registerMap === null || registerMap === void 0 ? void 0 : (_registerMap$current = registerMap.current) === null || _registerMap$current === void 0 ? void 0 : (_registerMap$current$ = _registerMap$current[key]) === null || _registerMap$current$ === void 0 ? void 0 : (_registerMap$current$
|
|
177
|
+
var _registerMap$current, _registerMap$current$3, _registerMap$current$4;
|
|
178
|
+
events.push(registerMap === null || registerMap === void 0 ? void 0 : (_registerMap$current = registerMap.current) === null || _registerMap$current === void 0 ? void 0 : (_registerMap$current$3 = _registerMap$current[key]) === null || _registerMap$current$3 === void 0 ? void 0 : (_registerMap$current$4 = _registerMap$current$3.subEvent) === null || _registerMap$current$4 === void 0 ? void 0 : _registerMap$current$4.call(_registerMap$current$3));
|
|
172
179
|
});
|
|
173
180
|
_context3.next = 4;
|
|
174
181
|
return Promise.all(events);
|
|
@@ -190,8 +197,8 @@ var ProStep = function ProStep(_ref) {
|
|
|
190
197
|
}
|
|
191
198
|
}, _callee3);
|
|
192
199
|
}));
|
|
193
|
-
return function triggerTo(
|
|
194
|
-
return
|
|
200
|
+
return function triggerTo(_x2) {
|
|
201
|
+
return _ref9.apply(this, arguments);
|
|
195
202
|
};
|
|
196
203
|
}();
|
|
197
204
|
useDeepCompareEffect(function () {
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ProTableColumn } from '../../propsType';
|
|
3
|
-
export declare const formatColumn: (column
|
|
3
|
+
export declare const formatColumn: ({ column, originalObj, dataSourceObj, rowKey, diffToolTip, }: {
|
|
4
|
+
column: ProTableColumn;
|
|
5
|
+
originalObj: any;
|
|
6
|
+
dataSourceObj: any;
|
|
7
|
+
rowKey: any;
|
|
8
|
+
diffToolTip?: boolean;
|
|
9
|
+
}) => void;
|
|
4
10
|
/**
|
|
5
11
|
* 查找最近的父级className
|
|
6
12
|
* @param element 当前node节点
|
|
@@ -11,7 +11,12 @@ import RenderColumn from '../RenderColumn';
|
|
|
11
11
|
import { getDecimalDigits, getOriginalValue } from '../../utils';
|
|
12
12
|
import getEnumLabel from '../../../ProEnum/utils/getEnumLabel';
|
|
13
13
|
import ProForm from '../../../ProForm';
|
|
14
|
-
export var formatColumn = function formatColumn(
|
|
14
|
+
export var formatColumn = function formatColumn(_ref) {
|
|
15
|
+
var column = _ref.column,
|
|
16
|
+
originalObj = _ref.originalObj,
|
|
17
|
+
dataSourceObj = _ref.dataSourceObj,
|
|
18
|
+
rowKey = _ref.rowKey,
|
|
19
|
+
diffToolTip = _ref.diffToolTip;
|
|
15
20
|
var title = column.title,
|
|
16
21
|
valueType = column.valueType,
|
|
17
22
|
_column$format = column.format,
|
|
@@ -31,6 +36,7 @@ export var formatColumn = function formatColumn(column, originalObj, dataSourceO
|
|
|
31
36
|
originalDiffTip = _column$originalDiffT === void 0 ? true : _column$originalDiffT,
|
|
32
37
|
_column$toolTipProps = column.toolTipProps,
|
|
33
38
|
toolTipProps = _column$toolTipProps === void 0 ? {} : _column$toolTipProps;
|
|
39
|
+
var _originalDiffTip = diffToolTip !== null && diffToolTip !== void 0 ? diffToolTip : originalDiffTip;
|
|
34
40
|
// 前缀处理
|
|
35
41
|
var prefixNode = function prefixNode(value, record, index) {
|
|
36
42
|
if (!prefix) {
|
|
@@ -98,7 +104,7 @@ export var formatColumn = function formatColumn(column, originalObj, dataSourceO
|
|
|
98
104
|
node: node,
|
|
99
105
|
value: value,
|
|
100
106
|
currentValue: renderValue,
|
|
101
|
-
originalDiffTip:
|
|
107
|
+
originalDiffTip: _originalDiffTip,
|
|
102
108
|
toolTipProps: toolTipProps
|
|
103
109
|
});
|
|
104
110
|
};
|
|
@@ -128,7 +134,7 @@ export var formatColumn = function formatColumn(column, originalObj, dataSourceO
|
|
|
128
134
|
node: node,
|
|
129
135
|
value: value,
|
|
130
136
|
currentValue: renderValue,
|
|
131
|
-
originalDiffTip:
|
|
137
|
+
originalDiffTip: _originalDiffTip,
|
|
132
138
|
toolTipProps: toolTipProps
|
|
133
139
|
});
|
|
134
140
|
};
|
|
@@ -181,7 +187,7 @@ export var formatColumn = function formatColumn(column, originalObj, dataSourceO
|
|
|
181
187
|
node: node,
|
|
182
188
|
value: value,
|
|
183
189
|
currentValue: renderValue,
|
|
184
|
-
originalDiffTip:
|
|
190
|
+
originalDiffTip: _originalDiffTip,
|
|
185
191
|
toolTipProps: toolTipProps
|
|
186
192
|
});
|
|
187
193
|
};
|
|
@@ -219,7 +225,7 @@ export var formatColumn = function formatColumn(column, originalObj, dataSourceO
|
|
|
219
225
|
node: node,
|
|
220
226
|
value: value,
|
|
221
227
|
currentValue: renderValue,
|
|
222
|
-
originalDiffTip:
|
|
228
|
+
originalDiffTip: _originalDiffTip,
|
|
223
229
|
toolTipProps: toolTipProps
|
|
224
230
|
});
|
|
225
231
|
};
|
|
@@ -246,7 +252,7 @@ export var formatColumn = function formatColumn(column, originalObj, dataSourceO
|
|
|
246
252
|
node: node,
|
|
247
253
|
value: value,
|
|
248
254
|
currentValue: renderValue,
|
|
249
|
-
originalDiffTip:
|
|
255
|
+
originalDiffTip: _originalDiffTip,
|
|
250
256
|
toolTipProps: toolTipProps
|
|
251
257
|
});
|
|
252
258
|
};
|
|
@@ -323,7 +329,7 @@ export var formatColumn = function formatColumn(column, originalObj, dataSourceO
|
|
|
323
329
|
node: value,
|
|
324
330
|
value: value,
|
|
325
331
|
currentValue: value || '-',
|
|
326
|
-
originalDiffTip:
|
|
332
|
+
originalDiffTip: _originalDiffTip,
|
|
327
333
|
toolTipProps: toolTipProps
|
|
328
334
|
}), suffixNode(value, record, index)]
|
|
329
335
|
});
|
|
@@ -346,7 +352,7 @@ export var formatColumn = function formatColumn(column, originalObj, dataSourceO
|
|
|
346
352
|
node: node,
|
|
347
353
|
value: value,
|
|
348
354
|
currentValue: value || '-',
|
|
349
|
-
originalDiffTip:
|
|
355
|
+
originalDiffTip: _originalDiffTip,
|
|
350
356
|
toolTipProps: toolTipProps
|
|
351
357
|
});
|
|
352
358
|
};
|
|
@@ -365,14 +371,14 @@ export var getParentElement = function getParentElement(element, name) {
|
|
|
365
371
|
if (!element || !name) {
|
|
366
372
|
return result;
|
|
367
373
|
}
|
|
368
|
-
var
|
|
374
|
+
var searchDom = function searchDom(element, name) {
|
|
369
375
|
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'className';
|
|
370
376
|
if (element.parentElement[type] === name) {
|
|
371
377
|
result = element.parentElement;
|
|
372
378
|
return false;
|
|
373
379
|
}
|
|
374
|
-
|
|
380
|
+
searchDom(element.parentElement, name, type = 'className');
|
|
375
381
|
};
|
|
376
|
-
|
|
382
|
+
searchDom(element, name, type = 'className');
|
|
377
383
|
return result;
|
|
378
384
|
};
|
|
@@ -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;
|
|
@@ -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;
|
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;
|