@unicom-cloud/ui 0.8.95 → 0.8.97

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 (326) hide show
  1. package/Affix.js +1 -1
  2. package/Carousel.js +1 -1
  3. package/LiquidFill.js +4 -0
  4. package/Message.js +1 -1
  5. package/Notification.js +1 -1
  6. package/OverflowEllipsis.js +1 -1
  7. package/PageHeader.js +1 -1
  8. package/QrCode.js +57 -0
  9. package/Switch.js +1 -1
  10. package/Tour.js +63 -0
  11. package/Trigger.js +2 -2
  12. package/_virtual/_commonjsHelpers.js +6 -0
  13. package/_virtual/index.js +7 -0
  14. package/_virtual/index2.js +4 -0
  15. package/affix/index.js +70 -72
  16. package/alert/index.js +52 -51
  17. package/anchor/Anchor.js +55 -55
  18. package/anchor/Link.js +34 -34
  19. package/anchor/util.js +5 -5
  20. package/auto-complete/index.js +116 -122
  21. package/avatar/Avatar.js +33 -33
  22. package/avatar/Group.js +26 -26
  23. package/back-top/index.js +58 -61
  24. package/badge/index.js +46 -46
  25. package/breadcrumb/Item.js +42 -43
  26. package/breadcrumb/index.js +47 -47
  27. package/button/Group.js +6 -6
  28. package/button/index.js +91 -91
  29. package/calendar/Month.js +75 -75
  30. package/calendar/Year.js +35 -35
  31. package/calendar/header/index.js +25 -25
  32. package/calendar/index.js +103 -103
  33. package/card/Grid.js +8 -8
  34. package/card/Meta.js +16 -16
  35. package/card/index.js +49 -49
  36. package/carousel/Arrow.js +19 -19
  37. package/carousel/Indicator.js +26 -26
  38. package/carousel/index.js +108 -108
  39. package/cascader/Cascader.js +178 -191
  40. package/cascader/base/node.js +133 -136
  41. package/cascader/base/store.js +82 -85
  42. package/cascader/panel/List.js +126 -130
  43. package/cascader/panel/Search.js +79 -81
  44. package/cascader/util.js +13 -13
  45. package/checkbox/Checkbox.js +94 -96
  46. package/checkbox/Group.js +54 -56
  47. package/checkbox/GroupBlock.js +28 -29
  48. package/collapse/Collapse.js +45 -45
  49. package/collapse/Item.js +53 -55
  50. package/color-picker/ControlBar.js +43 -43
  51. package/color-picker/InputAlpha.js +12 -12
  52. package/color-picker/InputHex.js +30 -31
  53. package/color-picker/InputRgb.js +24 -24
  54. package/color-picker/Palette.js +18 -18
  55. package/color-picker/Panel.js +122 -125
  56. package/color-picker/hooks/useColorPicker.js +85 -88
  57. package/color-picker/hooks/useControlBlock.js +38 -40
  58. package/color-picker/index.js +47 -47
  59. package/comment/index.js +29 -29
  60. package/components/common/higher-order/with-speech-synthesis/index.js +37 -40
  61. package/components/common/hooks/useForceUpdate.js +6 -2
  62. package/components/common/hooks/useId.js +4 -4
  63. package/components/common/hooks/useInView.js +16 -16
  64. package/components/common/hooks/useIntersectionObserver.js +1 -1
  65. package/components/common/hooks/useKeyboardEvent.js +9 -10
  66. package/components/common/hooks/useOverflowHidden.js +1 -4
  67. package/components/common/hooks/usePersistCallback.js +7 -7
  68. package/components/common/hooks/useStateCallback.js +9 -10
  69. package/components/common/hooks/useWindowSize.js +8 -8
  70. package/components/common/space/index.js +11 -10
  71. package/components/common/utils/PqbCSSTransition.js +1 -1
  72. package/components/common/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  73. package/components/common/utils/dom.js +27 -29
  74. package/components/common/utils/findScrollParent.js +17 -0
  75. package/components/common/utils/intersectionObserver.js +21 -0
  76. package/components/common/utils/is.js +99 -109
  77. package/components/common/utils/mutationObserver.js +19 -0
  78. package/components/common/utils/reactDOM.js +34 -34
  79. package/components/common/utils/resizeObserver.js +21 -0
  80. package/copy/index.js +38 -40
  81. package/date-picker/Picker.js +290 -295
  82. package/date-picker/RangePicker.js +367 -372
  83. package/date-picker/index.js +33 -35
  84. package/date-picker/panel/Body.js +46 -47
  85. package/date-picker/panel/Header.js +33 -33
  86. package/date-picker/panel/Shortcut.js +31 -31
  87. package/date-picker/panel/date/index.js +85 -85
  88. package/date-picker/panel/month/index.js +59 -59
  89. package/date-picker/panel/quarter/index.js +67 -70
  90. package/date-picker/panel/range/index.js +101 -101
  91. package/date-picker/panel/year/index.js +39 -39
  92. package/date-picker/util.js +17 -18
  93. package/descriptions/index.js +62 -62
  94. package/details/index.js +55 -56
  95. package/development/index.js +9 -9
  96. package/dist/react-transition-group/src/CSSTransition.js +1 -1
  97. package/dist/react-transition-group/src/SwitchTransition.js +1 -1
  98. package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
  99. package/dist/tween/src/tween.js +24 -25
  100. package/dist/validate/src/index.js +5 -5
  101. package/dist/validate/src/util.js +1 -1
  102. package/divider/index.js +21 -21
  103. package/draggable/Item.js +35 -35
  104. package/draggable/index.js +22 -22
  105. package/drawer/Drawer.js +142 -147
  106. package/dropdown/Button.js +48 -48
  107. package/dropdown/index.js +88 -92
  108. package/empty/index.js +16 -16
  109. package/form/Control.js +211 -225
  110. package/form/Form.js +109 -113
  111. package/form/FormItem.js +118 -120
  112. package/form/FormList.js +60 -66
  113. package/form/FormProvider.js +31 -34
  114. package/form/hook/useContext.js +17 -19
  115. package/form/hook/useState.js +22 -23
  116. package/form/hook/useWatch.js +26 -27
  117. package/form/promisify.js +14 -18
  118. package/form/store.js +304 -316
  119. package/form/util.js +14 -15
  120. package/grid/Col.js +64 -64
  121. package/grid/Grid.js +51 -51
  122. package/grid/GridItem.js +48 -48
  123. package/grid/Row.js +39 -39
  124. package/hooks/index.js +50 -52
  125. package/hooks/useVerificationCode.js +41 -43
  126. package/hooks/useWatermark.js +89 -92
  127. package/icon/index.js +23 -24
  128. package/icon-hover/index.js +16 -16
  129. package/icons/file.js +11 -11
  130. package/image/Image.js +140 -141
  131. package/image/ImagePreview.js +252 -255
  132. package/image/ImagePreviewArrow.js +25 -25
  133. package/image/ImagePreviewGroup.js +62 -62
  134. package/image/util/getScale.js +25 -28
  135. package/index.js +682 -679
  136. package/input/Button.js +48 -50
  137. package/input/Group.js +9 -9
  138. package/input/Input.js +145 -154
  139. package/input/InputElement.js +108 -115
  140. package/input/Password.js +38 -38
  141. package/input/Search.js +51 -55
  142. package/input/Textarea.js +80 -81
  143. package/input/useComposition.js +23 -23
  144. package/input-number/decimal.js +59 -62
  145. package/input-number/index.js +139 -141
  146. package/input-tag/InputTag.js +223 -231
  147. package/layout/Content.js +6 -6
  148. package/layout/Footer.js +8 -8
  149. package/layout/Header.js +7 -7
  150. package/layout/Sider.js +88 -90
  151. package/layout/index.js +30 -30
  152. package/link/index.js +45 -46
  153. package/liquid-fill/LiquidFill.js +189 -0
  154. package/liquid-fill/LiquidFill2.js +3 -0
  155. package/liquid-fill/index.js +4 -0
  156. package/liquid-fill/interface.js +1 -0
  157. package/list/Item.js +28 -28
  158. package/list/Meta.js +12 -12
  159. package/list/index.js +146 -148
  160. package/mentions/index.js +75 -76
  161. package/menu/Item.js +58 -58
  162. package/menu/Menu.js +125 -127
  163. package/menu/OverflowWrap.js +39 -40
  164. package/menu/sub-menu/Inline.js +45 -45
  165. package/menu/util.js +26 -28
  166. package/message/index.js +97 -100
  167. package/message/useMessage.js +26 -27
  168. package/modal/Confirm.js +47 -49
  169. package/modal/Modal.js +250 -257
  170. package/modal/use-modal/Hook.js +26 -28
  171. package/modal/use-modal/index.js +46 -49
  172. package/notice/index.js +89 -90
  173. package/notification/index.js +61 -66
  174. package/notification/withNotification.js +35 -35
  175. package/overflow-ellipsis/OverflowItem.js +19 -20
  176. package/overflow-ellipsis/index.js +45 -46
  177. package/package.json +1 -1
  178. package/page-header/index.js +45 -45
  179. package/pagination/PageItem.js +87 -91
  180. package/pagination/PageJumper.js +40 -41
  181. package/pagination/PageOption.js +31 -35
  182. package/pagination/Pagination.js +162 -163
  183. package/picker/Input.js +90 -96
  184. package/picker/InputRange.js +115 -122
  185. package/popconfirm/index.js +98 -100
  186. package/popover/index.js +28 -28
  187. package/portal/Portal.js +10 -11
  188. package/progress/index.js +36 -36
  189. package/qr-code/index.js +99 -0
  190. package/qr-code/interface.js +1 -0
  191. package/radio/Group.js +48 -48
  192. package/radio/GroupBlock.js +32 -33
  193. package/radio/Radio.js +62 -64
  194. package/rate/index.js +88 -88
  195. package/resize-box/ResizeTrigger.js +39 -39
  196. package/resize-box/Split.js +92 -96
  197. package/resize-box/SplitGroup.js +116 -122
  198. package/resize-box/index.js +112 -115
  199. package/result/index.js +44 -44
  200. package/select/Option.js +53 -56
  201. package/select/Select.js +365 -381
  202. package/select/util.js +95 -99
  203. package/select-view/Core.js +159 -160
  204. package/skeleton/index.js +23 -23
  205. package/slider/Button.js +84 -92
  206. package/slider/Input.js +47 -49
  207. package/slider/Tick.js +28 -31
  208. package/slider/index.js +108 -108
  209. package/slider/util.js +1 -1
  210. package/space/index.js +26 -26
  211. package/space-/index.js +51 -51
  212. package/spin/DotLoading.js +8 -8
  213. package/spin/index.js +47 -47
  214. package/statistic/Countdown.js +37 -37
  215. package/statistic/index.js +61 -61
  216. package/steps/Step.js +42 -42
  217. package/steps/index.js +54 -54
  218. package/style.css +1 -1
  219. package/switch/index.js +78 -79
  220. package/table/ColGroup.js +36 -37
  221. package/table/Table.js +447 -450
  222. package/table/hook/useExpand.js +24 -24
  223. package/table/hook/useRowSelection.js +62 -62
  224. package/table/summary/Row.js +16 -17
  225. package/table/tbody/Td.js +119 -118
  226. package/table/tbody/Tr.js +119 -121
  227. package/table/tbody/index.js +62 -63
  228. package/table/th-resizable/index.js +30 -30
  229. package/table/thead/Column.js +148 -148
  230. package/table/thead/index.js +87 -88
  231. package/tabs/Tab.js +55 -55
  232. package/tabs/TabContent.js +8 -8
  233. package/tabs/TabPane.js +15 -15
  234. package/tabs/hook/useHeaderScroll.js +36 -36
  235. package/tabs/tab-header/TabInk.js +31 -33
  236. package/tabs/tab-header/TabNavIcon.js +34 -35
  237. package/tabs/tab-header/index.js +192 -195
  238. package/tag/index.js +94 -97
  239. package/time-picker/Picker.js +167 -172
  240. package/time-picker/RangePicker.js +28 -28
  241. package/time-picker/TimePicker.js +146 -146
  242. package/time-picker/util.js +4 -4
  243. package/timeline/Item.js +46 -46
  244. package/timeline/Timeline.js +52 -52
  245. package/tooltip/index.js +89 -95
  246. package/tour/index.js +289 -0
  247. package/transfer/Item.js +54 -54
  248. package/transfer/List.js +134 -136
  249. package/transfer/index.js +91 -91
  250. package/tree/Animation.js +49 -52
  251. package/tree/Node.js +114 -122
  252. package/tree/NodeList.js +51 -51
  253. package/tree/Tree.js +386 -393
  254. package/tree-select/List.js +71 -72
  255. package/tree-select/Select.js +135 -143
  256. package/tree-select/hook/useKeyCache.js +39 -39
  257. package/tree-select/hook/useStateValue.js +12 -12
  258. package/trigger/getPopupStyle.js +60 -61
  259. package/trigger/index.js +338 -347
  260. package/types/common/space/interface.d.ts +1 -1
  261. package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  262. package/types/common/utils/findScrollParent.d.ts +2 -0
  263. package/types/common/utils/index.d.ts +5 -0
  264. package/types/common/utils/intersectionObserver.d.ts +2 -0
  265. package/types/common/utils/math.d.ts +1 -1
  266. package/types/common/utils/mutationObserver.d.ts +2 -0
  267. package/types/common/utils/resizeObserver.d.ts +2 -0
  268. package/types/pc/alert/interface.d.ts +2 -2
  269. package/types/pc/details/interface.d.ts +2 -2
  270. package/types/pc/hooks/index.d.ts +0 -1
  271. package/types/pc/index.d.ts +3 -0
  272. package/types/pc/liquid-fill/LiquidFill.d.ts +30 -0
  273. package/types/pc/liquid-fill/LiquidFill2.d.ts +1 -0
  274. package/types/pc/liquid-fill/index.d.ts +4 -0
  275. package/types/pc/liquid-fill/interface.d.ts +0 -0
  276. package/types/pc/qr-code/index.d.ts +34 -0
  277. package/types/pc/qr-code/interface.d.ts +39 -0
  278. package/types/pc/table/interface.d.ts +2 -2
  279. package/types/pc/tour/index.d.ts +42 -0
  280. package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  281. package/types/pc/utils/findScrollParent.d.ts +2 -0
  282. package/types/pc/utils/index.d.ts +5 -0
  283. package/types/pc/utils/intersectionObserver.d.ts +2 -0
  284. package/types/pc/utils/math.d.ts +1 -1
  285. package/types/pc/utils/mutationObserver.d.ts +2 -0
  286. package/types/pc/utils/names.d.ts +18 -0
  287. package/types/pc/utils/resizeObserver.d.ts +2 -0
  288. package/typography/Base.js +79 -81
  289. package/typography/EditContent.js +30 -33
  290. package/typography/Ellipsis.js +78 -75
  291. package/typography/Operations.js +50 -52
  292. package/typography/Paragraph.js +7 -7
  293. package/typography/Typography.js +7 -7
  294. package/typography/useEllipsis.js +105 -106
  295. package/upload/TriggerNode.js +69 -76
  296. package/upload/Upload.js +84 -87
  297. package/upload/Uploader.js +115 -118
  298. package/upload/list/PictureItem.js +61 -71
  299. package/upload/list/TextItem.js +61 -67
  300. package/upload/list/UploadProgress.js +42 -49
  301. package/upload/list/index.js +49 -50
  302. package/upload/request_.js +37 -38
  303. package/upload/util.js +39 -39
  304. package/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  305. package/utils/findScrollParent.js +4 -0
  306. package/utils/index.js +274 -275
  307. package/utils/intersectionObserver.js +4 -0
  308. package/utils/math.js +7 -11
  309. package/utils/mutationObserver.js +4 -0
  310. package/utils/names.js +12 -0
  311. package/utils/reactTransitionGroup.js +1 -1
  312. package/utils/resizeObserver.js +4 -0
  313. package/verification-code/VerificationCode.js +50 -51
  314. package/version/index.js +1 -1
  315. package/virtual-list/VirtualList.js +243 -244
  316. package/virtual-list/util/item.js +3 -4
  317. package/watermark/Watermark.js +27 -31
  318. package/components/common/hooks/useComputedState.js +0 -11
  319. package/components/common/utils/resizeObserverEffect.js +0 -23
  320. package/hooks/useComputedState.js +0 -4
  321. package/types/common/hooks/useComputedState.d.ts +0 -4
  322. package/types/common/utils/resizeObserverEffect.d.ts +0 -2
  323. package/types/pc/hooks/useComputedState.d.ts +0 -1
  324. package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
  325. package/utils/resizeObserverEffect.js +0 -4
  326. /package/dist/react-transition-group/chunk/{C6QwjD4L.js → CPfP7aNL.js} +0 -0
@@ -1,94 +1,94 @@
1
- import { jsxs as g, Fragment as ve, jsx as n } from "react/jsx-runtime";
2
- import { useContext as ye, useState as Y, useEffect as Z, createElement as Se } from "react";
3
- import Fe from "@unicom-cloud/icons/IconUiCaretDown";
4
- import Te from "@unicom-cloud/icons/IconUiCaretUp";
5
- import Ie from "@unicom-cloud/icons/IconUiFilter";
6
- import _ from "lodash/isArray";
7
- import be from "lodash/isFunction";
8
- import E from "lodash/isPlainObject";
9
- import De from "lodash/isString";
10
- import H from "../../button/index.js";
11
- import Pe from "../../checkbox/Checkbox.js";
1
+ import { jsxs as u, Fragment as Fe, jsx as n } from "react/jsx-runtime";
2
+ import { useContext as ve, useState as Q, useEffect as W, createElement as Se } from "react";
3
+ import be from "@unicom-cloud/icons/IconUiCaretDown";
4
+ import ye from "@unicom-cloud/icons/IconUiCaretUp";
5
+ import Te from "@unicom-cloud/icons/IconUiFilter";
6
+ import X from "lodash/isArray";
7
+ import Ie from "lodash/isFunction";
8
+ import P from "lodash/isPlainObject";
9
+ import ke from "lodash/isString";
10
+ import Y from "../../button/index.js";
11
+ import De from "../../checkbox/Checkbox.js";
12
12
  import "../../checkbox/Group.js";
13
13
  import "../../config-provider/ConfigProvider.js";
14
- import ke from "../../components/common/hooks/useMergeValue.js";
15
- import we from "../../radio/Radio.js";
14
+ import we from "../../components/common/hooks/useMergeValue.js";
15
+ import Pe from "../../radio/Radio.js";
16
16
  import Ae from "../../space/index.js";
17
17
  import Ee from "../hook/useComponent.js";
18
18
  import Oe from "../../tooltip/index.js";
19
19
  import Me from "../../trigger/index.js";
20
- import C from "@unicom-cloud/utils/class-name";
20
+ import h from "@unicom-cloud/utils/class-name";
21
21
  import Re from "../../config-provider/context.js";
22
- function Ue(x, i) {
23
- return x === "ascend" ? i == null ? void 0 : i.Table.sortAscend : x === "descend" ? i == null ? void 0 : i.Table.sortDescend : i == null ? void 0 : i.Table.cancelSort;
22
+ function Ue(g, m) {
23
+ return g === "ascend" ? m?.Table.sortAscend : g === "descend" ? m?.Table.sortDescend : m?.Table.cancelSort;
24
24
  }
25
25
  const je = { bottom: 0 };
26
- function st(x) {
26
+ function lt(g) {
27
27
  const {
28
- onSort: i,
29
- onFilter: O,
30
- onHandleFilter: f,
31
- onHandleFilterReset: V,
32
- currentFilters: T = {},
28
+ onSort: m,
29
+ onFilter: A,
30
+ onHandleFilter: E,
31
+ onHandleFilterReset: Z,
32
+ currentFilters: S = {},
33
33
  currentSorter: o,
34
- _key: M,
35
- dataIndex: ee,
36
- title: $,
37
- sorter: te,
38
- sortDirections: c = ["ascend", "descend"],
39
- filters: u = [],
40
- columnFixedStyle: ne,
41
- className: re,
42
- headerClassName: ie,
43
- cellStyle: R,
44
- headerCellStyle: N,
45
- rowSpan: I,
46
- colSpan: v,
47
- headerCellProps: oe,
34
+ _key: O,
35
+ dataIndex: _,
36
+ title: C,
37
+ sorter: ee,
38
+ sortDirections: l = ["ascend", "descend"],
39
+ filters: f = [],
40
+ columnFixedStyle: te,
41
+ className: ne,
42
+ headerClassName: re,
43
+ cellStyle: M,
44
+ headerCellStyle: x,
45
+ rowSpan: b,
46
+ colSpan: $,
47
+ headerCellProps: ie,
48
48
  prefixCls: t,
49
- align: b = "left",
50
- component: se,
49
+ align: y = "left",
50
+ component: oe,
51
51
  filterIcon: le,
52
- filterDropdown: D,
53
- filterMultiple: U = !0,
54
- ellipsis: j,
55
- filterDropdownProps: z,
56
- onFilterDropdownVisibleChange: P,
52
+ filterDropdown: T,
53
+ filterMultiple: R = !0,
54
+ ellipsis: U,
55
+ filterDropdownProps: j,
56
+ onFilterDropdownVisibleChange: se,
57
57
  column: ce,
58
- showSorterTooltip: k,
59
- index: B
60
- } = x, { locale: m, rtl: de } = ye(Re), s = M || ee || B, [p, h, a] = ke([], {
61
- value: T[s] || []
62
- }), [w, K] = Y(!1), [L, q] = Y(!1), y = te && _(c) && c.length, S = y ? me() : void 0;
63
- Z(() => {
64
- h(T[s] || []);
65
- }, [T, s]), Z(() => {
66
- p && p !== a && h(p);
67
- }, [w]);
68
- function me() {
58
+ showSorterTooltip: I,
59
+ index: H
60
+ } = g, { locale: k, rtl: ae } = ve(Re), i = O || _ || H, [d, p, a] = we([], {
61
+ value: S[i] || []
62
+ }), [D, z] = Q(!1), [B, K] = Q(!1), N = ee && X(l) && l.length, F = N ? de() : void 0;
63
+ W(() => {
64
+ p(S[i] || []);
65
+ }, [S, i]), W(() => {
66
+ d && d !== a && p(d);
67
+ }, [D]);
68
+ function de() {
69
69
  const e = o && o.direction;
70
- if (!e || o && o.field !== s)
71
- return c[0];
72
- const l = c.indexOf(e);
73
- if (l < c.length)
74
- return c[l + 1];
70
+ if (!e || o && o.field !== i)
71
+ return l[0];
72
+ const s = l.indexOf(e);
73
+ if (s < l.length)
74
+ return l[s + 1];
75
75
  }
76
- function ae() {
77
- p && (f == null || f(
78
- { onFilter: O, filters: u, dataIndex: s },
76
+ function me() {
77
+ d && (E?.(
78
+ { onFilter: A, filters: f, dataIndex: i },
79
79
  a
80
- ), A(!1));
80
+ ), w(!1));
81
81
  }
82
82
  function fe() {
83
- V({ dataIndex: s }), A(!1);
83
+ Z({ dataIndex: i }), w(!1);
84
84
  }
85
- function A(e) {
86
- K(e), P == null || P(e);
85
+ function w(e) {
86
+ z(e), se?.(e);
87
87
  }
88
- function G(e, l) {
88
+ function L(e, s) {
89
89
  let r = [...a];
90
- if (U)
91
- l ? r = r.concat(e) : r.splice(
90
+ if (R)
91
+ s ? r = r.concat(e) : r.splice(
92
92
  r.findIndex((Ne) => Ne === e),
93
93
  1
94
94
  );
@@ -99,99 +99,99 @@ function st(x) {
99
99
  return;
100
100
  else
101
101
  r = [e];
102
- h(r);
102
+ p(r);
103
103
  }
104
104
  function pe(e) {
105
- h(e || a), K(!1), f == null || f(
106
- { filters: u, onFilter: O, dataIndex: s },
105
+ p(e || a), z(!1), E?.(
106
+ { filters: f, onFilter: A, dataIndex: i },
107
107
  e || a
108
108
  );
109
109
  }
110
110
  function ue() {
111
- return typeof D == "function" ? D({
111
+ return typeof T == "function" ? T({
112
112
  filterKeys: a,
113
- setFilterKeys: (e, l) => {
114
- h(e), l == null || l();
113
+ setFilterKeys: (e, s) => {
114
+ p(e), s?.();
115
115
  },
116
116
  confirm: pe
117
- }) : /* @__PURE__ */ g("div", { className: `${t}-filters-popup`, children: [
118
- /* @__PURE__ */ n("div", { className: `${t}-filters-list`, children: u.map((e) => {
119
- const l = a.findIndex((r) => r === e.value) !== -1;
120
- return /* @__PURE__ */ n("div", { className: `${t}-filters-item`, children: U ? /* @__PURE__ */ n(
121
- Pe,
117
+ }) : /* @__PURE__ */ u("div", { className: `${t}-filters-popup`, children: [
118
+ /* @__PURE__ */ n("div", { className: `${t}-filters-list`, children: f.map((e) => {
119
+ const s = a.findIndex((r) => r === e.value) !== -1;
120
+ return /* @__PURE__ */ n("div", { className: `${t}-filters-item`, children: R ? /* @__PURE__ */ n(
121
+ De,
122
122
  {
123
- checked: l,
124
- onChange: (r) => G(e.value, r),
123
+ checked: s,
124
+ onChange: (r) => L(e.value, r),
125
125
  children: e.text
126
126
  }
127
127
  ) : /* @__PURE__ */ n(
128
- we,
128
+ Pe,
129
129
  {
130
- checked: l,
131
- onChange: (r) => G(e.value, r),
130
+ checked: s,
131
+ onChange: (r) => L(e.value, r),
132
132
  children: e.text
133
133
  }
134
134
  ) }, e.value);
135
135
  }) }),
136
- /* @__PURE__ */ g(Ae, { className: `${t}-filters-btn`, children: [
137
- /* @__PURE__ */ n(H, { onClick: fe, size: "mini", children: m == null ? void 0 : m.Table.resetText }),
138
- /* @__PURE__ */ n(H, { onClick: ae, type: "primary", size: "mini", children: m == null ? void 0 : m.Table.okText })
136
+ /* @__PURE__ */ u(Ae, { className: `${t}-filters-btn`, children: [
137
+ /* @__PURE__ */ n(Y, { onClick: fe, size: "mini", children: k?.Table.resetText }),
138
+ /* @__PURE__ */ n(Y, { onClick: me, type: "primary", size: "mini", children: k?.Table.okText })
139
139
  ] })
140
140
  ] });
141
141
  }
142
- const J = (e) => C(`${t}-sorter-icon`, {
143
- [`${t}-sorter-icon-active`]: o && o.direction === e && o.field === s
144
- }), he = C(`${t}-filters`, {
145
- [`${t}-filters-open`]: w,
146
- [`${t}-filters-active`]: p && p.length
142
+ const V = (e) => h(`${t}-sorter-icon`, {
143
+ [`${t}-sorter-icon-active`]: o && o.direction === e && o.field === i
144
+ }), he = h(`${t}-filters`, {
145
+ [`${t}-filters-open`]: D,
146
+ [`${t}-filters-active`]: d && d.length
147
147
  });
148
- let d = {
149
- ...ne
148
+ let c = {
149
+ ...te
150
150
  };
151
- E(R) && (d = {
152
- ...d,
153
- ...R
154
- }), E(N) && (d = {
155
- ...d,
156
- ...N
157
- }), be(N) && (d = {
158
- ...d,
159
- ...N()
160
- }), b && b !== "left" && (d.textAlign = b);
161
- const F = {
162
- style: d,
163
- key: M || s
151
+ P(M) && (c = {
152
+ ...c,
153
+ ...M
154
+ }), P(x) && (c = {
155
+ ...c,
156
+ ...x
157
+ }), Ie(x) && (c = {
158
+ ...c,
159
+ ...x()
160
+ }), y && y !== "left" && (c.textAlign = y);
161
+ const v = {
162
+ style: c,
163
+ key: O || i
164
164
  };
165
- v && v > 1 && (F.colSpan = v), I && I > 1 && (F.rowSpan = I);
166
- const { ComponentTh: ge, ComponentHeaderCell: Q } = Ee(se), W = _(u) && u.length > 0 || typeof D == "function", X = j && typeof $ == "string" ? { title: $ } : {}, Ce = z && z.triggerProps, xe = /* @__PURE__ */ g(ve, { children: [
167
- y ? /* @__PURE__ */ n(
165
+ $ && $ > 1 && (v.colSpan = $), b && b > 1 && (v.rowSpan = b);
166
+ const { ComponentTh: ge, ComponentHeaderCell: q } = Ee(oe), G = X(f) && f.length > 0 || typeof T == "function", J = U && typeof C == "string" ? { title: C } : {}, Ce = j && j.triggerProps, xe = /* @__PURE__ */ u(Fe, { children: [
167
+ N ? /* @__PURE__ */ n(
168
168
  Oe,
169
169
  {
170
- content: Ue(S, m),
171
- disabled: !k,
172
- ...E(k) ? k : {},
173
- children: /* @__PURE__ */ g(
170
+ content: Ue(F, k),
171
+ disabled: !I,
172
+ ...P(I) ? I : {},
173
+ children: /* @__PURE__ */ u(
174
174
  "div",
175
175
  {
176
176
  className: `${t}-cell-with-sorter`,
177
177
  onMouseEnter: () => {
178
- q(!0);
178
+ K(!0);
179
179
  },
180
180
  onMouseLeave: () => {
181
- q(!1);
181
+ K(!1);
182
182
  },
183
- onClick: () => i(S, s),
183
+ onClick: () => m(F, i),
184
184
  children: [
185
- /* @__PURE__ */ n("span", { className: `${t}-th-item-title`, ...X, children: $ }),
186
- y && /* @__PURE__ */ g(
185
+ /* @__PURE__ */ n("span", { className: `${t}-th-item-title`, ...J, children: C }),
186
+ N && /* @__PURE__ */ u(
187
187
  "div",
188
188
  {
189
- className: C(`${t}-sorter`, {
190
- [`${t}-sorter-direction-one`]: c.length === 1
189
+ className: h(`${t}-sorter`, {
190
+ [`${t}-sorter-direction-one`]: l.length === 1
191
191
  }),
192
192
  children: [
193
- c.indexOf("ascend") !== -1 && /* @__PURE__ */ n("div", { className: J("ascend"), children: /* @__PURE__ */ n(Te, {}) }),
194
- c.indexOf("descend") !== -1 && /* @__PURE__ */ n("div", { className: J("descend"), children: /* @__PURE__ */ n(Fe, {}) })
193
+ l.indexOf("ascend") !== -1 && /* @__PURE__ */ n("div", { className: V("ascend"), children: /* @__PURE__ */ n(ye, {}) }),
194
+ l.indexOf("descend") !== -1 && /* @__PURE__ */ n("div", { className: V("descend"), children: /* @__PURE__ */ n(be, {}) })
195
195
  ]
196
196
  }
197
197
  )
@@ -199,54 +199,54 @@ function st(x) {
199
199
  }
200
200
  )
201
201
  }
202
- ) : /* @__PURE__ */ n("span", { className: `${t}-th-item-title`, ...X, children: $ }),
203
- W && /* @__PURE__ */ n(
202
+ ) : /* @__PURE__ */ n("span", { className: `${t}-th-item-title`, ...J, children: C }),
203
+ G && /* @__PURE__ */ n(
204
204
  Me,
205
205
  {
206
206
  popup: ue,
207
207
  trigger: "click",
208
208
  classNames: "slideDynamicOrigin",
209
- position: de ? "bl" : "br",
209
+ position: ae ? "bl" : "br",
210
210
  popupAlign: je,
211
- popupVisible: w,
212
- onVisibleChange: A,
211
+ popupVisible: D,
212
+ onVisibleChange: w,
213
213
  ...Ce,
214
- children: /* @__PURE__ */ n("div", { className: he, children: le || /* @__PURE__ */ n(Ie, {}) })
214
+ children: /* @__PURE__ */ n("div", { className: he, children: le || /* @__PURE__ */ n(Te, {}) })
215
215
  }
216
216
  )
217
- ] }), $e = C(`${t}-th-item`, {
218
- [`${t}-cell-text-ellipsis`]: j,
219
- [`${t}-cell-mouseenter`]: L,
220
- [`${t}-cell-next-${S}`]: L && S,
221
- [`${t}-col-has-sorter`]: y,
222
- [`${t}-col-has-filter`]: W
217
+ ] }), $e = h(`${t}-th-item`, {
218
+ [`${t}-cell-text-ellipsis`]: U,
219
+ [`${t}-cell-mouseenter`]: B,
220
+ [`${t}-cell-next-${F}`]: B && F,
221
+ [`${t}-col-has-sorter`]: N,
222
+ [`${t}-col-has-filter`]: G
223
223
  });
224
- return v !== 0 && /* @__PURE__ */ Se(
224
+ return $ !== 0 && /* @__PURE__ */ Se(
225
225
  ge,
226
226
  {
227
- className: C(
227
+ className: h(
228
228
  `${t}-th`,
229
229
  {
230
- [`${t}-col-sorted`]: (o == null ? void 0 : o.direction) && o.field === s
230
+ [`${t}-col-sorted`]: o?.direction && o.field === i
231
231
  },
232
- re,
233
- ie
232
+ ne,
233
+ re
234
234
  ),
235
- index: B,
236
- ...F,
237
- key: F.key,
238
- ...oe
235
+ index: H,
236
+ ...v,
237
+ key: v.key,
238
+ ...ie
239
239
  },
240
240
  /* @__PURE__ */ n(
241
- Q,
241
+ q,
242
242
  {
243
243
  className: $e,
244
- column: De(Q) ? void 0 : ce,
244
+ column: ke(q) ? void 0 : ce,
245
245
  children: xe
246
246
  }
247
247
  )
248
248
  );
249
249
  }
250
250
  export {
251
- st as default
251
+ lt as default
252
252
  };
@@ -1,124 +1,123 @@
1
- import { jsx as c, jsxs as re } from "react/jsx-runtime";
2
- import ne, { useContext as ie, useMemo as oe, createElement as L } from "react";
3
- import ae from "../../checkbox/Checkbox.js";
1
+ import { jsx as d, jsxs as V } from "react/jsx-runtime";
2
+ import Z, { useContext as ee, useMemo as te, createElement as _ } from "react";
3
+ import oe from "../../checkbox/Checkbox.js";
4
4
  import "../../checkbox/Group.js";
5
5
  import "../../config-provider/ConfigProvider.js";
6
- import { INTERNAL_SELECTION_KEY as le, INTERNAL_EXPAND_KEY as de } from "../constant.js";
7
- import ce from "../hook/useComponent.js";
8
- import p from "@unicom-cloud/utils/class-name";
9
- import pe from "./Column.js";
10
- import he from "../../config-provider/context.js";
11
- function Re(R) {
6
+ import { INTERNAL_SELECTION_KEY as se, INTERNAL_EXPAND_KEY as ne } from "../constant.js";
7
+ import re from "../hook/useComponent.js";
8
+ import c from "@unicom-cloud/utils/class-name";
9
+ import ie from "./Column.js";
10
+ import ae from "../../config-provider/context.js";
11
+ function ke(R) {
12
12
  const {
13
- activeSorters: j,
14
- expandedRowRender: Y,
15
- expandProps: D = {},
16
- onSort: M,
17
- onHandleFilter: W,
18
- onHandleFilterReset: X,
19
- onHeaderRow: m,
20
- prefixCls: s,
21
- currentFilters: q,
22
- component: $,
23
- data: E,
24
- selectedRowKeys: A,
13
+ activeSorters: b,
14
+ expandedRowRender: K,
15
+ expandProps: P = {},
16
+ onSort: F,
17
+ onHandleFilter: v,
18
+ onHandleFilterReset: I,
19
+ onHeaderRow: L,
20
+ prefixCls: o,
21
+ currentFilters: j,
22
+ component: S,
23
+ data: $,
24
+ selectedRowKeys: E,
25
25
  rowSelection: t,
26
- allSelectedRowKeys: o = [],
27
- groupColumns: y,
28
- stickyOffsets: C,
29
- groupStickyClassNames: z,
30
- showSorterTooltip: B
31
- } = R, { rtl: k } = ie(he), { ComponentThead: G, ComponentHeaderRow: J, getHeaderComponentOperations: Q } = ce($), U = t && (t.type === "checkbox" || !("type" in t)), V = t && "checkAll" in t ? t.checkAll : !0, N = t && t.type === "radio", { columnTitle: T } = D, h = oe(() => {
32
- const f = new Set(o);
33
- return A.filter((n, O, _) => f.has(n));
34
- }, [A, o]), Z = y.length > 1 ? { rowSpan: y.length } : {}, g = p(`${s}-th`, `${s}-operation`);
35
- return /* @__PURE__ */ c(G, { children: y.map((f, n) => {
36
- const O = m == null ? void 0 : m(f, n), _ = (U || N) && n === 0 && /* @__PURE__ */ c(
26
+ allSelectedRowKeys: r = [],
27
+ groupColumns: m,
28
+ stickyOffsets: N,
29
+ groupStickyClassNames: Y,
30
+ showSorterTooltip: D
31
+ } = R, { rtl: y } = ee(ae), { ComponentThead: M, ComponentHeaderRow: W, getHeaderComponentOperations: X } = re(S), q = t && (t.type === "checkbox" || !("type" in t)), z = t && "checkAll" in t ? t.checkAll : !0, C = t && t.type === "radio", { columnTitle: A } = P, p = te(() => {
32
+ const h = new Set(r);
33
+ return E.filter((s, T, u) => h.has(s));
34
+ }, [E, r]), B = m.length > 1 ? { rowSpan: m.length } : {}, k = c(`${o}-th`, `${o}-operation`);
35
+ return /* @__PURE__ */ d(M, { children: m.map((h, s) => {
36
+ const T = L?.(h, s), u = (q || C) && s === 0 && /* @__PURE__ */ d(
37
37
  "th",
38
38
  {
39
- className: p(
40
- g,
41
- `${s}-${N ? "radio" : "checkbox"}`
39
+ className: c(
40
+ k,
41
+ `${o}-${C ? "radio" : "checkbox"}`
42
42
  ),
43
- children: /* @__PURE__ */ re("div", { className: `${s}-th-item`, children: [
44
- V && !N ? /* @__PURE__ */ c(
45
- ae,
43
+ children: /* @__PURE__ */ V("div", { className: `${o}-th-item`, children: [
44
+ z && !C ? /* @__PURE__ */ d(
45
+ oe,
46
46
  {
47
- indeterminate: E && h.length > 0 && h.length !== o.length,
48
- checked: E && h.length !== 0 && h.length === o.length,
49
- disabled: !o.length,
47
+ indeterminate: $ && p.length > 0 && p.length !== r.length,
48
+ checked: $ && p.length !== 0 && p.length === r.length,
49
+ disabled: !r.length,
50
50
  onChange: R.onCheckAll
51
51
  }
52
52
  ) : null,
53
53
  t && t.columnTitle
54
54
  ] })
55
55
  }
56
- ), u = Y && /* @__PURE__ */ c("th", { className: p(g, `${s}-expand`), children: T && /* @__PURE__ */ c("div", { className: `${s}-th-item`, children: T }) }), ee = z[n], b = Q({
57
- selectionNode: _,
58
- expandNode: u
56
+ ), G = K && /* @__PURE__ */ d("th", { className: c(k, `${o}-expand`), children: A && /* @__PURE__ */ d("div", { className: `${o}-th-item`, children: A }) }), J = Y[s], H = X({
57
+ selectionNode: u,
58
+ expandNode: G
59
59
  });
60
- return /* @__PURE__ */ L(
61
- J,
60
+ return /* @__PURE__ */ _(
61
+ W,
62
62
  {
63
- ...O,
64
- key: n,
65
- className: `${s}-tr`
63
+ ...T,
64
+ key: s,
65
+ className: `${o}-tr`
66
66
  },
67
- f.map((e, a) => {
68
- var K, P, F, v, I;
69
- const i = e.$$columnIndex;
70
- let l = 0;
71
- Array.isArray(i) && i.length === 2 ? l = e.fixed === "right" ? C[i[1]] : C[i[0]] : typeof i == "number" && (l = C[i] || 0);
72
- const H = ee[a];
67
+ h.map((e, i) => {
68
+ const n = e.$$columnIndex;
69
+ let a = 0;
70
+ Array.isArray(n) && n.length === 2 ? a = e.fixed === "right" ? N[n[1]] : N[n[0]] : typeof n == "number" && (a = N[n] || 0);
71
+ const O = J[i];
73
72
  if (e.$$isOperation) {
74
- let d = e.node, S = !0;
75
- e.title === le && (d = (K = b.find(
73
+ let l = e.node, x = !0;
74
+ e.title === se && (l = H.find(
76
75
  (w) => w.name === "selectionNode"
77
- )) == null ? void 0 : K.node, S = !1), e.title === de && (d = (P = b.find(
76
+ )?.node, x = !1), e.title === ne && (l = H.find(
78
77
  (w) => w.name === "expandNode"
79
- )) == null ? void 0 : P.node, S = !1);
80
- const r = d;
81
- return ne.cloneElement(r, {
82
- key: e.key || a,
83
- ...r.props,
84
- ...Z,
85
- className: p(
86
- S ? g : "",
87
- (F = r == null ? void 0 : r.props) == null ? void 0 : F.className,
88
- H
78
+ )?.node, x = !1);
79
+ const f = l;
80
+ return Z.cloneElement(f, {
81
+ key: e.key || i,
82
+ ...f.props,
83
+ ...B,
84
+ className: c(
85
+ x ? k : "",
86
+ f?.props?.className,
87
+ O
89
88
  ),
90
89
  style: {
91
- ...(v = r == null ? void 0 : r.props) == null ? void 0 : v.style,
90
+ ...f?.props?.style,
92
91
  ...e.fixed === "left" ? {
93
- [k ? "right" : "left"]: l
92
+ [y ? "right" : "left"]: a
94
93
  } : {},
95
94
  width: e.width,
96
95
  minWidth: e.width
97
96
  }
98
97
  });
99
98
  }
100
- const te = (I = e == null ? void 0 : e.onHeaderCell) == null ? void 0 : I.call(e, e, a), se = p(H, e.className), x = {};
101
- return e.fixed === "left" && (x[k ? "right" : "left"] = l), e.fixed === "right" && (x[k ? "left" : "right"] = l), /* @__PURE__ */ L(
102
- pe,
99
+ const Q = e?.onHeaderCell?.(e, i), U = c(O, e.className), g = {};
100
+ return e.fixed === "left" && (g[y ? "right" : "left"] = a), e.fixed === "right" && (g[y ? "left" : "right"] = a), /* @__PURE__ */ _(
101
+ ie,
103
102
  {
104
- index: a,
105
- onSort: M,
106
- onHandleFilter: W,
107
- onHandleFilterReset: X,
108
- currentSorter: j.find(
109
- (d) => d.field === (e.dataIndex || e.key)
103
+ index: i,
104
+ onSort: F,
105
+ onHandleFilter: v,
106
+ onHandleFilterReset: I,
107
+ currentSorter: b.find(
108
+ (l) => l.field === (e.dataIndex || e.key)
110
109
  ),
111
- currentFilters: q,
112
- _key: e.key || e.dataIndex || a,
110
+ currentFilters: j,
111
+ _key: e.key || e.dataIndex || i,
113
112
  ...e,
114
113
  key: e.key,
115
114
  column: e,
116
- headerCellProps: te,
117
- prefixCls: s,
118
- component: $,
119
- className: se,
120
- columnFixedStyle: x,
121
- showSorterTooltip: B
115
+ headerCellProps: Q,
116
+ prefixCls: o,
117
+ component: S,
118
+ className: U,
119
+ columnFixedStyle: g,
120
+ showSorterTooltip: D
122
121
  }
123
122
  );
124
123
  })
@@ -126,5 +125,5 @@ function Re(R) {
126
125
  }) });
127
126
  }
128
127
  export {
129
- Re as default
128
+ ke as default
130
129
  };