@zat-design/sisyphus-react 4.0.0-beta.6 → 4.0.0-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/es/ProAction/index.js +3 -6
- package/es/ProConfigProvider/index.js +2 -3
- package/es/ProDownload/index.js +2 -3
- package/es/ProDownload/utils.js +3 -4
- package/es/ProDrawerForm/components/ProDrawer/index.js +5 -10
- package/es/ProDrawerForm/components/ProModal/index.js +5 -10
- package/es/ProEditLabel/components/RenderProForm.js +2 -3
- package/es/ProEditLabel/index.js +6 -13
- package/es/ProEditTable/components/ActionButton/index.js +5 -8
- package/es/ProEditTable/components/RcTable/BaseTable.js +3 -6
- package/es/ProEditTable/components/RcTable/DraggableTable.js +2 -3
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +5 -8
- package/es/ProEditTable/components/RenderField/index.js +4 -5
- package/es/ProEditTable/components/RenderToolbar/index.js +2 -3
- package/es/ProEditTable/components/Summary/index.js +5 -8
- package/es/ProEditTable/components/Validator/index.js +3 -6
- package/es/ProEditTable/index.js +5 -10
- package/es/ProEditTable/utils/config.js +4 -5
- package/es/ProEditTable/utils/index.js +3 -6
- package/es/ProEnum/index.js +10 -17
- package/es/ProForm/components/Container.js +2 -3
- package/es/ProForm/components/FormFooter/index.js +4 -7
- package/es/ProForm/components/base/Checkbox/index.js +3 -4
- package/es/ProForm/components/base/DatePicker/index.js +2 -3
- package/es/ProForm/components/base/Input/index.js +2 -3
- package/es/ProForm/components/base/InputNumber/index.js +3 -6
- package/es/ProForm/components/base/Radio/index.js +3 -4
- package/es/ProForm/components/base/RangePicker/index.js +3 -3
- package/es/ProForm/components/base/Select/index.js +2 -3
- package/es/ProForm/components/base/Switch/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/es/ProForm/components/base/TextArea/index.js +2 -3
- package/es/ProForm/components/base/TimePicker/index.js +2 -3
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +8 -13
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +3 -6
- package/es/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/es/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +5 -8
- package/es/ProForm/components/combination/FormList/index.js +2 -3
- package/es/ProForm/components/combination/Group/index.js +3 -4
- package/es/ProForm/components/combination/Group/utils.js +3 -4
- package/es/ProForm/components/combination/ProCascader/index.js +5 -10
- package/es/ProForm/components/combination/ProModalSelect/index.js +9 -22
- package/es/ProForm/components/combination/ProNumberRange/index.js +12 -19
- package/es/ProForm/components/combination/ProRangeLimit/index.js +4 -9
- package/es/ProForm/components/combination/ProTimeLimit/index.js +4 -9
- package/es/ProForm/components/render/ChangedWrapper.js +5 -8
- package/es/ProForm/components/render/ConfirmWrapper.js +3 -4
- package/es/ProForm/components/render/Render.js +12 -19
- package/es/ProForm/index.js +8 -15
- package/es/ProForm/utils/useForm.js +2 -3
- package/es/ProIcon/index.js +6 -11
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/es/ProLayout/components/ProCollapse/index.js +5 -10
- package/es/ProLayout/components/ProFooter/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/es/ProLayout/components/ProHeader/index.js +16 -25
- package/es/ProLayout/index.js +2 -3
- package/es/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/es/ProSelect/index.js +7 -14
- package/es/ProStep/components/Anchor/index.js +2 -3
- package/es/ProTable/components/FormatColumn/index.js +9 -10
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +2 -3
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +2 -3
- package/es/ProTable/components/RenderColumn/index.js +10 -15
- package/es/ProTable/components/RenderSummary/index.js +4 -5
- package/es/ProTable/components/RenderTableHeader/index.js +3 -4
- package/es/ProTable/components/RenderTabs/index.js +3 -6
- package/es/ProTable/components/TooltipTitle/index.js +2 -3
- package/es/ProTable/hooks/useAntdTable.js +3 -6
- package/es/ProTabs/components/Card/index.js +5 -10
- package/es/ProTabs/index.js +2 -3
- package/es/ProThemeTools/component/ProTools/index.js +12 -19
- package/es/ProThemeTools/index.js +2 -3
- package/es/ProTooltip/index.js +4 -5
- package/es/ProTree/components/AdaptiveTooltip.js +2 -3
- package/es/ProTree/components/List.js +3 -4
- package/es/ProTree/components/ProTree.js +5 -12
- package/es/ProTree/components/ProTreeSelect/index.js +9 -16
- package/es/ProTree/components/Tree.js +3 -6
- package/es/ProTreeModal/components/Cascader.js +3 -4
- package/es/ProTreeModal/components/List.js +9 -14
- package/es/ProTreeModal/components/SortableItem.js +2 -3
- package/es/ProTreeModal/components/Tree.js +3 -4
- package/es/ProTreeModal/components/Trigger.js +6 -11
- package/es/ProTreeModal/index.js +9 -16
- package/es/ProUpload/components/ButtonRender.js +3 -6
- package/es/ProUpload/components/DragRender.js +2 -3
- package/es/ProUpload/components/FileItem.js +10 -15
- package/es/ProUpload/components/ImageRender.js +8 -17
- package/es/ProUpload/index.js +3 -4
- package/es/ProViewer/index.js +4 -9
- package/es/ProViewer/propsType.js +3 -0
- package/es/ProWaterMark/index.js +2 -3
- package/lib/ProAction/index.js +3 -6
- package/lib/ProConfigProvider/index.js +2 -3
- package/lib/ProDownload/index.js +2 -3
- package/lib/ProDownload/utils.js +3 -4
- package/lib/ProDrawerForm/components/ProDrawer/index.js +5 -10
- package/lib/ProDrawerForm/components/ProModal/index.js +5 -10
- package/lib/ProEditLabel/components/RenderProForm.js +2 -3
- package/lib/ProEditLabel/index.js +6 -13
- package/lib/ProEditTable/components/ActionButton/index.js +5 -8
- package/lib/ProEditTable/components/RcTable/BaseTable.js +3 -6
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +2 -3
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +5 -8
- package/lib/ProEditTable/components/RenderField/index.js +4 -5
- package/lib/ProEditTable/components/RenderToolbar/index.js +2 -3
- package/lib/ProEditTable/components/Summary/index.js +5 -9
- package/lib/ProEditTable/components/Validator/index.js +3 -7
- package/lib/ProEditTable/index.js +5 -10
- package/lib/ProEditTable/utils/config.js +4 -5
- package/lib/ProEditTable/utils/index.js +3 -6
- package/lib/ProEnum/index.js +10 -17
- package/lib/ProForm/components/Container.js +2 -3
- package/lib/ProForm/components/FormFooter/index.js +4 -7
- package/lib/ProForm/components/base/Checkbox/index.js +3 -4
- package/lib/ProForm/components/base/DatePicker/index.js +2 -3
- package/lib/ProForm/components/base/Input/index.js +2 -3
- package/lib/ProForm/components/base/InputNumber/index.js +3 -6
- package/lib/ProForm/components/base/Radio/index.js +3 -4
- package/lib/ProForm/components/base/RangePicker/index.js +2 -3
- package/lib/ProForm/components/base/Select/index.js +2 -3
- package/lib/ProForm/components/base/Switch/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/lib/ProForm/components/base/TextArea/index.js +2 -3
- package/lib/ProForm/components/base/TimePicker/index.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +8 -13
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +4 -7
- package/lib/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +4 -7
- package/lib/ProForm/components/combination/FormList/index.js +2 -3
- package/lib/ProForm/components/combination/Group/index.js +3 -4
- package/lib/ProForm/components/combination/Group/utils.js +3 -4
- package/lib/ProForm/components/combination/ProCascader/index.js +5 -10
- package/lib/ProForm/components/combination/ProModalSelect/index.js +9 -22
- package/lib/ProForm/components/combination/ProNumberRange/index.js +12 -19
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +4 -9
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +4 -9
- package/lib/ProForm/components/render/ChangedWrapper.js +5 -8
- package/lib/ProForm/components/render/ConfirmWrapper.js +3 -4
- package/lib/ProForm/components/render/Render.js +12 -19
- package/lib/ProForm/index.js +8 -15
- package/lib/ProForm/utils/useForm.js +2 -3
- package/lib/ProIcon/index.js +6 -11
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/lib/ProLayout/components/ProCollapse/index.js +5 -10
- package/lib/ProLayout/components/ProFooter/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/index.js +15 -24
- package/lib/ProLayout/index.js +2 -3
- package/lib/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/lib/ProSelect/index.js +7 -14
- package/lib/ProStep/components/Anchor/index.js +2 -3
- package/lib/ProTable/components/FormatColumn/index.js +9 -10
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +2 -3
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +2 -3
- package/lib/ProTable/components/RenderColumn/index.js +10 -15
- package/lib/ProTable/components/RenderSummary/index.js +4 -6
- package/lib/ProTable/components/RenderTableHeader/index.js +3 -5
- package/lib/ProTable/components/RenderTabs/index.js +3 -6
- package/lib/ProTable/components/TooltipTitle/index.js +2 -3
- package/lib/ProTable/hooks/useAntdTable.js +3 -6
- package/lib/ProTabs/components/Card/index.js +5 -11
- package/lib/ProTabs/index.js +2 -3
- package/lib/ProThemeTools/component/ProTools/index.js +12 -19
- package/lib/ProThemeTools/index.js +2 -3
- package/lib/ProTooltip/index.js +4 -5
- package/lib/ProTree/components/AdaptiveTooltip.js +2 -4
- package/lib/ProTree/components/List.js +3 -4
- package/lib/ProTree/components/ProTree.js +5 -12
- package/lib/ProTree/components/ProTreeSelect/index.js +9 -16
- package/lib/ProTree/components/Tree.js +3 -6
- package/lib/ProTreeModal/components/Cascader.js +3 -4
- package/lib/ProTreeModal/components/List.js +9 -14
- package/lib/ProTreeModal/components/SortableItem.js +2 -3
- package/lib/ProTreeModal/components/Tree.js +3 -4
- package/lib/ProTreeModal/components/Trigger.js +6 -11
- package/lib/ProTreeModal/index.js +9 -16
- package/lib/ProUpload/components/ButtonRender.js +3 -6
- package/lib/ProUpload/components/DragRender.js +2 -3
- package/lib/ProUpload/components/FileItem.js +10 -15
- package/lib/ProUpload/components/ImageRender.js +8 -17
- package/lib/ProUpload/index.js +3 -4
- package/lib/ProViewer/index.js +4 -9
- package/lib/ProViewer/propsType.js +3 -1
- package/lib/ProWaterMark/index.js +2 -3
- package/package.json +1 -1
@@ -1,7 +1,3 @@
|
|
1
|
-
import "antd/es/tooltip/style";
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
3
|
-
import "antd/es/space/style";
|
4
|
-
import _Space from "antd/es/space";
|
5
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
6
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
7
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
@@ -10,6 +6,7 @@ var _excluded = ["type", "label", "show", "needConfirm", "onHandle", "onClick"],
|
|
10
6
|
_excluded2 = ["title", "icon"];
|
11
7
|
import React from 'react';
|
12
8
|
import { cloneDeepWith, isArray, isBoolean, isEqual, isFunction } from 'lodash';
|
9
|
+
import { Tooltip, Space } from 'antd';
|
13
10
|
import classnames from 'classnames';
|
14
11
|
import { ReactSVG } from 'react-svg';
|
15
12
|
import { tools } from '@zat-design/utils';
|
@@ -165,7 +162,7 @@ var getActionColumn = config => {
|
|
165
162
|
if (_disabled) {
|
166
163
|
return '';
|
167
164
|
}
|
168
|
-
return /*#__PURE__*/_jsx(
|
165
|
+
return /*#__PURE__*/_jsx(Space, {
|
169
166
|
size: "small",
|
170
167
|
direction: actionDirection,
|
171
168
|
children: actionBtns.map(btnConfig => {
|
@@ -237,7 +234,7 @@ export var transformColumns = function transformColumns() {
|
|
237
234
|
resetProps = _objectWithoutProperties(_ref3, _excluded2);
|
238
235
|
item.title = /*#__PURE__*/_jsxs("span", {
|
239
236
|
className: "pro-edit-table-title pro-edit-table-tooltip",
|
240
|
-
children: [before, columnTitle, /*#__PURE__*/_jsx(
|
237
|
+
children: [before, columnTitle, /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
241
238
|
title: tooltipTitle !== null && tooltipTitle !== void 0 ? tooltipTitle : tooltip
|
242
239
|
}, resetProps), {}, {
|
243
240
|
children: icon ? ( /*#__PURE__*/React.cloneElement(icon, {
|
package/es/ProEnum/index.js
CHANGED
@@ -1,17 +1,10 @@
|
|
1
|
-
import "antd/es/space/style";
|
2
|
-
import _Space from "antd/es/space";
|
3
|
-
import "antd/es/checkbox/style";
|
4
|
-
import _Checkbox from "antd/es/checkbox";
|
5
|
-
import "antd/es/radio/style";
|
6
|
-
import _Radio from "antd/es/radio";
|
7
|
-
import "antd/es/message/style";
|
8
|
-
import _message from "antd/es/message";
|
9
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
10
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
11
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
12
4
|
var _excluded = ["code", "type", "dataSource", "useRequest", "value", "component", "onChange", "transformResponse", "otherProps", "isView"],
|
13
5
|
_excluded2 = ["fieldNames", "clear", "cacheKey", "showCodeName"];
|
14
6
|
import { useDeepCompareEffect, useRequest as useRequestFunc } from 'ahooks';
|
7
|
+
import { message, Radio, Checkbox, Space } from 'antd';
|
15
8
|
import React, { useState, useEffect, useMemo } from 'react';
|
16
9
|
import { cloneDeep, isFunction, isString, isArray, omit, isNumber } from 'lodash';
|
17
10
|
import ProSelect from "../ProSelect";
|
@@ -97,7 +90,7 @@ var ProEnum = props => {
|
|
97
90
|
var responseData = transformResponse(res);
|
98
91
|
if (typeof responseData !== 'object') {
|
99
92
|
var _locale$ProEnum;
|
100
|
-
return
|
93
|
+
return message.error((_locale$ProEnum = locale.ProEnum) === null || _locale$ProEnum === void 0 ? void 0 : _locale$ProEnum.errorMessage);
|
101
94
|
}
|
102
95
|
setData(responseData);
|
103
96
|
} else {
|
@@ -108,7 +101,7 @@ var ProEnum = props => {
|
|
108
101
|
if (status === 200) {
|
109
102
|
if (typeof data !== 'object') {
|
110
103
|
var _locale$ProEnum2;
|
111
|
-
return
|
104
|
+
return message.error((_locale$ProEnum2 = locale.ProEnum) === null || _locale$ProEnum2 === void 0 ? void 0 : _locale$ProEnum2.errorMessage);
|
112
105
|
}
|
113
106
|
if (Array.isArray(data)) {
|
114
107
|
setData([...data]);
|
@@ -117,7 +110,7 @@ var ProEnum = props => {
|
|
117
110
|
setData(data[code]);
|
118
111
|
}
|
119
112
|
} else {
|
120
|
-
|
113
|
+
message.error(msg);
|
121
114
|
}
|
122
115
|
}
|
123
116
|
}
|
@@ -184,22 +177,22 @@ var ProEnum = props => {
|
|
184
177
|
onChange: onChange
|
185
178
|
}));
|
186
179
|
case 'Radio':
|
187
|
-
return /*#__PURE__*/_jsx(
|
180
|
+
return /*#__PURE__*/_jsx(Radio.Group, _objectSpread(_objectSpread({}, omit(enumProps, ['fieldNames', 'showCodeName'])), {}, {
|
188
181
|
options: list,
|
189
182
|
value: value,
|
190
183
|
onChange: onChange,
|
191
|
-
children: list.map(item => /*#__PURE__*/_jsx(
|
184
|
+
children: list.map(item => /*#__PURE__*/_jsx(Radio, {
|
192
185
|
value: item[fieldValue],
|
193
186
|
disabled: !!item.disabled,
|
194
187
|
children: item[label]
|
195
188
|
}, item[fieldValue]))
|
196
189
|
}));
|
197
190
|
case 'Checkbox':
|
198
|
-
return /*#__PURE__*/_jsx(
|
191
|
+
return /*#__PURE__*/_jsx(Checkbox.Group, _objectSpread(_objectSpread({}, omit(enumProps, ['fieldNames', 'showCodeName'])), {}, {
|
199
192
|
options: list,
|
200
193
|
value: value,
|
201
194
|
onChange: onChange,
|
202
|
-
children: list.map(item => /*#__PURE__*/_jsx(
|
195
|
+
children: list.map(item => /*#__PURE__*/_jsx(Checkbox, {
|
203
196
|
value: item[fieldValue],
|
204
197
|
disabled: !!item.disabled,
|
205
198
|
children: item[label]
|
@@ -228,7 +221,7 @@ var ProEnum = props => {
|
|
228
221
|
};
|
229
222
|
if (!code && !dataSource && !useRequest) {
|
230
223
|
var _locale$ProEnum4;
|
231
|
-
|
224
|
+
message.error(`${otherProps === null || otherProps === void 0 ? void 0 : otherProps.label}-${otherProps === null || otherProps === void 0 ? void 0 : otherProps.name}-${locale === null || locale === void 0 || (_locale$ProEnum4 = locale.ProEnum) === null || _locale$ProEnum4 === void 0 ? void 0 : _locale$ProEnum4.errorNoEnumType}`);
|
232
225
|
}
|
233
226
|
var transToLabel = value => {
|
234
227
|
var list = dataList && dataList.length ? dataList : enumLists;
|
@@ -261,7 +254,7 @@ var ProEnum = props => {
|
|
261
254
|
record.forEach(item => {
|
262
255
|
arr.push(props.optionRender(item));
|
263
256
|
});
|
264
|
-
return /*#__PURE__*/_jsx(
|
257
|
+
return /*#__PURE__*/_jsx(Space, {
|
265
258
|
direction: "vertical",
|
266
259
|
size: 4,
|
267
260
|
children: arr.map(item => /*#__PURE__*/_jsx(React.Fragment, {
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import "antd/es/tooltip/style";
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
3
1
|
import React from 'react';
|
2
|
+
import { Tooltip } from 'antd';
|
4
3
|
import classNames from 'classnames';
|
5
4
|
import { isEmptyArray } from "../utils";
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -17,7 +16,7 @@ var Container = props => {
|
|
17
16
|
'pro-form-view-container_nowrap': nowrap !== null && nowrap !== void 0 ? nowrap : tooltip
|
18
17
|
});
|
19
18
|
if (tooltip && !nullValue) {
|
20
|
-
return /*#__PURE__*/_jsx(
|
19
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
21
20
|
placement: "topLeft",
|
22
21
|
title: children,
|
23
22
|
children: /*#__PURE__*/_jsx("div", {
|
@@ -1,8 +1,5 @@
|
|
1
|
-
import "antd/es/space/style";
|
2
|
-
import _Space from "antd/es/space";
|
3
|
-
import "antd/es/button/style";
|
4
|
-
import _Button from "antd/es/button";
|
5
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import { Space, Button } from 'antd';
|
6
3
|
import React, { useEffect, useMemo } from 'react';
|
7
4
|
import { useProConfig } from "../../../ProConfigProvider";
|
8
5
|
import locale from "../../../locale";
|
@@ -70,8 +67,8 @@ var FormFooter = props => {
|
|
70
67
|
}
|
71
68
|
onCancel();
|
72
69
|
};
|
73
|
-
return /*#__PURE__*/_jsxs(
|
74
|
-
children: [/*#__PURE__*/_jsx(
|
70
|
+
return /*#__PURE__*/_jsxs(Space, {
|
71
|
+
children: [/*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
75
72
|
type: "primary",
|
76
73
|
htmlType: onOk ? 'button' : 'submit',
|
77
74
|
onClick: nextOnOk,
|
@@ -79,7 +76,7 @@ var FormFooter = props => {
|
|
79
76
|
loading: confirmLoading
|
80
77
|
}, okButtonProps), {}, {
|
81
78
|
children: okChildren || okText || `${locale.ProForm.search}`
|
82
|
-
})), /*#__PURE__*/_jsx(
|
79
|
+
})), /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
83
80
|
onClick: nextOnCancel
|
84
81
|
}, cancelButtonProps), {}, {
|
85
82
|
children: cancelChildren || cancelText || `${locale.ProForm.reset}`
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
-
import "antd/es/checkbox/style";
|
3
|
-
import _Checkbox from "antd/es/checkbox";
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
5
3
|
var _excluded = ["dataSource", "otherProps", "fieldNames"];
|
6
4
|
import React from 'react';
|
5
|
+
import { Checkbox as AntCheckbox } from 'antd';
|
7
6
|
import Container from "../../Container";
|
8
7
|
import { useProConfig } from "../../../../ProConfigProvider";
|
9
8
|
import ProForm from "../../../index";
|
@@ -59,13 +58,13 @@ var Checkbox = props => {
|
|
59
58
|
};
|
60
59
|
}
|
61
60
|
}
|
62
|
-
return /*#__PURE__*/_jsx(
|
61
|
+
return /*#__PURE__*/_jsx(AntCheckbox.Group, _objectSpread(_objectSpread({
|
63
62
|
style: {
|
64
63
|
width: '100%'
|
65
64
|
}
|
66
65
|
}, rest), {}, {
|
67
66
|
children: !!dataSource.length && dataSource.map(item => {
|
68
|
-
return /*#__PURE__*/_createElement(
|
67
|
+
return /*#__PURE__*/_createElement(AntCheckbox, _objectSpread(_objectSpread({}, item), {}, {
|
69
68
|
key: item[_fieldNames.value],
|
70
69
|
value: item[_fieldNames.value]
|
71
70
|
}), item[_fieldNames.label]);
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import "antd/es/date-picker/style";
|
2
|
-
import _DatePicker from "antd/es/date-picker";
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
5
3
|
var _excluded = ["className", "format"];
|
4
|
+
import { DatePicker as AntDatePicker } from 'antd';
|
6
5
|
import { isFunction, isString, isObject, omit } from 'lodash';
|
7
6
|
import classNames from 'classnames';
|
8
7
|
import dayjs from 'dayjs';
|
@@ -63,7 +62,7 @@ var DatePicker = props => {
|
|
63
62
|
if (isString(restProps.value)) {
|
64
63
|
restProps.value = dayjs(restProps.value);
|
65
64
|
}
|
66
|
-
return /*#__PURE__*/_jsx(
|
65
|
+
return /*#__PURE__*/_jsx(AntDatePicker, _objectSpread(_objectSpread(_objectSpread({}, initialConfig), {}, {
|
67
66
|
format: nextFormat
|
68
67
|
}, omit(restProps, ['otherProps'])), {}, {
|
69
68
|
className: nextClassName
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
-
import "antd/es/input/style";
|
3
|
-
import _Input from "antd/es/input";
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
5
3
|
var _excluded = ["label", "form", "placeholder", "fieldName", "otherProps", "desensitization"];
|
6
4
|
import React from 'react';
|
5
|
+
import { Input as AntInput } from 'antd';
|
7
6
|
import { isFunction, omit } from 'lodash';
|
8
7
|
import { useProConfig } from "../../../../ProConfigProvider";
|
9
8
|
import Container from "../../Container";
|
@@ -47,7 +46,7 @@ var Input = function Input(props) {
|
|
47
46
|
children: rest.value
|
48
47
|
});
|
49
48
|
}
|
50
|
-
var ComInput = /*#__PURE__*/_jsx(
|
49
|
+
var ComInput = /*#__PURE__*/_jsx(AntInput, _objectSpread(_objectSpread({
|
51
50
|
autoComplete: "off",
|
52
51
|
placeholder: placeholder || `${locale.ProForm.inputPlaceholder}`
|
53
52
|
}, omit(initialConfig, ['trim', 'upperCase'])), rest));
|
@@ -1,12 +1,9 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
-
import "antd/es/input-number/style";
|
3
|
-
import _InputNumber from "antd/es/input-number";
|
4
|
-
import "antd/es/space/style";
|
5
|
-
import _Space from "antd/es/space";
|
6
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
7
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
8
4
|
var _excluded = ["placeholder", "className", "otherProps", "range", "min", "max", "onBlur", "onFocus"];
|
9
5
|
import React, { useMemo, useRef } from 'react';
|
6
|
+
import { InputNumber as AntInputNumber, Space } from 'antd';
|
10
7
|
import classNames from 'classnames';
|
11
8
|
import Big from 'big.js';
|
12
9
|
import { tools } from '@zat-design/utils';
|
@@ -231,7 +228,7 @@ var InputNumber = props => {
|
|
231
228
|
case 'thousandthCNY':
|
232
229
|
return /*#__PURE__*/_jsx(Container, {
|
233
230
|
viewEmpty: viewEmpty,
|
234
|
-
children: /*#__PURE__*/_jsxs(
|
231
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
235
232
|
size: 4,
|
236
233
|
children: [_value || _value === 0 ? 'CNY' : '', tools.formatAmount(_value, precision)]
|
237
234
|
})
|
@@ -289,7 +286,7 @@ var InputNumber = props => {
|
|
289
286
|
activateRef.current = true;
|
290
287
|
onFocus === null || onFocus === void 0 || onFocus(e);
|
291
288
|
};
|
292
|
-
return /*#__PURE__*/_jsx(
|
289
|
+
return /*#__PURE__*/_jsx(AntInputNumber, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
293
290
|
autoComplete: "off",
|
294
291
|
placeholder: placeholder || `${locale.ProForm.inputPlaceholder}${label !== null && label !== void 0 ? label : ''}`,
|
295
292
|
className: _className
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
-
import "antd/es/radio/style";
|
3
|
-
import _Radio from "antd/es/radio";
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
5
3
|
var _excluded = ["dataSource", "fieldNames", "onChange", "value", "otherProps"];
|
4
|
+
import { Radio as AntRadio } from 'antd';
|
6
5
|
import React from 'react';
|
7
6
|
import { useProConfig } from "../../../../ProConfigProvider";
|
8
7
|
import Container from "../../Container";
|
@@ -51,13 +50,13 @@ var Radio = props => {
|
|
51
50
|
};
|
52
51
|
}
|
53
52
|
}
|
54
|
-
return /*#__PURE__*/_jsx(
|
53
|
+
return /*#__PURE__*/_jsx(AntRadio.Group, _objectSpread(_objectSpread({}, rest), {}, {
|
55
54
|
value: value,
|
56
55
|
onChange: e => {
|
57
56
|
_onChange(e, e.target.value);
|
58
57
|
},
|
59
58
|
children: !!(dataSource !== null && dataSource !== void 0 && dataSource.length) && dataSource.map(radioItem => {
|
60
|
-
return /*#__PURE__*/_jsx(
|
59
|
+
return /*#__PURE__*/_jsx(AntRadio, {
|
61
60
|
value: radioItem[_fieldNames.value],
|
62
61
|
children: radioItem[_fieldNames.label]
|
63
62
|
}, radioItem[_fieldNames.value]);
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
import "antd/es/date-picker/style";
|
4
|
-
import _DatePicker from "antd/es/date-picker"; // @ts-check
|
5
3
|
var _excluded = ["format", "otherProps", "separator", "range"];
|
4
|
+
// @ts-check
|
5
|
+
import { DatePicker } from 'antd';
|
6
6
|
import { isFunction, isObject, isString, omit, uniq } from 'lodash';
|
7
7
|
import dayjs from 'dayjs';
|
8
8
|
import React from 'react';
|
@@ -11,7 +11,7 @@ import ProForm from "../../../../ProForm";
|
|
11
11
|
import Container from "../../Container";
|
12
12
|
import { useDateRange } from "./useDateRange";
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
14
|
-
var AntRangePicker =
|
14
|
+
var AntRangePicker = DatePicker.RangePicker;
|
15
15
|
var RangePicker = props => {
|
16
16
|
var _props$format = props.format,
|
17
17
|
format = _props$format === void 0 ? 'YYYY-MM-DD' : _props$format,
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
-
import "antd/es/select/style";
|
3
|
-
import _Select from "antd/es/select";
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
5
3
|
var _excluded = ["dataSource", "fieldNames", "otherProps", "scrollFollowParent"];
|
4
|
+
import { Select as AntSelect } from 'antd';
|
6
5
|
import React from 'react';
|
7
6
|
import { isNumber } from 'lodash';
|
8
7
|
import Container from "../../Container";
|
@@ -51,7 +50,7 @@ var Select = props => {
|
|
51
50
|
children: value || isNumber(value) ? transToLabel([value]) : null
|
52
51
|
});
|
53
52
|
}
|
54
|
-
return /*#__PURE__*/_jsx(
|
53
|
+
return /*#__PURE__*/_jsx(AntSelect, _objectSpread(_objectSpread(_objectSpread({
|
55
54
|
placeholder: `${locale.ProForm.selectPlaceHolder}`,
|
56
55
|
allowClear: true,
|
57
56
|
getPopupContainer: trigger => {
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
-
import "antd/es/switch/style";
|
3
|
-
import _Switch from "antd/es/switch";
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
5
3
|
var _excluded = ["disabled", "otherProps"];
|
4
|
+
import { Switch as AntSwitch } from 'antd';
|
6
5
|
import React from 'react';
|
7
6
|
import { isNull, isUndefined } from 'lodash';
|
8
7
|
import { useProConfig } from "../../../../ProConfigProvider";
|
@@ -32,7 +31,7 @@ var Switch = props => {
|
|
32
31
|
children: res.checked === true ? `${locale.ProForm.switchText[0]}` : `${locale.ProForm.switchText[1]}`
|
33
32
|
});
|
34
33
|
}
|
35
|
-
return /*#__PURE__*/_jsx(
|
34
|
+
return /*#__PURE__*/_jsx(AntSwitch, _objectSpread(_objectSpread(_objectSpread({
|
36
35
|
disabled: disabled,
|
37
36
|
checkedChildren: `${locale.ProForm.switchText[0]}`,
|
38
37
|
unCheckedChildren: `${locale.ProForm.switchText[1]}`
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
-
import "antd/es/checkbox/style";
|
3
|
-
import _Checkbox from "antd/es/checkbox";
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
5
3
|
var _excluded = ["onChange", "disabled", "value", "otherProps", "className"];
|
6
4
|
import * as React from 'react';
|
5
|
+
import { Checkbox } from 'antd';
|
7
6
|
import { isNull, isUndefined } from 'lodash';
|
8
7
|
import classnames from 'classnames';
|
9
8
|
import { useProConfig } from "../../../../ProConfigProvider";
|
@@ -55,7 +54,7 @@ var SwitchCheckbox = props => {
|
|
55
54
|
'pro-switch-checkbox': true,
|
56
55
|
className
|
57
56
|
});
|
58
|
-
return /*#__PURE__*/_jsx(
|
57
|
+
return /*#__PURE__*/_jsx(Checkbox, _objectSpread(_objectSpread(_objectSpread({
|
59
58
|
disabled: disabled,
|
60
59
|
onChange: changeVal,
|
61
60
|
className: classNames
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
import "antd/es/input/style";
|
4
|
-
import _Input from "antd/es/input";
|
5
3
|
var _excluded = ["placeholder", "otherProps", "className", "tooltip"];
|
4
|
+
import { Input } from 'antd';
|
6
5
|
import { omit } from 'lodash';
|
7
6
|
import React from 'react';
|
8
7
|
import classnames from 'classnames';
|
@@ -12,7 +11,7 @@ import ProForm from "../../../../ProForm";
|
|
12
11
|
import Container from "../../Container";
|
13
12
|
import "./index.less";
|
14
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
15
|
-
var TextArea =
|
14
|
+
var TextArea = Input.TextArea;
|
16
15
|
var TextAreaDef = props => {
|
17
16
|
var _props$style;
|
18
17
|
var placeholder = props.placeholder,
|
@@ -1,15 +1,14 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
import "antd/es/date-picker/style";
|
4
|
-
import _DatePicker from "antd/es/date-picker";
|
5
3
|
var _excluded = ["format", "onChange", "value", "otherProps"];
|
6
4
|
import React from 'react';
|
5
|
+
import { DatePicker } from 'antd';
|
7
6
|
import dayjs from 'dayjs';
|
8
7
|
import { useProConfig } from "../../../../ProConfigProvider";
|
9
8
|
import Container from "../../Container";
|
10
9
|
import ProForm from "../../../../ProForm";
|
11
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
12
|
-
var AntTimePicker =
|
11
|
+
var AntTimePicker = DatePicker.TimePicker;
|
13
12
|
var TimePicker = props => {
|
14
13
|
var _props$format = props.format,
|
15
14
|
format = _props$format === void 0 ? 'HH:mm:ss' : _props$format,
|
@@ -1,15 +1,10 @@
|
|
1
|
-
import "antd/es/space/style";
|
2
|
-
import _Space from "antd/es/space";
|
3
|
-
import "antd/es/popconfirm/style";
|
4
|
-
import _Popconfirm from "antd/es/popconfirm";
|
5
|
-
import "antd/es/button/style";
|
6
|
-
import _Button from "antd/es/button";
|
7
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
8
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
9
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
10
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
11
5
|
var _excluded = ["label", "onClick", "onHandle", "type", "needConfirm", "confirmProps", "title"],
|
12
6
|
_excluded2 = ["onClick", "label"];
|
7
|
+
import { Button, Popconfirm, Space } from 'antd';
|
13
8
|
import { isFunction, omit } from 'lodash';
|
14
9
|
import classNames from 'classnames';
|
15
10
|
import React, { useMemo } from 'react';
|
@@ -186,7 +181,7 @@ var ActionButton = props => {
|
|
186
181
|
});
|
187
182
|
};
|
188
183
|
var defaultActions = useMemo(() => getDefaultActions(mode), [mode]);
|
189
|
-
return /*#__PURE__*/_jsx(
|
184
|
+
return /*#__PURE__*/_jsx(Space, {
|
190
185
|
align: "start",
|
191
186
|
className: "pro-form-list-action",
|
192
187
|
children: actionProps === null || actionProps === void 0 ? void 0 : actionProps.map(item => {
|
@@ -234,19 +229,19 @@ var ActionButton = props => {
|
|
234
229
|
if (index + 1 === fields.length && type === 'moveDown') {
|
235
230
|
return false;
|
236
231
|
}
|
237
|
-
return _needConfirm ? /*#__PURE__*/_jsx(
|
232
|
+
return _needConfirm ? /*#__PURE__*/_jsx(Popconfirm, _objectSpread(_objectSpread({
|
238
233
|
title: title !== null && title !== void 0 ? title : `${locale.ProForm.formListConfirmMessage}`,
|
239
234
|
onCancel: e => e.stopPropagation(),
|
240
235
|
onConfirm: e => {
|
241
236
|
handleClick(internalOnClick, _onClick, index, item);
|
242
237
|
}
|
243
238
|
}, _confirmProps), {}, {
|
244
|
-
children: /*#__PURE__*/_jsx(
|
239
|
+
children: /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread(_objectSpread({}, defaultRest), omit(rest, filterKeys)), {}, {
|
245
240
|
type: "text",
|
246
241
|
onClick: e => e.stopPropagation(),
|
247
242
|
children: label || defaultLabel
|
248
243
|
}))
|
249
|
-
}), `${item === null || item === void 0 ? void 0 : item.type}${index}`) : /*#__PURE__*/_jsx(
|
244
|
+
}), `${item === null || item === void 0 ? void 0 : item.type}${index}`) : /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread(_objectSpread({
|
250
245
|
className: classNames({
|
251
246
|
'pro-form-list-tool-btn': mode === 'line',
|
252
247
|
'pro-form-list-tool-btn-block': mode === 'block',
|
@@ -261,17 +256,17 @@ var ActionButton = props => {
|
|
261
256
|
children: label || defaultLabel
|
262
257
|
}), `${item === null || item === void 0 ? void 0 : item.type}${index}`);
|
263
258
|
}
|
264
|
-
return needConfirm ? /*#__PURE__*/_jsx(
|
259
|
+
return needConfirm ? /*#__PURE__*/_jsx(Popconfirm, _objectSpread(_objectSpread({
|
265
260
|
title: title !== null && title !== void 0 ? title : `${locale.ProForm.formListConfirmMessage}`,
|
266
261
|
onCancel: e => e.stopPropagation(),
|
267
262
|
onConfirm: () => customClick(_onClick, index)
|
268
263
|
}, _confirmProps), {}, {
|
269
|
-
children: /*#__PURE__*/_jsx(
|
264
|
+
children: /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, omit(rest, filterKeys)), {}, {
|
270
265
|
type: "text",
|
271
266
|
onClick: e => e.stopPropagation(),
|
272
267
|
children: label
|
273
268
|
}))
|
274
|
-
}), `${item === null || item === void 0 ? void 0 : item.type}${index}`) : /*#__PURE__*/_createElement(
|
269
|
+
}), `${item === null || item === void 0 ? void 0 : item.type}${index}`) : /*#__PURE__*/_createElement(Button, _objectSpread(_objectSpread({}, omit(rest, filterKeys)), {}, {
|
275
270
|
key: `${item === null || item === void 0 ? void 0 : item.type}${index}`,
|
276
271
|
type: "text",
|
277
272
|
onClick: e => {
|
@@ -1,7 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import _Space from "antd/es/space";
|
3
|
-
import "antd/es/row/style";
|
4
|
-
import _Row from "antd/es/row";
|
1
|
+
import { Row, Space } from 'antd';
|
5
2
|
import React, { useMemo } from 'react';
|
6
3
|
import { isFunction } from 'lodash';
|
7
4
|
import classNames from 'classnames';
|
@@ -42,7 +39,7 @@ var BlockFields = props => {
|
|
42
39
|
var cls = classNames({
|
43
40
|
[`pro-form-list-mode-${mode}`]: mode === 'block' || mode === 'line' || mode === 'less'
|
44
41
|
});
|
45
|
-
return /*#__PURE__*/_jsx(
|
42
|
+
return /*#__PURE__*/_jsx(Space, {
|
46
43
|
direction: "vertical",
|
47
44
|
className: cls,
|
48
45
|
id: id,
|
@@ -69,7 +66,7 @@ var BlockFields = props => {
|
|
69
66
|
disabled: disabled,
|
70
67
|
isView: isView
|
71
68
|
}),
|
72
|
-
children: /*#__PURE__*/_jsx(
|
69
|
+
children: /*#__PURE__*/_jsx(Row, {
|
73
70
|
gutter: 24,
|
74
71
|
children: /*#__PURE__*/_jsx(MemoRenderFields, {
|
75
72
|
columns: columns,
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import "antd/es/button/style";
|
2
|
-
import _Button from "antd/es/button";
|
3
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
4
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
3
|
+
import { Button } from 'antd';
|
5
4
|
import EmptyImg from "../../../../../assets/empty.png";
|
6
5
|
import locale from "../../../../../locale";
|
7
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -74,7 +73,7 @@ var Empty = _ref => {
|
|
74
73
|
className: "pro-form-list-empty-content",
|
75
74
|
children: disabled ? locale.ProForm.noData : /*#__PURE__*/_jsxs(_Fragment, {
|
76
75
|
children: [locale.ProForm.noData, !disabled && /*#__PURE__*/_jsxs(_Fragment, {
|
77
|
-
children: ["\uFF0C", /*#__PURE__*/_jsx(
|
76
|
+
children: ["\uFF0C", /*#__PURE__*/_jsx(Button, {
|
78
77
|
type: "link",
|
79
78
|
onClick: handleAddClick,
|
80
79
|
style: {
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import "antd/es/row/style";
|
2
|
-
import _Row from "antd/es/row";
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import { Row } from 'antd';
|
4
3
|
import React from 'react';
|
5
4
|
import classNames from 'classnames';
|
6
5
|
import { useSortable } from '@dnd-kit/sortable';
|
@@ -66,7 +65,7 @@ var LineFields = props => {
|
|
66
65
|
type: "drag",
|
67
66
|
buttonIcon: false
|
68
67
|
})
|
69
|
-
})), /*#__PURE__*/_jsx(
|
68
|
+
})), /*#__PURE__*/_jsx(Row, {
|
70
69
|
gutter: isLess ? 0 : 24,
|
71
70
|
children: /*#__PURE__*/_jsx(MemoRenderFields, {
|
72
71
|
columns: columns,
|
@@ -1,14 +1,11 @@
|
|
1
|
-
import "antd/es/space/style";
|
2
|
-
import _Space from "antd/es/space";
|
3
|
-
import "antd/es/button/style";
|
4
|
-
import _Button from "antd/es/button";
|
5
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
6
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
7
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
8
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
9
|
-
/* eslint-disable react/no-array-index-key */
|
10
5
|
var _excluded = ["label", "onClick", "onHandle", "type"],
|
11
6
|
_excluded2 = ["onClick", "label"];
|
7
|
+
/* eslint-disable react/no-array-index-key */
|
8
|
+
import { Space, Button } from 'antd';
|
12
9
|
import { PlusOutlined } from '@ant-design/icons';
|
13
10
|
import { isFunction, omit } from 'lodash';
|
14
11
|
import React, { useMemo } from 'react';
|
@@ -103,7 +100,7 @@ var ToolbarButton = props => {
|
|
103
100
|
namePath
|
104
101
|
});
|
105
102
|
};
|
106
|
-
return /*#__PURE__*/_jsx(
|
103
|
+
return /*#__PURE__*/_jsx(Space, {
|
107
104
|
align: "start",
|
108
105
|
className: "pro-form-list-toolbar",
|
109
106
|
children: toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.map((item, index) => {
|
@@ -130,13 +127,13 @@ var ToolbarButton = props => {
|
|
130
127
|
if (max && max <= fields.length && type === 'add') {
|
131
128
|
return false;
|
132
129
|
}
|
133
|
-
return /*#__PURE__*/_jsx(
|
130
|
+
return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread(_objectSpread({}, actions[type]), omit(rest, filterKeys)), {}, {
|
134
131
|
type: "link",
|
135
132
|
onClick: () => handleClick(internalOnClick, _onClick, item),
|
136
133
|
children: label || defaultLabel
|
137
134
|
}), `${type}${index}`);
|
138
135
|
}
|
139
|
-
return /*#__PURE__*/_jsx(
|
136
|
+
return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, omit(rest, filterKeys)), {}, {
|
140
137
|
type: "link",
|
141
138
|
onClick: () => customClick(_onClick2, item),
|
142
139
|
children: label
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import "antd/es/form/style";
|
2
|
-
import _Form from "antd/es/form";
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
4
2
|
import React, { forwardRef, useCallback, useImperativeHandle } from 'react';
|
3
|
+
import { Form } from 'antd';
|
5
4
|
import { DndContext } from '@dnd-kit/core';
|
6
5
|
import { get } from 'lodash';
|
7
6
|
import { SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
@@ -126,7 +125,7 @@ var FormList = (props, ref) => {
|
|
126
125
|
form: form,
|
127
126
|
namePath: _namePath,
|
128
127
|
emptyBtnText: emptyBtnText
|
129
|
-
}), /*#__PURE__*/_jsx(
|
128
|
+
}), /*#__PURE__*/_jsx(Form.ErrorList, {
|
130
129
|
errors: errors
|
131
130
|
}), toolbarProps !== false && _fields.length > 0 && /*#__PURE__*/_jsx(ToolbarButton, {
|
132
131
|
disabled: disabled,
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import "antd/es/space/style";
|
2
|
-
import _Space from "antd/es/space";
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import { Space } from 'antd';
|
4
3
|
import React from 'react';
|
5
4
|
import { isEmpty, omit } from 'lodash';
|
6
5
|
import classnames from 'classnames';
|
@@ -79,7 +78,7 @@ var Group = props => {
|
|
79
78
|
return /*#__PURE__*/_jsx("div", {
|
80
79
|
className: nextClassName,
|
81
80
|
id: id,
|
82
|
-
children: (space.compact || space !== null && space !== void 0 && space.separator) && !nextIsView ? /*#__PURE__*/_jsx(
|
81
|
+
children: (space.compact || space !== null && space !== void 0 && space.separator) && !nextIsView ? /*#__PURE__*/_jsx(Space.Compact, {
|
83
82
|
children: columns.map((column, index) => {
|
84
83
|
column.otherProps = otherProps;
|
85
84
|
// 自定义间隔移除对应参数
|
@@ -92,7 +91,7 @@ var Group = props => {
|
|
92
91
|
isView: nextIsView
|
93
92
|
}, column), column.name || index);
|
94
93
|
})
|
95
|
-
}) : /*#__PURE__*/_jsx(
|
94
|
+
}) : /*#__PURE__*/_jsx(Space, _objectSpread(_objectSpread({
|
96
95
|
align: "start"
|
97
96
|
}, omit(space, ['separator', 'compact'])), {}, {
|
98
97
|
split: nextIsView ? split : null,
|