@zat-design/sisyphus-react 4.0.0-beta.6 → 4.0.0-beta.8
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 +1 -1
- package/dist/less.esm.css +1 -1
- 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 +48 -14
- 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 +16 -19
- package/es/ProEditTable/propsType.d.ts +6 -0
- package/es/ProEditTable/utils/config.js +4 -5
- package/es/ProEditTable/utils/index.js +3 -6
- package/es/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/es/ProEditTable/utils/useShouldUpdateForTable.js +132 -0
- 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/components/render/RenderFields.js +2 -1
- package/es/ProForm/index.js +9 -16
- package/es/ProForm/propsType.d.ts +1 -0
- package/es/ProForm/utils/useForm.js +2 -3
- package/es/ProForm/utils/useShouldUpdate.js +1 -2
- 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/ProTabs/style/index.less +5 -1
- 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/es/utils/index.js +13 -1
- 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 +48 -14
- 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 +16 -19
- package/lib/ProEditTable/propsType.d.ts +6 -0
- package/lib/ProEditTable/utils/config.js +4 -5
- package/lib/ProEditTable/utils/index.js +3 -6
- package/lib/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/lib/ProEditTable/utils/useShouldUpdateForTable.js +139 -0
- 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/components/render/RenderFields.js +2 -1
- package/lib/ProForm/index.js +9 -16
- package/lib/ProForm/propsType.d.ts +1 -0
- package/lib/ProForm/utils/useForm.js +2 -3
- package/lib/ProForm/utils/useShouldUpdate.js +1 -2
- 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/ProTabs/style/index.less +5 -1
- 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/lib/utils/index.js +13 -1
- package/package.json +1 -2
|
@@ -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,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import "antd/es/button/style";
|
|
2
|
-
import _Button from "antd/es/button";
|
|
3
1
|
/* eslint-disable no-lonely-if */
|
|
4
2
|
|
|
5
3
|
import { isFunction } from 'lodash';
|
|
6
4
|
import { validate } from '@zat-design/utils';
|
|
5
|
+
import { Button } from 'antd';
|
|
7
6
|
import valueTypeMap from "../../../utils/valueType";
|
|
8
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
8
|
/**
|
|
@@ -38,7 +37,7 @@ export var insertSeparator = (columns, space) => {
|
|
|
38
37
|
if (index === separatorIndex) {
|
|
39
38
|
result.push({
|
|
40
39
|
separator: true,
|
|
41
|
-
component: /*#__PURE__*/_jsx(
|
|
40
|
+
component: /*#__PURE__*/_jsx(Button, {
|
|
42
41
|
className: "group-separator",
|
|
43
42
|
children: space.separator
|
|
44
43
|
}),
|
|
@@ -53,7 +52,7 @@ export var insertSeparator = (columns, space) => {
|
|
|
53
52
|
if (index < array.length - 1) {
|
|
54
53
|
result.push({
|
|
55
54
|
separator: true,
|
|
56
|
-
component: /*#__PURE__*/_jsx(
|
|
55
|
+
component: /*#__PURE__*/_jsx(Button, {
|
|
57
56
|
className: "group-separator",
|
|
58
57
|
children: space.separator
|
|
59
58
|
}),
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import "antd/es/tooltip/style";
|
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
|
3
|
-
import "antd/es/cascader/style";
|
|
4
|
-
import _Cascader from "antd/es/cascader";
|
|
5
|
-
import "antd/es/message/style";
|
|
6
|
-
import _message from "antd/es/message";
|
|
7
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
8
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
9
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
10
4
|
var _excluded = ["className", "hasDetail", "detailMaxLength", "fieldNames", "value", "disabled", "dataSource", "onChange", "useRequest", "transformResponse", "level", "isView", "enumCode", "code", "tooltip", "separator", "detailPlaceholder", "scrollFollowParent", "desensitization", "otherProps"];
|
|
11
5
|
import { useEffect, useState, memo, useMemo, useCallback } from 'react';
|
|
6
|
+
import { Cascader, Tooltip, message } from 'antd';
|
|
12
7
|
import { omit, find as _find, isBoolean, isEqual } from 'lodash';
|
|
13
8
|
import { useRequest as useRequestFunc, useDeepCompareEffect } from 'ahooks';
|
|
14
9
|
import { transformDataName } from "./utils/index";
|
|
@@ -130,7 +125,7 @@ var ProCascader = props => {
|
|
|
130
125
|
msg = _ref4.message,
|
|
131
126
|
data = _ref4.data;
|
|
132
127
|
if (status !== 200) {
|
|
133
|
-
|
|
128
|
+
message.error(msg);
|
|
134
129
|
return;
|
|
135
130
|
}
|
|
136
131
|
var newData = data;
|
|
@@ -157,7 +152,7 @@ var ProCascader = props => {
|
|
|
157
152
|
msg = _ref5.message,
|
|
158
153
|
data = _ref5.data;
|
|
159
154
|
if (status !== 200) {
|
|
160
|
-
|
|
155
|
+
message.error(msg);
|
|
161
156
|
return;
|
|
162
157
|
}
|
|
163
158
|
return data;
|
|
@@ -313,7 +308,7 @@ var ProCascader = props => {
|
|
|
313
308
|
children: viewValue
|
|
314
309
|
}) : /*#__PURE__*/_jsxs("div", {
|
|
315
310
|
className: `pro-address ${className}`,
|
|
316
|
-
children: [/*#__PURE__*/_jsx(
|
|
311
|
+
children: [/*#__PURE__*/_jsx(Cascader, _objectSpread({
|
|
317
312
|
className: hasDetail ? '' : 'no-detail',
|
|
318
313
|
placeholder: locale === null || locale === void 0 || (_locale$ProAddressBar = locale.ProAddressBar) === null || _locale$ProAddressBar === void 0 ? void 0 : _locale$ProAddressBar.placeholder,
|
|
319
314
|
value: addressValue,
|
|
@@ -329,7 +324,7 @@ var ProCascader = props => {
|
|
|
329
324
|
getPopupContainer: trigger => {
|
|
330
325
|
return scrollFollowParent ? trigger.parentElement : document.body;
|
|
331
326
|
}
|
|
332
|
-
}, omit(restProps, ['otherProps', 'scrollFollowParent']))), hasDetail && (tooltip && lastDisabled[1] && detail ? /*#__PURE__*/_jsx(
|
|
327
|
+
}, omit(restProps, ['otherProps', 'scrollFollowParent']))), hasDetail && (tooltip && lastDisabled[1] && detail ? /*#__PURE__*/_jsx(Tooltip, {
|
|
333
328
|
title: detail,
|
|
334
329
|
children: /*#__PURE__*/_jsx("span", {
|
|
335
330
|
className: "pro-address-detail",
|
|
@@ -1,27 +1,14 @@
|
|
|
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
|
-
import "antd/es/tooltip/style";
|
|
6
|
-
import _Tooltip from "antd/es/tooltip";
|
|
7
|
-
import "antd/es/input/style";
|
|
8
|
-
import _Input from "antd/es/input";
|
|
9
|
-
import "antd/es/spin/style";
|
|
10
|
-
import _Spin from "antd/es/spin";
|
|
11
|
-
import "antd/es/message/style";
|
|
12
|
-
import _message from "antd/es/message";
|
|
13
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
14
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
15
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
16
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
17
|
-
import "antd/es/form/style";
|
|
18
|
-
import _Form from "antd/es/form";
|
|
19
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
20
6
|
var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames", "readOnly", "mode", "addonAfter", "configOption", "title", "onFormat", "showCodeName", "optionRender", "customRender", "style", "className", "beforeOpen", "afterOpen", "isTooltip", "tooltip", "searchForm", "searchKey", "defaultOne", "otherProps"],
|
|
21
7
|
_excluded2 = ["onOk"],
|
|
22
8
|
_excluded3 = ["rowKey", "columns", "rowSelection"];
|
|
23
9
|
import { SearchOutlined } from '@ant-design/icons';
|
|
24
10
|
import { useDebounceEffect, useDeepCompareEffect, useMount, useSetState } from 'ahooks';
|
|
11
|
+
import { Form, message, Input, Tooltip, Space, Button, Spin } from 'antd';
|
|
25
12
|
import { debounce, isArray, isBoolean, isEqual, isFunction, isObject } from 'lodash';
|
|
26
13
|
import classNames from 'classnames';
|
|
27
14
|
import { ReactSVG } from 'react-svg';
|
|
@@ -72,7 +59,7 @@ var ProModalSelect = (props, ref) => {
|
|
|
72
59
|
}
|
|
73
60
|
return mode;
|
|
74
61
|
}, [mode, readOnly]);
|
|
75
|
-
var contentForm =
|
|
62
|
+
var contentForm = Form.useFormInstance();
|
|
76
63
|
if (!configOption || Object.prototype.toString.call(configOption) !== '[object Object]') {
|
|
77
64
|
throw new Error('error: 请检查枚举选择弹框的配置项【configOption】');
|
|
78
65
|
}
|
|
@@ -147,7 +134,7 @@ var ProModalSelect = (props, ref) => {
|
|
|
147
134
|
_selectedRows = _useSetState2$.selectedRows,
|
|
148
135
|
_selectedRowKeys = _useSetState2$.selectedRowKeys,
|
|
149
136
|
setState = _useSetState2[1];
|
|
150
|
-
var _Form$useForm =
|
|
137
|
+
var _Form$useForm = Form.useForm(searchForm),
|
|
151
138
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
152
139
|
form = _Form$useForm2[0];
|
|
153
140
|
var selectedRows = (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || _selectedRows;
|
|
@@ -355,7 +342,7 @@ var ProModalSelect = (props, ref) => {
|
|
|
355
342
|
_context2.next = 4;
|
|
356
343
|
break;
|
|
357
344
|
}
|
|
358
|
-
|
|
345
|
+
message.error(locale.ProModalSelect.checkMsg);
|
|
359
346
|
return _context2.abrupt("return", false);
|
|
360
347
|
case 4:
|
|
361
348
|
nextSelectedRows = selectedRows;
|
|
@@ -753,7 +740,7 @@ var ProModalSelect = (props, ref) => {
|
|
|
753
740
|
}, [value, _value]);
|
|
754
741
|
|
|
755
742
|
// 加个中间状态Input
|
|
756
|
-
var initRender = /*#__PURE__*/_jsxs(
|
|
743
|
+
var initRender = /*#__PURE__*/_jsxs(Space.Compact, {
|
|
757
744
|
style: {
|
|
758
745
|
width: '100%'
|
|
759
746
|
},
|
|
@@ -769,7 +756,7 @@ var ProModalSelect = (props, ref) => {
|
|
|
769
756
|
optionRender: optionRender,
|
|
770
757
|
scrollFollowParent: false,
|
|
771
758
|
mode: isMultiple ? 'multiple' : undefined,
|
|
772
|
-
notFoundContent: selectLoading ? /*#__PURE__*/_jsx(
|
|
759
|
+
notFoundContent: selectLoading ? /*#__PURE__*/_jsx(Spin, {
|
|
773
760
|
size: "small"
|
|
774
761
|
}) : null,
|
|
775
762
|
onFocus: handleSelectFocus,
|
|
@@ -778,17 +765,17 @@ var ProModalSelect = (props, ref) => {
|
|
|
778
765
|
style: {
|
|
779
766
|
width: isView || disabled ? '100%' : 'calc(100% - 30px)'
|
|
780
767
|
}
|
|
781
|
-
}, restProps)) : /*#__PURE__*/_jsx(
|
|
768
|
+
}, restProps)) : /*#__PURE__*/_jsx(Tooltip, {
|
|
782
769
|
title: _tooltip ? viewText : null,
|
|
783
770
|
placement: "topLeft",
|
|
784
|
-
children: /*#__PURE__*/_jsx(
|
|
771
|
+
children: /*#__PURE__*/_jsx(Input, _objectSpread({
|
|
785
772
|
value: viewText,
|
|
786
773
|
onChange: handleChangeValue,
|
|
787
774
|
disabled: disabled,
|
|
788
775
|
autoComplete: "off",
|
|
789
776
|
allowClear: true
|
|
790
777
|
}, restProps))
|
|
791
|
-
}), isView || disabled ? null : /*#__PURE__*/_jsx(
|
|
778
|
+
}), isView || disabled ? null : /*#__PURE__*/_jsx(Button, {
|
|
792
779
|
onClick: handleClick,
|
|
793
780
|
icon: /*#__PURE__*/_jsx(ReactSVG, {
|
|
794
781
|
className: "viewSvg",
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import "antd/es/input/style";
|
|
2
|
-
import _Input from "antd/es/input";
|
|
3
|
-
import "antd/es/button/style";
|
|
4
|
-
import _Button from "antd/es/button";
|
|
5
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
|
-
import "antd/es/input-number/style";
|
|
7
|
-
import _InputNumber from "antd/es/input-number";
|
|
8
|
-
import "antd/es/space/style";
|
|
9
|
-
import _Space from "antd/es/space";
|
|
10
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
11
3
|
import { useSetState, useDeepCompareEffect } from 'ahooks';
|
|
4
|
+
import { Button, Input, InputNumber, Space } from 'antd';
|
|
12
5
|
import { isEqual, isEmpty } from 'lodash';
|
|
13
6
|
import { memo } from 'react';
|
|
14
7
|
import classnames from 'classnames';
|
|
@@ -102,7 +95,7 @@ var ProNumberRange = props => {
|
|
|
102
95
|
case 'percentage':
|
|
103
96
|
return /*#__PURE__*/_jsx(Container, {
|
|
104
97
|
viewEmpty: viewEmpty,
|
|
105
|
-
children: /*#__PURE__*/_jsxs(
|
|
98
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
106
99
|
split: split,
|
|
107
100
|
children: [/*#__PURE__*/_jsx("span", {
|
|
108
101
|
children: formatAmount(value[0], precision || decimal)
|
|
@@ -115,7 +108,7 @@ var ProNumberRange = props => {
|
|
|
115
108
|
case 'permillage':
|
|
116
109
|
return /*#__PURE__*/_jsx(Container, {
|
|
117
110
|
viewEmpty: viewEmpty,
|
|
118
|
-
children: /*#__PURE__*/_jsxs(
|
|
111
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
119
112
|
split: split,
|
|
120
113
|
children: [/*#__PURE__*/_jsx("span", {
|
|
121
114
|
children: formatAmount(value[0], precision || decimal)
|
|
@@ -129,7 +122,7 @@ var ProNumberRange = props => {
|
|
|
129
122
|
case 'thousandth':
|
|
130
123
|
return /*#__PURE__*/_jsx(Container, {
|
|
131
124
|
viewEmpty: viewEmpty,
|
|
132
|
-
children: /*#__PURE__*/_jsxs(
|
|
125
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
133
126
|
split: split,
|
|
134
127
|
children: [/*#__PURE__*/_jsx("span", {
|
|
135
128
|
children: formatAmount(value[0], precision || decimal)
|
|
@@ -141,7 +134,7 @@ var ProNumberRange = props => {
|
|
|
141
134
|
default:
|
|
142
135
|
return /*#__PURE__*/_jsx(Container, {
|
|
143
136
|
viewEmpty: viewEmpty,
|
|
144
|
-
children: /*#__PURE__*/_jsxs(
|
|
137
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
145
138
|
split: split,
|
|
146
139
|
children: [/*#__PURE__*/_jsx("span", {
|
|
147
140
|
children: value[0] || '-'
|
|
@@ -203,10 +196,10 @@ var ProNumberRange = props => {
|
|
|
203
196
|
}
|
|
204
197
|
return result;
|
|
205
198
|
};
|
|
206
|
-
return /*#__PURE__*/_jsx(
|
|
199
|
+
return /*#__PURE__*/_jsx(Space, {
|
|
207
200
|
className: cls,
|
|
208
|
-
children: /*#__PURE__*/_jsxs(
|
|
209
|
-
children: [/*#__PURE__*/_jsx(
|
|
201
|
+
children: /*#__PURE__*/_jsxs(Space.Compact, {
|
|
202
|
+
children: [/*#__PURE__*/_jsx(InputNumber, _objectSpread(_objectSpread({
|
|
210
203
|
id: id,
|
|
211
204
|
className: "range-left",
|
|
212
205
|
value: (value === null || value === void 0 ? void 0 : value[0]) || range[0],
|
|
@@ -219,18 +212,18 @@ var ProNumberRange = props => {
|
|
|
219
212
|
}, valueProps), {}, {
|
|
220
213
|
min: min !== null && min !== void 0 ? min : (_valueProps = valueProps) === null || _valueProps === void 0 ? void 0 : _valueProps.min,
|
|
221
214
|
max: (_ref2 = (_ref3 = (_value$ = value === null || value === void 0 ? void 0 : value[1]) !== null && _value$ !== void 0 ? _value$ : range[1]) !== null && _ref3 !== void 0 ? _ref3 : max) !== null && _ref2 !== void 0 ? _ref2 : (_valueProps2 = valueProps) === null || _valueProps2 === void 0 ? void 0 : _valueProps2.max
|
|
222
|
-
}, childProps === null || childProps === void 0 ? void 0 : childProps[0])), addonBefore ? /*#__PURE__*/_jsx(
|
|
215
|
+
}, childProps === null || childProps === void 0 ? void 0 : childProps[0])), addonBefore ? /*#__PURE__*/_jsx(Button, {
|
|
223
216
|
disabled: true,
|
|
224
217
|
className: "range-addon-before",
|
|
225
218
|
children: addonBefore
|
|
226
|
-
}) : null, /*#__PURE__*/_jsx(
|
|
219
|
+
}) : null, /*#__PURE__*/_jsx(Input, {
|
|
227
220
|
className: classnames({
|
|
228
221
|
'range-split': true,
|
|
229
222
|
'range-split-disabled': !!disabled
|
|
230
223
|
}),
|
|
231
224
|
placeholder: split,
|
|
232
225
|
disabled: true
|
|
233
|
-
}), /*#__PURE__*/_jsx(
|
|
226
|
+
}), /*#__PURE__*/_jsx(InputNumber, _objectSpread(_objectSpread({
|
|
234
227
|
className: "range-right",
|
|
235
228
|
value: (value === null || value === void 0 ? void 0 : value[1]) || range[1],
|
|
236
229
|
placeholder: `${locale.ProForm.inputPlaceholder}`,
|
|
@@ -242,7 +235,7 @@ var ProNumberRange = props => {
|
|
|
242
235
|
}, valueProps), {}, {
|
|
243
236
|
min: (_ref4 = (_ref5 = (_value$2 = value === null || value === void 0 ? void 0 : value[0]) !== null && _value$2 !== void 0 ? _value$2 : range[0]) !== null && _ref5 !== void 0 ? _ref5 : min) !== null && _ref4 !== void 0 ? _ref4 : (_valueProps3 = valueProps) === null || _valueProps3 === void 0 ? void 0 : _valueProps3.min,
|
|
244
237
|
max: max !== null && max !== void 0 ? max : (_valueProps4 = valueProps) === null || _valueProps4 === void 0 ? void 0 : _valueProps4.max
|
|
245
|
-
}, childProps === null || childProps === void 0 ? void 0 : childProps[1])), addonAfter ? /*#__PURE__*/_jsx(
|
|
238
|
+
}, childProps === null || childProps === void 0 ? void 0 : childProps[1])), addonAfter ? /*#__PURE__*/_jsx(Button, {
|
|
246
239
|
disabled: true,
|
|
247
240
|
className: "range-addon-after",
|
|
248
241
|
children: addonAfter
|