@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
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
.pro-tabs-card-left {
|
|
7
7
|
width: 84px !important;
|
|
8
8
|
}
|
|
9
|
+
.pro-tabs-card-right {
|
|
10
|
+
width: 24px !important;
|
|
11
|
+
}
|
|
9
12
|
.pro-tabs-card-right img {
|
|
10
13
|
width: 24px !important;
|
|
11
14
|
}
|
|
@@ -94,7 +97,7 @@
|
|
|
94
97
|
|
|
95
98
|
.pro-tabs-card-right {
|
|
96
99
|
display: flex;
|
|
97
|
-
|
|
100
|
+
width: 48px;
|
|
98
101
|
img {
|
|
99
102
|
width: 48px;
|
|
100
103
|
}
|
|
@@ -123,6 +126,7 @@
|
|
|
123
126
|
width: 200px;
|
|
124
127
|
padding: calc(9px * var(--zaui-size; 1)) 16px calc(9px * var(--zaui-size; 1)) 24px;
|
|
125
128
|
border: 1px solid var(--zaui-line, #dddddd);
|
|
129
|
+
border-radius: var(--zaui-border-radius, 8px);
|
|
126
130
|
|
|
127
131
|
.pro-tabs-card-left {
|
|
128
132
|
width: 104px;
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import "antd/es/button/style";
|
|
2
|
-
import _Button from "antd/es/button";
|
|
3
|
-
import "antd/es/switch/style";
|
|
4
|
-
import _Switch from "antd/es/switch";
|
|
5
|
-
import "antd/es/radio/style";
|
|
6
|
-
import _Radio from "antd/es/radio";
|
|
7
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
8
|
-
import "antd/es/drawer/style";
|
|
9
|
-
import _Drawer from "antd/es/drawer";
|
|
10
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
11
3
|
import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
|
|
4
|
+
import { Button, Drawer, Radio, Switch } from 'antd';
|
|
12
5
|
import React, { useState, useEffect } from 'react';
|
|
13
6
|
import { setThemes } from "../../utils/index";
|
|
14
7
|
import { useProConfig } from "../../../ProConfigProvider";
|
|
@@ -21,7 +14,7 @@ var connect = function connect(Component) {
|
|
|
21
14
|
};
|
|
22
15
|
return ComponentWrapper;
|
|
23
16
|
};
|
|
24
|
-
var NewDrawer = connect(
|
|
17
|
+
var NewDrawer = connect(Drawer);
|
|
25
18
|
var ProTools = _ref => {
|
|
26
19
|
var onReset = _ref.onReset,
|
|
27
20
|
onClose = _ref.onClose,
|
|
@@ -142,7 +135,7 @@ var ProTools = _ref => {
|
|
|
142
135
|
})
|
|
143
136
|
}), /*#__PURE__*/_jsx("div", {
|
|
144
137
|
className: "pro-theme-tools-item",
|
|
145
|
-
children: /*#__PURE__*/_jsxs(
|
|
138
|
+
children: /*#__PURE__*/_jsxs(Radio.Group, {
|
|
146
139
|
value: state.zauiSize,
|
|
147
140
|
onChange: e => {
|
|
148
141
|
setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
@@ -152,13 +145,13 @@ var ProTools = _ref => {
|
|
|
152
145
|
'zaui-size': e.target.value
|
|
153
146
|
});
|
|
154
147
|
},
|
|
155
|
-
children: [/*#__PURE__*/_jsx(
|
|
148
|
+
children: [/*#__PURE__*/_jsx(Radio.Button, {
|
|
156
149
|
value: 0.5,
|
|
157
150
|
children: `${locale.ProThemeTools.layoutMode[0]}`
|
|
158
|
-
}), /*#__PURE__*/_jsx(
|
|
151
|
+
}), /*#__PURE__*/_jsx(Radio.Button, {
|
|
159
152
|
value: 1,
|
|
160
153
|
children: `${locale.ProThemeTools.layoutMode[1]}`
|
|
161
|
-
}), /*#__PURE__*/_jsx(
|
|
154
|
+
}), /*#__PURE__*/_jsx(Radio.Button, {
|
|
162
155
|
value: 1.5,
|
|
163
156
|
children: `${locale.ProThemeTools.layoutMode[2]}`
|
|
164
157
|
})]
|
|
@@ -173,7 +166,7 @@ var ProTools = _ref => {
|
|
|
173
166
|
})
|
|
174
167
|
}), /*#__PURE__*/_jsx("div", {
|
|
175
168
|
className: "pro-theme-tools-item",
|
|
176
|
-
children: /*#__PURE__*/_jsxs(
|
|
169
|
+
children: /*#__PURE__*/_jsxs(Radio.Group, {
|
|
177
170
|
value: state.zauiFormAlign,
|
|
178
171
|
onChange: e => {
|
|
179
172
|
setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
@@ -192,10 +185,10 @@ var ProTools = _ref => {
|
|
|
192
185
|
}
|
|
193
186
|
});
|
|
194
187
|
},
|
|
195
|
-
children: [/*#__PURE__*/_jsx(
|
|
188
|
+
children: [/*#__PURE__*/_jsx(Radio.Button, {
|
|
196
189
|
value: "left",
|
|
197
190
|
children: `${locale.ProThemeTools.flex[0]}`
|
|
198
|
-
}), /*#__PURE__*/_jsx(
|
|
191
|
+
}), /*#__PURE__*/_jsx(Radio.Button, {
|
|
199
192
|
value: "right",
|
|
200
193
|
children: `${locale.ProThemeTools.flex[1]}`
|
|
201
194
|
})]
|
|
@@ -210,7 +203,7 @@ var ProTools = _ref => {
|
|
|
210
203
|
})
|
|
211
204
|
}), /*#__PURE__*/_jsx("div", {
|
|
212
205
|
className: "pro-theme-tools-item",
|
|
213
|
-
children: /*#__PURE__*/_jsx(
|
|
206
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
|
214
207
|
checkedChildren: `${locale.ProThemeTools.switchText[0]}`,
|
|
215
208
|
unCheckedChildren: `${locale.ProThemeTools.switchText[1]}`,
|
|
216
209
|
checked: state.zauiTableBorder,
|
|
@@ -233,7 +226,7 @@ var ProTools = _ref => {
|
|
|
233
226
|
})
|
|
234
227
|
}), /*#__PURE__*/_jsx("div", {
|
|
235
228
|
className: "pro-theme-tools-item",
|
|
236
|
-
children: /*#__PURE__*/_jsx(
|
|
229
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
|
237
230
|
checkedChildren: `${locale.ProThemeTools.switchText[0]}`,
|
|
238
231
|
unCheckedChildren: `${locale.ProThemeTools.switchText[1]}`,
|
|
239
232
|
checked: state.zauiStripe,
|
|
@@ -248,7 +241,7 @@ var ProTools = _ref => {
|
|
|
248
241
|
}
|
|
249
242
|
})
|
|
250
243
|
})]
|
|
251
|
-
}), /*#__PURE__*/_jsx(
|
|
244
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
252
245
|
className: "copy-btn",
|
|
253
246
|
onClick: () => {
|
|
254
247
|
setActive([{
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import "antd/es/message/style";
|
|
2
|
-
import _message from "antd/es/message";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
4
|
var _excluded = ["size", "className", "cacheTime", "color", "mode", "iconFollowTheme", "prefixCls", "tableBorder", "tableStripe", "theme", "onChange"];
|
|
7
5
|
/* eslint-disable prefer-const */
|
|
6
|
+
import { message } from 'antd';
|
|
8
7
|
import { useEffect, useState } from 'react';
|
|
9
8
|
import { usePrevious, useUpdateEffect, useToggle } from 'ahooks';
|
|
10
9
|
import { ReactSVG } from 'react-svg';
|
|
@@ -122,7 +121,7 @@ var ProThemeTools = _ref => {
|
|
|
122
121
|
input.select();
|
|
123
122
|
if (document.execCommand('copy')) {
|
|
124
123
|
document.execCommand('copy');
|
|
125
|
-
|
|
124
|
+
message.success(`${locale.ProThemeTools.copySuccess}`);
|
|
126
125
|
}
|
|
127
126
|
document.body.removeChild(input);
|
|
128
127
|
};
|
package/es/ProTooltip/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import "antd/es/tooltip/style";
|
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
4
|
var _excluded = ["text", "mode", "width", "line", "className", "style", "lineHeight", "scrollFollowParent"];
|
|
7
5
|
import { useSize, useSetState, useDebounce } from 'ahooks';
|
|
6
|
+
import { Tooltip } from 'antd';
|
|
8
7
|
import { useEffect, useRef } from 'react';
|
|
9
8
|
import classnames from 'classnames';
|
|
10
9
|
import { isEllipsisActive } from "../utils";
|
|
@@ -72,7 +71,7 @@ var ProTooltip = props => {
|
|
|
72
71
|
WebkitLineClamp: line
|
|
73
72
|
} : {};
|
|
74
73
|
var AutoMixinSingle = () => {
|
|
75
|
-
return isShowToolTip && line === 1 ? /*#__PURE__*/_jsx(
|
|
74
|
+
return isShowToolTip && line === 1 ? /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
76
75
|
title: text,
|
|
77
76
|
getPopupContainer: triggerNode => triggerNode.parentNode
|
|
78
77
|
}, restProps), {}, {
|
|
@@ -107,7 +106,7 @@ var ProTooltip = props => {
|
|
|
107
106
|
});
|
|
108
107
|
};
|
|
109
108
|
var AutoMixinMulti = () => {
|
|
110
|
-
return isShowToolTip && line > 1 ? /*#__PURE__*/_jsx(
|
|
109
|
+
return isShowToolTip && line > 1 ? /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
111
110
|
title: text,
|
|
112
111
|
getPopupContainer: triggerNode => triggerNode.parentNode
|
|
113
112
|
}, restProps), {}, {
|
|
@@ -247,7 +246,7 @@ var ProTooltip = props => {
|
|
|
247
246
|
});
|
|
248
247
|
};
|
|
249
248
|
var renderTooltipContent = () => {
|
|
250
|
-
return /*#__PURE__*/_jsx(
|
|
249
|
+
return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
251
250
|
title: text,
|
|
252
251
|
getPopupContainer: triggerNode => {
|
|
253
252
|
// 修复scrollFollowParent为false时tooltip不显示的问题
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
|
1
|
+
import { Tooltip } from 'antd';
|
|
3
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
3
|
var AdaptiveTooltip = _ref => {
|
|
5
4
|
var children = _ref.children;
|
|
6
|
-
return /*#__PURE__*/_jsx(
|
|
5
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
|
7
6
|
placement: "rightTop",
|
|
8
7
|
title: /*#__PURE__*/_jsx("div", {
|
|
9
8
|
onMouseDown: e => e.stopPropagation(),
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import "antd/es/checkbox/style";
|
|
2
|
-
import _Checkbox from "antd/es/checkbox";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
3
|
var _excluded = ["checkedValues", "disabled", "treeData", "searchStr", "showCodeName", "mode", "fieldNames", "handleOnChange", "handleFilterClose", "optionRender"];
|
|
6
4
|
import { memo } from 'react';
|
|
5
|
+
import { Checkbox } from 'antd';
|
|
7
6
|
import SearchTitle from "./SearchTitle";
|
|
8
7
|
import CloseIcon from "./CloseIcon";
|
|
9
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -26,7 +25,7 @@ function List(props) {
|
|
|
26
25
|
var fieldNameValue = fieldNames.value;
|
|
27
26
|
if (mode === 'render') {
|
|
28
27
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
29
|
-
children: /*#__PURE__*/_jsx(
|
|
28
|
+
children: /*#__PURE__*/_jsx(Checkbox.Group, {
|
|
30
29
|
disabled: disabled,
|
|
31
30
|
style: {
|
|
32
31
|
width: '100%'
|
|
@@ -36,7 +35,7 @@ function List(props) {
|
|
|
36
35
|
var title = showCodeName ? `${item[fieldNameValue]}-${item[fieldNameLabel]}` : item[fieldNameLabel];
|
|
37
36
|
return /*#__PURE__*/_jsx("div", {
|
|
38
37
|
className: "pro-tree-checkbox-content",
|
|
39
|
-
children: /*#__PURE__*/_jsx(
|
|
38
|
+
children: /*#__PURE__*/_jsx(Checkbox, {
|
|
40
39
|
onChange: e => handleOnChange(e, item[fieldNameValue]),
|
|
41
40
|
value: item[fieldNameValue],
|
|
42
41
|
disabled: item.disabled,
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import "antd/es/spin/style";
|
|
2
|
-
import _Spin from "antd/es/spin";
|
|
3
|
-
import "antd/es/checkbox/style";
|
|
4
|
-
import _Checkbox from "antd/es/checkbox";
|
|
5
|
-
import "antd/es/input/style";
|
|
6
|
-
import _Input from "antd/es/input";
|
|
7
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
8
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
9
|
-
import "antd/es/message/style";
|
|
10
|
-
import _message from "antd/es/message";
|
|
11
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
12
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
13
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
@@ -16,6 +8,7 @@ import { useEffect } from 'react';
|
|
|
16
8
|
import classNames from 'classnames';
|
|
17
9
|
import { CaretDownOutlined, Loading3QuartersOutlined } from '@ant-design/icons';
|
|
18
10
|
import { useDeepCompareEffect, useSetState, useRequest as useRequestFunc } from 'ahooks';
|
|
11
|
+
import { Checkbox, Input, message, Spin } from 'antd';
|
|
19
12
|
import { cloneDeep, isFunction } from 'lodash';
|
|
20
13
|
import { ReactSVG } from 'react-svg';
|
|
21
14
|
import { useProConfig } from "../../ProConfigProvider";
|
|
@@ -117,7 +110,7 @@ var ProTree = props => {
|
|
|
117
110
|
msg = res.message,
|
|
118
111
|
data = res.data;
|
|
119
112
|
if (status !== 200) {
|
|
120
|
-
|
|
113
|
+
message.error(msg);
|
|
121
114
|
return;
|
|
122
115
|
}
|
|
123
116
|
var _flatTrees = getFlatTreeData(data, fieldNames);
|
|
@@ -426,14 +419,14 @@ var ProTree = props => {
|
|
|
426
419
|
return /*#__PURE__*/_jsx("div", {
|
|
427
420
|
className: boxClass,
|
|
428
421
|
style: style,
|
|
429
|
-
children: /*#__PURE__*/_jsx(
|
|
422
|
+
children: /*#__PURE__*/_jsx(Spin, {
|
|
430
423
|
spinning: state.clickShowLoading,
|
|
431
424
|
indicator: antIcon,
|
|
432
425
|
children: /*#__PURE__*/_jsxs("div", {
|
|
433
426
|
className: "pro-tree-content",
|
|
434
427
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
435
428
|
className: "pro-tree-header-box",
|
|
436
|
-
children: [showSearch && /*#__PURE__*/_jsx(
|
|
429
|
+
children: [showSearch && /*#__PURE__*/_jsx(Input, {
|
|
437
430
|
disabled: disabled,
|
|
438
431
|
allowClear: true,
|
|
439
432
|
value: state.searchStr,
|
|
@@ -481,7 +474,7 @@ var ProTree = props => {
|
|
|
481
474
|
className: allValue || footer ? 'pro-tree-footer-box' : '',
|
|
482
475
|
children: [/*#__PURE__*/_jsx("div", {
|
|
483
476
|
className: "check-all-box",
|
|
484
|
-
children: allValue !== undefined ? /*#__PURE__*/_jsx(
|
|
477
|
+
children: allValue !== undefined ? /*#__PURE__*/_jsx(Checkbox, {
|
|
485
478
|
checked: state.checkAll,
|
|
486
479
|
disabled: disabled,
|
|
487
480
|
onChange: handleAllCheck,
|
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
import "antd/es/tooltip/style";
|
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
|
3
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
4
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
5
|
-
import "antd/es/input/style";
|
|
6
|
-
import _Input from "antd/es/input";
|
|
7
|
-
import "antd/es/message/style";
|
|
8
|
-
import _message from "antd/es/message";
|
|
9
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
10
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
11
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
12
|
-
import "antd/es/tree-select/style";
|
|
13
|
-
import _TreeSelect from "antd/es/tree-select";
|
|
14
6
|
var _excluded = ["disabled", "code", "dataSource", "defaultDisableValue", "onChange", "useRequest", "transformResponse", "fieldNames", "placeholder", "tooltip", "showSearch", "filterTreeNode", "treeNodeFilterProp", "defaultExpandAll", "expandedKeys", "treeCheckable", "onSearch", "otherProps", "width", "dropdownStyle", "popupClassName", "style", "allowClear", "listHeight", "showCodeName", "className", "checkStrictly", "checkable"],
|
|
15
7
|
_excluded2 = ["children"];
|
|
16
8
|
/* eslint-disable react/no-danger */
|
|
17
9
|
/* eslint-disable react/jsx-closing-tag-location */
|
|
18
10
|
import { useDeepCompareEffect, useRequest as useRequestFunc, useSetState } from 'ahooks';
|
|
11
|
+
import { Input, TreeSelect, message, Tooltip } from 'antd';
|
|
19
12
|
import classnames from 'classnames';
|
|
20
13
|
import React, { useImperativeHandle, forwardRef, useCallback } from 'react';
|
|
21
14
|
import { cloneDeep, debounce } from 'lodash';
|
|
@@ -25,7 +18,7 @@ import Container from "../../../ProForm/components/Container";
|
|
|
25
18
|
import AdaptiveTooltip from "../AdaptiveTooltip";
|
|
26
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
|
-
var SHOW_PARENT =
|
|
21
|
+
var SHOW_PARENT = TreeSelect.SHOW_PARENT;
|
|
29
22
|
export var ProTreeSelect = (props, ref) => {
|
|
30
23
|
var _useRequest$options, _selectProps$classNam, _selectProps$classNam2, _selectProps$styles, _selectProps$styles2;
|
|
31
24
|
// 全局属性配置在ConfigProvider
|
|
@@ -164,7 +157,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
|
164
157
|
msg = res.message,
|
|
165
158
|
data = res.data;
|
|
166
159
|
if (status !== 200) {
|
|
167
|
-
|
|
160
|
+
message.error(msg);
|
|
168
161
|
return;
|
|
169
162
|
}
|
|
170
163
|
var resultData = transferDataSource(data, showCodeName);
|
|
@@ -183,7 +176,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
|
183
176
|
msg = _ref4.message,
|
|
184
177
|
data = _ref4.data;
|
|
185
178
|
if (status !== 200) {
|
|
186
|
-
|
|
179
|
+
message.error(msg);
|
|
187
180
|
return;
|
|
188
181
|
}
|
|
189
182
|
return data;
|
|
@@ -268,7 +261,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
|
268
261
|
if (defaultDisableValue) {
|
|
269
262
|
return /*#__PURE__*/_jsx("span", {
|
|
270
263
|
title: defaultDisableValue,
|
|
271
|
-
children: /*#__PURE__*/_jsx(
|
|
264
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
272
265
|
disabled: true,
|
|
273
266
|
defaultValue: defaultDisableValue,
|
|
274
267
|
style: props === null || props === void 0 ? void 0 : props.style
|
|
@@ -385,7 +378,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
|
385
378
|
});
|
|
386
379
|
}
|
|
387
380
|
if (!children) {
|
|
388
|
-
return /*#__PURE__*/_jsx(
|
|
381
|
+
return /*#__PURE__*/_jsx(TreeSelect.TreeNode, {
|
|
389
382
|
value: value,
|
|
390
383
|
title: title,
|
|
391
384
|
label: searchKey,
|
|
@@ -396,7 +389,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
|
396
389
|
}, key);
|
|
397
390
|
}
|
|
398
391
|
var sonGrade = grade + 1;
|
|
399
|
-
return /*#__PURE__*/_jsx(
|
|
392
|
+
return /*#__PURE__*/_jsx(TreeSelect.TreeNode, {
|
|
400
393
|
value: value,
|
|
401
394
|
title: title,
|
|
402
395
|
label: searchKey,
|
|
@@ -623,7 +616,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
|
623
616
|
return /*#__PURE__*/_jsx("div", {
|
|
624
617
|
onClick: nodeChangeEvent,
|
|
625
618
|
className: cls,
|
|
626
|
-
children: /*#__PURE__*/_jsx(
|
|
619
|
+
children: /*#__PURE__*/_jsx(TreeSelect, _objectSpread(_objectSpread({
|
|
627
620
|
placeholder: placeholder || locale.ProForm.treeSelectPlaceholder,
|
|
628
621
|
maxTagPlaceholder: rest => {
|
|
629
622
|
var _rest = rest.map(tag => {
|
|
@@ -631,7 +624,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
|
631
624
|
return (tag !== null && tag !== void 0 && (_tag$label = tag.label) !== null && _tag$label !== void 0 && (_tag$label = _tag$label.props) !== null && _tag$label !== void 0 && _tag$label.children ? tag === null || tag === void 0 || (_tag$label2 = tag.label) === null || _tag$label2 === void 0 || (_tag$label2 = _tag$label2.props) === null || _tag$label2 === void 0 || (_tag$label2 = _tag$label2.children) === null || _tag$label2 === void 0 || (_tag$label2 = _tag$label2.props) === null || _tag$label2 === void 0 || (_tag$label2 = _tag$label2.dangerouslySetInnerHTML) === null || _tag$label2 === void 0 ? void 0 : _tag$label2.__html : tag === null || tag === void 0 || (_tag$label3 = tag.label) === null || _tag$label3 === void 0 || (_tag$label3 = _tag$label3.props) === null || _tag$label3 === void 0 || (_tag$label3 = _tag$label3.dangerouslySetInnerHTML) === null || _tag$label3 === void 0 ? void 0 : _tag$label3.__html) || tag.label;
|
|
632
625
|
});
|
|
633
626
|
var _str = _rest.join('、');
|
|
634
|
-
return /*#__PURE__*/_jsx(
|
|
627
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
|
635
628
|
title: /*#__PURE__*/_jsx("div", {
|
|
636
629
|
children: _str
|
|
637
630
|
}),
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import "antd/es/tree/style";
|
|
2
|
-
import _Tree from "antd/es/tree";
|
|
3
|
-
import "antd/es/popover/style";
|
|
4
|
-
import _Popover from "antd/es/popover";
|
|
5
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
7
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
@@ -10,6 +6,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
10
6
|
var _excluded = ["checkedValues", "disabled", "searchStr", "originalTreeData", "showCodeName", "checkStrictly", "flatTreeData", "mode", "fieldNames", "tags", "onCheck", "optionRender", "treeData", "showLine", "switcherIcon", "checkable", "menu", "innerExpandKeys", "selectedKey", "disabledMode", "isRadioSelect"];
|
|
11
7
|
/* eslint-disable no-plusplus */
|
|
12
8
|
import React, { useEffect, useState } from 'react';
|
|
9
|
+
import { Tree, Popover } from 'antd';
|
|
13
10
|
import { useSetState } from 'ahooks';
|
|
14
11
|
import { CaretDownOutlined } from '@ant-design/icons';
|
|
15
12
|
import SearchTitle from "./SearchTitle";
|
|
@@ -271,7 +268,7 @@ function List(props) {
|
|
|
271
268
|
onClick: e => {
|
|
272
269
|
e.stopPropagation();
|
|
273
270
|
},
|
|
274
|
-
children: (operateButton === null || operateButton === void 0 ? void 0 : operateButton.length) > 1 ? /*#__PURE__*/_jsx(
|
|
271
|
+
children: (operateButton === null || operateButton === void 0 ? void 0 : operateButton.length) > 1 ? /*#__PURE__*/_jsx(Popover, {
|
|
275
272
|
classNames: {
|
|
276
273
|
root: 'pro-tree-operate-container'
|
|
277
274
|
},
|
|
@@ -351,7 +348,7 @@ function List(props) {
|
|
|
351
348
|
}
|
|
352
349
|
return /*#__PURE__*/_jsx("div", {
|
|
353
350
|
className: disabledMode === 'hide' ? 'hide-disable-node' : '',
|
|
354
|
-
children: _treeData !== null && _treeData !== void 0 && _treeData.length ? /*#__PURE__*/_jsx(
|
|
351
|
+
children: _treeData !== null && _treeData !== void 0 && _treeData.length ? /*#__PURE__*/_jsx(Tree, _objectSpread(_objectSpread(_objectSpread({}, others), additionProps), {}, {
|
|
355
352
|
disabled: disabled,
|
|
356
353
|
style: {
|
|
357
354
|
width: '100%'
|
|
@@ -1,8 +1,7 @@
|
|
|
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 _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
3
|
import { useEffect } from 'react';
|
|
4
|
+
import { Checkbox } from 'antd';
|
|
6
5
|
import { useSetState } from 'ahooks';
|
|
7
6
|
import classNames from 'classnames';
|
|
8
7
|
import SearchTitle from "./SearchTitle";
|
|
@@ -62,7 +61,7 @@ var Cascader = props => {
|
|
|
62
61
|
})
|
|
63
62
|
}), /*#__PURE__*/_jsx("div", {
|
|
64
63
|
className: "pro-tree-modal-cascader-warp",
|
|
65
|
-
children: /*#__PURE__*/_jsx(
|
|
64
|
+
children: /*#__PURE__*/_jsx(Checkbox.Group, {
|
|
66
65
|
disabled: disabled,
|
|
67
66
|
style: {
|
|
68
67
|
width: '100%'
|
|
@@ -77,7 +76,7 @@ var Cascader = props => {
|
|
|
77
76
|
label: title,
|
|
78
77
|
searchStr: searchStr
|
|
79
78
|
})
|
|
80
|
-
}) : /*#__PURE__*/_jsx(
|
|
79
|
+
}) : /*#__PURE__*/_jsx(Checkbox, _objectSpread(_objectSpread({}, item), {}, {
|
|
81
80
|
onChange: e => handleOnChange(e, item[fieldNameValue]),
|
|
82
81
|
value: item[fieldNameValue],
|
|
83
82
|
children: /*#__PURE__*/_jsx("span", {
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import "antd/es/row/style";
|
|
2
|
-
import _Row from "antd/es/row";
|
|
3
|
-
import "antd/es/col/style";
|
|
4
|
-
import _Col from "antd/es/col";
|
|
5
|
-
import "antd/es/checkbox/style";
|
|
6
|
-
import _Checkbox from "antd/es/checkbox";
|
|
7
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
8
2
|
/* eslint-disable brace-style */
|
|
9
3
|
import React, { forwardRef, useImperativeHandle, useMemo, useRef } from 'react';
|
|
4
|
+
import { Checkbox, Col, Row } from 'antd';
|
|
10
5
|
import { DndContext } from '@dnd-kit/core';
|
|
11
6
|
import { arrayMove, SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
12
7
|
import { useDeepCompareEffect, useSetState, useVirtualList } from 'ahooks';
|
|
@@ -173,7 +168,7 @@ function List(props, ref) {
|
|
|
173
168
|
// 编辑状态
|
|
174
169
|
if (!isRowCols && mode === 'render') {
|
|
175
170
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
176
|
-
children: /*#__PURE__*/_jsx(
|
|
171
|
+
children: /*#__PURE__*/_jsx(Checkbox.Group, {
|
|
177
172
|
disabled: disabled,
|
|
178
173
|
style: {
|
|
179
174
|
width: '100%'
|
|
@@ -188,7 +183,7 @@ function List(props, ref) {
|
|
|
188
183
|
},
|
|
189
184
|
children: /*#__PURE__*/_jsx("div", {
|
|
190
185
|
ref: wrapperRef,
|
|
191
|
-
children: /*#__PURE__*/_jsx(
|
|
186
|
+
children: /*#__PURE__*/_jsx(Row, {
|
|
192
187
|
children: list.map(_item => {
|
|
193
188
|
var item = _item.data;
|
|
194
189
|
var title = handleGetTitle(item);
|
|
@@ -196,13 +191,13 @@ function List(props, ref) {
|
|
|
196
191
|
label: title,
|
|
197
192
|
searchStr: searchStr
|
|
198
193
|
});
|
|
199
|
-
return /*#__PURE__*/_jsx(
|
|
194
|
+
return /*#__PURE__*/_jsx(Col, {
|
|
200
195
|
span: span || 24,
|
|
201
196
|
className: !span || span === 24 ? 'pro-tree-modal-checkbox-content' : '',
|
|
202
197
|
style: {
|
|
203
198
|
marginBottom: span ? 16 : 12
|
|
204
199
|
},
|
|
205
|
-
children: /*#__PURE__*/_jsx(
|
|
200
|
+
children: /*#__PURE__*/_jsx(Checkbox, {
|
|
206
201
|
onChange: e => handleOnChange === null || handleOnChange === void 0 ? void 0 : handleOnChange(e, item[fieldNameValue]),
|
|
207
202
|
value: item[fieldNameValue],
|
|
208
203
|
disabled: item.disabled,
|
|
@@ -220,26 +215,26 @@ function List(props, ref) {
|
|
|
220
215
|
// 编辑状态
|
|
221
216
|
if (isRowCols) {
|
|
222
217
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
223
|
-
children: /*#__PURE__*/_jsx(
|
|
218
|
+
children: /*#__PURE__*/_jsx(Checkbox.Group, {
|
|
224
219
|
disabled: disabled,
|
|
225
220
|
style: {
|
|
226
221
|
width: '100%'
|
|
227
222
|
},
|
|
228
223
|
value: checkedValues,
|
|
229
|
-
children: /*#__PURE__*/_jsx(
|
|
224
|
+
children: /*#__PURE__*/_jsx(Row, {
|
|
230
225
|
children: treeData.map(item => {
|
|
231
226
|
var title = handleGetTitle(item);
|
|
232
227
|
var content = optionRender ? optionRender(item, searchStr) : /*#__PURE__*/_jsx(SearchTitle, {
|
|
233
228
|
label: title,
|
|
234
229
|
searchStr: searchStr
|
|
235
230
|
});
|
|
236
|
-
return /*#__PURE__*/_jsx(
|
|
231
|
+
return /*#__PURE__*/_jsx(Col, {
|
|
237
232
|
span: span || 24,
|
|
238
233
|
className: !span || span === 24 ? 'pro-tree-modal-checkbox-content' : '',
|
|
239
234
|
style: {
|
|
240
235
|
marginBottom: span ? 16 : 12
|
|
241
236
|
},
|
|
242
|
-
children: /*#__PURE__*/_jsx(
|
|
237
|
+
children: /*#__PURE__*/_jsx(Checkbox, {
|
|
243
238
|
onChange: e => handleOnChange(e, item[fieldNameValue]),
|
|
244
239
|
value: item[fieldNameValue],
|
|
245
240
|
disabled: item.disabled,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "antd/es/tag/style";
|
|
2
|
-
import _Tag from "antd/es/tag";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import React from 'react';
|
|
3
|
+
import { Tag } from 'antd';
|
|
5
4
|
import { useSortable } from '@dnd-kit/sortable';
|
|
6
5
|
import { CSS } from '@dnd-kit/utilities';
|
|
7
6
|
import ProIcon from "../../ProIcon";
|
|
@@ -38,7 +37,7 @@ var SortableItem = props => {
|
|
|
38
37
|
style: style,
|
|
39
38
|
className: `checked-item ${item.disabled || disabled ? 'disabled' : ''} ${drag ? 'dragable' : ''}`
|
|
40
39
|
}, item.disabled ? {} : attributes), {}, {
|
|
41
|
-
children: /*#__PURE__*/_jsxs(
|
|
40
|
+
children: /*#__PURE__*/_jsxs(Tag, {
|
|
42
41
|
closable: true,
|
|
43
42
|
onClose: e => _onClose(e),
|
|
44
43
|
children: [drag ? item.disabled || disabled ? /*#__PURE__*/_jsx(ProIcon, {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import "antd/es/tree/style";
|
|
2
|
-
import _Tree from "antd/es/tree";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
4
|
var _excluded = ["checkedValues", "disabled", "treeData", "searchStr", "originalTreeData", "showCodeName", "checkStrictly", "flatTreeData", "mode", "fieldNames", "tags", "onCheck", "handleFilterClose", "optionRender"];
|
|
7
5
|
/* eslint-disable no-plusplus */
|
|
8
6
|
import React, { forwardRef, useEffect, useMemo, useState } from 'react';
|
|
7
|
+
import { Tree } from 'antd';
|
|
9
8
|
import ListComponent from "./List";
|
|
10
9
|
import SearchTitle from "./SearchTitle";
|
|
11
10
|
import CloseIcon from "./CloseIcon";
|
|
@@ -173,7 +172,7 @@ function List(props, ref) {
|
|
|
173
172
|
setAutoExpandParent(false);
|
|
174
173
|
};
|
|
175
174
|
if (mode === 'render') {
|
|
176
|
-
return /*#__PURE__*/_jsx(
|
|
175
|
+
return /*#__PURE__*/_jsx(Tree, {
|
|
177
176
|
disabled: disabled,
|
|
178
177
|
style: {
|
|
179
178
|
width: '100%'
|
|
@@ -200,7 +199,7 @@ function List(props, ref) {
|
|
|
200
199
|
showCodeName: showCodeName,
|
|
201
200
|
disabled: disabled,
|
|
202
201
|
ref: ref
|
|
203
|
-
}, restProps)) : /*#__PURE__*/_jsx(
|
|
202
|
+
}, restProps)) : /*#__PURE__*/_jsx(Tree, {
|
|
204
203
|
style: {
|
|
205
204
|
width: '100%'
|
|
206
205
|
},
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import "antd/es/input/style";
|
|
2
|
-
import _Input from "antd/es/input";
|
|
3
|
-
import "antd/es/space/style";
|
|
4
|
-
import _Space from "antd/es/space";
|
|
5
|
-
import "antd/es/select/style";
|
|
6
|
-
import _Select from "antd/es/select";
|
|
7
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
8
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
9
3
|
import { useEffect } from 'react';
|
|
10
4
|
import classNames from 'classnames';
|
|
5
|
+
import { Input, Select, Space } from 'antd';
|
|
11
6
|
import { CloseOutlined } from '@ant-design/icons';
|
|
12
7
|
import { ReactSVG } from 'react-svg';
|
|
13
8
|
import { useSetState } from 'ahooks';
|
|
@@ -97,10 +92,10 @@ function Trigger(props) {
|
|
|
97
92
|
};
|
|
98
93
|
var TriggerComponent = props => {
|
|
99
94
|
if (appoint) {
|
|
100
|
-
return /*#__PURE__*/_jsxs(
|
|
95
|
+
return /*#__PURE__*/_jsxs(Space.Compact, {
|
|
101
96
|
block: true,
|
|
102
97
|
style: _objectSpread({}, triggerStyle),
|
|
103
|
-
children: [/*#__PURE__*/_jsxs(
|
|
98
|
+
children: [/*#__PURE__*/_jsxs(Select, {
|
|
104
99
|
style: {
|
|
105
100
|
width: 'auto'
|
|
106
101
|
},
|
|
@@ -109,11 +104,11 @@ function Trigger(props) {
|
|
|
109
104
|
defaultValue: "appoint",
|
|
110
105
|
value: state.mode,
|
|
111
106
|
onChange: onAppointChange,
|
|
112
|
-
children: [/*#__PURE__*/_jsx(
|
|
107
|
+
children: [/*#__PURE__*/_jsx(Select.Option, {
|
|
113
108
|
value: "all",
|
|
114
109
|
disabled: allDisabled,
|
|
115
110
|
children: locale === null || locale === void 0 ? void 0 : locale.ProTreeModal.specifyMode[0]
|
|
116
|
-
}), /*#__PURE__*/_jsx(
|
|
111
|
+
}), /*#__PURE__*/_jsx(Select.Option, {
|
|
117
112
|
value: "appoint",
|
|
118
113
|
disabled: specifyDisabled,
|
|
119
114
|
children: locale === null || locale === void 0 ? void 0 : locale.ProTreeModal.specifyMode[1]
|
|
@@ -124,7 +119,7 @@ function Trigger(props) {
|
|
|
124
119
|
return props.children;
|
|
125
120
|
};
|
|
126
121
|
return /*#__PURE__*/_jsx(TriggerComponent, {
|
|
127
|
-
children: /*#__PURE__*/_jsx(
|
|
122
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
128
123
|
className: classNames(afterDisabled ? 'trigger-no-hover' : '', appoint ? 'pro-tree-modal-input-appoint' : ''),
|
|
129
124
|
onClick: handleClick,
|
|
130
125
|
value: checkedValues.length === 0 ? null : state.mode === 'all' ? formatMessage(locale === null || locale === void 0 ? void 0 : locale.ProTreeModal.checkAll1, {
|