@unicom-cloud/ui 0.8.72 → 0.8.73

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 (357) hide show
  1. package/Affix.js +2 -2
  2. package/Alert.js +2 -2
  3. package/AutoComplete.js +2 -2
  4. package/BackTop.js +2 -2
  5. package/Badge.js +2 -2
  6. package/Breadcrumb.js +3 -3
  7. package/Button.js +1 -1
  8. package/Calendar.js +1 -1
  9. package/Card.js +1 -1
  10. package/Carousel.js +1 -1
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +1 -1
  13. package/Collapse.js +1 -1
  14. package/ColorPicker.js +1 -1
  15. package/Comment.js +1 -1
  16. package/ConfigProvider.js +1 -1
  17. package/Copy.js +1 -1
  18. package/DatePicker.js +1 -1
  19. package/Descriptions.js +1 -1
  20. package/Divider.js +1 -1
  21. package/Draggable.js +1 -1
  22. package/Dropdown.js +4 -4
  23. package/Empty.js +1 -1
  24. package/Icon.js +1 -1
  25. package/IconHover.js +1 -1
  26. package/Image.js +1 -1
  27. package/InputNumber.js +1 -1
  28. package/Layout.js +1 -1
  29. package/Link.js +1 -1
  30. package/List.js +2 -2
  31. package/Mentions.js +2 -2
  32. package/Menu.js +1 -1
  33. package/Message.js +6 -5
  34. package/Modal.js +1 -1
  35. package/Notice.js +4 -4
  36. package/Notification.js +7 -6
  37. package/OverflowEllipsis.js +1 -1
  38. package/PageHeader.js +1 -1
  39. package/Popconfirm.js +2 -2
  40. package/Popover.js +2 -2
  41. package/Progress.js +1 -1
  42. package/Radio.js +1 -1
  43. package/Rate.js +2 -2
  44. package/ResizeBox.js +2 -2
  45. package/Result.js +1 -1
  46. package/SelectView.js +4 -3
  47. package/Skeleton.js +1 -1
  48. package/Slider.js +3 -3
  49. package/Space.js +1 -1
  50. package/SpeechSynthesis.js +20 -20
  51. package/Spin.js +2 -2
  52. package/Statistic.js +1 -1
  53. package/Steps.js +1 -1
  54. package/Switch.js +7 -5
  55. package/Table.js +1 -1
  56. package/Tabs.js +1 -1
  57. package/Tag.js +1 -1
  58. package/Tooltip.js +3 -3
  59. package/Transfer.js +2 -2
  60. package/Tree.js +1 -1
  61. package/Trigger.js +8 -7
  62. package/affix/index.js +2 -2
  63. package/alert/index.js +2 -2
  64. package/anchor/Anchor.js +53 -50
  65. package/anchor/Link.js +1 -1
  66. package/anchor/util.js +1 -1
  67. package/auto-complete/index.js +2 -2
  68. package/avatar/Avatar.js +1 -1
  69. package/avatar/Group.js +1 -1
  70. package/back-top/index.js +2 -2
  71. package/badge/Count.js +1 -1
  72. package/badge/index.js +50 -48
  73. package/breadcrumb/index.js +3 -3
  74. package/button/Group.js +1 -1
  75. package/button/index.js +1 -1
  76. package/calendar/index.js +2 -2
  77. package/card/Grid.js +1 -1
  78. package/card/Meta.js +1 -1
  79. package/card/index.js +1 -1
  80. package/carousel/Arrow.js +1 -1
  81. package/carousel/Indicator.js +1 -1
  82. package/carousel/index.js +1 -1
  83. package/cascader/Cascader.js +4 -4
  84. package/cascader/index.js +1 -1
  85. package/cascader/util.js +1 -1
  86. package/checkbox/Checkbox.js +3 -3
  87. package/checkbox/Group.js +3 -3
  88. package/checkbox/index.js +1 -1
  89. package/chunk/{BnWo0OJ0.js → 7HDzVe32.js} +7 -7
  90. package/chunk/{6nKl68Er.js → B0UZ1Ee2.js} +3 -3
  91. package/chunk/{b1e8awfs.js → B0n0iRhF.js} +1 -1
  92. package/chunk/{BDHuWwhT.js → B7hulkj9.js} +2 -2
  93. package/chunk/Bj4EV0eG.js +27 -0
  94. package/chunk/{Bfq4YEcr.js → Bmvhjhzq.js} +9 -8
  95. package/chunk/{Cgbja_v_.js → Byd0ztYY.js} +13 -12
  96. package/chunk/{URXCKjXr.js → C0pRaDCf.js} +23 -23
  97. package/chunk/{B4JiMp8I.js → CCVU-Kst.js} +8 -2
  98. package/chunk/{ClaNycDy.js → Cc_-i0o_.js} +2 -2
  99. package/chunk/CiY7w1ZO.js +647 -0
  100. package/chunk/{fFjj2KuF.js → Cj2SQJiO.js} +392 -414
  101. package/chunk/Coz3rCng.js +33 -0
  102. package/chunk/{BHL-PzAD.js → CplLA01W.js} +17 -17
  103. package/chunk/{CAVVFFyZ.js → D2LLXZQX.js} +5 -7
  104. package/chunk/DAAff-FT.js +59 -0
  105. package/chunk/{Cf4qn5jY.js → DJDOFlqC.js} +2 -2
  106. package/chunk/DU1RCDfh.js +29 -0
  107. package/chunk/{CdaT1b_F.js → DeV0v__J.js} +2 -2
  108. package/chunk/{IUjEMHU1.js → DejjIa3N.js} +176 -173
  109. package/chunk/{y9unmTx_.js → Dg0M2OmF.js} +125 -125
  110. package/chunk/{DV7ywe_q.js → RS6OAxzv.js} +2 -2
  111. package/chunk/{rp1MtSd0.js → UDX9U6M7.js} +3 -3
  112. package/chunk/{Biupwn8l.js → ZrBrCzQX.js} +6 -5
  113. package/chunk/{CP7Ac47f.js → oHDWCJnz.js} +3 -3
  114. package/chunk/{CdAuhef7.js → uH6uxyao.js} +1 -1
  115. package/chunk/{D090jlwP.js → xAb6ZgqS.js} +1 -1
  116. package/collapse/Collapse.js +3 -3
  117. package/collapse/Item.js +3 -3
  118. package/collapse/index.js +1 -1
  119. package/color-picker/ControlBar.js +1 -1
  120. package/color-picker/InputAlpha.js +1 -1
  121. package/color-picker/InputHex.js +8 -8
  122. package/color-picker/InputRgb.js +6 -6
  123. package/color-picker/Palette.js +2 -2
  124. package/color-picker/Panel.js +16 -16
  125. package/color-picker/colors.js +4 -4
  126. package/color-picker/index.js +3 -3
  127. package/color-picker/utils.js +1 -1
  128. package/comment/index.js +1 -1
  129. package/config-provider/ConfigProvider.js +2 -2
  130. package/config-provider/context.js +1 -1
  131. package/config-provider/index.js +2 -2
  132. package/copy/index.js +1 -1
  133. package/date-picker/Picker.js +1 -1
  134. package/date-picker/PickerRange.js +2 -2
  135. package/date-picker/index.js +1 -1
  136. package/descriptions/index.js +2 -2
  137. package/divider/index.js +1 -1
  138. package/draggable/index.js +1 -1
  139. package/drawer/Drawer.js +121 -111
  140. package/dropdown/Button.js +1 -1
  141. package/dropdown/index.js +4 -4
  142. package/empty/index.js +1 -1
  143. package/form/Form.js +2 -2
  144. package/form/FormItem.js +2 -2
  145. package/form/promisify.js +9 -8
  146. package/form/store.js +1 -1
  147. package/form/util.js +1 -1
  148. package/grid/Col.js +1 -1
  149. package/grid/Row.js +2 -2
  150. package/grid/grid-item.js +2 -2
  151. package/grid/grid.js +2 -2
  152. package/hooks/index.js +5 -5
  153. package/hooks/useInView.js +1 -1
  154. package/hooks/useIntersectionObserver.js +1 -1
  155. package/hooks/useMergeValue.js +1 -1
  156. package/hooks/useOverflowHidden.js +1 -1
  157. package/hooks/useOverrideRef.js +1 -1
  158. package/hooks/useVerificationCode.js +2 -2
  159. package/icon/index.js +1 -1
  160. package/icon-hover/index.js +1 -1
  161. package/image/Image.js +4 -4
  162. package/image/ImagePreview.js +8 -8
  163. package/image/ImagePreviewArrow.js +1 -1
  164. package/image/ImagePreviewGroup.js +2 -2
  165. package/image/index.js +1 -1
  166. package/index.js +591 -571
  167. package/input/Group.js +1 -1
  168. package/input/Input.js +47 -46
  169. package/input/InputElement.js +3 -3
  170. package/input/Password.js +2 -2
  171. package/input/Search.js +2 -2
  172. package/input/Textarea.js +6 -5
  173. package/input-number/index.js +1 -1
  174. package/input-tag/InputTag.js +52 -50
  175. package/layout/Content.js +1 -1
  176. package/layout/Footer.js +1 -1
  177. package/layout/Header.js +1 -1
  178. package/layout/Sider.js +3 -3
  179. package/layout/index.js +1 -1
  180. package/link/index.js +1 -1
  181. package/list/Item.js +1 -1
  182. package/list/Meta.js +1 -1
  183. package/list/index.js +2 -2
  184. package/locale/en-US.js +1 -1
  185. package/locale/tr-TR.js +1 -1
  186. package/mentions/index.js +2 -2
  187. package/menu/Item.js +1 -1
  188. package/menu/Menu.js +3 -3
  189. package/menu/OverflowWrap.js +1 -1
  190. package/menu/index.js +2 -2
  191. package/message/index.js +6 -5
  192. package/message/useMessage.js +1 -1
  193. package/modal/Confirm.js +2 -2
  194. package/modal/Modal.js +8 -7
  195. package/modal/index.js +1 -1
  196. package/notice/index.js +4 -4
  197. package/notification/index.js +7 -6
  198. package/notification/useNotification.js +1 -1
  199. package/overflow-ellipsis/OverflowItem.js +1 -1
  200. package/overflow-ellipsis/index.js +1 -1
  201. package/package.json +1 -1
  202. package/page-header/index.js +1 -1
  203. package/pagination/PageItem.js +1 -1
  204. package/pagination/PageJumper.js +1 -1
  205. package/pagination/PageOption.js +1 -1
  206. package/pagination/Pagination.js +2 -2
  207. package/picker/Input.js +1 -1
  208. package/picker/InputRange.js +1 -1
  209. package/popconfirm/index.js +2 -2
  210. package/popover/index.js +2 -2
  211. package/progress/index.js +1 -1
  212. package/radio/Group.js +3 -3
  213. package/radio/Radio.js +3 -3
  214. package/radio/index.js +2 -2
  215. package/rate/index.js +26 -26
  216. package/resize-box/ResizeTrigger.js +21 -20
  217. package/resize-box/Split.js +1 -1
  218. package/resize-box/SplitGroup.js +1 -1
  219. package/resize-box/index.js +2 -2
  220. package/result/index.js +1 -1
  221. package/select/Option.js +1 -1
  222. package/select/Select.js +5 -4
  223. package/select/util.js +12 -12
  224. package/select-view/Core.js +3 -3
  225. package/select-view/index.js +2 -1
  226. package/skeleton/index.js +1 -1
  227. package/slider/Button.js +2 -2
  228. package/slider/Tick.js +1 -1
  229. package/slider/index.js +19 -19
  230. package/slider/util.js +8 -8
  231. package/space/index.js +1 -1
  232. package/speech-synthesis/index.js +20 -20
  233. package/spin/DotLoading.js +1 -1
  234. package/spin/index.js +2 -2
  235. package/statistic/Countdown.js +1 -1
  236. package/statistic/index.js +1 -1
  237. package/steps/index.js +1 -1
  238. package/style/variables.less +1 -1
  239. package/style.css +1 -1
  240. package/switch/index.js +16 -14
  241. package/table/Table.js +2 -2
  242. package/table/index.js +3 -3
  243. package/tabs/Tab.js +3 -3
  244. package/tabs/TabContent.js +2 -2
  245. package/tabs/TabPane.js +1 -1
  246. package/tabs/index.js +2 -2
  247. package/tag/index.js +1 -1
  248. package/time-picker/Picker.js +1 -1
  249. package/time-picker/TimePicker.js +1 -1
  250. package/timeline/Item.js +1 -1
  251. package/timeline/Timeline.js +1 -1
  252. package/tooltip/index.js +3 -3
  253. package/transfer/Item.js +2 -2
  254. package/transfer/List.js +2 -2
  255. package/transfer/index.js +2 -2
  256. package/tree/Animation.js +3 -3
  257. package/tree/Node.js +3 -3
  258. package/tree/NodeList.js +2 -2
  259. package/tree/Tree.js +3 -3
  260. package/tree/index.js +1 -1
  261. package/tree-select/Select.js +25 -25
  262. package/trigger/getPopupStyle.js +2 -2
  263. package/trigger/index.js +7 -6
  264. package/types/badge/interface.d.ts +1 -0
  265. package/types/color-picker/colors.d.ts +1 -1
  266. package/types/date-picker/util.d.ts +1 -1
  267. package/types/drawer/interface.d.ts +10 -0
  268. package/types/index.d.ts +0 -7
  269. package/types/modal/Confirm.d.ts +1 -0
  270. package/types/utils/PqbCSSTransition.d.ts +3 -0
  271. package/types/utils/caseName.d.ts +1 -0
  272. package/types/utils/className.d.ts +1 -0
  273. package/types/utils/color.d.ts +1 -0
  274. package/types/utils/computeScrollIntoView.d.ts +1 -0
  275. package/types/utils/contextHolder.d.ts +1 -0
  276. package/types/utils/copy.d.ts +1 -0
  277. package/types/utils/fileToURL.d.ts +1 -0
  278. package/types/utils/fillNBSP.d.ts +1 -0
  279. package/types/utils/getHighlightText.d.ts +1 -0
  280. package/types/utils/getHotkeyHandler.d.ts +1 -0
  281. package/types/utils/getStringLength.d.ts +1 -0
  282. package/types/utils/include.d.ts +1 -0
  283. package/types/utils/index.d.ts +29 -25
  284. package/types/utils/is.d.ts +1 -1
  285. package/types/utils/keyboardCode.d.ts +1 -0
  286. package/types/utils/math.d.ts +1 -0
  287. package/types/utils/mergeProps.d.ts +1 -0
  288. package/types/utils/mergedToString.d.ts +1 -0
  289. package/types/utils/names.d.ts +497 -81
  290. package/types/utils/omit.d.ts +1 -0
  291. package/types/utils/pick.d.ts +1 -1
  292. package/types/utils/reactTransitionGroup.d.ts +1 -0
  293. package/types/utils/responsiveObserve.d.ts +1 -0
  294. package/types/utils/saveAs.d.ts +1 -0
  295. package/types/utils/screenfull.d.ts +1 -0
  296. package/types/utils/scrollIntoView.d.ts +1 -0
  297. package/types/utils/tinycolor.d.ts +1 -0
  298. package/types/utils/tree.d.ts +1 -0
  299. package/types/utils/tween.d.ts +1 -0
  300. package/types/utils/uuid.d.ts +1 -0
  301. package/types/utils/validate.d.ts +1 -0
  302. package/types/version/index.d.ts +1 -1
  303. package/typography/Base.js +6 -5
  304. package/typography/Ellipsis.js +30 -29
  305. package/typography/Paragraph.js +1 -1
  306. package/typography/Typography.js +1 -1
  307. package/typography/index.js +28 -27
  308. package/upload/TriggerNode.js +1 -1
  309. package/upload/Upload.js +60 -58
  310. package/upload/Uploader.js +21 -21
  311. package/upload/request_.js +4 -3
  312. package/utils/PqbCSSTransition.js +5 -0
  313. package/utils/caseName.js +3 -2
  314. package/utils/className.js +3 -2
  315. package/{chunk/B6X4lnd0.js → utils/color.js} +55 -53
  316. package/utils/computeScrollIntoView.js +128 -0
  317. package/utils/contextHolder.js +3 -2
  318. package/utils/copy.js +4 -2
  319. package/utils/fileToURL.js +3 -2
  320. package/utils/fillNBSP.js +2 -1
  321. package/utils/getHighlightText.js +2 -1
  322. package/utils/getHotkeyHandler.js +2 -1
  323. package/utils/getStringLength.js +2 -1
  324. package/utils/include.js +2 -1
  325. package/utils/index.js +302 -249
  326. package/utils/is.js +104 -101
  327. package/utils/keyboardCode.js +2 -1
  328. package/utils/math.js +35 -0
  329. package/utils/mergeProps.js +2 -1
  330. package/utils/mergedToString.js +2 -1
  331. package/utils/names.js +332 -81
  332. package/utils/omit.js +2 -1
  333. package/utils/pick.js +1 -0
  334. package/utils/react19Adapter.js +1 -1
  335. package/utils/reactDOM.js +1 -1
  336. package/utils/reactTransitionGroup.js +10 -0
  337. package/utils/responsiveObserve.js +2 -1
  338. package/utils/saveAs.js +3 -2
  339. package/utils/screenfull.js +2 -1
  340. package/utils/scrollIntoView.js +4 -2
  341. package/utils/tinycolor.js +30 -0
  342. package/utils/tree.js +87 -0
  343. package/utils/tween.js +6 -0
  344. package/utils/uuid.js +5 -0
  345. package/utils/validate.js +7 -0
  346. package/verification-code/VerificationCode.js +1 -1
  347. package/version/index.js +3 -3
  348. package/virtual-list/VirtualList.js +1 -1
  349. package/watermark/Watermark.js +1 -1
  350. package/chunk/BibHFOCF.js +0 -34
  351. package/chunk/CVYWxu00.js +0 -155
  352. package/chunk/CbLaCJmG.js +0 -26
  353. package/chunk/D-TPB2Do.js +0 -56
  354. package/chunk/DVfOiRp-.js +0 -629
  355. package/chunk/DxxOUMSa.js +0 -98
  356. package/types/utils/CSSTransition.d.ts +0 -2
  357. package/utils/CSSTransition.js +0 -4
@@ -5,36 +5,37 @@ import { jsxs as X, Fragment as ne, jsx as p } from "react/jsx-runtime";
5
5
  import je from "@unicom-cloud/icons/IconUiCheck";
6
6
  import Ue from "@unicom-cloud/icons/IconUiLeft";
7
7
  import We from "@unicom-cloud/icons/IconUiLoading";
8
- import ze from "@unicom-cloud/icons/IconUiRight";
9
- import { H as Ke, z as qe } from "./URXCKjXr.js";
8
+ import Ke from "@unicom-cloud/icons/IconUiRight";
9
+ import { g as ze, y as qe } from "./C0pRaDCf.js";
10
10
  import _e from "lodash/isArray";
11
11
  import W from "lodash/isFunction";
12
12
  import oe from "lodash/isPlainObject";
13
13
  import Y from "lodash/isString";
14
- import Je, { useRef as K, useState as le, useCallback as ae, useEffect as Z, forwardRef as Ge, useContext as Qe, useImperativeHandle as Xe } from "react";
15
- import { a as Ye } from "./Cgbja_v_.js";
14
+ import Je, { useRef as z, useState as le, useCallback as se, useEffect as Z, forwardRef as Ge, useContext as Qe, useImperativeHandle as Xe } from "react";
15
+ import { a as Ye } from "./Byd0ztYY.js";
16
16
  import { u as ue } from "./CQ_WOOmf.js";
17
17
  import { u as Ze } from "./B4YRLi8r.js";
18
18
  import { u as et } from "./BFTV6myl.js";
19
- import { u as ve } from "./CdaT1b_F.js";
19
+ import { u as ve } from "./DeV0v__J.js";
20
20
  import { u as re } from "./a3hR6zLw.js";
21
21
  import tt from "../select-view/index.js";
22
22
  import nt from "../trigger/index.js";
23
23
  import { m as q } from "./JPPo5nY_.js";
24
- import { e as he, y as rt, n as lt, d as we, r as se, o as fe, c as at } from "./BrOW642m.js";
25
- import { b as st, P as it } from "./fFjj2KuF.js";
24
+ import { e as he, y as rt, n as lt, d as we, r as ae, o as fe, c as st } from "./BrOW642m.js";
25
+ import { b as at } from "./Cj2SQJiO.js";
26
26
  import me from "lodash/isEqualWith";
27
27
  import ee from "lodash/get";
28
- import { p as ct } from "./CVYWxu00.js";
29
- import { C as Oe } from "./BDHuWwhT.js";
30
- import { u as ot } from "./oopARUrq.js";
28
+ import { p as it } from "./Coz3rCng.js";
29
+ import { C as Oe } from "./B7hulkj9.js";
30
+ import { u as ct } from "./oopARUrq.js";
31
31
  import { on as Le, off as de } from "../utils/dom.js";
32
- import "./D-TPB2Do.js";
32
+ import "./DAAff-FT.js";
33
33
  import Pe from "../virtual-list/VirtualList.js";
34
34
  import xe from "lodash/isPlainObject.js";
35
- import { u as dt } from "./Bg3uJGPu.js";
35
+ import { u as ot } from "./Bg3uJGPu.js";
36
+ import { P as dt } from "./Bj4EV0eG.js";
36
37
  function ut(t, e) {
37
- const n = K(null), l = ue();
38
+ const n = z(null), l = ue();
38
39
  return n.current || (n.current = t()), re(() => {
39
40
  n.current = t(), l();
40
41
  }, [...e]), n.current;
@@ -68,14 +69,14 @@ class ge {
68
69
  // 保存暴露给外部的属性
69
70
  d(this, "_data");
70
71
  d(this, "_initNode", (e, n = null) => {
71
- const { showEmptyChildren: l, lazyload: s } = this.config, c = { ...Ae, ...this.config.fieldNames }, r = ee(e, c.children) || e[c.children];
72
- let k = Array.isArray(r) ? l ? !1 : r.length === 0 : !0;
73
- s && (c.isLeaf in e ? k = !!ee(e, c.isLeaf) || !!e[c.isLeaf] : k = !1);
74
- const O = ee(e, c.value) || e[c.value], $ = ee(e, c.label) || e[c.label], b = {
72
+ const { showEmptyChildren: l, lazyload: a } = this.config, c = { ...Ae, ...this.config.fieldNames }, r = ee(e, c.children) || e[c.children];
73
+ let C = Array.isArray(r) ? l ? !1 : r.length === 0 : !0;
74
+ a && (c.isLeaf in e ? C = !!ee(e, c.isLeaf) || !!e[c.isLeaf] : C = !1);
75
+ const O = ee(e, c.value) || e[c.value], $ = ee(e, c.label) || e[c.label], k = {
75
76
  ...e,
76
77
  value: O,
77
78
  label: $,
78
- isLeaf: k,
79
+ isLeaf: C,
79
80
  loading: !1,
80
81
  loaded: !1,
81
82
  disabled: n && n.disabled || ee(e, c.disabled) || e[c.disabled],
@@ -87,10 +88,10 @@ class ge {
87
88
  _halfChecked: !1
88
89
  };
89
90
  this._data = {
90
- ...b,
91
- parent: b.parent && b.parent._data
92
- }, Object.keys(b).forEach((x) => {
93
- this[x] = b[x];
91
+ ...k,
92
+ parent: k.parent && k.parent._data
93
+ }, Object.keys(k).forEach((x) => {
94
+ this[x] = k[x];
94
95
  }), r && r.length && (this.children = r.map((x, N) => new ge({ ...x, _index: N }, this.config, this)), this._data.children = this.children.map((x) => x._data));
95
96
  });
96
97
  /**
@@ -100,8 +101,8 @@ class ge {
100
101
  */
101
102
  d(this, "_isHalfChecked", () => {
102
103
  const e = this.children.reduce((n, l) => {
103
- const s = l._halfChecked ? 0.5 : l._checked ? 1 : 0;
104
- return n + s;
104
+ const a = l._halfChecked ? 0.5 : l._checked ? 1 : 0;
105
+ return n + a;
105
106
  }, 0);
106
107
  return e !== this.children.length && e > 0;
107
108
  });
@@ -116,12 +117,12 @@ class ge {
116
117
  }), this.updateHalfState(e));
117
118
  });
118
119
  d(this, "getSelfChildrenValue", () => {
119
- const e = [], n = (l, s) => {
120
- if (!s || !s.length) {
120
+ const e = [], n = (l, a) => {
121
+ if (!a || !a.length) {
121
122
  e.push(l);
122
123
  return;
123
124
  }
124
- (s || []).forEach((c) => {
125
+ (a || []).forEach((c) => {
125
126
  n(c.pathValue, c.children);
126
127
  });
127
128
  };
@@ -179,14 +180,14 @@ class ht {
179
180
  d(this, "flatNodes", []);
180
181
  d(this, "config", {});
181
182
  // 初始化节点状态,附加状态信息字段: _checked,_halfChecked,parent,disabled
182
- d(this, "_calcNodes", (e, n) => e ? e.map((l, s) => new ge({ ...l, _index: s }, this.config, n)) : []);
183
+ d(this, "_calcNodes", (e, n) => e ? e.map((l, a) => new ge({ ...l, _index: a }, this.config, n)) : []);
183
184
  // this.flatNodes 保存所有可能的选中项
184
185
  d(this, "_updateFlatNodes", () => {
185
186
  const e = !this.config.changeOnSelect;
186
187
  this.flatNodes = [];
187
188
  const n = (l) => {
188
- l && ((!e || l.isLeaf) && this.flatNodes.push(l), _e(l.children) && l.children.forEach((s) => {
189
- n(s);
189
+ l && ((!e || l.isLeaf) && this.flatNodes.push(l), _e(l.children) && l.children.forEach((a) => {
190
+ n(a);
190
191
  }));
191
192
  };
192
193
  this.nodes.forEach((l) => {
@@ -201,10 +202,10 @@ class ht {
201
202
  d(this, "setNodeCheckedByValue", (e) => {
202
203
  const n = ie(e);
203
204
  this.flatNodes.forEach((l) => {
204
- let s = !1;
205
+ let a = !1;
205
206
  this.config.showParent ? l.pathValue.some(
206
- (c, r, k) => J(n, k.slice(0, r + 1))
207
- ) && (s = !0) : J(n, l.pathValue) && (s = !0), l.setCheckedStateIgnoreDisabled(s);
207
+ (c, r, C) => J(n, C.slice(0, r + 1))
208
+ ) && (a = !0) : J(n, l.pathValue) && (a = !0), l.setCheckedStateIgnoreDisabled(a);
208
209
  });
209
210
  });
210
211
  /**
@@ -232,8 +233,8 @@ class ht {
232
233
  d(this, "searchNodeByLabel", (e) => {
233
234
  if (!e)
234
235
  return this.flatNodes;
235
- const { filterOption: n } = this.config, l = W(n) ? n : (s, c) => Y(c.label) && c.label.indexOf(s) > -1;
236
- return this.flatNodes.filter((s) => s.getPathNodes().some((r) => l(e, r._data)));
236
+ const { filterOption: n } = this.config, l = W(n) ? n : (a, c) => Y(c.label) && c.label.indexOf(a) > -1;
237
+ return this.flatNodes.filter((a) => a.getPathNodes().some((r) => l(e, r._data)));
237
238
  });
238
239
  /** 获取所有节点 */
239
240
  d(this, "getOptions", () => this.nodes);
@@ -243,15 +244,15 @@ class ht {
243
244
  d(this, "getCheckedParentNodes", () => {
244
245
  const e = /* @__PURE__ */ new Set();
245
246
  return this.flatNodes.forEach((n) => {
246
- n._checked && n.getPathNodes().some((s) => {
247
- if (s._checked)
248
- return e.has(s) || e.add(s), !0;
247
+ n._checked && n.getPathNodes().some((a) => {
248
+ if (a._checked)
249
+ return e.has(a) || e.add(a), !0;
249
250
  });
250
251
  }), Array.from(e);
251
252
  });
252
253
  this.config = { ...l };
253
- const s = Array.isArray(n) ? n : [];
254
- this.nodes = this._calcNodes(e, null), this._updateFlatNodes(), this.setNodeCheckedByValue(s);
254
+ const a = Array.isArray(n) ? n : [];
255
+ this.nodes = this._calcNodes(e, null), this._updateFlatNodes(), this.setNodeCheckedByValue(a);
255
256
  }
256
257
  }
257
258
  const G = "__pqb_cascader__", ft = "parent", mt = "child", ye = {
@@ -272,7 +273,7 @@ function gt(t, e) {
272
273
  const n = e ? Array.isArray(e[0]) ? e : [e] : [];
273
274
  return new ht(t.options || [], n, Ee(t));
274
275
  }
275
- const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /* @__PURE__ */ new Set()), J = (t, e) => {
276
+ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /* @__PURE__ */ new Set()), J = (t, e) => {
276
277
  const n = e || [];
277
278
  return t.has(n.join(G));
278
279
  }, pt = (t, e) => {
@@ -281,13 +282,13 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
281
282
  }, te = (t, e, n) => {
282
283
  let l = [];
283
284
  if (t === void 0 ? l = [] : e ? l = t : l = [t], n && n.config.showParent) {
284
- const s = n.getCheckedNodes(), c = ie(
285
- s.map((O) => O.pathValue)
286
- ), r = [], k = {};
285
+ const a = n.getCheckedNodes(), c = ie(
286
+ a.map((O) => O.pathValue)
287
+ ), r = [], C = {};
287
288
  return l.map((O) => {
288
- O.some(($, b, x) => {
289
- const N = x.slice(0, b + 1), E = J(c, N);
290
- return E && !k[N.join(G)] && (r.push(N), k[N.join(G)] = 1), E;
289
+ O.some(($, k, x) => {
290
+ const N = x.slice(0, k + 1), E = J(c, N);
291
+ return E && !C[N.join(G)] && (r.push(N), C[N.join(G)] = 1), E;
291
292
  });
292
293
  }), r;
293
294
  }
@@ -296,22 +297,22 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
296
297
  const e = (n) => Array.isArray(n) ? n.every((l) => l._checked || l.disabled ? !0 : e(l.children)) : !1;
297
298
  return t._halfChecked && e(t == null ? void 0 : t.children);
298
299
  }, Me = (t, e, n, l) => {
299
- const s = l && Ct(n) ? !1 : l, c = e.getCheckedNodes().reduce((b, x) => (b.add(x.pathValue.join(G)), b), /* @__PURE__ */ new Set());
300
- n.setCheckedState(s);
301
- const k = e.getCheckedNodes().map((b) => b.pathValue), O = ie(k), $ = /* @__PURE__ */ new Set();
302
- return t.filter((b) => {
303
- if (!J(c, b) || J(O, b))
304
- return $.add(b.join(G)), !0;
300
+ const a = l && Ct(n) ? !1 : l, c = e.getCheckedNodes().reduce((k, x) => (k.add(x.pathValue.join(G)), k), /* @__PURE__ */ new Set());
301
+ n.setCheckedState(a);
302
+ const C = e.getCheckedNodes().map((k) => k.pathValue), O = ie(C), $ = /* @__PURE__ */ new Set();
303
+ return t.filter((k) => {
304
+ if (!J(c, k) || J(O, k))
305
+ return $.add(k.join(G)), !0;
305
306
  }).concat(
306
- k.filter((b) => !J($, b))
307
+ C.filter((k) => !J($, k))
307
308
  );
308
309
  }, kt = (t) => {
309
- const { prefixCls: e, multiple: n, option: l, renderOption: s, selected: c, icons: r } = t, k = l.disabled || n && l.disableCheckbox;
310
+ const { prefixCls: e, multiple: n, option: l, renderOption: a, selected: c, icons: r } = t, C = l.disabled || n && l.disableCheckbox;
310
311
  return /* @__PURE__ */ X(ne, { children: [
311
312
  n ? /* @__PURE__ */ p(
312
313
  Oe,
313
314
  {
314
- disabled: k,
315
+ disabled: C,
315
316
  checked: l._checked,
316
317
  indeterminate: l._halfChecked,
317
318
  onChange: t.onMultipleChecked,
@@ -324,9 +325,9 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
324
325
  className: `${e}-list-item-label`,
325
326
  onClick: l.disabled ? void 0 : t.onClickOption,
326
327
  onMouseEnter: t.onMouseEnter,
327
- onDoubleClick: k ? void 0 : t.onDoubleClickOption,
328
+ onDoubleClick: C ? void 0 : t.onDoubleClickOption,
328
329
  children: [
329
- s ? s() : l.label,
330
+ a ? a() : l.label,
330
331
  l.isLeaf ? c && r.checked : l.loading ? r.loading : r.next
331
332
  ]
332
333
  }
@@ -346,46 +347,46 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
346
347
  return t;
347
348
  }, Ve = (t, e) => t < 0 ? e : t > e ? 0 : t, vt = (t) => {
348
349
  var M;
349
- const [e, n] = dt(), l = ue(), {
350
- store: s,
350
+ const [e, n] = ot(), l = ue(), {
351
+ store: a,
351
352
  prefixCls: c,
352
353
  value: r,
353
- multiple: k,
354
+ multiple: C,
354
355
  renderFooter: O,
355
356
  renderOption: $,
356
- showEmptyChildren: b,
357
+ showEmptyChildren: k,
357
358
  loadMore: x,
358
359
  renderEmpty: N,
359
360
  rtl: E,
360
361
  icons: T
361
362
  } = t, [h, V] = le(
362
- s.findNodeByValue(r && r[r.length - 1]) || null
363
- ), L = s.getOptions(), j = (a) => {
363
+ a.findNodeByValue(r && r[r.length - 1]) || null
364
+ ), L = a.getOptions(), j = (s) => {
364
365
  var u;
365
- (u = t.onChange) == null || u.call(t, a);
366
- }, S = async (a) => {
367
- if (!a.isLeaf && W(x) && !a.children) {
368
- a.setLoading(!0), l();
366
+ (u = t.onChange) == null || u.call(t, s);
367
+ }, S = async (s) => {
368
+ if (!s.isLeaf && W(x) && !s.children) {
369
+ s.setLoading(!0), l();
369
370
  try {
370
371
  const u = await x(
371
- a.pathValue,
372
- a.pathValue.length
372
+ s.pathValue,
373
+ s.pathValue.length
373
374
  );
374
- s.appendOptionChildren(a, u), s.setNodeCheckedByValue(t.value);
375
+ a.appendOptionChildren(s, u), a.setNodeCheckedByValue(t.value);
375
376
  } catch (u) {
376
377
  console.error(u);
377
378
  }
378
- a.setLoading(!1), l();
379
+ s.setLoading(!1), l();
379
380
  }
380
- }, f = async (a, u = !0) => {
381
- !a || a.disabled || (V(a), S(a), !k && u && (t.changeOnSelect || a.isLeaf) && j([a.pathValue]));
382
- }, P = (a, u) => {
383
- const g = Me(t.value, s, a, u);
384
- a === h && l(), V(a), t.changeOnSelect || S(a), j(g);
385
- }, w = ae(
386
- (a = h) => {
381
+ }, f = async (s, u = !0) => {
382
+ !s || s.disabled || (V(s), S(s), !C && u && (t.changeOnSelect || s.isLeaf) && j([s.pathValue]));
383
+ }, P = (s, u) => {
384
+ const g = Me(t.value, a, s, u);
385
+ s === h && l(), V(s), t.changeOnSelect || S(s), j(g);
386
+ }, w = se(
387
+ (s = h) => {
387
388
  var g;
388
- let u = a;
389
+ let u = s;
389
390
  for (; u; )
390
391
  (g = e[u._level]) == null || g.scrollTo({
391
392
  index: u._index,
@@ -393,78 +394,78 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
393
394
  }), u = u._level < 1 ? null : u.parent;
394
395
  },
395
396
  [h]
396
- ), C = ae(
397
- (a) => {
397
+ ), b = se(
398
+ (s) => {
398
399
  var o;
399
- const u = a.key;
400
+ const u = s.key;
400
401
  let g;
401
402
  switch (u) {
402
403
  case fe.key: {
403
- a.preventDefault(), (o = t.onEsc) == null || o.call(t);
404
+ s.preventDefault(), (o = t.onEsc) == null || o.call(t);
404
405
  break;
405
406
  }
406
- case se.key:
407
+ case ae.key:
407
408
  case we.key: {
408
409
  if (!h)
409
410
  g = bt(L);
410
411
  else {
411
- const A = Ne(h), U = A.parent && A.parent.children || L, F = u === se.key ? 1 : -1;
412
- let z = Ve(
412
+ const A = Ne(h), U = A.parent && A.parent.children || L, F = u === ae.key ? 1 : -1;
413
+ let K = Ve(
413
414
  A._index + F,
414
415
  U.length - 1
415
416
  );
416
- for (; z !== A._index && (g = U[z], g.disabled); )
417
- z = Ve(z + F, U.length - 1);
417
+ for (; K !== A._index && (g = U[K], g.disabled); )
418
+ K = Ve(K + F, U.length - 1);
418
419
  }
419
- return w(g), f(g, !1), a.preventDefault(), !1;
420
+ return w(g), f(g, !1), s.preventDefault(), !1;
420
421
  }
421
422
  case lt.key:
422
- return h && !h.disabled && (g = (h.children || [])[0] || h, f(g, !1)), a.preventDefault(), !1;
423
+ return h && !h.disabled && (g = (h.children || [])[0] || h, f(g, !1)), s.preventDefault(), !1;
423
424
  case rt.key: {
424
425
  if (h) {
425
426
  const A = Ne(h);
426
427
  g = A.parent || A;
427
428
  }
428
- return f(g, !1), a.preventDefault(), !1;
429
+ return f(g, !1), s.preventDefault(), !1;
429
430
  }
430
431
  case he.key:
431
- return h && (k ? P(h, !h._checked) : f(h)), a.preventDefault(), !1;
432
+ return h && (C ? P(h, !h._checked) : f(h)), s.preventDefault(), !1;
432
433
  }
433
434
  },
434
435
  [h]
435
436
  );
436
437
  re(() => {
437
- V((a) => {
438
+ V((s) => {
438
439
  let u;
439
- if (a && a.pathValue && a.pathValue.length) {
440
- const g = a.pathValue;
440
+ if (s && s.pathValue && s.pathValue.length) {
441
+ const g = s.pathValue;
441
442
  let o = { children: L };
442
443
  g.map((A) => {
443
- const F = (o.children || []).find((z) => z.value === A);
444
+ const F = (o.children || []).find((K) => K.value === A);
444
445
  F && (o = F, u = F);
445
446
  });
446
447
  }
447
448
  return u;
448
449
  });
449
- }, [s]), Z(() => {
450
+ }, [a]), Z(() => {
450
451
  t.popupVisible && L.length && setTimeout(w);
451
452
  }, [t.popupVisible]), Z(() => {
452
- const a = t.getTriggerElement();
453
- if (a)
454
- return t.popupVisible ? Le(a, "keydown", C) : de(a, "keydown", C), () => {
455
- de(a, "keydown", C);
453
+ const s = t.getTriggerElement();
454
+ if (s)
455
+ return t.popupVisible ? Le(s, "keydown", b) : de(s, "keydown", b), () => {
456
+ de(s, "keydown", b);
456
457
  };
457
- }, [t.popupVisible, C]);
458
+ }, [t.popupVisible, b]);
458
459
  const I = (() => {
459
- const a = [L];
460
+ const s = [L];
460
461
  return (h ? h.getPathNodes() : []).forEach((g) => {
461
- g && g.children && a.push(g.children);
462
- }), a;
463
- })(), _ = W(t.dropdownColumnRender) ? t.dropdownColumnRender : (a) => a;
464
- return !I.length || !((M = I[0]) != null && M.length) ? /* @__PURE__ */ p(ne, { children: N() }) : /* @__PURE__ */ p(st, { component: Je.Fragment, children: I.map((a, u) => {
462
+ g && g.children && s.push(g.children);
463
+ }), s;
464
+ })(), _ = W(t.dropdownColumnRender) ? t.dropdownColumnRender : (s) => s;
465
+ return !I.length || !((M = I[0]) != null && M.length) ? /* @__PURE__ */ p(ne, { children: N() }) : /* @__PURE__ */ p(at, { component: Je.Fragment, children: I.map((s, u) => {
465
466
  const g = O ? O(u, h || null) : null;
466
- return a.length === 0 && !b ? null : /* @__PURE__ */ p(
467
- it,
467
+ return s.length === 0 && !k ? null : /* @__PURE__ */ p(
468
+ dt,
468
469
  {
469
470
  timeout: {
470
471
  enter: 300,
@@ -499,12 +500,12 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
499
500
  [`${c}-list-wrapper-with-footer`]: g !== null
500
501
  }),
501
502
  children: [
502
- a.length === 0 ? N == null ? void 0 : N(t.virtualListProps ? "100%" : 120) : /* @__PURE__ */ p(
503
+ s.length === 0 ? N == null ? void 0 : N(t.virtualListProps ? "100%" : 120) : /* @__PURE__ */ p(
503
504
  Pe,
504
505
  {
505
506
  needFiller: !1,
506
507
  threshold: t.virtualListProps ? 100 : null,
507
- data: a,
508
+ data: s,
508
509
  isStaticItemHeight: !0,
509
510
  itemKey: "value",
510
511
  ...xe(t.virtualListProps) ? t.virtualListProps : {},
@@ -515,7 +516,7 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
515
516
  `${c}-list`,
516
517
  `${c}-list-select`,
517
518
  {
518
- [`${c}-list-multiple`]: k,
519
+ [`${c}-list-multiple`]: C,
519
520
  [`${c}-list-rtl`]: E
520
521
  }
521
522
  ),
@@ -539,16 +540,16 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
539
540
  {
540
541
  prefixCls: c,
541
542
  rtl: E,
542
- multiple: k,
543
+ multiple: C,
543
544
  option: o,
544
- selected: !k && o.isLeaf && me(t.value, o.pathValue),
545
+ selected: !C && o.isLeaf && me(t.value, o.pathValue),
545
546
  icons: T,
546
547
  onMouseEnter: () => {
547
548
  o.disabled || t.expandTrigger === "hover" && (V(o), !o.isLeaf && S(o));
548
549
  },
549
550
  renderOption: $ && (() => $(o._data, u)),
550
551
  onClickOption: () => {
551
- o.isLeaf && k && !o.disableCheckbox ? P(o, !o._checked) : f(o);
552
+ o.isLeaf && C && !o.disableCheckbox ? P(o, !o._checked) : f(o);
552
553
  },
553
554
  onMultipleChecked: (U) => {
554
555
  P(o, U);
@@ -586,12 +587,12 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
586
587
  }, Se = (t, e) => t < 0 ? e : t > e ? 0 : t, yt = (t, e, n) => {
587
588
  let l = e;
588
589
  if (Y(e)) {
589
- const s = e.toUpperCase().indexOf(t.toUpperCase());
590
- if (s > -1) {
591
- const c = e.substring(0, s + 1), r = e.substring(s + t.length);
590
+ const a = e.toUpperCase().indexOf(t.toUpperCase());
591
+ if (a > -1) {
592
+ const c = e.substring(0, a + 1), r = e.substring(a + t.length);
592
593
  l = /* @__PURE__ */ X(ne, { children: [
593
594
  c,
594
- /* @__PURE__ */ p("span", { className: `${n}-highlight`, children: e.substring(s, t.length + 1) }),
595
+ /* @__PURE__ */ p("span", { className: `${n}-highlight`, children: e.substring(a, t.length + 1) }),
595
596
  r
596
597
  ] });
597
598
  }
@@ -602,29 +603,29 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
602
603
  store: e,
603
604
  prefixCls: n,
604
605
  multiple: l,
605
- onChange: s,
606
+ onChange: a,
606
607
  inputValue: c,
607
608
  renderEmpty: r,
608
- style: k,
609
+ style: C,
609
610
  defaultActiveFirstOption: O,
610
611
  rtl: $,
611
- icons: b
612
+ icons: k
612
613
  } = t, x = t.value || [], [N, E] = le(
613
614
  e.searchNodeByLabel(c) || []
614
- ), T = K(), h = K(), V = ot(), [L, j] = le(
615
+ ), T = z(), h = z(), V = ct(), [L, j] = le(
615
616
  O ? 0 : -1
616
617
  ), S = (f, P, w) => {
617
618
  if (w.stopPropagation(), !f.disabled)
618
619
  if (l) {
619
- const C = Me(
620
+ const b = Me(
620
621
  t.value,
621
622
  e,
622
623
  f,
623
624
  P
624
625
  );
625
- s == null || s(C);
626
+ a == null || a(b);
626
627
  } else
627
- s == null || s([f.pathValue]);
628
+ a == null || a([f.pathValue]);
628
629
  };
629
630
  return re(() => {
630
631
  E(e.searchNodeByLabel(c));
@@ -637,14 +638,14 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
637
638
  const P = (w) => {
638
639
  var I;
639
640
  w.stopPropagation();
640
- const C = w.key;
641
- switch (C) {
641
+ const b = w.key;
642
+ switch (b) {
642
643
  case fe.key:
643
644
  return (I = t.onEsc) == null || I.call(t), !1;
644
- case se.key:
645
+ case ae.key:
645
646
  case we.key: {
646
647
  h.current = !0;
647
- const _ = se.key === C ? 1 : -1;
648
+ const _ = ae.key === b ? 1 : -1;
648
649
  let M = Se(
649
650
  L + _,
650
651
  N.length - 1
@@ -656,7 +657,7 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
656
657
  case he.key: {
657
658
  const _ = N[L];
658
659
  if (_) {
659
- const M = x.some((a) => me(a, _.pathValue));
660
+ const M = x.some((s) => me(s, _.pathValue));
660
661
  S(_, !M, w);
661
662
  }
662
663
  return !1;
@@ -669,7 +670,7 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
669
670
  }, [N, L, x]), Z(() => {
670
671
  var P;
671
672
  const f = T.current;
672
- f && (h.current || V) && ct(f, {
673
+ f && (h.current || V) && it(f, {
673
674
  behavior: "auto",
674
675
  block: "nearest",
675
676
  scrollMode: "if-needed",
@@ -681,7 +682,7 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
681
682
  needFiller: !1,
682
683
  wrapper: "ul",
683
684
  role: "menu",
684
- style: k,
685
+ style: C,
685
686
  data: N,
686
687
  isStaticItemHeight: !0,
687
688
  threshold: t.virtualListProps ? 100 : null,
@@ -694,26 +695,26 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
694
695
  [`${n}-list-rtl`]: $
695
696
  }),
696
697
  children: (f, P) => {
697
- const w = f.getPathNodes(), C = w.map((a, u, g) => /* @__PURE__ */ X("span", { children: [
698
- a.label,
698
+ const w = f.getPathNodes(), b = w.map((s, u, g) => /* @__PURE__ */ X("span", { children: [
699
+ s.label,
699
700
  w.length === u + 1 ? "" : " / "
700
- ] }, `${a.label}_${a._level}`)), I = f._checked, _ = { checked: I }, M = W(t.renderOption) ? t.renderOption(c, f._data, _) : yt(c, C, n);
701
+ ] }, `${s.label}_${s._level}`)), I = f._checked, _ = { checked: I }, M = W(t.renderOption) ? t.renderOption(c, f._data, _) : yt(c, b, n);
701
702
  return /* @__PURE__ */ p(
702
703
  "li",
703
704
  {
704
- title: Y(M) ? M : Y(C) ? C : void 0,
705
+ title: Y(M) ? M : Y(b) ? b : void 0,
705
706
  role: "menuitem",
706
707
  "aria-disabled": f.disabled,
707
- ref: (a) => {
708
- P === L && (T.current = a), I && !T.current && (T.current = a);
708
+ ref: (s) => {
709
+ P === L && (T.current = s), I && !T.current && (T.current = s);
709
710
  },
710
711
  className: q(`${n}-list-search-item`, {
711
712
  [`${n}-list-search-item-active`]: I,
712
713
  [`${n}-list-search-item-hover`]: P === L,
713
714
  [`${n}-list-search-item-disabled`]: f.disabled
714
715
  }),
715
- onClick: (a) => {
716
- S(f, !I, a);
716
+ onClick: (s) => {
717
+ S(f, !I, s);
717
718
  },
718
719
  onMouseEnter: () => {
719
720
  !h.current && !f.disabled && j(P);
@@ -723,7 +724,7 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
723
724
  },
724
725
  children: /* @__PURE__ */ p("div", { className: `${n}-list-item-label`, children: W(t.renderOption) ? M : l ? /* @__PURE__ */ p(Oe, { checked: I, disabled: f.disabled, children: M }) : /* @__PURE__ */ X(ne, { children: [
725
726
  M,
726
- I && /* @__PURE__ */ p("span", { className: `${n}-check-icon`, children: b.checked })
727
+ I && /* @__PURE__ */ p("span", { className: `${n}-check-icon`, children: k.checked })
727
728
  ] }) })
728
729
  },
729
730
  P
@@ -747,54 +748,54 @@ const ie = (t) => (t || []).reduce((l, s) => (l.add([].concat(s).join(G)), l), /
747
748
  defaultActiveFirstOption: !0
748
749
  }, St = { bottom: 4 };
749
750
  function _t(t, e) {
750
- const { getPrefixCls: n, renderEmpty: l, componentConfig: s, rtl: c } = Qe(Ye), r = et(
751
+ const { getPrefixCls: n, renderEmpty: l, componentConfig: a, rtl: c } = Qe(Ye), r = et(
751
752
  t,
752
753
  Vt,
753
- s == null ? void 0 : s.Cascader
754
+ a == null ? void 0 : a.Cascader
754
755
  ), {
755
- disabled: k,
756
+ disabled: C,
756
757
  renderFormat: O,
757
758
  getPopupContainer: $,
758
- children: b,
759
+ children: k,
759
760
  triggerProps: x,
760
761
  expandTrigger: N,
761
762
  icons: E
762
763
  } = r, T = {
763
764
  loading: (E == null ? void 0 : E.loading) || /* @__PURE__ */ p(We, {}),
764
765
  checked: (E == null ? void 0 : E.checked) || /* @__PURE__ */ p(je, {}),
765
- next: (E == null ? void 0 : E.next) || (c ? /* @__PURE__ */ p(Ue, {}) : /* @__PURE__ */ p(ze, {}))
766
- }, h = n("cascader"), V = r.mode === "multiple", L = K(null), j = ue(), S = ut(() => gt(
766
+ next: (E == null ? void 0 : E.next) || (c ? /* @__PURE__ */ p(Ue, {}) : /* @__PURE__ */ p(Ke, {}))
767
+ }, h = n("cascader"), V = r.mode === "multiple", L = z(null), j = ue(), S = ut(() => gt(
767
768
  r,
768
769
  te(
769
770
  "value" in r ? r.value : r.defaultValue,
770
771
  V
771
772
  )
772
- ), [JSON.stringify(Ee(r)), r.options]), [f, P] = le(() => "value" in r ? te(r.value, V, S) : "defaultValue" in r ? te(r.defaultValue, V, S) : []), w = "value" in r ? te(r.value, V, S) : f, [C, I] = ve(!1, {
773
+ ), [JSON.stringify(Ee(r)), r.options]), [f, P] = le(() => "value" in r ? te(r.value, V, S) : "defaultValue" in r ? te(r.defaultValue, V, S) : []), w = "value" in r ? te(r.value, V, S) : f, [b, I] = ve(!1, {
773
774
  value: r.popupVisible,
774
775
  defaultValue: r.defaultPopupVisible
775
- }), [_, M, a] = ve("", {
776
+ }), [_, M, s] = ve("", {
776
777
  value: "inputValue" in r ? r.inputValue || "" : void 0
777
- }), u = K(_), g = K(null), o = K(null), A = K((S == null ? void 0 : S.getCheckedNodes()) || []), U = Ze(`${h}-popup-`), F = (i, m) => {
778
+ }), u = z(_), g = z(null), o = z(null), A = z((S == null ? void 0 : S.getCheckedNodes()) || []), U = Ze(`${h}-popup-`), F = (i, m) => {
778
779
  var v;
779
780
  i !== u.current && (M(i), u.current = i, g.current = m, (v = r.onInputValueChange) == null || v.call(r, i, m));
780
781
  };
781
- function z(i) {
782
- return Ke(i) || qe(i);
782
+ function K(i) {
783
+ return ze(i) || qe(i);
783
784
  }
784
785
  Z(() => {
785
786
  var m;
786
787
  const { current: i } = g;
787
- a === _ && (i === "manual" || i === "optionListHide") && ((m = r.onSearch) == null || m.call(r, _, i)), _ !== u.current && (u.current = _);
788
+ s === _ && (i === "manual" || i === "optionListHide") && ((m = r.onSearch) == null || m.call(r, _, i)), _ !== u.current && (u.current = _);
788
789
  }, [_]), Z(() => {
789
790
  const i = () => {
790
791
  clearTimeout(L.current), L.current = null;
791
792
  };
792
- return !C && _ && (L.current && i(), L.current = setTimeout(() => {
793
+ return !b && _ && (L.current && i(), L.current = setTimeout(() => {
793
794
  F("", "optionListHide"), L.current = null;
794
795
  }, 200)), () => {
795
796
  i();
796
797
  };
797
- }, [C]), re(() => {
798
+ }, [b]), re(() => {
798
799
  if ("value" in r && r.value !== f) {
799
800
  const i = te(r.value, V);
800
801
  S.setNodeCheckedByValue(i), P(i);
@@ -812,13 +813,13 @@ function _t(t, e) {
812
813
  });
813
814
  };
814
815
  return D(S.getCheckedNodes()), v.size && D(A.current), m;
815
- }, H = ae(
816
+ }, H = se(
816
817
  (i) => {
817
818
  var m;
818
- i !== C && ((m = r.onVisibleChange) == null || m.call(r, i), "popupVisible" in r || I(i));
819
+ i !== b && ((m = r.onVisibleChange) == null || m.call(r, i), "popupVisible" in r || I(i));
819
820
  },
820
- [r.onVisibleChange, C]
821
- ), Ie = ae(
821
+ [r.onVisibleChange, b]
822
+ ), Ie = se(
822
823
  (i) => {
823
824
  var y;
824
825
  const m = pe([i])[0] || [];
@@ -828,7 +829,9 @@ function _t(t, e) {
828
829
  disabled: (y = m[m.length - 1]) == null ? void 0 : y.disabled
829
830
  };
830
831
  },
831
- [S, O]
832
+ [S, f, O]
833
+ // 这里把 stateValue 放到依赖里面,是因为当受控时props.value改变或非受控时内部stateValue改变,都会需要出发节点选中状态的更新
834
+ // 此时需要重新渲染已选中值的展示
832
835
  ), Q = (i, m) => {
833
836
  var be;
834
837
  m === "panel" && oe(r.showSearch) && !r.showSearch.retainInputValueWhileSelect && V && F("", "optionChecked");
@@ -838,7 +841,7 @@ function _t(t, e) {
838
841
  V || S.setNodeCheckedByValue(i), De(S.getCheckedNodes());
839
842
  const B = pe(i), ce = V ? i : i[0], Fe = V ? B : B[0];
840
843
  V || (_ || B[0] && ((be = B[0][B[0].length - 1]) != null && be.isLeaf) || D && y === "hover") && H(!1), "value" in r ? (S.setNodeCheckedByValue(w), j()) : P(i), v == null || v(ce, Fe, {
841
- dropdownVisible: C
844
+ dropdownVisible: b
842
845
  });
843
846
  }, $e = (i, m, v) => {
844
847
  if (v.stopPropagation(), i.disabled)
@@ -919,7 +922,7 @@ function _t(t, e) {
919
922
  return (y = o.current) == null ? void 0 : y.dom;
920
923
  },
921
924
  renderEmpty: Ce,
922
- popupVisible: C,
925
+ popupVisible: b,
923
926
  value: w,
924
927
  renderFooter: r.renderFooter,
925
928
  icons: T,
@@ -943,29 +946,29 @@ function _t(t, e) {
943
946
  {
944
947
  popup: Re,
945
948
  trigger: r.trigger,
946
- disabled: k,
949
+ disabled: C,
947
950
  getPopupContainer: $,
948
951
  position: c ? "br" : "bl",
949
952
  classNames: "slideDynamicOrigin",
950
953
  popupAlign: St,
951
954
  unmountOnExit: "unmountOnExit" in r ? r.unmountOnExit : !W(r.loadMore),
952
- popupVisible: C,
955
+ popupVisible: b,
953
956
  ...x,
954
957
  onVisibleChange: H,
955
958
  children: i
956
959
  }
957
960
  );
958
- return b ? ke(b) : /* @__PURE__ */ p(
961
+ return k ? ke(k) : /* @__PURE__ */ p(
959
962
  tt,
960
963
  {
961
964
  ...r,
962
965
  ref: o,
963
966
  ariaControls: U,
964
- popupVisible: C,
967
+ popupVisible: b,
965
968
  value: V ? w : w && w[0],
966
969
  inputValue: _,
967
970
  rtl: c,
968
- isEmptyValue: z(w),
971
+ isEmptyValue: K(w),
969
972
  prefixCls: h,
970
973
  isMultiple: V,
971
974
  renderText: Ie,
@@ -980,18 +983,18 @@ function _t(t, e) {
980
983
  const D = S.getCheckedNodes().filter((y) => y.disabled).map((y) => y.pathValue);
981
984
  S.setNodeCheckedByValue(D), Q(D);
982
985
  }
983
- (m = r.onClear) == null || m.call(r, !!C);
986
+ (m = r.onClear) == null || m.call(r, !!b);
984
987
  },
985
988
  onKeyDown: (i) => {
986
989
  var v;
987
- if (k)
990
+ if (C)
988
991
  return;
989
992
  i.stopPropagation();
990
993
  const m = i.key;
991
- m === fe.key && C && (H(!1), i.preventDefault()), m === he.key && !C && (H(!0), i.preventDefault()), m === at.key && C && H(!1), (v = r.onKeyDown) == null || v.call(r, i);
994
+ b ? (m === fe.key && (H(!1), i.preventDefault()), m === st.key && H(!1)) : m === he.key && (H(!0), i.preventDefault()), (v = r.onKeyDown) == null || v.call(r, i);
992
995
  },
993
996
  onChangeInputValue: (i) => {
994
- F(i, "manual"), C || H(!0);
997
+ F(i, "manual"), b || H(!0);
995
998
  }
996
999
  }
997
1000
  );