@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
package/table/Table.js CHANGED
@@ -1,36 +1,36 @@
1
- import { jsx as a, jsxs as v, Fragment as vt } from "react/jsx-runtime";
2
- import { Tween as ir } from "../dist/tween/src/tween.js";
3
- import { quintInOut as lr } from "../dist/tween/src/easing.js";
4
- import cr from "lodash/debounce";
5
- import K from "lodash/isArray";
6
- import te from "lodash/isNumber";
7
- import m from "lodash/isPlainObject";
8
- import ar from "lodash/throttle";
9
- import fr, { forwardRef as dr, useContext as ur, useMemo as lt, useRef as $, useState as j, useImperativeHandle as pr, useCallback as mr, useEffect as ee } from "react";
1
+ import { jsx as a, jsxs as T, Fragment as Fe } from "react/jsx-runtime";
2
+ import { Tween as no } from "../dist/tween/src/tween.js";
3
+ import { quintInOut as so } from "../dist/tween/src/easing.js";
4
+ import io from "lodash/debounce";
5
+ import A from "lodash/isArray";
6
+ import Je from "lodash/isNumber";
7
+ import p from "lodash/isPlainObject";
8
+ import lo from "lodash/throttle";
9
+ import co, { forwardRef as ao, useContext as fo, useMemo as ne, useRef as w, useState as V, useImperativeHandle as uo, useCallback as po, useEffect as Qe } from "react";
10
10
  import "../config-provider/ConfigProvider.js";
11
- import yr from "../components/common/hooks/useIsomorphicLayoutEffect.js";
12
- import re from "../components/common/hooks/useMergeProps.js";
13
- import oe from "../components/common/hooks/useUpdateEffect.js";
14
- import ne from "../pagination/Pagination.js";
15
- import gr from "../spin/index.js";
16
- import se from "@unicom-cloud/utils/class-name";
17
- import { on as ct, off as at } from "../components/common/utils/dom.js";
18
- import { pickDataAttributes as hr } from "../components/common/utils/pick.js";
19
- import { resizeObserverEffect as br } from "../components/common/utils/resizeObserverEffect.js";
20
- import ft from "./ColGroup.js";
21
- import xr from "./hook/useColumns.js";
22
- import Sr from "./hook/useComponent.js";
23
- import Cr from "./hook/useExpand.js";
24
- import wr from "./hook/useRowSelection.js";
25
- import Tr from "./hook/useSorter.js";
26
- import $r from "./hook/useStickyClassNames.js";
27
- import Fr from "./hook/useStickyOffsets.js";
28
- import Nr from "./tbody/index.js";
29
- import vr from "./tfoot/index.js";
30
- import Pr from "./thead/index.js";
31
- import { deepCloneData as Dr, getOriginData as S, getSorterPriority as ie, getSorterFn as le, getScrollBarHeight as Br, getScrollBarWidth as Lr } from "./util.js";
32
- import zr from "../config-provider/context.js";
33
- const Rr = [], Hr = [], Er = {
11
+ import mo from "../components/common/hooks/useIsomorphicLayoutEffect.js";
12
+ import Ze from "../components/common/hooks/useMergeProps.js";
13
+ import et from "../components/common/hooks/useUpdateEffect.js";
14
+ import tt from "../pagination/Pagination.js";
15
+ import go from "../spin/index.js";
16
+ import ot from "@unicom-cloud/utils/class-name";
17
+ import { on as se, off as ie } from "../components/common/utils/dom.js";
18
+ import { pickDataAttributes as yo } from "../components/common/utils/pick.js";
19
+ import { resizeObserver as ho } from "../components/common/utils/resizeObserver.js";
20
+ import le from "./ColGroup.js";
21
+ import bo from "./hook/useColumns.js";
22
+ import Co from "./hook/useComponent.js";
23
+ import xo from "./hook/useExpand.js";
24
+ import So from "./hook/useRowSelection.js";
25
+ import wo from "./hook/useSorter.js";
26
+ import Po from "./hook/useStickyClassNames.js";
27
+ import To from "./hook/useStickyOffsets.js";
28
+ import $o from "./tbody/index.js";
29
+ import Fo from "./tfoot/index.js";
30
+ import No from "./thead/index.js";
31
+ import { deepCloneData as vo, getOriginData as C, getSorterPriority as rt, getSorterFn as nt, getScrollBarHeight as Do, getScrollBarWidth as Bo } from "./util.js";
32
+ import Lo from "../config-provider/context.js";
33
+ const zo = [], Ro = [], Ho = {
34
34
  showHeader: !0,
35
35
  border: !0,
36
36
  hover: !0,
@@ -40,590 +40,587 @@ const Rr = [], Hr = [], Er = {
40
40
  indentSize: 15,
41
41
  showSorterTooltip: !0
42
42
  };
43
- function kr(P, ce) {
44
- var Qt, Zt;
43
+ function ko(ce, st) {
45
44
  const {
46
- getPrefixCls: dt,
47
- loadingElement: ae,
48
- size: Pt,
49
- tablePagination: fe,
50
- renderEmpty: de,
51
- componentConfig: C,
52
- rtl: L
53
- } = ur(zr), x = re(
54
- P,
55
- Er,
56
- C == null ? void 0 : C.Table
57
- ), F = re(
58
- m(P == null ? void 0 : P.pagination) ? P == null ? void 0 : P.pagination : {},
59
- m((Qt = C == null ? void 0 : C.Table) == null ? void 0 : Qt.pagination) ? (Zt = C == null ? void 0 : C.Table) == null ? void 0 : Zt.pagination : {},
60
- fe || {}
45
+ getPrefixCls: it,
46
+ loadingElement: lt,
47
+ size: Ne,
48
+ tablePagination: ct,
49
+ renderEmpty: at,
50
+ componentConfig: ae,
51
+ rtl: F
52
+ } = fo(Lo), b = Ze(
53
+ ce,
54
+ Ho,
55
+ ae?.Table
56
+ ), N = Ze(
57
+ p(ce?.pagination) ? ce?.pagination : {},
58
+ p(ae?.Table?.pagination) ? ae?.Table?.pagination : {},
59
+ ct || {}
61
60
  ), {
62
- style: ue,
63
- className: pe,
64
- component: me,
65
- border: b,
66
- borderCell: ut,
67
- columns: Dt = Hr,
68
- data: d = Rr,
61
+ style: ft,
62
+ className: dt,
63
+ component: ut,
64
+ border: h,
65
+ borderCell: fe,
66
+ columns: ve = Ro,
67
+ data: m = zo,
69
68
  scroll: i,
70
- noDataElement: ye,
71
- showHeader: ge,
72
- stripe: he,
73
- hover: be,
74
- pagination: N,
75
- onChange: y,
76
- pagePosition: w,
77
- childrenColumnName: I,
78
- indentSize: xe,
79
- rowSelection: D,
80
- tableLayoutFixed: Se,
81
- header: Bt,
69
+ noDataElement: pt,
70
+ showHeader: mt,
71
+ stripe: gt,
72
+ hover: yt,
73
+ pagination: P,
74
+ onChange: M,
75
+ pagePosition: x,
76
+ childrenColumnName: H,
77
+ indentSize: ht,
78
+ rowSelection: k,
79
+ tableLayoutFixed: bt,
80
+ header: De,
82
81
  // 潘启宝添加
83
- footer: Lt,
84
- virtualized: z,
85
- renderPagination: zt,
86
- summary: W,
87
- rowKey: q
88
- } = x, Rt = lt(
89
- () => Dr(d, I),
90
- [d, I]
91
- ), n = dt == null ? void 0 : dt("table"), pt = x.size || (["default", "middle", "small"].indexOf(Pt) > -1 ? Pt : "default"), R = $(null), p = $(null), mt = $(null), g = $(null), _ = $(null), yt = $(null), U = $(null), G = $(0), gt = $(!1), [Ht, f] = xr(x), { currentFilters: Ce, defaultSorters: we } = He(), [A, ht] = j(1), [Te, $e] = j(
92
- F.pageSize || F.defaultPageSize || 10
93
- ), [Et, kt] = j(Ce), [Fe, Ne] = j(0), [ve, Pe] = j([]), bt = Fr(f), [De, Ot] = $r(
94
- Ht,
82
+ footer: Be,
83
+ virtualized: v,
84
+ renderPagination: Le,
85
+ summary: de,
86
+ rowKey: Y
87
+ } = b, ze = ne(
88
+ () => vo(m, H),
89
+ [m, H]
90
+ ), n = it?.("table"), ue = b.size || (["default", "middle", "small"].indexOf(Ne) > -1 ? Ne : "default"), D = w(null), u = w(null), pe = w(null), g = w(null), E = w(null), me = w(null), K = w(null), j = w(0), ge = w(!1), [Re, f] = bo(b), { currentFilters: Ct, defaultSorters: xt } = zt(), [O, ye] = V(1), [St, wt] = V(
91
+ N.pageSize || N.defaultPageSize || 10
92
+ ), [He, ke] = V(Ct), [Pt, Tt] = V(0), [$t, Ft] = V([]), he = To(f), [Nt, Ee] = Po(
93
+ Re,
95
94
  f,
96
95
  n
97
96
  ), {
98
- currentSorter: V,
99
- activeSorters: u,
100
- getNextActiveSorters: Be,
101
- updateStateSorters: Le
102
- } = Tr(f, we), { ComponentTable: X, ComponentBodyWrapper: ze, ComponentHeaderWrapper: Re } = Sr(me), xt = lt(() => typeof q == "function" ? (t) => q(S(t)) : (t) => t[q], [q]);
103
- function He() {
104
- const t = {};
105
- let e = [];
106
- return f.forEach((r) => {
107
- const o = r.dataIndex || r.key;
108
- if (r.defaultFilters && (t[o] = r.defaultFilters), r.filteredValue && (t[o] = r.filteredValue), "defaultSortOrder" in r || "sortOrder" in r) {
109
- const s = ie(r.sorter), c = "sortOrder" in r ? r.sortOrder : r.defaultSortOrder, l = {
110
- field: o,
97
+ currentSorter: W,
98
+ activeSorters: d,
99
+ getNextActiveSorters: vt,
100
+ updateStateSorters: Dt
101
+ } = wo(f, xt), { ComponentTable: q, ComponentBodyWrapper: Bt, ComponentHeaderWrapper: Lt } = Co(ut), be = ne(() => typeof Y == "function" ? (e) => Y(C(e)) : (e) => e[Y], [Y]);
102
+ function zt() {
103
+ const e = {};
104
+ let t = [];
105
+ return f.forEach((o) => {
106
+ const r = o.dataIndex || o.key;
107
+ if (o.defaultFilters && (e[r] = o.defaultFilters), o.filteredValue && (e[r] = o.filteredValue), "defaultSortOrder" in o || "sortOrder" in o) {
108
+ const s = rt(o.sorter), c = "sortOrder" in o ? o.sortOrder : o.defaultSortOrder, l = {
109
+ field: r,
111
110
  direction: c,
112
- sorterFn: le(r.sorter),
111
+ sorterFn: nt(o.sorter),
113
112
  priority: s
114
113
  };
115
- c ? te(s) ? e.every(
116
- (h) => te(h.priority) || !h.direction
117
- ) && e.push(l) : e.every((h) => !h.direction) ? e.push(l) : e = [l] : e.push(l);
114
+ c ? Je(s) ? t.every(
115
+ (y) => Je(y.priority) || !y.direction
116
+ ) && t.push(l) : t.every((y) => !y.direction) ? t.push(l) : t = [l] : t.push(l);
118
117
  }
119
- }), { currentFilters: t, defaultSorters: e };
118
+ }), { currentFilters: e, defaultSorters: t };
120
119
  }
121
- const J = lt(() => {
122
- const t = f.filter(
123
- (r) => "filteredValue" in r
124
- ), e = {};
125
- return t.length && t.forEach((r, o) => {
126
- const s = r.key || r.dataIndex || o;
127
- s !== void 0 && (e[s] = r.filteredValue);
128
- }), e;
129
- }, [f]), B = lt(() => Object.keys(J).length ? J : Et, [Et, J]);
130
- function Ee(t, e) {
131
- const r = Mt(e);
132
- if (!r)
120
+ const U = ne(() => {
121
+ const e = f.filter(
122
+ (o) => "filteredValue" in o
123
+ ), t = {};
124
+ return e.length && e.forEach((o, r) => {
125
+ const s = o.key || o.dataIndex || r;
126
+ s !== void 0 && (t[s] = o.filteredValue);
127
+ }), t;
128
+ }, [f]), $ = ne(() => Object.keys(U).length ? U : He, [He, U]);
129
+ function Rt(e, t) {
130
+ const o = Ve(t);
131
+ if (!o)
133
132
  return;
134
- const o = {
135
- direction: t,
136
- field: e,
137
- sorterFn: le(r.sorter),
138
- priority: ie(r.sorter)
139
- }, s = Be(o);
140
- Le(o, s);
141
- const c = et(
142
- o,
133
+ const r = {
134
+ direction: e,
135
+ field: t,
136
+ sorterFn: nt(o.sorter),
137
+ priority: rt(o.sorter)
138
+ }, s = vt(r);
139
+ Dt(r, s);
140
+ const c = Q(
141
+ r,
143
142
  s,
144
- B
145
- ), l = M(c);
146
- y == null || y(E(c), o, B, {
147
- currentData: S(l),
148
- currentAllData: S(c),
143
+ $
144
+ ), l = I(c);
145
+ M?.(L(c), r, $, {
146
+ currentData: C(l),
147
+ currentAllData: C(c),
149
148
  action: "sort"
150
149
  });
151
150
  }
152
- function ke(t) {
153
- const e = function(o, s) {
151
+ function Ht(e) {
152
+ const t = function(r, s) {
154
153
  return (c, l) => {
155
- const h = o(c, l);
156
- return s === "descend" ? -h : h;
154
+ const y = r(c, l);
155
+ return s === "descend" ? -y : y;
157
156
  };
158
- }, r = [...t];
159
- return r.sort((o, s) => s.priority - o.priority), (o, s) => {
160
- for (let c = 0, l = r.length; c < l; c++) {
161
- const { sorterFn: h, direction: Nt } = r[c];
162
- if (typeof h != "function")
157
+ }, o = [...e];
158
+ return o.sort((r, s) => s.priority - r.priority), (r, s) => {
159
+ for (let c = 0, l = o.length; c < l; c++) {
160
+ const { sorterFn: y, direction: $e } = o[c];
161
+ if (typeof y != "function")
163
162
  continue;
164
- const it = e(h, Nt)(o, s);
165
- if (it !== 0)
166
- return it;
163
+ const re = t(y, $e)(r, s);
164
+ if (re !== 0)
165
+ return re;
167
166
  }
168
167
  return 0;
169
168
  };
170
169
  }
171
- function Oe(t, e) {
172
- const r = {
173
- ...B,
174
- [t.dataIndex]: e
175
- }, o = {
176
- ...r,
177
- ...J
170
+ function kt(e, t) {
171
+ const o = {
172
+ ...$,
173
+ [e.dataIndex]: t
174
+ }, r = {
175
+ ...o,
176
+ ...U
178
177
  };
179
- if (K(e) && e.length) {
180
- kt(o);
181
- const s = et(
182
- V,
183
- u,
184
- r
185
- ), c = M(s);
186
- y == null || y(
187
- E(s),
188
- u.length === 1 ? u[0] : u,
189
- r,
178
+ if (A(t) && t.length) {
179
+ ke(r);
180
+ const s = Q(
181
+ W,
182
+ d,
183
+ o
184
+ ), c = I(s);
185
+ M?.(
186
+ L(s),
187
+ d.length === 1 ? d[0] : d,
188
+ o,
190
189
  {
191
- currentData: S(c),
192
- currentAllData: S(s),
190
+ currentData: C(c),
191
+ currentAllData: C(s),
193
192
  action: "filter"
194
193
  }
195
194
  );
196
- } else K(e) && !e.length && It(t);
195
+ } else A(t) && !t.length && Oe(e);
197
196
  }
198
- function It({ dataIndex: t }) {
199
- const e = {
200
- ...B
197
+ function Oe({ dataIndex: e }) {
198
+ const t = {
199
+ ...$
201
200
  };
202
- delete e[t], kt(e);
203
- const r = et(
204
- V,
205
- u,
206
- e
207
- ), o = M(r);
208
- y == null || y(
209
- E(r),
210
- u.length === 1 ? u[0] : u,
211
- e,
201
+ delete t[e], ke(t);
202
+ const o = Q(
203
+ W,
204
+ d,
205
+ t
206
+ ), r = I(o);
207
+ M?.(
208
+ L(o),
209
+ d.length === 1 ? d[0] : d,
210
+ t,
212
211
  {
213
- currentData: S(o),
214
- currentAllData: S(r),
212
+ currentData: C(r),
213
+ currentAllData: C(o),
215
214
  action: "filter"
216
215
  }
217
216
  );
218
217
  }
219
- const Q = !!f.find((t) => t.fixed === "left"), Z = !!f.find((t) => t.fixed === "right"), tt = Q || Z;
220
- function et(t, e, r) {
221
- let o = (Rt || []).slice();
222
- Object.keys(r).forEach((c) => {
223
- if (r[c] && r[c].length) {
224
- const l = Mt(c);
225
- l && typeof l.onFilter == "function" && (o = o.filter((h) => r[c].reduce(
226
- (Nt, it) => Nt || l.onFilter(it, h),
218
+ const G = !!f.find((e) => e.fixed === "left"), X = !!f.find((e) => e.fixed === "right"), J = G || X;
219
+ function Q(e, t, o) {
220
+ let r = (ze || []).slice();
221
+ Object.keys(o).forEach((c) => {
222
+ if (o[c] && o[c].length) {
223
+ const l = Ve(c);
224
+ l && typeof l.onFilter == "function" && (r = r.filter((y) => o[c].reduce(
225
+ ($e, re) => $e || l.onFilter(re, y),
227
226
  !1
228
227
  )));
229
228
  }
230
229
  });
231
- const s = (c) => c.slice().sort(ke(e)).map((l) => K(l[I]) ? {
230
+ const s = (c) => c.slice().sort(Ht(t)).map((l) => A(l[H]) ? {
232
231
  ...l,
233
- [I]: s(l[I])
232
+ [H]: s(l[H])
234
233
  } : l);
235
- return t.direction && typeof t.sorterFn == "function" || e.length ? s(o) : o;
234
+ return e.direction && typeof e.sorterFn == "function" || t.length ? s(r) : r;
236
235
  }
237
- const H = et(
238
- V,
239
- u,
240
- B
236
+ const B = Q(
237
+ W,
238
+ d,
239
+ $
241
240
  );
242
- function E(t = H) {
243
- const e = F.pageSize || Te || 10, r = pt === "middle" ? "default" : pt;
244
- let o = "top";
245
- w === "tl" || w === "bl" ? o = "bottom" : o = "top";
246
- const s = K(t) ? t.length : 0, c = Math.ceil(s / e) < A ? 1 : A;
247
- c !== A && ht(c);
241
+ function L(e = B) {
242
+ const t = N.pageSize || St || 10, o = ue === "middle" ? "default" : ue;
243
+ let r = "top";
244
+ x === "tl" || x === "bl" ? r = "bottom" : r = "top";
245
+ const s = A(e) ? e.length : 0, c = Math.ceil(s / t) < O ? 1 : O;
246
+ c !== O && ye(c);
248
247
  let l = {
249
- size: r,
248
+ size: o,
250
249
  total: s,
251
- pageSize: e,
250
+ pageSize: t,
252
251
  current: c,
253
252
  selectProps: {
254
253
  triggerProps: {
255
- position: o
254
+ position: r
256
255
  }
257
256
  }
258
257
  };
259
- return typeof N == "object" && N.selectProps && (l.selectProps = {
258
+ return typeof P == "object" && P.selectProps && (l.selectProps = {
260
259
  ...l.selectProps,
261
- ...N.selectProps
262
- }), m(N) && (l = {
260
+ ...P.selectProps
261
+ }), p(P) && (l = {
263
262
  ...l,
264
- ...N
265
- }), m(F) && (l = {
263
+ ...P
264
+ }), p(N) && (l = {
266
265
  ...l,
267
- ...F
268
- }), l.onChange = qe, l;
266
+ ...N
267
+ }), l.onChange = Kt, l;
269
268
  }
270
- const rt = E(), k = M();
271
- function M(t = H, e = rt) {
272
- const { current: r = 0, pageSize: o = 10 } = e;
273
- return N === !1 || m(N) && d.length <= o ? t : t.slice((r - 1) * o, r * o);
269
+ const Z = L(), z = I();
270
+ function I(e = B, t = Z) {
271
+ const { current: o = 0, pageSize: r = 10 } = t;
272
+ return P === !1 || p(P) && m.length <= r ? e : e.slice((o - 1) * r, o * r);
274
273
  }
275
- const Wt = cr(_t, 100), T = !!(i && i.y), Y = W == null ? void 0 : W(S(H)), St = W && fr.isValidElement(Y) && Y.props.fixed, Ie = T && St;
276
- yr(() => {
277
- _t(), ct(window, "resize", Wt);
278
- const t = R.current, e = p.current, r = g.current;
279
- e && ct(e, "scroll", O);
280
- const o = t && t.parentNode;
281
- return t && o && ct(o, "scroll", O), r && ct(r, "scroll", O), () => {
282
- at(window, "resize", Wt), e && at(e, "scroll", O), o && at(o, "scroll", O), r && at(r, "scroll", O);
274
+ const We = io(Ie, 100), S = !!(i && i.y), _ = de?.(C(B)), Ce = de && co.isValidElement(_) && _.props.fixed, Et = S && Ce;
275
+ mo(() => {
276
+ Ie(), se(window, "resize", We);
277
+ const e = D.current, t = u.current, o = g.current;
278
+ t && se(t, "scroll", R);
279
+ const r = e && e.parentNode;
280
+ return e && r && se(r, "scroll", R), o && se(o, "scroll", R), () => {
281
+ ie(window, "resize", We), t && ie(t, "scroll", R), r && ie(r, "scroll", R), o && ie(o, "scroll", R);
283
282
  };
284
283
  }, [
285
- Q,
286
- Z,
287
- i == null ? void 0 : i.x,
288
- i == null ? void 0 : i.y,
284
+ G,
285
+ X,
286
+ i?.x,
287
+ i?.y,
289
288
  f.length,
290
- d
291
- ]), oe(() => {
292
- const { total: t, pageSize: e } = E(d);
293
- Math.ceil(t / e) < A && ht(1);
294
- }, [d == null ? void 0 : d.length]), oe(() => {
295
- ot();
296
- }, [d, Q, Z, L]), pr(ce, () => ({
297
- getRootDomElement: Ct,
298
- scrollIntoView: (t) => {
299
- yt.current && yt.current.scrollTo({ key: t });
289
+ m
290
+ ]), et(() => {
291
+ const { total: e, pageSize: t } = L(m);
292
+ Math.ceil(e / t) < O && ye(1);
293
+ }, [m?.length]), et(() => {
294
+ ee();
295
+ }, [m, G, X, F]), uo(st, () => ({
296
+ getRootDomElement: xe,
297
+ scrollIntoView: (e) => {
298
+ me.current && me.current.scrollTo({ key: e });
300
299
  },
301
- getRootDOMNode: Ct
300
+ getRootDOMNode: xe
302
301
  }));
303
- function Ct() {
304
- return _.current;
302
+ function xe() {
303
+ return E.current;
305
304
  }
306
- function _t() {
307
- var e, r;
308
- ot();
309
- const t = Ct();
310
- if (t && (tt || i && i.x)) {
311
- const o = t.querySelector(`.${n}-body`) || t.querySelector(`.${n}-content-inner`), s = (r = (e = o == null ? void 0 : o.getBoundingClientRect) == null ? void 0 : e.call(o)) == null ? void 0 : r.width;
312
- Ne(s);
305
+ function Ie() {
306
+ ee();
307
+ const e = xe();
308
+ if (e && (J || i && i.x)) {
309
+ const o = (e.querySelector(`.${n}-body`) || e.querySelector(`.${n}-content-inner`))?.getBoundingClientRect?.()?.width;
310
+ Tt(o);
313
311
  }
314
312
  }
315
- const We = mr(
316
- ar(() => {
317
- const t = _.current, e = T ? p.current : U.current && U.current.parentNode;
318
- if (e) {
319
- const r = L ? -e.scrollLeft : e.scrollLeft, o = r === 0, s = r + 1 >= e.children[0].getBoundingClientRect().width - e.getBoundingClientRect().width;
320
- o && s ? nt(
321
- t.classList,
313
+ const Ot = po(
314
+ lo(() => {
315
+ const e = E.current, t = S ? u.current : K.current && K.current.parentNode;
316
+ if (t) {
317
+ const o = F ? -t.scrollLeft : t.scrollLeft, r = o === 0, s = o + 1 >= t.children[0].getBoundingClientRect().width - t.getBoundingClientRect().width;
318
+ r && s ? te(
319
+ e.classList,
322
320
  `${n}-scroll-position-both`
323
- ) : o ? nt(
324
- t.classList,
325
- `${n}-scroll-position-${L ? "right" : "left"}`
326
- ) : s ? nt(
327
- t.classList,
328
- `${n}-scroll-position-${L ? "left" : "right"}`
329
- ) : nt(
330
- t.classList,
321
+ ) : r ? te(
322
+ e.classList,
323
+ `${n}-scroll-position-${F ? "right" : "left"}`
324
+ ) : s ? te(
325
+ e.classList,
326
+ `${n}-scroll-position-${F ? "left" : "right"}`
327
+ ) : te(
328
+ e.classList,
331
329
  `${n}-scroll-position-middle`
332
330
  );
333
331
  } else
334
- t && Vt(t.classList);
332
+ e && Ae(e.classList);
335
333
  }, 100),
336
- [_.current, p.current, T, L]
334
+ [E.current, u.current, S, F]
337
335
  );
338
- function ot() {
339
- if (tt || i && m(i) && i.x) {
340
- const t = _.current;
341
- t && (Q && At(
342
- t.classList,
336
+ function ee() {
337
+ if (J || i && p(i) && i.x) {
338
+ const e = E.current;
339
+ e && (G && _e(
340
+ e.classList,
343
341
  `${n}-has-fixed-col-left`
344
- ), Z && At(
345
- t.classList,
342
+ ), X && _e(
343
+ e.classList,
346
344
  `${n}-has-fixed-col-right`
347
- )), We();
345
+ )), Ot();
348
346
  }
349
347
  }
350
- function At(t, e) {
351
- t.contains(e) || t.add(e);
348
+ function _e(e, t) {
349
+ e.contains(t) || e.add(t);
352
350
  }
353
- function Vt(t) {
354
- t.remove(`${n}-scroll-position-both`), t.remove(`${n}-scroll-position-left`), t.remove(`${n}-scroll-position-right`), t.remove(`${n}-scroll-position-middle`);
351
+ function Ae(e) {
352
+ e.remove(`${n}-scroll-position-both`), e.remove(`${n}-scroll-position-left`), e.remove(`${n}-scroll-position-right`), e.remove(`${n}-scroll-position-middle`);
355
353
  }
356
- function nt(t, e) {
357
- t.contains(e) || (Vt(t), t.add(e));
354
+ function te(e, t) {
355
+ e.contains(t) || (Ae(e), e.add(t));
358
356
  }
359
357
  const {
360
- selectedRowKeys: wt,
361
- indeterminateKeys: _e,
362
- onCheckAll: Ae,
363
- onCheck: Ve,
364
- onCheckRadio: Me,
365
- setSelectedRowKeys: Ye,
366
- allSelectedRowKeys: Ke,
367
- flattenData: je
368
- } = wr(x, k, Rt, xt);
369
- function Mt(t) {
370
- return f.find((e, r) => typeof e.key < "u" ? typeof e.key == "number" && typeof t == "string" ? e.key.toString() === t : e.key === t : typeof e.dataIndex < "u" ? e.dataIndex === t : typeof t == "number" ? r === t : !1);
358
+ selectedRowKeys: Se,
359
+ indeterminateKeys: Wt,
360
+ onCheckAll: It,
361
+ onCheck: _t,
362
+ onCheckRadio: At,
363
+ setSelectedRowKeys: Vt,
364
+ allSelectedRowKeys: Mt,
365
+ flattenData: Yt
366
+ } = So(b, z, ze, be);
367
+ function Ve(e) {
368
+ return f.find((t, o) => typeof t.key < "u" ? typeof t.key == "number" && typeof e == "string" ? t.key.toString() === e : t.key === e : typeof t.dataIndex < "u" ? t.dataIndex === e : typeof e == "number" ? o === e : !1);
371
369
  }
372
- function qe(t, e) {
373
- var o, s;
374
- ht(t), $e(e), t !== A && Ue(), D && !D.checkCrossPage && wt.length && (Ye([]), (o = D.onChange) == null || o.call(D, [], []));
375
- const r = { ...E(), current: t, pageSize: e };
376
- y == null || y(
377
- r,
378
- u.length === 1 ? u[0] : u,
379
- B,
370
+ function Kt(e, t) {
371
+ ye(e), wt(t), e !== O && jt(), k && !k.checkCrossPage && Se.length && (Vt([]), k.onChange?.([], []));
372
+ const o = { ...L(), current: e, pageSize: t };
373
+ M?.(
374
+ o,
375
+ d.length === 1 ? d[0] : d,
376
+ $,
380
377
  {
381
- currentData: S(
382
- M(H, r)
378
+ currentData: C(
379
+ I(B, o)
383
380
  ),
384
- currentAllData: S(H),
381
+ currentAllData: C(B),
385
382
  action: "paginate"
386
383
  }
387
- ), (s = F.onChange) == null || s.call(F, t, e);
384
+ ), N.onChange?.(e, t);
388
385
  }
389
- function Ue() {
390
- if (!p.current)
386
+ function jt() {
387
+ if (!u.current)
391
388
  return;
392
- const e = p.current.scrollTop;
393
- new ir({
394
- from: { scrollTop: e },
389
+ const t = u.current.scrollTop;
390
+ new no({
391
+ from: { scrollTop: t },
395
392
  to: { scrollTop: 0 },
396
- easing: lr,
393
+ easing: so,
397
394
  duration: 300,
398
- onUpdate: (o) => {
399
- p.current && (p.current.scrollTop = o.scrollTop);
395
+ onUpdate: (r) => {
396
+ u.current && (u.current.scrollTop = r.scrollTop);
400
397
  }
401
398
  }).start();
402
399
  }
403
- function O(t) {
404
- const { target: e } = t, r = p.current, o = R.current && R.current.parentNode, s = g.current;
405
- e.scrollLeft !== G.current && (o && (o.scrollLeft = e.scrollLeft), r && (r.scrollLeft = e.scrollLeft), s && (s.scrollLeft = e.scrollLeft), ot()), G.current = t.target.scrollLeft;
400
+ function R(e) {
401
+ const { target: t } = e, o = u.current, r = D.current && D.current.parentNode, s = g.current;
402
+ t.scrollLeft !== j.current && (r && (r.scrollLeft = t.scrollLeft), o && (o.scrollLeft = t.scrollLeft), s && (s.scrollLeft = t.scrollLeft), ee()), j.current = e.target.scrollLeft;
406
403
  }
407
- function Ge(t) {
408
- const { target: e } = t, r = U.current;
409
- e.scrollLeft !== G.current && (r.scrollLeft = e.scrollLeft, ot()), G.current = t.target.scrollLeft;
404
+ function qt(e) {
405
+ const { target: t } = e, o = K.current;
406
+ t.scrollLeft !== j.current && (o.scrollLeft = t.scrollLeft, ee()), j.current = e.target.scrollLeft;
410
407
  }
411
- const [Yt, Xe] = Cr(
412
- x,
413
- je,
414
- xt
408
+ const [Me, Ut] = xo(
409
+ b,
410
+ Yt,
411
+ be
415
412
  );
416
- let Kt = {}, Tt = {};
417
- i && (i.x && (typeof i.x == "number" || typeof i.x == "string") && (Tt = {
413
+ let Ye = {}, we = {};
414
+ i && (i.x && (typeof i.x == "number" || typeof i.x == "string") && (we = {
418
415
  width: i.x
419
- }), i.y && (typeof i.y == "number" || typeof i.y == "string") && (Kt = {
416
+ }), i.y && (typeof i.y == "number" || typeof i.y == "string") && (Ye = {
420
417
  maxHeight: i.y
421
418
  }));
422
- function Je() {
423
- requestAnimationFrame((t) => {
424
- const e = R.current && R.current.parentNode, r = Br(e);
425
- r && r > 0 && (e.style.marginBottom = `-${r}px`, e.style.paddingBottom = "0px", g.current && (g.current.style.marginBottom = `-${r}px`, g.current.style.paddingBottom = "0px")), setTimeout(() => {
426
- const o = p.current;
427
- Lr(o) ? (gt.current = !0, e && (e.style.overflowY = "scroll", e.style.scrollSnapType = "y mandatory"), g.current && (g.current.style.overflowY = "scroll", g.current.style.overflowY = "y mandatory")) : e && gt.current && (gt.current = !1, e.style.overflowY = "auto", e.style.overflowY = "y mandatory", g.current && (g.current.style.overflowY = "auto", g.current.style.overflowY = "y mandatory"));
419
+ function Gt() {
420
+ requestAnimationFrame((e) => {
421
+ const t = D.current && D.current.parentNode, o = Do(t);
422
+ o && o > 0 && (t.style.marginBottom = `-${o}px`, t.style.paddingBottom = "0px", g.current && (g.current.style.marginBottom = `-${o}px`, g.current.style.paddingBottom = "0px")), setTimeout(() => {
423
+ const r = u.current;
424
+ Bo(r) ? (ge.current = !0, t && (t.style.overflowY = "scroll", t.style.scrollSnapType = "y mandatory"), g.current && (g.current.style.overflowY = "scroll", g.current.style.overflowY = "y mandatory")) : t && ge.current && (ge.current = !1, t.style.overflowY = "auto", t.style.overflowY = "y mandatory", g.current && (g.current.style.overflowY = "auto", g.current.style.overflowY = "y mandatory"));
428
425
  }, 0);
429
426
  });
430
427
  }
431
- const jt = /* @__PURE__ */ a(
432
- Pr,
428
+ const Ke = /* @__PURE__ */ a(
429
+ No,
433
430
  {
434
- ...x,
435
- activeSorters: u,
436
- currentSorter: V,
437
- selectedRowKeys: wt,
438
- currentFilters: B,
439
- onCheckAll: Ae,
440
- onSort: Ee,
441
- data: k,
442
- onHandleFilter: Oe,
443
- onHandleFilterReset: It,
431
+ ...b,
432
+ activeSorters: d,
433
+ currentSorter: W,
434
+ selectedRowKeys: Se,
435
+ currentFilters: $,
436
+ onCheckAll: It,
437
+ onSort: Rt,
438
+ data: z,
439
+ onHandleFilter: kt,
440
+ onHandleFilterReset: Oe,
444
441
  prefixCls: n,
445
- allSelectedRowKeys: Ke,
446
- groupColumns: Ht,
447
- stickyOffsets: bt,
448
- groupStickyClassNames: De
442
+ allSelectedRowKeys: Mt,
443
+ groupColumns: Re,
444
+ stickyOffsets: he,
445
+ groupStickyClassNames: Nt
449
446
  }
450
447
  );
451
- function Qe() {
452
- const t = m(i) && i.x === "max-content";
453
- return T || z ? /* @__PURE__ */ a(Re, { className: `${n}-header`, children: /* @__PURE__ */ v(
454
- X,
448
+ function Xt() {
449
+ const e = p(i) && i.x === "max-content";
450
+ return S || v ? /* @__PURE__ */ a(Lt, { className: `${n}-header`, children: /* @__PURE__ */ T(
451
+ q,
455
452
  {
456
- ref: R,
457
- style: t ? {} : Tt,
453
+ ref: D,
454
+ style: e ? {} : we,
458
455
  children: [
459
456
  /* @__PURE__ */ a(
460
- ft,
457
+ le,
461
458
  {
462
459
  columns: f,
463
460
  prefixCls: n,
464
461
  producer: !1,
465
- columnWidths: t && i.y ? ve : null
462
+ columnWidths: e && i.y ? $t : null
466
463
  }
467
464
  ),
468
- jt
465
+ Ke
469
466
  ]
470
467
  }
471
- ) }) : jt;
468
+ ) }) : Ke;
472
469
  }
473
- const qt = Y && /* @__PURE__ */ a(
474
- vr,
470
+ const je = _ && /* @__PURE__ */ a(
471
+ Fo,
475
472
  {
476
473
  prefixCls: n,
477
- summary: W,
478
- data: k,
474
+ summary: de,
475
+ data: z,
479
476
  columns: f,
480
- stickyOffsets: bt,
481
- stickyClassNames: Ot
477
+ stickyOffsets: he,
478
+ stickyClassNames: Ee
482
479
  }
483
- ), Ut = /* @__PURE__ */ a(
484
- Nr,
480
+ ), qe = /* @__PURE__ */ a(
481
+ $o,
485
482
  {
486
- ...x,
487
- saveRef: (t) => mt.current = t,
488
- selectedRowKeys: wt,
489
- indeterminateKeys: _e,
490
- expandedRowKeys: Yt,
491
- onCheck: Ve,
492
- onCheckRadio: Me,
493
- onClickExpandBtn: Xe,
483
+ ...b,
484
+ saveRef: (e) => pe.current = e,
485
+ selectedRowKeys: Se,
486
+ indeterminateKeys: Wt,
487
+ expandedRowKeys: Me,
488
+ onCheck: _t,
489
+ onCheckRadio: At,
490
+ onClickExpandBtn: Ut,
494
491
  columns: f,
495
- data: k,
492
+ data: z,
496
493
  prefixCls: n,
497
- hasFixedColumn: tt,
498
- tableViewWidth: Fe,
499
- indentSize: xe,
500
- noDataElement: ye || de("Table"),
501
- activeSorters: u,
502
- currentSorter: V,
503
- stickyOffsets: bt,
504
- stickyClassNames: Ot,
505
- getRowKey: xt,
506
- saveVirtualListRef: (t) => {
507
- z && (yt.current = t, p.current = t == null ? void 0 : t.dom);
494
+ hasFixedColumn: J,
495
+ tableViewWidth: Pt,
496
+ indentSize: ht,
497
+ noDataElement: pt || at("Table"),
498
+ activeSorters: d,
499
+ currentSorter: W,
500
+ stickyOffsets: he,
501
+ stickyClassNames: Ee,
502
+ getRowKey: be,
503
+ saveVirtualListRef: (e) => {
504
+ v && (me.current = e, u.current = e?.dom);
508
505
  },
509
- ___dangerouslySetInnerHTML___: x.___dangerouslySetInnerHTML___
506
+ ___dangerouslySetInnerHTML___: b.___dangerouslySetInnerHTML___
510
507
  }
511
- ), Gt = !z && !Ie ? /* @__PURE__ */ v(vt, { children: [
512
- Ut,
513
- qt
514
- ] }) : Ut;
515
- if (ee(() => {
516
- const t = p.current || mt.current, e = br([t], Je);
508
+ ), Ue = !v && !Et ? /* @__PURE__ */ T(Fe, { children: [
509
+ qe,
510
+ je
511
+ ] }) : qe;
512
+ if (Qe(() => {
513
+ const e = u.current || pe.current, t = ho([e], Gt);
517
514
  return () => {
518
- e();
515
+ t();
519
516
  };
520
- }, [p.current, mt.current]), ee(() => (console.table(d), () => {
521
- }), [d]), !Dt.length) return null;
522
- function Ze() {
523
- const t = m(i) && i.x === "max-content" && !!i.y && K(d) && d.length > 0;
524
- return T && !z ? /* @__PURE__ */ a(
525
- ze,
517
+ }, [u.current, pe.current]), Qe(() => (console.table(m), () => {
518
+ }), [m]), !ve.length) return null;
519
+ function Jt() {
520
+ const e = p(i) && i.x === "max-content" && !!i.y && A(m) && m.length > 0;
521
+ return S && !v ? /* @__PURE__ */ a(
522
+ Bt,
526
523
  {
527
- ref: p,
524
+ ref: u,
528
525
  className: `${n}-body`,
529
- style: Kt,
530
- children: /* @__PURE__ */ v(X, { style: Tt, children: [
526
+ style: Ye,
527
+ children: /* @__PURE__ */ T(q, { style: we, children: [
531
528
  /* @__PURE__ */ a(
532
- ft,
529
+ le,
533
530
  {
534
531
  columns: f,
535
532
  prefixCls: n,
536
- producer: t,
537
- onSetColumnWidths: Pe,
538
- expandedRowKeys: Yt,
539
- data: d
533
+ producer: e,
534
+ onSetColumnWidths: Ft,
535
+ expandedRowKeys: Me,
536
+ data: m
540
537
  }
541
538
  ),
542
- Gt
539
+ Ue
543
540
  ] })
544
541
  }
545
- ) : Gt;
542
+ ) : Ue;
546
543
  }
547
- function tr() {
548
- let t = {};
549
- i && m(i) && i.x && (t = {
544
+ function Qt() {
545
+ let e = {};
546
+ i && p(i) && i.x && (e = {
550
547
  width: i.x
551
548
  });
552
- const e = /* @__PURE__ */ a("div", { className: `${n}-tfoot`, ref: g, children: /* @__PURE__ */ v(X, { style: t, children: [
553
- /* @__PURE__ */ a(ft, { columns: f, prefixCls: n }),
554
- qt
555
- ] }) }), r = Y && T && St === "top", o = Y && T && St === "bottom", s = /* @__PURE__ */ v(vt, { children: [
556
- ge ? Qe() : null,
557
- r && e,
558
- Ze(),
559
- o && e
549
+ const t = /* @__PURE__ */ a("div", { className: `${n}-tfoot`, ref: g, children: /* @__PURE__ */ T(q, { style: e, children: [
550
+ /* @__PURE__ */ a(le, { columns: f, prefixCls: n }),
551
+ je
552
+ ] }) }), o = _ && S && Ce === "top", r = _ && S && Ce === "bottom", s = /* @__PURE__ */ T(Fe, { children: [
553
+ mt ? Xt() : null,
554
+ o && t,
555
+ Jt(),
556
+ r && t
560
557
  ] });
561
- return /* @__PURE__ */ v(vt, { children: [
562
- typeof Bt == "function" && /* @__PURE__ */ a("div", { className: `${n}-header-`, children: Bt(k) }),
558
+ return /* @__PURE__ */ T(Fe, { children: [
559
+ typeof De == "function" && /* @__PURE__ */ a("div", { className: `${n}-header-`, children: De(z) }),
563
560
  /* @__PURE__ */ a("div", { className: `${n}-container`, children: /* @__PURE__ */ a("div", { className: `${n}-content-scroll`, children: /* @__PURE__ */ a(
564
561
  "div",
565
562
  {
566
563
  className: `${n}-content-inner`,
567
- onScroll: T ? void 0 : Ge,
568
- children: T || z ? s : /* @__PURE__ */ v(X, { ref: U, style: t, children: [
569
- /* @__PURE__ */ a(ft, { prefixCls: n, columns: f }),
564
+ onScroll: S ? void 0 : qt,
565
+ children: S || v ? s : /* @__PURE__ */ T(q, { ref: K, style: e, children: [
566
+ /* @__PURE__ */ a(le, { prefixCls: n, columns: f }),
570
567
  s
571
568
  ] })
572
569
  }
573
570
  ) }) }),
574
- typeof Lt == "function" && /* @__PURE__ */ a("div", { className: `${n}-footer`, children: Lt(k) })
571
+ typeof Be == "function" && /* @__PURE__ */ a("div", { className: `${n}-footer`, children: Be(z) })
575
572
  ] });
576
573
  }
577
- const er = m(b) ? b.wrapper : b, $t = m(b) ? b.cell : ut, rr = m(b) ? b.cell || b.headerCell : ut, or = m(b) ? b.cell || b.bodyCell : ut, nr = se(
574
+ const Zt = p(h) ? h.wrapper : h, Pe = p(h) ? h.cell : fe, eo = p(h) ? h.cell || h.headerCell : fe, to = p(h) ? h.cell || h.bodyCell : fe, oo = ot(
578
575
  n,
579
- `${n}-size-${pt}`,
576
+ `${n}-size-${ue}`,
580
577
  {
581
- [`${n}-border`]: er,
582
- [`${n}-border-cell`]: $t,
583
- [`${n}-border-header-cell`]: !$t && rr,
584
- [`${n}-border-body-cell`]: !$t && or,
585
- [`${n}-stripe`]: he,
586
- [`${n}-hover`]: be,
587
- [`${n}-type-radio`]: D && D.type === "radio",
588
- [`${n}-layout-fixed`]: Se || i && (i.x || i.y) || Dt.find((t) => t.ellipsis),
589
- [`${n}-fixed-column`]: tt,
590
- [`${n}-virtualized`]: z,
591
- [`${n}-rtl`]: L
578
+ [`${n}-border`]: Zt,
579
+ [`${n}-border-cell`]: Pe,
580
+ [`${n}-border-header-cell`]: !Pe && eo,
581
+ [`${n}-border-body-cell`]: !Pe && to,
582
+ [`${n}-stripe`]: gt,
583
+ [`${n}-hover`]: yt,
584
+ [`${n}-type-radio`]: k && k.type === "radio",
585
+ [`${n}-layout-fixed`]: bt || i && (i.x || i.y) || ve.find((e) => e.ellipsis),
586
+ [`${n}-fixed-column`]: J,
587
+ [`${n}-virtualized`]: v,
588
+ [`${n}-rtl`]: F
592
589
  },
593
- pe
594
- ), Ft = w === "tl" || w === "tr" || w === "topCenter", sr = se(`${n}-pagination`, {
595
- [`${n}-pagination-left`]: w === "tl" || w === "bl",
596
- [`${n}-pagination-center`]: w === "topCenter" || w === "bottomCenter",
597
- [`${n}-pagination-top`]: Ft
590
+ dt
591
+ ), Te = x === "tl" || x === "tr" || x === "topCenter", ro = ot(`${n}-pagination`, {
592
+ [`${n}-pagination-left`]: x === "tl" || x === "bl",
593
+ [`${n}-pagination-center`]: x === "topCenter" || x === "bottomCenter",
594
+ [`${n}-pagination-top`]: Te
598
595
  });
599
- let st = x.loading;
600
- typeof st == "boolean" && (st = { loading: st });
601
- const Xt = typeof zt == "function" ? zt(/* @__PURE__ */ a(ne, { ...rt })) : /* @__PURE__ */ a("div", { className: sr, children: /* @__PURE__ */ a(ne, { ...rt }) }), Jt = N !== !1 && (H.length !== 0 || rt.total > 0);
596
+ let oe = b.loading;
597
+ typeof oe == "boolean" && (oe = { loading: oe });
598
+ const Ge = typeof Le == "function" ? Le(/* @__PURE__ */ a(tt, { ...Z })) : /* @__PURE__ */ a("div", { className: ro, children: /* @__PURE__ */ a(tt, { ...Z }) }), Xe = P !== !1 && (B.length !== 0 || Z.total > 0);
602
599
  return /* @__PURE__ */ a(
603
600
  "div",
604
601
  {
605
- ref: _,
606
- style: ue,
607
- className: nr,
608
- ...hr(x),
609
- children: /* @__PURE__ */ v(
610
- gr,
602
+ ref: E,
603
+ style: ft,
604
+ className: oo,
605
+ ...yo(b),
606
+ children: /* @__PURE__ */ T(
607
+ go,
611
608
  {
612
609
  className: `${n}-spin`,
613
- element: ae,
614
- ...st,
610
+ element: lt,
611
+ ...oe,
615
612
  children: [
616
- Jt && Ft && Xt,
617
- tr(),
618
- Jt && !Ft && Xt
613
+ Xe && Te && Ge,
614
+ Qt(),
615
+ Xe && !Te && Ge
619
616
  ]
620
617
  }
621
618
  )
622
619
  }
623
620
  );
624
621
  }
625
- const Or = dr(kr);
626
- Or.displayName = "Table";
622
+ const Eo = ao(ko);
623
+ Eo.displayName = "Table";
627
624
  export {
628
- Or as default
625
+ Eo as default
629
626
  };