@para-ui/core 4.0.0-rc → 4.0.0-rc.2
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/AutoBox/index.d.ts +1 -1
- package/AutoBox/index.js +12 -12
- package/AutoTips/autoTipsMultiline/index.d.ts +1 -1
- package/AutoTips/index.d.ts +2 -2
- package/AutoTips/index.js +15 -21
- package/Badge/index.d.ts +23 -0
- package/Badge/index.js +54 -0
- package/Breadcrumbs/index.js +8 -8
- package/Button/SplitButton.d.ts +1 -1
- package/Button/index.d.ts +1 -1
- package/Button/index.js +8 -38
- package/Carousel/index.d.ts +6 -6
- package/Carousel/index.js +5 -5
- package/Cascader/Cascader.d.ts +10 -10
- package/Cascader/OptionList/Column.d.ts +3 -3
- package/Cascader/OptionList/index.d.ts +2 -2
- package/Cascader/index.d.ts +1 -1
- package/Cascader/index.js +4 -2
- package/Cascader/lang/en_US.d.ts +5 -0
- package/Cascader/lang/index.d.ts +11 -0
- package/Cascader/lang/zh_CN.d.ts +5 -0
- package/Cascader/utils/treeUtil.d.ts +1 -1
- package/Checkbox/index.d.ts +1 -1
- package/Checkbox/index.js +5 -5
- package/CheckboxGroup/index.d.ts +2 -2
- package/CheckboxGroup/index.js +4 -4
- package/Collapse/index.js +5 -5
- package/CollapseBox/index.js +12 -20
- package/CollapseLayout/index.js +21 -21
- package/ColorPicker/index.js +2 -2
- package/ComboSelect/index.js +43 -52
- package/ComboSelect/interface.d.ts +3 -3
- package/Container/index.d.ts +3 -3
- package/Container/index.js +56 -56
- package/CopyText/index.d.ts +2 -2
- package/CopyText/index.js +3 -3
- package/DatePicker/generatePicker/index.d.ts +22 -22
- package/DatePicker/index.js +10 -9
- package/DatePicker/util.d.ts +1 -1
- package/Descriptions/index.d.ts +38 -0
- package/Descriptions/index.js +23 -0
- package/Desktop/index.d.ts +1 -1
- package/Desktop/index.js +18 -13
- package/DragVerify/index.d.ts +1 -1
- package/DragVerify/index.js +13 -13
- package/Drawer/index.js +40 -38
- package/Drawer/interface.d.ts +4 -6
- package/Dropdown/index.d.ts +1 -1
- package/DynamicMultiBox/formItem.d.ts +1 -1
- package/DynamicMultiBox/index.d.ts +1 -1
- package/DynamicMultiBox/index.js +38 -35
- package/DynamicMultiBox/interface.d.ts +8 -8
- package/DynamicMultiBox/rowForm.d.ts +3 -1
- package/Empty/index.d.ts +1 -1
- package/Empty/index.js +3 -3
- package/Form/index.d.ts +12 -13
- package/Form/index.js +10 -8
- package/FormItem/compoments/defaultCompoments/index.d.ts +4 -4
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +1 -1
- package/FormItem/compoments/formFile/index.d.ts +2 -2
- package/FormItem/compoments/formRadioGroup/index.d.ts +1 -1
- package/FormItem/compoments/formSelect/index.d.ts +7 -7
- package/FormItem/errorTips.d.ts +3 -3
- package/FormItem/index.d.ts +5 -5
- package/FormItem/index.js +3 -2
- package/FormItem/lang/en_US.d.ts +10 -0
- package/FormItem/lang/index.d.ts +21 -0
- package/FormItem/lang/zh_CN.d.ts +10 -0
- package/FormItem/validateFunction.d.ts +1 -1
- package/FunctionModal/dialog.d.ts +26 -26
- package/FunctionModal/index.d.ts +6 -6
- package/FunctionModal/index.js +9 -10
- package/FunctionModal/modalContext.d.ts +3 -3
- package/GlobalContext/componentsProps.d.ts +7 -7
- package/GlobalContext/confirmLocale.d.ts +1 -2
- package/GlobalContext/index.d.ts +2 -2
- package/GlobalContext/index.js +3 -2
- package/GlobalContext/useFormatMessage.d.ts +1 -1
- package/Help/index.js +2 -2
- package/HelperText/index.js +1 -1
- package/InputLang/index.d.ts +2 -2
- package/InputLang/index.js +8 -8
- package/InputNumber/index.d.ts +4 -2
- package/InputNumber/index.js +27 -15
- package/Label/index.js +2 -2
- package/Loading/index.js +1 -1
- package/Menu/index.js +17 -17
- package/Menu/interface.d.ts +1 -1
- package/Message/index.js +13 -13
- package/Modal/Confirm/index.d.ts +3 -3
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +20 -17
- package/Modal/lang/index.d.ts +8 -0
- package/MultiBox/index.d.ts +2 -2
- package/MultiBox/index.js +4 -4
- package/Notification/index.js +2 -2
- package/OperateBtn/index.d.ts +2 -2
- package/OperateBtn/index.js +49 -49
- package/PageHeader/index.js +45 -34
- package/PageHeader/interface.d.ts +1 -1
- package/Pagination/index.d.ts +1 -1
- package/Pagination/index.js +19 -19
- package/PasswordRules/index.js +8 -8
- package/PopConfirm/index.js +8 -7
- package/Progress/Line.d.ts +10 -10
- package/Progress/Steps.d.ts +2 -2
- package/Progress/index.d.ts +12 -12
- package/Progress/index.js +43 -42
- package/Progress/utils.d.ts +4 -4
- package/Querying/index.d.ts +1 -1
- package/Querying/index.js +3 -3
- package/README.md +7 -0
- package/Radio/index.d.ts +1 -1
- package/Radio/index.js +5 -5
- package/RadioGroup/index.d.ts +2 -2
- package/RadioGroup/index.js +4 -4
- package/Search/index.js +1 -1
- package/Select/index.d.ts +3 -3
- package/Select/index.js +43 -43
- package/SelectInput/index.js +2 -2
- package/Selector/index.js +26 -34
- package/Selector/interface.d.ts +6 -6
- package/SelectorPicker/index.d.ts +4 -4
- package/SelectorPicker/index.js +10 -10
- package/SingleBox/index.d.ts +2 -2
- package/SingleBox/index.js +4 -4
- package/Slider/index.js +1 -1
- package/Slider/interface.d.ts +1 -1
- package/Status/index.d.ts +4 -4
- package/Status/index.js +6 -7
- package/Stepper/index.d.ts +5 -5
- package/Stepper/index.js +23 -23
- package/Styles/theme.scss +1 -0
- package/Switch/index.d.ts +7 -7
- package/Switch/index.js +38 -21
- package/Switch/lang/en_US.d.ts +4 -0
- package/Switch/lang/index.d.ts +9 -0
- package/Switch/lang/zh_CN.d.ts +4 -0
- package/Table/index.js +35 -35
- package/Table/interface.d.ts +4 -4
- package/Table/tableBodyElement/index.d.ts +1 -1
- package/Table/tableBodyInterface.d.ts +2 -2
- package/Table/tableContainer/index.d.ts +1 -1
- package/Table/tableElement/index.d.ts +1 -1
- package/Table/tableHeadElement/index.d.ts +1 -1
- package/Table/tableHeadInterface.d.ts +1 -1
- package/Table/tablePaginationInterface.d.ts +6 -6
- package/Table/tdElement/index.d.ts +1 -1
- package/Table/thElement/index.d.ts +2 -2
- package/Table/trElement/index.d.ts +1 -1
- package/Table/util.d.ts +1 -1
- package/Tabs/index.d.ts +1 -1
- package/Tabs/index.js +27 -19
- package/Tag/TagGroup.d.ts +5 -5
- package/Tag/index.d.ts +7 -7
- package/Tag/index.js +25 -25
- package/TextEditor/index.d.ts +2 -2
- package/TextEditor/index.js +45 -27
- package/TextEditor/lang/en_US.d.ts +4 -0
- package/TextEditor/lang/index.d.ts +9 -0
- package/TextEditor/lang/zh_CN.d.ts +4 -0
- package/TextField/index.d.ts +1 -1
- package/TextField/index.js +19 -16
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +2 -2
- package/Timeline/TimelineItem.d.ts +1 -1
- package/Timeline/index.d.ts +5 -5
- package/Timeline/index.js +14 -14
- package/Title/index.d.ts +4 -4
- package/Title/index.js +3 -3
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButton/index.d.ts +5 -1
- package/ToggleButton/index.js +18 -11
- package/Transfer/box.d.ts +6 -6
- package/Transfer/index.js +22 -25
- package/Tree/OperateBar/index.d.ts +4 -4
- package/Tree/Tree.d.ts +2 -2
- package/Tree/index.js +2 -2
- package/Tree/interface.d.ts +4 -4
- package/Tree/utils/tools.d.ts +1 -1
- package/Upload/Dragger/index.d.ts +2 -2
- package/Upload/ErroTip/index.d.ts +1 -1
- package/Upload/index.d.ts +2 -2
- package/Upload/index.js +10 -11
- package/Upload/interface.d.ts +1 -1
- package/_verture/{index-8469865e.js → index-024bbc9b.js} +3 -3
- package/_verture/{index-19947788.js → index-05f7bf11.js} +3 -1
- package/_verture/{index-e1b800aa.js → index-50f56891.js} +49 -25
- package/_verture/{index-1c8d3e94.js → index-649b450f.js} +102 -48
- package/_verture/{index-47297a40.js → index-692e29c1.js} +53 -46
- package/_verture/{modalContext-670eab09.js → modalContext-11c51a45.js} +25 -25
- package/index.d.ts +4 -0
- package/index.js +14 -11
- package/locale/en-US.d.ts +19 -0
- package/locale/index.d.ts +38 -0
- package/locale/index.js +40 -2
- package/locale/zh-CN.d.ts +19 -0
- package/package.json +4 -2
- package/umd/AutoBox.js +1 -1
- package/umd/AutoTips.js +1 -1
- package/umd/Badge.js +1 -0
- package/umd/Breadcrumbs.js +1 -1
- package/umd/Button.js +2 -2
- package/umd/ButtonGroup.js +2 -2
- package/umd/Cascader.js +4 -4
- package/umd/Checkbox.js +2 -2
- package/umd/CheckboxGroup.js +2 -2
- package/umd/Collapse.js +5 -5
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ColorPicker.js +1 -1
- package/umd/ComboSelect.js +4 -4
- package/umd/CopyText.js +2 -2
- package/umd/DatePicker.js +2 -2
- package/umd/Descriptions.js +1 -0
- package/umd/Desktop.js +2 -2
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +2 -2
- package/umd/DynamicMultiBox.js +4 -4
- package/umd/Empty.js +1 -1
- package/umd/Form.js +4 -4
- package/umd/FormItem.js +4 -4
- package/umd/FunctionModal.js +4 -4
- package/umd/GlobalContext.js +1 -1
- package/umd/Help.js +2 -2
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +2 -2
- package/umd/InputNumber.js +4 -4
- package/umd/Label.js +2 -2
- package/umd/Loading.js +1 -1
- package/umd/Menu.js +3 -3
- package/umd/Message.js +2 -2
- package/umd/Modal.js +4 -4
- package/umd/MultiBox.js +7 -7
- package/umd/Notification.js +2 -2
- package/umd/OperateBtn.js +4 -4
- package/umd/PageHeader.js +4 -4
- package/umd/Pagination.js +2 -2
- package/umd/PasswordRules.js +4 -4
- package/umd/PopConfirm.js +2 -2
- package/umd/Progress.js +3 -3
- package/umd/Querying.js +1 -1
- package/umd/Radio.js +2 -2
- package/umd/RadioGroup.js +2 -2
- package/umd/Search.js +7 -7
- package/umd/Select.js +2 -2
- package/umd/SelectInput.js +2 -2
- package/umd/Selector.js +2 -2
- package/umd/SelectorPicker.js +2 -2
- package/umd/SingleBox.js +2 -2
- package/umd/Slider.js +1 -1
- package/umd/Status.js +2 -2
- package/umd/Stepper.js +1 -1
- package/umd/Switch.js +5 -5
- package/umd/Table.js +6 -6
- package/umd/Tabs.js +6 -6
- package/umd/Tag.js +1 -1
- package/umd/TextEditor.js +3 -3
- package/umd/TextField.js +7 -7
- package/umd/TimePicker.js +2 -2
- package/umd/Title.js +7 -7
- package/umd/ToggleButton.js +4 -4
- package/umd/Transfer.js +3 -3
- package/umd/Tree.js +2 -2
- package/umd/Upload.js +2 -2
- package/umd/locale.js +1 -1
package/Transfer/box.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ReactNode, CSSProperties } from
|
|
2
|
-
import Sortable from
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
import Sortable from 'sortablejs';
|
|
3
3
|
interface IBox {
|
|
4
4
|
title: string;
|
|
5
5
|
data: ItemDataProps[];
|
|
6
6
|
multiple: boolean;
|
|
7
|
-
onSearch: (e: string, direction:
|
|
8
|
-
onchange: (e: any, bol: boolean, index: number, direction:
|
|
9
|
-
onMove: (direction:
|
|
7
|
+
onSearch: (e: string, direction: 'left' | 'right') => void;
|
|
8
|
+
onchange: (e: any, bol: boolean, index: number, direction: 'left' | 'right', multiple: boolean) => void;
|
|
9
|
+
onMove: (direction: 'left' | 'right') => void;
|
|
10
10
|
queryAll: (e: any, direction: any) => void;
|
|
11
11
|
inverse: (direction: any) => void;
|
|
12
|
-
direction:
|
|
12
|
+
direction: 'left' | 'right';
|
|
13
13
|
fluctuationPosition?: number;
|
|
14
14
|
fluctuationOrther?: number;
|
|
15
15
|
onEndSort?: (oldIndex: any, newIndex: any) => void;
|
package/Transfer/index.js
CHANGED
|
@@ -21,10 +21,10 @@ import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
|
21
21
|
import '../_verture/typeof-adeedc13.js';
|
|
22
22
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
23
23
|
import '@para-ui/icons/LoadingF';
|
|
24
|
-
import '@para-ui/icons/Forbid';
|
|
25
24
|
import '../Tooltip/index.js';
|
|
26
25
|
import 'rc-tooltip';
|
|
27
26
|
import 'rc-tooltip/lib/placements';
|
|
27
|
+
import '@para-ui/icons/Forbid';
|
|
28
28
|
import '../_verture/index-e9007d6a.js';
|
|
29
29
|
import 'rc-dropdown';
|
|
30
30
|
import '../_verture/usePopupContainer-87febeb9.js';
|
|
@@ -109,7 +109,7 @@ var Box = function Box(props) {
|
|
|
109
109
|
rightIcon = props.rightIcon,
|
|
110
110
|
style = props.style,
|
|
111
111
|
customKey = props.customKey;
|
|
112
|
-
var intl = useFormatMessage(
|
|
112
|
+
var intl = useFormatMessage('Transfer', localeJson);
|
|
113
113
|
var _useState = useState([]),
|
|
114
114
|
_useState2 = _slicedToArray(_useState, 2),
|
|
115
115
|
checkCount = _useState2[0],
|
|
@@ -134,11 +134,11 @@ var Box = function Box(props) {
|
|
|
134
134
|
setCheckCount(arr);
|
|
135
135
|
}, [data]);
|
|
136
136
|
useEffect(function () {
|
|
137
|
-
if (direction ==
|
|
137
|
+
if (direction == 'right') {
|
|
138
138
|
new Sortable(ref.current, {
|
|
139
139
|
animation: 180,
|
|
140
|
-
ghostClass:
|
|
141
|
-
handle:
|
|
140
|
+
ghostClass: 'blue-background-class',
|
|
141
|
+
handle: '.handle',
|
|
142
142
|
onEnd: function onEnd(evt) {
|
|
143
143
|
onEndSort === null || onEndSort === void 0 ? void 0 : onEndSort(evt.oldIndex, evt.newIndex);
|
|
144
144
|
}
|
|
@@ -151,7 +151,7 @@ var Box = function Box(props) {
|
|
|
151
151
|
}, function (e, index, item) {
|
|
152
152
|
if (item === null || item === void 0 ? void 0 : item.disabled) return;
|
|
153
153
|
onchange(e, true, index, direction, false);
|
|
154
|
-
onMove(direction ===
|
|
154
|
+
onMove(direction === 'right' ? 'left' : 'right');
|
|
155
155
|
});
|
|
156
156
|
var itemStyle = function itemStyle(data) {
|
|
157
157
|
var stlye = {};
|
|
@@ -159,7 +159,7 @@ var Box = function Box(props) {
|
|
|
159
159
|
stlye.borderLeft = "4px solid ".concat(data.tagColor);
|
|
160
160
|
}
|
|
161
161
|
if (data === null || data === void 0 ? void 0 : data.hide) {
|
|
162
|
-
stlye.display =
|
|
162
|
+
stlye.display = 'none';
|
|
163
163
|
}
|
|
164
164
|
return stlye;
|
|
165
165
|
};
|
|
@@ -174,7 +174,7 @@ var Box = function Box(props) {
|
|
|
174
174
|
})), jsx(Search, {
|
|
175
175
|
btnType: "inside",
|
|
176
176
|
placeholder: intl({
|
|
177
|
-
id:
|
|
177
|
+
id: 'searchPlaceholder'
|
|
178
178
|
}),
|
|
179
179
|
showBtn: false,
|
|
180
180
|
rightIcon: jsx(SearchIcon, {}),
|
|
@@ -187,7 +187,7 @@ var Box = function Box(props) {
|
|
|
187
187
|
},
|
|
188
188
|
onEnter: function onEnter(event) {
|
|
189
189
|
var _a;
|
|
190
|
-
var val = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value) ||
|
|
190
|
+
var val = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value) || '';
|
|
191
191
|
onSearch(val, direction);
|
|
192
192
|
},
|
|
193
193
|
allowClear: false
|
|
@@ -197,7 +197,7 @@ var Box = function Box(props) {
|
|
|
197
197
|
}, {
|
|
198
198
|
children: data.map(function (item, index) {
|
|
199
199
|
return jsxs("div", Object.assign({
|
|
200
|
-
className: clsx(
|
|
200
|
+
className: clsx('item', (item === null || item === void 0 ? void 0 : item.tagColor) && 'item-border', (item === null || item === void 0 ? void 0 : item.disabled) && 'item-disabled', (item === null || item === void 0 ? void 0 : item.checked) && 'item-checked', fluctuationPosition === index && 'item-fluctuation', fluctuationOrther === index && 'item-fluctuationOrther'),
|
|
201
201
|
style: itemStyle(item),
|
|
202
202
|
onClick: function onClick(e) {
|
|
203
203
|
handler(e, index, item);
|
|
@@ -213,11 +213,11 @@ var Box = function Box(props) {
|
|
|
213
213
|
className: "right-icon"
|
|
214
214
|
}, {
|
|
215
215
|
children: rightIcon(item)
|
|
216
|
-
})) : null, direction ===
|
|
216
|
+
})) : null, direction === 'right' ? jsx("div", Object.assign({
|
|
217
217
|
className: "handle"
|
|
218
218
|
}, {
|
|
219
219
|
children: jsx(Drag, {
|
|
220
|
-
size:
|
|
220
|
+
size: "medium"
|
|
221
221
|
})
|
|
222
222
|
})) : null]
|
|
223
223
|
}), item[item[customKey]] || item.name);
|
|
@@ -228,24 +228,24 @@ var Box = function Box(props) {
|
|
|
228
228
|
children: [jsxs("div", {
|
|
229
229
|
children: [jsx(Button, Object.assign({
|
|
230
230
|
variant: "text",
|
|
231
|
-
className: "".concat(checkCount.length === data.length - disabledCount && data.length > 0 ?
|
|
231
|
+
className: "".concat(checkCount.length === data.length - disabledCount && data.length > 0 ? 'btn-on' : ''),
|
|
232
232
|
onClick: function onClick() {
|
|
233
233
|
queryAll(checkCount.length !== data.length - disabledCount, direction);
|
|
234
234
|
}
|
|
235
235
|
}, {
|
|
236
236
|
children: intl({
|
|
237
|
-
id:
|
|
237
|
+
id: 'allCheck'
|
|
238
238
|
})
|
|
239
239
|
})), jsx(Button, Object.assign({
|
|
240
240
|
variant: "text",
|
|
241
|
-
className: "".concat(checkCount.length === 0 || checkCount.length === data.length - disabledCount ?
|
|
241
|
+
className: "".concat(checkCount.length === 0 || checkCount.length === data.length - disabledCount ? 'btn-off' : ''),
|
|
242
242
|
disabled: checkCount.length === 0 || checkCount.length === data.length - disabledCount,
|
|
243
243
|
onClick: function onClick() {
|
|
244
244
|
inverse(direction);
|
|
245
245
|
}
|
|
246
246
|
}, {
|
|
247
247
|
children: intl({
|
|
248
|
-
id:
|
|
248
|
+
id: 'inVertCheck'
|
|
249
249
|
})
|
|
250
250
|
}))]
|
|
251
251
|
}), jsxs("div", Object.assign({
|
|
@@ -439,11 +439,11 @@ var Transfer = function Transfer(props) {
|
|
|
439
439
|
|
|
440
440
|
var onSearch = debounce(function (e, direction) {
|
|
441
441
|
var str = trim ? e.toUpperCase().trim() : e.toUpperCase();
|
|
442
|
-
if (direction ===
|
|
442
|
+
if (direction === 'left') {
|
|
443
443
|
leftData.forEach(function (item) {
|
|
444
444
|
item.hide = false;
|
|
445
|
-
var name = (item.name ||
|
|
446
|
-
var description = (item.description ||
|
|
445
|
+
var name = (item.name || '').toUpperCase();
|
|
446
|
+
var description = (item.description || '').toUpperCase();
|
|
447
447
|
if (!(name.indexOf(str) !== -1 || description.indexOf(str) !== -1)) {
|
|
448
448
|
item.hide = true;
|
|
449
449
|
}
|
|
@@ -452,8 +452,8 @@ var Transfer = function Transfer(props) {
|
|
|
452
452
|
} else {
|
|
453
453
|
rightData.filter(function (item) {
|
|
454
454
|
item.hide = false;
|
|
455
|
-
var name = (item.name ||
|
|
456
|
-
var description = (item.description ||
|
|
455
|
+
var name = (item.name || '').toUpperCase();
|
|
456
|
+
var description = (item.description || '').toUpperCase();
|
|
457
457
|
if (!(name.indexOf(str) !== -1 || description.indexOf(str) !== -1)) {
|
|
458
458
|
item.hide = true;
|
|
459
459
|
}
|
|
@@ -536,7 +536,6 @@ var Transfer = function Transfer(props) {
|
|
|
536
536
|
}, {
|
|
537
537
|
children: [jsx(Button.IconButton, Object.assign({
|
|
538
538
|
className: 'btn btn-right',
|
|
539
|
-
variant: 'outlined',
|
|
540
539
|
disabled: leftCount.length <= 0,
|
|
541
540
|
toolTipTitle: leftCount.length <= 0 ? intl({
|
|
542
541
|
id: 'rightBtnTips'
|
|
@@ -546,7 +545,7 @@ var Transfer = function Transfer(props) {
|
|
|
546
545
|
placement: 'bottomLeft'
|
|
547
546
|
},
|
|
548
547
|
onClick: function onClick() {
|
|
549
|
-
onMove(
|
|
548
|
+
onMove('right');
|
|
550
549
|
}
|
|
551
550
|
}, {
|
|
552
551
|
children: jsx(Right, {})
|
|
@@ -568,7 +567,6 @@ var Transfer = function Transfer(props) {
|
|
|
568
567
|
children: jsx(ExpandLess, {})
|
|
569
568
|
})), jsx(Button.IconButton, Object.assign({
|
|
570
569
|
className: 'btn btn-left',
|
|
571
|
-
variant: 'outlined',
|
|
572
570
|
disabled: rightCount.length <= 0 || ((_c = rightData[rightData.length - 1]) === null || _c === void 0 ? void 0 : _c.checked) || animationsLock,
|
|
573
571
|
toolTipTitle: rightCount.length <= 0 || ((_d = rightData[rightData.length - 1]) === null || _d === void 0 ? void 0 : _d.checked) ? intl({
|
|
574
572
|
id: 'leftBtnTips'
|
|
@@ -584,7 +582,6 @@ var Transfer = function Transfer(props) {
|
|
|
584
582
|
children: jsx(Down, {})
|
|
585
583
|
})), jsx(Button.IconButton, Object.assign({
|
|
586
584
|
className: 'btn btn-left',
|
|
587
|
-
variant: 'outlined',
|
|
588
585
|
disabled: rightCount.length <= 0,
|
|
589
586
|
toolTipTitle: rightCount.length <= 0 ? intl({
|
|
590
587
|
id: 'leftBtnTips'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, { FunctionComponent } from
|
|
2
|
-
import { DataNode } from
|
|
3
|
-
import { IActions, ActionType } from
|
|
4
|
-
import
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { DataNode } from 'rc-tree/lib/interface';
|
|
3
|
+
import { IActions, ActionType } from '../interface';
|
|
4
|
+
import './index.scss';
|
|
5
5
|
interface OperateBarProps {
|
|
6
6
|
opRef: any;
|
|
7
7
|
mouseInRef: any;
|
package/Tree/Tree.d.ts
CHANGED
package/Tree/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Tree } from '../_verture/index-
|
|
2
|
-
export { T as default } from '../_verture/index-
|
|
1
|
+
import { T as Tree } from '../_verture/index-692e29c1.js';
|
|
2
|
+
export { T as default } from '../_verture/index-692e29c1.js';
|
|
3
3
|
import '../_verture/toConsumableArray-8f4c9589.js';
|
|
4
4
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
5
5
|
import '../_verture/defineProperty-1d116156.js';
|
package/Tree/interface.d.ts
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* @date 2021/10/18 下午4:20
|
|
4
4
|
* @description tree interface
|
|
5
5
|
*/
|
|
6
|
-
import { ReactNode } from
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
7
|
import { TreeProps as RcTreeProps } from 'rc-tree';
|
|
8
|
-
import { DataNode, EventDataNode, Key } from
|
|
9
|
-
import { EmptyProps } from
|
|
10
|
-
import { ParaRequestConfig as RequestConfig } from
|
|
8
|
+
import { DataNode, EventDataNode, Key } from 'rc-tree/lib/interface';
|
|
9
|
+
import { EmptyProps } from '../Empty';
|
|
10
|
+
import { ParaRequestConfig as RequestConfig } from '@paraview/lib/http/interface';
|
|
11
11
|
type HasAction = (nodeData: DataNode) => boolean;
|
|
12
12
|
type ActionItem = boolean | {
|
|
13
13
|
text: string;
|
package/Tree/utils/tools.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @date 2021/11/15 下午2:12
|
|
4
4
|
* @description
|
|
5
5
|
*/
|
|
6
|
-
import { FunctionComponent } from
|
|
7
|
-
import { UploadProps } from
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
7
|
+
import { UploadProps } from '../index';
|
|
8
8
|
export type DraggerProps = Omit<UploadProps, 'type'>;
|
|
9
9
|
declare const Dragger: FunctionComponent<DraggerProps>;
|
|
10
10
|
export default Dragger;
|
package/Upload/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import { UploadProps } from './interface';
|
|
3
3
|
import ImageUpload, { ImageUploadProps } from './ImageUpload';
|
|
4
|
-
import Dragger, { DraggerProps } from
|
|
5
|
-
import ImgCrop, { ImgCropProps } from
|
|
4
|
+
import Dragger, { DraggerProps } from './Dragger';
|
|
5
|
+
import ImgCrop, { ImgCropProps } from './ImgCrop';
|
|
6
6
|
import './index.scss';
|
|
7
7
|
declare const InternalUpload: FunctionComponent<UploadProps>;
|
|
8
8
|
type MergedUploadType = typeof InternalUpload & {
|
package/Upload/index.js
CHANGED
|
@@ -39,12 +39,11 @@ import '../AutoTips/index.js';
|
|
|
39
39
|
import 'rc-slider';
|
|
40
40
|
import 'rc-dialog';
|
|
41
41
|
import '@para-ui/icons/Close';
|
|
42
|
-
import '../_verture/index-
|
|
42
|
+
import '../_verture/index-05f7bf11.js';
|
|
43
43
|
import 'react-dom';
|
|
44
44
|
import '@para-ui/icons/CheckCircleF';
|
|
45
|
-
import '@para-ui/icons/CloseCircleF';
|
|
46
|
-
import '@para-ui/icons/WarningCircle';
|
|
47
45
|
import '@para-ui/icons/WarningCircleF';
|
|
46
|
+
import '@para-ui/icons/CloseCircleF';
|
|
48
47
|
|
|
49
48
|
var css_248z$4 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/11 下午3:08\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-upload-list-text .upload-list-item {\n margin-top: 8px;\n}\n.paraui-v4-upload-list-text .upload-list-item-info {\n display: flex;\n align-items: center;\n padding: 0 8px;\n line-height: 28px;\n font-size: 14px;\n color: rgb(29, 33, 38);\n border-radius: 4px;\n transition: background-color 0.3s;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text {\n position: relative;\n display: inline-flex;\n align-items: center;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-fileicon {\n line-height: 0;\n opacity: 1;\n transition: opacity 0.3s;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-fileicon svg {\n color: inherit;\n font-size: inherit;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text-name {\n margin-left: 10px;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-actions {\n position: absolute;\n opacity: 0;\n visibility: hidden;\n line-height: 0;\n transition: opacity 0.3s;\n cursor: pointer;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-actions svg {\n color: rgb(244, 66, 66);\n font-size: inherit;\n}\n.paraui-v4-upload-list-text .upload-list-item-info:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-upload-list-text .upload-list-item-info:hover .upload-list-text .upload-list-actions {\n visibility: visible;\n opacity: 1;\n}\n.paraui-v4-upload-list-text .upload-list-item-info:hover .upload-list-text .upload-list-fileicon-active {\n opacity: 0;\n}\n.paraui-v4-upload-list-picture {\n display: inline-flex;\n align-items: center;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item {\n position: relative;\n display: inline-block;\n width: 100px;\n height: 100px;\n margin-right: 16px;\n border-radius: 4px;\n cursor: default;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item::before {\n content: \" \";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n background-color: rgb(29, 33, 38);\n border-radius: 4px;\n opacity: 0;\n transition: 0.3s;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item img {\n width: 100%;\n height: 100%;\n border-radius: 4px;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-name {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n padding: 0 10px;\n font-size: 12px;\n line-height: 24px;\n text-align: center;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n background-color: rgb(29, 33, 38);\n border-radius: 0 0 4px 4px;\n color: rgb(255, 255, 255);\n transition: 0.3s;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-actions {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n opacity: 0;\n line-height: 0;\n cursor: pointer;\n transition: 0.3s;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-actions svg {\n color: rgb(255, 255, 255);\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item:hover:not(.upload-list-picture-item-readonly)::before {\n opacity: 1;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item:hover:not(.upload-list-picture-item-readonly) .upload-list-actions {\n opacity: 1;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item:hover:not(.upload-list-picture-item-readonly) .upload-list-picture-name {\n opacity: 0;\n}";
|
|
50
49
|
styleInject(css_248z$4);
|
|
@@ -107,7 +106,7 @@ var UploadList = function UploadList(props) {
|
|
|
107
106
|
}, {
|
|
108
107
|
children: isImage ? jsx(PhotoIcon, {}) : jsx(TextIcon, {})
|
|
109
108
|
})), renderActions(file), jsx("span", Object.assign({
|
|
110
|
-
className:
|
|
109
|
+
className: 'upload-list-text-name'
|
|
111
110
|
}, {
|
|
112
111
|
children: file.name
|
|
113
112
|
}))]
|
|
@@ -274,7 +273,7 @@ var localeJson = {
|
|
|
274
273
|
en: en
|
|
275
274
|
};
|
|
276
275
|
|
|
277
|
-
var css_248z$2 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/11 下午7:31\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-upload-image {\n display: inline-flex;\n align-items: center;\n
|
|
276
|
+
var css_248z$2 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/11 下午7:31\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-upload-image {\n display: inline-flex;\n align-items: center;\n /* &-border {\n .upload-image-select{\n border: 2px dashed $NA1;\n\n &:hover {\n border: 2px dashed $NPT8;\n }\n }\n } */\n}\n.paraui-v4-upload-image .upload-image-select {\n position: relative;\n width: 100px;\n height: 100px;\n cursor: pointer;\n background-color: rgb(247, 248, 250);\n border-radius: 4px;\n transition: 0.3s;\n}\n.paraui-v4-upload-image .upload-image-select-loading {\n pointer-events: none;\n}\n.paraui-v4-upload-image .upload-image-select .component-upload {\n display: inline-block;\n width: 100%;\n height: 100%;\n}\n.paraui-v4-upload-image .upload-image-select:hover .upload-image-picture-card {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-upload-image .upload-image-picture-card {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n font-size: 14px;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-upload-image .upload-image-picture-card .upload-img-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n cursor: default;\n}\n.paraui-v4-upload-image .upload-image-picture-card .upload-img-wrapper img {\n width: 100%;\n height: 100%;\n border-radius: 4px;\n}\n.paraui-v4-upload-image .upload-image-picture-card .upload-img-wrapper::before {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n content: \" \";\n background-color: rgb(29, 33, 38);\n border-radius: 4px;\n opacity: 0;\n transition: 0.3s;\n}\n.paraui-v4-upload-image .upload-image-picture-card .upload-img-wrapper-name {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n padding: 0 10px;\n overflow: hidden;\n font-size: 12px;\n line-height: 24px;\n color: rgb(255, 255, 255);\n text-align: center;\n text-overflow: ellipsis;\n white-space: nowrap;\n background-color: rgb(29, 33, 38);\n border-radius: 0 0 4px 4px;\n transition: 0.3s;\n}\n.paraui-v4-upload-image .upload-image-picture-card .upload-img-wrapper-action {\n position: absolute;\n top: 50%;\n left: 50%;\n line-height: 0;\n cursor: pointer;\n opacity: 0;\n transition: 0.3s;\n transform: translate(-50%, -50%);\n}\n.paraui-v4-upload-image .upload-image-picture-card .upload-img-wrapper-action svg {\n color: rgb(255, 255, 255);\n}\n.paraui-v4-upload-image .upload-image-picture-card .upload-img-wrapper:hover::before {\n opacity: 1;\n}\n.paraui-v4-upload-image .upload-image-picture-card .upload-img-wrapper:hover .upload-img-wrapper-name {\n opacity: 0;\n}\n.paraui-v4-upload-image .upload-image-picture-card .upload-img-wrapper:hover .upload-img-wrapper-action {\n opacity: 1;\n}\n.paraui-v4-upload-image .upload-image-picture-card .upload-image-icon {\n font-size: 30px;\n color: rgb(46, 101, 230);\n}\n.paraui-v4-upload-image .upload-image-picture-card .upload-image-loading {\n font-size: 30px;\n color: rgb(46, 101, 230);\n animation: imageLoadingCircle 1s infinite linear;\n}\n.paraui-v4-upload-image .upload-image-picture-card .upload-image-text {\n margin-top: 6px;\n color: inherit;\n text-align: center;\n transition: 0.3s;\n}\n.paraui-v4-upload-image .upload-image-picture-card .upload-image-text-loading {\n color: rgb(46, 101, 230);\n}\n@keyframes imageLoadingCircle {\n 100% {\n transform: rotate(360deg);\n }\n}";
|
|
278
277
|
styleInject(css_248z$2);
|
|
279
278
|
|
|
280
279
|
//ImageUpload
|
|
@@ -570,7 +569,7 @@ var ImageUpload = function ImageUpload(props) {
|
|
|
570
569
|
src: avatar.imageUrl,
|
|
571
570
|
alt: (_a = avatar.imageName) !== null && _a !== void 0 ? _a : ''
|
|
572
571
|
}), avatar.imageName && jsx("span", Object.assign({
|
|
573
|
-
className:
|
|
572
|
+
className: 'upload-img-wrapper-name'
|
|
574
573
|
}, {
|
|
575
574
|
children: avatar.imageName
|
|
576
575
|
})), jsx("span", Object.assign({
|
|
@@ -1000,11 +999,11 @@ var ImgCrop = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1000
999
|
});
|
|
1001
1000
|
}; // get the new image
|
|
1002
1001
|
_fileRef$current = fileRef.current, type = _fileRef$current.type, name = _fileRef$current.name, uid = _fileRef$current.uid;
|
|
1003
|
-
if (/svg/
|
|
1002
|
+
if (/svg/gi.test(type)) {
|
|
1004
1003
|
//svg 转为 png
|
|
1005
1004
|
type = 'image/png';
|
|
1006
1005
|
idx = name.lastIndexOf('.');
|
|
1007
|
-
if (idx > -1) name = name.substring(0, idx)
|
|
1006
|
+
if (idx > -1) name = "".concat(name.substring(0, idx), ".png");
|
|
1008
1007
|
}
|
|
1009
1008
|
//转为blob
|
|
1010
1009
|
onBlob = function onBlob(blob) {
|
|
@@ -1380,7 +1379,7 @@ var InternalUpload = function InternalUpload(props) {
|
|
|
1380
1379
|
className: 'upload-drag-text-loading'
|
|
1381
1380
|
}, {
|
|
1382
1381
|
children: [jsx("span", Object.assign({
|
|
1383
|
-
className:
|
|
1382
|
+
className: "upload-drag-text-filename"
|
|
1384
1383
|
}, {
|
|
1385
1384
|
children: (_a = curFileRef.current) === null || _a === void 0 ? void 0 : _a.name
|
|
1386
1385
|
})), intl({
|
|
@@ -1393,7 +1392,7 @@ var InternalUpload = function InternalUpload(props) {
|
|
|
1393
1392
|
}, {
|
|
1394
1393
|
children: children ? children : jsxs(Fragment, {
|
|
1395
1394
|
children: [jsx("p", Object.assign({
|
|
1396
|
-
className:
|
|
1395
|
+
className: "upload-drag-icon"
|
|
1397
1396
|
}, {
|
|
1398
1397
|
children: areaIcon
|
|
1399
1398
|
})), jsx("p", Object.assign({
|
|
@@ -1401,7 +1400,7 @@ var InternalUpload = function InternalUpload(props) {
|
|
|
1401
1400
|
}, {
|
|
1402
1401
|
children: areaText
|
|
1403
1402
|
})), !showLoading && jsx("p", Object.assign({
|
|
1404
|
-
className:
|
|
1403
|
+
className: "upload-drag-hint"
|
|
1405
1404
|
}, {
|
|
1406
1405
|
children: areaDesc
|
|
1407
1406
|
}))]
|
package/Upload/interface.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ReactNode } from
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { RcFile as OriRcFile, Action, UploadRequestMethod, UploadRequestHeader, BeforeUploadFileType, UploadRequestOption } from 'rc-upload/lib/interface';
|
|
3
3
|
type UploadType = 'drag' | 'select';
|
|
4
4
|
export type { BeforeUploadFileType };
|
|
@@ -35,7 +35,7 @@ var colorCardSketchList = colorCardList.map(function (color) {
|
|
|
35
35
|
};
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
var css_248z$3 = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-compact-picker > div > div {\n box-shadow: unset !important;\n}\n.paraui-v4-compact-picker .compact-picker {\n width: 220px !important;\n box-shadow: 0px 2px 8px 0px #eaecf1 !important;\n}\n.paraui-v4-compact-picker .compact-picker > div > span > div {\n width: 14px !important;\n height: 14px !important;\n margin-right: 4px !important;\n margin-bottom: 4px !important;\n box-shadow: unset !important;\n border: 1px solid rgba(29, 33, 38, 0.4);\n border-radius: 2px !important;\n}\n.paraui-v4-compact-picker .compact-picker > div > span > div > div {\n inset: 4px !important;\n background: rgb(255, 255, 255) !important;\n}\n.paraui-v4-compact-picker .compact-picker > div > span > div[title=\"#FFFFFF\"] > div {\n background: rgb(0, 0, 0) !important;\n}";
|
|
38
|
+
var css_248z$3 = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-compact-picker > div > div {\n box-shadow: unset !important;\n}\n.paraui-v4-compact-picker .compact-picker {\n width: 220px !important;\n box-shadow: 0px 2px 8px 0px #eaecf1 !important;\n padding-top: 10px !important;\n padding-left: 10px !important;\n padding-right: 6px !important;\n}\n.paraui-v4-compact-picker .compact-picker > div > span > div {\n width: 14px !important;\n height: 14px !important;\n margin-right: 4px !important;\n margin-bottom: 4px !important;\n box-shadow: unset !important;\n border: 1px solid rgba(29, 33, 38, 0.4);\n border-radius: 2px !important;\n}\n.paraui-v4-compact-picker .compact-picker > div > span > div > div {\n inset: 4px !important;\n background: rgb(255, 255, 255) !important;\n}\n.paraui-v4-compact-picker .compact-picker > div > span > div[title=\"#FFFFFF\"] > div {\n background: rgb(0, 0, 0) !important;\n}\n.paraui-v4-compact-picker .compact-picker > div:nth-child(2) > div:nth-child(1) {\n top: 4px !important;\n left: 0px !important;\n height: 12px !important;\n width: 12px !important;\n}\n.paraui-v4-compact-picker .compact-picker > div:nth-child(2) > div > label {\n color: rgb(92, 101, 115) !important;\n}";
|
|
39
39
|
styleInject(css_248z$3);
|
|
40
40
|
|
|
41
41
|
var CompactPicker = function CompactPicker(props) {
|
|
@@ -125,7 +125,7 @@ var SketchPicker = function SketchPicker(props) {
|
|
|
125
125
|
className: clsx("".concat($prefixCls, "-sketch-picker"), className)
|
|
126
126
|
}, {
|
|
127
127
|
children: [jsx(SketchPicker$1, Object.assign({
|
|
128
|
-
width:
|
|
128
|
+
width: "100%",
|
|
129
129
|
styles: {
|
|
130
130
|
default: {
|
|
131
131
|
picker: {
|
|
@@ -138,7 +138,7 @@ var SketchPicker = function SketchPicker(props) {
|
|
|
138
138
|
}, props, {
|
|
139
139
|
onChange: onPickerChange
|
|
140
140
|
})), clear && jsx("div", {
|
|
141
|
-
className:
|
|
141
|
+
className: "square",
|
|
142
142
|
onClick: onClearCallback
|
|
143
143
|
})]
|
|
144
144
|
}));
|