@zat-design/sisyphus-react 3.3.2 → 3.3.3-beta.3
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 +11 -8
- package/es/ProConfigProvider/index.js +0 -1
- package/es/ProDrawerForm/components/ProModal/index.js +0 -1
- package/es/ProEditLabel/index.js +2 -3
- package/es/ProEditTable/components/ActionButton/index.js +6 -6
- package/es/ProEditTable/components/RenderField/index.js +5 -5
- package/es/ProEditTable/style/index.less +0 -1
- package/es/ProEditTable/utils/index.js +2 -4
- package/es/ProForm/components/ProFormGroup/index.d.ts +13 -0
- package/es/ProForm/components/ProFormGroup/index.js +27 -0
- package/es/ProForm/components/base/Switch/index.js +0 -1
- package/es/ProForm/components/base/TextArea/index.js +9 -5
- package/es/ProForm/components/combination/Container/index.js +4 -2
- package/es/ProForm/components/combination/Container/propsType.d.ts +2 -0
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
- package/es/ProForm/components/combination/ProCombination/index.js +0 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +1 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -0
- package/es/ProForm/components/combination/ProTimeLimit/index.js +2 -2
- package/es/ProForm/components/render/Render.js +4 -5
- package/es/ProForm/components/render/RenderFields.js +5 -0
- package/es/ProForm/components/render/propsType.d.ts +1 -0
- package/es/ProForm/components/render/propsType.js +1 -0
- package/es/ProForm/index.js +27 -7
- package/es/ProForm/propsType.d.ts +2 -0
- package/es/ProForm/style/index.less +6 -3
- package/es/ProForm/utils/index.js +10 -6
- package/es/ProForm/utils/useChanged.js +1 -1
- package/es/ProForm/utils/useForm.js +48 -75
- package/es/ProForm/utils/useListChanged.js +22 -10
- package/es/ProLayout/components/ProCollapse/index.js +1 -0
- package/es/ProLayout/components/ProCollapse/style/index.less +49 -39
- package/es/ProStep/index.js +0 -1
- package/es/ProThemeTools/index.js +0 -1
- package/es/ProThemeTools/utils/index.js +0 -1
- package/es/ProTree/components/Tree.js +0 -1
- package/es/ProTreeModal/index.js +5 -1
- package/es/ProTreeSelect/index.js +2 -4
- package/es/ProUpload/index.js +0 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/old/ProEditableTable/index.js +1 -1
- package/es/style/theme/antd.less +1 -1
- package/lib/ProConfigProvider/index.js +0 -1
- package/lib/ProDrawerForm/components/ProModal/index.js +0 -1
- package/lib/ProEditLabel/index.js +2 -3
- package/lib/ProEditTable/components/ActionButton/index.js +6 -6
- package/lib/ProEditTable/components/RenderField/index.js +5 -5
- package/lib/ProEditTable/style/index.less +0 -1
- package/lib/ProEditTable/utils/index.js +2 -4
- package/lib/ProForm/components/ProFormGroup/index.d.ts +13 -0
- package/lib/ProForm/components/ProFormGroup/index.js +35 -0
- package/lib/ProForm/components/base/TextArea/index.js +9 -5
- package/lib/ProForm/components/combination/Container/index.js +4 -2
- package/lib/ProForm/components/combination/Container/propsType.d.ts +2 -0
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
- package/lib/ProForm/components/combination/ProCombination/index.js +0 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +1 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -0
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +2 -3
- package/lib/ProForm/components/old/InputRange/index.js +1 -0
- package/lib/ProForm/components/render/Render.js +4 -5
- package/lib/ProForm/components/render/RenderFields.js +5 -0
- package/lib/ProForm/components/render/propsType.d.ts +1 -0
- package/lib/ProForm/components/render/propsType.js +2 -1
- package/lib/ProForm/index.js +24 -4
- package/lib/ProForm/propsType.d.ts +2 -0
- package/lib/ProForm/style/index.less +6 -3
- package/lib/ProForm/utils/index.js +10 -6
- package/lib/ProForm/utils/useChanged.js +1 -1
- package/lib/ProForm/utils/useForm.js +48 -75
- package/lib/ProForm/utils/useListChanged.js +22 -10
- package/lib/ProLayout/components/ProCollapse/index.js +1 -0
- package/lib/ProLayout/components/ProCollapse/style/index.less +49 -39
- package/lib/ProStep/index.js +0 -1
- package/lib/ProThemeTools/index.js +0 -1
- package/lib/ProThemeTools/utils/index.js +0 -1
- package/lib/ProTree/components/Tree.js +0 -1
- package/lib/ProTree/index.js +1 -0
- package/lib/ProTreeModal/index.js +5 -1
- package/lib/ProTreeSelect/index.js +2 -4
- package/lib/ProUpload/index.js +0 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +15 -0
- package/lib/old/ProEditableTable/index.js +1 -1
- package/lib/style/theme/antd.less +1 -1
- package/package.json +3 -2
|
@@ -3,86 +3,59 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
|
3
3
|
import "antd/es/form/style";
|
|
4
4
|
import _Form from "antd/es/form";
|
|
5
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
|
-
import {
|
|
7
|
-
import { merge } from 'lodash';
|
|
8
|
-
import { HOOK_MARK } from 'rc-field-form/es/FieldContext';
|
|
9
|
-
import { deleteForPath } from '.';
|
|
6
|
+
import { filterInternalFields } from './index';
|
|
10
7
|
export var useForm = function useForm(originForm) {
|
|
11
8
|
var _Form$useForm = _Form.useForm(originForm),
|
|
12
9
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13
10
|
form = _Form$useForm2[0];
|
|
14
11
|
var getFieldsValue = form.getFieldsValue,
|
|
15
|
-
validateFields = form.validateFields
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var values = getFieldsValue(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
12
|
+
validateFields = form.validateFields;
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
var _getFieldsValue = function _getFieldsValue(nameList, filterFunc) {
|
|
15
|
+
// 全部查询
|
|
16
|
+
if (nameList !== true) {
|
|
17
|
+
var values = getFieldsValue(true, filterFunc);
|
|
18
|
+
return filterInternalFields(values);
|
|
19
|
+
}
|
|
20
|
+
return getFieldsValue(nameList, filterFunc);
|
|
21
|
+
};
|
|
22
|
+
var _validateFields = /*#__PURE__*/function () {
|
|
23
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(nameList) {
|
|
24
|
+
var _len,
|
|
25
|
+
rest,
|
|
26
|
+
_key,
|
|
27
|
+
values,
|
|
28
|
+
_values,
|
|
29
|
+
_args = arguments;
|
|
30
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
31
|
+
while (1) switch (_context.prev = _context.next) {
|
|
32
|
+
case 0:
|
|
33
|
+
for (_len = _args.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
34
|
+
rest[_key - 1] = _args[_key];
|
|
35
|
+
}
|
|
36
|
+
_context.next = 3;
|
|
37
|
+
return validateFields.apply(void 0, [nameList].concat(rest));
|
|
38
|
+
case 3:
|
|
39
|
+
values = _context.sent;
|
|
40
|
+
if (!nameList) {
|
|
41
|
+
_context.next = 6;
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
return _context.abrupt("return", values);
|
|
45
|
+
case 6:
|
|
46
|
+
_values = _getFieldsValue();
|
|
47
|
+
return _context.abrupt("return", _values);
|
|
48
|
+
case 8:
|
|
49
|
+
case "end":
|
|
50
|
+
return _context.stop();
|
|
51
|
+
}
|
|
52
|
+
}, _callee);
|
|
53
|
+
}));
|
|
54
|
+
return function _validateFields(_x) {
|
|
55
|
+
return _ref.apply(this, arguments);
|
|
47
56
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
rest,
|
|
52
|
-
_key,
|
|
53
|
-
values,
|
|
54
|
-
_values,
|
|
55
|
-
_args = arguments;
|
|
56
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
57
|
-
while (1) switch (_context.prev = _context.next) {
|
|
58
|
-
case 0:
|
|
59
|
-
for (_len = _args.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
60
|
-
rest[_key - 1] = _args[_key];
|
|
61
|
-
}
|
|
62
|
-
_context.next = 3;
|
|
63
|
-
return validateFields.apply(void 0, [nameList].concat(rest));
|
|
64
|
-
case 3:
|
|
65
|
-
values = _context.sent;
|
|
66
|
-
if (!nameList) {
|
|
67
|
-
_context.next = 6;
|
|
68
|
-
break;
|
|
69
|
-
}
|
|
70
|
-
return _context.abrupt("return", values);
|
|
71
|
-
case 6:
|
|
72
|
-
_values = _getFieldsValue();
|
|
73
|
-
return _context.abrupt("return", _values);
|
|
74
|
-
case 8:
|
|
75
|
-
case "end":
|
|
76
|
-
return _context.stop();
|
|
77
|
-
}
|
|
78
|
-
}, _callee);
|
|
79
|
-
}));
|
|
80
|
-
return function _validateFields(_x) {
|
|
81
|
-
return _ref.apply(this, arguments);
|
|
82
|
-
};
|
|
83
|
-
}();
|
|
84
|
-
form.getFieldsValue = _getFieldsValue;
|
|
85
|
-
form.validateFields = _validateFields;
|
|
86
|
-
}, [form]);
|
|
57
|
+
}();
|
|
58
|
+
form.getFieldsValue = _getFieldsValue;
|
|
59
|
+
form.validateFields = _validateFields;
|
|
87
60
|
return [form];
|
|
88
61
|
};
|
|
@@ -33,11 +33,22 @@ var getOriginalValue = function getOriginalValue(_ref) {
|
|
|
33
33
|
var originalValueRow = originalValueList.find(function (item) {
|
|
34
34
|
return item[rowKeyPath[rowKeyPath.length - 1]] === keyValue;
|
|
35
35
|
});
|
|
36
|
-
var originalValue
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
var originalValue;
|
|
37
|
+
if (originalNames === null || originalNames === void 0 ? void 0 : originalNames.length) {
|
|
38
|
+
var originalNamesValue = originalNames.map(function (originalName) {
|
|
39
|
+
return get(originalValueRow, originalName.slice(rowKeyPath.length - 1));
|
|
40
|
+
});
|
|
41
|
+
// 有可能出现数组中全是undefined的情况 视为没有值
|
|
42
|
+
var fillUndefined = originalNamesValue.every(function (valItem) {
|
|
43
|
+
return valItem === undefined;
|
|
44
|
+
});
|
|
45
|
+
originalValue = fillUndefined ? undefined : originalNamesValue;
|
|
46
|
+
} else {
|
|
47
|
+
originalValue = get(originalValueRow, originalName.slice(rowKeyPath.length - 1));
|
|
48
|
+
}
|
|
39
49
|
return originalValue;
|
|
40
50
|
}
|
|
51
|
+
// 这个方法是给editTable专用的 暂时不存在不传rowKey的情况
|
|
41
52
|
return (originalNames === null || originalNames === void 0 ? void 0 : originalNames.length) ? originalNames.map(function (originalName) {
|
|
42
53
|
return get(originalValues, originalName);
|
|
43
54
|
}) : get(originalValues, originalName);
|
|
@@ -54,23 +65,24 @@ export var useListChanged = function useListChanged(params) {
|
|
|
54
65
|
form = params.form,
|
|
55
66
|
equalWith = params.equalWith,
|
|
56
67
|
rowKeyPath = params.rowKeyPath;
|
|
57
|
-
// let _form = form;
|
|
58
68
|
var namePath = toNamePath(namesStr || name);
|
|
59
69
|
var originalNamePath = toNamePath(originalName);
|
|
60
70
|
var originalNamePaths = originalNames && toNamePaths(originalNames);
|
|
61
|
-
var
|
|
71
|
+
var notWatch = !originalValues;
|
|
72
|
+
var originalValue = !notWatch ? getOriginalValue({
|
|
62
73
|
namePath: namePath,
|
|
63
74
|
originalName: originalNamePath,
|
|
64
75
|
originalNames: originalNamePaths,
|
|
65
76
|
originalValues: originalValues,
|
|
66
77
|
rowKeyPath: rowKeyPath,
|
|
67
78
|
form: form
|
|
68
|
-
});
|
|
69
|
-
var
|
|
79
|
+
}) : undefined;
|
|
80
|
+
var noChange = !equalWith && (!originalValues || originalValue === undefined);
|
|
81
|
+
var _form = form;
|
|
70
82
|
// @ts-ignore
|
|
71
|
-
|
|
72
|
-
var value = _Form.useWatch(namePath,
|
|
73
|
-
if (notWatch) return [false];
|
|
83
|
+
if (notWatch) _form = [];
|
|
84
|
+
var value = _Form.useWatch(namePath, _form);
|
|
85
|
+
if (notWatch || noChange) return [false];
|
|
74
86
|
var changed = contrastOriginal({
|
|
75
87
|
value: value,
|
|
76
88
|
originalValue: originalValue,
|
|
@@ -43,6 +43,7 @@ var ProCollapse = function ProCollapse(props) {
|
|
|
43
43
|
if (level === '2') {
|
|
44
44
|
var level2Panel = classNames({
|
|
45
45
|
'pro-collapse-level2-collapse': towCollapse,
|
|
46
|
+
'pro-collapse-level2-no-collapse': !towCollapse,
|
|
46
47
|
'pro-collapse-panel': true
|
|
47
48
|
});
|
|
48
49
|
var hasCollapse = {};
|
|
@@ -18,59 +18,62 @@
|
|
|
18
18
|
|
|
19
19
|
.@{ant-prefix}-collapse-header {
|
|
20
20
|
align-items: center !important;
|
|
21
|
-
padding
|
|
22
|
-
background
|
|
21
|
+
padding: 12px var(--zaui-space-size-md, 16px) !important;
|
|
22
|
+
background: var(--zaui-area, #fafafa);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.@{ant-prefix}-collapse-header-text {
|
|
26
|
-
color
|
|
26
|
+
color: var(--zaui-text, #343434);
|
|
27
27
|
font-weight: 500;
|
|
28
|
-
font-size
|
|
28
|
+
font-size: var(--zaui-font-size-lg, 16px);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.@{ant-prefix}-collapse-expand-icon {
|
|
32
32
|
color: #c5c7cd;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
&.@{ant-prefix}-collapse-borderless
|
|
35
|
+
&.@{ant-prefix}-collapse-borderless
|
|
36
|
+
.@{ant-prefix}-collapse-item
|
|
37
|
+
> .@{ant-prefix}-collapse-content
|
|
38
|
+
> .@{ant-prefix}-collapse-content-box {
|
|
36
39
|
padding: 0;
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
.@{ant-prefix}-collapse-content-box {
|
|
40
|
-
padding
|
|
43
|
+
padding: 0;
|
|
41
44
|
background: var(--zaui-base-bg, #ffffff);
|
|
42
45
|
|
|
43
46
|
.pro-collapse-content {
|
|
44
|
-
padding
|
|
47
|
+
padding: var(--zaui-space-size-md, 16px);
|
|
45
48
|
padding-bottom: 0;
|
|
46
|
-
background
|
|
49
|
+
background: var(--zaui-base-bg, #ffffff);
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
&.pro-collapse-level2 {
|
|
51
54
|
margin-bottom: 0;
|
|
52
|
-
background
|
|
55
|
+
background: var(--zaui-base-bg, #ffffff);
|
|
53
56
|
|
|
54
57
|
.@{ant-prefix}-collapse-header {
|
|
55
58
|
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
56
|
-
padding
|
|
57
|
-
background
|
|
59
|
+
padding: 0 !important;
|
|
60
|
+
background: var(--zaui-base-bg, #ffffff);
|
|
58
61
|
|
|
59
62
|
.@{ant-prefix}-collapse-header-text {
|
|
60
|
-
position
|
|
63
|
+
position: relative;
|
|
61
64
|
padding-left: var(--zaui-space-size-sm, 8px);
|
|
62
|
-
font-size
|
|
65
|
+
font-size: var(--zaui-font-size, 14px);
|
|
63
66
|
|
|
64
67
|
&::before {
|
|
65
|
-
position
|
|
66
|
-
top
|
|
67
|
-
left
|
|
68
|
-
width
|
|
69
|
-
height
|
|
70
|
-
background
|
|
68
|
+
position: absolute;
|
|
69
|
+
top: 50%;
|
|
70
|
+
left: 0;
|
|
71
|
+
width: 4px;
|
|
72
|
+
height: 14px;
|
|
73
|
+
background: var(--zaui-brand);
|
|
71
74
|
border-radius: var(--zaui-border-radius-card, 2px);
|
|
72
|
-
transform
|
|
73
|
-
content
|
|
75
|
+
transform: translateY(-50%);
|
|
76
|
+
content: '';
|
|
74
77
|
}
|
|
75
78
|
}
|
|
76
79
|
|
|
@@ -93,9 +96,12 @@
|
|
|
93
96
|
padding: 0;
|
|
94
97
|
}
|
|
95
98
|
|
|
96
|
-
&.@{ant-prefix}-collapse .@{ant-prefix}-collapse-item-disabled
|
|
97
|
-
.@{ant-prefix}-collapse
|
|
98
|
-
|
|
99
|
+
&.@{ant-prefix}-collapse .@{ant-prefix}-collapse-item-disabled > .@{ant-prefix}-collapse-header,
|
|
100
|
+
.@{ant-prefix}-collapse
|
|
101
|
+
.@{ant-prefix}-collapse-item-disabled
|
|
102
|
+
> .@{ant-prefix}-collapse-header
|
|
103
|
+
> .arrow {
|
|
104
|
+
color: var(--zaui-text, #343434);
|
|
99
105
|
cursor: default;
|
|
100
106
|
}
|
|
101
107
|
|
|
@@ -108,6 +114,12 @@
|
|
|
108
114
|
display: block;
|
|
109
115
|
}
|
|
110
116
|
}
|
|
117
|
+
|
|
118
|
+
.pro-collapse-level2-no-collapse {
|
|
119
|
+
.@{ant-prefix}-collapse-expand-icon {
|
|
120
|
+
display: none;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
111
123
|
}
|
|
112
124
|
|
|
113
125
|
.@{ant-prefix}-collapse-extra {
|
|
@@ -117,10 +129,9 @@
|
|
|
117
129
|
}
|
|
118
130
|
|
|
119
131
|
&.pro-collapse-list {
|
|
120
|
-
|
|
121
|
-
.@{ant-prefix}-descriptions-row>
|
|
122
|
-
|
|
123
|
-
padding : var(--zaui-space-size-md, 16px) 0;
|
|
132
|
+
.@{ant-prefix}-descriptions-row > th,
|
|
133
|
+
.@{ant-prefix}-descriptions-row > td {
|
|
134
|
+
padding: var(--zaui-space-size-md, 16px) 0;
|
|
124
135
|
background: #fafafa;
|
|
125
136
|
|
|
126
137
|
&.@{ant-prefix}-descriptions-item {
|
|
@@ -133,26 +144,25 @@
|
|
|
133
144
|
position: relative;
|
|
134
145
|
|
|
135
146
|
&::before {
|
|
136
|
-
position
|
|
137
|
-
top
|
|
138
|
-
left
|
|
139
|
-
width
|
|
140
|
-
height
|
|
141
|
-
background
|
|
147
|
+
position: absolute;
|
|
148
|
+
top: 50%;
|
|
149
|
+
left: 8px;
|
|
150
|
+
width: 4px;
|
|
151
|
+
height: 14px;
|
|
152
|
+
background: var(--zaui-brand);
|
|
142
153
|
border-radius: var(--zaui-border-radius-card, 2px);
|
|
143
|
-
transform
|
|
144
|
-
content
|
|
154
|
+
transform: translateY(-50%);
|
|
155
|
+
content: '';
|
|
145
156
|
}
|
|
146
157
|
}
|
|
147
158
|
}
|
|
148
159
|
|
|
149
160
|
.@{ant-prefix}-descriptions-item-container {
|
|
150
|
-
|
|
151
161
|
.@{ant-prefix}-descriptions-item-label,
|
|
152
162
|
.@{ant-prefix}-descriptions-item-content {
|
|
153
|
-
color
|
|
163
|
+
color: #0a0a0a !important;
|
|
154
164
|
font-weight: 500 !important;
|
|
155
|
-
font-size
|
|
165
|
+
font-size: var(--zaui-font-size, 14px);
|
|
156
166
|
}
|
|
157
167
|
}
|
|
158
168
|
|
package/es/ProStep/index.js
CHANGED
|
@@ -115,7 +115,6 @@ var ProThemeTools = function ProThemeTools(_ref) {
|
|
|
115
115
|
return ["".concat(getKebabCase(item === null || item === void 0 ? void 0 : item[0])), ['zauiSize'].includes(item === null || item === void 0 ? void 0 : item[0]) || typeof (item === null || item === void 0 ? void 0 : item[1]) !== 'number' ? item === null || item === void 0 ? void 0 : item[1] : "".concat(item === null || item === void 0 ? void 0 : item[1], "px") // zauiSize取数字
|
|
116
116
|
];
|
|
117
117
|
}));
|
|
118
|
-
|
|
119
118
|
setState(_objectSpread(_objectSpread({}, state), localThemeConfig));
|
|
120
119
|
setThemes(cssVariables);
|
|
121
120
|
_ConfigProvider.config({
|
package/es/ProTreeModal/index.js
CHANGED
|
@@ -491,8 +491,12 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
491
491
|
} else {
|
|
492
492
|
onChange === null || onChange === void 0 ? void 0 : onChange([]);
|
|
493
493
|
setState({
|
|
494
|
-
checkAll: false
|
|
494
|
+
checkAll: false,
|
|
495
|
+
open: true
|
|
495
496
|
});
|
|
497
|
+
if (appoint) {
|
|
498
|
+
openChange === null || openChange === void 0 ? void 0 : openChange(true);
|
|
499
|
+
}
|
|
496
500
|
}
|
|
497
501
|
};
|
|
498
502
|
/**
|
|
@@ -19,7 +19,6 @@ import { useProConfig } from '../ProConfigProvider';
|
|
|
19
19
|
import Container from '../ProForm/components/Container';
|
|
20
20
|
var SHOW_PARENT = _TreeSelect.SHOW_PARENT;
|
|
21
21
|
export var ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
22
|
-
var _classnames2;
|
|
23
22
|
// 全局属性配置在ConfigProvider
|
|
24
23
|
var _ref = useProConfig('ProTreeSelect') || {},
|
|
25
24
|
_ref$fieldNames = _ref.fieldNames,
|
|
@@ -363,7 +362,6 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
363
362
|
// currentAllNodeChild.push(item);
|
|
364
363
|
// }
|
|
365
364
|
}
|
|
366
|
-
|
|
367
365
|
return currentAllNodeChild;
|
|
368
366
|
};
|
|
369
367
|
sourceList = filterData(sourceList);
|
|
@@ -469,9 +467,9 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
469
467
|
'pro-tree-select': true
|
|
470
468
|
}, "".concat(className), className));
|
|
471
469
|
var innerClass = treeCheckable ? 'checkable-tree pro' : "".concat(tenCountClass, " signal-tree");
|
|
472
|
-
var dropDownClassName = classnames((
|
|
470
|
+
var dropDownClassName = classnames(_defineProperty(_defineProperty({
|
|
473
471
|
'pro-tree-select-drop-down-container': true
|
|
474
|
-
},
|
|
472
|
+
}, "".concat(innerClass), true), "".concat(popupClassName), popupClassName));
|
|
475
473
|
var treeProps = _objectSpread({
|
|
476
474
|
disabled: disabled,
|
|
477
475
|
showSearch: showSearch,
|
package/es/ProUpload/index.js
CHANGED
|
@@ -91,7 +91,6 @@ var ProUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
91
91
|
response: file === null || file === void 0 ? void 0 : file.response
|
|
92
92
|
// url: file?.response?.data?.url,
|
|
93
93
|
};
|
|
94
|
-
|
|
95
94
|
if (transformResponse) {
|
|
96
95
|
var data = transformResponse(file.response) || {};
|
|
97
96
|
return _objectSpread(_objectSpread({}, nfile), data);
|
package/es/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { default as ProViewer } from './ProViewer';
|
|
|
8
8
|
export { default as ProEditTable } from './ProEditTable';
|
|
9
9
|
export { default as ProDrawerForm } from './ProDrawerForm';
|
|
10
10
|
export { default as ProEditLabel } from './ProEditLabel';
|
|
11
|
+
export { ProFormGroup, useProFormGroup } from './ProForm/components/ProFormGroup';
|
|
11
12
|
export { default as ProForm } from './ProForm';
|
|
12
13
|
export * from './ProForm';
|
|
13
14
|
export * from './ProForm/components';
|
package/es/index.js
CHANGED
|
@@ -12,6 +12,7 @@ export { default as ProEditTable } from './ProEditTable';
|
|
|
12
12
|
export { default as ProDrawerForm } from './ProDrawerForm';
|
|
13
13
|
export { default as ProEditLabel } from './ProEditLabel';
|
|
14
14
|
// 表单
|
|
15
|
+
export { ProFormGroup, useProFormGroup } from './ProForm/components/ProFormGroup';
|
|
15
16
|
export { default as ProForm } from './ProForm';
|
|
16
17
|
export * from './ProForm';
|
|
17
18
|
export * from './ProForm/components'; // ProForm 中组件导出
|
|
@@ -404,7 +404,7 @@ var ProEditableTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
404
404
|
}, antButtonProps), {}, {
|
|
405
405
|
children: buttonText
|
|
406
406
|
}))]
|
|
407
|
-
}) : /*#__PURE__*/cloneElement(buttonText, antButtonProps)
|
|
407
|
+
}) : ( /*#__PURE__*/cloneElement(buttonText, antButtonProps))
|
|
408
408
|
}) : null
|
|
409
409
|
});
|
|
410
410
|
};
|
package/es/style/theme/antd.less
CHANGED
|
@@ -23,7 +23,6 @@ var _RenderProForm = _interopRequireDefault(require("./components/RenderProForm"
|
|
|
23
23
|
var _utils = require("./utils");
|
|
24
24
|
var _excluded = ["open", "disabled", "onOpenChange", "onFinish", "onConfirm", "trigger", "mode", "className", "size", "popupProps", "style", "viewEmpty", "children", "form"];
|
|
25
25
|
var ProEditLabel = function ProEditLabel(_ref) {
|
|
26
|
-
var _classnames;
|
|
27
26
|
var _ref$open = _ref.open,
|
|
28
27
|
open = _ref$open === void 0 ? false : _ref$open,
|
|
29
28
|
_ref$disabled = _ref.disabled,
|
|
@@ -129,9 +128,9 @@ var ProEditLabel = function ProEditLabel(_ref) {
|
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
130
|
}, [confirmValue, mode]);
|
|
132
|
-
var cls = (0, _classnames2.default)((
|
|
131
|
+
var cls = (0, _classnames2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
133
132
|
'pro-edit-label': true
|
|
134
|
-
},
|
|
133
|
+
}, "trigger-".concat(trigger), trigger), 'pro-edit-label-small', size === 'small'), 'pro-edit-label-middle', size === 'middle'), 'pro-edit-label-large', size === 'large'), "".concat(className), className));
|
|
135
134
|
/**
|
|
136
135
|
* pop确认回调
|
|
137
136
|
*/
|
|
@@ -86,24 +86,24 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
86
86
|
disabled: isDisabled,
|
|
87
87
|
okText: _locale.default.ProEditTable.confirm,
|
|
88
88
|
cancelText: _locale.default.ProEditTable.cancel,
|
|
89
|
-
children: /*#__PURE__*/_react.default.isValidElement(btnConfig.label) ? /*#__PURE__*/_react.default.cloneElement(btnConfig.label, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(delBtnProps, ['buttonProps', 'isEditable'])), {}, {
|
|
89
|
+
children: /*#__PURE__*/_react.default.isValidElement(btnConfig.label) ? ( /*#__PURE__*/_react.default.cloneElement(btnConfig.label, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(delBtnProps, ['buttonProps', 'isEditable'])), {}, {
|
|
90
90
|
record: record,
|
|
91
91
|
index: index,
|
|
92
92
|
disabled: isDisabled
|
|
93
|
-
})) : (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(delBtnProps, ['buttonProps', 'isEditable'])), {}, {
|
|
93
|
+
}))) : (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(delBtnProps, ['buttonProps', 'isEditable'])), {}, {
|
|
94
94
|
disabled: isDisabled,
|
|
95
95
|
type: "link",
|
|
96
96
|
children: btnConfig.label
|
|
97
97
|
}))
|
|
98
98
|
}) : (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
99
|
-
children: /*#__PURE__*/_react.default.isValidElement(btnConfig.label) ? /*#__PURE__*/_react.default.cloneElement(btnConfig.label, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(delBtnProps, ['buttonProps', 'isEditable'])), {}, {
|
|
99
|
+
children: /*#__PURE__*/_react.default.isValidElement(btnConfig.label) ? ( /*#__PURE__*/_react.default.cloneElement(btnConfig.label, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(delBtnProps, ['buttonProps', 'isEditable'])), {}, {
|
|
100
100
|
record: record,
|
|
101
101
|
index: index,
|
|
102
102
|
disabled: isDisabled,
|
|
103
103
|
onClick: function onClick() {
|
|
104
104
|
btnConfig.onEvent(record, index);
|
|
105
105
|
}
|
|
106
|
-
})) : (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(delBtnProps, ['buttonProps', 'isEditable'])), {}, {
|
|
106
|
+
}))) : (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(delBtnProps, ['buttonProps', 'isEditable'])), {}, {
|
|
107
107
|
disabled: isDisabled,
|
|
108
108
|
type: "link",
|
|
109
109
|
onClick: function onClick() {
|
|
@@ -113,10 +113,10 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
113
113
|
}))
|
|
114
114
|
})
|
|
115
115
|
}) : (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
116
|
-
children: /*#__PURE__*/_react.default.isValidElement(btnConfig.label) ? /*#__PURE__*/_react.default.cloneElement(btnConfig.label, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(actionBtnProps, ['buttonProps', 'isEditable'])), {}, {
|
|
116
|
+
children: /*#__PURE__*/_react.default.isValidElement(btnConfig.label) ? ( /*#__PURE__*/_react.default.cloneElement(btnConfig.label, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(actionBtnProps, ['buttonProps', 'isEditable'])), {}, {
|
|
117
117
|
record: record,
|
|
118
118
|
index: index
|
|
119
|
-
})) : (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
119
|
+
}))) : (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
120
120
|
className: "action-button"
|
|
121
121
|
}, (0, _lodash.omit)(actionBtnProps, ['buttonProps', 'isEditable'])), {}, {
|
|
122
122
|
type: "link",
|
|
@@ -33,7 +33,7 @@ var _excluded = ["type", "valueType", "names", "fieldProps", "labelRequired", "e
|
|
|
33
33
|
/* eslint-disable prefer-destructuring */
|
|
34
34
|
/* eslint-disable prefer-const */
|
|
35
35
|
var RenderField = function RenderField(_ref) {
|
|
36
|
-
var _type, _type$replace, _fieldProps2, _fieldProps3, _fieldProps4, _names, _formItemChildProps$p, _TargetComponent4
|
|
36
|
+
var _type, _type$replace, _fieldProps2, _fieldProps3, _fieldProps4, _names, _formItemChildProps$p, _TargetComponent4;
|
|
37
37
|
var value = _ref.text,
|
|
38
38
|
record = _ref.record,
|
|
39
39
|
index = _ref.index,
|
|
@@ -509,13 +509,13 @@ var RenderField = function RenderField(_ref) {
|
|
|
509
509
|
if (!isEditing) {
|
|
510
510
|
delete _formItemProps.rules;
|
|
511
511
|
}
|
|
512
|
-
var _className = (0, _classnames.default)((
|
|
512
|
+
var _className = (0, _classnames.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, className, className), 'pro-form-item-changed', changed));
|
|
513
513
|
var originalTitle = originalTip ? (0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
514
|
-
children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? /*#__PURE__*/_react.default.cloneElement(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(componentProps, ['onFieldChange'])), {}, {
|
|
514
|
+
children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? ( /*#__PURE__*/_react.default.cloneElement(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(componentProps, ['onFieldChange'])), {}, {
|
|
515
515
|
isView: true,
|
|
516
516
|
value: originalValue,
|
|
517
517
|
checked: type === 'Switch' ? originalValue : undefined
|
|
518
|
-
})) : (0, _jsxRuntime.jsx)(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(componentProps, ['onFieldChange'])), {}, {
|
|
518
|
+
}))) : (0, _jsxRuntime.jsx)(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(componentProps, ['onFieldChange'])), {}, {
|
|
519
519
|
isView: true,
|
|
520
520
|
value: originalValue,
|
|
521
521
|
checked: type === 'Switch' ? originalValue : undefined
|
|
@@ -526,7 +526,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
526
526
|
}, (0, _lodash.omit)(_formItemProps, ['render', 'cache', 'key', 'width', 'hiddenNames', 'name'])), {}, {
|
|
527
527
|
className: _className,
|
|
528
528
|
name: cellName,
|
|
529
|
-
children: /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? /*#__PURE__*/_react.default.cloneElement(TargetComponent, (0, _objectSpread2.default)({}, (0, _lodash.omit)(componentProps, ['onFieldChange']))) : (0, _jsxRuntime.jsx)(TargetComponent, (0, _objectSpread2.default)({}, (0, _lodash.omit)(componentProps, ['onFieldChange'])))
|
|
529
|
+
children: /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? ( /*#__PURE__*/_react.default.cloneElement(TargetComponent, (0, _objectSpread2.default)({}, (0, _lodash.omit)(componentProps, ['onFieldChange'])))) : (0, _jsxRuntime.jsx)(TargetComponent, (0, _objectSpread2.default)({}, (0, _lodash.omit)(componentProps, ['onFieldChange'])))
|
|
530
530
|
})) : (0, _jsxRuntime.jsx)(_Container.default, {
|
|
531
531
|
viewEmpty: viewEmpty
|
|
532
532
|
});
|