@unicom-cloud/ui 0.8.75 → 0.8.77
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 +1 -1
- package/Alert.js +1 -1
- package/AutoComplete.js +3 -5
- package/BackTop.js +1 -1
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +3 -3
- package/Card.js +1 -1
- package/Carousel.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +6 -2
- package/Collapse.js +1 -1
- package/ColorPicker.js +3 -4
- package/Comment.js +1 -1
- package/ConfigProvider.js +2 -3
- package/Copy.js +1 -1
- package/DatePicker.js +1 -1
- package/Descriptions.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/List.js +5 -6
- package/Mentions.js +3 -4
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +1 -1
- package/Notification.js +1 -1
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Pagination.js +2 -2
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/Radio.js +5 -4
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/Select.js +5 -6
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +1 -1
- package/SpeechSynthesis.js +4 -3
- package/Spin.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +15 -16
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +2 -2
- package/Transfer.js +3 -4
- package/Tree.js +2 -3
- package/TreeSelect.js +3 -3
- package/Trigger.js +1 -1
- package/Typography.js +3 -3
- package/affix/index.js +86 -82
- package/alert/index.js +1 -1
- package/anchor/Anchor.js +1 -1
- package/anchor/Link.js +1 -1
- package/auto-complete/index.js +13 -147
- package/avatar/Avatar.js +1 -1
- package/avatar/Group.js +1 -1
- package/back-top/index.js +1 -1
- package/badge/index.js +1 -1
- package/breadcrumb/index.js +2 -2
- package/button/Group.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +12 -318
- package/card/Grid.js +1 -1
- package/card/Meta.js +1 -1
- package/card/index.js +1 -1
- package/carousel/Arrow.js +1 -1
- package/carousel/Indicator.js +1 -1
- package/carousel/index.js +1 -1
- package/cascader/Cascader.js +4 -4
- package/cascader/index.js +1 -1
- package/cascader/util.js +8 -8
- package/checkbox/Checkbox.js +7 -4
- package/checkbox/Group.js +5 -5
- package/checkbox/GroupBlock.js +8 -0
- package/checkbox/index.js +7 -2
- package/chunk/{BbqvFW5R.js → 9TSjT7x_.js} +112 -112
- package/chunk/ATwvJ8j2.js +6 -0
- package/chunk/{Dv6USvVF.js → BC5fEyWK.js} +2 -1
- package/chunk/{WVoGhvMI.js → BPQXH_5i.js} +32 -31
- package/chunk/{BPD5iNdA.js → CB4jGw4K.js} +22 -18
- package/chunk/{B8hkFIar.js → CBgu99gQ.js} +1 -1
- package/chunk/CBzE-PUr.js +23 -0
- package/chunk/CNcLypMY.js +723 -0
- package/chunk/{CPlPBkN7.js → C_4I3haT.js} +1 -1
- package/chunk/{0mWCmQHr.js → CjqvxJml.js} +2 -2
- package/chunk/Cwm8LL5p.js +7818 -0
- package/chunk/D0ZWT7db.js +5 -0
- package/chunk/{CWlklVfi.js → tpmioyz1.js} +1 -1
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +2 -2
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +1 -1
- package/color-picker/InputAlpha.js +1 -1
- package/color-picker/InputHex.js +2 -2
- package/color-picker/InputRgb.js +2 -2
- package/color-picker/Palette.js +2 -2
- package/color-picker/Panel.js +15 -266
- package/color-picker/colors.js +4 -4
- package/color-picker/index.js +13 -268
- package/color-picker/utils.js +1 -1
- package/comment/index.js +1 -1
- package/config-provider/ConfigProvider.js +4 -6
- package/config-provider/context.js +3 -2
- package/config-provider/index.js +4 -5
- package/copy/index.js +1 -1
- package/date-picker/Picker.js +1 -1
- package/date-picker/PickerRange.js +2 -2
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +1 -1
- package/divider/index.js +1 -1
- package/draggable/index.js +1 -1
- package/drawer/Drawer.js +30 -21
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +1 -1
- package/empty/index.js +1 -1
- package/form/Form.js +10 -10
- package/form/FormItem.js +1 -1
- package/form/context.js +1 -1
- package/grid/Col.js +1 -1
- package/grid/Row.js +1 -1
- package/grid/grid-item.js +1 -1
- package/grid/grid.js +1 -1
- package/hooks/index.js +1 -1
- package/hooks/useWindowSize.js +1 -1
- package/icon/index.js +1 -1
- package/icon-hover/index.js +1 -1
- package/image/Image.js +2 -2
- package/image/ImagePreview.js +2 -2
- package/image/ImagePreviewArrow.js +1 -1
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +453 -463
- package/input/Group.js +1 -1
- package/input/Input.js +1 -1
- package/input/InputElement.js +1 -1
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +1 -1
- package/input-number/index.js +1 -1
- package/input-tag/InputTag.js +1 -1
- package/layout/Content.js +1 -1
- package/layout/Footer.js +1 -1
- package/layout/Header.js +1 -1
- package/layout/Sider.js +1 -1
- package/layout/index.js +1 -1
- package/link/index.js +1 -1
- package/list/Item.js +1 -1
- package/list/Meta.js +1 -1
- package/list/index.js +17 -267
- package/mentions/index.js +11 -144
- package/menu/Menu.js +2 -2
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +1 -1
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +1 -1
- package/notice/index.js +1 -1
- package/notification/index.js +1 -1
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +1 -1
- package/overflow-ellipsis/index.js +1 -1
- package/package.json +1 -1
- package/page-header/index.js +1 -1
- package/pagination/PageItem.js +1 -1
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +5 -45
- package/pagination/Pagination.js +11 -243
- package/pagination/index.js +2 -2
- package/picker/Input.js +1 -1
- package/picker/InputRange.js +1 -1
- package/popconfirm/index.js +1 -1
- package/popover/index.js +1 -1
- package/progress/index.js +1 -1
- package/radio/Group.js +5 -5
- package/radio/GroupBlock.js +9 -0
- package/radio/Radio.js +6 -5
- package/radio/index.js +4 -3
- package/rate/index.js +1 -1
- package/resize-box/ResizeTrigger.js +1 -1
- package/resize-box/Split.js +1 -1
- package/resize-box/SplitGroup.js +1 -1
- package/resize-box/index.js +1 -1
- package/result/index.js +1 -1
- package/select/Option.js +6 -93
- package/select/Select.js +23 -546
- package/select/index.js +3 -3
- package/select/util.js +18 -139
- package/select-view/Core.js +1 -1
- package/skeleton/index.js +1 -1
- package/slider/Button.js +1 -1
- package/slider/index.js +1 -1
- package/space/index.js +1 -1
- package/speech-synthesis/index.js +4 -3
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +1 -1
- package/statistic/Countdown.js +1 -1
- package/statistic/index.js +1 -1
- package/steps/index.js +1 -1
- package/style/variables.less +0 -484
- package/style.css +1 -1
- package/switch/index.js +1 -1
- package/table/Table.js +2 -3
- package/table/index.js +15 -109
- package/tabs/Tab.js +2 -2
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +1 -1
- package/tabs/index.js +2 -2
- package/tag/index.js +1 -1
- package/time-picker/Picker.js +1 -1
- package/time-picker/TimePicker.js +1 -1
- package/timeline/Item.js +1 -1
- package/timeline/Timeline.js +1 -1
- package/tooltip/index.js +2 -2
- package/transfer/Item.js +9 -104
- package/transfer/List.js +13 -184
- package/transfer/index.js +13 -180
- package/tree/Animation.js +2 -2
- package/tree/Node.js +3 -4
- package/tree/NodeList.js +6 -80
- package/tree/Tree.js +17 -578
- package/tree/index.js +2 -3
- package/tree-select/List.js +6 -122
- package/tree-select/Select.js +22 -392
- package/tree-select/index.js +3 -3
- package/trigger/index.js +1 -1
- package/types/checkbox/Checkbox.d.ts +5 -2
- package/types/checkbox/GroupBlock.d.ts +7 -0
- package/types/checkbox/index.d.ts +2 -1
- package/types/config-provider/ConfigProvider.d.ts +0 -27
- package/types/config-provider/interface.d.ts +3 -1
- package/types/index.d.ts +2 -2
- package/types/menu/context.d.ts +1 -1
- package/types/radio/GroupBlock.d.ts +7 -0
- package/types/radio/Radio.d.ts +5 -3
- package/types/utils/constant.d.ts +2 -1
- package/types/utils/index.d.ts +1 -0
- package/types/utils/setDarkTheme.d.ts +2 -3
- package/types/utils/setPrimaryColor.d.ts +2 -0
- package/typography/Base.js +1 -1
- package/typography/Ellipsis.js +9 -22
- package/typography/Paragraph.js +1 -1
- package/typography/Typography.js +1 -1
- package/typography/index.js +10 -276
- package/upload/TriggerNode.js +1 -1
- package/upload/Upload.js +1 -1
- package/upload/Uploader.js +43 -44
- package/upload/request.js +1 -1
- package/upload/request_.js +1 -1
- package/utils/caseName.js +1 -1
- package/utils/color.js +1 -1
- package/utils/constant.js +7 -5
- package/utils/contextHolder.js +1 -1
- package/utils/dom.js +1 -1
- package/utils/index.js +199 -195
- package/utils/setDarkTheme.js +34 -5
- package/utils/setPrimaryColor.js +26 -0
- package/utils/tinycolor.js +1 -1
- package/verification-code/VerificationCode.js +1 -1
- package/version/index.js +1 -1
- package/watermark/Watermark.js +1 -1
- package/chunk/BViFMHr-.js +0 -1820
- package/chunk/BsWphzcT.js +0 -20
- package/chunk/BxZ39GzB.js +0 -209
- package/chunk/C9XYyypq.js +0 -713
- package/chunk/CIkPwQlq.js +0 -6
- package/chunk/DFcz9ZPP.js +0 -1020
- package/chunk/DeCsZrXb.js +0 -310
- package/chunk/DskaI8QL.js +0 -25
- package/chunk/EL5Jmjgr.js +0 -170
package/transfer/index.js
CHANGED
|
@@ -1,182 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
const ce = {
|
|
14
|
-
titleTexts: ["Source", "Target"],
|
|
15
|
-
defaultSelectedKeys: [],
|
|
16
|
-
defaultTargetKeys: [],
|
|
17
|
-
dataSource: [],
|
|
18
|
-
filterOption: (m, d) => typeof (d == null ? void 0 : d.value) == "string" && d.value.indexOf(m) !== -1
|
|
19
|
-
};
|
|
20
|
-
function ne(m, d) {
|
|
21
|
-
const { getPrefixCls: j, componentConfig: x, rtl: N } = te(re), $ = ae(
|
|
22
|
-
m,
|
|
23
|
-
ce,
|
|
24
|
-
x == null ? void 0 : x.Transfer
|
|
25
|
-
), {
|
|
26
|
-
prefixCls: k,
|
|
27
|
-
style: B,
|
|
28
|
-
className: E,
|
|
29
|
-
children: M,
|
|
30
|
-
dataSource: i,
|
|
31
|
-
defaultTargetKeys: T,
|
|
32
|
-
defaultSelectedKeys: C,
|
|
33
|
-
targetKeys: U,
|
|
34
|
-
selectedKeys: W,
|
|
35
|
-
oneWay: z,
|
|
36
|
-
simple: l,
|
|
37
|
-
disabled: K,
|
|
38
|
-
titleTexts: F,
|
|
39
|
-
operationTexts: b,
|
|
40
|
-
operationStyle: H,
|
|
41
|
-
onSearch: S,
|
|
42
|
-
onChange: O,
|
|
43
|
-
onSelectChange: f,
|
|
44
|
-
..._
|
|
45
|
-
} = $, c = k || j("transfer"), A = !!(l || z), [u, q] = L([], {
|
|
46
|
-
value: U,
|
|
47
|
-
defaultValue: l ? T.concat(C) : T
|
|
48
|
-
}), [v, I] = L([], {
|
|
49
|
-
value: W,
|
|
50
|
-
defaultValue: l ? [] : C
|
|
51
|
-
}), [D, P] = w(
|
|
52
|
-
() => [[], []],
|
|
53
|
-
[i, u]
|
|
54
|
-
), [n, y] = w(() => {
|
|
55
|
-
D.length = 0, P.length = 0;
|
|
56
|
-
const e = {
|
|
57
|
-
dataSource: D,
|
|
58
|
-
selectedKeys: [],
|
|
59
|
-
validKeys: [],
|
|
60
|
-
selectedValidKeys: [],
|
|
61
|
-
selectedDisabledKeys: []
|
|
62
|
-
}, a = {
|
|
63
|
-
dataSource: P,
|
|
64
|
-
selectedKeys: [],
|
|
65
|
-
validKeys: [],
|
|
66
|
-
selectedValidKeys: [],
|
|
67
|
-
selectedDisabledKeys: []
|
|
68
|
-
};
|
|
69
|
-
return i.forEach((t) => {
|
|
70
|
-
const s = u.indexOf(t.key) > -1 ? a : e;
|
|
71
|
-
t.disabled || s.validKeys.push(t.key), v.indexOf(t.key) > -1 && (s.selectedKeys.push(t.key), t.disabled ? s.selectedDisabledKeys.push(t.key) : s.selectedValidKeys.push(t.key)), s.dataSource.push(t);
|
|
72
|
-
}), Z(l) && l.retainSelectedItems && (Object.entries(e).forEach(([t, s]) => {
|
|
73
|
-
Array.isArray(s) && (e[t] = s.concat(a[t]));
|
|
74
|
-
}), e.dataSource = i.slice(), e.selectedKeys = u.slice()), [e, a];
|
|
75
|
-
}, [i, u, v, l]), g = (e, a = null) => {
|
|
76
|
-
if (Array.isArray(a) && a.length === 0)
|
|
77
|
-
return;
|
|
78
|
-
a = a || (e === "target" ? n.selectedValidKeys : y.selectedValidKeys);
|
|
79
|
-
const t = e === "target" ? u.concat(a).sort((s, r) => i.findIndex(({ key: o }) => o === s) - i.findIndex(({ key: o }) => o === r)) : u.filter((s) => a.indexOf(s) === -1);
|
|
80
|
-
I(
|
|
81
|
-
n.selectedDisabledKeys.concat(y.selectedDisabledKeys)
|
|
82
|
-
), q(t), O == null || O(t, e, a);
|
|
83
|
-
}, G = (e, a) => {
|
|
84
|
-
if (a === "source")
|
|
85
|
-
if (l) {
|
|
86
|
-
const t = e.filter(
|
|
87
|
-
(r) => n.selectedKeys.indexOf(r) === -1
|
|
88
|
-
), s = n.selectedKeys.filter(
|
|
89
|
-
(r) => e.indexOf(r) === -1
|
|
90
|
-
);
|
|
91
|
-
g("target", t), g("source", s);
|
|
92
|
-
} else
|
|
93
|
-
I(e.concat(y.selectedKeys)), f == null || f(e, y.selectedKeys);
|
|
94
|
-
else
|
|
95
|
-
I(n.selectedKeys.concat(e)), f == null || f(n.selectedKeys, e);
|
|
96
|
-
}, J = () => {
|
|
97
|
-
const e = y.selectedKeys.length > 0, a = n.selectedKeys.length > 0, t = A ? ["target"] : ["target", "source"];
|
|
98
|
-
return l ? null : /* @__PURE__ */ h(
|
|
99
|
-
"div",
|
|
100
|
-
{
|
|
101
|
-
style: H,
|
|
102
|
-
className: R(`${c}-operations`, {
|
|
103
|
-
[`${c}-operations-words`]: b
|
|
104
|
-
}),
|
|
105
|
-
children: t.map((s, r) => {
|
|
106
|
-
let o, p;
|
|
107
|
-
return s === "source" ? (o = X, p = K || !e) : (o = Y, p = K || !a), /* @__PURE__ */ h(
|
|
108
|
-
se,
|
|
109
|
-
{
|
|
110
|
-
tabIndex: p ? -1 : void 0,
|
|
111
|
-
"aria-label": `move selected ${s === "target" ? "right" : "left"}`,
|
|
112
|
-
type: "secondary",
|
|
113
|
-
size: "small",
|
|
114
|
-
shape: "round",
|
|
115
|
-
disabled: p,
|
|
116
|
-
onClick: () => g(s),
|
|
117
|
-
icon: /* @__PURE__ */ h(o, {}),
|
|
118
|
-
children: b && b[r]
|
|
119
|
-
},
|
|
120
|
-
r
|
|
121
|
-
);
|
|
122
|
-
})
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
}, V = (e) => {
|
|
126
|
-
const a = e === "source" ? n : y, t = e === "target", s = { ..._ };
|
|
127
|
-
return Object.entries(s).forEach(([r, o]) => {
|
|
128
|
-
[
|
|
129
|
-
"searchPlaceholder",
|
|
130
|
-
"showSearch",
|
|
131
|
-
"showFooter",
|
|
132
|
-
"pagination",
|
|
133
|
-
"listStyle"
|
|
134
|
-
].indexOf(r) > -1 && (s[r] = Array.isArray(o) ? o[e === "source" ? 0 : 1] : o);
|
|
135
|
-
}), /* @__PURE__ */ h(
|
|
136
|
-
le,
|
|
137
|
-
{
|
|
138
|
-
...a,
|
|
139
|
-
...s,
|
|
140
|
-
style: s.listStyle,
|
|
141
|
-
prefixCls: c,
|
|
142
|
-
className: `${c}-view-${e}`,
|
|
143
|
-
listType: e,
|
|
144
|
-
title: F[t ? 1 : 0],
|
|
145
|
-
disabled: K,
|
|
146
|
-
allowClear: t && A,
|
|
147
|
-
renderList: M,
|
|
148
|
-
handleSelect: (r) => G(r, e),
|
|
149
|
-
handleRemove: (r) => g(t ? "source" : "target", r),
|
|
150
|
-
onSearch: (r) => S == null ? void 0 : S(r, e),
|
|
151
|
-
renderHeaderUnit: (r, o) => `${A ? "" : `${r} / `}${o}`
|
|
152
|
-
}
|
|
153
|
-
);
|
|
154
|
-
};
|
|
155
|
-
return /* @__PURE__ */ Q(
|
|
156
|
-
"div",
|
|
157
|
-
{
|
|
158
|
-
...oe($),
|
|
159
|
-
ref: d,
|
|
160
|
-
className: R(
|
|
161
|
-
c,
|
|
162
|
-
{
|
|
163
|
-
[`${c}-simple`]: l,
|
|
164
|
-
[`${c}-disabled`]: K,
|
|
165
|
-
[`${c}-rtl`]: N
|
|
166
|
-
},
|
|
167
|
-
E
|
|
168
|
-
),
|
|
169
|
-
style: B,
|
|
170
|
-
children: [
|
|
171
|
-
V("source"),
|
|
172
|
-
J(),
|
|
173
|
-
V("target")
|
|
174
|
-
]
|
|
175
|
-
}
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
const de = ee.forwardRef(ne);
|
|
179
|
-
de.displayName = "Transfer";
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "@unicom-cloud/icons/IconUiLeft";
|
|
3
|
+
import "@unicom-cloud/icons/IconUiRight";
|
|
4
|
+
import "lodash/isPlainObject";
|
|
5
|
+
import "react";
|
|
6
|
+
import "../button/index.js";
|
|
7
|
+
import "../chunk/CNcLypMY.js";
|
|
8
|
+
import "../chunk/BFTV6myl.js";
|
|
9
|
+
import "../chunk/DeV0v__J.js";
|
|
10
|
+
import "../chunk/CUFsOxJ2.js";
|
|
11
|
+
import "../chunk/ClqoGc3r.js";
|
|
12
|
+
import { r as x } from "../chunk/Cwm8LL5p.js";
|
|
180
13
|
export {
|
|
181
|
-
|
|
14
|
+
x as default
|
|
182
15
|
};
|
package/tree/Animation.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "lodash/isNumber";
|
|
3
3
|
import "react";
|
|
4
|
-
import "../chunk/
|
|
4
|
+
import "../chunk/CNcLypMY.js";
|
|
5
5
|
import "../chunk/BpYX5PN4.js";
|
|
6
6
|
import "../virtual-list/VirtualList.js";
|
|
7
7
|
import "./Context.js";
|
|
8
|
-
import {
|
|
8
|
+
import { a8 as d } from "../chunk/Cwm8LL5p.js";
|
|
9
9
|
export {
|
|
10
10
|
d as default
|
|
11
11
|
};
|
package/tree/Node.js
CHANGED
|
@@ -5,12 +5,11 @@ import "@unicom-cloud/icons/IconUiFile";
|
|
|
5
5
|
import "@unicom-cloud/icons/IconUiLoading";
|
|
6
6
|
import "lodash/isFunction";
|
|
7
7
|
import "react";
|
|
8
|
-
import "../chunk/
|
|
9
|
-
import "../chunk/
|
|
8
|
+
import { N as x } from "../chunk/Cwm8LL5p.js";
|
|
9
|
+
import "../chunk/CNcLypMY.js";
|
|
10
10
|
import "../chunk/CUFsOxJ2.js";
|
|
11
11
|
import "../utils/throttleByRaf.js";
|
|
12
|
-
import { N } from "../chunk/DeCsZrXb.js";
|
|
13
12
|
import "./Context.js";
|
|
14
13
|
export {
|
|
15
|
-
|
|
14
|
+
x as default
|
|
16
15
|
};
|
package/tree/NodeList.js
CHANGED
|
@@ -1,82 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
function H(s) {
|
|
7
|
-
return s.key || s._key;
|
|
8
|
-
}
|
|
9
|
-
function j(s, E) {
|
|
10
|
-
const {
|
|
11
|
-
className: K,
|
|
12
|
-
style: p,
|
|
13
|
-
filterNode: a,
|
|
14
|
-
virtualListProps: c,
|
|
15
|
-
expandedKeys: w,
|
|
16
|
-
currentExpandKeys: k,
|
|
17
|
-
nodeList: i,
|
|
18
|
-
getNodeProps: S,
|
|
19
|
-
getDataSet: M
|
|
20
|
-
} = s, x = (c == null ? void 0 : c.threshold) !== null, l = h(), f = h(), D = h(), I = m(() => new Set(w), [w]), u = m(() => {
|
|
21
|
-
const e = /* @__PURE__ */ new Set(), t = new Set(k);
|
|
22
|
-
return i.forEach((n) => {
|
|
23
|
-
(n.pathParentKeys || []).every(
|
|
24
|
-
(r) => !t.has(r) && I.has(r)
|
|
25
|
-
) && e.add(n._key);
|
|
26
|
-
}), e;
|
|
27
|
-
}, [I, k, i]), N = () => i.filter((e) => !!((!a || (a == null ? void 0 : a(e))) && u.has(e.key))), d = m(() => N(), [i, a, u]);
|
|
28
|
-
return V(E, () => ({
|
|
29
|
-
// index: 第几个dom元素, 如果传入的是字符串,会作为 node 的 key去查找。
|
|
30
|
-
// nodeProps: _index 是 key 时,对应的node
|
|
31
|
-
scrollIntoView: (e, t) => {
|
|
32
|
-
let n = e;
|
|
33
|
-
if (typeof e == "string") {
|
|
34
|
-
let r = e;
|
|
35
|
-
!u.has(e) && (t != null && t.pathParentKeys) && (r = [...t.pathParentKeys].reverse().find((o) => u.has(o)) || n), n = d.findIndex(({ _key: o }) => o === r);
|
|
36
|
-
}
|
|
37
|
-
if (!x && f.current) {
|
|
38
|
-
const r = f.current, o = r ? r.children[n] : null;
|
|
39
|
-
o && b(o, {
|
|
40
|
-
boundary: r.parentElement
|
|
41
|
-
});
|
|
42
|
-
} else l.current && l.current.scrollTo({ index: n });
|
|
43
|
-
}
|
|
44
|
-
})), x ? /* @__PURE__ */ L(
|
|
45
|
-
P,
|
|
46
|
-
{
|
|
47
|
-
className: K,
|
|
48
|
-
style: p,
|
|
49
|
-
ref: l,
|
|
50
|
-
data: d,
|
|
51
|
-
isStaticItemHeight: !1,
|
|
52
|
-
itemKey: H,
|
|
53
|
-
onMouseDown: s.onMouseDown,
|
|
54
|
-
...s.ariaProps,
|
|
55
|
-
...c,
|
|
56
|
-
children: (e, t, { itemIndex: n }) => {
|
|
57
|
-
n === 0 && (D.current = M());
|
|
58
|
-
const y = S(e, D.current);
|
|
59
|
-
return /* @__PURE__ */ g(v, { ...e, key: e.key, ...y });
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
) : /* @__PURE__ */ L(
|
|
63
|
-
"div",
|
|
64
|
-
{
|
|
65
|
-
role: "tree",
|
|
66
|
-
tabIndex: 0,
|
|
67
|
-
className: K,
|
|
68
|
-
style: p,
|
|
69
|
-
ref: f,
|
|
70
|
-
...s.ariaProps,
|
|
71
|
-
onMouseDown: s.onMouseDown,
|
|
72
|
-
children: d.map((e) => {
|
|
73
|
-
const t = S(e);
|
|
74
|
-
return /* @__PURE__ */ g(v, { ...t, key: e.key });
|
|
75
|
-
})
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
const z = R(j);
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "../chunk/Bmvhjhzq.js";
|
|
4
|
+
import "../virtual-list/VirtualList.js";
|
|
5
|
+
import { a9 as a } from "../chunk/Cwm8LL5p.js";
|
|
80
6
|
export {
|
|
81
|
-
|
|
7
|
+
a as default
|
|
82
8
|
};
|