@unicom-cloud/ui 0.8.57 → 0.8.59
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/Affix.js +15 -15
- package/Alert.js +5 -5
- package/Anchor.js +1 -1
- package/AutoComplete.js +28 -28
- package/Avatar.js +11 -11
- package/BackTop.js +28 -28
- package/Badge.js +10 -10
- package/Breadcrumb.js +6 -6
- package/Button.js +11 -10
- package/Calendar.js +8 -8
- package/Card.js +3 -3
- package/Carousel.js +7 -7
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +582 -11
- package/Comment.js +7 -7
- package/ConfigProvider.js +2 -2
- package/Copy.js +6 -6
- package/DatePicker.js +14 -12
- package/Descriptions.js +3 -3
- package/Divider.js +3 -3
- package/Draggable.js +12 -12
- package/Drawer.js +1 -1
- package/Dropdown.js +5 -5
- package/Empty.js +3 -3
- package/Form.js +1410 -10
- package/Grid.js +14 -14
- package/Icon.js +2 -2
- package/IconHover.js +2 -2
- package/Image.js +1 -1
- package/Input.js +2 -2
- package/InputNumber.js +8 -8
- package/InputTag.js +1 -1
- package/Layout.js +8 -8
- package/Link.js +13 -13
- package/List.js +21 -21
- package/Mentions.js +30 -30
- package/Menu.js +1 -1
- package/Message.js +3 -3
- package/Modal.js +1 -1
- package/Notice.js +3 -3
- package/Notification.js +4 -4
- package/OverflowEllipsis.js +9 -9
- package/PageHeader.js +10 -10
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +5 -5
- package/Popover.js +7 -7
- package/Portal.js +1 -1
- package/Progress.js +15 -15
- package/Radio.js +2 -2
- package/Rate.js +10 -10
- package/ResizeBox.js +10 -11
- package/Result.js +11 -11
- package/Select.js +1 -1
- package/SelectView.js +40 -41
- package/Skeleton.js +4 -4
- package/Slider.js +9 -9
- package/Space.js +12 -12
- package/SpeechSynthesis.js +1 -1
- package/Spin.js +11 -11
- package/Statistic.js +43 -43
- package/Steps.js +5 -5
- package/Switch.js +15 -16
- package/Table.js +17 -17
- package/Tabs.js +1 -1
- package/Tag.js +5 -5
- package/TimePicker.js +38 -38
- package/Timeline.js +1 -1
- package/Tooltip.js +9 -9
- package/Transfer.js +26 -26
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +11 -11
- package/Typography.js +1 -1
- package/Upload.js +4 -1
- package/VerificationCode.js +1 -1
- package/Version.js +1 -1
- package/VirtualList.js +1 -1
- package/Watermark.js +1 -1
- package/chunk/{m_kOQCiU.js → -LZOUh53.js} +1 -1
- package/chunk/{CXNW5Y2a.js → -jdfq71f.js} +1 -1
- package/chunk/{CkAOsst1.js → 4-gvEY5y.js} +30 -30
- package/chunk/{DQXq1QT0.js → B0GOLsj_.js} +1 -1
- package/chunk/{BMvZCjSU.js → B16KHtX-.js} +16 -16
- package/chunk/{CggcswbO.js → B2vORJQ8.js} +19 -15
- package/chunk/{BCk8e9fj.js → B7Zsp3gO.js} +1 -1
- package/chunk/B8QV6E2b.js +34 -0
- package/chunk/{BeM2hfks.js → BBVjSFnw.js} +27 -23
- package/chunk/{1mEO29GP.js → BDjXkzNj.js} +1 -1
- package/chunk/{BuEC_zcc.js → BEDYCG-I.js} +31 -31
- package/chunk/{B45v5S9k.js → BHn4xgbv.js} +1 -1
- package/chunk/{CF3Telny.js → BJ_7JTqC.js} +3 -3
- package/chunk/{BM6dpkeM.js → BLSiP_gg.js} +1 -1
- package/chunk/{9Gh1afjL.js → BMJfSSLX.js} +1 -1
- package/chunk/{DBJ8d0o0.js → BNHrEI0Y.js} +31 -31
- package/chunk/{BP7xX86Q.js → BPZ-6HKJ.js} +131 -134
- package/chunk/{DxNRWF67.js → BVLwPZis.js} +11 -11
- package/chunk/{BpwDupra.js → BYhtrDV3.js} +9 -9
- package/chunk/{D6mVoX-C.js → B_nfMl0e.js} +1 -1
- package/chunk/{BWx1cVT_.js → BcS17Pzy.js} +1 -1
- package/chunk/Bdh4XVuf.js +1487 -0
- package/chunk/{BkHxm4sv.js → BdiEwtQO.js} +1 -1
- package/chunk/{DDda6s72.js → BjSHZA0m.js} +6 -6
- package/chunk/{C7Okdv4u.js → Bpug_KxP.js} +1 -1
- package/chunk/BzPkh4Zv.js +11 -0
- package/chunk/{CwXmtKib.js → C1D7T29r.js} +35 -35
- package/chunk/{DYZzQ2uT.js → C1u_ckwU.js} +1 -1
- package/chunk/C1xMmQIZ.js +468 -0
- package/chunk/C2lIz2F9.js +60 -0
- package/chunk/{Be7oeWU8.js → C43Hv2Bl.js} +1 -1
- package/chunk/{CR4u270n.js → C5AQWbC4.js} +79 -79
- package/chunk/{fqgc8r6C.js → C9vsih_D.js} +1 -1
- package/chunk/CANaGbGR.js +154 -0
- package/chunk/{BA02BFUV.js → CAfR2wLq.js} +1 -1
- package/chunk/{CcX2pBUh.js → CAfecMDF.js} +1 -1
- package/chunk/{BHK9zpXn.js → CKp4rZnD.js} +1 -1
- package/chunk/CTxjmYmx.js +19 -0
- package/chunk/{BqxwlITu.js → CV2Aqv9q.js} +1 -1
- package/chunk/{bsawGxt8.js → CYdarMv9.js} +1 -1
- package/chunk/{DafaH1Qt.js → C_S5Mdvd.js} +43 -44
- package/chunk/{DkIjpuBZ.js → Cbd50gx8.js} +11 -11
- package/chunk/{D5p8q9Pa.js → CbiWdbr_.js} +12 -12
- package/chunk/{cUuQh7L_.js → CmB-TL7C.js} +1 -1
- package/chunk/{BbYzi8M0.js → CuOl4X0X.js} +4 -4
- package/chunk/{BHLTzWzi.js → D-ER56Sf.js} +1 -1
- package/chunk/{BK1FKNAX.js → D-aYnb6u.js} +1 -1
- package/chunk/{DalIRWr7.js → D2HkyI6A.js} +9 -9
- package/chunk/D3NFxdmG.js +518 -0
- package/chunk/{C2fspJbE.js → D3xQFJcO.js} +1 -1
- package/chunk/{Lk60-jkf.js → DApXtulb.js} +4 -0
- package/chunk/{sl8s35SK.js → DJcEys80.js} +1 -1
- package/chunk/{B1S1OEw6.js → DLIm6rRJ.js} +1 -1
- package/chunk/{C95ipQ6b.js → DOWEHtqM.js} +1 -1
- package/chunk/{aM2ePYrq.js → DSGRHf-1.js} +132 -132
- package/chunk/{D9TqtOhq.js → DT37l12z.js} +1 -1
- package/chunk/{B6fn5y_s.js → DW-B7npC.js} +1 -1
- package/chunk/D_-UD4vO.js +119 -0
- package/chunk/{Dtnux4qL.js → D_MTFBb0.js} +1 -1
- package/chunk/{WkB0MERB.js → DhBo0pPJ.js} +27 -27
- package/chunk/DmUhn9ib.js +961 -0
- package/chunk/{Bny52uiG.js → DpfUGhi4.js} +10 -10
- package/chunk/{DhLbnw3R.js → Dx_5J4fO.js} +1 -1
- package/chunk/{B9PsJar0.js → Dy487FZ1.js} +1 -1
- package/chunk/{D6RTBH4C.js → IooeSKJJ.js} +10 -10
- package/chunk/Kbr6FzOG.js +745 -0
- package/chunk/{CwjaGytU.js → RMBPs_Ry.js} +32 -32
- package/chunk/Uz-rNulO.js +98 -0
- package/chunk/V6euPXVB.js +1025 -0
- package/chunk/{Bv8ZRDFt.js → YIlBPVAs.js} +14 -14
- package/chunk/{DPvnQJ-H.js → cDZI_t6o.js} +1 -1
- package/chunk/{C-w9pFY-.js → cZiP8FvM.js} +3 -3
- package/chunk/{DJmWXheU.js → eK7lxdak.js} +8 -8
- package/chunk/{Dg2DmtzA.js → gIbzjQ-X.js} +5 -6
- package/chunk/{CPl52AZh.js → sScV-J56.js} +1 -1
- package/chunk/{BbI3gqVr.js → wI2I1qb0.js} +1 -1
- package/hooks/index.js +32 -32
- package/hooks/use-verification-code.js +23 -22
- package/hooks/use-watermark.js +2 -1
- package/hooks/useComputedState.js +2 -1
- package/hooks/useCreate.js +2 -1
- package/hooks/useForceUpdate.js +2 -1
- package/hooks/useId.js +2 -1
- package/hooks/useInView.js +5 -4
- package/hooks/useIntersectionObserver.js +11 -11
- package/hooks/useIsFirstRender.js +2 -1
- package/hooks/useIsomorphicLayoutEffect.js +2 -1
- package/hooks/useKeyboardEvent.js +3 -2
- package/hooks/useMedia.js +2 -1
- package/hooks/useMergeProps.js +2 -1
- package/hooks/useMergeValue.js +4 -3
- package/hooks/useOverflowHidden.js +2 -1
- package/hooks/useOverrideRef.js +2 -1
- package/hooks/usePersistCallback.js +2 -1
- package/hooks/usePrevious.js +2 -1
- package/hooks/useRefs.js +2 -1
- package/hooks/useResizeObserver.js +2 -1
- package/hooks/useStateCallback.js +2 -1
- package/hooks/useStateWithPromise.js +2 -1
- package/hooks/useUpdateEffect.js +2 -1
- package/hooks/useWatch.js +3 -2
- package/hooks/useWindowSize.js +2 -1
- package/icons.js +35 -35
- package/index.js +484 -376
- package/locale/en-US.js +3 -11
- package/locale/tr-TR.js +3 -11
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/anchor/Anchor.d.ts +1 -1
- package/types/button/index.d.ts +3 -2
- package/types/color-picker/hooks/useColorPicker.d.ts +1 -1
- package/types/color-picker/hooks/useControlBlock.d.ts +1 -1
- package/types/config-provider/interface.d.ts +1 -0
- package/types/date-picker/PickerRange.d.ts +1 -1
- package/types/hooks/use-verification-code/index.d.ts +2 -1
- package/types/hooks/use-watermark/index.d.ts +2 -1
- package/types/hooks/useComputedState.d.ts +2 -2
- package/types/hooks/useCreate.d.ts +2 -1
- package/types/hooks/useForceUpdate.d.ts +2 -1
- package/types/hooks/useId.d.ts +2 -1
- package/types/hooks/useInView.d.ts +1 -1
- package/types/hooks/useIntersectionObserver.d.ts +1 -1
- package/types/hooks/useIsFirstRender.d.ts +2 -1
- package/types/hooks/useIsomorphicLayoutEffect.d.ts +1 -1
- package/types/hooks/useKeyboardEvent.d.ts +2 -2
- package/types/hooks/useMedia.d.ts +1 -1
- package/types/hooks/useMergeProps.d.ts +2 -1
- package/types/hooks/useMergeValue.d.ts +2 -1
- package/types/hooks/useOverflowHidden.d.ts +2 -2
- package/types/hooks/useOverrideRef.d.ts +2 -1
- package/types/hooks/usePersistCallback.d.ts +2 -1
- package/types/hooks/usePrevious.d.ts +2 -1
- package/types/hooks/useRefs.d.ts +2 -1
- package/types/hooks/useResizeObserver.d.ts +2 -1
- package/types/hooks/useStateCallback.d.ts +1 -1
- package/types/hooks/useStateWithPromise.d.ts +1 -1
- package/types/hooks/useUpdateEffect.d.ts +2 -1
- package/types/hooks/useWatch.d.ts +2 -1
- package/types/hooks/useWindowSize.d.ts +1 -1
- package/types/image/interface.d.ts +1 -1
- package/types/index.d.ts +13 -22
- package/types/table/interface.d.ts +3 -1
- package/types/upload/Upload.d.ts +2 -1
- package/types/upload/index.d.ts +3 -1
- package/types/upload/request_.d.ts +3 -0
- package/types/utils/caseName.d.ts +2 -0
- package/types/utils/fileToURL.d.ts +2 -0
- package/types/utils/fillNBSP.d.ts +1 -1
- package/types/utils/index.d.ts +37 -0
- package/types/utils/is.d.ts +2 -2
- package/types/utils/lodash.d.ts +4 -0
- package/types/utils/scrollIntoView.d.ts +2 -1
- package/types/version/index.d.ts +1 -1
- package/utils/CSSTransition.js +1 -1
- package/utils/caseName.js +20 -0
- package/utils/className.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/fileToURL.js +4 -0
- package/utils/index.js +219 -0
- package/utils/is.js +95 -93
- package/utils/keyCode.js +10 -46
- package/utils/lodash.js +8 -0
- package/utils/mergedToString.js +11 -10
- package/utils/reactDOM.js +1 -1
- package/utils/saveAs.js +1 -1
- package/utils/scrollIntoView.js +8 -7
- package/chunk/5pZ3ayqs.js +0 -29
- package/chunk/Bl-ODC57.js +0 -945
- package/chunk/BlKc_pDZ.js +0 -678
- package/chunk/CiEln_Q1.js +0 -517
- package/chunk/CiZVOdJ3.js +0 -122
- package/chunk/DMWMrXg1.js +0 -964
- package/chunk/DUxWiN2U.js +0 -1465
- package/chunk/Dbk4DVhB.js +0 -855
- package/chunk/Do1aMgY3.js +0 -12
- package/chunk/HlP8inLK.js +0 -1796
- package/chunk/V_IcWDFx.js +0 -49
- /package/types/utils/{mergeProp.d.ts → mergeProps.d.ts} +0 -0
- /package/utils/{mergeProp.js → mergeProps.js} +0 -0
|
@@ -2,35 +2,35 @@ var Fe = Object.defineProperty;
|
|
|
2
2
|
var He = (t, e, n) => e in t ? Fe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var d = (t, e, n) => He(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
import { jsxs as X, Fragment as re, jsx as g } from "react/jsx-runtime";
|
|
5
|
-
import { I as Be } from "
|
|
6
|
-
import { a as Ue, I as je } from "./
|
|
7
|
-
import { e as We } from "./
|
|
8
|
-
import { G as Ke, V as ze } from "./
|
|
5
|
+
import { I as Be } from "./-jdfq71f.js";
|
|
6
|
+
import { a as Ue, I as je } from "./DT37l12z.js";
|
|
7
|
+
import { e as We } from "./BHn4xgbv.js";
|
|
8
|
+
import { G as Ke, V as ze } from "./BBVjSFnw.js";
|
|
9
9
|
import we from "lodash/isArray";
|
|
10
10
|
import W from "lodash/isFunction";
|
|
11
11
|
import ne from "lodash/isPlainObject";
|
|
12
12
|
import Y from "lodash/isString";
|
|
13
|
-
import qe, { useRef as z, useState as
|
|
14
|
-
import {
|
|
15
|
-
import ue from "../hooks/useForceUpdate.js";
|
|
16
|
-
import Ye from "../hooks/useId.js";
|
|
17
|
-
import Ze from "../hooks/useMergeProps.js";
|
|
18
|
-
import ve from "../hooks/useMergeValue.js";
|
|
19
|
-
import le from "../hooks/useUpdateEffect.js";
|
|
13
|
+
import qe, { useRef as z, useState as ae, useCallback as se, useEffect as Z, forwardRef as Ge, useContext as Je, useImperativeHandle as Qe } from "react";
|
|
14
|
+
import { d as Xe } from "./Bdh4XVuf.js";
|
|
15
|
+
import { useForceUpdate as ue } from "../hooks/useForceUpdate.js";
|
|
16
|
+
import { useId as Ye } from "../hooks/useId.js";
|
|
17
|
+
import { useMergeProps as Ze } from "../hooks/useMergeProps.js";
|
|
18
|
+
import { useMergeValue as ve } from "../hooks/useMergeValue.js";
|
|
19
|
+
import { useUpdateEffect as le } from "../hooks/useUpdateEffect.js";
|
|
20
20
|
import et from "../SelectView.js";
|
|
21
21
|
import tt from "../Trigger.js";
|
|
22
|
-
import { y as q } from "./
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
22
|
+
import { y as q } from "./BzPkh4Zv.js";
|
|
23
|
+
import { E as he, a as nt, b as rt, c as _e, A as ie, d as fe, T as lt } from "./C2lIz2F9.js";
|
|
24
|
+
import { _ as at, P as st } from "./BPZ-6HKJ.js";
|
|
25
25
|
import me from "lodash/isEqualWith";
|
|
26
26
|
import ee from "lodash/get";
|
|
27
|
-
import {
|
|
28
|
-
import { C as Oe } from "./
|
|
29
|
-
import ct from "../hooks/useIsFirstRender.js";
|
|
27
|
+
import { p as it } from "./CANaGbGR.js";
|
|
28
|
+
import { C as Oe } from "./eK7lxdak.js";
|
|
29
|
+
import { useIsFirstRender as ct } from "../hooks/useIsFirstRender.js";
|
|
30
30
|
import { on as Le, off as de } from "../utils/dom.js";
|
|
31
31
|
import "../utils/is.js";
|
|
32
|
-
import { V as Pe } from "./
|
|
33
|
-
import ot from "../hooks/useRefs.js";
|
|
32
|
+
import { V as Pe } from "./D3NFxdmG.js";
|
|
33
|
+
import { useRefs as ot } from "../hooks/useRefs.js";
|
|
34
34
|
function dt(t, e) {
|
|
35
35
|
const n = z(null), l = ue();
|
|
36
36
|
return n.current || (n.current = t()), le(() => {
|
|
@@ -66,9 +66,9 @@ class ge {
|
|
|
66
66
|
// 保存暴露给外部的属性
|
|
67
67
|
d(this, "_data");
|
|
68
68
|
d(this, "_initNode", (e, n = null) => {
|
|
69
|
-
const { showEmptyChildren: l, lazyload:
|
|
69
|
+
const { showEmptyChildren: l, lazyload: s } = this.config, c = { ...$e, ...this.config.fieldNames }, r = ee(e, c.children) || e[c.children];
|
|
70
70
|
let k = Array.isArray(r) ? l ? !1 : r.length === 0 : !0;
|
|
71
|
-
|
|
71
|
+
s && (c.isLeaf in e ? k = !!ee(e, c.isLeaf) || !!e[c.isLeaf] : k = !1);
|
|
72
72
|
const _ = ee(e, c.value) || e[c.value], I = ee(e, c.label) || e[c.label], b = {
|
|
73
73
|
...e,
|
|
74
74
|
value: _,
|
|
@@ -98,8 +98,8 @@ class ge {
|
|
|
98
98
|
*/
|
|
99
99
|
d(this, "_isHalfChecked", () => {
|
|
100
100
|
const e = this.children.reduce((n, l) => {
|
|
101
|
-
const
|
|
102
|
-
return n +
|
|
101
|
+
const s = l._halfChecked ? 0.5 : l._checked ? 1 : 0;
|
|
102
|
+
return n + s;
|
|
103
103
|
}, 0);
|
|
104
104
|
return e !== this.children.length && e > 0;
|
|
105
105
|
});
|
|
@@ -114,12 +114,12 @@ class ge {
|
|
|
114
114
|
}), this.updateHalfState(e));
|
|
115
115
|
});
|
|
116
116
|
d(this, "getSelfChildrenValue", () => {
|
|
117
|
-
const e = [], n = (l,
|
|
118
|
-
if (!
|
|
117
|
+
const e = [], n = (l, s) => {
|
|
118
|
+
if (!s || !s.length) {
|
|
119
119
|
e.push(l);
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
|
-
(
|
|
122
|
+
(s || []).forEach((c) => {
|
|
123
123
|
n(c.pathValue, c.children);
|
|
124
124
|
});
|
|
125
125
|
};
|
|
@@ -177,14 +177,14 @@ class ut {
|
|
|
177
177
|
d(this, "flatNodes", []);
|
|
178
178
|
d(this, "config", {});
|
|
179
179
|
// 初始化节点状态,附加状态信息字段: _checked,_halfChecked,parent,disabled
|
|
180
|
-
d(this, "_calcNodes", (e, n) => e ? e.map((l,
|
|
180
|
+
d(this, "_calcNodes", (e, n) => e ? e.map((l, s) => new ge({ ...l, _index: s }, this.config, n)) : []);
|
|
181
181
|
// this.flatNodes 保存所有可能的选中项
|
|
182
182
|
d(this, "_updateFlatNodes", () => {
|
|
183
183
|
const e = !this.config.changeOnSelect;
|
|
184
184
|
this.flatNodes = [];
|
|
185
185
|
const n = (l) => {
|
|
186
|
-
l && ((!e || l.isLeaf) && this.flatNodes.push(l), we(l.children) && l.children.forEach((
|
|
187
|
-
n(
|
|
186
|
+
l && ((!e || l.isLeaf) && this.flatNodes.push(l), we(l.children) && l.children.forEach((s) => {
|
|
187
|
+
n(s);
|
|
188
188
|
}));
|
|
189
189
|
};
|
|
190
190
|
this.nodes.forEach((l) => {
|
|
@@ -199,10 +199,10 @@ class ut {
|
|
|
199
199
|
d(this, "setNodeCheckedByValue", (e) => {
|
|
200
200
|
const n = ce(e);
|
|
201
201
|
this.flatNodes.forEach((l) => {
|
|
202
|
-
let
|
|
202
|
+
let s = !1;
|
|
203
203
|
this.config.showParent ? l.pathValue.some(
|
|
204
204
|
(c, r, k) => G(n, k.slice(0, r + 1))
|
|
205
|
-
) && (
|
|
205
|
+
) && (s = !0) : G(n, l.pathValue) && (s = !0), l.setCheckedStateIgnoreDisabled(s);
|
|
206
206
|
});
|
|
207
207
|
});
|
|
208
208
|
/**
|
|
@@ -230,8 +230,8 @@ class ut {
|
|
|
230
230
|
d(this, "searchNodeByLabel", (e) => {
|
|
231
231
|
if (!e)
|
|
232
232
|
return this.flatNodes;
|
|
233
|
-
const { filterOption: n } = this.config, l = W(n) ? n : (
|
|
234
|
-
return this.flatNodes.filter((
|
|
233
|
+
const { filterOption: n } = this.config, l = W(n) ? n : (s, c) => Y(c.label) && c.label.indexOf(s) > -1;
|
|
234
|
+
return this.flatNodes.filter((s) => s.getPathNodes().some((r) => l(e, r._data)));
|
|
235
235
|
});
|
|
236
236
|
/** 获取所有节点 */
|
|
237
237
|
d(this, "getOptions", () => this.nodes);
|
|
@@ -241,15 +241,15 @@ class ut {
|
|
|
241
241
|
d(this, "getCheckedParentNodes", () => {
|
|
242
242
|
const e = /* @__PURE__ */ new Set();
|
|
243
243
|
return this.flatNodes.forEach((n) => {
|
|
244
|
-
n._checked && n.getPathNodes().some((
|
|
245
|
-
if (
|
|
246
|
-
return e.has(
|
|
244
|
+
n._checked && n.getPathNodes().some((s) => {
|
|
245
|
+
if (s._checked)
|
|
246
|
+
return e.has(s) || e.add(s), !0;
|
|
247
247
|
});
|
|
248
248
|
}), Array.from(e);
|
|
249
249
|
});
|
|
250
250
|
this.config = { ...l };
|
|
251
|
-
const
|
|
252
|
-
this.nodes = this._calcNodes(e, null), this._updateFlatNodes(), this.setNodeCheckedByValue(
|
|
251
|
+
const s = Array.isArray(n) ? n : [];
|
|
252
|
+
this.nodes = this._calcNodes(e, null), this._updateFlatNodes(), this.setNodeCheckedByValue(s);
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
const J = "__pqb_cascader__", ht = "parent", ft = "child", ye = {
|
|
@@ -270,7 +270,7 @@ function mt(t, e) {
|
|
|
270
270
|
const n = e ? Array.isArray(e[0]) ? e : [e] : [];
|
|
271
271
|
return new ut(t.options || [], n, xe(t));
|
|
272
272
|
}
|
|
273
|
-
const ce = (t) => (t || []).reduce((l,
|
|
273
|
+
const ce = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(J)), l), /* @__PURE__ */ new Set()), G = (t, e) => {
|
|
274
274
|
const n = e || [];
|
|
275
275
|
return t.has(n.join(J));
|
|
276
276
|
}, gt = (t, e) => {
|
|
@@ -279,8 +279,8 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
279
279
|
}, te = (t, e, n) => {
|
|
280
280
|
let l = [];
|
|
281
281
|
if (t === void 0 ? l = [] : e ? l = t : l = [t], n && n.config.showParent) {
|
|
282
|
-
const
|
|
283
|
-
|
|
282
|
+
const s = n.getCheckedNodes(), c = ce(
|
|
283
|
+
s.map((_) => _.pathValue)
|
|
284
284
|
), r = [], k = {};
|
|
285
285
|
return l.map((_) => {
|
|
286
286
|
_.some((I, b, x) => {
|
|
@@ -294,8 +294,8 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
294
294
|
const e = (n) => Array.isArray(n) ? n.every((l) => l._checked || l.disabled ? !0 : e(l.children)) : !1;
|
|
295
295
|
return t._halfChecked && e(t == null ? void 0 : t.children);
|
|
296
296
|
}, Ee = (t, e, n, l) => {
|
|
297
|
-
const
|
|
298
|
-
n.setCheckedState(
|
|
297
|
+
const s = l && pt(n) ? !1 : l, c = e.getCheckedNodes().reduce((b, x) => (b.add(x.pathValue.join(J)), b), /* @__PURE__ */ new Set());
|
|
298
|
+
n.setCheckedState(s);
|
|
299
299
|
const k = e.getCheckedNodes().map((b) => b.pathValue), _ = ce(k), I = /* @__PURE__ */ new Set();
|
|
300
300
|
return t.filter((b) => {
|
|
301
301
|
if (!G(c, b) || G(_, b))
|
|
@@ -304,7 +304,7 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
304
304
|
k.filter((b) => !G(I, b))
|
|
305
305
|
);
|
|
306
306
|
}, Ct = (t) => {
|
|
307
|
-
const { prefixCls: e, multiple: n, option: l, renderOption:
|
|
307
|
+
const { prefixCls: e, multiple: n, option: l, renderOption: s, selected: c, icons: r } = t, k = l.disabled || n && l.disableCheckbox;
|
|
308
308
|
return /* @__PURE__ */ X(re, { children: [
|
|
309
309
|
n ? /* @__PURE__ */ g(
|
|
310
310
|
Oe,
|
|
@@ -324,7 +324,7 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
324
324
|
onMouseEnter: t.onMouseEnter,
|
|
325
325
|
onDoubleClick: k ? void 0 : t.onDoubleClickOption,
|
|
326
326
|
children: [
|
|
327
|
-
|
|
327
|
+
s ? s() : l.label,
|
|
328
328
|
l.isLeaf ? c && r.checked : l.loading ? r.loading : r.next
|
|
329
329
|
]
|
|
330
330
|
}
|
|
@@ -345,7 +345,7 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
345
345
|
}, Ve = (t, e) => t < 0 ? e : t > e ? 0 : t, bt = (t) => {
|
|
346
346
|
var $;
|
|
347
347
|
const [e, n] = ot(), l = ue(), {
|
|
348
|
-
store:
|
|
348
|
+
store: s,
|
|
349
349
|
prefixCls: c,
|
|
350
350
|
value: r,
|
|
351
351
|
multiple: k,
|
|
@@ -355,35 +355,35 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
355
355
|
loadMore: x,
|
|
356
356
|
renderEmpty: N,
|
|
357
357
|
rtl: E,
|
|
358
|
-
icons:
|
|
359
|
-
} = t, [h, V] =
|
|
360
|
-
|
|
361
|
-
), O =
|
|
358
|
+
icons: R
|
|
359
|
+
} = t, [h, V] = ae(
|
|
360
|
+
s.findNodeByValue(r && r[r.length - 1]) || null
|
|
361
|
+
), O = s.getOptions(), U = (a) => {
|
|
362
362
|
var u;
|
|
363
|
-
(u = t.onChange) == null || u.call(t,
|
|
364
|
-
}, S = async (
|
|
365
|
-
if (!
|
|
366
|
-
|
|
363
|
+
(u = t.onChange) == null || u.call(t, a);
|
|
364
|
+
}, S = async (a) => {
|
|
365
|
+
if (!a.isLeaf && W(x) && !a.children) {
|
|
366
|
+
a.setLoading(!0), l();
|
|
367
367
|
try {
|
|
368
368
|
const u = await x(
|
|
369
|
-
|
|
370
|
-
|
|
369
|
+
a.pathValue,
|
|
370
|
+
a.pathValue.length
|
|
371
371
|
);
|
|
372
|
-
|
|
372
|
+
s.appendOptionChildren(a, u), s.setNodeCheckedByValue(t.value);
|
|
373
373
|
} catch (u) {
|
|
374
374
|
console.error(u);
|
|
375
375
|
}
|
|
376
|
-
|
|
376
|
+
a.setLoading(!1), l();
|
|
377
377
|
}
|
|
378
|
-
}, f = async (
|
|
379
|
-
!
|
|
380
|
-
}, L = (
|
|
381
|
-
const C = Ee(t.value,
|
|
382
|
-
|
|
383
|
-
}, P =
|
|
384
|
-
(
|
|
378
|
+
}, f = async (a, u = !0) => {
|
|
379
|
+
!a || a.disabled || (V(a), S(a), !k && u && (t.changeOnSelect || a.isLeaf) && U([a.pathValue]));
|
|
380
|
+
}, L = (a, u) => {
|
|
381
|
+
const C = Ee(t.value, s, a, u);
|
|
382
|
+
a === h && l(), V(a), t.changeOnSelect || S(a), U(C);
|
|
383
|
+
}, P = se(
|
|
384
|
+
(a = h) => {
|
|
385
385
|
var C;
|
|
386
|
-
let u =
|
|
386
|
+
let u = a;
|
|
387
387
|
for (; u; )
|
|
388
388
|
(C = e[u._level]) == null || C.scrollTo({
|
|
389
389
|
index: u._index,
|
|
@@ -391,14 +391,14 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
391
391
|
}), u = u._level < 1 ? null : u.parent;
|
|
392
392
|
},
|
|
393
393
|
[h]
|
|
394
|
-
), p =
|
|
395
|
-
(
|
|
394
|
+
), p = se(
|
|
395
|
+
(a) => {
|
|
396
396
|
var o;
|
|
397
|
-
const u =
|
|
397
|
+
const u = a.key;
|
|
398
398
|
let C;
|
|
399
399
|
switch (u) {
|
|
400
400
|
case fe.key: {
|
|
401
|
-
|
|
401
|
+
a.preventDefault(), (o = t.onEsc) == null || o.call(t);
|
|
402
402
|
break;
|
|
403
403
|
}
|
|
404
404
|
case ie.key:
|
|
@@ -414,28 +414,28 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
414
414
|
for (; K !== A._index && (C = j[K], C.disabled); )
|
|
415
415
|
K = Ve(K + F, j.length - 1);
|
|
416
416
|
}
|
|
417
|
-
return P(C), f(C, !1),
|
|
417
|
+
return P(C), f(C, !1), a.preventDefault(), !1;
|
|
418
418
|
}
|
|
419
419
|
case rt.key:
|
|
420
|
-
return h && !h.disabled && (C = (h.children || [])[0] || h, f(C, !1)),
|
|
420
|
+
return h && !h.disabled && (C = (h.children || [])[0] || h, f(C, !1)), a.preventDefault(), !1;
|
|
421
421
|
case nt.key: {
|
|
422
422
|
if (h) {
|
|
423
423
|
const A = Ne(h);
|
|
424
424
|
C = A.parent || A;
|
|
425
425
|
}
|
|
426
|
-
return f(C, !1),
|
|
426
|
+
return f(C, !1), a.preventDefault(), !1;
|
|
427
427
|
}
|
|
428
428
|
case he.key:
|
|
429
|
-
return h && (k ? L(h, !h._checked) : f(h)),
|
|
429
|
+
return h && (k ? L(h, !h._checked) : f(h)), a.preventDefault(), !1;
|
|
430
430
|
}
|
|
431
431
|
},
|
|
432
432
|
[h]
|
|
433
433
|
);
|
|
434
434
|
le(() => {
|
|
435
|
-
V((
|
|
435
|
+
V((a) => {
|
|
436
436
|
let u;
|
|
437
|
-
if (
|
|
438
|
-
const C =
|
|
437
|
+
if (a && a.pathValue && a.pathValue.length) {
|
|
438
|
+
const C = a.pathValue;
|
|
439
439
|
let o = { children: O };
|
|
440
440
|
C.map((A) => {
|
|
441
441
|
const F = (o.children || []).find((K) => K.value === A);
|
|
@@ -444,25 +444,25 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
444
444
|
}
|
|
445
445
|
return u;
|
|
446
446
|
});
|
|
447
|
-
}, [
|
|
447
|
+
}, [s]), Z(() => {
|
|
448
448
|
t.popupVisible && O.length && setTimeout(P);
|
|
449
449
|
}, [t.popupVisible]), Z(() => {
|
|
450
|
-
const
|
|
451
|
-
if (
|
|
452
|
-
return t.popupVisible ? Le(
|
|
453
|
-
de(
|
|
450
|
+
const a = t.getTriggerElement();
|
|
451
|
+
if (a)
|
|
452
|
+
return t.popupVisible ? Le(a, "keydown", p) : de(a, "keydown", p), () => {
|
|
453
|
+
de(a, "keydown", p);
|
|
454
454
|
};
|
|
455
455
|
}, [t.popupVisible, p]);
|
|
456
456
|
const D = (() => {
|
|
457
|
-
const
|
|
457
|
+
const a = [O];
|
|
458
458
|
return (h ? h.getPathNodes() : []).forEach((C) => {
|
|
459
|
-
C && C.children &&
|
|
460
|
-
}),
|
|
461
|
-
})(), w = W(t.dropdownColumnRender) ? t.dropdownColumnRender : (
|
|
462
|
-
return !D.length || !(($ = D[0]) != null && $.length) ? /* @__PURE__ */ g(re, { children: N() }) : /* @__PURE__ */ g(
|
|
459
|
+
C && C.children && a.push(C.children);
|
|
460
|
+
}), a;
|
|
461
|
+
})(), w = W(t.dropdownColumnRender) ? t.dropdownColumnRender : (a) => a;
|
|
462
|
+
return !D.length || !(($ = D[0]) != null && $.length) ? /* @__PURE__ */ g(re, { children: N() }) : /* @__PURE__ */ g(at, { component: qe.Fragment, children: D.map((a, u) => {
|
|
463
463
|
const C = _ ? _(u, h || null) : null;
|
|
464
|
-
return
|
|
465
|
-
|
|
464
|
+
return a.length === 0 && !b ? null : /* @__PURE__ */ g(
|
|
465
|
+
st,
|
|
466
466
|
{
|
|
467
467
|
timeout: {
|
|
468
468
|
enter: 300,
|
|
@@ -497,12 +497,12 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
497
497
|
[`${c}-list-wrapper-with-footer`]: C !== null
|
|
498
498
|
}),
|
|
499
499
|
children: [
|
|
500
|
-
|
|
500
|
+
a.length === 0 ? N == null ? void 0 : N(t.virtualListProps ? "100%" : 120) : /* @__PURE__ */ g(
|
|
501
501
|
Pe,
|
|
502
502
|
{
|
|
503
503
|
needFiller: !1,
|
|
504
504
|
threshold: t.virtualListProps ? 100 : null,
|
|
505
|
-
data:
|
|
505
|
+
data: a,
|
|
506
506
|
isStaticItemHeight: !0,
|
|
507
507
|
itemKey: "value",
|
|
508
508
|
...ne(t.virtualListProps) ? t.virtualListProps : {},
|
|
@@ -540,7 +540,7 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
540
540
|
multiple: k,
|
|
541
541
|
option: o,
|
|
542
542
|
selected: !k && o.isLeaf && me(t.value, o.pathValue),
|
|
543
|
-
icons:
|
|
543
|
+
icons: R,
|
|
544
544
|
onMouseEnter: () => {
|
|
545
545
|
o.disabled || t.expandTrigger === "hover" && (V(o), !o.isLeaf && S(o));
|
|
546
546
|
},
|
|
@@ -584,12 +584,12 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
584
584
|
}, Se = (t, e) => t < 0 ? e : t > e ? 0 : t, vt = (t, e, n) => {
|
|
585
585
|
let l = e;
|
|
586
586
|
if (Y(e)) {
|
|
587
|
-
const
|
|
588
|
-
if (
|
|
589
|
-
const c = e.substring(0,
|
|
587
|
+
const s = e.toUpperCase().indexOf(t.toUpperCase());
|
|
588
|
+
if (s > -1) {
|
|
589
|
+
const c = e.substring(0, s + 1), r = e.substring(s + t.length);
|
|
590
590
|
l = /* @__PURE__ */ X(re, { children: [
|
|
591
591
|
c,
|
|
592
|
-
/* @__PURE__ */ g("span", { className: `${n}-highlight`, children: e.substring(
|
|
592
|
+
/* @__PURE__ */ g("span", { className: `${n}-highlight`, children: e.substring(s, t.length + 1) }),
|
|
593
593
|
r
|
|
594
594
|
] });
|
|
595
595
|
}
|
|
@@ -600,16 +600,16 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
600
600
|
store: e,
|
|
601
601
|
prefixCls: n,
|
|
602
602
|
multiple: l,
|
|
603
|
-
onChange:
|
|
603
|
+
onChange: s,
|
|
604
604
|
inputValue: c,
|
|
605
605
|
renderEmpty: r,
|
|
606
606
|
style: k,
|
|
607
607
|
defaultActiveFirstOption: _,
|
|
608
608
|
rtl: I,
|
|
609
609
|
icons: b
|
|
610
|
-
} = t, x = t.value || [], [N, E] =
|
|
610
|
+
} = t, x = t.value || [], [N, E] = ae(
|
|
611
611
|
e.searchNodeByLabel(c) || []
|
|
612
|
-
),
|
|
612
|
+
), R = z(), h = z(), V = ct(), [O, U] = ae(
|
|
613
613
|
_ ? 0 : -1
|
|
614
614
|
), S = (f, L, P) => {
|
|
615
615
|
if (P.stopPropagation(), !f.disabled)
|
|
@@ -620,9 +620,9 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
620
620
|
f,
|
|
621
621
|
L
|
|
622
622
|
);
|
|
623
|
-
|
|
623
|
+
s == null || s(p);
|
|
624
624
|
} else
|
|
625
|
-
|
|
625
|
+
s == null || s([f.pathValue]);
|
|
626
626
|
};
|
|
627
627
|
return le(() => {
|
|
628
628
|
E(e.searchNodeByLabel(c));
|
|
@@ -654,7 +654,7 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
654
654
|
case he.key: {
|
|
655
655
|
const w = N[O];
|
|
656
656
|
if (w) {
|
|
657
|
-
const $ = x.some((
|
|
657
|
+
const $ = x.some((a) => me(a, w.pathValue));
|
|
658
658
|
S(w, !$, P);
|
|
659
659
|
}
|
|
660
660
|
return !1;
|
|
@@ -666,14 +666,14 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
666
666
|
};
|
|
667
667
|
}, [N, O, x]), Z(() => {
|
|
668
668
|
var L;
|
|
669
|
-
const f =
|
|
669
|
+
const f = R.current;
|
|
670
670
|
f && (h.current || V) && it(f, {
|
|
671
|
-
behavior: "
|
|
671
|
+
behavior: "auto",
|
|
672
672
|
block: "nearest",
|
|
673
673
|
scrollMode: "if-needed",
|
|
674
674
|
boundary: (L = f.parentNode) == null ? void 0 : L.parentNode
|
|
675
675
|
});
|
|
676
|
-
}, [O, N]),
|
|
676
|
+
}, [O, N]), R.current = null, N.length ? /* @__PURE__ */ g("div", { className: `${n}-list-wrapper`, children: /* @__PURE__ */ g(
|
|
677
677
|
Pe,
|
|
678
678
|
{
|
|
679
679
|
needFiller: !1,
|
|
@@ -692,26 +692,26 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
692
692
|
[`${n}-list-rtl`]: I
|
|
693
693
|
}),
|
|
694
694
|
children: (f, L) => {
|
|
695
|
-
const p = f.getPathNodes().map((
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
] }, `${
|
|
695
|
+
const p = f.getPathNodes().map((a) => /* @__PURE__ */ X("span", { children: [
|
|
696
|
+
a.label,
|
|
697
|
+
a.isLeaf ? "" : " / "
|
|
698
|
+
] }, `${a.label}_${a._level}`)), D = f._checked, w = { checked: D }, $ = W(t.renderOption) ? t.renderOption(c, f._data, w) : vt(c, p, n);
|
|
699
699
|
return /* @__PURE__ */ g(
|
|
700
700
|
"li",
|
|
701
701
|
{
|
|
702
702
|
title: Y($) ? $ : Y(p) ? p : void 0,
|
|
703
703
|
role: "menuitem",
|
|
704
704
|
"aria-disabled": f.disabled,
|
|
705
|
-
ref: (
|
|
706
|
-
L === O && (
|
|
705
|
+
ref: (a) => {
|
|
706
|
+
L === O && (R.current = a), D && !R.current && (R.current = a);
|
|
707
707
|
},
|
|
708
708
|
className: q(`${n}-list-search-item`, {
|
|
709
709
|
[`${n}-list-search-item-active`]: D,
|
|
710
710
|
[`${n}-list-search-item-hover`]: L === O,
|
|
711
711
|
[`${n}-list-search-item-disabled`]: f.disabled
|
|
712
712
|
}),
|
|
713
|
-
onClick: (
|
|
714
|
-
S(f, !D,
|
|
713
|
+
onClick: (a) => {
|
|
714
|
+
S(f, !D, a);
|
|
715
715
|
},
|
|
716
716
|
onMouseEnter: () => {
|
|
717
717
|
!h.current && !f.disabled && U(L);
|
|
@@ -745,10 +745,10 @@ const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /
|
|
|
745
745
|
defaultActiveFirstOption: !0
|
|
746
746
|
}, Vt = { bottom: 4 };
|
|
747
747
|
function St(t, e) {
|
|
748
|
-
const { getPrefixCls: n, renderEmpty: l, componentConfig:
|
|
748
|
+
const { getPrefixCls: n, renderEmpty: l, componentConfig: s, rtl: c } = Je(Xe), r = Ze(
|
|
749
749
|
t,
|
|
750
750
|
Nt,
|
|
751
|
-
|
|
751
|
+
s == null ? void 0 : s.Cascader
|
|
752
752
|
), {
|
|
753
753
|
disabled: k,
|
|
754
754
|
renderFormat: _,
|
|
@@ -757,7 +757,7 @@ function St(t, e) {
|
|
|
757
757
|
triggerProps: x,
|
|
758
758
|
expandTrigger: N,
|
|
759
759
|
icons: E
|
|
760
|
-
} = r,
|
|
760
|
+
} = r, R = {
|
|
761
761
|
loading: (E == null ? void 0 : E.loading) || /* @__PURE__ */ g(We, {}),
|
|
762
762
|
checked: (E == null ? void 0 : E.checked) || /* @__PURE__ */ g(Be, {}),
|
|
763
763
|
next: (E == null ? void 0 : E.next) || (c ? /* @__PURE__ */ g(Ue, {}) : /* @__PURE__ */ g(je, {}))
|
|
@@ -767,10 +767,10 @@ function St(t, e) {
|
|
|
767
767
|
"value" in r ? r.value : r.defaultValue,
|
|
768
768
|
V
|
|
769
769
|
)
|
|
770
|
-
), [JSON.stringify(xe(r)), r.options]), [f, L] =
|
|
770
|
+
), [JSON.stringify(xe(r)), r.options]), [f, L] = ae(() => "value" in r ? te(r.value, V, S) : "defaultValue" in r ? te(r.defaultValue, V, S) : []), P = "value" in r ? te(r.value, V, S) : f, [p, D] = ve(!1, {
|
|
771
771
|
value: r.popupVisible,
|
|
772
772
|
defaultValue: r.defaultPopupVisible
|
|
773
|
-
}), [w, $,
|
|
773
|
+
}), [w, $, a] = ve("", {
|
|
774
774
|
value: "inputValue" in r ? r.inputValue || "" : void 0
|
|
775
775
|
}), u = z(w), C = z(null), o = z(null), A = z((S == null ? void 0 : S.getCheckedNodes()) || []), j = Ye(`${h}-popup-`), F = (i, m) => {
|
|
776
776
|
var v;
|
|
@@ -782,7 +782,7 @@ function St(t, e) {
|
|
|
782
782
|
Z(() => {
|
|
783
783
|
var m;
|
|
784
784
|
const { current: i } = C;
|
|
785
|
-
|
|
785
|
+
a === w && (i === "manual" || i === "optionListHide") && ((m = r.onSearch) == null || m.call(r, w, i)), w !== u.current && (u.current = w);
|
|
786
786
|
}, [w]), Z(() => {
|
|
787
787
|
const i = () => {
|
|
788
788
|
clearTimeout(O.current), O.current = null;
|
|
@@ -804,24 +804,24 @@ function St(t, e) {
|
|
|
804
804
|
);
|
|
805
805
|
}, pe = (i) => {
|
|
806
806
|
const m = [], v = ce(i), M = (y) => {
|
|
807
|
-
y.some((
|
|
808
|
-
if (G(v,
|
|
807
|
+
y.some((T) => {
|
|
808
|
+
if (G(v, T.pathValue) && (m.push(T.getPathNodes().map((B) => B._data)), gt(v, T.pathValue)), !v.size)
|
|
809
809
|
return !0;
|
|
810
810
|
});
|
|
811
811
|
};
|
|
812
812
|
return M(S.getCheckedNodes()), v.size && M(A.current), m;
|
|
813
|
-
}, H =
|
|
813
|
+
}, H = se(
|
|
814
814
|
(i) => {
|
|
815
815
|
var m;
|
|
816
816
|
i !== p && ((m = r.onVisibleChange) == null || m.call(r, i), "popupVisible" in r || D(i));
|
|
817
817
|
},
|
|
818
818
|
[r.onVisibleChange, p]
|
|
819
|
-
), Me =
|
|
819
|
+
), Me = se(
|
|
820
820
|
(i) => {
|
|
821
821
|
var y;
|
|
822
822
|
const m = pe([i])[0] || [];
|
|
823
|
-
let v, M = we(i) ? i.map((
|
|
824
|
-
return m.length && (M = m.map((
|
|
823
|
+
let v, M = we(i) ? i.map((T) => String(T)) : [];
|
|
824
|
+
return m.length && (M = m.map((T) => T.label)), W(_) ? v = _(M) : M.every((T) => Y(T)) ? v = M.join(" / ") : v = M.reduce((T, B, oe) => T.concat(oe === 0 ? [B] : [" / ", B]), []), {
|
|
825
825
|
text: v || "",
|
|
826
826
|
disabled: (y = m[m.length - 1]) == null ? void 0 : y.disabled
|
|
827
827
|
};
|
|
@@ -834,14 +834,14 @@ function St(t, e) {
|
|
|
834
834
|
if (P === i)
|
|
835
835
|
return;
|
|
836
836
|
V || S.setNodeCheckedByValue(i), Ae(S.getCheckedNodes());
|
|
837
|
-
const B = pe(i), oe = V ? i : i[0],
|
|
838
|
-
V || (w || B[0] && ((be = B[0][B[0].length - 1]) != null && be.isLeaf) || M && y === "hover") && H(!1), "value" in r ? (S.setNodeCheckedByValue(P), U()) : L(i), v == null || v(oe,
|
|
837
|
+
const B = pe(i), oe = V ? i : i[0], Re = V ? B : B[0];
|
|
838
|
+
V || (w || B[0] && ((be = B[0][B[0].length - 1]) != null && be.isLeaf) || M && y === "hover") && H(!1), "value" in r ? (S.setNodeCheckedByValue(P), U()) : L(i), v == null || v(oe, Re, {
|
|
839
839
|
dropdownVisible: p
|
|
840
840
|
});
|
|
841
841
|
}, De = (i, m, v) => {
|
|
842
842
|
if (v.stopPropagation(), i.disabled)
|
|
843
843
|
return;
|
|
844
|
-
const M = P.filter((y,
|
|
844
|
+
const M = P.filter((y, T) => T !== m);
|
|
845
845
|
S.setNodeCheckedByValue(M), Q(M);
|
|
846
846
|
}, Ce = (i) => {
|
|
847
847
|
const m = i || o.current && o.current.getWidth();
|
|
@@ -892,7 +892,7 @@ function St(t, e) {
|
|
|
892
892
|
value: P,
|
|
893
893
|
virtualListProps: r.virtualListProps,
|
|
894
894
|
defaultActiveFirstOption: r.defaultActiveFirstOption,
|
|
895
|
-
icons:
|
|
895
|
+
icons: R
|
|
896
896
|
}
|
|
897
897
|
) : /* @__PURE__ */ g(
|
|
898
898
|
bt,
|
|
@@ -920,7 +920,7 @@ function St(t, e) {
|
|
|
920
920
|
popupVisible: p,
|
|
921
921
|
value: P,
|
|
922
922
|
renderFooter: r.renderFooter,
|
|
923
|
-
icons:
|
|
923
|
+
icons: R,
|
|
924
924
|
onEsc: () => {
|
|
925
925
|
H(!1);
|
|
926
926
|
},
|
|
@@ -934,7 +934,7 @@ function St(t, e) {
|
|
|
934
934
|
)
|
|
935
935
|
}
|
|
936
936
|
);
|
|
937
|
-
},
|
|
937
|
+
}, Te = (i) => {
|
|
938
938
|
Q(i);
|
|
939
939
|
}, ke = (i) => /* @__PURE__ */ g(
|
|
940
940
|
tt,
|
|
@@ -968,7 +968,7 @@ function St(t, e) {
|
|
|
968
968
|
isMultiple: V,
|
|
969
969
|
renderText: Me,
|
|
970
970
|
onRemoveCheckedItem: De,
|
|
971
|
-
onSort:
|
|
971
|
+
onSort: Te,
|
|
972
972
|
renderView: ke,
|
|
973
973
|
onClear: (i) => {
|
|
974
974
|
var m;
|