@para-ui/core 3.0.86 → 4.0.0-beta
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 +18 -19
- package/AutoTips/index.js +5 -4
- package/Breadcrumbs/index.js +5 -4
- package/Button/SplitButton.d.ts +13 -0
- package/Button/index.d.ts +1 -1
- package/Button/index.js +54 -12
- package/ButtonGroup/index.js +6 -5
- package/Carousel/index.d.ts +5 -5
- package/Carousel/index.js +21 -9
- package/Cascader/Cascader.d.ts +99 -0
- package/Cascader/OptionList/CacheContent.d.ts +7 -0
- package/Cascader/OptionList/Column.d.ts +21 -0
- package/Cascader/OptionList/index.d.ts +4 -0
- package/Cascader/OptionList/useActive.d.ts +6 -0
- package/Cascader/context.d.ts +23 -0
- package/Cascader/hooks/useDisplayValues.d.ts +10 -0
- package/Cascader/hooks/useEntities.d.ts +10 -0
- package/Cascader/hooks/useMissingValues.d.ts +3 -0
- package/Cascader/index.d.ts +3 -58
- package/Cascader/index.js +28 -177
- package/Cascader/utils/commonUtil.d.ts +18 -0
- package/Cascader/utils/treeUtil.d.ts +55 -0
- package/Checkbox/index.d.ts +7 -0
- package/Checkbox/index.js +50 -29
- package/CheckboxGroup/index.d.ts +3 -1
- package/CheckboxGroup/index.js +48 -18
- package/Collapse/index.js +2 -2
- package/Collapse/motion.d.ts +0 -2
- package/CollapseBox/index.js +3 -3
- package/CollapseLayout/index.d.ts +5 -0
- package/CollapseLayout/index.js +144 -22
- package/ColorPicker/chromePicker/index.d.ts +9 -0
- package/ColorPicker/compactPicker/index.d.ts +9 -0
- package/ColorPicker/config.d.ts +5 -0
- package/ColorPicker/index.d.ts +4 -1
- package/ColorPicker/index.js +7 -3
- package/ColorPicker/sketchPicker/index.d.ts +11 -0
- package/ColorPicker/swatchesPicker/index.d.ts +9 -0
- package/ComboSelect/index.js +14 -12
- package/Container/index.js +2 -2
- package/CopyText/index.d.ts +33 -0
- package/CopyText/index.js +180 -0
- package/DatePicker/generatePicker/generateRangePicker.d.ts +9 -2
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +8 -8
- package/DatePicker/generatePicker/index.d.ts +32 -26
- package/DatePicker/generatePicker/interface.d.ts +12 -0
- package/DatePicker/index.d.ts +12 -8
- package/DatePicker/index.js +367 -454
- package/DatePicker/util.d.ts +40 -4
- package/Desktop/index.d.ts +16 -3
- package/Desktop/index.js +177 -68
- package/Desktop/lang/en_US.d.ts +6 -0
- package/Desktop/lang/index.d.ts +13 -0
- package/Desktop/lang/zh_CN.d.ts +6 -0
- package/DragVerify/index.js +9 -100
- package/Drawer/index.js +8 -8
- package/Drawer/interface.d.ts +2 -2
- package/Dropdown/index.js +2 -2
- package/DynamicMultiBox/index.js +57 -41
- package/DynamicMultiBox/interface.d.ts +4 -4
- package/Empty/index.js +2 -2
- package/Form/index.d.ts +20 -26
- package/Form/index.js +48 -69
- package/FormItem/index.js +15 -15
- package/FunctionModal/index.js +11 -9
- package/GlobalContext/constant.d.ts +1 -1
- package/GlobalContext/index.js +2 -2
- package/Help/index.js +4 -3
- package/HelperText/index.js +2 -2
- package/InputLang/index.d.ts +5 -0
- package/InputLang/index.js +35 -29
- package/InputNumber/index.d.ts +5 -0
- package/InputNumber/index.js +95 -80
- package/Label/index.js +4 -3
- package/Loading/index.js +2 -2
- package/Menu/index.js +114 -39
- package/Menu/interface.d.ts +8 -0
- package/Message/index.d.ts +4 -4
- package/Message/index.js +13 -11
- package/Modal/index.js +29 -15
- package/MultiBox/index.js +9 -8
- package/Notification/index.d.ts +9 -1
- package/Notification/index.js +29 -15
- package/OperateBtn/index.js +28 -11
- package/PageHeader/index.js +270 -74
- package/PageHeader/interface.d.ts +17 -0
- package/Pagination/index.d.ts +4 -3
- package/Pagination/index.js +117 -95
- package/Pagination/lang/en_US.d.ts +3 -2
- package/Pagination/lang/index.d.ts +6 -4
- package/Pagination/lang/zh_CN.d.ts +3 -2
- package/ParauiProvider/index.js +4 -4
- package/PasswordRules/index.js +5 -5
- package/PopConfirm/index.d.ts +15 -5
- package/PopConfirm/index.js +62 -16
- package/Popover/index.js +4 -3
- package/Progress/index.js +10 -9
- package/Querying/index.js +7 -7
- package/README.md +40 -1120
- package/Radio/index.d.ts +7 -0
- package/Radio/index.js +49 -27
- package/RadioGroup/index.d.ts +3 -1
- package/RadioGroup/index.js +48 -21
- package/Search/index.d.ts +3 -15
- package/Search/index.js +21 -83
- package/Select/index.d.ts +7 -2
- package/Select/index.js +114 -91
- package/Select/lang/en_US.d.ts +1 -1
- package/Select/lang/index.d.ts +2 -2
- package/Select/lang/zh_CN.d.ts +1 -1
- package/SelectInput/index.js +8 -7
- package/Selector/index.js +30 -22
- package/SelectorPicker/index.d.ts +5 -0
- package/SelectorPicker/index.js +47 -32
- package/SelectorPicker/lang/en_US.d.ts +1 -0
- package/SelectorPicker/lang/index.d.ts +2 -0
- package/SelectorPicker/lang/zh_CN.d.ts +1 -0
- package/SingleBox/index.js +8 -7
- package/Slider/index.js +5 -5
- package/Status/index.d.ts +6 -5
- package/Status/index.js +27 -4
- package/Stepper/index.d.ts +9 -10
- package/Stepper/index.js +69 -29
- package/Styles/index.scss +4 -0
- package/Styles/scrollbar.scss +24 -24
- package/Styles/theme.scss +104 -57
- package/Switch/index.d.ts +34 -14
- package/Switch/index.js +97 -30
- package/Table/index.js +33 -27
- package/Table/interface.d.ts +3 -1
- package/Table/tableHeadInterface.d.ts +1 -1
- package/Table/tablePaginationInterface.d.ts +5 -5
- package/Tabs/index.d.ts +11 -1
- package/Tabs/index.js +49 -16
- package/Tag/TagGroup.d.ts +11 -7
- package/Tag/index.d.ts +22 -7
- package/Tag/index.js +1382 -53
- package/TextEditor/index.js +4 -3
- package/TextField/index.d.ts +5 -0
- package/TextField/index.js +50 -32
- package/TimePicker/index.d.ts +5 -0
- package/TimePicker/index.js +39 -23
- package/Timeline/TimelineItem.d.ts +1 -1
- package/Timeline/index.d.ts +5 -5
- package/Timeline/index.js +21 -18
- package/Title/index.d.ts +15 -3
- package/Title/index.js +95 -29
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -0
- package/ToggleButton/index.d.ts +4 -0
- package/ToggleButton/index.js +14 -52
- package/Tooltip/index.js +28 -34
- package/Tooltip/interface.d.ts +4 -10
- package/Tooltip/utils.d.ts +1 -3
- package/Transfer/index.d.ts +3 -3
- package/Transfer/index.js +72 -68
- package/Tree/Tree.d.ts +2 -2
- package/Tree/index.js +10 -9
- package/Tree/utils/treeUtil.d.ts +0 -7
- package/Upload/index.js +16 -14
- package/_verture/{constant-66aa48a1.js → constant-0d9802f7.js} +1 -1
- package/_verture/{defineProperty-62acccfc.js → defineProperty-1d116156.js} +1 -1
- package/_verture/index-5c77417d.js +150 -0
- package/_verture/index-68db2bc3.js +10530 -0
- package/_verture/{index-9738004e.js → index-7ec72724.js} +44 -38
- package/_verture/index-d63bd287.js +327 -0
- package/_verture/{index-fa8a0124.js → index-e6f85fd5.js} +7 -8
- package/_verture/{index-77f9e0fb.js → index-e9007d6a.js} +6 -6
- package/_verture/{intl-4a9f1b44.js → intl-5c1ec055.js} +1 -1
- package/_verture/{modalContext-20780c9a.js → modalContext-c12ca3e8.js} +3 -3
- package/_verture/slicedToArray-a8206399.js +43 -0
- package/_verture/{toConsumableArray-81040c9e.js → toConsumableArray-8f4c9589.js} +1 -1
- package/_verture/typeof-adeedc13.js +11 -0
- package/_verture/typeof-b240b062.js +16 -0
- package/_verture/{utils-c9b9a157.js → utils-f0e81540.js} +8 -8
- package/index.d.ts +2 -2
- package/index.js +32 -27
- package/locale/en-US.d.ts +10 -6
- package/locale/index.d.ts +20 -12
- package/locale/index.js +33 -25
- package/locale/zh-CN.d.ts +10 -6
- package/package.json +25 -10
- package/umd/AutoBox.js +20 -21
- package/umd/AutoTips.js +31 -4
- package/umd/Breadcrumbs.js +7 -7
- package/umd/Button.js +7 -8
- package/umd/ButtonGroup.js +7 -8
- package/umd/Carousel.js +29 -1
- package/umd/Cascader.js +20 -21
- package/umd/Checkbox.js +7 -7
- package/umd/CheckboxGroup.js +7 -7
- package/umd/Collapse.js +19 -21
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ColorPicker.js +1 -1
- package/umd/ComboSelect.js +7 -7
- package/umd/Container.js +1 -1
- package/umd/CopyText.js +42 -0
- package/umd/DatePicker.js +7 -7
- package/umd/Desktop.js +7 -7
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +7 -8
- package/umd/Dropdown.js +3 -3
- package/umd/DynamicMultiBox.js +7 -7
- package/umd/Empty.js +1 -1
- package/umd/Form.js +6 -6
- package/umd/FormItem.js +6 -6
- package/umd/FunctionModal.js +7 -7
- package/umd/Help.js +7 -7
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +7 -7
- package/umd/InputNumber.js +7 -7
- package/umd/Label.js +7 -7
- package/umd/Loading.js +4 -5
- package/umd/Menu.js +4 -4
- package/umd/Message.js +3 -4
- package/umd/Modal.js +7 -7
- package/umd/MultiBox.js +7 -7
- package/umd/Notification.js +5 -6
- package/umd/OperateBtn.js +7 -7
- package/umd/PageHeader.js +7 -7
- package/umd/Pagination.js +7 -7
- package/umd/ParauiProvider.js +1 -1
- package/umd/PasswordRules.js +3 -4
- package/umd/PopConfirm.js +7 -7
- package/umd/Popover.js +31 -4
- package/umd/Progress.js +4 -5
- package/umd/Querying.js +1 -1
- package/umd/Radio.js +7 -7
- package/umd/RadioGroup.js +7 -7
- package/umd/Search.js +7 -7
- package/umd/Select.js +7 -7
- package/umd/SelectInput.js +7 -7
- package/umd/Selector.js +7 -7
- package/umd/SelectorPicker.js +7 -7
- package/umd/SingleBox.js +7 -7
- package/umd/Slider.js +3 -3
- package/umd/Status.js +29 -1
- package/umd/Stepper.js +20 -20
- package/umd/Switch.js +7 -7
- package/umd/Table.js +7 -7
- package/umd/Tabs.js +7 -7
- package/umd/Tag.js +7 -8
- package/umd/TextEditor.js +19 -19
- package/umd/TextField.js +7 -7
- package/umd/TimePicker.js +7 -7
- package/umd/Timeline.js +1 -1
- package/umd/Title.js +42 -1
- package/umd/ToggleButton.js +7 -8
- package/umd/Tooltip.js +31 -4
- package/umd/Transfer.js +8 -8
- package/umd/Tree.js +7 -7
- package/umd/Upload.js +8 -8
- package/umd/locale.js +1 -1
- package/Cascader/lang/en_US.d.ts +0 -4
- package/Cascader/lang/index.d.ts +0 -9
- package/Cascader/lang/zh_CN.d.ts +0 -4
- package/Split/index.d.ts +0 -7
- package/Split/index.js +0 -123
- package/_verture/index-a369ca3f.js +0 -4
- package/_verture/index-beef914f.js +0 -340
- package/_verture/slicedToArray-76060636.js +0 -43
- package/_verture/typeof-498dd2b1.js +0 -11
- package/umd/Split.js +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { _ as _toConsumableArray } from './toConsumableArray-
|
|
2
|
-
import { _ as _defineProperty } from './defineProperty-
|
|
3
|
-
import { _ as _slicedToArray } from './slicedToArray-
|
|
4
|
-
import { r as regenerator } from './index-
|
|
1
|
+
import { _ as _toConsumableArray } from './toConsumableArray-8f4c9589.js';
|
|
2
|
+
import { _ as _defineProperty } from './defineProperty-1d116156.js';
|
|
3
|
+
import { _ as _slicedToArray } from './slicedToArray-a8206399.js';
|
|
4
|
+
import { r as regenerator } from './index-d63bd287.js';
|
|
5
5
|
import { _ as __rest, a as __awaiter } from './tslib.es6-55ed4bd2.js';
|
|
6
6
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
7
7
|
import React__default, { isValidElement, cloneElement, useRef, useState, useImperativeHandle, useEffect, useMemo } from 'react';
|
|
8
8
|
import RcTree from 'rc-tree';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
import { _ as _typeof } from './typeof-
|
|
10
|
+
import { _ as _typeof } from './typeof-adeedc13.js';
|
|
11
11
|
import LoadingOutlined from '@para-ui/icons/LoadingF';
|
|
12
12
|
import FileOutlined from '@para-ui/icons/Document';
|
|
13
13
|
import SolidArrowDown from '@para-ui/icons/DownTriangleF';
|
|
14
14
|
import { Radio } from '../Radio/index.js';
|
|
15
|
-
import { $ as $prefixCls } from './constant-
|
|
15
|
+
import { $ as $prefixCls } from './constant-0d9802f7.js';
|
|
16
16
|
import ReactDOM from 'react-dom';
|
|
17
17
|
import EditOutlinedIcon from '@para-ui/icons/EditFile';
|
|
18
18
|
import AddOutlinedIcon from '@para-ui/icons/PlusCircle';
|
|
@@ -265,7 +265,7 @@ var localeJson = {
|
|
|
265
265
|
en: en
|
|
266
266
|
};
|
|
267
267
|
|
|
268
|
-
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author
|
|
268
|
+
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.sector-container {\n position: relative;\n z-index: 1500;\n}\n.sector-container .sector-item-container {\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n padding: 0;\n}\n.sector-container .sector-item-container .sector-item {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n left: 0;\n top: 0;\n width: 24px;\n height: 24px;\n background-color: rgb(255, 255, 255);\n border-radius: 50%;\n box-shadow: 4px 4px 6px rgba(70, 75, 105, 0.2), -4px -4px 6px rgba(0, 0, 0, 0.06);\n cursor: pointer;\n opacity: 0;\n}\n.sector-container .sector-item-container .sector-item svg {\n color: rgb(92, 101, 115);\n}\n.sector-container .sector-item-container .sector-item:hover {\n color: rgb(46, 101, 230);\n}\n.sector-container .sector-item-container .sector-item:hover svg {\n color: inherit;\n}\n.sector-container .sector-item-container .sector-item--del:hover {\n color: linear-gradient(90deg, rgb(46, 101, 230) 50%, rgb(240, 245, 255) 100%);\n}\n.sector-container .sector-item-container .sector-item--del:hover svg {\n color: inherit;\n}";
|
|
269
269
|
styleInject(css_248z$1);
|
|
270
270
|
|
|
271
271
|
//默认扇形按钮图标
|
|
@@ -566,17 +566,17 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
566
566
|
_props$params = props.params,
|
|
567
567
|
params = _props$params === void 0 ? null : _props$params,
|
|
568
568
|
_props$method = props.method,
|
|
569
|
-
method = _props$method === void 0 ?
|
|
569
|
+
method = _props$method === void 0 ? "GET" : _props$method,
|
|
570
570
|
headers = props.headers,
|
|
571
571
|
requestCallback = props.requestCallback,
|
|
572
572
|
refresh = props.refresh,
|
|
573
573
|
_props$replaceFields = props.replaceFields,
|
|
574
574
|
replaceFields = _props$replaceFields === void 0 ? {
|
|
575
|
-
key:
|
|
576
|
-
parentId:
|
|
577
|
-
children:
|
|
578
|
-
title:
|
|
579
|
-
loadKey:
|
|
575
|
+
key: "key",
|
|
576
|
+
parentId: "parentId",
|
|
577
|
+
children: "children",
|
|
578
|
+
title: "title",
|
|
579
|
+
loadKey: "key"
|
|
580
580
|
} : _props$replaceFields,
|
|
581
581
|
originTreeData = props.treeData,
|
|
582
582
|
className = props.className,
|
|
@@ -623,9 +623,9 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
623
623
|
wrapperStyle = props.wrapperStyle,
|
|
624
624
|
_props$showLoading = props.showLoading,
|
|
625
625
|
showLoading = _props$showLoading === void 0 ? true : _props$showLoading,
|
|
626
|
+
onLoadedKey = props.onLoadedKey,
|
|
626
627
|
_props$tipMaxWidth = props.tipMaxWidth,
|
|
627
|
-
tipMaxWidth = _props$tipMaxWidth === void 0 ? 500 : _props$tipMaxWidth
|
|
628
|
-
onLoadedKey = props.onLoadedKey;
|
|
628
|
+
tipMaxWidth = _props$tipMaxWidth === void 0 ? 500 : _props$tipMaxWidth;
|
|
629
629
|
var _useState = useState([]),
|
|
630
630
|
_useState2 = _slicedToArray(_useState, 2),
|
|
631
631
|
treeData = _useState2[0],
|
|
@@ -647,7 +647,7 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
647
647
|
var treeOriDataRef = useRef([]); //tree origin data
|
|
648
648
|
var nPageSize = Object.assign(Object.assign({}, defaultPageSize), pageSize);
|
|
649
649
|
var halfCheckedKeys = useRef([]); //半选keys
|
|
650
|
-
var intl = useFormatMessage(
|
|
650
|
+
var intl = useFormatMessage("Tree", localeJson);
|
|
651
651
|
var _useState7 = useState(false),
|
|
652
652
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
653
653
|
loading = _useState8[0],
|
|
@@ -694,9 +694,10 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
694
694
|
//加载更多节点
|
|
695
695
|
return jsx("span", Object.assign({
|
|
696
696
|
className: "".concat($prefixCls, "-tree-title-wrapper"),
|
|
697
|
-
title:
|
|
697
|
+
title: ""
|
|
698
698
|
}, {
|
|
699
699
|
children: jsx(AutoTips, Object.assign({
|
|
700
|
+
placement: "top-start",
|
|
700
701
|
tipMaxWidth: tipMaxWidth
|
|
701
702
|
}, {
|
|
702
703
|
children: nodeData.title
|
|
@@ -708,12 +709,13 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
708
709
|
onMouseEnter: handleTreeNodeMEnter,
|
|
709
710
|
onMouseLeave: handleTreeNodeMLeave,
|
|
710
711
|
onClick: handleTreeNodeClick,
|
|
711
|
-
title: blockNode ?
|
|
712
|
+
title: blockNode ? "" : undefined
|
|
712
713
|
}, {
|
|
713
714
|
children: [jsx(AutoTips, Object.assign({
|
|
714
|
-
tipMaxWidth: tipMaxWidth
|
|
715
|
+
tipMaxWidth: tipMaxWidth,
|
|
716
|
+
placement: "top-start"
|
|
715
717
|
}, {
|
|
716
|
-
children: typeof titleRender ===
|
|
718
|
+
children: typeof titleRender === "function" ? titleRender(nodeData) : nodeData.title
|
|
717
719
|
})), !!showActions && jsx("div", Object.assign({
|
|
718
720
|
className: "sector-anchor",
|
|
719
721
|
onMouseEnter: function onMouseEnter(evt) {
|
|
@@ -721,7 +723,9 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
721
723
|
},
|
|
722
724
|
onMouseLeave: handleSectorMLeave
|
|
723
725
|
}, {
|
|
724
|
-
children: jsx(MoreOutlinedIcon, {
|
|
726
|
+
children: jsx(MoreOutlinedIcon, {
|
|
727
|
+
size: "medium"
|
|
728
|
+
})
|
|
725
729
|
}))]
|
|
726
730
|
}));
|
|
727
731
|
};
|
|
@@ -797,9 +801,9 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
797
801
|
var showSector = function showSector(anchorEl, nodeData) {
|
|
798
802
|
var _a, _b;
|
|
799
803
|
var portalRoot = document.getElementById(opRef.current.uid);
|
|
800
|
-
anchorEl.classList.add(
|
|
804
|
+
anchorEl.classList.add("sector-anchor--active");
|
|
801
805
|
if (portalRoot) {
|
|
802
|
-
var container = portalRoot.querySelector(
|
|
806
|
+
var container = portalRoot.querySelector(".sector-container");
|
|
803
807
|
if (container) {
|
|
804
808
|
(_b = (_a = opRef.current) === null || _a === void 0 ? void 0 : _a.onShowSector) === null || _b === void 0 ? void 0 : _b.call(_a, nodeData, true);
|
|
805
809
|
}
|
|
@@ -809,7 +813,7 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
809
813
|
var removeSector = function removeSector(anchorEl) {
|
|
810
814
|
var _a, _b;
|
|
811
815
|
if (anchorEl) {
|
|
812
|
-
anchorEl.classList.remove(
|
|
816
|
+
anchorEl.classList.remove("sector-anchor--active");
|
|
813
817
|
(_b = (_a = opRef.current) === null || _a === void 0 ? void 0 : _a.onShowSector) === null || _b === void 0 ? void 0 : _b.call(_a, {}, false);
|
|
814
818
|
}
|
|
815
819
|
};
|
|
@@ -841,7 +845,7 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
841
845
|
if (radioable) {
|
|
842
846
|
//单选
|
|
843
847
|
var node = e.node;
|
|
844
|
-
var key = (_a = replaceFields.key) !== null && _a !== void 0 ? _a :
|
|
848
|
+
var key = (_a = replaceFields.key) !== null && _a !== void 0 ? _a : "key";
|
|
845
849
|
if (e.checked) temp = [node[key]];
|
|
846
850
|
} else if (checkStrictly) {
|
|
847
851
|
//严格模式
|
|
@@ -852,14 +856,14 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
852
856
|
temp = checkedKeys;
|
|
853
857
|
halfChecked = e.halfCheckedKeys;
|
|
854
858
|
}
|
|
855
|
-
if (!(
|
|
859
|
+
if (!("checkedKeys" in props)) {
|
|
856
860
|
setInCheckedKeys(temp);
|
|
857
861
|
}
|
|
858
862
|
onCheck === null || onCheck === void 0 ? void 0 : onCheck(temp, e, halfChecked);
|
|
859
863
|
};
|
|
860
864
|
//展开节点
|
|
861
865
|
var internalExpand = function internalExpand(expandedKeys, e) {
|
|
862
|
-
if (!(
|
|
866
|
+
if (!("expandedKeys" in props)) {
|
|
863
867
|
setInExpandedKeys(_toConsumableArray(expandedKeys));
|
|
864
868
|
}
|
|
865
869
|
onExpand === null || onExpand === void 0 ? void 0 : onExpand(expandedKeys, e);
|
|
@@ -885,7 +889,7 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
885
889
|
url: url,
|
|
886
890
|
ctx: ctx,
|
|
887
891
|
method: m
|
|
888
|
-
}, m ===
|
|
892
|
+
}, m === "GET" ? "params" : "data", tParams || {});
|
|
889
893
|
if (headers) opts.headers = headers;
|
|
890
894
|
_context.next = 9;
|
|
891
895
|
return Request(opts);
|
|
@@ -914,7 +918,7 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
914
918
|
return {
|
|
915
919
|
key: String((Math.random() * 1000000 | 0) + Date.now()),
|
|
916
920
|
title: intl({
|
|
917
|
-
id:
|
|
921
|
+
id: "loadMore"
|
|
918
922
|
}),
|
|
919
923
|
checkable: false,
|
|
920
924
|
disableCheckbox: true,
|
|
@@ -939,7 +943,7 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
939
943
|
//更新tree数据
|
|
940
944
|
var updateTreeData = function updateTreeData(list, key, children, moreFlag) {
|
|
941
945
|
//root节点
|
|
942
|
-
if (key ===
|
|
946
|
+
if (key === "ROOT_KEY") {
|
|
943
947
|
list.pop(); //删除加载更多节点
|
|
944
948
|
return list.concat(children);
|
|
945
949
|
}
|
|
@@ -988,7 +992,7 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
988
992
|
case 3:
|
|
989
993
|
//当前节点key
|
|
990
994
|
tKey = key; //参数动态字段
|
|
991
|
-
loadKey = (_a = replaceFields.loadKey) !== null && _a !== void 0 ? _a :
|
|
995
|
+
loadKey = (_a = replaceFields.loadKey) !== null && _a !== void 0 ? _a : "key"; //加载节点时参数
|
|
992
996
|
loadParams = Object.assign(_defineProperty({}, loadKey, tKey), params); //是否分页
|
|
993
997
|
if (pagination) {
|
|
994
998
|
if (moreFlag) {
|
|
@@ -996,7 +1000,7 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
996
1000
|
tKey = parentId;
|
|
997
1001
|
treeMapRef.current[tKey].page += 1;
|
|
998
1002
|
loadParams[loadKey] = tKey;
|
|
999
|
-
if (tKey ===
|
|
1003
|
+
if (tKey === "ROOT_KEY") {
|
|
1000
1004
|
//根节点加载更多,不需要key
|
|
1001
1005
|
delete loadParams[loadKey];
|
|
1002
1006
|
}
|
|
@@ -1062,7 +1066,7 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
1062
1066
|
//计算分页,是否显示加载更多
|
|
1063
1067
|
if (page * size < total) {
|
|
1064
1068
|
var loadMoreData = getLoadMoreData();
|
|
1065
|
-
loadMoreData.parentId = parentId ||
|
|
1069
|
+
loadMoreData.parentId = parentId || "ROOT_KEY";
|
|
1066
1070
|
loadMoreData.title = renderLoadMoreNode(loadMoreData);
|
|
1067
1071
|
newTreeData.push(loadMoreData);
|
|
1068
1072
|
}
|
|
@@ -1225,7 +1229,7 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
1225
1229
|
var searchKey = _ref2.searchKey,
|
|
1226
1230
|
searchValue = _ref2.searchValue;
|
|
1227
1231
|
if (!searchKey) return;
|
|
1228
|
-
if (searchValue ===
|
|
1232
|
+
if (searchValue === "") {
|
|
1229
1233
|
setTreeData(treeOriDataRef.current);
|
|
1230
1234
|
var tKeys = expandedKeys || defaultExpandedKeys;
|
|
1231
1235
|
setInExpandedKeys(_toConsumableArray(tKeys || []));
|
|
@@ -1265,7 +1269,7 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
1265
1269
|
style: props.style
|
|
1266
1270
|
}, {
|
|
1267
1271
|
children: notFoundContent !== null && notFoundContent !== void 0 ? notFoundContent : jsx(Empty, Object.assign({
|
|
1268
|
-
size:
|
|
1272
|
+
size: "small"
|
|
1269
1273
|
}, emptyProps))
|
|
1270
1274
|
}));
|
|
1271
1275
|
//tree memo
|
|
@@ -1305,10 +1309,12 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
1305
1309
|
onExpand: internalExpand,
|
|
1306
1310
|
icon: function icon(nodeProps) {
|
|
1307
1311
|
if (_icon) {
|
|
1308
|
-
return typeof _icon ===
|
|
1312
|
+
return typeof _icon === "function" ? _icon(nodeProps) : _icon;
|
|
1309
1313
|
}
|
|
1310
1314
|
if (nodeProps.checkable === false) return null;
|
|
1311
|
-
if (!radioable)
|
|
1315
|
+
if (!radioable) {
|
|
1316
|
+
return null;
|
|
1317
|
+
} else if (!showRadio) return null;
|
|
1312
1318
|
return renderTreeNodeIcon(nodeProps, radioable, inCheckedKeys[0], replaceFields);
|
|
1313
1319
|
}
|
|
1314
1320
|
}));
|
|
@@ -1355,7 +1361,7 @@ if (!Element.prototype.closest) {
|
|
|
1355
1361
|
};
|
|
1356
1362
|
}
|
|
1357
1363
|
|
|
1358
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/9 下午8:39\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-tree-treenode-leaf-last .paraui-v3-tree-switcher-leaf-line::before {\n top: auto !important;\n bottom: auto !important;\n height: 14px !important;\n}\n\n@keyframes treeCheckboxEffect {\n 0% {\n transform: scale(1);\n opacity: 0.5;\n }\n 100% {\n transform: scale(1.6);\n opacity: 0;\n }\n}\n.paraui-v3-tree-rtl {\n direction: rtl;\n}\n.paraui-v3-tree-rtl .paraui-v3-tree-node-content-wrapper[draggable=true] .paraui-v3-tree-drop-indicator::after {\n right: -6px;\n left: unset;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode-rtl {\n direction: rtl;\n}\n.paraui-v3-tree-rtl .paraui-v3-tree-switcher_close .paraui-v3-tree-switcher-icon svg {\n transform: rotate(90deg);\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-indent-unit::before .paraui-v3-tree-rtl.paraui-v3-tree-show-line .paraui-v3-tree-indent-unit::before {\n right: auto;\n left: -13px;\n border-right: none;\n border-left: 1px solid #d9d9d9;\n}\n.paraui-v3-tree-checkbox .paraui-v3-tree-rtl.paraui-v3-tree-checkbox {\n margin: 4px 0 0 8px;\n}\n\n.paraui-v3-tree-select-dropdown-rtl .paraui-v3-select-tree-checkbox {\n margin: 4px 0 0 8px;\n}\n\n.paraui-v3-tree-checkbox {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n position: relative;\n top: 0.2em;\n line-height: 1;\n white-space: nowrap;\n outline: none;\n cursor: pointer;\n}\n.paraui-v3-tree-checkbox-wrapper:hover .paraui-v3-tree-checkbox-inner, .paraui-v3-tree-checkbox:hover .paraui-v3-tree-checkbox-inner, .paraui-v3-tree-checkbox-input:focus + .paraui-v3-tree-checkbox-inner {\n border-color: rgb(54, 102, 214);\n}\n.paraui-v3-tree-checkbox-checked::after {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 1px solid rgb(54, 102, 214);\n border-radius: 2px;\n visibility: hidden;\n animation: treeCheckboxEffect 0.36s ease-in-out;\n animation-fill-mode: backwards;\n content: \"\";\n box-sizing: border-box;\n}\n.paraui-v3-tree-checkbox:hover::after, .paraui-v3-tree-checkbox-wrapper:hover .paraui-v3-tree-checkbox::after {\n visibility: visible;\n}\n.paraui-v3-tree-checkbox-inner {\n position: relative;\n top: 0;\n left: 0;\n display: block;\n width: 16px;\n height: 16px;\n direction: ltr;\n background-color: rgb(255, 255, 255);\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n border-collapse: separate;\n transition: all 0.3s;\n}\n.paraui-v3-tree-checkbox-inner::after {\n position: absolute;\n top: 50%;\n left: 21.5%;\n display: table;\n width: 6px;\n height: 9px;\n border: 2px solid rgb(255, 255, 255);\n border-top: 0;\n border-left: 0;\n transform: rotate(45deg) scale(0) translate(-50%, -50%);\n opacity: 0;\n transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6), opacity 0.1s;\n content: \" \";\n box-sizing: border-box;\n}\n.paraui-v3-tree-checkbox-input {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n width: 100%;\n height: 100%;\n cursor: pointer;\n opacity: 0;\n}\n\n.paraui-v3-tree-checkbox-checked .paraui-v3-tree-checkbox-inner::after {\n position: absolute;\n display: table;\n border: 2px solid rgb(255, 255, 255);\n border-top: 0;\n border-left: 0;\n transform: rotate(45deg) scale(1) translate(-50%, -50%);\n opacity: 1;\n transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;\n content: \" \";\n}\n\n.paraui-v3-tree-checkbox-checked .paraui-v3-tree-checkbox-inner {\n background-color: rgb(54, 102, 214);\n border-color: rgb(54, 102, 214);\n}\n\n.paraui-v3-tree-checkbox-disabled {\n cursor: not-allowed;\n}\n.paraui-v3-tree-checkbox-disabled.paraui-v3-tree-checkbox-checked .paraui-v3-tree-checkbox-inner::after {\n border-color: rgba(0, 0, 0, 0.25);\n animation-name: none;\n}\n.paraui-v3-tree-checkbox-disabled .paraui-v3-tree-checkbox-input {\n cursor: not-allowed;\n}\n.paraui-v3-tree-checkbox-disabled .paraui-v3-tree-checkbox-inner {\n background-color: #f5f5f5;\n border-color: #d9d9d9 !important;\n}\n.paraui-v3-tree-checkbox-disabled .paraui-v3-tree-checkbox-inner::after {\n border-color: #f5f5f5;\n border-collapse: separate;\n animation-name: none;\n}\n.paraui-v3-tree-checkbox-disabled + span {\n color: rgba(0, 0, 0, 0.25);\n cursor: not-allowed;\n}\n.paraui-v3-tree-checkbox-disabled:hover::after, .paraui-v3-tree-checkbox-wrapper:hover .paraui-v3-tree-checkbox-disabled::after {\n visibility: hidden;\n}\n\n.paraui-v3-tree-checkbox-wrapper {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n display: inline-flex;\n align-items: baseline;\n line-height: unset;\n cursor: pointer;\n}\n.paraui-v3-tree-checkbox-wrapper.paraui-v3-tree-checkbox-wrapper-disabled {\n cursor: not-allowed;\n}\n.paraui-v3-tree-checkbox-wrapper + .paraui-v3-tree-checkbox-wrapper {\n margin-left: 8px;\n}\n\n.paraui-v3-tree-checkbox + span {\n padding-right: 8px;\n padding-left: 8px;\n}\n\n.paraui-v3-tree-checkbox-group {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n display: inline-block;\n}\n.paraui-v3-tree-checkbox-group-item {\n margin-right: 8px;\n}\n.paraui-v3-tree-checkbox-group-item:last-child {\n margin-right: 0;\n}\n.paraui-v3-tree-checkbox-group-item + .paraui-v3-tree-checkbox-group-item {\n margin-left: 0;\n}\n\n.paraui-v3-tree-checkbox-indeterminate .paraui-v3-tree-checkbox-inner {\n background-color: rgb(54, 102, 214);\n border-color: rgb(54, 102, 214);\n}\n.paraui-v3-tree-checkbox-indeterminate .paraui-v3-tree-checkbox-inner::after {\n top: 50%;\n left: 50%;\n width: 8px;\n height: 2px;\n background-color: rgb(255, 255, 255);\n border: 0;\n transform: translate(-50%, -50%) scale(1);\n opacity: 1;\n content: \" \";\n}\n.paraui-v3-tree-checkbox-indeterminate.paraui-v3-tree-checkbox-disabled .paraui-v3-tree-checkbox-inner::after {\n background-color: rgba(0, 0, 0, 0.25);\n border-color: rgba(0, 0, 0, 0.25);\n}\n\n.paraui-v3-tree-wrapper .paraui-v3-tree-empty {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.paraui-v3-tree {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n background: rgb(255, 255, 255);\n border-radius: 2px;\n transition: background-color 0.3s;\n}\n.paraui-v3-tree-focused:not(:hover):not(.paraui-v3-tree-active-focused) {\n background: #e6f7ff;\n}\n.paraui-v3-tree-list-holder-inner {\n align-items: flex-start;\n}\n.paraui-v3-tree.paraui-v3-tree-block-node .paraui-v3-tree-list-holder-inner {\n align-items: stretch;\n}\n.paraui-v3-tree.paraui-v3-tree-block-node .paraui-v3-tree-list-holder-inner .paraui-v3-tree-node-content-wrapper {\n flex: auto;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode {\n display: flex;\n align-items: flex-start;\n outline: none;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode-disabled .paraui-v3-tree-node-content-wrapper {\n color: rgba(0, 0, 0, 0.25);\n cursor: not-allowed;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode-disabled .paraui-v3-tree-node-content-wrapper:hover {\n background: transparent;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode-active .paraui-v3-tree-node-content-wrapper {\n background: #f5f5f5;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode:not(.paraui-v3-tree .paraui-v3-tree-treenode-disabled).filter-node .paraui-v3-tree-title {\n color: inherit;\n font-weight: 500;\n}\n.paraui-v3-tree-indent {\n align-self: stretch;\n white-space: nowrap;\n user-select: none;\n}\n.paraui-v3-tree-indent-unit {\n display: inline-block;\n width: 24px;\n}\n.paraui-v3-tree-switcher {\n position: relative;\n flex: none;\n align-self: stretch;\n width: 24px;\n margin: 0;\n line-height: 24px;\n text-align: center;\n cursor: pointer;\n user-select: none;\n}\n.paraui-v3-tree-switcher .paraui-v3-tree-switcher-icon,\n.paraui-v3-tree-switcher .paraui-v3-select-tree-switcher-icon {\n display: inline-block;\n font-size: 14px;\n vertical-align: middle;\n transition: transform 0.3s;\n color: inherit;\n}\n.paraui-v3-tree-switcher .paraui-v3-tree-switcher-icon svg,\n.paraui-v3-tree-switcher .paraui-v3-select-tree-switcher-icon svg {\n font-size: inherit;\n color: inherit;\n transition: transform 0.3s;\n}\n.paraui-v3-tree-switcher-noop {\n cursor: default;\n}\n.paraui-v3-tree-switcher_close .paraui-v3-tree-switcher-icon {\n transform: rotate(-90deg);\n}\n.paraui-v3-tree-switcher_close .paraui-v3-tree-switcher-icon svg {\n color: currentColor;\n transform: rotate(-90deg);\n}\n.paraui-v3-tree-switcher-loading-icon {\n color: rgb(54, 102, 214);\n will-change: transform;\n transition: transform 0.3s ease-in-out;\n animation: treeLoadingCircle 1s infinite linear;\n vertical-align: middle;\n font-size: 14px !important;\n}\n@keyframes treeLoadingCircle {\n 100% {\n transform: rotate(360deg);\n }\n}\n.paraui-v3-tree-switcher-leaf-line {\n position: relative;\n z-index: 1;\n display: inline-block;\n width: 100%;\n height: 100%;\n}\n.paraui-v3-tree-switcher-leaf-line::before {\n position: absolute;\n top: 0;\n bottom: -4px;\n margin-left: -1px;\n border-left: 1px solid #d9d9d9;\n content: \" \";\n}\n.paraui-v3-tree-switcher-leaf-line::after {\n position: absolute;\n width: 10px;\n height: 14px;\n margin-left: -1px;\n border-bottom: 1px solid #d9d9d9;\n content: \" \";\n}\n.paraui-v3-tree-checkbox {\n top: initial;\n margin: 6px 6px 0 0;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper {\n position: relative;\n z-index: auto;\n min-height: 24px;\n margin: 2px 0 0 0;\n padding: 0 6px;\n color: inherit;\n line-height: 24px;\n background: transparent;\n border-radius: 2px;\n cursor: pointer;\n transition: all 0.3s, border 0s, line-height 0s, box-shadow 0s;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper:hover {\n background-color: rgba(171, 176, 185, 0.12);\n border-radius: 4px;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper.paraui-v3-tree-node-selected {\n background-color: transparent;\n color: rgb(54, 102, 214);\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper .paraui-v3-tree-iconEle {\n display: inline-block;\n width: 24px;\n height: 24px;\n margin-left: -6px;\n line-height: 26px;\n text-align: center;\n vertical-align: top;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper .paraui-v3-tree-iconEle > svg {\n vertical-align: -0.125em;\n color: inherit;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper .paraui-v3-tree-iconEle:empty {\n display: none;\n}\n.paraui-v3-tree-unselectable .paraui-v3-tree-node-content-wrapper:hover {\n background-color: transparent;\n}\n.paraui-v3-tree-node-content-wrapper[draggable=true] {\n line-height: 24px;\n user-select: none;\n}\n.paraui-v3-tree-node-content-wrapper[draggable=true] .paraui-v3-tree-drop-indicator {\n position: absolute;\n z-index: 1;\n height: 2px;\n background-color: rgb(54, 102, 214);\n border-radius: 1px;\n pointer-events: none;\n}\n.paraui-v3-tree-node-content-wrapper[draggable=true] .paraui-v3-tree-drop-indicator::after {\n position: absolute;\n top: -3px;\n left: -6px;\n width: 8px;\n height: 8px;\n background-color: transparent;\n border: 2px solid rgb(54, 102, 214);\n border-radius: 50%;\n content: \"\";\n}\n.paraui-v3-tree .paraui-v3-tree-treenode.drop-container > [draggable] {\n box-shadow: 0 0 0 2px rgb(54, 102, 214);\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-indent-unit {\n position: relative;\n height: 100%;\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-indent-unit::before {\n position: absolute;\n top: 0;\n right: 12px;\n bottom: -4px;\n border-right: 1px solid #d9d9d9;\n content: \"\";\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-indent-unit-end::before {\n display: none;\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-switcher {\n background: rgb(255, 255, 255);\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-switcher_close svg {\n transform: rotate(-90deg);\n color: inherit;\n font-size: 14px;\n transition: transform 0.3s;\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-switcher_open svg {\n color: inherit;\n font-size: 14px;\n transition: transform 0.3s;\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-switcher-line-icon {\n vertical-align: -0.225em;\n color: inherit;\n font-size: 14px;\n}\n.paraui-v3-tree-node-content-wrapper {\n overflow: hidden;\n display: flex;\n}\n.paraui-v3-tree-node-content-wrapper .paraui-v3-tree-title {\n display: flex;\n align-items: center;\n}\n.paraui-v3-tree-node-content-wrapper .paraui-v3-tree-treenode-more-wrapper {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper--active {\n background-color: rgba(171, 176, 185, 0.12) !important;\n border-radius: 4px !important;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper--active .sector-anchor {\n opacity: 1 !important;\n}\n.paraui-v3-tree.paraui-v3-tree-block-node .paraui-v3-tree-list-holder-inner .paraui-v3-tree-node-content-wrapper {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper {\n display: inline-flex;\n align-items: center;\n margin: 0 -6px;\n padding: 0 6px;\n overflow: hidden;\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper .sector-anchor {\n position: relative;\n width: 14px;\n height: 14px;\n margin: 1px 0 0 18px;\n line-height: 14px;\n opacity: 0;\n transition: opacity 0.3s;\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper .sector-anchor:before {\n content: \" \";\n position: absolute;\n left: -9px;\n top: 0;\n width: 1px;\n height: 14px;\n background-color: rgba(171, 176, 185, 0.2);\n pointer-events: none;\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper .sector-anchor svg {\n font-size: 14px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper .sector-anchor--active.sector-anchor svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper--active .sector-anchor {\n opacity: 1;\n}\n.paraui-v3-tree.paraui-v3-tree-radioable .paraui-v3-tree-iconEle {\n position: absolute;\n left: 8px;\n top: 0;\n}\n.paraui-v3-tree.paraui-v3-tree-radioable .paraui-v3-tree-checkbox {\n display: none !important;\n}\n.paraui-v3-tree.paraui-v3-tree-radioable .paraui-v3-tree-checkbox-checked + .paraui-v3-tree-node-content-wrapper {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-tree.paraui-v3-tree-radioable .paraui-v3-tree-node-radio {\n width: 16px;\n height: 16px;\n padding: 0;\n margin-top: 4px;\n}\n.paraui-v3-tree.paraui-v3-tree-radioable-showradio .paraui-v3-tree-node-content-wrapper {\n padding-left: 28px;\n}\n\n.paraui-v3-tree-motion-collapse {\n overflow: hidden;\n transition: height 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important;\n}";
|
|
1364
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/9 下午8:39\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-tree-treenode-leaf-last .paraui-v4-tree-switcher-leaf-line::before {\n top: auto !important;\n bottom: auto !important;\n height: 14px !important;\n}\n\n@keyframes treeCheckboxEffect {\n 0% {\n transform: scale(1);\n opacity: 0.5;\n }\n 100% {\n transform: scale(1.6);\n opacity: 0;\n }\n}\n.paraui-v4-tree-rtl {\n direction: rtl;\n}\n.paraui-v4-tree-rtl .paraui-v4-tree-node-content-wrapper[draggable=true] .paraui-v4-tree-drop-indicator::after {\n right: -6px;\n left: unset;\n}\n.paraui-v4-tree .paraui-v4-tree-treenode-rtl {\n direction: rtl;\n}\n.paraui-v4-tree-rtl .paraui-v4-tree-switcher_close .paraui-v4-tree-switcher-icon svg {\n transform: rotate(90deg);\n}\n.paraui-v4-tree-show-line .paraui-v4-tree-indent-unit::before .paraui-v4-tree-rtl.paraui-v4-tree-show-line .paraui-v4-tree-indent-unit::before {\n right: auto;\n left: -13px;\n border-right: none;\n border-left: 1px solid #d9d9d9;\n}\n.paraui-v4-tree-checkbox .paraui-v4-tree-rtl.paraui-v4-tree-checkbox {\n margin: 4px 0 0 8px;\n}\n\n.paraui-v4-tree-select-dropdown-rtl .paraui-v4-select-tree-checkbox {\n margin: 4px 0 0 8px;\n}\n\n.paraui-v4-tree-checkbox {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(29, 33, 38, 0.9);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n position: relative;\n top: 0.2em;\n line-height: 1;\n white-space: nowrap;\n outline: none;\n cursor: pointer;\n}\n.paraui-v4-tree-checkbox-wrapper:hover .paraui-v4-tree-checkbox-inner, .paraui-v4-tree-checkbox:hover .paraui-v4-tree-checkbox-inner, .paraui-v4-tree-checkbox-input:focus + .paraui-v4-tree-checkbox-inner {\n border-color: rgb(46, 101, 230);\n}\n.paraui-v4-tree-checkbox-checked::after {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 1px solid rgb(46, 101, 230);\n border-radius: 2px;\n visibility: hidden;\n animation: treeCheckboxEffect 0.36s ease-in-out;\n animation-fill-mode: backwards;\n content: \"\";\n box-sizing: border-box;\n}\n.paraui-v4-tree-checkbox:hover::after, .paraui-v4-tree-checkbox-wrapper:hover .paraui-v4-tree-checkbox::after {\n visibility: visible;\n}\n.paraui-v4-tree-checkbox-inner {\n position: relative;\n top: 0;\n left: 0;\n display: block;\n width: 16px;\n height: 16px;\n direction: ltr;\n background-color: rgb(255, 255, 255);\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n border-collapse: separate;\n transition: all 0.3s;\n}\n.paraui-v4-tree-checkbox-inner::after {\n position: absolute;\n top: 50%;\n left: 21.5%;\n display: table;\n width: 6px;\n height: 9px;\n border: 2px solid rgb(255, 255, 255);\n border-top: 0;\n border-left: 0;\n transform: rotate(45deg) scale(0) translate(-50%, -50%);\n opacity: 0;\n transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6), opacity 0.1s;\n content: \" \";\n box-sizing: border-box;\n}\n.paraui-v4-tree-checkbox-input {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n width: 100%;\n height: 100%;\n cursor: pointer;\n opacity: 0;\n}\n\n.paraui-v4-tree-checkbox-checked .paraui-v4-tree-checkbox-inner::after {\n position: absolute;\n display: table;\n border: 2px solid rgb(255, 255, 255);\n border-top: 0;\n border-left: 0;\n transform: rotate(45deg) scale(1) translate(-50%, -50%);\n opacity: 1;\n transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;\n content: \" \";\n}\n\n.paraui-v4-tree-checkbox-checked .paraui-v4-tree-checkbox-inner {\n background-color: rgb(46, 101, 230);\n border-color: rgb(46, 101, 230);\n}\n\n.paraui-v4-tree-checkbox-disabled {\n cursor: not-allowed;\n}\n.paraui-v4-tree-checkbox-disabled.paraui-v4-tree-checkbox-checked .paraui-v4-tree-checkbox-inner::after {\n border-color: rgba(0, 0, 0, 0.25);\n animation-name: none;\n}\n.paraui-v4-tree-checkbox-disabled .paraui-v4-tree-checkbox-input {\n cursor: not-allowed;\n}\n.paraui-v4-tree-checkbox-disabled .paraui-v4-tree-checkbox-inner {\n background-color: #f5f5f5;\n border-color: #d9d9d9 !important;\n}\n.paraui-v4-tree-checkbox-disabled .paraui-v4-tree-checkbox-inner::after {\n border-color: #f5f5f5;\n border-collapse: separate;\n animation-name: none;\n}\n.paraui-v4-tree-checkbox-disabled + span {\n color: rgba(0, 0, 0, 0.25);\n cursor: not-allowed;\n}\n.paraui-v4-tree-checkbox-disabled:hover::after, .paraui-v4-tree-checkbox-wrapper:hover .paraui-v4-tree-checkbox-disabled::after {\n visibility: hidden;\n}\n\n.paraui-v4-tree-checkbox-wrapper {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(29, 33, 38, 0.9);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n display: inline-flex;\n align-items: baseline;\n line-height: unset;\n cursor: pointer;\n}\n.paraui-v4-tree-checkbox-wrapper.paraui-v4-tree-checkbox-wrapper-disabled {\n cursor: not-allowed;\n}\n.paraui-v4-tree-checkbox-wrapper + .paraui-v4-tree-checkbox-wrapper {\n margin-left: 8px;\n}\n\n.paraui-v4-tree-checkbox + span {\n padding-right: 8px;\n padding-left: 8px;\n}\n\n.paraui-v4-tree-checkbox-group {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(29, 33, 38, 0.9);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n display: inline-block;\n}\n.paraui-v4-tree-checkbox-group-item {\n margin-right: 8px;\n}\n.paraui-v4-tree-checkbox-group-item:last-child {\n margin-right: 0;\n}\n.paraui-v4-tree-checkbox-group-item + .paraui-v4-tree-checkbox-group-item {\n margin-left: 0;\n}\n\n.paraui-v4-tree-checkbox-indeterminate .paraui-v4-tree-checkbox-inner {\n background-color: rgb(46, 101, 230);\n border-color: rgb(46, 101, 230);\n}\n.paraui-v4-tree-checkbox-indeterminate .paraui-v4-tree-checkbox-inner::after {\n top: 50%;\n left: 50%;\n width: 8px;\n height: 2px;\n background-color: rgb(255, 255, 255);\n border: 0;\n transform: translate(-50%, -50%) scale(1);\n opacity: 1;\n content: \" \";\n}\n.paraui-v4-tree-checkbox-indeterminate.paraui-v4-tree-checkbox-disabled .paraui-v4-tree-checkbox-inner::after {\n background-color: rgba(0, 0, 0, 0.25);\n border-color: rgba(0, 0, 0, 0.25);\n}\n\n.paraui-v4-tree-wrapper .paraui-v4-tree-empty {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.paraui-v4-tree {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(29, 33, 38, 0.9);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n background: rgb(255, 255, 255);\n border-radius: 2px;\n transition: background-color 0.3s;\n}\n.paraui-v4-tree-focused:not(:hover):not(.paraui-v4-tree-active-focused) {\n background: #e6f7ff;\n}\n.paraui-v4-tree-list-holder-inner {\n align-items: flex-start;\n}\n.paraui-v4-tree.paraui-v4-tree-block-node .paraui-v4-tree-list-holder-inner {\n align-items: stretch;\n}\n.paraui-v4-tree.paraui-v4-tree-block-node .paraui-v4-tree-list-holder-inner .paraui-v4-tree-node-content-wrapper {\n flex: auto;\n}\n.paraui-v4-tree .paraui-v4-tree-treenode {\n display: flex;\n align-items: flex-start;\n outline: none;\n}\n.paraui-v4-tree .paraui-v4-tree-treenode-disabled .paraui-v4-tree-node-content-wrapper {\n color: rgba(0, 0, 0, 0.25);\n cursor: not-allowed;\n}\n.paraui-v4-tree .paraui-v4-tree-treenode-disabled .paraui-v4-tree-node-content-wrapper:hover {\n background: transparent;\n}\n.paraui-v4-tree .paraui-v4-tree-treenode-active .paraui-v4-tree-node-content-wrapper {\n background: #f5f5f5;\n}\n.paraui-v4-tree .paraui-v4-tree-treenode:not(.paraui-v4-tree .paraui-v4-tree-treenode-disabled).filter-node .paraui-v4-tree-title {\n color: inherit;\n font-weight: 500;\n}\n.paraui-v4-tree-indent {\n align-self: stretch;\n white-space: nowrap;\n user-select: none;\n}\n.paraui-v4-tree-indent-unit {\n display: inline-block;\n width: 24px;\n}\n.paraui-v4-tree-switcher {\n position: relative;\n flex: none;\n align-self: stretch;\n width: 24px;\n margin: 0;\n line-height: 24px;\n text-align: center;\n cursor: pointer;\n user-select: none;\n}\n.paraui-v4-tree-switcher .paraui-v4-tree-switcher-icon,\n.paraui-v4-tree-switcher .paraui-v4-select-tree-switcher-icon {\n display: inline-block;\n font-size: 14px;\n vertical-align: middle;\n transition: transform 0.3s;\n color: inherit;\n}\n.paraui-v4-tree-switcher .paraui-v4-tree-switcher-icon svg,\n.paraui-v4-tree-switcher .paraui-v4-select-tree-switcher-icon svg {\n font-size: inherit;\n color: inherit;\n transition: transform 0.3s;\n}\n.paraui-v4-tree-switcher-noop {\n cursor: default;\n}\n.paraui-v4-tree-switcher-icon[data-name=DownTriangleF]:hover {\n color: rgb(46, 101, 230);\n background: rgb(247, 248, 250);\n}\n.paraui-v4-tree-switcher_close .paraui-v4-tree-switcher-icon {\n transform: rotate(-90deg);\n}\n.paraui-v4-tree-switcher_close .paraui-v4-tree-switcher-icon svg {\n color: currentColor;\n transform: rotate(-90deg);\n}\n.paraui-v4-tree-switcher-loading-icon {\n color: rgb(46, 101, 230);\n will-change: transform;\n transition: transform 0.3s ease-in-out;\n animation: treeLoadingCircle 1s infinite linear;\n vertical-align: middle;\n font-size: 14px !important;\n}\n@keyframes treeLoadingCircle {\n 100% {\n transform: rotate(360deg);\n }\n}\n.paraui-v4-tree-switcher-leaf-line {\n position: relative;\n z-index: 1;\n display: inline-block;\n width: 100%;\n height: 100%;\n}\n.paraui-v4-tree-switcher-leaf-line::before {\n position: absolute;\n top: 0;\n bottom: -4px;\n margin-left: -1px;\n border-left: 1px solid #d9d9d9;\n content: \" \";\n}\n.paraui-v4-tree-switcher-leaf-line::after {\n position: absolute;\n width: 10px;\n height: 14px;\n margin-left: -1px;\n border-bottom: 1px solid #d9d9d9;\n content: \" \";\n}\n.paraui-v4-tree-checkbox {\n top: initial;\n margin: 6px 6px 0 0;\n}\n.paraui-v4-tree .paraui-v4-tree-node-content-wrapper {\n position: relative;\n z-index: auto;\n min-height: 24px;\n margin: 2px 0 0 0;\n padding: 0 6px;\n color: inherit;\n line-height: 24px;\n background: transparent;\n border-radius: 2px;\n cursor: pointer;\n transition: all 0.3s, border 0s, line-height 0s, box-shadow 0s;\n}\n.paraui-v4-tree .paraui-v4-tree-node-content-wrapper:hover {\n background-color: rgb(247, 248, 250);\n border-radius: 4px;\n}\n.paraui-v4-tree .paraui-v4-tree-node-content-wrapper.paraui-v4-tree-node-selected {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-tree .paraui-v4-tree-node-content-wrapper .paraui-v4-tree-iconEle {\n display: inline-block;\n width: 24px;\n height: 24px;\n margin-left: -6px;\n line-height: 26px;\n text-align: center;\n vertical-align: top;\n}\n.paraui-v4-tree .paraui-v4-tree-node-content-wrapper .paraui-v4-tree-iconEle > svg {\n vertical-align: -0.125em;\n color: inherit;\n}\n.paraui-v4-tree .paraui-v4-tree-node-content-wrapper .paraui-v4-tree-iconEle:empty {\n display: none;\n}\n.paraui-v4-tree-unselectable .paraui-v4-tree-node-content-wrapper:hover {\n background-color: transparent;\n}\n.paraui-v4-tree-node-content-wrapper[draggable=true] {\n line-height: 24px;\n user-select: none;\n}\n.paraui-v4-tree-node-content-wrapper[draggable=true] .paraui-v4-tree-drop-indicator {\n position: absolute;\n z-index: 1;\n height: 2px;\n background-color: rgb(46, 101, 230);\n border-radius: 1px;\n pointer-events: none;\n}\n.paraui-v4-tree-node-content-wrapper[draggable=true] .paraui-v4-tree-drop-indicator::after {\n position: absolute;\n top: -3px;\n left: -6px;\n width: 8px;\n height: 8px;\n background-color: transparent;\n border: 2px solid rgb(46, 101, 230);\n border-radius: 50%;\n content: \"\";\n}\n.paraui-v4-tree .paraui-v4-tree-treenode.drop-container > [draggable] {\n box-shadow: 0 0 0 2px rgb(46, 101, 230);\n}\n.paraui-v4-tree-show-line .paraui-v4-tree-indent-unit {\n position: relative;\n height: 100%;\n}\n.paraui-v4-tree-show-line .paraui-v4-tree-indent-unit::before {\n position: absolute;\n top: 0;\n right: 12px;\n bottom: -4px;\n border-right: 1px solid #d9d9d9;\n content: \"\";\n}\n.paraui-v4-tree-show-line .paraui-v4-tree-indent-unit-end::before {\n display: none;\n}\n.paraui-v4-tree-show-line .paraui-v4-tree-switcher {\n background: rgb(255, 255, 255);\n}\n.paraui-v4-tree-show-line .paraui-v4-tree-switcher_close svg {\n transform: rotate(-90deg);\n color: inherit;\n font-size: 14px;\n transition: transform 0.3s;\n}\n.paraui-v4-tree-show-line .paraui-v4-tree-switcher_open svg {\n color: inherit;\n font-size: 14px;\n transition: transform 0.3s;\n}\n.paraui-v4-tree-show-line .paraui-v4-tree-switcher-line-icon {\n vertical-align: -0.225em;\n color: inherit;\n font-size: 14px;\n}\n.paraui-v4-tree-show-line .paraui-v4-tree-switcher-line-icon[data-name=DownTriangleF]:hover {\n color: rgb(46, 101, 230);\n background: rgb(247, 248, 250);\n}\n.paraui-v4-tree-node-content-wrapper {\n overflow: hidden;\n display: flex;\n}\n.paraui-v4-tree-node-content-wrapper .paraui-v4-tree-title {\n display: flex;\n align-items: center;\n}\n.paraui-v4-tree-node-content-wrapper .paraui-v4-tree-treenode-more-wrapper {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-tree .paraui-v4-tree-node-content-wrapper--active {\n background-color: rgb(247, 248, 250) !important;\n border-radius: 4px !important;\n}\n.paraui-v4-tree .paraui-v4-tree-node-content-wrapper--active .sector-anchor {\n opacity: 1 !important;\n}\n.paraui-v4-tree.paraui-v4-tree-block-node .paraui-v4-tree-list-holder-inner .paraui-v4-tree-node-content-wrapper {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.paraui-v4-tree .paraui-v4-tree-title-wrapper {\n display: inline-flex;\n align-items: center;\n margin: 0 -6px;\n padding: 0 6px;\n overflow: hidden;\n}\n.paraui-v4-tree .paraui-v4-tree-title-wrapper .sector-anchor {\n position: relative;\n margin: 1px 0 0 18px;\n line-height: 18px;\n opacity: 0;\n transition: opacity 0.3s;\n}\n.paraui-v4-tree .paraui-v4-tree-title-wrapper .sector-anchor:before {\n content: \" \";\n position: absolute;\n left: -9px;\n top: 0;\n width: 1px;\n height: 14px;\n background-color: rgb(247, 248, 250);\n pointer-events: none;\n}\n.paraui-v4-tree .paraui-v4-tree-title-wrapper .sector-anchor svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-tree .paraui-v4-tree-title-wrapper .sector-anchor svg:hover {\n background: rgba(212, 218, 227, 0.4);\n}\n.paraui-v4-tree .paraui-v4-tree-title-wrapper .sector-anchor--active.sector-anchor svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-tree .paraui-v4-tree-title-wrapper--active .sector-anchor {\n opacity: 1;\n}\n.paraui-v4-tree.paraui-v4-tree-radioable .paraui-v4-tree-iconEle {\n position: absolute;\n left: 8px;\n top: 0;\n}\n.paraui-v4-tree.paraui-v4-tree-radioable .paraui-v4-tree-checkbox {\n display: none !important;\n}\n.paraui-v4-tree.paraui-v4-tree-radioable .paraui-v4-tree-checkbox-checked + .paraui-v4-tree-node-content-wrapper {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-tree.paraui-v4-tree-radioable .paraui-v4-tree-node-radio {\n width: 16px;\n height: 16px;\n padding: 0;\n margin-top: 4px;\n}\n.paraui-v4-tree.paraui-v4-tree-radioable-showradio .paraui-v4-tree-node-content-wrapper {\n padding-left: 28px;\n}\n\n.paraui-v4-tree-motion-collapse {\n overflow: hidden;\n transition: height 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important;\n}";
|
|
1359
1365
|
styleInject(css_248z);
|
|
1360
1366
|
|
|
1361
1367
|
export { Tree as T };
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import { _ as _typeof } from './typeof-b240b062.js';
|
|
2
|
+
|
|
3
|
+
var regeneratorRuntime$1 = {exports: {}};
|
|
4
|
+
|
|
5
|
+
(function (module) {
|
|
6
|
+
var _typeof$1 = _typeof.exports["default"];
|
|
7
|
+
function _regeneratorRuntime() {
|
|
8
|
+
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
9
|
+
return e;
|
|
10
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
11
|
+
var t,
|
|
12
|
+
e = {},
|
|
13
|
+
r = Object.prototype,
|
|
14
|
+
n = r.hasOwnProperty,
|
|
15
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
16
|
+
t[e] = r.value;
|
|
17
|
+
},
|
|
18
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
19
|
+
a = i.iterator || "@@iterator",
|
|
20
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
21
|
+
u = i.toStringTag || "@@toStringTag";
|
|
22
|
+
function define(t, e, r) {
|
|
23
|
+
return Object.defineProperty(t, e, {
|
|
24
|
+
value: r,
|
|
25
|
+
enumerable: !0,
|
|
26
|
+
configurable: !0,
|
|
27
|
+
writable: !0
|
|
28
|
+
}), t[e];
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
define({}, "");
|
|
32
|
+
} catch (t) {
|
|
33
|
+
define = function define(t, e, r) {
|
|
34
|
+
return t[e] = r;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function wrap(t, e, r, n) {
|
|
38
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
39
|
+
a = Object.create(i.prototype),
|
|
40
|
+
c = new Context(n || []);
|
|
41
|
+
return o(a, "_invoke", {
|
|
42
|
+
value: makeInvokeMethod(t, r, c)
|
|
43
|
+
}), a;
|
|
44
|
+
}
|
|
45
|
+
function tryCatch(t, e, r) {
|
|
46
|
+
try {
|
|
47
|
+
return {
|
|
48
|
+
type: "normal",
|
|
49
|
+
arg: t.call(e, r)
|
|
50
|
+
};
|
|
51
|
+
} catch (t) {
|
|
52
|
+
return {
|
|
53
|
+
type: "throw",
|
|
54
|
+
arg: t
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
e.wrap = wrap;
|
|
59
|
+
var h = "suspendedStart",
|
|
60
|
+
l = "suspendedYield",
|
|
61
|
+
f = "executing",
|
|
62
|
+
s = "completed",
|
|
63
|
+
y = {};
|
|
64
|
+
function Generator() {}
|
|
65
|
+
function GeneratorFunction() {}
|
|
66
|
+
function GeneratorFunctionPrototype() {}
|
|
67
|
+
var p = {};
|
|
68
|
+
define(p, a, function () {
|
|
69
|
+
return this;
|
|
70
|
+
});
|
|
71
|
+
var d = Object.getPrototypeOf,
|
|
72
|
+
v = d && d(d(values([])));
|
|
73
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
74
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
75
|
+
function defineIteratorMethods(t) {
|
|
76
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
77
|
+
define(t, e, function (t) {
|
|
78
|
+
return this._invoke(e, t);
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function AsyncIterator(t, e) {
|
|
83
|
+
function invoke(r, o, i, a) {
|
|
84
|
+
var c = tryCatch(t[r], t, o);
|
|
85
|
+
if ("throw" !== c.type) {
|
|
86
|
+
var u = c.arg,
|
|
87
|
+
h = u.value;
|
|
88
|
+
return h && "object" == _typeof$1(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
89
|
+
invoke("next", t, i, a);
|
|
90
|
+
}, function (t) {
|
|
91
|
+
invoke("throw", t, i, a);
|
|
92
|
+
}) : e.resolve(h).then(function (t) {
|
|
93
|
+
u.value = t, i(u);
|
|
94
|
+
}, function (t) {
|
|
95
|
+
return invoke("throw", t, i, a);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
a(c.arg);
|
|
99
|
+
}
|
|
100
|
+
var r;
|
|
101
|
+
o(this, "_invoke", {
|
|
102
|
+
value: function value(t, n) {
|
|
103
|
+
function callInvokeWithMethodAndArg() {
|
|
104
|
+
return new e(function (e, r) {
|
|
105
|
+
invoke(t, n, e, r);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function makeInvokeMethod(e, r, n) {
|
|
113
|
+
var o = h;
|
|
114
|
+
return function (i, a) {
|
|
115
|
+
if (o === f) throw new Error("Generator is already running");
|
|
116
|
+
if (o === s) {
|
|
117
|
+
if ("throw" === i) throw a;
|
|
118
|
+
return {
|
|
119
|
+
value: t,
|
|
120
|
+
done: !0
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
for (n.method = i, n.arg = a;;) {
|
|
124
|
+
var c = n.delegate;
|
|
125
|
+
if (c) {
|
|
126
|
+
var u = maybeInvokeDelegate(c, n);
|
|
127
|
+
if (u) {
|
|
128
|
+
if (u === y) continue;
|
|
129
|
+
return u;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
133
|
+
if (o === h) throw o = s, n.arg;
|
|
134
|
+
n.dispatchException(n.arg);
|
|
135
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
136
|
+
o = f;
|
|
137
|
+
var p = tryCatch(e, r, n);
|
|
138
|
+
if ("normal" === p.type) {
|
|
139
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
140
|
+
return {
|
|
141
|
+
value: p.arg,
|
|
142
|
+
done: n.done
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function maybeInvokeDelegate(e, r) {
|
|
150
|
+
var n = r.method,
|
|
151
|
+
o = e.iterator[n];
|
|
152
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
153
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
154
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
155
|
+
var a = i.arg;
|
|
156
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
157
|
+
}
|
|
158
|
+
function pushTryEntry(t) {
|
|
159
|
+
var e = {
|
|
160
|
+
tryLoc: t[0]
|
|
161
|
+
};
|
|
162
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
163
|
+
}
|
|
164
|
+
function resetTryEntry(t) {
|
|
165
|
+
var e = t.completion || {};
|
|
166
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
167
|
+
}
|
|
168
|
+
function Context(t) {
|
|
169
|
+
this.tryEntries = [{
|
|
170
|
+
tryLoc: "root"
|
|
171
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
172
|
+
}
|
|
173
|
+
function values(e) {
|
|
174
|
+
if (e || "" === e) {
|
|
175
|
+
var r = e[a];
|
|
176
|
+
if (r) return r.call(e);
|
|
177
|
+
if ("function" == typeof e.next) return e;
|
|
178
|
+
if (!isNaN(e.length)) {
|
|
179
|
+
var o = -1,
|
|
180
|
+
i = function next() {
|
|
181
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
182
|
+
return next.value = t, next.done = !0, next;
|
|
183
|
+
};
|
|
184
|
+
return i.next = i;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
throw new TypeError(_typeof$1(e) + " is not iterable");
|
|
188
|
+
}
|
|
189
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
190
|
+
value: GeneratorFunctionPrototype,
|
|
191
|
+
configurable: !0
|
|
192
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
193
|
+
value: GeneratorFunction,
|
|
194
|
+
configurable: !0
|
|
195
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
196
|
+
var e = "function" == typeof t && t.constructor;
|
|
197
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
198
|
+
}, e.mark = function (t) {
|
|
199
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
200
|
+
}, e.awrap = function (t) {
|
|
201
|
+
return {
|
|
202
|
+
__await: t
|
|
203
|
+
};
|
|
204
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
205
|
+
return this;
|
|
206
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
207
|
+
void 0 === i && (i = Promise);
|
|
208
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
209
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
210
|
+
return t.done ? t.value : a.next();
|
|
211
|
+
});
|
|
212
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
213
|
+
return this;
|
|
214
|
+
}), define(g, "toString", function () {
|
|
215
|
+
return "[object Generator]";
|
|
216
|
+
}), e.keys = function (t) {
|
|
217
|
+
var e = Object(t),
|
|
218
|
+
r = [];
|
|
219
|
+
for (var n in e) r.push(n);
|
|
220
|
+
return r.reverse(), function next() {
|
|
221
|
+
for (; r.length;) {
|
|
222
|
+
var t = r.pop();
|
|
223
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
224
|
+
}
|
|
225
|
+
return next.done = !0, next;
|
|
226
|
+
};
|
|
227
|
+
}, e.values = values, Context.prototype = {
|
|
228
|
+
constructor: Context,
|
|
229
|
+
reset: function reset(e) {
|
|
230
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
231
|
+
},
|
|
232
|
+
stop: function stop() {
|
|
233
|
+
this.done = !0;
|
|
234
|
+
var t = this.tryEntries[0].completion;
|
|
235
|
+
if ("throw" === t.type) throw t.arg;
|
|
236
|
+
return this.rval;
|
|
237
|
+
},
|
|
238
|
+
dispatchException: function dispatchException(e) {
|
|
239
|
+
if (this.done) throw e;
|
|
240
|
+
var r = this;
|
|
241
|
+
function handle(n, o) {
|
|
242
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
243
|
+
}
|
|
244
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
245
|
+
var i = this.tryEntries[o],
|
|
246
|
+
a = i.completion;
|
|
247
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
248
|
+
if (i.tryLoc <= this.prev) {
|
|
249
|
+
var c = n.call(i, "catchLoc"),
|
|
250
|
+
u = n.call(i, "finallyLoc");
|
|
251
|
+
if (c && u) {
|
|
252
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
253
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
254
|
+
} else if (c) {
|
|
255
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
256
|
+
} else {
|
|
257
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
258
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
abrupt: function abrupt(t, e) {
|
|
264
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
265
|
+
var o = this.tryEntries[r];
|
|
266
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
267
|
+
var i = o;
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
272
|
+
var a = i ? i.completion : {};
|
|
273
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
274
|
+
},
|
|
275
|
+
complete: function complete(t, e) {
|
|
276
|
+
if ("throw" === t.type) throw t.arg;
|
|
277
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
278
|
+
},
|
|
279
|
+
finish: function finish(t) {
|
|
280
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
281
|
+
var r = this.tryEntries[e];
|
|
282
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"catch": function _catch(t) {
|
|
286
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
287
|
+
var r = this.tryEntries[e];
|
|
288
|
+
if (r.tryLoc === t) {
|
|
289
|
+
var n = r.completion;
|
|
290
|
+
if ("throw" === n.type) {
|
|
291
|
+
var o = n.arg;
|
|
292
|
+
resetTryEntry(r);
|
|
293
|
+
}
|
|
294
|
+
return o;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
throw new Error("illegal catch attempt");
|
|
298
|
+
},
|
|
299
|
+
delegateYield: function delegateYield(e, r, n) {
|
|
300
|
+
return this.delegate = {
|
|
301
|
+
iterator: values(e),
|
|
302
|
+
resultName: r,
|
|
303
|
+
nextLoc: n
|
|
304
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
305
|
+
}
|
|
306
|
+
}, e;
|
|
307
|
+
}
|
|
308
|
+
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
309
|
+
} (regeneratorRuntime$1));
|
|
310
|
+
|
|
311
|
+
// TODO(Babel 8): Remove this file.
|
|
312
|
+
|
|
313
|
+
var runtime = regeneratorRuntime$1.exports();
|
|
314
|
+
var regenerator = runtime;
|
|
315
|
+
|
|
316
|
+
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
317
|
+
try {
|
|
318
|
+
regeneratorRuntime = runtime;
|
|
319
|
+
} catch (accidentalStrictMode) {
|
|
320
|
+
if (typeof globalThis === "object") {
|
|
321
|
+
globalThis.regeneratorRuntime = runtime;
|
|
322
|
+
} else {
|
|
323
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export { regenerator as r };
|