@para-ui/core 3.0.95 → 3.0.96-rc
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.js +5 -9
- package/AutoTips/index.js +4 -11
- package/Breadcrumbs/index.js +7 -11
- package/Button/index.js +8 -12
- package/ButtonGroup/index.js +8 -12
- package/Carousel/index.js +4 -8
- package/Cascader/index.js +7 -11
- package/Checkbox/index.js +4 -8
- package/CheckboxGroup/index.js +4 -8
- package/Collapse/index.js +1 -5
- package/CollapseBox/index.js +4 -8
- package/CollapseLayout/index.js +6 -10
- package/ColorPicker/index.js +0 -2
- package/ComboSelect/index.js +14 -18
- package/Container/index.js +1 -5
- package/DatePicker/index.js +10 -14
- package/Desktop/index.js +10 -14
- package/DragVerify/index.js +6 -10
- package/Drawer/index.js +8 -12
- package/Dropdown/index.js +3 -4
- package/DynamicMultiBox/index.js +15 -19
- package/Empty/index.js +3 -7
- package/Form/index.js +15 -16
- package/FormItem/index.js +15 -16
- package/FunctionModal/index.js +14 -15
- package/GlobalContext/index.js +3 -3
- package/Help/index.js +4 -8
- package/HelperText/index.js +1 -5
- package/InputLang/index.js +11 -15
- package/InputNumber/index.js +4 -8
- package/Label/index.js +4 -8
- package/Loading/index.js +1 -5
- package/Menu/index.js +5 -9
- package/Message/index.js +4 -8
- package/Modal/index.js +10 -17
- package/MultiBox/index.js +10 -14
- package/Notification/index.js +3 -7
- package/OperateBtn/index.js +9 -13
- package/PageHeader/index.js +9 -13
- package/Pagination/index.js +11 -15
- package/ParauiProvider/index.d.ts +1 -0
- package/ParauiProvider/index.js +3 -7
- package/PasswordRules/index.js +3 -7
- package/PopConfirm/index.js +8 -12
- package/Popover/index.js +5 -9
- package/Progress/index.js +2 -6
- package/Querying/index.js +3 -7
- package/README.md +19 -0
- package/Radio/index.js +4 -8
- package/RadioGroup/index.js +4 -8
- package/Search/index.js +9 -13
- package/Select/index.js +11 -15
- package/SelectInput/index.js +11 -12
- package/Selector/index.js +11 -24
- package/SelectorPicker/index.js +12 -16
- package/SingleBox/index.js +10 -14
- package/Slider/index.js +6 -10
- package/Split/index.js +4 -8
- package/Status/index.js +1 -5
- package/Stepper/index.js +3 -7
- package/Styles/theme/theme-api.scss +75 -0
- package/Styles/theme/theme-default.scss +74 -0
- package/Styles/theme.scss +1 -69
- package/Switch/index.js +6 -10
- package/Table/index.js +12 -37
- package/Tabs/index.js +9 -13
- package/Tag/index.js +7 -11
- package/TextEditor/index.js +5 -12
- package/TextField/index.js +8 -12
- package/TimePicker/index.js +10 -11
- package/Timeline/index.js +4 -8
- package/Title/index.js +1 -5
- package/ToggleButton/index.js +9 -13
- package/Tooltip/index.js +4 -8
- package/Transfer/index.js +13 -17
- package/Tree/index.js +12 -13
- package/Upload/index.js +12 -28
- package/_verture/{index-be25b2bc.js → closestPolyfill-8e886a31.js} +8 -15
- package/_verture/closestPolyfill-f7c93112.js +1354 -0
- package/_verture/constant-e57461ec.js +10 -0
- package/_verture/{defineProperty-62acccfc.js → defineProperty-d4d9efd4.js} +1 -1
- package/_verture/defineProperty-e14a3528.js +34 -0
- package/_verture/index-5ba535f6.js +340 -0
- package/_verture/{index-417e619f.js → index-81a8bcc8.js} +4 -11
- package/_verture/{index-77f9e0fb.js → index-ad9d2d45.js} +2 -6
- package/_verture/index-b68740ef.js +757 -0
- package/_verture/index-c3c58a54.js +18 -0
- package/_verture/index-d6d0b546.js +232 -0
- package/_verture/{intl-4a9f1b44.js → intl-2de03d12.js} +1 -1
- package/_verture/intl-a4aa3504.js +81 -0
- package/_verture/{modalContext-630bdb73.js → modalContext-6ac8594e.js} +4 -8
- package/_verture/modalContext-c0fc65fb.js +197 -0
- package/_verture/{slicedToArray-76060636.js → slicedToArray-6bd4e68d.js} +1 -1
- package/_verture/slicedToArray-d9e693d2.js +43 -0
- package/_verture/sortable.esm-64084a06.js +3791 -0
- package/_verture/{toConsumableArray-81040c9e.js → toConsumableArray-0b41c45a.js} +1 -1
- package/_verture/toConsumableArray-e3923ceb.js +19 -0
- package/_verture/tslib.es6-a8032d26.js +38 -0
- package/_verture/typeof-b09647ab.js +11 -0
- package/_verture/unsupportedIterableToArray-4d94cbc3.js +16 -0
- package/_verture/useFormatMessage-2e03025f.js +20 -0
- package/_verture/useGlobalProps-3375fd77.js +11 -0
- package/_verture/usePopupContainer-b14637e4.js +68 -0
- package/_verture/util-78a49855.js +18 -0
- package/_verture/{utils-c9b9a157.js → utils-13a45f4b.js} +1 -1
- package/_verture/utils-a9b658f5.js +77 -0
- package/index.js +20 -22
- package/package.json +4 -1
- package/theme/theme-api.css +14173 -0
- package/theme/theme.css +14569 -0
- package/umd/ParauiProvider.js +1 -1
- package/_verture/index-a369ca3f.js +0 -4
- package/_verture/style-inject.es-300983ab.js +0 -28
- /package/_verture/{constant-66aa48a1.js → constant-0aabc28f.js} +0 -0
- /package/_verture/{index-beef914f.js → index-195072d8.js} +0 -0
- /package/_verture/{index-65bbd1e4.js → index-66a9d135.js} +0 -0
- /package/_verture/{sortable.esm-49896035.js → sortable.esm-3af239dd.js} +0 -0
- /package/_verture/{tslib.es6-55ed4bd2.js → tslib.es6-06ab276e.js} +0 -0
- /package/_verture/{typeof-498dd2b1.js → typeof-0acaee7a.js} +0 -0
- /package/_verture/{unsupportedIterableToArray-cb478f24.js → unsupportedIterableToArray-08e778ea.js} +0 -0
- /package/_verture/{useFormatMessage-703f8b20.js → useFormatMessage-28b2378f.js} +0 -0
- /package/_verture/{useGlobalProps-1b846a65.js → useGlobalProps-19090719.js} +0 -0
- /package/_verture/{usePopupContainer-87febeb9.js → usePopupContainer-b12a6364.js} +0 -0
- /package/_verture/{util-7e1fb1e2.js → util-5abd3644.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as _arrayLikeToArray, _ as _unsupportedIterableToArray } from './unsupportedIterableToArray-
|
|
1
|
+
import { a as _arrayLikeToArray, _ as _unsupportedIterableToArray } from './unsupportedIterableToArray-4d94cbc3.js';
|
|
2
2
|
|
|
3
3
|
function _arrayWithoutHoles(arr) {
|
|
4
4
|
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { a as _arrayLikeToArray, _ as _unsupportedIterableToArray } from './unsupportedIterableToArray-08e778ea.js';
|
|
2
|
+
|
|
3
|
+
function _arrayWithoutHoles(arr) {
|
|
4
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function _iterableToArray(iter) {
|
|
8
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function _nonIterableSpread() {
|
|
12
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function _toConsumableArray(arr) {
|
|
16
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { _toConsumableArray as _ };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
function __rest(s, e) {
|
|
17
|
+
var t = {};
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
+
t[p[i]] = s[p[i]];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { __rest as _, __awaiter as a };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function _typeof(obj) {
|
|
2
|
+
"@babel/helpers - typeof";
|
|
3
|
+
|
|
4
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
5
|
+
return typeof obj;
|
|
6
|
+
} : function (obj) {
|
|
7
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
8
|
+
}, _typeof(obj);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { _typeof as _ };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function _arrayLikeToArray(arr, len) {
|
|
2
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
4
|
+
return arr2;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
8
|
+
if (!o) return;
|
|
9
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
10
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
11
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
12
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { _unsupportedIterableToArray as _, _arrayLikeToArray as a };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import GlobalContext from '@para-ui/core/GlobalContext';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @author linhd
|
|
6
|
+
* @date 2022/3/15 4:03 PM
|
|
7
|
+
* @description 国际化钩子
|
|
8
|
+
*/
|
|
9
|
+
var useFormatMessage = function useFormatMessage(comName, defI18nData) {
|
|
10
|
+
var _React$useContext = React__default.useContext(GlobalContext),
|
|
11
|
+
intlFormat = _React$useContext.intlFormat;
|
|
12
|
+
defI18nData.zh_CN = defI18nData.zh;
|
|
13
|
+
defI18nData['zh-CN'] = defI18nData.zh;
|
|
14
|
+
defI18nData.en_US = defI18nData.en;
|
|
15
|
+
defI18nData['en-US'] = defI18nData.en;
|
|
16
|
+
var intl = intlFormat && intlFormat(comName, defI18nData);
|
|
17
|
+
return intl;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { useFormatMessage as u };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import GlobalContext from '@para-ui/core/GlobalContext';
|
|
3
|
+
|
|
4
|
+
function useGlobalProps(comProps, comName) {
|
|
5
|
+
var _React$useContext = React__default.useContext(GlobalContext),
|
|
6
|
+
componentsProps = _React$useContext.componentsProps;
|
|
7
|
+
var globalProps = componentsProps && componentsProps[comName];
|
|
8
|
+
return Object.assign(Object.assign({}, globalProps), comProps);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { useGlobalProps as u };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @author Hanz
|
|
5
|
+
* @date 2022/10/9 10:12 AM
|
|
6
|
+
* @description 查找最近的祖先滚动容器
|
|
7
|
+
*/
|
|
8
|
+
//判断是否滚动元素
|
|
9
|
+
function isOverflowElement(element) {
|
|
10
|
+
var _window$getComputedSt = window.getComputedStyle(element),
|
|
11
|
+
overflow = _window$getComputedSt.overflow,
|
|
12
|
+
overflowX = _window$getComputedSt.overflowX,
|
|
13
|
+
overflowY = _window$getComputedSt.overflowY;
|
|
14
|
+
return /auto|scroll|overlay/.test(overflow + overflowY + overflowX);
|
|
15
|
+
}
|
|
16
|
+
//最近的祖先滚动元素
|
|
17
|
+
function getNearestOverflowAncestor(node) {
|
|
18
|
+
var _a, _b;
|
|
19
|
+
var parentNode = node.parentNode || node.ownerDocument;
|
|
20
|
+
var nodeName = ((_a = parentNode === null || parentNode === void 0 ? void 0 : parentNode.nodeName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
|
|
21
|
+
if (['html', 'body', '#document'].includes(nodeName)) {
|
|
22
|
+
return (_b = node === null || node === void 0 ? void 0 : node.ownerDocument) === null || _b === void 0 ? void 0 : _b.body;
|
|
23
|
+
}
|
|
24
|
+
if (parentNode instanceof window.HTMLElement && isOverflowElement(parentNode)) {
|
|
25
|
+
return parentNode;
|
|
26
|
+
}
|
|
27
|
+
return getNearestOverflowAncestor(parentNode);
|
|
28
|
+
}
|
|
29
|
+
//渲染容器
|
|
30
|
+
function usePopupContainer(wrapRef, customizeContainer) {
|
|
31
|
+
var popupRef = React__default.useRef();
|
|
32
|
+
//浮层渲染容器
|
|
33
|
+
var getPopupContainer = function getPopupContainer(triggerNode) {
|
|
34
|
+
var _a, _b, _c, _d;
|
|
35
|
+
var container;
|
|
36
|
+
if (!customizeContainer) {
|
|
37
|
+
var rootNode = (_b = (_a = wrapRef.current) === null || _a === void 0 ? void 0 : _a.getRootDomNode) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
38
|
+
if (rootNode) {
|
|
39
|
+
container = getNearestOverflowAncestor(rootNode);
|
|
40
|
+
var scrollHeight = container.scrollHeight;
|
|
41
|
+
var clientHeight = container.clientHeight;
|
|
42
|
+
if (scrollHeight <= clientHeight) {
|
|
43
|
+
container = document.body;
|
|
44
|
+
}
|
|
45
|
+
} else {
|
|
46
|
+
container = document.body;
|
|
47
|
+
}
|
|
48
|
+
var nodeName = (_c = container.nodeName) === null || _c === void 0 ? void 0 : _c.toLowerCase();
|
|
49
|
+
if (nodeName !== 'body') {
|
|
50
|
+
if (((_d = window.getComputedStyle(container)) === null || _d === void 0 ? void 0 : _d.position) === 'static') {
|
|
51
|
+
container.style.position = 'relative';
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
popupRef.current = container;
|
|
55
|
+
} else {
|
|
56
|
+
container = customizeContainer(triggerNode) || document.body;
|
|
57
|
+
}
|
|
58
|
+
return container;
|
|
59
|
+
};
|
|
60
|
+
React__default.useEffect(function () {
|
|
61
|
+
return function () {
|
|
62
|
+
if (popupRef.current) popupRef.current.style.position = '';
|
|
63
|
+
};
|
|
64
|
+
}, []);
|
|
65
|
+
return getPopupContainer;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { getNearestOverflowAncestor as g, usePopupContainer as u };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function getTransitionProps(props, options) {
|
|
2
|
+
var timeout = props.timeout,
|
|
3
|
+
_props$style = props.style,
|
|
4
|
+
style = _props$style === void 0 ? {} : _props$style;
|
|
5
|
+
return {
|
|
6
|
+
duration: style.transitionDuration || typeof timeout === 'number' ? timeout : timeout[options.mode] || 0,
|
|
7
|
+
delay: style.transitionDelay
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function getAutoHeightDuration(height) {
|
|
11
|
+
if (!height) {
|
|
12
|
+
return 0;
|
|
13
|
+
}
|
|
14
|
+
var constant = height / 36;
|
|
15
|
+
return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { getAutoHeightDuration as a, getTransitionProps as g };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { _ as _defineProperty } from './defineProperty-d4d9efd4.js';
|
|
2
|
+
|
|
3
|
+
//获取替换字段
|
|
4
|
+
var getReplaceField = function getReplaceField(mode, repl, tableP, treeP) {
|
|
5
|
+
var t = {};
|
|
6
|
+
if (mode === "tree") t = treeP === null || treeP === void 0 ? void 0 : treeP.replaceFields;else t = tableP === null || tableP === void 0 ? void 0 : tableP.replaceFields;
|
|
7
|
+
return Object.assign(Object.assign({}, repl), t);
|
|
8
|
+
};
|
|
9
|
+
//to array
|
|
10
|
+
var toArray = function toArray(list) {
|
|
11
|
+
if (!list) return [];
|
|
12
|
+
return Array.isArray(list) ? list : JSON.stringify(list) === "{}" ? [] : [list];
|
|
13
|
+
};
|
|
14
|
+
var isRemoteLoad = function isRemoteLoad(mode, props) {
|
|
15
|
+
if (mode === "table") {
|
|
16
|
+
return !(props && Array.isArray(props.data));
|
|
17
|
+
}
|
|
18
|
+
return !(props && Array.isArray(props.treeData));
|
|
19
|
+
};
|
|
20
|
+
var getOverlaySize = function getOverlaySize(mode) {
|
|
21
|
+
var isRemoteLoad = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
22
|
+
var maxHeight = arguments.length > 2 ? arguments[2] : undefined;
|
|
23
|
+
var height = arguments.length > 3 ? arguments[3] : undefined;
|
|
24
|
+
var _a;
|
|
25
|
+
var screenH = 720;
|
|
26
|
+
var treeOverlay = "".concat(maxHeight || 254, "px");
|
|
27
|
+
var listOverlay = "".concat(maxHeight || 232, "px");
|
|
28
|
+
// let largeScreenH = 880;
|
|
29
|
+
var largeTreeOverlayH = "".concat(maxHeight || 338, "px");
|
|
30
|
+
var largeListOverlayH = "".concat(maxHeight || 304, "px");
|
|
31
|
+
var clientH = document.documentElement.clientHeight;
|
|
32
|
+
var fixHeight = height !== undefined ? "height" : "maxHeight";
|
|
33
|
+
if (mode === "tree") {
|
|
34
|
+
//tree
|
|
35
|
+
if (clientH <= screenH) {
|
|
36
|
+
//小屏幕
|
|
37
|
+
return isRemoteLoad ? {
|
|
38
|
+
height: treeOverlay
|
|
39
|
+
} : _defineProperty({}, fixHeight, treeOverlay);
|
|
40
|
+
}
|
|
41
|
+
//大屏幕
|
|
42
|
+
return isRemoteLoad ? {
|
|
43
|
+
height: largeTreeOverlayH
|
|
44
|
+
} : _defineProperty({}, fixHeight, largeTreeOverlayH);
|
|
45
|
+
} else if (mode === "list") {
|
|
46
|
+
//list
|
|
47
|
+
if (clientH <= screenH) {
|
|
48
|
+
return isRemoteLoad ? {
|
|
49
|
+
height: listOverlay
|
|
50
|
+
} : _defineProperty({}, fixHeight, listOverlay);
|
|
51
|
+
}
|
|
52
|
+
return isRemoteLoad ? {
|
|
53
|
+
height: largeListOverlayH
|
|
54
|
+
} : _defineProperty({}, fixHeight, largeListOverlayH);
|
|
55
|
+
} else {
|
|
56
|
+
//table
|
|
57
|
+
return {
|
|
58
|
+
height: "".concat((_a = maxHeight !== null && maxHeight !== void 0 ? maxHeight : height) !== null && _a !== void 0 ? _a : 360, "px")
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
// 实现一个防抖函数,debounce接受一个函数func和delay时间作为参数,返回一个防抖函数。使用泛型T保证返回防抖函数的类型与原func一致
|
|
63
|
+
function debounce(func, delay) {
|
|
64
|
+
var timer;
|
|
65
|
+
return function () {
|
|
66
|
+
var _this = this;
|
|
67
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
68
|
+
args[_key] = arguments[_key];
|
|
69
|
+
}
|
|
70
|
+
if (timer) clearTimeout(timer);
|
|
71
|
+
timer = setTimeout(function () {
|
|
72
|
+
func.apply(_this, args);
|
|
73
|
+
}, delay);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { getOverlaySize as a, debounce as d, getReplaceField as g, isRemoteLoad as i, toArray as t };
|
package/index.js
CHANGED
|
@@ -11,19 +11,18 @@ export { Collapse } from './Collapse/index.js';
|
|
|
11
11
|
export { default as CollapseBox } from './CollapseBox/index.js';
|
|
12
12
|
export { default as CollapseLayout } from './CollapseLayout/index.js';
|
|
13
13
|
export { ChromePicker, SketchPicker as ColorPicker, CompactPicker, SwatchesPicker } from 'react-color';
|
|
14
|
-
import './_verture/index-a369ca3f.js';
|
|
15
14
|
export { ComboSelect } from './ComboSelect/index.js';
|
|
16
15
|
export { Container } from './Container/index.js';
|
|
17
16
|
export { default as DatePicker } from './DatePicker/index.js';
|
|
18
17
|
export { Desktop } from './Desktop/index.js';
|
|
19
18
|
export { DragVerify } from './DragVerify/index.js';
|
|
20
19
|
export { Drawer } from './Drawer/index.js';
|
|
21
|
-
export { D as Dropdown } from './_verture/index-
|
|
20
|
+
export { D as Dropdown } from './_verture/index-d6d0b546.js';
|
|
22
21
|
export { default as DynamicMultiBox } from './DynamicMultiBox/index.js';
|
|
23
22
|
export { default as Empty } from './Empty/index.js';
|
|
24
23
|
export { default as Form } from './Form/index.js';
|
|
25
|
-
export { F as FormItem } from './_verture/index-
|
|
26
|
-
export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-
|
|
24
|
+
export { F as FormItem } from './_verture/index-b68740ef.js';
|
|
25
|
+
export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-c0fc65fb.js';
|
|
27
26
|
export { default as GlobalContext, changeConfirmLocale, getConfirmLocale } from './GlobalContext/index.js';
|
|
28
27
|
export { default as Help } from './Help/index.js';
|
|
29
28
|
export { default as HelperText } from './HelperText/index.js';
|
|
@@ -69,44 +68,43 @@ export { Title } from './Title/index.js';
|
|
|
69
68
|
export { ToggleButton, ToggleButtonGroup } from './ToggleButton/index.js';
|
|
70
69
|
export { Tooltip } from './Tooltip/index.js';
|
|
71
70
|
export { SSortablejs, Transfer } from './Transfer/index.js';
|
|
72
|
-
export { T as Tree } from './_verture/
|
|
71
|
+
export { T as Tree } from './_verture/closestPolyfill-8e886a31.js';
|
|
73
72
|
export { default as Upload } from './Upload/index.js';
|
|
74
73
|
export { default as locale } from './locale/index.js';
|
|
75
|
-
import './_verture/slicedToArray-
|
|
76
|
-
import './_verture/unsupportedIterableToArray-
|
|
74
|
+
import './_verture/slicedToArray-d9e693d2.js';
|
|
75
|
+
import './_verture/unsupportedIterableToArray-08e778ea.js';
|
|
77
76
|
import 'react/jsx-runtime';
|
|
78
77
|
import 'react';
|
|
79
78
|
import 'react-dom';
|
|
80
79
|
import '@paraview/lib';
|
|
81
|
-
import './_verture/constant-
|
|
80
|
+
import './_verture/constant-e57461ec.js';
|
|
82
81
|
import '@para-ui/icons/More';
|
|
83
|
-
import './_verture/
|
|
84
|
-
import './_verture/toConsumableArray-81040c9e.js';
|
|
82
|
+
import './_verture/toConsumableArray-e3923ceb.js';
|
|
85
83
|
import '@para-ui/icons/Return';
|
|
86
|
-
import './_verture/useFormatMessage-
|
|
84
|
+
import './_verture/useFormatMessage-2e03025f.js';
|
|
87
85
|
import '@para-ui/core/GlobalContext';
|
|
88
|
-
import './_verture/typeof-
|
|
89
|
-
import './_verture/tslib.es6-
|
|
86
|
+
import './_verture/typeof-b09647ab.js';
|
|
87
|
+
import './_verture/tslib.es6-06ab276e.js';
|
|
90
88
|
import 'clsx';
|
|
91
89
|
import '@para-ui/icons/LoadingF';
|
|
92
90
|
import '@para-ui/icons/Forbid';
|
|
93
91
|
import '@para-ui/icons/Down';
|
|
94
|
-
import './_verture/defineProperty-
|
|
92
|
+
import './_verture/defineProperty-d4d9efd4.js';
|
|
95
93
|
import 'react-slick';
|
|
96
|
-
import './_verture/index-
|
|
94
|
+
import './_verture/index-195072d8.js';
|
|
97
95
|
import 'rc-cascader';
|
|
98
96
|
import '@para-ui/icons/Right';
|
|
99
97
|
import '@para-ui/icons/Loading';
|
|
100
98
|
import 'rc-collapse';
|
|
101
99
|
import 'react-transition-group';
|
|
102
|
-
import './_verture/util-
|
|
100
|
+
import './_verture/util-78a49855.js';
|
|
103
101
|
import '@para-ui/icons/DoubleLeft';
|
|
104
102
|
import '@para-ui/icons/DoubleRight';
|
|
105
103
|
import '@para-ui/icons/Search';
|
|
106
104
|
import '@para-ui/icons/Close';
|
|
107
105
|
import '@para-ui/icons/CloseCircle';
|
|
108
|
-
import './_verture/utils-
|
|
109
|
-
import './_verture/useGlobalProps-
|
|
106
|
+
import './_verture/utils-a9b658f5.js';
|
|
107
|
+
import './_verture/useGlobalProps-3375fd77.js';
|
|
110
108
|
import 'rc-picker/es/generate/dayjs';
|
|
111
109
|
import 'rc-picker';
|
|
112
110
|
import '@para-ui/icons/Calendar';
|
|
@@ -117,16 +115,16 @@ import '@para-ui/icons/SortRight';
|
|
|
117
115
|
import '@para-ui/icons/Check';
|
|
118
116
|
import 'rc-drawer';
|
|
119
117
|
import 'rc-dropdown';
|
|
120
|
-
import './_verture/usePopupContainer-
|
|
118
|
+
import './_verture/usePopupContainer-b12a6364.js';
|
|
121
119
|
import 'dayjs';
|
|
122
120
|
import '@para-ui/icons/Panel';
|
|
123
121
|
import '@para-ui/icons/PlusCircleF';
|
|
124
122
|
import '@para-ui/icons/Delete';
|
|
125
123
|
import '@para-ui/icons/Drag';
|
|
126
|
-
import './_verture/sortable.esm-
|
|
124
|
+
import './_verture/sortable.esm-64084a06.js';
|
|
127
125
|
import '@para-ui/icons/LinkGroup';
|
|
128
|
-
import './_verture/intl-
|
|
129
|
-
import './_verture/index-
|
|
126
|
+
import './_verture/intl-2de03d12.js';
|
|
127
|
+
import './_verture/index-66a9d135.js';
|
|
130
128
|
import '@para-ui/icons/Help';
|
|
131
129
|
import '@para-ui/icons/Application';
|
|
132
130
|
import 'rc-input-number';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@para-ui/core",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.96-rc",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"typings": "./index.d.ts",
|
|
7
7
|
"description": "Powered by Para FED",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"locale": "node locale.js",
|
|
14
14
|
"build:docs": "node run && webpack --config=./config/webpack.dev.config.js",
|
|
15
15
|
"build": "npm run locale && rm -rf dist && rollup -c && npm run build:umd",
|
|
16
|
+
"build:theme": "npm run locale && rm -rf dist && rollup -c rollup.config.css.js && npm run build:umd",
|
|
16
17
|
"build:umd": "webpack --config=./config/webpack.umd.config.js",
|
|
17
18
|
"npm:publish": "./publish.sh"
|
|
18
19
|
},
|
|
@@ -65,6 +66,7 @@
|
|
|
65
66
|
"@babel/preset-typescript": "^7.18.6",
|
|
66
67
|
"@para-snack/core": "^2.1.0",
|
|
67
68
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
|
69
|
+
"@rollup/plugin-alias": "^5.0.1",
|
|
68
70
|
"@rollup/plugin-babel": "^5.3.1",
|
|
69
71
|
"@rollup/plugin-commonjs": "^22.0.1",
|
|
70
72
|
"@rollup/plugin-json": "^4.1.0",
|
|
@@ -91,6 +93,7 @@
|
|
|
91
93
|
"monaco-editor-webpack-plugin": "^7.1.0",
|
|
92
94
|
"postcss": "^8.4.14",
|
|
93
95
|
"postcss-import": "^14.1.0",
|
|
96
|
+
"postcss-prefix-selector": "^1.16.0",
|
|
94
97
|
"prettier": "^2.6.0",
|
|
95
98
|
"react-app-polyfill": "^3.0.0",
|
|
96
99
|
"react-copy-to-clipboard": "^5.0.3",
|