@para-ui/core 3.0.83 → 3.0.85
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/Cascader/index.d.ts +10 -5
- package/Cascader/index.js +56 -37
- package/ComboSelect/index.js +1 -74
- package/DynamicMultiBox/index.js +1 -0
- package/Form/index.js +2 -1
- package/FormItem/index.js +2 -1
- package/README.md +13 -1
- package/Select/index.js +9 -16
- package/Transfer/box.d.ts +6 -6
- package/Transfer/index.d.ts +3 -3
- package/Transfer/index.js +70 -61
- package/_verture/utils-c9b9a157.js +77 -0
- package/index.js +2 -1
- package/package.json +1 -1
- package/umd/Cascader.js +2 -2
- package/umd/ComboSelect.js +4 -4
- package/umd/DynamicMultiBox.js +1 -1
- package/umd/Form.js +1 -1
- package/umd/FormItem.js +1 -1
- package/umd/Pagination.js +1 -1
- package/umd/Select.js +4 -4
- package/umd/SelectInput.js +1 -1
- package/umd/Table.js +1 -1
- package/umd/Transfer.js +1 -1
- /package/_verture/{index-04c6e510.js → index-c23dc3b0.js} +0 -0
package/Cascader/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./style/index.scss";
|
|
3
3
|
/**
|
|
4
4
|
* @description: 级联选择器
|
|
5
5
|
* @param value{ string }: 选中的值
|
|
@@ -35,7 +35,7 @@ interface Option {
|
|
|
35
35
|
*/
|
|
36
36
|
interface Props {
|
|
37
37
|
data: Option[];
|
|
38
|
-
expandTrigger?:
|
|
38
|
+
expandTrigger?: "click" | "hover";
|
|
39
39
|
value?: string[];
|
|
40
40
|
onChange?: (value: string[], selectedOptions: Option[]) => void;
|
|
41
41
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
@@ -45,10 +45,15 @@ interface Props {
|
|
|
45
45
|
fieldNames?: object;
|
|
46
46
|
disabled?: boolean;
|
|
47
47
|
placeholder?: string;
|
|
48
|
-
size?:
|
|
48
|
+
size?: "small" | "medium" | "large";
|
|
49
49
|
loadData?: (selectedOptions: Option[], setState?: React.Dispatch<React.SetStateAction<Option[]>>) => void;
|
|
50
50
|
loadingIcon?: React.ReactNode;
|
|
51
51
|
children?: React.ReactNode;
|
|
52
|
+
className?: string;
|
|
53
|
+
dropdownClassName?: string;
|
|
52
54
|
}
|
|
53
|
-
export
|
|
55
|
+
export interface CascaderRefProps {
|
|
56
|
+
clearValue: () => void;
|
|
57
|
+
}
|
|
58
|
+
export declare const Cascader: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
|
|
54
59
|
export default Cascader;
|
package/Cascader/index.js
CHANGED
|
@@ -3,12 +3,13 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-76060636.js';
|
|
|
3
3
|
import { r as regenerator } from '../_verture/index-beef914f.js';
|
|
4
4
|
import { a as __awaiter } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
import { useState, useCallback } from 'react';
|
|
6
|
+
import { forwardRef, useState, useCallback, useImperativeHandle } from 'react';
|
|
7
7
|
import RcCascader from 'rc-cascader';
|
|
8
8
|
import Right from '@para-ui/icons/Right';
|
|
9
9
|
import LoadingIcon from '@para-ui/icons/Loading';
|
|
10
10
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
11
|
-
import {
|
|
11
|
+
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
12
|
+
import clsx from 'clsx';
|
|
12
13
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
13
14
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
14
15
|
import '@para-ui/core/GlobalContext';
|
|
@@ -29,31 +30,31 @@ var localeJson = {
|
|
|
29
30
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-cascader input {\n color: #333;\n width: 560px;\n padding: 6px 12px;\n overflow: hidden;\n box-sizing: border-box;\n white-space: nowrap;\n text-overflow: ellipsis;\n border-radius: 4px;\n border: 1px solid #d9d9d9;\n}\n.paraui-v3-cascader button {\n background: transparent;\n border: none;\n}\n.paraui-v3-cascader.component-cascader-dropdown-hidden {\n display: none;\n}\n.paraui-v3-cascader .component-cascader-menus {\n font-size: 12px;\n overflow: hidden;\n background: #fff;\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n box-shadow: 0 0 4px rgba(0, 0, 0, 0.17);\n white-space: nowrap;\n}\n.paraui-v3-cascader .component-cascader-menus.slide-up-enter, .paraui-v3-cascader .component-cascader-menus.slide-up-appear {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n transform-origin: 0 0;\n opacity: 0;\n animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);\n animation-play-state: paused;\n}\n.paraui-v3-cascader .component-cascader-menus.slide-up-leave {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n transform-origin: 0 0;\n opacity: 1;\n animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);\n animation-play-state: paused;\n}\n.paraui-v3-cascader .component-cascader-menus.slide-up-enter.slide-up-enter-active, .paraui-v3-cascader .component-cascader-menus-placement-bottomLeft, .paraui-v3-cascader .component-cascader-menus.slide-up-appear.slide-up-appear-active, .paraui-v3-cascader .component-cascader-menus-placement-bottomLeft {\n animation-name: SlideUpIn;\n animation-play-state: running;\n}\n.paraui-v3-cascader .component-cascader-menus.slide-up-enter.slide-up-enter-active, .paraui-v3-cascader .component-cascader-menus-placement-topLeft, .paraui-v3-cascader .component-cascader-menus.slide-up-appear.slide-up-appear-active, .paraui-v3-cascader .component-cascader-menus-placement-topLeft {\n animation-name: SlideDownIn;\n animation-play-state: running;\n}\n.paraui-v3-cascader .component-cascader-menus.slide-up-leave.slide-up-leave-active, .paraui-v3-cascader .component-cascader-menus-placement-bottomLeft {\n animation-name: SlideUpOut;\n animation-play-state: running;\n}\n.paraui-v3-cascader .component-cascader-menus.slide-up-leave.slide-up-leave-active, .paraui-v3-cascader .component-cascader-menus-placement-topLeft {\n animation-name: SlideDownOut;\n animation-play-state: running;\n}\n.paraui-v3-cascader .component-cascader-menu {\n display: inline-block;\n min-width: 100px;\n height: 192px;\n list-style: none;\n margin: 0;\n padding: 0;\n border-right: 1px solid #e9e9e9;\n overflow: auto;\n}\n.paraui-v3-cascader .component-cascader-menu:last-child {\n border-right: 0;\n}\n.paraui-v3-cascader .component-cascader-menu-item {\n height: 32px;\n line-height: 32px;\n padding: 0 16px;\n cursor: pointer;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n transition: all 0.3s ease;\n position: relative;\n}\n.paraui-v3-cascader .component-cascader-menu-item:hover {\n background: rgba(171, 176, 185, 0.231372549);\n}\n.paraui-v3-cascader .component-cascader-menu-item-disabled {\n cursor: not-allowed;\n color: #ccc;\n}\n.paraui-v3-cascader .component-cascader-menu-item-disabled:hover {\n background: transparent;\n}\n.paraui-v3-cascader .component-cascader-menu-item-active {\n color: #3666d6;\n}\n.paraui-v3-cascader .component-cascader-menu-item-loading-icon {\n display: flex;\n align-items: center;\n margin-left: 10px;\n}\n.paraui-v3-cascader .component-cascader-menu-item-expand {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.paraui-v3-cascader .component-cascader-menu-item-expand-icon {\n font-size: 12px;\n margin-left: 10px;\n}\n.paraui-v3-cascader .component-cascader-menu-item-expand-icon SVG {\n display: flex;\n align-items: center;\n}\n.paraui-v3-cascader .component-cascader-menu-item-expand-icon SVG path {\n fill: #999;\n}\n\n.component-cascader-dropdown {\n position: absolute;\n}\n\n@keyframes SlideUpIn {\n 0% {\n opacity: 0;\n transform-origin: 0% 0%;\n transform: scaleY(0.8);\n }\n 100% {\n opacity: 1;\n transform-origin: 0% 0%;\n transform: scaleY(1);\n }\n}\n@keyframes SlideUpOut {\n 0% {\n opacity: 1;\n transform-origin: 0% 0%;\n transform: scaleY(1);\n }\n 100% {\n opacity: 0;\n transform-origin: 0% 0%;\n transform: scaleY(0.8);\n }\n}\n@keyframes SlideDownIn {\n 0% {\n opacity: 0;\n transform-origin: 0% 100%;\n transform: scaleY(0.8);\n }\n 100% {\n opacity: 1;\n transform-origin: 0% 100%;\n transform: scaleY(1);\n }\n}\n@keyframes SlideDownOut {\n 0% {\n opacity: 1;\n transform-origin: 0% 100%;\n transform: scaleY(1);\n }\n 100% {\n opacity: 0;\n transform-origin: 0% 100%;\n transform: scaleY(0.8);\n }\n}";
|
|
30
31
|
styleInject(css_248z);
|
|
31
32
|
|
|
32
|
-
var Cascader = function
|
|
33
|
-
var data =
|
|
34
|
-
|
|
35
|
-
expandTrigger =
|
|
36
|
-
|
|
37
|
-
value =
|
|
38
|
-
onChange =
|
|
39
|
-
onDropdownVisibleChange =
|
|
40
|
-
|
|
41
|
-
changeOnSelect =
|
|
42
|
-
|
|
43
|
-
expandIcon =
|
|
44
|
-
|
|
45
|
-
expandJoin =
|
|
46
|
-
|
|
47
|
-
fieldNames =
|
|
48
|
-
label:
|
|
49
|
-
value:
|
|
50
|
-
children:
|
|
51
|
-
} :
|
|
52
|
-
|
|
53
|
-
disabled =
|
|
54
|
-
placeholder =
|
|
55
|
-
|
|
56
|
-
loadData =
|
|
33
|
+
var Cascader = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
34
|
+
var data = props.data,
|
|
35
|
+
_props$expandTrigger = props.expandTrigger,
|
|
36
|
+
expandTrigger = _props$expandTrigger === void 0 ? "click" : _props$expandTrigger,
|
|
37
|
+
_props$value = props.value,
|
|
38
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
39
|
+
onChange = props.onChange,
|
|
40
|
+
onDropdownVisibleChange = props.onDropdownVisibleChange,
|
|
41
|
+
_props$changeOnSelect = props.changeOnSelect,
|
|
42
|
+
changeOnSelect = _props$changeOnSelect === void 0 ? false : _props$changeOnSelect,
|
|
43
|
+
_props$expandIcon = props.expandIcon,
|
|
44
|
+
expandIcon = _props$expandIcon === void 0 ? jsx(Right, {}) : _props$expandIcon,
|
|
45
|
+
_props$expandJoin = props.expandJoin,
|
|
46
|
+
expandJoin = _props$expandJoin === void 0 ? " , " : _props$expandJoin,
|
|
47
|
+
_props$fieldNames = props.fieldNames,
|
|
48
|
+
fieldNames = _props$fieldNames === void 0 ? {
|
|
49
|
+
label: "label",
|
|
50
|
+
value: "value",
|
|
51
|
+
children: "children"
|
|
52
|
+
} : _props$fieldNames,
|
|
53
|
+
_props$disabled = props.disabled,
|
|
54
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
55
|
+
placeholder = props.placeholder,
|
|
56
|
+
_props$loadData = props.loadData,
|
|
57
|
+
loadData = _props$loadData === void 0 ? function () {
|
|
57
58
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/regenerator.mark(function _callee() {
|
|
58
59
|
return regenerator.wrap(function _callee$(_context) {
|
|
59
60
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -63,11 +64,13 @@ var Cascader = function Cascader(_ref) {
|
|
|
63
64
|
}
|
|
64
65
|
}, _callee);
|
|
65
66
|
}));
|
|
66
|
-
} :
|
|
67
|
-
|
|
68
|
-
loadingIcon =
|
|
69
|
-
children =
|
|
70
|
-
|
|
67
|
+
} : _props$loadData,
|
|
68
|
+
_props$loadingIcon = props.loadingIcon,
|
|
69
|
+
loadingIcon = _props$loadingIcon === void 0 ? jsx(LoadingIcon, {}) : _props$loadingIcon,
|
|
70
|
+
children = props.children,
|
|
71
|
+
dropdownClassName = props.dropdownClassName,
|
|
72
|
+
className = props.className;
|
|
73
|
+
var intl = useFormatMessage("Cascader", localeJson);
|
|
71
74
|
var _useState = useState(data),
|
|
72
75
|
_useState2 = _slicedToArray(_useState, 2),
|
|
73
76
|
option = _useState2[0],
|
|
@@ -103,8 +106,24 @@ var Cascader = function Cascader(_ref) {
|
|
|
103
106
|
}, _callee2);
|
|
104
107
|
}));
|
|
105
108
|
};
|
|
109
|
+
var casCls = function casCls() {
|
|
110
|
+
var cls = clsx($prefixCls + "-cascader", className);
|
|
111
|
+
return cls;
|
|
112
|
+
};
|
|
113
|
+
var dropdownCls = function dropdownCls() {
|
|
114
|
+
var cls = clsx($prefixCls + "-cascader", dropdownClassName);
|
|
115
|
+
return cls;
|
|
116
|
+
};
|
|
117
|
+
useImperativeHandle(ref, function () {
|
|
118
|
+
return {
|
|
119
|
+
clearValue: function clearValue() {
|
|
120
|
+
setValue([]);
|
|
121
|
+
setLabel("");
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
});
|
|
106
125
|
return jsx("div", Object.assign({
|
|
107
|
-
className:
|
|
126
|
+
className: casCls()
|
|
108
127
|
}, {
|
|
109
128
|
children: jsx(RcCascader, Object.assign({
|
|
110
129
|
options: option,
|
|
@@ -117,8 +136,8 @@ var Cascader = function Cascader(_ref) {
|
|
|
117
136
|
loadingIcon: loadingIcon,
|
|
118
137
|
onDropdownVisibleChange: onDropdownVisibleChange,
|
|
119
138
|
value: inputValue,
|
|
120
|
-
prefixCls: $rcPrefixCls +
|
|
121
|
-
dropdownClassName:
|
|
139
|
+
prefixCls: $rcPrefixCls + "-cascader",
|
|
140
|
+
dropdownClassName: dropdownCls()
|
|
122
141
|
}, {
|
|
123
142
|
children: children ? jsx("button", Object.assign({
|
|
124
143
|
disabled: disabled
|
|
@@ -129,12 +148,12 @@ var Cascader = function Cascader(_ref) {
|
|
|
129
148
|
readOnly: true,
|
|
130
149
|
disabled: disabled,
|
|
131
150
|
placeholder: placeholder || intl({
|
|
132
|
-
id:
|
|
151
|
+
id: "placeholder"
|
|
133
152
|
})
|
|
134
153
|
})
|
|
135
154
|
}))
|
|
136
155
|
}));
|
|
137
|
-
};
|
|
156
|
+
});
|
|
138
157
|
function valueToLabel(opt, value, expandJoin) {
|
|
139
158
|
var label = [];
|
|
140
159
|
var count = 0;
|
package/ComboSelect/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import { Popover } from '../Popover/index.js';
|
|
|
17
17
|
import AutoTips from '../AutoTips/index.js';
|
|
18
18
|
import { Tooltip } from '../Tooltip/index.js';
|
|
19
19
|
import clsx from 'clsx';
|
|
20
|
+
import { g as getReplaceField, i as isRemoteLoad, d as debounce, t as toArray, a as getOverlaySize } from '../_verture/utils-c9b9a157.js';
|
|
20
21
|
import { DeepClone, ArrayToObject } from '@paraview/lib';
|
|
21
22
|
import GlobalContext from '@para-ui/core/GlobalContext';
|
|
22
23
|
import { u as useGlobalProps } from '../_verture/useGlobalProps-1b846a65.js';
|
|
@@ -66,80 +67,6 @@ import 'rc-dropdown';
|
|
|
66
67
|
import '../_verture/usePopupContainer-87febeb9.js';
|
|
67
68
|
import 'dayjs';
|
|
68
69
|
|
|
69
|
-
//获取替换字段
|
|
70
|
-
var getReplaceField = function getReplaceField(mode, repl, tableP, treeP) {
|
|
71
|
-
var t = {};
|
|
72
|
-
if (mode === "tree") t = treeP === null || treeP === void 0 ? void 0 : treeP.replaceFields;else t = tableP === null || tableP === void 0 ? void 0 : tableP.replaceFields;
|
|
73
|
-
return Object.assign(Object.assign({}, repl), t);
|
|
74
|
-
};
|
|
75
|
-
//to array
|
|
76
|
-
var toArray = function toArray(list) {
|
|
77
|
-
if (!list) return [];
|
|
78
|
-
return Array.isArray(list) ? list : JSON.stringify(list) === "{}" ? [] : [list];
|
|
79
|
-
};
|
|
80
|
-
var isRemoteLoad = function isRemoteLoad(mode, props) {
|
|
81
|
-
if (mode === "table") {
|
|
82
|
-
return !(props && Array.isArray(props.data));
|
|
83
|
-
}
|
|
84
|
-
return !(props && Array.isArray(props.treeData));
|
|
85
|
-
};
|
|
86
|
-
var getOverlaySize = function getOverlaySize(mode) {
|
|
87
|
-
var isRemoteLoad = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
88
|
-
var maxHeight = arguments.length > 2 ? arguments[2] : undefined;
|
|
89
|
-
var height = arguments.length > 3 ? arguments[3] : undefined;
|
|
90
|
-
var _a;
|
|
91
|
-
var screenH = 720;
|
|
92
|
-
var treeOverlay = "".concat(maxHeight || 254, "px");
|
|
93
|
-
var listOverlay = "".concat(maxHeight || 232, "px");
|
|
94
|
-
// let largeScreenH = 880;
|
|
95
|
-
var largeTreeOverlayH = "".concat(maxHeight || 338, "px");
|
|
96
|
-
var largeListOverlayH = "".concat(maxHeight || 304, "px");
|
|
97
|
-
var clientH = document.documentElement.clientHeight;
|
|
98
|
-
var fixHeight = height !== undefined ? "height" : "maxHeight";
|
|
99
|
-
if (mode === "tree") {
|
|
100
|
-
//tree
|
|
101
|
-
if (clientH <= screenH) {
|
|
102
|
-
//小屏幕
|
|
103
|
-
return isRemoteLoad ? {
|
|
104
|
-
height: treeOverlay
|
|
105
|
-
} : _defineProperty({}, fixHeight, treeOverlay);
|
|
106
|
-
}
|
|
107
|
-
//大屏幕
|
|
108
|
-
return isRemoteLoad ? {
|
|
109
|
-
height: largeTreeOverlayH
|
|
110
|
-
} : _defineProperty({}, fixHeight, largeTreeOverlayH);
|
|
111
|
-
} else if (mode === "list") {
|
|
112
|
-
//list
|
|
113
|
-
if (clientH <= screenH) {
|
|
114
|
-
return isRemoteLoad ? {
|
|
115
|
-
height: listOverlay
|
|
116
|
-
} : _defineProperty({}, fixHeight, listOverlay);
|
|
117
|
-
}
|
|
118
|
-
return isRemoteLoad ? {
|
|
119
|
-
height: largeListOverlayH
|
|
120
|
-
} : _defineProperty({}, fixHeight, largeListOverlayH);
|
|
121
|
-
} else {
|
|
122
|
-
//table
|
|
123
|
-
return {
|
|
124
|
-
height: "".concat((_a = maxHeight !== null && maxHeight !== void 0 ? maxHeight : height) !== null && _a !== void 0 ? _a : 360, "px")
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
// 实现一个防抖函数,debounce接受一个函数func和delay时间作为参数,返回一个防抖函数。使用泛型T保证返回防抖函数的类型与原func一致
|
|
129
|
-
function debounce(func, delay) {
|
|
130
|
-
var timer;
|
|
131
|
-
return function () {
|
|
132
|
-
var _this = this;
|
|
133
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
134
|
-
args[_key] = arguments[_key];
|
|
135
|
-
}
|
|
136
|
-
if (timer) clearTimeout(timer);
|
|
137
|
-
timer = setTimeout(function () {
|
|
138
|
-
func.apply(_this, args);
|
|
139
|
-
}, delay);
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
|
|
143
70
|
var en = {
|
|
144
71
|
searchPlaceholder: 'Please enter',
|
|
145
72
|
cancel: 'Cancel',
|
package/DynamicMultiBox/index.js
CHANGED
|
@@ -81,6 +81,7 @@ import 'react-dom';
|
|
|
81
81
|
import '@para-ui/icons/EditFile';
|
|
82
82
|
import '@para-ui/icons/PlusCircle';
|
|
83
83
|
import '@para-ui/icons/MoreCircle';
|
|
84
|
+
import '../_verture/utils-c9b9a157.js';
|
|
84
85
|
import 'rc-picker/es/generate/dayjs';
|
|
85
86
|
import '../Tag/index.js';
|
|
86
87
|
import 'rc-picker';
|
package/Form/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-76060636.js';
|
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { DeepClone } from '@paraview/lib';
|
|
5
5
|
import React__default from 'react';
|
|
6
|
-
import { F as FormItem, v as validate } from '../_verture/index-
|
|
6
|
+
import { F as FormItem, v as validate } from '../_verture/index-c23dc3b0.js';
|
|
7
7
|
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
8
8
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
9
9
|
import '../TextField/index.js';
|
|
@@ -77,6 +77,7 @@ import 'react-dom';
|
|
|
77
77
|
import '@para-ui/icons/EditFile';
|
|
78
78
|
import '@para-ui/icons/PlusCircle';
|
|
79
79
|
import '@para-ui/icons/MoreCircle';
|
|
80
|
+
import '../_verture/utils-c9b9a157.js';
|
|
80
81
|
|
|
81
82
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
82
83
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
package/FormItem/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { F as default } from '../_verture/index-
|
|
3
|
+
export { F as default } from '../_verture/index-c23dc3b0.js';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../Label/index.js';
|
|
6
6
|
import '../_verture/constant-66aa48a1.js';
|
|
@@ -77,3 +77,4 @@ import 'react-dom';
|
|
|
77
77
|
import '@para-ui/icons/EditFile';
|
|
78
78
|
import '@para-ui/icons/PlusCircle';
|
|
79
79
|
import '@para-ui/icons/MoreCircle';
|
|
80
|
+
import '../_verture/utils-c9b9a157.js';
|
package/README.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 版本: 3.0.85
|
|
2
|
+
|
|
3
|
+
para-ui/core@3.0.85 发布
|
|
4
|
+
【穿梭框-Transfer】搜索添加防抖处理,搜索渲染不再反复渲染节点,避免数据过多引起的bug
|
|
5
|
+
|
|
6
|
+
## 版本: 3.0.84
|
|
7
|
+
|
|
8
|
+
para-ui/core@3.0.84 发布
|
|
9
|
+
【下拉框-Select】去除searchModel为inside,自动得到焦点,防止页面上下抖动
|
|
10
|
+
【下拉框-Select】修复下拉框闪烁渲染
|
|
11
|
+
【级联选择器-Cascader】级联选择器增加dropdownClassName,className字段,修改组件样式,组件暴露clearValue函数清空组件值
|
|
12
|
+
|
|
1
13
|
## 版本: 3.0.83
|
|
2
14
|
|
|
3
15
|
para-ui/core@3.0.83 发布
|
|
@@ -45,7 +57,7 @@
|
|
|
45
57
|
para-ui/core@3.0.77 发布
|
|
46
58
|
【文档】更新表格,多值框,单值框文档
|
|
47
59
|
【国际化】国际化文档更新
|
|
48
|
-
【para-ui/icons】添加 @para-ui/icons 依赖到 peerDependencies
|
|
60
|
+
【para-ui/icons】添加 @para-ui/icons 依赖到 peerDependencies
|
|
49
61
|
|
|
50
62
|
## 版本: 3.0.76
|
|
51
63
|
|
package/Select/index.js
CHANGED
|
@@ -200,6 +200,7 @@ var Select = function Select(props) {
|
|
|
200
200
|
locale = _React$useContext.locale;
|
|
201
201
|
var intl = useFormatMessage('Select', localeJson);
|
|
202
202
|
constData.listCom = listCom;
|
|
203
|
+
constData.searchModel = searchModel;
|
|
203
204
|
useEffect(function () {
|
|
204
205
|
if (props.defaultValue !== undefined) {
|
|
205
206
|
if (props.multiple) {
|
|
@@ -214,7 +215,6 @@ var Select = function Select(props) {
|
|
|
214
215
|
clearTimeout(constData.searchTimer);
|
|
215
216
|
clearTimeout(constData.timer);
|
|
216
217
|
clearTimeout(constData.scrollTimer);
|
|
217
|
-
clearTimeout(constData.inputFocusTimer);
|
|
218
218
|
};
|
|
219
219
|
}, []);
|
|
220
220
|
// 赋值value
|
|
@@ -392,20 +392,10 @@ var Select = function Select(props) {
|
|
|
392
392
|
// 输入框的到焦点
|
|
393
393
|
var inputFocus = function inputFocus() {
|
|
394
394
|
var inputDom = textDom && textDom.current;
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
constData.inputFocusTimer = setTimeout(function () {
|
|
400
|
-
inputDom && inputDom.focus({
|
|
401
|
-
preventScroll: true
|
|
402
|
-
});
|
|
403
|
-
}, 800);
|
|
404
|
-
} else {
|
|
405
|
-
inputDom && inputDom.focus({
|
|
406
|
-
preventScroll: true
|
|
407
|
-
});
|
|
408
|
-
}
|
|
395
|
+
if (constData.searchModel === "inside") return;
|
|
396
|
+
inputDom && inputDom.focus({
|
|
397
|
+
preventScroll: true
|
|
398
|
+
});
|
|
409
399
|
};
|
|
410
400
|
/**
|
|
411
401
|
* 查找元素
|
|
@@ -1025,7 +1015,10 @@ var Select = function Select(props) {
|
|
|
1025
1015
|
});
|
|
1026
1016
|
};
|
|
1027
1017
|
return jsxs("div", Object.assign({
|
|
1028
|
-
className: handClass()
|
|
1018
|
+
className: handClass(),
|
|
1019
|
+
style: {
|
|
1020
|
+
outline: '1px solid transparent'
|
|
1021
|
+
}
|
|
1029
1022
|
}, {
|
|
1030
1023
|
children: [listCom && listCom.length > 0 ? jsx(Fragment, {
|
|
1031
1024
|
children: listCom.map(function (item, index) {
|
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.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="sortablejs" />
|
|
2
|
-
import { CSSProperties, ReactNode } from
|
|
3
|
-
import { ItemDataProps } from
|
|
4
|
-
import
|
|
2
|
+
import { CSSProperties, ReactNode } from "react";
|
|
3
|
+
import { ItemDataProps } from "./box";
|
|
4
|
+
import "./style/index.scss";
|
|
5
5
|
/**
|
|
6
6
|
* @description: 穿梭框
|
|
7
7
|
* @param className{string} 类名
|