@unicom-cloud/ui 0.8.63 → 0.8.65
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 +2 -2
- package/Alert.js +2 -2
- package/Anchor.js +1 -1
- package/AutoComplete.js +4 -4
- package/Avatar.js +2 -2
- package/BackTop.js +2 -2
- package/Badge.js +37 -31
- package/Breadcrumb.js +3 -3
- package/Button.js +82 -71
- package/Calendar.js +4 -4
- package/Card.js +2 -2
- package/Carousel.js +2 -2
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +5 -5
- package/Comment.js +2 -2
- package/ConfigProvider.js +2 -2
- package/Copy.js +3 -3
- package/DatePicker.js +92 -92
- package/Descriptions.js +2 -2
- package/Divider.js +2 -2
- package/Draggable.js +2 -2
- package/Drawer.js +1 -1
- package/Dropdown.js +27 -26
- package/Empty.js +2 -2
- package/Form.js +4 -4
- package/Grid.js +3 -3
- package/Icon.js +3 -2
- package/IconHover.js +2 -2
- package/Image.js +4 -1
- package/Input.js +11 -2
- package/InputNumber.js +3 -3
- package/InputTag.js +1 -1
- package/Layout.js +25 -21
- package/Link.js +2 -2
- package/List.js +31 -30
- package/Mentions.js +4 -4
- package/Menu.js +7 -2
- package/Message.js +4 -3
- package/Modal.js +1 -1
- package/Notice.js +2 -2
- package/Notification.js +4 -3
- package/OverflowEllipsis.js +2 -2
- package/PageHeader.js +2 -2
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +2 -2
- package/Popover.js +2 -2
- package/Progress.js +2 -2
- package/Radio.js +4 -2
- package/Rate.js +2 -2
- package/ResizeBox.js +140 -137
- package/Result.js +2 -2
- package/Select.js +4 -1
- package/SelectView.js +7 -7
- package/Skeleton.js +2 -2
- package/Slider.js +5 -5
- package/Space.js +54 -50
- package/Spin.js +2 -2
- package/Statistic.js +29 -28
- package/Steps.js +41 -39
- package/Switch.js +3 -3
- package/Table.js +8 -5
- package/Tabs.js +6 -2
- package/Tag.js +2 -2
- package/TimePicker.js +38 -37
- package/Timeline.js +4 -2
- package/Tooltip.js +2 -2
- package/Transfer.js +4 -4
- package/Tree.js +1 -1
- package/TreeSelect.js +3 -1
- package/Trigger.js +43 -42
- package/Typography.js +6 -2
- package/Upload.js +3 -3
- package/VerificationCode.js +1 -1
- package/Version.js +5 -3
- package/Watermark.js +1 -1
- package/chunk/{DDDuw0Zi.js → 1GQdnTJp.js} +2 -2
- package/chunk/BAWsPQBM.js +11 -0
- package/chunk/{CfZWOhnc.js → BS09tn7B.js} +2 -2
- package/chunk/{CZ1wrD_H.js → BUCEs557.js} +2 -2
- package/chunk/BqGtwxTi.js +777 -0
- package/chunk/{BcwdVUDs.js → Bqk6yh16.js} +2 -2
- package/chunk/{CD7dGcUa.js → BqufsN8i.js} +4 -4
- package/chunk/{Dpzgtdt-.js → BtlvlGQN.js} +2 -2
- package/chunk/{BoDdbbF_.js → CF6p9R93.js} +4 -3
- package/chunk/{BnLshM9R.js → CGZ0In1p.js} +189 -182
- package/chunk/{B5gIo-hD.js → CH1UUxsg.js} +4 -4
- package/chunk/{D3dcFbex.js → CIlGCedk.js} +3 -3
- package/chunk/{CgDayZDE.js → CPcm9Cm5.js} +2 -2
- package/chunk/{Cqyp4qni.js → CSC_V_25.js} +45 -45
- package/chunk/{JpKOcIfl.js → CWgltRVL.js} +44 -41
- package/chunk/{BLLKKgZJ.js → CsbCHnFk.js} +23 -21
- package/chunk/{Cb_oWoGj.js → CwhPMMWy.js} +14 -14
- package/chunk/{B9w_puFP.js → DG-epQqF.js} +2 -2
- package/chunk/{QFkhCtUr.js → DIx0qmCq.js} +3 -3
- package/chunk/{Bn2-vqTg.js → DK4KcodH.js} +201 -195
- package/chunk/{BEB_A9eY.js → DLvMA1OW.js} +2 -2
- package/chunk/{DbPYtS7-.js → DQDkV47j.js} +2 -2
- package/chunk/{rlfmXePI.js → DTjcKyDN.js} +135 -134
- package/chunk/{BmO1y0vr.js → DUeHQKtx.js} +12 -12
- package/chunk/{C6Zb_-OE.js → DXZEpA3t.js} +2 -2
- package/chunk/{aqSmxUbY.js → DjtWv6Wn.js} +1 -1
- package/chunk/{C5S_amaH.js → DlLL5JQo.js} +106 -101
- package/chunk/{CvlD3aiv.js → Dnycc1qJ.js} +133 -130
- package/chunk/{DbLgopUR.js → DqFhzTWC.js} +3 -3
- package/chunk/{DXZ8-ha7.js → Dv_xRzvR.js} +3 -3
- package/chunk/{Dk6hL04k.js → Ek8U5CTN.js} +222 -221
- package/chunk/{CfTcP6nF.js → ewRDIDUz.js} +4 -4
- package/chunk/{CAxIyiy6.js → tYXLFPVI.js} +6 -4
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useMergeValue.js +2 -2
- package/index.js +530 -476
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/package.json +1 -1
- package/style/variable.less +820 -0
- package/style.css +1 -1
- package/types/badge/index.d.ts +2 -2
- package/types/button/index.d.ts +3 -1
- package/types/calendar/hook/useCellClassName.d.ts +2 -1
- package/types/checkbox/IconCheck.d.ts +2 -1
- package/types/config-provider/interface.d.ts +1 -1
- package/types/date-picker/hook/useCellClassName.d.ts +2 -1
- package/types/date-picker/panel/Footer.d.ts +2 -1
- package/types/dropdown/index.d.ts +1 -0
- package/types/form/IconSymbol.d.ts +2 -1
- package/types/form/useForm.d.ts +2 -1
- package/types/icon/addFromIconFontCn.d.ts +2 -1
- package/types/icon/index.d.ts +2 -0
- package/types/image/Image.d.ts +1 -0
- package/types/image/index.d.ts +2 -1
- package/types/image/util/getFixTranslate.d.ts +2 -1
- package/types/image/util/hook/useImageStatus.d.ts +2 -2
- package/types/image/util/hook/useShowFooter.d.ts +2 -2
- package/types/index.d.ts +26 -26
- package/types/input/Input.d.ts +1 -0
- package/types/input/index.d.ts +1 -0
- package/types/input/useComposition.d.ts +2 -1
- package/types/input-number/useSelectionRange.d.ts +2 -1
- package/types/layout/index.d.ts +1 -0
- package/types/list/index.d.ts +1 -0
- package/types/menu/Indent.d.ts +2 -1
- package/types/menu/Menu.d.ts +1 -0
- package/types/menu/index.d.ts +1 -0
- package/types/message/index.d.ts +2 -0
- package/types/notification/index.d.ts +2 -0
- package/types/overflow-ellipsis/OverflowItem.d.ts +2 -2
- package/types/overflow-ellipsis/index.d.ts +2 -2
- package/types/radio/Radio.d.ts +2 -0
- package/types/radio/index.d.ts +2 -1
- package/types/resize-box/ResizeTrigger.d.ts +2 -1
- package/types/resize-box/index.d.ts +1 -0
- package/types/result/403.d.ts +2 -1
- package/types/result/404.d.ts +2 -1
- package/types/result/500.d.ts +2 -1
- package/types/select/Select.d.ts +1 -1
- package/types/select/index.d.ts +1 -0
- package/types/select/interface.d.ts +1 -1
- package/types/skeleton/Image.d.ts +2 -1
- package/types/skeleton/Text.d.ts +2 -1
- package/types/slider/hook/useLegalValue.d.ts +2 -1
- package/types/space/index.d.ts +2 -0
- package/types/space/toArray.d.ts +2 -1
- package/types/speech-synthesis/index.d.ts +2 -1
- package/types/spin/DotLoading.d.ts +2 -1
- package/types/statistic/index.d.ts +1 -0
- package/types/steps/index.d.ts +1 -0
- package/types/table/hook/useComponent.d.ts +2 -1
- package/types/table/hook/useExpand.d.ts +2 -1
- package/types/table/hook/useRowSelection.d.ts +2 -1
- package/types/table/hook/useSorter.d.ts +2 -1
- package/types/table/index.d.ts +2 -1
- package/types/table/summary/index.d.ts +3 -0
- package/types/tabs/Tab.d.ts +1 -0
- package/types/tabs/TabContent.d.ts +2 -2
- package/types/tabs/hook/useDomSize.d.ts +2 -1
- package/types/tabs/hook/useHeaderScroll.d.ts +2 -1
- package/types/tabs/index.d.ts +1 -0
- package/types/tabs/tab-header/DropdownIcon.d.ts +2 -1
- package/types/time-picker/TimeColumn.d.ts +2 -2
- package/types/time-picker/index.d.ts +5 -0
- package/types/timeline/Timeline.d.ts +1 -0
- package/types/timeline/index.d.ts +1 -0
- package/types/tree-select/Select.d.ts +5 -0
- package/types/tree-select/hook/useTreeData.d.ts +2 -1
- package/types/tree-select/index.d.ts +2 -1
- package/types/typography/Operations.d.ts +2 -1
- package/types/typography/index.d.ts +1 -0
- package/types/upload/Upload.d.ts +2 -1
- package/types/upload/index.d.ts +2 -3
- package/types/utils/fillNBSP.d.ts +2 -1
- package/types/utils/getHighlightText.d.ts +2 -1
- package/types/utils/getHotkeyHandler.d.ts +2 -1
- package/types/utils/getStringLength.d.ts +2 -1
- package/types/utils/include.d.ts +2 -1
- package/types/utils/mergeProps.d.ts +2 -1
- package/types/utils/mergedToString.d.ts +2 -1
- package/types/utils/omit.d.ts +2 -1
- package/types/utils/pick.d.ts +2 -1
- package/types/utils/throttleByRaf.d.ts +2 -1
- package/types/utils/throttleByRafV2.d.ts +2 -1
- package/types/utils/warning.d.ts +2 -1
- package/types/version/index.d.ts +2 -0
- package/utils/className.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/copy.js +1 -1
- package/utils/index.js +41 -41
- package/utils/is.js +37 -37
- package/utils/reactDOM.js +3 -3
- package/utils/scrollIntoView.js +1 -1
- package/chunk/BzPkh4Zv.js +0 -11
- package/chunk/Co3idurS.js +0 -774
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { H as
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as Se, jsx as E } from "react/jsx-runtime";
|
|
2
|
+
import { H as ve, z as Ve, G as Pe } from "./CSC_V_25.js";
|
|
3
|
+
import Ke from "lodash/debounce";
|
|
4
4
|
import B from "lodash/isArray";
|
|
5
5
|
import W from "lodash/isFunction";
|
|
6
|
-
import
|
|
7
|
-
import { forwardRef as ue, useRef as
|
|
8
|
-
import { d as he } from "./
|
|
9
|
-
import { useId as
|
|
10
|
-
import { useIsFirstRender as
|
|
11
|
-
import { useMergeProps as
|
|
12
|
-
import { useMergeValue as
|
|
13
|
-
import
|
|
14
|
-
import { T as
|
|
15
|
-
import
|
|
16
|
-
import { y as
|
|
6
|
+
import Ie from "lodash/isNil";
|
|
7
|
+
import { forwardRef as ue, useRef as w, useCallback as K, useMemo as Y, useImperativeHandle as de, useContext as fe, useState as ee, useEffect as ce } from "react";
|
|
8
|
+
import { d as he } from "./DlLL5JQo.js";
|
|
9
|
+
import { useId as _e } from "../hooks/useId.js";
|
|
10
|
+
import { useIsFirstRender as Te } from "../hooks/useIsFirstRender.js";
|
|
11
|
+
import { useMergeProps as Oe } from "../hooks/useMergeProps.js";
|
|
12
|
+
import { useMergeValue as ie } from "../hooks/useMergeValue.js";
|
|
13
|
+
import xe from "../SelectView.js";
|
|
14
|
+
import { T as O, g as Le, a as Re, b as we } from "./ewRDIDUz.js";
|
|
15
|
+
import De from "../Trigger.js";
|
|
16
|
+
import { y as Z } from "./BAWsPQBM.js";
|
|
17
17
|
import "../utils/is.js";
|
|
18
|
-
import
|
|
18
|
+
import He from "lodash/isString";
|
|
19
19
|
import H from "lodash/get";
|
|
20
|
-
import { useForceUpdate as
|
|
21
|
-
import { useUpdateEffect as
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import { usePrevious as
|
|
26
|
-
|
|
20
|
+
import { useForceUpdate as Ne } from "../hooks/useForceUpdate.js";
|
|
21
|
+
import { useUpdateEffect as te } from "../hooks/useUpdateEffect.js";
|
|
22
|
+
import oe from "lodash/isEqualWith";
|
|
23
|
+
import me from "lodash/isPlainObject";
|
|
24
|
+
import Ee from "lodash/isUndefined";
|
|
25
|
+
import { usePrevious as Fe } from "../hooks/usePrevious.js";
|
|
26
|
+
import se from "lodash/isPlainObject.js";
|
|
27
|
+
function We(t, a) {
|
|
27
28
|
const {
|
|
28
29
|
value: n,
|
|
29
30
|
multiple: f,
|
|
@@ -34,7 +35,7 @@ function Fe(t, a) {
|
|
|
34
35
|
treeProps: p,
|
|
35
36
|
prefixCls: l,
|
|
36
37
|
treeCheckable: V
|
|
37
|
-
} = t, C = p && p.renderTitle, m =
|
|
38
|
+
} = t, C = p && p.renderTitle, m = w(), d = K(
|
|
38
39
|
(b, { checkedNodes: o, checked: s, node: g }) => {
|
|
39
40
|
const P = b.map((y) => {
|
|
40
41
|
const T = o.find((I) => I && I.props._key === y);
|
|
@@ -76,7 +77,7 @@ function Fe(t, a) {
|
|
|
76
77
|
var I, N;
|
|
77
78
|
const { checked: g, checkable: P, disabled: y, disableCheckbox: T } = o.props;
|
|
78
79
|
m.current && !T && !y && P !== !1 && ((N = (I = m.current) == null ? void 0 : I.handleCheck) == null || N.call(I, !g, o.props._key, s));
|
|
79
|
-
}, []),
|
|
80
|
+
}, []), x = K(
|
|
80
81
|
(b) => {
|
|
81
82
|
if (W(h)) {
|
|
82
83
|
const o = b.props.dataRef;
|
|
@@ -85,17 +86,17 @@ function Fe(t, a) {
|
|
|
85
86
|
return [];
|
|
86
87
|
},
|
|
87
88
|
[h]
|
|
88
|
-
),
|
|
89
|
+
), q = K(
|
|
89
90
|
(b) => {
|
|
90
91
|
if (C)
|
|
91
92
|
return C(b);
|
|
92
93
|
const o = t.inputValue, { title: s } = b;
|
|
93
|
-
if (o &&
|
|
94
|
+
if (o && He(s)) {
|
|
94
95
|
const g = s.toLowerCase().indexOf(o.toLowerCase());
|
|
95
96
|
if (g === -1)
|
|
96
97
|
return s;
|
|
97
98
|
const P = s.substring(0, g + 1), y = s.substring(g + o.length);
|
|
98
|
-
return /* @__PURE__ */
|
|
99
|
+
return /* @__PURE__ */ Se("span", { children: [
|
|
99
100
|
P,
|
|
100
101
|
/* @__PURE__ */ E("span", { className: `${l}-highlight`, children: s.substring(g, o.length + 1) }),
|
|
101
102
|
y
|
|
@@ -104,17 +105,17 @@ function Fe(t, a) {
|
|
|
104
105
|
return s;
|
|
105
106
|
},
|
|
106
107
|
[l, t.inputValue, C]
|
|
107
|
-
), S =
|
|
108
|
+
), S = Y(() => t.treeCheckable ? {
|
|
108
109
|
onCheck: d,
|
|
109
110
|
checkedKeys: n.map((b) => b.value)
|
|
110
|
-
} : {}, [d, n, t.treeCheckable]),
|
|
111
|
+
} : {}, [d, n, t.treeCheckable]), G = Y(() => t.treeCheckable ? [] : n.map((b) => b.value), [t.treeCheckable, n]), F = K(
|
|
111
112
|
(b, o) => {
|
|
112
113
|
t.treeCheckable ? D(b, o) : _(b, o);
|
|
113
114
|
},
|
|
114
115
|
[t.treeCheckable, D, _]
|
|
115
116
|
);
|
|
116
117
|
return de(a, () => m.current, []), /* @__PURE__ */ E(
|
|
117
|
-
|
|
118
|
+
O,
|
|
118
119
|
{
|
|
119
120
|
ref: m,
|
|
120
121
|
size: t.size,
|
|
@@ -123,7 +124,7 @@ function Fe(t, a) {
|
|
|
123
124
|
...p,
|
|
124
125
|
checkable: V,
|
|
125
126
|
multiple: f,
|
|
126
|
-
loadMore: t.loadMore ?
|
|
127
|
+
loadMore: t.loadMore ? x : void 0,
|
|
127
128
|
checkedStrategy: i,
|
|
128
129
|
checkStrictly: e,
|
|
129
130
|
onMouseDown: (b) => {
|
|
@@ -132,13 +133,13 @@ function Fe(t, a) {
|
|
|
132
133
|
...S,
|
|
133
134
|
treeData: u,
|
|
134
135
|
fieldNames: t.fieldNames,
|
|
135
|
-
renderTitle:
|
|
136
|
+
renderTitle: q,
|
|
136
137
|
onSelect: F,
|
|
137
|
-
selectedKeys:
|
|
138
|
+
selectedKeys: G
|
|
138
139
|
}
|
|
139
140
|
);
|
|
140
141
|
}
|
|
141
|
-
const
|
|
142
|
+
const Ae = ue(We), be = {
|
|
142
143
|
key: "key",
|
|
143
144
|
title: "title",
|
|
144
145
|
children: "children",
|
|
@@ -169,7 +170,7 @@ const We = ue(Fe), me = {
|
|
|
169
170
|
_level: u._level || 0,
|
|
170
171
|
_index: h++
|
|
171
172
|
};
|
|
172
|
-
return p === V + 1 && (d.className =
|
|
173
|
+
return p === V + 1 && (d.className = Z(
|
|
173
174
|
`${a}-node-is-tail`,
|
|
174
175
|
d.className
|
|
175
176
|
)), f[m] = d, C && C.length && (f[m].children = i(C, {
|
|
@@ -180,21 +181,21 @@ const We = ue(Fe), me = {
|
|
|
180
181
|
});
|
|
181
182
|
};
|
|
182
183
|
return i(t || [], {}), f;
|
|
183
|
-
},
|
|
184
|
+
}, Me = (t, a) => {
|
|
184
185
|
const { getPrefixCls: n } = fe(he), f = {
|
|
185
|
-
...
|
|
186
|
+
...be,
|
|
186
187
|
...a
|
|
187
|
-
}, h =
|
|
188
|
+
}, h = Ne(), i = n("tree"), e = w(
|
|
188
189
|
ae(t, i, f)
|
|
189
190
|
);
|
|
190
|
-
return
|
|
191
|
+
return te(() => {
|
|
191
192
|
e.current = ae(t, i, f), h();
|
|
192
193
|
}, [t]), e.current;
|
|
193
194
|
}, j = (t) => {
|
|
194
195
|
let a = t;
|
|
195
|
-
return B(t) || (a = t == null ? [] : [t]), a.map((n) =>
|
|
196
|
+
return B(t) || (a = t == null ? [] : [t]), a.map((n) => me(n) ? n.value : n);
|
|
196
197
|
}, z = (t, a, n) => t == null ? [] : (B(t) ? t : [t]).map((h) => {
|
|
197
|
-
let i =
|
|
198
|
+
let i = me(h) ? { ...h } : { value: h, label: void 0 };
|
|
198
199
|
const e = a[i.value];
|
|
199
200
|
if (e)
|
|
200
201
|
i.label = i.label || e.title, i.disabled = e.disabled;
|
|
@@ -205,27 +206,27 @@ const We = ue(Fe), me = {
|
|
|
205
206
|
...u
|
|
206
207
|
};
|
|
207
208
|
}
|
|
208
|
-
return
|
|
209
|
-
}),
|
|
209
|
+
return Ee(i.label) && (i.label = i.value), i;
|
|
210
|
+
}), $e = (t, a, n, f) => {
|
|
210
211
|
if (!f.treeCheckStrictly) {
|
|
211
|
-
const { checkedKeys: h, indeterminateKeys: i } =
|
|
212
|
+
const { checkedKeys: h, indeterminateKeys: i } = Le(t, a);
|
|
212
213
|
let e = h;
|
|
213
|
-
return n.current = i, f.treeCheckedStrategy ===
|
|
214
|
+
return n.current = i, f.treeCheckedStrategy === O.SHOW_PARENT ? e = e.filter((u) => {
|
|
214
215
|
const p = a[u];
|
|
215
216
|
if (!p || e.indexOf(p.parentKey) === -1)
|
|
216
217
|
return !0;
|
|
217
|
-
}) : f.treeCheckedStrategy ===
|
|
218
|
+
}) : f.treeCheckedStrategy === O.SHOW_CHILD && (e = e.filter((u) => {
|
|
218
219
|
const p = a[u];
|
|
219
220
|
if (!p || !p.children || !p.children.length)
|
|
220
221
|
return !0;
|
|
221
222
|
})), e;
|
|
222
223
|
}
|
|
223
224
|
return n.current = [], t;
|
|
224
|
-
},
|
|
225
|
-
const f =
|
|
225
|
+
}, Ue = (t, a, n) => {
|
|
226
|
+
const f = w([]), h = () => {
|
|
226
227
|
const l = t.value || t.defaultValue || [];
|
|
227
228
|
if (t.treeCheckable) {
|
|
228
|
-
const V =
|
|
229
|
+
const V = $e(
|
|
229
230
|
j(l),
|
|
230
231
|
a,
|
|
231
232
|
n,
|
|
@@ -242,15 +243,15 @@ const We = ue(Fe), me = {
|
|
|
242
243
|
);
|
|
243
244
|
}
|
|
244
245
|
return z(l, a);
|
|
245
|
-
}, [i, e] =
|
|
246
|
+
}, [i, e] = ee(h), u = (l) => {
|
|
246
247
|
f.current = l, e(l);
|
|
247
248
|
};
|
|
248
|
-
|
|
249
|
+
te(() => {
|
|
249
250
|
const l = h();
|
|
250
|
-
"value" in t && (t.labelInValue ?
|
|
251
|
+
"value" in t && (t.labelInValue ? oe(
|
|
251
252
|
j(i),
|
|
252
253
|
j(l)
|
|
253
|
-
) || u(l) :
|
|
254
|
+
) || u(l) : oe(i, l) || u(l));
|
|
254
255
|
}, [
|
|
255
256
|
t.treeCheckedStrategy,
|
|
256
257
|
t.treeCheckStrictly,
|
|
@@ -275,114 +276,114 @@ const We = ue(Fe), me = {
|
|
|
275
276
|
);
|
|
276
277
|
return [i, p];
|
|
277
278
|
};
|
|
278
|
-
function
|
|
279
|
-
const a =
|
|
280
|
-
return
|
|
279
|
+
function je(t) {
|
|
280
|
+
const a = Fe(t) || {}, n = () => t.treeData || Re(t.children), [f, h] = ee(n());
|
|
281
|
+
return te(() => {
|
|
281
282
|
(t.treeData !== a.treeData || t.children !== a.children) && h(n());
|
|
282
283
|
}, [t]), [f];
|
|
283
284
|
}
|
|
284
|
-
const
|
|
285
|
+
const ze = {
|
|
285
286
|
bordered: !0,
|
|
286
|
-
treeCheckedStrategy:
|
|
287
|
-
fieldNames:
|
|
288
|
-
},
|
|
289
|
-
const { getPrefixCls: n, renderEmpty: f, componentConfig: h, rtl: i } = fe(he), e =
|
|
287
|
+
treeCheckedStrategy: O.SHOW_CHILD,
|
|
288
|
+
fieldNames: be
|
|
289
|
+
}, Be = { bottom: 4 }, qe = (t, a) => {
|
|
290
|
+
const { getPrefixCls: n, renderEmpty: f, componentConfig: h, rtl: i } = fe(he), e = Oe(
|
|
290
291
|
t,
|
|
291
|
-
|
|
292
|
+
ze,
|
|
292
293
|
h == null ? void 0 : h.TreeSelect
|
|
293
|
-
), u =
|
|
294
|
+
), u = Te(), p = w(), l = w(null), V = w(null), C = w([]), [m] = je(e), d = Me(m, e.fieldNames), [_, D] = ee(), [x, q] = ie(!1, {
|
|
294
295
|
value: e.popupVisible
|
|
295
|
-
}), [S,
|
|
296
|
+
}), [S, G] = ie(
|
|
296
297
|
void 0,
|
|
297
298
|
// Compatible with previous behavior 'undefined as default'
|
|
298
299
|
{
|
|
299
300
|
value: "inputValue" in e ? e.inputValue || "" : void 0
|
|
300
301
|
}
|
|
301
|
-
), F =
|
|
302
|
+
), F = w(S), b = w(null), { onInputValueChange: o } = e, [s, g] = Ue(
|
|
302
303
|
e,
|
|
303
304
|
d,
|
|
304
305
|
C
|
|
305
|
-
), P = e.multiple || e.treeCheckable, y = n("tree-select"), T = S && !W(e.onSearch), I =
|
|
306
|
+
), P = e.multiple || e.treeCheckable, y = n("tree-select"), T = S && !W(e.onSearch), I = _e(`${y}-popup-`), N = (r) => {
|
|
306
307
|
var c;
|
|
307
|
-
r !==
|
|
308
|
-
},
|
|
309
|
-
(r !== F.current || c !== b.current) && (
|
|
310
|
-
},
|
|
311
|
-
(r) =>
|
|
308
|
+
r !== x && (q(r), (c = e.onVisibleChange) == null || c.call(e, r));
|
|
309
|
+
}, J = (r, c) => {
|
|
310
|
+
(r !== F.current || c !== b.current) && (G(r), F.current = r, b.current = c, o == null || o(r, c));
|
|
311
|
+
}, ge = K(
|
|
312
|
+
(r) => Ke(async (k) => {
|
|
312
313
|
if (W(e.onSearch)) {
|
|
313
314
|
await e.onSearch(k);
|
|
314
315
|
return;
|
|
315
316
|
}
|
|
316
317
|
if (!k) return m;
|
|
317
318
|
const v = /* @__PURE__ */ new Set();
|
|
318
|
-
Object.keys(d).forEach((
|
|
319
|
-
const
|
|
319
|
+
Object.keys(d).forEach((L) => {
|
|
320
|
+
const R = d[L];
|
|
320
321
|
let $ = !1;
|
|
321
322
|
if (W(e.filterTreeNode))
|
|
322
|
-
e.filterTreeNode(k, /* @__PURE__ */ E(
|
|
323
|
+
e.filterTreeNode(k, /* @__PURE__ */ E(O.Node, { ...R })) && ($ = !0);
|
|
323
324
|
else {
|
|
324
|
-
const U =
|
|
325
|
+
const U = R.value || R._key;
|
|
325
326
|
U && U.indexOf(k) > -1 && ($ = !0);
|
|
326
327
|
}
|
|
327
|
-
$ && v.add(
|
|
328
|
+
$ && v.add(R.key);
|
|
328
329
|
}), D(v);
|
|
329
330
|
}, 100)(r),
|
|
330
331
|
[e.onSearch, m, d, e.filterTreeNode]
|
|
331
|
-
),
|
|
332
|
+
), re = K(() => {
|
|
332
333
|
let r = !0;
|
|
333
|
-
|
|
334
|
+
se(e.showSearch) && (r = e.showSearch.retainInputValueWhileSelect !== !1), e.multiple && !r && S !== void 0 && J("", "optionChecked");
|
|
334
335
|
}, [S, e.multiple, JSON.stringify(e.showSearch)]), M = K(
|
|
335
336
|
(r, c) => {
|
|
336
|
-
g(r, c),
|
|
337
|
+
g(r, c), re(), P || N(!1);
|
|
337
338
|
},
|
|
338
|
-
[g,
|
|
339
|
-
),
|
|
339
|
+
[g, re, x]
|
|
340
|
+
), pe = (r, c, k) => {
|
|
340
341
|
if (k.stopPropagation(), r.disabled)
|
|
341
342
|
return;
|
|
342
|
-
const v =
|
|
343
|
+
const v = se(r.value) ? r.value.value : r.value;
|
|
343
344
|
if (!e.treeCheckable || e.treeCheckStrictly || !d[v]) {
|
|
344
|
-
const
|
|
345
|
-
M(
|
|
345
|
+
const R = s.filter(($, U) => U !== c);
|
|
346
|
+
M(R, {
|
|
346
347
|
trigger: d[v] || r,
|
|
347
348
|
checked: !1,
|
|
348
349
|
selected: !1
|
|
349
350
|
});
|
|
350
351
|
return;
|
|
351
352
|
}
|
|
352
|
-
const
|
|
353
|
+
const L = we(
|
|
353
354
|
v,
|
|
354
355
|
!1,
|
|
355
356
|
j(s),
|
|
356
357
|
d,
|
|
357
358
|
C.current
|
|
358
359
|
);
|
|
359
|
-
C.current =
|
|
360
|
+
C.current = L.indeterminateKeys, M(z(L.checkedKeys, d, s), {
|
|
360
361
|
trigger: d[v],
|
|
361
362
|
checked: !1,
|
|
362
363
|
selected: !1
|
|
363
364
|
});
|
|
364
365
|
};
|
|
365
|
-
function
|
|
366
|
-
return
|
|
366
|
+
function Q(r) {
|
|
367
|
+
return ve(r) || Ve(r) || Pe(r);
|
|
367
368
|
}
|
|
368
|
-
|
|
369
|
-
S !== void 0 &&
|
|
369
|
+
ce(() => {
|
|
370
|
+
S !== void 0 && ge(S), S !== F.current && (F.current = S);
|
|
370
371
|
}, [S]);
|
|
371
|
-
const
|
|
372
|
+
const X = Y(() => {
|
|
372
373
|
let r = [];
|
|
373
374
|
if (S)
|
|
374
375
|
for (const c in d) {
|
|
375
376
|
const v = [...d[c].pathParentKeys, c];
|
|
376
|
-
v.some((
|
|
377
|
+
v.some((L) => _ && _.has(L)) && (r = r.concat(v));
|
|
377
378
|
}
|
|
378
379
|
return Array.from(new Set(r));
|
|
379
380
|
}, [S, d, _]);
|
|
380
|
-
|
|
381
|
-
|
|
381
|
+
ce(() => {
|
|
382
|
+
x ? setTimeout(() => {
|
|
382
383
|
const r = s[0];
|
|
383
384
|
l.current && r && l.current.scrollIntoView(r.value);
|
|
384
|
-
}) : u || S &&
|
|
385
|
-
}, [
|
|
385
|
+
}) : u || S && J("", "optionListHide");
|
|
386
|
+
}, [x]), de(a, () => ({
|
|
386
387
|
focus() {
|
|
387
388
|
V.current && V.current.focus();
|
|
388
389
|
},
|
|
@@ -394,10 +395,10 @@ const je = {
|
|
|
394
395
|
return (c = (r = V.current) == null ? void 0 : r.getRootDOMNode) == null ? void 0 : c.call(r);
|
|
395
396
|
}
|
|
396
397
|
}));
|
|
397
|
-
const
|
|
398
|
-
(r) => T ?
|
|
399
|
-
[T,
|
|
400
|
-
),
|
|
398
|
+
const Ce = K(
|
|
399
|
+
(r) => T ? X.indexOf(r._key) > -1 : !0,
|
|
400
|
+
[T, X]
|
|
401
|
+
), ke = K(
|
|
401
402
|
(r) => {
|
|
402
403
|
const { disabled: c, value: k } = r || {};
|
|
403
404
|
let v = r == null ? void 0 : r.label;
|
|
@@ -407,10 +408,10 @@ const je = {
|
|
|
407
408
|
)), { text: v || k || "", disabled: c };
|
|
408
409
|
},
|
|
409
410
|
[e.renderFormat, e.labelInValue, d]
|
|
410
|
-
),
|
|
411
|
+
), ye = (r) => {
|
|
411
412
|
g(r, {});
|
|
412
|
-
},
|
|
413
|
-
|
|
413
|
+
}, ne = (r) => /* @__PURE__ */ E(
|
|
414
|
+
De,
|
|
414
415
|
{
|
|
415
416
|
autoAlignPopupWidth: !1,
|
|
416
417
|
autoAlignPopupMinWidth: !0,
|
|
@@ -419,23 +420,23 @@ const je = {
|
|
|
419
420
|
trigger: "click",
|
|
420
421
|
position: "bl",
|
|
421
422
|
getPopupContainer: e.getPopupContainer,
|
|
422
|
-
popupAlign:
|
|
423
|
+
popupAlign: Be,
|
|
423
424
|
unmountOnExit: e.unmountOnExit,
|
|
424
425
|
...e.triggerProps,
|
|
425
|
-
className:
|
|
426
|
+
className: Z(
|
|
426
427
|
`${y}-trigger`,
|
|
427
428
|
e.triggerProps && e.triggerProps.className
|
|
428
429
|
),
|
|
429
430
|
popup: () => {
|
|
430
|
-
var v,
|
|
431
|
-
const c = e.dropdownRender, k = T && X
|
|
432
|
-
|
|
431
|
+
var v, L, R;
|
|
432
|
+
const c = e.dropdownRender, k = T && Q(X) || Q(m) ? e.notFoundContent || (f == null ? void 0 : f("TreeSelect")) : /* @__PURE__ */ E(
|
|
433
|
+
Ae,
|
|
433
434
|
{
|
|
434
435
|
prefixCls: y,
|
|
435
436
|
ref: l,
|
|
436
437
|
...e,
|
|
437
438
|
inputValue: S,
|
|
438
|
-
filterNode:
|
|
439
|
+
filterNode: Ce,
|
|
439
440
|
value: s,
|
|
440
441
|
onChange: M,
|
|
441
442
|
multiple: P,
|
|
@@ -446,11 +447,11 @@ const je = {
|
|
|
446
447
|
"div",
|
|
447
448
|
{
|
|
448
449
|
id: I,
|
|
449
|
-
className:
|
|
450
|
+
className: Z(`${y}-popup`, {
|
|
450
451
|
[`${y}-rtl-popup`]: i
|
|
451
452
|
}),
|
|
452
453
|
style: {
|
|
453
|
-
maxHeight: (v = e.treeProps) != null && v.height || (
|
|
454
|
+
maxHeight: (v = e.treeProps) != null && v.height || (R = (L = e.treeProps) == null ? void 0 : L.virtualListProps) != null && R.height ? "unset" : "",
|
|
454
455
|
...e.dropdownMenuStyle
|
|
455
456
|
},
|
|
456
457
|
children: W(c) ? c(k) : k
|
|
@@ -461,35 +462,35 @@ const je = {
|
|
|
461
462
|
onVisibleChange: (c) => {
|
|
462
463
|
N(c);
|
|
463
464
|
},
|
|
464
|
-
popupVisible:
|
|
465
|
+
popupVisible: x,
|
|
465
466
|
children: r
|
|
466
467
|
}
|
|
467
|
-
),
|
|
468
|
+
), le = typeof e.triggerElement == "function" ? (() => {
|
|
468
469
|
var c;
|
|
469
470
|
let r;
|
|
470
471
|
return P ? r = s.map(
|
|
471
472
|
(k) => e.labelInValue ? { label: k.label, value: k.value } : k.value
|
|
472
473
|
) : r = e.labelInValue ? s[0] : (c = s[0]) == null ? void 0 : c.value, e.triggerElement({ value: r });
|
|
473
474
|
})() : e.triggerElement;
|
|
474
|
-
return
|
|
475
|
-
|
|
475
|
+
return Ie(le) ? /* @__PURE__ */ E(
|
|
476
|
+
xe,
|
|
476
477
|
{
|
|
477
478
|
ref: V,
|
|
478
479
|
rtl: i,
|
|
479
480
|
ariaControls: I,
|
|
480
481
|
...e,
|
|
481
|
-
popupVisible:
|
|
482
|
+
popupVisible: x,
|
|
482
483
|
value: !P && B(s) ? s[0] : s,
|
|
483
484
|
inputValue: S,
|
|
484
|
-
isEmptyValue:
|
|
485
|
+
isEmptyValue: Q(s),
|
|
485
486
|
prefixCls: y,
|
|
486
487
|
isMultiple: P,
|
|
487
|
-
renderText:
|
|
488
|
-
onSort:
|
|
489
|
-
onRemoveCheckedItem:
|
|
488
|
+
renderText: ke,
|
|
489
|
+
onSort: ye,
|
|
490
|
+
onRemoveCheckedItem: pe,
|
|
490
491
|
onClear: (r) => {
|
|
491
492
|
var c;
|
|
492
|
-
r.stopPropagation(), M([], {}), (c = e.onClear) == null || c.call(e, !!
|
|
493
|
+
r.stopPropagation(), M([], {}), (c = e.onClear) == null || c.call(e, !!x);
|
|
493
494
|
},
|
|
494
495
|
onKeyDown: (r) => {
|
|
495
496
|
var c;
|
|
@@ -499,17 +500,19 @@ const je = {
|
|
|
499
500
|
r && r.stopPropagation();
|
|
500
501
|
},
|
|
501
502
|
onChangeInputValue: (r) => {
|
|
502
|
-
|
|
503
|
+
J(r, "manual");
|
|
503
504
|
},
|
|
504
|
-
renderView:
|
|
505
|
+
renderView: ne
|
|
505
506
|
}
|
|
506
|
-
) : le
|
|
507
|
-
},
|
|
507
|
+
) : ne(le);
|
|
508
|
+
}, Ge = ue(qe), A = Ge;
|
|
508
509
|
A.displayName = "TreeSelect";
|
|
509
|
-
A.Node =
|
|
510
|
-
A.SHOW_ALL =
|
|
511
|
-
A.SHOW_PARENT =
|
|
512
|
-
A.SHOW_CHILD =
|
|
510
|
+
A.Node = O.Node;
|
|
511
|
+
A.SHOW_ALL = O.SHOW_ALL;
|
|
512
|
+
A.SHOW_PARENT = O.SHOW_PARENT;
|
|
513
|
+
A.SHOW_CHILD = O.SHOW_CHILD;
|
|
514
|
+
const St = O.Node;
|
|
513
515
|
export {
|
|
514
|
-
A as T
|
|
516
|
+
A as T,
|
|
517
|
+
St as a
|
|
515
518
|
};
|
|
@@ -19,7 +19,7 @@ import Dt from "@unicom-cloud/icons/IconUiRotateLeft";
|
|
|
19
19
|
import Ot from "@unicom-cloud/icons/IconUiRotateRight";
|
|
20
20
|
import Vt from "@unicom-cloud/icons/IconUiZoomIn";
|
|
21
21
|
import Yt from "@unicom-cloud/icons/IconUiZoomOut";
|
|
22
|
-
import { d as qe, a as Ft } from "./
|
|
22
|
+
import { d as qe, a as Ft } from "./DlLL5JQo.js";
|
|
23
23
|
import "lodash/isEqualWith";
|
|
24
24
|
import "../utils/is.js";
|
|
25
25
|
import { A as Xt, c as Bt, a as Gt, b as Wt, d as Zt } from "./C2lIz2F9.js";
|
|
@@ -33,8 +33,8 @@ import { findDOMNode as qt } from "../utils/reactDOM.js";
|
|
|
33
33
|
import { useUpdateEffect as Kt } from "../hooks/useUpdateEffect.js";
|
|
34
34
|
import Jt from "../Portal.js";
|
|
35
35
|
import { P as Ge } from "./CLBavO5c.js";
|
|
36
|
-
import { y as Y } from "./
|
|
37
|
-
import { s as Qt } from "./
|
|
36
|
+
import { y as Y } from "./BAWsPQBM.js";
|
|
37
|
+
import { s as Qt } from "./CwhPMMWy.js";
|
|
38
38
|
import en from "@unicom-cloud/icons/IconUiMore";
|
|
39
39
|
import tn from "../Tooltip.js";
|
|
40
40
|
import nn from "../Trigger.js";
|
|
@@ -3,13 +3,13 @@ import O from "@unicom-cloud/icons/IconUiClose";
|
|
|
3
3
|
import tt from "lodash/isFunction";
|
|
4
4
|
import ot, { useRef as N, useState as A, useImperativeHandle as et, useEffect as T } from "react";
|
|
5
5
|
import { useKeyboardEvent as nt } from "../hooks/useKeyboardEvent.js";
|
|
6
|
-
import { I as rt } from "./
|
|
7
|
-
import { y as V } from "./
|
|
6
|
+
import { I as rt } from "./DlLL5JQo.js";
|
|
7
|
+
import { y as V } from "./BAWsPQBM.js";
|
|
8
8
|
import it from "../utils/fillNBSP.js";
|
|
9
9
|
import "../utils/is.js";
|
|
10
10
|
import at from "../utils/omit.js";
|
|
11
11
|
import { E as ut } from "./C2lIz2F9.js";
|
|
12
|
-
import b from "lodash/isPlainObject";
|
|
12
|
+
import b from "lodash/isPlainObject.js";
|
|
13
13
|
function ct({
|
|
14
14
|
value: r,
|
|
15
15
|
maxLength: g,
|