@unicom-cloud/ui 0.8.60 → 0.8.62

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.
Files changed (180) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +44 -40
  3. package/Anchor.js +1 -1
  4. package/AutoComplete.js +4 -4
  5. package/Avatar.js +1 -1
  6. package/BackTop.js +7 -7
  7. package/Badge.js +2 -2
  8. package/Breadcrumb.js +22 -22
  9. package/Button.js +2 -2
  10. package/Calendar.js +106 -104
  11. package/Card.js +1 -1
  12. package/Carousel.js +34 -33
  13. package/Cascader.js +1 -1
  14. package/Checkbox.js +1 -1
  15. package/Collapse.js +1 -1
  16. package/ColorPicker.js +12 -12
  17. package/Comment.js +1 -1
  18. package/ConfigProvider.js +2 -2
  19. package/Copy.js +16 -16
  20. package/DatePicker.js +165 -162
  21. package/Descriptions.js +1 -1
  22. package/Divider.js +1 -1
  23. package/Draggable.js +1 -1
  24. package/Drawer.js +1 -1
  25. package/Dropdown.js +9 -9
  26. package/Empty.js +2 -2
  27. package/Form.js +60 -54
  28. package/Grid.js +2 -2
  29. package/Icon.js +1 -1
  30. package/IconHover.js +1 -1
  31. package/Image.js +1 -1
  32. package/Input.js +1 -1
  33. package/InputNumber.js +6 -6
  34. package/InputTag.js +1 -1
  35. package/Layout.js +2 -2
  36. package/Link.js +14 -14
  37. package/List.js +3 -3
  38. package/Mentions.js +3 -3
  39. package/Menu.js +1 -1
  40. package/Message.js +2 -2
  41. package/Modal.js +1 -1
  42. package/Notice.js +9 -3
  43. package/Notification.js +2 -2
  44. package/OverflowEllipsis.js +32 -32
  45. package/PageHeader.js +23 -22
  46. package/Pagination.js +1 -1
  47. package/Picker.js +1 -1
  48. package/Popconfirm.js +7 -7
  49. package/Popover.js +1 -1
  50. package/Progress.js +14 -14
  51. package/Radio.js +2 -2
  52. package/Rate.js +43 -40
  53. package/ResizeBox.js +97 -96
  54. package/Result.js +15 -15
  55. package/Select.js +1 -1
  56. package/SelectView.js +295 -249
  57. package/Skeleton.js +1 -1
  58. package/Slider.js +25 -25
  59. package/Space.js +1 -1
  60. package/SpeechSynthesis.js +32 -29
  61. package/Spin.js +2 -2
  62. package/Statistic.js +1 -1
  63. package/Steps.js +11 -11
  64. package/Switch.js +3 -3
  65. package/Table.js +994 -991
  66. package/Tabs.js +1 -1
  67. package/Tag.js +68 -67
  68. package/TimePicker.js +17 -17
  69. package/Timeline.js +1 -1
  70. package/Tooltip.js +1 -1
  71. package/Transfer.js +47 -46
  72. package/Tree.js +2 -2
  73. package/TreeSelect.js +1 -1
  74. package/Trigger.js +3 -3
  75. package/Typography.js +1 -1
  76. package/Upload.js +2 -2
  77. package/VerificationCode.js +1 -1
  78. package/Version.js +1 -1
  79. package/Watermark.js +1 -1
  80. package/chunk/{V6euPXVB.js → -Z968QpN.js} +257 -251
  81. package/chunk/{IooeSKJJ.js → AqH9yP_J.js} +19 -19
  82. package/chunk/{cZiP8FvM.js → B0oDiPqE.js} +1 -1
  83. package/chunk/{B16KHtX-.js → B4-WpgY2.js} +191 -185
  84. package/chunk/{CuOl4X0X.js → B8SZFOjt.js} +1 -1
  85. package/chunk/{CbiWdbr_.js → BXWxA-tS.js} +35 -34
  86. package/chunk/{DpfUGhi4.js → BlNFmhNa.js} +288 -283
  87. package/chunk/{C1xMmQIZ.js → BmO1y0vr.js} +34 -34
  88. package/chunk/{Kbr6FzOG.js → BnqeQYIZ.js} +210 -186
  89. package/chunk/{BPZ-6HKJ.js → Bp3XomF8.js} +1 -2
  90. package/chunk/BsWphzcT.js +20 -0
  91. package/chunk/{RMBPs_Ry.js → C4eJ9vCf.js} +4 -3
  92. package/chunk/{BNHrEI0Y.js → C6fEFlPt.js} +52 -48
  93. package/chunk/C8o-VGyc.js +376 -0
  94. package/chunk/{eK7lxdak.js → CDJ1EnJ2.js} +8 -8
  95. package/chunk/{C5AQWbC4.js → CHyuuVxl.js} +1 -1
  96. package/chunk/{B2vORJQ8.js → CJnshq6A.js} +13 -13
  97. package/chunk/CT1lZ7ss.js +116 -0
  98. package/chunk/{Bdh4XVuf.js → CV1kLw5Z.js} +290 -281
  99. package/chunk/{DmUhn9ib.js → CazXy0r4.js} +54 -53
  100. package/chunk/{BBVjSFnw.js → Cqyp4qni.js} +23 -19
  101. package/chunk/{BJ_7JTqC.js → D3VMG9V1.js} +1 -1
  102. package/chunk/{D2HkyI6A.js → DGasAUHE.js} +2 -2
  103. package/chunk/{YIlBPVAs.js → DRQ1v6Ux.js} +1 -1
  104. package/chunk/{DhBo0pPJ.js → DRp7voqz.js} +119 -118
  105. package/chunk/{gIbzjQ-X.js → Dtm4BmKB.js} +2 -2
  106. package/chunk/{BEDYCG-I.js → KchYsivk.js} +18 -18
  107. package/chunk/{Cbd50gx8.js → Wum88vrW.js} +33 -33
  108. package/chunk/{BjSHZA0m.js → mfn4EgmQ.js} +1 -1
  109. package/chunk/{BYhtrDV3.js → nbEvdwT0.js} +152 -148
  110. package/chunk/{C1D7T29r.js → qpd2axxs.js} +83 -76
  111. package/chunk/{BVLwPZis.js → tOFzwzpT.js} +31 -30
  112. package/chunk/{DSGRHf-1.js → yESVS-qX.js} +157 -156
  113. package/hooks/useMergeValue.js +1 -1
  114. package/icons.js +4 -6001
  115. package/index.js +420 -392
  116. package/locale/en-US.js +1 -1
  117. package/locale/tr-TR.js +1 -1
  118. package/package.json +1 -1
  119. package/style.css +1 -1
  120. package/types/cascader/panel/Search.d.ts +1 -1
  121. package/types/config-provider/interface.d.ts +1 -1
  122. package/types/form/interface.d.ts +1 -1
  123. package/types/index.d.ts +1 -1
  124. package/types/message/index.d.ts +2 -2
  125. package/types/notification/index.d.ts +2 -2
  126. package/types/notification-base/index.d.ts +2 -2
  127. package/types/select/interface.d.ts +1 -0
  128. package/types/select-view/interface.d.ts +1 -0
  129. package/types/table/interface.d.ts +1 -0
  130. package/types/tree/Context.d.ts +1 -0
  131. package/types/tree/Tree.d.ts +1 -1
  132. package/types/tree/index.d.ts +5 -4
  133. package/types/tree/interface.d.ts +1 -0
  134. package/types/utils/index.d.ts +1 -0
  135. package/types/utils/lodash.d.ts +14 -1
  136. package/types/version/index.d.ts +1 -1
  137. package/utils/CSSTransition.js +1 -1
  138. package/utils/caseName.js +2 -18
  139. package/utils/contextHolder.js +1 -1
  140. package/utils/index.js +220 -191
  141. package/utils/is.js +68 -67
  142. package/utils/lodash.js +32 -6
  143. package/utils/reactDOM.js +1 -1
  144. package/chunk/-LZOUh53.js +0 -29
  145. package/chunk/-jdfq71f.js +0 -23
  146. package/chunk/B0GOLsj_.js +0 -58
  147. package/chunk/B7Zsp3gO.js +0 -29
  148. package/chunk/BDjXkzNj.js +0 -23
  149. package/chunk/BHn4xgbv.js +0 -209
  150. package/chunk/BLSiP_gg.js +0 -32
  151. package/chunk/BMJfSSLX.js +0 -23
  152. package/chunk/B_nfMl0e.js +0 -116
  153. package/chunk/BcS17Pzy.js +0 -66
  154. package/chunk/BdiEwtQO.js +0 -41
  155. package/chunk/Bpug_KxP.js +0 -34
  156. package/chunk/C1u_ckwU.js +0 -29
  157. package/chunk/C43Hv2Bl.js +0 -34
  158. package/chunk/C9vsih_D.js +0 -29
  159. package/chunk/CAfR2wLq.js +0 -41
  160. package/chunk/CAfecMDF.js +0 -46
  161. package/chunk/CKp4rZnD.js +0 -207
  162. package/chunk/CV2Aqv9q.js +0 -52
  163. package/chunk/CYdarMv9.js +0 -32
  164. package/chunk/C_S5Mdvd.js +0 -379
  165. package/chunk/CmB-TL7C.js +0 -46
  166. package/chunk/D-ER56Sf.js +0 -29
  167. package/chunk/D-aYnb6u.js +0 -41
  168. package/chunk/D3xQFJcO.js +0 -23
  169. package/chunk/DJcEys80.js +0 -29
  170. package/chunk/DLIm6rRJ.js +0 -29
  171. package/chunk/DOWEHtqM.js +0 -41
  172. package/chunk/DT37l12z.js +0 -40
  173. package/chunk/DW-B7npC.js +0 -23
  174. package/chunk/D_MTFBb0.js +0 -38
  175. package/chunk/Dx_5J4fO.js +0 -29
  176. package/chunk/Dy487FZ1.js +0 -118
  177. package/chunk/Uz-rNulO.js +0 -98
  178. package/chunk/cDZI_t6o.js +0 -52
  179. package/chunk/sScV-J56.js +0 -206
  180. package/chunk/wI2I1qb0.js +0 -23
@@ -1,74 +1,74 @@
1
- var le = Object.defineProperty;
2
- var he = (r, y, e) => y in r ? le(r, y, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[y] = e;
3
- var p = (r, y, e) => he(r, typeof y != "symbol" ? y + "" : y, e);
4
- import { jsx as b, jsxs as j, Fragment as fe } from "react/jsx-runtime";
5
- import z, { createContext as ye, useContext as U, useRef as A, useEffect as Z, useMemo as H, forwardRef as se, useState as pe, useCallback as V, useImperativeHandle as ge, createElement as B, Component as ue } from "react";
6
- import { z as Ke } from "./BBVjSFnw.js";
7
- import I from "lodash/get";
8
- import ke from "lodash/has";
1
+ var he = Object.defineProperty;
2
+ var fe = (r, p, e) => p in r ? he(r, p, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[p] = e;
3
+ var y = (r, p, e) => fe(r, typeof p != "symbol" ? p + "" : p, e);
4
+ import { jsx as b, jsxs as j, Fragment as pe } from "react/jsx-runtime";
5
+ import Y, { createContext as ye, useContext as U, useRef as A, useEffect as ee, useMemo as H, forwardRef as ne, useState as ge, useCallback as V, useImperativeHandle as ue, createElement as q, Component as Ke } from "react";
6
+ import { G as ke } from "./Cqyp4qni.js";
7
+ import O from "lodash/get";
8
+ import B from "lodash/has";
9
9
  import me from "lodash/isArray";
10
- import O from "lodash/isEqualWith";
10
+ import I from "lodash/isEqualWith";
11
11
  import $ from "lodash/isFunction";
12
- import ee from "lodash/isUndefined";
13
- import { d as Y, I as xe } from "./Bdh4XVuf.js";
12
+ import te from "lodash/isUndefined";
13
+ import { d as z, I as xe } from "./CV1kLw5Z.js";
14
14
  import { y as M } from "./BzPkh4Zv.js";
15
15
  import { pickDataAttributes as Ne } from "../utils/pick.js";
16
- import { I as be } from "./BLSiP_gg.js";
17
- import { I as De } from "./DOWEHtqM.js";
18
- import { I as Ce } from "./C1u_ckwU.js";
19
- import { e as Pe } from "./BHn4xgbv.js";
20
- import { C as Ee } from "./eK7lxdak.js";
16
+ import be from "@unicom-cloud/icons/IconUiCaretDown";
17
+ import De from "@unicom-cloud/icons/IconUiDragDotVertical";
18
+ import Ce from "@unicom-cloud/icons/IconUiFile";
19
+ import Pe from "@unicom-cloud/icons/IconUiLoading";
20
+ import { C as Ee } from "./CDJ1EnJ2.js";
21
21
  import we from "../utils/throttleByRaf.js";
22
22
  import Se from "lodash/isNumber";
23
- import { P as _e } from "./BPZ-6HKJ.js";
24
- import { V as ne } from "./D3NFxdmG.js";
23
+ import { P as _e } from "./Bp3XomF8.js";
24
+ import { V as ie } from "./D3NFxdmG.js";
25
25
  import Le from "../utils/scrollIntoView.js";
26
- const q = ye({});
26
+ const G = ye({});
27
27
  function ve(r) {
28
28
  return r.key || r._key;
29
29
  }
30
- const Ie = (r) => {
30
+ const Oe = (r) => {
31
31
  var g;
32
- const y = U(q), { getPrefixCls: e } = U(Y), n = e("tree-node"), { expandedKeys: s, currentExpandKeys: t } = y.getTreeState(), i = r.expanded, a = A(r.childrenData);
33
- a.current = r.childrenData, Z(() => () => {
34
- var c;
35
- (c = y.onExpandEnd) == null || c.call(y, r._key);
32
+ const p = U(G), { getPrefixCls: e } = U(z), n = e("tree-node"), { expandedKeys: s, currentExpandKeys: t } = p.getTreeState(), i = r.expanded, a = A(r.childrenData);
33
+ a.current = r.childrenData, ee(() => () => {
34
+ var l;
35
+ (l = p.onExpandEnd) == null || l.call(p, r._key);
36
36
  }, []);
37
37
  const d = H(() => {
38
- const c = [], m = (x) => {
39
- x.forEach((k) => {
40
- const l = y.getFieldInfo(k);
41
- c.push(l), l.children && l.children.length && m(l.children);
38
+ const l = [], k = (x) => {
39
+ x.forEach((m) => {
40
+ const c = p.getFieldInfo(m);
41
+ l.push(c), c.children && c.children.length && k(c.children);
42
42
  });
43
43
  };
44
- return m(a.current || []), c;
44
+ return k(a.current || []), l;
45
45
  }, [i]), o = H(() => {
46
- const c = [];
46
+ const l = [];
47
47
  if (d.length) {
48
- const m = new Set(s || []);
48
+ const k = new Set(s || []);
49
49
  d.forEach((x) => {
50
50
  var C;
51
- let k;
52
- const l = {
53
- ...y.key2nodeProps[x.key]
51
+ let m;
52
+ const c = {
53
+ ...p.key2nodeProps[x.key]
54
54
  };
55
55
  if (i)
56
- k = l.parentKey === r._key || ((C = l.pathParentKeys) == null ? void 0 : C.every((D) => m.has(D)));
57
- else if (l.pathParentKeys) {
58
- const D = l.pathParentKeys.indexOf(r._key);
59
- k = l.pathParentKeys.slice(D + 1).every((N) => m.has(N));
56
+ m = c.parentKey === r._key || ((C = c.pathParentKeys) == null ? void 0 : C.every((D) => k.has(D)));
57
+ else if (c.pathParentKeys) {
58
+ const D = c.pathParentKeys.indexOf(r._key);
59
+ m = c.pathParentKeys.slice(D + 1).every((N) => k.has(N));
60
60
  }
61
- k && c.push({
62
- ...l,
61
+ m && l.push({
62
+ ...c,
63
63
  key: x.key
64
64
  });
65
65
  });
66
66
  }
67
- return y.getNodeProps(c);
68
- }, [d, r._key, i]);
69
- let K = (g = y.virtualListProps) == null ? void 0 : g.height;
70
- return K = Se(K) ? K : 0, Z(() => {
71
- t.indexOf(r._key) > -1 && o.length === 0 && y.onExpandEnd(r._key);
67
+ return p.getNodeProps(l);
68
+ }, [d, r._key, i, s]);
69
+ let u = (g = p.virtualListProps) == null ? void 0 : g.height;
70
+ return u = Se(u) ? u : 0, ee(() => {
71
+ t.indexOf(r._key) > -1 && o.length === 0 && p.onExpandEnd(r._key);
72
72
  }, [o, t]), /* @__PURE__ */ b(
73
73
  _e,
74
74
  {
@@ -79,43 +79,43 @@ const Ie = (r) => {
79
79
  enter: 200,
80
80
  exit: 0
81
81
  },
82
- onEnter: (c) => {
83
- if (!c) return;
84
- const m = c.scrollHeight;
85
- c.style.height = i ? 0 : `${Math.min(K || m, c.scrollHeight)}px`;
82
+ onEnter: (l) => {
83
+ if (!l) return;
84
+ const k = l.scrollHeight;
85
+ l.style.height = i ? 0 : `${Math.min(u || k, l.scrollHeight)}px`;
86
86
  },
87
- onEntering: (c) => {
88
- if (!c) return;
89
- const m = c.scrollHeight;
90
- c.style.height = i ? `${Math.min(K || m, m)}px` : 0;
87
+ onEntering: (l) => {
88
+ if (!l) return;
89
+ const k = l.scrollHeight;
90
+ l.style.height = i ? `${Math.min(u || k, k)}px` : 0;
91
91
  },
92
- onEntered: (c) => {
93
- c && (c.style.height = r.expanded ? "" : 0, y.onExpandEnd(r._key));
92
+ onEntered: (l) => {
93
+ l && (l.style.height = r.expanded ? "" : 0, p.onExpandEnd(r._key));
94
94
  },
95
- onExit: (c) => {
96
- c && (c.style.display = "none");
95
+ onExit: (l) => {
96
+ l && (l.style.display = "none");
97
97
  },
98
98
  children: /* @__PURE__ */ b(
99
- ne,
99
+ ie,
100
100
  {
101
101
  itemKey: ve,
102
102
  className: `${n}-list`,
103
103
  isStaticItemHeight: !1,
104
- ...y.virtualListProps,
104
+ ...p.virtualListProps,
105
105
  data: o,
106
106
  "aria-hidden": !0,
107
107
  style: { overflow: "hidden" },
108
- children: (c) => {
109
- let { key: m, ...x } = c ?? {};
110
- return /* @__PURE__ */ b(R, { ...x }, m);
108
+ children: (l) => {
109
+ const { key: k, ...x } = l ?? {};
110
+ return /* @__PURE__ */ b(R, { ...x }, k);
111
111
  }
112
112
  }
113
113
  )
114
114
  }
115
115
  );
116
116
  };
117
- function Oe(r, y) {
118
- const e = U(q), { getPrefixCls: n } = U(Y), s = A(), [t, i] = pe({
117
+ function Ie(r, p) {
118
+ const e = U(G), { getPrefixCls: n } = U(z), s = A(), [t, i] = ge({
119
119
  isAllowDrop: !0,
120
120
  isDragOver: !1,
121
121
  dragPosition: 0,
@@ -124,13 +124,13 @@ function Oe(r, y) {
124
124
  _key: a = "",
125
125
  title: d,
126
126
  icon: o,
127
- checkable: K,
127
+ checkable: u,
128
128
  selected: g,
129
- disabled: c,
130
- disableCheckbox: m,
129
+ disabled: l,
130
+ disableCheckbox: k,
131
131
  isLeaf: x,
132
- draggable: k,
133
- expanded: l,
132
+ draggable: m,
133
+ expanded: c,
134
134
  showLine: C,
135
135
  loading: D,
136
136
  selectable: N = !0
@@ -139,107 +139,107 @@ function Oe(r, y) {
139
139
  {
140
140
  [`${h}-selected`]: g,
141
141
  [`${h}-is-leaf`]: x,
142
- [`${h}-expanded`]: l,
142
+ [`${h}-expanded`]: c,
143
143
  [`${h}-disabled-selectable`]: !N,
144
- [`${h}-disabled`]: c,
145
- [`${h}-draggable`]: k
144
+ [`${h}-disabled`]: l,
145
+ [`${h}-draggable`]: m
146
146
  },
147
147
  r.className
148
148
  ), S = (() => {
149
- const f = $(e.icons) ? e.icons(r) : e.icons, u = $(r.icons) ? r.icons(r) : r.icons;
150
- return { ...f, ...u };
149
+ const f = $(e.icons) ? e.icons(r) : e.icons, K = $(r.icons) ? r.icons(r) : r.icons;
150
+ return { ...f, ...K };
151
151
  })(), E = V(
152
152
  (f) => {
153
- var u;
154
- f !== l && ((u = e.onExpand) == null || u.call(e, f, a));
153
+ var K;
154
+ f !== c && ((K = e.onExpand) == null || K.call(e, f, a));
155
155
  },
156
- [l, e.onExpand]
156
+ [c, e.onExpand]
157
157
  ), L = V(async () => {
158
158
  var P;
159
- const { isLeaf: f, expanded: u } = r;
160
- f || (!((P = r.childrenData) != null && P.length) && $(e.loadMore) && !u ? await e.loadMore(r) : E(!u));
159
+ const { isLeaf: f, expanded: K } = r;
160
+ f || (!((P = r.childrenData) != null && P.length) && $(e.loadMore) && !K ? await e.loadMore(r) : E(!K));
161
161
  }, [r, E, e.loadMore]), ce = () => {
162
162
  if (D)
163
163
  return "loadingIcon" in S ? S.loadingIcon : /* @__PURE__ */ b(Pe, {});
164
- let f = null, u = !1;
164
+ let f = null, K = !1;
165
165
  if (x)
166
- C && (f = "switcherIcon" in S ? S.switcherIcon : /* @__PURE__ */ b(Ce, {}), u = !0);
166
+ C && (f = "switcherIcon" in S ? S.switcherIcon : /* @__PURE__ */ b(Ce, {}), K = !0);
167
167
  else {
168
- const P = C ? /* @__PURE__ */ b("span", { className: `${h}-${l ? "minus" : "plus"}-icon` }) : /* @__PURE__ */ b(be, {});
169
- f = "switcherIcon" in S ? S.switcherIcon : P, u = !C;
168
+ const P = C ? /* @__PURE__ */ b("span", { className: `${h}-${c ? "minus" : "plus"}-icon` }) : /* @__PURE__ */ b(be, {});
169
+ f = "switcherIcon" in S ? S.switcherIcon : P, K = !C;
170
170
  }
171
171
  if (f)
172
172
  return f = /* @__PURE__ */ b(
173
173
  "span",
174
174
  {
175
175
  className: `${h}-switcher-icon`,
176
- "aria-label": l ? "fold button" : "expand button",
176
+ "aria-label": c ? "fold button" : "expand button",
177
177
  role: "button",
178
178
  tabIndex: 0,
179
179
  onClick: L,
180
180
  children: f
181
181
  }
182
- ), u ? /* @__PURE__ */ b(xe, { prefix: h, children: f }) : f;
182
+ ), K ? /* @__PURE__ */ b(xe, { prefix: h, children: f }) : f;
183
183
  }, F = V(
184
184
  we((f) => {
185
- var X;
186
- const u = s.current;
187
- if (!u) return;
188
- const P = u.getBoundingClientRect(), T = window.pageYOffset + P.top, v = f.pageY, J = P.height / 4, Q = v - T, W = Q < J ? -1 : Q < P.height - J ? 0 : 1, de = e.allowDrop(r, W);
185
+ var Z;
186
+ const K = s.current;
187
+ if (!K) return;
188
+ const P = K.getBoundingClientRect(), T = window.pageYOffset + P.top, v = f.pageY, Q = P.height / 4, X = v - T, W = X < Q ? -1 : X < P.height - Q ? 0 : 1, le = e.allowDrop(r, W);
189
189
  i({
190
190
  ...t,
191
- isAllowDrop: de,
191
+ isAllowDrop: le,
192
192
  isDragOver: !0,
193
193
  dragPosition: W
194
- }), (X = e.onNodeDragOver) == null || X.call(e, f, r, W);
194
+ }), (Z = e.onNodeDragOver) == null || Z.call(e, f, r, W);
195
195
  }),
196
196
  [e.onNodeDragOver]
197
- ), G = V(
198
- (f, u) => {
197
+ ), J = V(
198
+ (f, K) => {
199
199
  var v;
200
200
  const { disableCheckbox: P, disabled: T } = r;
201
- P || T || (v = e.onCheck) == null || v.call(e, f, a, u);
201
+ P || T || (v = e.onCheck) == null || v.call(e, f, a, K);
202
202
  },
203
203
  [r.disabled, r.disableCheckbox]
204
204
  );
205
- return /* @__PURE__ */ j(fe, { children: [
205
+ return /* @__PURE__ */ j(pe, { children: [
206
206
  /* @__PURE__ */ j(
207
207
  "div",
208
208
  {
209
209
  style: r.style,
210
210
  className: w,
211
- ref: y,
211
+ ref: p,
212
212
  role: "treeitem",
213
- "aria-disabled": c,
214
- "aria-expanded": l,
213
+ "aria-disabled": l,
214
+ "aria-expanded": c,
215
215
  "aria-level": r._level,
216
216
  children: [
217
- /* @__PURE__ */ b("span", { className: `${h}-indent`, "aria-hidden": !0, children: [...Array(r._level)].map((f, u) => /* @__PURE__ */ b(
217
+ /* @__PURE__ */ b("span", { className: `${h}-indent`, "aria-hidden": !0, children: [...Array(r._level)].map((f, K) => /* @__PURE__ */ b(
218
218
  "span",
219
219
  {
220
220
  className: M(`${h}-indent-block`, {
221
- [`${h}-indent-block-lineless`]: r._lineless && r._lineless[u]
221
+ [`${h}-indent-block-lineless`]: r._lineless && r._lineless[K]
222
222
  })
223
223
  },
224
- u
224
+ K
225
225
  )) }),
226
226
  /* @__PURE__ */ b(
227
227
  "span",
228
228
  {
229
229
  className: M(`${h}-switcher`, {
230
- [`${h}-switcher-expanded`]: l
230
+ [`${h}-switcher-expanded`]: c
231
231
  }),
232
232
  children: ce()
233
233
  }
234
234
  ),
235
- K ? /* @__PURE__ */ b(
235
+ u ? /* @__PURE__ */ b(
236
236
  Ee,
237
237
  {
238
- disabled: m || c,
238
+ disabled: k || l,
239
239
  value: a,
240
240
  indeterminate: r.indeterminated,
241
241
  checked: r.checked,
242
- onChange: G
242
+ onChange: J
243
243
  }
244
244
  ) : null,
245
245
  /* @__PURE__ */ j(
@@ -248,7 +248,7 @@ function Oe(r, y) {
248
248
  "aria-grabbed": t.isDragging,
249
249
  ref: s,
250
250
  className: M(`${h}-title`, {
251
- [`${h}-title-draggable`]: k,
251
+ [`${h}-title-draggable`]: m,
252
252
  [`${h}-title-gap-top`]: t.isDragOver && t.isAllowDrop && t.dragPosition < 0,
253
253
  [`${h}-title-gap-bottom`]: t.isDragOver && t.isAllowDrop && t.dragPosition > 0,
254
254
  [`${h}-title-highlight`]: !t.isDragging && t.isDragOver && t.isAllowDrop && t.dragPosition === 0,
@@ -257,51 +257,51 @@ function Oe(r, y) {
257
257
  }),
258
258
  onClick: (f) => {
259
259
  const {
260
- onSelect: u,
260
+ onSelect: K,
261
261
  onSelect_: P,
262
262
  // 潘启宝添加
263
263
  actionOnClick: T
264
264
  } = e;
265
265
  if (!r.disabled) {
266
266
  const v = [].concat(T);
267
- N && v.indexOf("select") > -1 && (u == null || u(a, f)), P == null || P(r), v.indexOf("expand") > -1 && L(), K && v.indexOf("check") > -1 && G(!r.checked, f);
267
+ N && v.indexOf("select") > -1 && (K == null || K(a, f)), P == null || P(r), v.indexOf("expand") > -1 && L(), u && v.indexOf("check") > -1 && J(!r.checked, f);
268
268
  }
269
269
  },
270
- draggable: k,
270
+ draggable: m,
271
271
  onDrop: (f) => {
272
- var u;
273
- f.stopPropagation(), f.preventDefault(), (u = e.onNodeDrop) == null || u.call(e, f, r, t.dragPosition), F.cancel(), i({
272
+ var K;
273
+ f.stopPropagation(), f.preventDefault(), (K = e.onNodeDrop) == null || K.call(e, f, r, t.dragPosition), F.cancel(), i({
274
274
  ...t,
275
275
  isDragOver: !1,
276
276
  dragPosition: 0
277
277
  });
278
278
  },
279
279
  onDragStart: (f) => {
280
- var u;
281
- if (k) {
280
+ var K;
281
+ if (m) {
282
282
  f.stopPropagation(), i({ ...t, isDragging: !0 });
283
283
  try {
284
284
  f.dataTransfer.setData("text/plain", "");
285
285
  } catch {
286
286
  }
287
- (u = e.onNodeDragStart) == null || u.call(e, f, r);
287
+ (K = e.onNodeDragStart) == null || K.call(e, f, r);
288
288
  }
289
289
  },
290
290
  onDragEnd: (f) => {
291
- var u;
292
- k && (f.stopPropagation(), F.cancel(), i({ ...t, isDragOver: !1, isDragging: !1 }), (u = e.onNodeDragEnd) == null || u.call(e, f, r));
291
+ var K;
292
+ m && (f.stopPropagation(), F.cancel(), i({ ...t, isDragOver: !1, isDragging: !1 }), (K = e.onNodeDragEnd) == null || K.call(e, f, r));
293
293
  },
294
294
  onDragOver: (f) => {
295
295
  f.preventDefault(), f.stopPropagation(), f.persist(), F(f);
296
296
  },
297
297
  onDragLeave: (f) => {
298
- var u;
299
- k && (f.stopPropagation(), F.cancel(), i({ ...t, isDragOver: !1 }), (u = e.onNodeDragLeave) == null || u.call(e, f, r));
298
+ var K;
299
+ m && (f.stopPropagation(), F.cancel(), i({ ...t, isDragOver: !1 }), (K = e.onNodeDragLeave) == null || K.call(e, f, r));
300
300
  },
301
301
  children: [
302
302
  o && /* @__PURE__ */ b("span", { className: `${h}-icon ${h}-custom-icon`, children: o }),
303
303
  /* @__PURE__ */ b("span", { className: `${h}-title-text`, children: $(e.renderTitle) ? e.renderTitle(r) : d }),
304
- k && /* @__PURE__ */ b("span", { className: `${h}-icon ${h}-drag-icon`, children: "dragIcon" in S ? S.dragIcon : /* @__PURE__ */ b(De, {}) })
304
+ m && /* @__PURE__ */ b("span", { className: `${h}-icon ${h}-drag-icon`, children: "dragIcon" in S ? S.dragIcon : /* @__PURE__ */ b(De, {}) })
305
305
  ]
306
306
  }
307
307
  ),
@@ -309,16 +309,16 @@ function Oe(r, y) {
309
309
  ]
310
310
  }
311
311
  ),
312
- /* @__PURE__ */ b(Ie, { ...r })
312
+ e.animation && /* @__PURE__ */ b(Oe, { ...r })
313
313
  ] });
314
314
  }
315
- const ie = se(Oe);
316
- ie.displayName = "TreeNode";
317
- const R = z.memo(ie);
315
+ const re = ne(Ie);
316
+ re.displayName = "TreeNode";
317
+ const R = Y.memo(re);
318
318
  function $e(r) {
319
319
  return r.key || r._key;
320
320
  }
321
- function Me(r, y) {
321
+ function Me(r, p) {
322
322
  const {
323
323
  className: e,
324
324
  style: n,
@@ -328,37 +328,37 @@ function Me(r, y) {
328
328
  currentExpandKeys: a,
329
329
  nodeList: d,
330
330
  getNodeProps: o,
331
- getDataSet: K
332
- } = r, g = (t == null ? void 0 : t.threshold) !== null, c = A(), m = A(), x = A(), k = H(() => new Set(i), [i]), l = H(() => {
331
+ getDataSet: u
332
+ } = r, g = (t == null ? void 0 : t.threshold) !== null, l = A(), k = A(), x = A(), m = H(() => new Set(i), [i]), c = H(() => {
333
333
  const N = /* @__PURE__ */ new Set(), h = new Set(a);
334
334
  return d.forEach((w) => {
335
335
  (w.pathParentKeys || []).every(
336
- (E) => !h.has(E) && k.has(E)
336
+ (E) => !h.has(E) && m.has(E)
337
337
  ) && N.add(w._key);
338
338
  }), N;
339
- }, [k, a, d]), C = () => d.filter((N) => !!((!s || (s == null ? void 0 : s(N))) && l.has(N.key))), D = H(() => C(), [d, s, l]);
340
- return ge(y, () => ({
339
+ }, [m, a, d]), C = () => d.filter((N) => !!((!s || (s == null ? void 0 : s(N))) && c.has(N.key))), D = H(() => C(), [d, s, c]);
340
+ return ue(p, () => ({
341
341
  // index: 第几个dom元素, 如果传入的是字符串,会作为 node 的 key去查找。
342
342
  // nodeProps: _index 是 key 时,对应的node
343
343
  scrollIntoView: (N, h) => {
344
344
  let w = N;
345
345
  if (typeof N == "string") {
346
346
  let E = N;
347
- !l.has(N) && h && h.pathParentKeys && (E = [...h.pathParentKeys].reverse().find((L) => l.has(L)) || w), w = D.findIndex(({ _key: L }) => L === E);
347
+ !c.has(N) && h && h.pathParentKeys && (E = [...h.pathParentKeys].reverse().find((L) => c.has(L)) || w), w = D.findIndex(({ _key: L }) => L === E);
348
348
  }
349
- if (!g && m.current) {
350
- const E = m.current, L = E ? E.children[w] : null;
349
+ if (!g && k.current) {
350
+ const E = k.current, L = E ? E.children[w] : null;
351
351
  L && Le(L, {
352
352
  boundary: E.parentElement
353
353
  });
354
- } else c.current && c.current.scrollTo({ index: w });
354
+ } else l.current && l.current.scrollTo({ index: w });
355
355
  }
356
356
  })), g ? /* @__PURE__ */ b(
357
- ne,
357
+ ie,
358
358
  {
359
359
  className: e,
360
360
  style: n,
361
- ref: c,
361
+ ref: l,
362
362
  data: D,
363
363
  isStaticItemHeight: !1,
364
364
  itemKey: $e,
@@ -366,9 +366,9 @@ function Me(r, y) {
366
366
  ...r.ariaProps,
367
367
  ...t,
368
368
  children: (N, h, { itemIndex: w }) => {
369
- w === 0 && (x.current = K());
369
+ w === 0 && (x.current = u());
370
370
  const S = o(N, x.current);
371
- return /* @__PURE__ */ B(R, { ...N, key: N.key, ...S });
371
+ return /* @__PURE__ */ q(R, { ...N, key: N.key, ...S });
372
372
  }
373
373
  }
374
374
  ) : /* @__PURE__ */ b(
@@ -378,46 +378,46 @@ function Me(r, y) {
378
378
  tabIndex: 0,
379
379
  className: e,
380
380
  style: n,
381
- ref: m,
381
+ ref: k,
382
382
  ...r.ariaProps,
383
383
  onMouseDown: r.onMouseDown,
384
384
  children: D.map((N) => {
385
385
  const h = o(N);
386
- return /* @__PURE__ */ B(R, { ...h, key: N.key });
386
+ return /* @__PURE__ */ q(R, { ...h, key: N.key });
387
387
  })
388
388
  }
389
389
  );
390
390
  }
391
- const Te = se(Me), Ae = (r) => {
392
- const y = (e) => z.Children.map(e, (n) => {
393
- if (!z.isValidElement(n))
391
+ const Te = ne(Me), Ae = (r) => {
392
+ const p = (e) => Y.Children.map(e, (n) => {
393
+ if (!Y.isValidElement(n))
394
394
  return;
395
395
  const s = n.key;
396
396
  return {
397
397
  ...n.props,
398
398
  key: s,
399
- children: y(n.props.children)
399
+ children: p(n.props.children)
400
400
  };
401
401
  });
402
- return y(r);
402
+ return p(r);
403
403
  };
404
- function re(r, y) {
404
+ function ae(r, p) {
405
405
  const e = /* @__PURE__ */ new Set(), n = (s) => {
406
406
  s.map((t) => {
407
- const i = t.key, a = y[i];
407
+ const i = t.key, a = p[i];
408
408
  !a || a.disabled || a.disableCheckbox || a.checkable === !1 || (e.add(i), n(a.children || []));
409
409
  });
410
410
  };
411
411
  return r && n(r.children || []), e;
412
412
  }
413
- const ae = (r, y, e, n) => {
414
- [...y[r].pathParentKeys].reverse().some((t) => {
415
- const i = y[t];
413
+ const oe = (r, p, e, n) => {
414
+ [...p[r].pathParentKeys].reverse().some((t) => {
415
+ const i = p[t];
416
416
  if (i && !i.disabled && !i.disableCheckbox && i.checkable !== !1) {
417
417
  let a = 0, d = 0;
418
418
  i.children.some(({ key: o }) => {
419
- const K = y[o];
420
- if (!K || K.disabled || K.disableCheckbox || K.checkable === !1)
419
+ const u = p[o];
420
+ if (!u || u.disabled || u.disableCheckbox || u.checkable === !1)
421
421
  return !1;
422
422
  if (a++, e.has(o))
423
423
  d++;
@@ -428,36 +428,36 @@ const ae = (r, y, e, n) => {
428
428
  return !0;
429
429
  });
430
430
  };
431
- function He(r, y) {
431
+ function He(r, p) {
432
432
  const e = new Set(r || []), n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
433
433
  return r.forEach((t) => {
434
- s.has(t) || re(y[t], y).forEach((a) => {
434
+ s.has(t) || ae(p[t], p).forEach((a) => {
435
435
  s.add(a);
436
- }), y[t] && !y[t].pathParentKeys.some(
436
+ }), p[t] && !p[t].pathParentKeys.some(
437
437
  (i) => e.has(i)
438
- ) && ae(t, y, e, n);
438
+ ) && oe(t, p, e, n);
439
439
  }), {
440
440
  checkedKeys: [.../* @__PURE__ */ new Set([...e, ...s])],
441
441
  indeterminateKeys: [...n]
442
442
  };
443
443
  }
444
- function Re(r, y, e, n, s) {
444
+ function Re(r, p, e, n, s) {
445
445
  if (!n[r])
446
446
  return {
447
447
  checkedKeys: e,
448
448
  indeterminateKeys: s
449
449
  };
450
- const t = new Set(e), i = new Set(s), a = re(n[r], n), d = t;
451
- return y ? (d.add(r), i.delete(r), a.forEach((o) => {
450
+ const t = new Set(e), i = new Set(s), a = ae(n[r], n), d = t;
451
+ return p ? (d.add(r), i.delete(r), a.forEach((o) => {
452
452
  d.add(o);
453
453
  })) : (i.delete(r), d.delete(r), a.forEach((o) => {
454
454
  d.delete(o);
455
- })), ae(r, n, t, i), {
455
+ })), oe(r, n, t, i), {
456
456
  checkedKeys: [...d],
457
457
  indeterminateKeys: [...i]
458
458
  };
459
459
  }
460
- const oe = {
460
+ const de = {
461
461
  key: "key",
462
462
  title: "title",
463
463
  children: "children",
@@ -472,7 +472,8 @@ const oe = {
472
472
  checkedStrategy: "all",
473
473
  actionOnClick: "select",
474
474
  allowDrop: () => !0,
475
- fieldNames: oe
475
+ fieldNames: de,
476
+ animation: !0
476
477
  }, Ve = [
477
478
  "style",
478
479
  "className",
@@ -487,33 +488,34 @@ const oe = {
487
488
  "showLine",
488
489
  "selectable",
489
490
  "allowDrop",
490
- "actionOnClick"
491
- ], _ = class _ extends ue {
491
+ "actionOnClick",
492
+ "animation"
493
+ ], _ = class _ extends Ke {
492
494
  constructor(e, n) {
493
495
  super(e, n);
494
- p(this, "context");
495
- p(this, "key2nodeProps", {});
496
- p(this, "dragNode");
497
- p(this, "nodeListRef");
498
- p(this, "dropPosition");
499
- p(this, "getMergedProps", (e) => {
496
+ y(this, "context");
497
+ y(this, "key2nodeProps", {});
498
+ y(this, "dragNode");
499
+ y(this, "nodeListRef");
500
+ y(this, "dropPosition");
501
+ y(this, "getMergedProps", (e) => {
500
502
  const { componentConfig: n } = this.context ?? {}, s = e || this.props, t = (n == null ? void 0 : n.Tree) || {}, i = {};
501
503
  return Ve.forEach((a) => {
502
- ee(s[a]) ? ee(t[a]) ? i[a] = Fe[a] : i[a] = t[a] : i[a] = s[a];
504
+ te(s[a]) ? te(t[a]) ? i[a] = Fe[a] : i[a] = t[a] : i[a] = s[a];
503
505
  }), i;
504
506
  });
505
507
  // index: 第几个dom元素, 如果传入的是字符串,会作为 node 的 key去查找。
506
508
  // nodeProps 参数似乎咩有什么用。。。但是不知道外部有没有调用,就当key用吧。。
507
- p(this, "scrollIntoView", (e, n) => {
509
+ y(this, "scrollIntoView", (e, n) => {
508
510
  let s = e;
509
511
  n && (s = n._key), this.nodeListRef && this.nodeListRef.scrollIntoView(
510
512
  s,
511
513
  n || this.key2nodeProps[s]
512
514
  );
513
515
  });
514
- p(this, "getTreeData", () => "treeData" in this.props ? this.props.treeData : Ae(this.props.children));
516
+ y(this, "getTreeData", () => "treeData" in this.props ? this.props.treeData : Ae(this.props.children));
515
517
  // 以下外部传入的属性改变时,需要更新nodeList
516
- p(this, "needUpdateTreeData", (e, n) => {
518
+ y(this, "needUpdateTreeData", (e, n) => {
517
519
  const s = [
518
520
  "fieldNames",
519
521
  "selectable",
@@ -525,50 +527,50 @@ const oe = {
525
527
  "treeData",
526
528
  "children"
527
529
  ];
528
- return e.treeData !== n.treeData || e.children !== n.children || s.some((t) => O(e[t], n[t]));
530
+ return e.treeData !== n.treeData || e.children !== n.children || s.some((t) => I(e[t], n[t]));
529
531
  });
530
532
  // 根据 fieldNames 获取节点数据
531
- p(this, "getFieldInfo", (e) => {
533
+ y(this, "getFieldInfo", (e) => {
532
534
  const n = this.getMergedProps(), { selectable: s } = n, t = {
533
- ...oe,
535
+ ...de,
534
536
  ..."treeData" in this.props ? n.fieldNames : {}
535
537
  }, i = {
536
- children: I(e, t.children) || e[t.children],
537
- selectable: (I(e, t.selectable) || e[t.selectable]) ?? s,
538
- checkable: (I(e, t.checkable) || e[t.checkable]) ?? this.props.checkable,
539
- title: I(e, t.title) || e[t.title],
540
- disabled: I(e, t.disabled) || e[t.disabled],
541
- disableCheckbox: I(e, t.disableCheckbox) || e[t.disableCheckbox],
542
- isLeaf: I(e, t.isLeaf) || e[t.isLeaf],
543
- key: I(e, t.key) || e[t.key]
538
+ children: O(e, t.children),
539
+ selectable: B(e, t.selectable) ? O(e, t.selectable) : s,
540
+ checkable: B(e, t.checkable) ? O(e, t.checkable) : this.props.checkable,
541
+ title: O(e, t.title),
542
+ disabled: O(e, t.disabled),
543
+ disableCheckbox: O(e, t.disableCheckbox),
544
+ isLeaf: O(e, t.isLeaf),
545
+ key: O(e, t.key)
544
546
  };
545
- return (!ke(e, t.key) || !(t.key in e)) && delete i.key, i;
547
+ return B(e, t.key) || delete i.key, i;
546
548
  });
547
- p(this, "getNodeList", (e, n) => {
549
+ y(this, "getNodeList", (e, n) => {
548
550
  this.key2nodeProps = {};
549
551
  const s = n || this.context.getPrefixCls("tree"), t = [];
550
552
  let i = 0;
551
- const { showLine: a, blockNode: d } = this.getMergedProps(), o = (K, g) => {
552
- const c = K.length;
553
- return K.map((m, x) => {
553
+ const { showLine: a, blockNode: d } = this.getMergedProps(), o = (u, g) => {
554
+ const l = u.length;
555
+ return u.map((k, x) => {
554
556
  const {
555
- children: k,
556
- selectable: l,
557
+ children: m,
558
+ selectable: c,
557
559
  checkable: C,
558
560
  key: D = `${(g == null ? void 0 : g._key) || ""}-${x}`,
559
561
  ...N
560
- } = this.getFieldInfo(m), h = {
562
+ } = this.getFieldInfo(k), h = {
561
563
  // data 中含有dataRef时,优先级较高
562
- dataRef: m,
564
+ dataRef: k,
563
565
  draggable: this.props.draggable,
564
- selectable: l,
566
+ selectable: c,
565
567
  checkable: C,
566
568
  showLine: a,
567
569
  blockNode: d,
568
- ...m,
570
+ ...k,
569
571
  ...N,
570
572
  key: D,
571
- children: k,
573
+ children: m,
572
574
  _key: D,
573
575
  _index: i++,
574
576
  parentKey: g ? g._key : void 0,
@@ -577,21 +579,21 @@ const oe = {
577
579
  // 保存node在sowLine模式下是否显示缩进线。如果父节点是其所在层级的最后一个节点,那么所有的子节点(包括孙子节点等)在父节点所在层级的缩进格都不显示缩进线。
578
580
  _lineless: g && g._lineless ? [...g._lineless || [], g._isTail] : []
579
581
  };
580
- return c === x + 1 && (h.className = M(
582
+ return l === x + 1 && (h.className = M(
581
583
  `${s}-node-is-tail`,
582
584
  h.className
583
- )), t.push(h), this.key2nodeProps[D] = h, k && k.length && (this.key2nodeProps[D].children = o(k, {
585
+ )), t.push(h), this.key2nodeProps[D] = h, m && m.length && (this.key2nodeProps[D].children = o(m, {
584
586
  _key: D,
585
587
  _level: h._level + 1,
586
588
  _lineless: h._lineless,
587
- _isTail: c === x + 1,
589
+ _isTail: l === x + 1,
588
590
  pathParentKeys: [...(g == null ? void 0 : g.pathParentKeys) || [], D]
589
591
  })), h;
590
592
  });
591
593
  };
592
594
  return o(e || [], {}), t;
593
595
  });
594
- p(this, "getInitExpandedKeys", (e) => {
596
+ y(this, "getInitExpandedKeys", (e) => {
595
597
  if (!this.getMergedProps().autoExpandParent)
596
598
  return e || [];
597
599
  if (!e)
@@ -607,7 +609,7 @@ const oe = {
607
609
  }));
608
610
  }), Object.keys(n);
609
611
  });
610
- p(this, "getInitCheckedKeys", (e) => {
612
+ y(this, "getInitCheckedKeys", (e) => {
611
613
  if (!this.props.checkStrictly) {
612
614
  const { checkedKeys: n, indeterminateKeys: s } = He(
613
615
  e,
@@ -623,7 +625,7 @@ const oe = {
623
625
  halfCheckedKeys: this.props.halfCheckedKeys || []
624
626
  };
625
627
  });
626
- p(this, "handleSelect", (e, n) => {
628
+ y(this, "handleSelect", (e, n) => {
627
629
  const { onSelect: s } = this.props, t = { e: n, node: this.getCacheNode([e])[0] };
628
630
  if (this.props.multiple) {
629
631
  const i = [...this.state.selectedKeys], a = i.indexOf(e);
@@ -631,41 +633,41 @@ const oe = {
631
633
  } else
632
634
  t.selected = !0, t.selectedNodes = this.getCacheNode([e]), "selectedKeys" in this.props || this.setState({ selectedKeys: [e] }), s == null || s([e], t);
633
635
  });
634
- p(this, "handleCheck", (e, n, s) => {
636
+ y(this, "handleCheck", (e, n, s) => {
635
637
  const { checkedStrategy: t } = this.getMergedProps(), { onCheck: i, checkStrictly: a } = this.props, d = { e: s, node: this.getCacheNode([n])[0] };
636
- let o = this.state.checkedKeys, K = this.state.halfCheckedKeys;
638
+ let o = this.state.checkedKeys, u = this.state.halfCheckedKeys;
637
639
  if (a) {
638
- e ? o = o.concat(n) : o = o.filter((c) => c !== n);
640
+ e ? o = o.concat(n) : o = o.filter((l) => l !== n);
639
641
  const g = {};
640
- "checkedKeys" in this.props || (g.checkedKeys = o), "halfCheckedKeys" in this.props || (g.halfCheckedKeys = K), Ke(g) || this.setState({ ...g });
642
+ "checkedKeys" in this.props || (g.checkedKeys = o), "halfCheckedKeys" in this.props || (g.halfCheckedKeys = u), ke(g) || this.setState({ ...g });
641
643
  } else {
642
- const { checkedKeys: g, indeterminateKeys: c } = Re(
644
+ const { checkedKeys: g, indeterminateKeys: l } = Re(
643
645
  n,
644
646
  e,
645
647
  o,
646
648
  this.key2nodeProps,
647
- K
649
+ u
648
650
  );
649
- o = g, K = c, "checkedKeys" in this.props ? this.setState({ halfCheckedKeys: K }) : this.setState({ checkedKeys: o, halfCheckedKeys: K }), t === _.SHOW_PARENT ? o = o.filter((m) => {
650
- const x = this.key2nodeProps[m];
651
+ o = g, u = l, "checkedKeys" in this.props ? this.setState({ halfCheckedKeys: u }) : this.setState({ checkedKeys: o, halfCheckedKeys: u }), t === _.SHOW_PARENT ? o = o.filter((k) => {
652
+ const x = this.key2nodeProps[k];
651
653
  if (!x || o.indexOf(x.parentKey) === -1)
652
654
  return !0;
653
- }) : t === _.SHOW_CHILD && (o = o.filter((m) => {
654
- var k, l;
655
- const x = this.key2nodeProps[m];
656
- if (!x || !((k = x.children) != null && k.length) || (l = x.children) != null && l.every((C) => o.indexOf(C._key) === -1))
655
+ }) : t === _.SHOW_CHILD && (o = o.filter((k) => {
656
+ var m, c;
657
+ const x = this.key2nodeProps[k];
658
+ if (!x || !((m = x.children) != null && m.length) || (c = x.children) != null && c.every((C) => o.indexOf(C._key) === -1))
657
659
  return !0;
658
660
  }));
659
661
  }
660
662
  i == null || i(o, {
661
663
  checkedNodes: this.getCacheNode(o),
662
664
  checked: e,
663
- halfCheckedKeys: K,
664
- halfCheckedNodes: this.getCacheNode(K),
665
+ halfCheckedKeys: u,
666
+ halfCheckedNodes: this.getCacheNode(u),
665
667
  ...d
666
668
  });
667
669
  });
668
- p(this, "handleLoadMore", (e) => {
670
+ y(this, "handleLoadMore", (e) => {
669
671
  const { loadMore: n } = this.props;
670
672
  if ($(n)) {
671
673
  const { loadingKeys: s = [], loadedKeys: t } = this.state;
@@ -695,27 +697,27 @@ const oe = {
695
697
  );
696
698
  }
697
699
  });
698
- p(this, "handleNodeDragStart", (e, n) => {
700
+ y(this, "handleNodeDragStart", (e, n) => {
699
701
  this.dragNode = this.getCacheNode([n._key])[0], this.dropPosition = 0;
700
702
  const { onDragStart: s } = this.props;
701
703
  s == null || s(e, this.getCacheNode([n._key])[0]);
702
704
  });
703
- p(this, "handleNodeDragEnd", (e, n) => {
705
+ y(this, "handleNodeDragEnd", (e, n) => {
704
706
  this.dragNode = null, this.dropPosition = 0;
705
707
  const { onDragEnd: s } = this.props;
706
708
  s == null || s(e, this.getCacheNode([n._key])[0]);
707
709
  });
708
- p(this, "handleNodeDragOver", (e, n, s) => {
710
+ y(this, "handleNodeDragOver", (e, n, s) => {
709
711
  this.dropPosition = s;
710
712
  const { onDragOver: t } = this.props;
711
713
  t == null || t(e, this.getCacheNode([n._key])[0]);
712
714
  });
713
- p(this, "handleNodeDragLeave", (e, n) => {
715
+ y(this, "handleNodeDragLeave", (e, n) => {
714
716
  this.dropPosition = 0;
715
717
  const { onDragLeave: s } = this.props;
716
718
  s == null || s(e, this.getCacheNode([n._key])[0]);
717
719
  });
718
- p(this, "isChildOfNode", (e, n) => {
720
+ y(this, "isChildOfNode", (e, n) => {
719
721
  let s = this.key2nodeProps[e.parentKey];
720
722
  for (; s; ) {
721
723
  const { _key: t, parentKey: i } = s;
@@ -725,7 +727,7 @@ const oe = {
725
727
  s = this.key2nodeProps[i];
726
728
  }
727
729
  });
728
- p(this, "isSameNode", (e, n) => {
730
+ y(this, "isSameNode", (e, n) => {
729
731
  if (e === void 0 || n === void 0) return !1;
730
732
  if (e === n) return !0;
731
733
  const s = e.key, t = n.key;
@@ -733,7 +735,7 @@ const oe = {
733
735
  const i = e.props._key, a = n.props._key;
734
736
  return i === void 0 && a === void 0 ? !1 : i === a;
735
737
  });
736
- p(this, "handleNodeDrop", (e, n, s) => {
738
+ y(this, "handleNodeDrop", (e, n, s) => {
737
739
  if (this.dragNode) {
738
740
  const { allowDrop: t } = this.getMergedProps(), { onDrop: i } = this.props, a = this.getCacheNode([n._key])[0];
739
741
  if (i && !this.isChildOfNode(n, this.dragNode) && !this.isSameNode(this.dragNode, a)) {
@@ -752,7 +754,7 @@ const oe = {
752
754
  }
753
755
  }
754
756
  });
755
- p(this, "handleAllowDrop", (e, n) => {
757
+ y(this, "handleAllowDrop", (e, n) => {
756
758
  const { allowDrop: s } = this.getMergedProps();
757
759
  let t = !0;
758
760
  return typeof s == "function" && (t = s({
@@ -761,21 +763,21 @@ const oe = {
761
763
  dropPosition: n
762
764
  })), t;
763
765
  });
764
- p(this, "handleExpand", (e, n) => {
765
- const { currentExpandKeys: s, expandedKeys: t = [] } = this.state, { onExpand: i } = this.props;
766
+ y(this, "handleExpand", (e, n) => {
767
+ const { currentExpandKeys: s, expandedKeys: t = [] } = this.state, { animation: i } = this.getMergedProps(), { onExpand: a } = this.props;
766
768
  if (s.indexOf(n) > -1)
767
769
  return;
768
- let a = [];
769
- e ? a = Array.from(/* @__PURE__ */ new Set([...t, n])) : a = t.filter((d) => d !== n), "expandedKeys" in this.props || this.setState({
770
- expandedKeys: a,
771
- currentExpandKeys: [...s, n]
772
- }), i == null || i(a, {
770
+ let d = [];
771
+ e ? d = Array.from(/* @__PURE__ */ new Set([...t, n])) : d = t.filter((o) => o !== n), "expandedKeys" in this.props || this.setState({
772
+ expandedKeys: d,
773
+ currentExpandKeys: i ? [...s, n] : []
774
+ }), a == null || a(d, {
773
775
  expanded: e,
774
776
  node: this.getCacheNode([n])[0],
775
- expandedNodes: this.getCacheNode(a)
777
+ expandedNodes: this.getCacheNode(d)
776
778
  });
777
779
  });
778
- p(this, "getCacheNode", (e) => {
780
+ y(this, "getCacheNode", (e) => {
779
781
  const { __PqbAdapterMode__: n } = this.props, s = [];
780
782
  return [].concat(e).forEach((i) => {
781
783
  const a = this.key2nodeProps[i];
@@ -783,10 +785,10 @@ const oe = {
783
785
  }), this.getNodeProps(s).map((i) => n ? {
784
786
  props: i,
785
787
  key: e
786
- } : /* @__PURE__ */ B(R, { ...i, key: i.key }));
788
+ } : /* @__PURE__ */ q(R, { ...i, key: i.key }));
787
789
  });
788
790
  // 转换为 set 类型,便于查找。主要是传递给node-list使用
789
- p(this, "getDataSet", (e) => {
791
+ y(this, "getDataSet", (e) => {
790
792
  var n, s, t, i;
791
793
  return {
792
794
  expandedKeysSet: (e == null ? void 0 : e.expandedKeysSet) || new Set(((n = this.state) == null ? void 0 : n.expandedKeys) || []),
@@ -796,47 +798,47 @@ const oe = {
796
798
  };
797
799
  });
798
800
  // dataSet:传入构建好的expandedKeysSet,, checkedKeysSet, halfCheckedKeysSet ,性能优化
799
- p(this, "getNodeProps", (e, n) => {
801
+ y(this, "getNodeProps", (e, n) => {
800
802
  const { autoExpandParent: s } = this.getMergedProps(), { loadMore: t } = this.props, {
801
803
  selectedKeys: i,
802
804
  expandedKeys: a,
803
805
  checkedKeys: d,
804
806
  loadingKeys: o = [],
805
- loadedKeys: K = []
807
+ loadedKeys: u = []
806
808
  } = this.state, {
807
809
  expandedKeysSet: g,
808
- checkedKeysSet: c,
809
- selectedKeysSet: m,
810
+ checkedKeysSet: l,
811
+ selectedKeysSet: k,
810
812
  halfCheckedKeysSet: x
811
- } = this.getDataSet(n), k = (l) => {
812
- const C = l.children && l.children.length, D = {
813
+ } = this.getDataSet(n), m = (c) => {
814
+ const C = c.children && c.children.length, D = {
813
815
  isLeaf: !C,
814
816
  autoExpandParent: C ? s : !1,
815
- expanded: g ? g.has(l._key) : a.indexOf(l._key) > -1
817
+ expanded: g ? g.has(c._key) : a.indexOf(c._key) > -1
816
818
  };
817
819
  if (t) {
818
- const N = K.indexOf(l._key) > -1;
819
- D.loaded = N, D.isLeaf = C ? !1 : l.isLeaf;
820
+ const N = u.indexOf(c._key) > -1;
821
+ D.loaded = N, D.isLeaf = C ? !1 : c.isLeaf;
820
822
  }
821
823
  return {
822
- ...l,
824
+ ...c,
823
825
  ...D,
824
- selected: m.has(l._key),
825
- indeterminated: x.has(l._key),
826
- loading: o.indexOf(l._key) > -1,
827
- checked: c.has(l._key),
826
+ selected: k.has(c._key),
827
+ indeterminated: x.has(c._key),
828
+ loading: o.indexOf(c._key) > -1,
829
+ checked: l.has(c._key),
828
830
  selectedKeys: i,
829
831
  checkedKeys: d,
830
832
  loadingKeys: o,
831
- loadedKeys: K,
833
+ loadedKeys: u,
832
834
  expandedKeys: a,
833
- childrenData: l.children || [],
835
+ childrenData: c.children || [],
834
836
  children: null
835
837
  };
836
838
  };
837
- return me(e) ? e.map((l) => k(l)) : k(e);
839
+ return me(e) ? e.map((c) => m(c)) : m(e);
838
840
  });
839
- p(this, "handleExpandEnd", (e) => {
841
+ y(this, "handleExpandEnd", (e) => {
840
842
  this.setState((n) => {
841
843
  const { currentExpandKeys: s } = n;
842
844
  return s.indexOf(e) > -1 ? {
@@ -845,7 +847,7 @@ const oe = {
845
847
  });
846
848
  });
847
849
  // 获取tree的state数据,在子组件里使用。
848
- p(this, "getTreeState", () => this.state);
850
+ y(this, "getTreeState", () => this.state);
849
851
  this.state = {};
850
852
  const s = this.getTreeData(), t = this.getNodeList(s, n.getPrefixCls("tree")), { checkedKeys: i, halfCheckedKeys: a } = this.getInitCheckedKeys(
851
853
  e.checkedKeys || e.defaultCheckedKeys || []
@@ -865,11 +867,11 @@ const oe = {
865
867
  }
866
868
  static getDerivedStateFromProps(e, n) {
867
869
  const s = {};
868
- return "selectedKeys" in e && !O(e.selectedKeys, n.selectedKeys) && (s.selectedKeys = e.selectedKeys || []), Object.keys(s).length ? s : null;
870
+ return "selectedKeys" in e && !I(e.selectedKeys, n.selectedKeys) && (s.selectedKeys = e.selectedKeys || []), Object.keys(s).length ? s : null;
869
871
  }
870
872
  componentDidUpdate(e) {
871
873
  const n = this.getMergedProps(e), s = this.getMergedProps();
872
- if (e !== this.props || !O(n, s)) {
874
+ if (e !== this.props || !I(n, s)) {
873
875
  const t = {};
874
876
  if (this.needUpdateTreeData(
875
877
  { prevMergedProps: n, ...e },
@@ -878,23 +880,23 @@ const oe = {
878
880
  const a = this.getTreeData(), d = this.getNodeList(a);
879
881
  t.treeData = a, t.nodeList = d;
880
882
  }
881
- if (t.treeData || "checkedKeys" in this.props && !O(e.checkedKeys, this.props.checkedKeys)) {
883
+ if (t.treeData || "checkedKeys" in this.props && !I(e.checkedKeys, this.props.checkedKeys)) {
882
884
  const a = "checkedKeys" in this.props ? this.props.checkedKeys : this.state.checkedKeys, { halfCheckedKeys: d, checkedKeys: o } = this.getInitCheckedKeys(
883
885
  a || []
884
886
  );
885
- O(o, this.state.checkedKeys) || (t.checkedKeys = o), O(d, this.state.halfCheckedKeys) || (t.halfCheckedKeys = d);
887
+ I(o, this.state.checkedKeys) || (t.checkedKeys = o), I(d, this.state.halfCheckedKeys) || (t.halfCheckedKeys = d);
886
888
  }
887
- this.props.checkStrictly && "halfCheckedKeys" in this.props && !O(e.halfCheckedKeys, this.props.halfCheckedKeys) && (t.halfCheckedKeys = this.props.halfCheckedKeys), "expandedKeys" in this.props && !O(this.props.expandedKeys, e.expandedKeys) && (t.expandedKeys = this.props.expandedKeys, t.currentExpandKeys = [
888
- ...t.expandedKeys,
889
- ...this.state.expandedKeys
889
+ this.props.checkStrictly && "halfCheckedKeys" in this.props && !I(e.halfCheckedKeys, this.props.halfCheckedKeys) && (t.halfCheckedKeys = this.props.halfCheckedKeys), "expandedKeys" in this.props && !I(this.props.expandedKeys, e.expandedKeys) && (t.expandedKeys = this.props.expandedKeys, t.currentExpandKeys = s.animation ? [
890
+ ...t.expandedKeys ?? [],
891
+ ...this.state.expandedKeys ?? []
890
892
  ].reduce((a, d) => {
891
893
  const o = a.indexOf(d);
892
894
  return o === -1 ? a.push(d) : a.splice(o, 1), a;
893
895
  }, []).filter((a, d, o) => {
894
- var K;
896
+ var u;
895
897
  if (this.key2nodeProps[a])
896
- return this.key2nodeProps[a].pathParentKeys.some((c) => o.indexOf(c) > -1) ? !1 : (K = this.key2nodeProps[a].children) == null ? void 0 : K.length;
897
- }));
898
+ return this.key2nodeProps[a].pathParentKeys.some((l) => o.indexOf(l) > -1) ? !1 : (u = this.key2nodeProps[a].children) == null ? void 0 : u.length;
899
+ }) : []);
898
900
  const i = t.currentExpandKeys || this.state.currentExpandKeys;
899
901
  t.treeData && i && (t.currentExpandKeys = i.filter((a) => {
900
902
  const d = t.treeData.find((o) => o.key === a);
@@ -911,23 +913,26 @@ const oe = {
911
913
  height: i,
912
914
  style: a,
913
915
  icons: d,
914
- actionOnClick: o
915
- } = this.getMergedProps(), { loadMore: K, checkable: g } = this.props, c = t ? {
916
+ actionOnClick: o,
917
+ animation: u
918
+ } = this.getMergedProps(), { loadMore: g, checkable: l } = this.props, k = t ? {
916
919
  threshold: 100,
917
920
  ...t
918
921
  } : i ? { height: i, threshold: 100 } : {
919
922
  threshold: null
920
- }, { getPrefixCls: m, rtl: x } = this.context, k = m("tree");
923
+ }, { getPrefixCls: x, rtl: m } = this.context, c = x("tree");
921
924
  return /* @__PURE__ */ b(
922
- q.Provider,
925
+ G.Provider,
923
926
  {
924
927
  value: {
925
928
  icons: d,
929
+ animation: u,
926
930
  key2nodeProps: this.key2nodeProps,
927
931
  getFieldInfo: this.getFieldInfo,
928
932
  getTreeState: this.getTreeState,
929
933
  getNodeProps: this.getNodeProps,
930
- onExpandEnd: this.handleExpandEnd,
934
+ onExpandEnd: u ? this.handleExpandEnd : () => {
935
+ },
931
936
  onSelect: this.handleSelect,
932
937
  onCheck: this.handleCheck,
933
938
  onNodeDragStart: this.handleNodeDragStart,
@@ -938,30 +943,30 @@ const oe = {
938
943
  onExpand: this.handleExpand,
939
944
  renderExtra: this.props.renderExtra,
940
945
  renderTitle: this.props.renderTitle,
941
- loadMore: K && this.handleLoadMore,
946
+ loadMore: g && this.handleLoadMore,
942
947
  allowDrop: this.handleAllowDrop,
943
948
  actionOnClick: o,
944
- virtualListProps: c
949
+ virtualListProps: k
945
950
  },
946
951
  children: /* @__PURE__ */ b(
947
952
  Te,
948
953
  {
949
- ref: (l) => {
950
- this.nodeListRef = l;
954
+ ref: (C) => {
955
+ this.nodeListRef = C;
951
956
  },
952
957
  className: M(
953
- k,
958
+ c,
954
959
  {
955
- [`${k}-checkable`]: g,
956
- [`${k}-show-line`]: n,
957
- [`${k}-size-${s}`]: s,
958
- [`${k}-rtl`]: x
960
+ [`${c}-checkable`]: l,
961
+ [`${c}-show-line`]: n,
962
+ [`${c}-size-${s}`]: s,
963
+ [`${c}-rtl`]: m
959
964
  },
960
965
  e
961
966
  ),
962
967
  style: a,
963
968
  filterNode: this.props.filterNode,
964
- virtualListProps: c,
969
+ virtualListProps: k,
965
970
  expandedKeys: this.state.expandedKeys,
966
971
  currentExpandKeys: this.state.currentExpandKeys,
967
972
  getNodeProps: this.getNodeProps,
@@ -980,10 +985,10 @@ const oe = {
980
985
  );
981
986
  }
982
987
  };
983
- p(_, "displayName", "Tree"), p(_, "SHOW_PARENT", "parent"), p(_, "SHOW_ALL", "all"), p(_, "SHOW_CHILD", "child"), p(_, "Node", R), p(_, "contextType", Y);
984
- let te = _;
988
+ y(_, "displayName", "Tree"), y(_, "SHOW_PARENT", "parent"), y(_, "SHOW_ALL", "all"), y(_, "SHOW_CHILD", "child"), y(_, "Node", R), y(_, "contextType", z);
989
+ let se = _;
985
990
  export {
986
- te as T,
991
+ se as T,
987
992
  Ae as a,
988
993
  Re as b,
989
994
  He as g