@unicom-cloud/ui 0.8.70 → 0.8.71

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 (257) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +2 -2
  3. package/AutoComplete.js +1 -1
  4. package/BackTop.js +2 -2
  5. package/Badge.js +2 -2
  6. package/Breadcrumb.js +2 -2
  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 +2 -2
  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 +1 -1
  31. package/Mentions.js +1 -1
  32. package/Menu.js +1 -1
  33. package/Message.js +2 -2
  34. package/Modal.js +1 -1
  35. package/Notice.js +2 -2
  36. package/Notification.js +2 -2
  37. package/OverflowEllipsis.js +1 -1
  38. package/PageHeader.js +1 -1
  39. package/Popconfirm.js +1 -1
  40. package/Popover.js +1 -1
  41. package/Progress.js +1 -1
  42. package/Radio.js +1 -1
  43. package/Rate.js +1 -1
  44. package/ResizeBox.js +1 -1
  45. package/Result.js +1 -1
  46. package/Skeleton.js +1 -1
  47. package/Slider.js +1 -1
  48. package/Space.js +1 -1
  49. package/SpeechSynthesis.js +3 -3
  50. package/Spin.js +1 -1
  51. package/Statistic.js +1 -1
  52. package/Steps.js +1 -1
  53. package/Switch.js +2 -2
  54. package/Table.js +1 -1
  55. package/Tabs.js +1 -1
  56. package/Tag.js +1 -1
  57. package/Tooltip.js +1 -1
  58. package/Transfer.js +1 -1
  59. package/Tree.js +1 -1
  60. package/Trigger.js +3 -3
  61. package/affix/index.js +1 -1
  62. package/alert/index.js +2 -2
  63. package/anchor/Anchor.js +1 -1
  64. package/anchor/Link.js +1 -1
  65. package/auto-complete/index.js +1 -1
  66. package/avatar/Avatar.js +1 -1
  67. package/avatar/Group.js +1 -1
  68. package/back-top/index.js +2 -2
  69. package/badge/Count.js +1 -1
  70. package/badge/index.js +2 -2
  71. package/breadcrumb/index.js +2 -2
  72. package/button/Group.js +1 -1
  73. package/button/index.js +1 -1
  74. package/calendar/index.js +2 -2
  75. package/card/Grid.js +1 -1
  76. package/card/Meta.js +1 -1
  77. package/card/index.js +1 -1
  78. package/carousel/Arrow.js +1 -1
  79. package/carousel/Indicator.js +1 -1
  80. package/carousel/index.js +1 -1
  81. package/cascader/Cascader.js +2 -2
  82. package/cascader/index.js +1 -1
  83. package/cascader/util.js +1 -1
  84. package/checkbox/Checkbox.js +2 -2
  85. package/checkbox/Group.js +2 -2
  86. package/checkbox/index.js +1 -1
  87. package/chunk/{Cm9BS47C.js → 8V534cS3.js} +3 -3
  88. package/chunk/{CCv-5KFt.js → BHL-PzAD.js} +149 -152
  89. package/chunk/{B80D01PB.js → BlElSWJg.js} +2 -2
  90. package/chunk/{Bh8AO6R8.js → BzPNDYAX.js} +1 -1
  91. package/chunk/{tIRvN_q7.js → C5X9bDyX.js} +3 -3
  92. package/chunk/C6AJxF7d.js +1820 -0
  93. package/chunk/CQTxhsUk.js +170 -0
  94. package/chunk/{DFf75sXd.js → CUs1AOCZ.js} +2 -2
  95. package/chunk/{CASwN1hB.js → CZWGeRVA.js} +188 -183
  96. package/chunk/{C48SmsN-.js → ClaNycDy.js} +27 -18
  97. package/chunk/{-C2QiGwq.js → D2DSUGNT.js} +1 -1
  98. package/chunk/{DonYzv30.js → DV7ywe_q.js} +1 -1
  99. package/chunk/{YUHbzjGj.js → Dm1NCTkX.js} +3 -3
  100. package/chunk/{CSk3yQDO.js → EHx6bIK_.js} +3 -3
  101. package/chunk/{iOWILwNv.js → I1dqAgn_.js} +3 -3
  102. package/chunk/{DzVH9IBy.js → fFjj2KuF.js} +1 -1
  103. package/chunk/{bgmEVbGy.js → pEI3aB9Z.js} +2 -2
  104. package/collapse/Collapse.js +2 -2
  105. package/collapse/Item.js +3 -3
  106. package/collapse/index.js +1 -1
  107. package/color-picker/ControlBar.js +1 -1
  108. package/color-picker/InputAlpha.js +1 -1
  109. package/color-picker/InputHex.js +1 -1
  110. package/color-picker/InputRgb.js +1 -1
  111. package/color-picker/Palette.js +1 -1
  112. package/color-picker/Panel.js +2 -2
  113. package/color-picker/index.js +1 -1
  114. package/comment/index.js +1 -1
  115. package/config-provider/ConfigProvider.js +1 -1
  116. package/config-provider/context.js +1 -1
  117. package/config-provider/index.js +2 -2
  118. package/copy/index.js +1 -1
  119. package/date-picker/Picker.js +1 -1
  120. package/date-picker/PickerRange.js +2 -2
  121. package/date-picker/index.js +1 -1
  122. package/descriptions/index.js +1 -1
  123. package/divider/index.js +1 -1
  124. package/draggable/index.js +1 -1
  125. package/drawer/Drawer.js +3 -3
  126. package/dropdown/Button.js +1 -1
  127. package/dropdown/index.js +2 -2
  128. package/empty/index.js +1 -1
  129. package/form/Form.js +1 -1
  130. package/form/FormItem.js +2 -2
  131. package/form/util.js +11 -11
  132. package/grid/Col.js +1 -1
  133. package/grid/Row.js +1 -1
  134. package/grid/grid-item.js +1 -1
  135. package/grid/grid.js +1 -1
  136. package/hooks/index.js +1 -1
  137. package/hooks/useOverrideRef.js +1 -1
  138. package/icon/index.js +1 -1
  139. package/icon-hover/index.js +1 -1
  140. package/image/Image.js +2 -2
  141. package/image/ImagePreview.js +4 -4
  142. package/image/ImagePreviewArrow.js +1 -1
  143. package/image/ImagePreviewGroup.js +1 -1
  144. package/image/index.js +1 -1
  145. package/index.js +16 -16
  146. package/input/Group.js +1 -1
  147. package/input/Input.js +1 -1
  148. package/input/InputElement.js +1 -1
  149. package/input/Password.js +1 -1
  150. package/input/Search.js +1 -1
  151. package/input/Textarea.js +1 -1
  152. package/input-number/index.js +1 -1
  153. package/input-tag/InputTag.js +2 -2
  154. package/layout/Content.js +1 -1
  155. package/layout/Footer.js +1 -1
  156. package/layout/Header.js +1 -1
  157. package/layout/Sider.js +1 -1
  158. package/layout/index.js +1 -1
  159. package/link/index.js +1 -1
  160. package/list/Item.js +1 -1
  161. package/list/Meta.js +1 -1
  162. package/list/index.js +1 -1
  163. package/locale/en-US.js +1 -1
  164. package/locale/tr-TR.js +1 -1
  165. package/mentions/index.js +1 -1
  166. package/menu/Menu.js +2 -2
  167. package/menu/OverflowWrap.js +1 -1
  168. package/menu/index.js +2 -2
  169. package/message/index.js +2 -2
  170. package/message/useMessage.js +1 -1
  171. package/modal/Confirm.js +2 -2
  172. package/modal/Modal.js +4 -4
  173. package/modal/index.js +1 -1
  174. package/notice/index.js +2 -2
  175. package/notification/index.js +2 -2
  176. package/notification/useNotification.js +1 -1
  177. package/overflow-ellipsis/OverflowItem.js +1 -1
  178. package/overflow-ellipsis/index.js +1 -1
  179. package/package.json +1 -1
  180. package/page-header/index.js +1 -1
  181. package/pagination/PageItem.js +1 -1
  182. package/pagination/PageJumper.js +1 -1
  183. package/pagination/PageOption.js +1 -1
  184. package/pagination/Pagination.js +1 -1
  185. package/picker/Input.js +1 -1
  186. package/picker/InputRange.js +1 -1
  187. package/popconfirm/index.js +1 -1
  188. package/popover/index.js +1 -1
  189. package/progress/index.js +1 -1
  190. package/radio/Group.js +2 -2
  191. package/radio/Radio.js +2 -2
  192. package/radio/index.js +2 -2
  193. package/rate/index.js +1 -1
  194. package/resize-box/ResizeTrigger.js +1 -1
  195. package/resize-box/Split.js +1 -1
  196. package/resize-box/SplitGroup.js +1 -1
  197. package/resize-box/index.js +1 -1
  198. package/result/index.js +1 -1
  199. package/select/Option.js +1 -1
  200. package/select/Select.js +2 -2
  201. package/select-view/Core.js +1 -1
  202. package/skeleton/index.js +1 -1
  203. package/slider/Button.js +1 -1
  204. package/slider/index.js +1 -1
  205. package/space/index.js +1 -1
  206. package/speech-synthesis/index.js +39 -39
  207. package/spin/DotLoading.js +1 -1
  208. package/spin/index.js +1 -1
  209. package/statistic/Countdown.js +1 -1
  210. package/statistic/index.js +1 -1
  211. package/steps/index.js +1 -1
  212. package/switch/index.js +2 -2
  213. package/table/Table.js +2 -2
  214. package/table/index.js +3 -3
  215. package/tabs/Tab.js +2 -2
  216. package/tabs/TabContent.js +2 -2
  217. package/tabs/TabPane.js +1 -1
  218. package/tabs/index.js +2 -2
  219. package/tag/index.js +1 -1
  220. package/time-picker/Picker.js +1 -1
  221. package/time-picker/TimePicker.js +1 -1
  222. package/timeline/Item.js +1 -1
  223. package/timeline/Timeline.js +1 -1
  224. package/tooltip/index.js +1 -1
  225. package/transfer/Item.js +2 -2
  226. package/transfer/List.js +2 -2
  227. package/transfer/index.js +1 -1
  228. package/tree/Animation.js +3 -3
  229. package/tree/Node.js +3 -3
  230. package/tree/NodeList.js +1 -1
  231. package/tree/Tree.js +2 -2
  232. package/tree/index.js +1 -1
  233. package/tree-select/Select.js +1 -1
  234. package/trigger/index.js +3 -3
  235. package/types/locale/en-US.d.ts +12 -12
  236. package/types/locale/tr-TR.d.ts +12 -12
  237. package/types/table/interface.d.ts +3 -1
  238. package/types/utils/react19Adapter.d.ts +1 -0
  239. package/typography/Base.js +1 -1
  240. package/typography/Ellipsis.js +11 -11
  241. package/typography/Paragraph.js +1 -1
  242. package/typography/Typography.js +1 -1
  243. package/typography/index.js +11 -11
  244. package/upload/TriggerNode.js +1 -1
  245. package/upload/Upload.js +2 -2
  246. package/upload/Uploader.js +2 -2
  247. package/utils/CSSTransition.js +1 -1
  248. package/utils/contextHolder.js +1 -1
  249. package/utils/index.js +4 -4
  250. package/utils/react19Adapter.js +3 -0
  251. package/utils/reactDOM.js +1 -1
  252. package/verification-code/VerificationCode.js +1 -1
  253. package/version/index.js +1 -1
  254. package/virtual-list/VirtualList.js +1 -1
  255. package/watermark/Watermark.js +1 -1
  256. package/chunk/DC-pxreh.js +0 -1817
  257. package/chunk/DcYqcuGl.js +0 -166
@@ -0,0 +1,1820 @@
1
+ import { jsx as c, jsxs as ce, Fragment as ht } from "react/jsx-runtime";
2
+ import { I as Fn, f as In } from "./uKZyjtff.js";
3
+ import Pn from "lodash/debounce";
4
+ import Ce from "lodash/isArray";
5
+ import Ve from "lodash/isNumber";
6
+ import te from "lodash/isPlainObject";
7
+ import Kn from "lodash/throttle";
8
+ import Ue, { useMemo as ae, useCallback as Xe, useState as me, useRef as he, useContext as Qe, useEffect as yt, forwardRef as It, createElement as Je, createContext as On, useImperativeHandle as Dn } from "react";
9
+ import { a as Ze } from "./CZWGeRVA.js";
10
+ import { u as _n } from "./B2yFlXke.js";
11
+ import { u as Xt } from "./BFTV6myl.js";
12
+ import { u as vt } from "./a3hR6zLw.js";
13
+ import Gt from "../pagination/Pagination.js";
14
+ import Bn from "../spin/index.js";
15
+ import { m as ee } from "./JPPo5nY_.js";
16
+ import { on as ft, off as pt } from "../utils/dom.js";
17
+ import { p as Ln, a as Hn } from "./ClqoGc3r.js";
18
+ import { r as An } from "./CIRG541s.js";
19
+ import ut from "../table/ColGroup.js";
20
+ import { defaultComponent as Jt, INTERNAL_EXPAND_KEY as xt, INTERNAL_SELECTION_KEY as gt } from "../table/constant.js";
21
+ import Mn from "lodash/merge";
22
+ import { getOriginData as Z, isChildrenNotEmpty as Tt, getSelectedKeysByData as Wn, getSelectedKeys as zn, getSorterPriority as Et, getSorterFn as Ft, px2Number as kt, deepCloneData as Vn, getScrollBarHeight as Un, getScrollBarWidth as jn } from "../table/util.js";
23
+ import Yn from "../virtual-list/VirtualList.js";
24
+ import qn from "@unicom-cloud/icons/IconUiMinus";
25
+ import Xn from "@unicom-cloud/icons/IconUiPlus";
26
+ import Ge from "lodash/isString";
27
+ import { C as Pt } from "./BzPNDYAX.js";
28
+ import { R as on } from "./CQTxhsUk.js";
29
+ import Qt from "lodash/get";
30
+ import mt from "lodash/isFunction";
31
+ import { u as Gn } from "./CQ_WOOmf.js";
32
+ import rn from "../tooltip/index.js";
33
+ import { m as Jn } from "./B5RFT17G.js";
34
+ import Qn from "@unicom-cloud/icons/IconUiCaretDown";
35
+ import Zn from "@unicom-cloud/icons/IconUiCaretUp";
36
+ import eo from "@unicom-cloud/icons/IconUiFilter";
37
+ import Zt from "../button/index.js";
38
+ import { u as to } from "./CdaT1b_F.js";
39
+ import no from "../space/index.js";
40
+ import oo from "../trigger/index.js";
41
+ function _e(s) {
42
+ const f = ae(
43
+ () => te(s) ? Mn({}, Jt, s) : Jt,
44
+ [s]
45
+ );
46
+ return {
47
+ getHeaderComponentOperations: f.header.operations,
48
+ getBodyComponentOperations: f.body.operations,
49
+ ComponentTable: f.table,
50
+ ComponentHeaderWrapper: f.header.wrapper,
51
+ ComponentThead: f.header.thead,
52
+ ComponentHeaderRow: f.header.row,
53
+ ComponentTh: f.header.th,
54
+ ComponentHeaderCell: f.header.cell,
55
+ ComponentBodyWrapper: f.body.wrapper,
56
+ ComponentTbody: f.body.tbody,
57
+ ComponentBodyRow: f.body.row,
58
+ ComponentTd: f.body.td,
59
+ ComponentBodyCell: f.body.cell
60
+ };
61
+ }
62
+ function en(s, f) {
63
+ const u = [];
64
+ function w(e) {
65
+ e && e.length > 0 && e.forEach((T) => {
66
+ T[f] ? w(T[f]) : u.push({ ...T, key: T.dataIndex || T.key });
67
+ });
68
+ }
69
+ return w(s), u;
70
+ }
71
+ function sn(s, f) {
72
+ let u = 0;
73
+ return s && s.length > 0 && s.forEach((w) => {
74
+ const e = sn(w[f], f) + 1;
75
+ u = Math.max(e, u);
76
+ }), u;
77
+ }
78
+ function ro(s) {
79
+ const {
80
+ component: f,
81
+ rowSelection: u,
82
+ expandedRowRender: w,
83
+ expandProps: e = {},
84
+ columns: T = [],
85
+ childrenColumnName: i
86
+ } = s, m = ae(() => T || [], [T]), d = ae(
87
+ () => en(m, i),
88
+ [m, i]
89
+ ), S = u && u.type === "checkbox" || u && !("type" in u), R = u && u.type === "radio", { width: p } = e, C = !!w, g = S || R, { getHeaderComponentOperations: k, getBodyComponentOperations: K } = _e(f), $ = ae(
90
+ () => k({
91
+ selectionNode: g ? "holder_node" : "",
92
+ expandNode: C ? "holder_node" : ""
93
+ }),
94
+ [
95
+ g,
96
+ C,
97
+ k
98
+ ]
99
+ ), y = ae(
100
+ () => K({
101
+ selectionNode: g ? "holder_node" : "",
102
+ expandNode: C ? "holder_node" : ""
103
+ }),
104
+ [
105
+ g,
106
+ C,
107
+ K
108
+ ]
109
+ ), a = u && u.fixed, D = u && u.columnWidth, L = Xe(
110
+ (H, I, v) => {
111
+ const B = {}, P = [];
112
+ H.forEach((r, F) => {
113
+ const N = { ...r };
114
+ (!("key" in r) || typeof r.key > "u") && (N.key = N.dataIndex || F), F === 0 ? (N.$$isFirstColumn = !0, N.fixed === "left" && (B.fixed = N.fixed)) : N.$$isFirstColumn = !1, P.push(N);
115
+ });
116
+ const A = C && {
117
+ key: xt,
118
+ title: xt,
119
+ width: p,
120
+ $$isOperation: !0
121
+ }, j = g && {
122
+ key: gt,
123
+ title: gt,
124
+ width: D,
125
+ $$isOperation: !0
126
+ };
127
+ return a && (B.fixed = "left"), (typeof v != "number" || v === 0) && [...I].reverse().forEach((r, F) => {
128
+ if (r.node) {
129
+ const N = $.filter((_) => _.node).length - F - 1;
130
+ r.name === "expandNode" ? P.unshift({
131
+ ...A,
132
+ ...B,
133
+ $$columnIndex: N
134
+ }) : r.name === "selectionNode" ? P.unshift({
135
+ ...j,
136
+ ...B,
137
+ $$columnIndex: N
138
+ }) : P.unshift({
139
+ ...r,
140
+ ...B,
141
+ title: r.name,
142
+ key: r.name,
143
+ $$isOperation: !0,
144
+ width: r.width || 40,
145
+ $$columnIndex: N
146
+ });
147
+ }
148
+ }), P;
149
+ },
150
+ [
151
+ p,
152
+ C,
153
+ g,
154
+ D,
155
+ a,
156
+ $
157
+ ]
158
+ ), E = ae(
159
+ () => L(d, y),
160
+ [d, L, y]
161
+ ), J = ae(
162
+ () => sn(m, i),
163
+ [m, i]
164
+ );
165
+ return [ae(() => {
166
+ const H = Array.isArray($) ? $.filter((P) => P.node).length : 0;
167
+ if (J === 1) {
168
+ const P = m.map((A, j) => ({
169
+ ...A,
170
+ $$columnIndex: j + H
171
+ }));
172
+ return [L(P, $, 0)];
173
+ }
174
+ let I = H;
175
+ const v = [], B = (P, A = 0) => {
176
+ v[A] = v[A] || [], P.forEach((j) => {
177
+ const r = { ...j };
178
+ r[i] ? (r.colSpan = en(
179
+ j[i],
180
+ i
181
+ ).length, r.$$columnIndex = [I], v[A].push(r), B(r[i], A + 1), r.$$columnIndex.push(I - 1)) : (r.rowSpan = J - A, r.$$columnIndex = I++, v[A].push(r));
182
+ }), v[A] = L(
183
+ v[A],
184
+ $,
185
+ A
186
+ );
187
+ };
188
+ return B(m), v;
189
+ }, [
190
+ m,
191
+ i,
192
+ J,
193
+ L,
194
+ $
195
+ ]), E];
196
+ }
197
+ function so(s, f, u) {
198
+ const {
199
+ defaultExpandedRowKeys: w,
200
+ defaultExpandAllRows: e,
201
+ expandedRowRender: T,
202
+ onExpand: i,
203
+ onExpandedRowsChange: m,
204
+ childrenColumnName: d = "children",
205
+ expandProps: S
206
+ } = s, [R, p] = me(
207
+ g()
208
+ ), C = s.expandedRowKeys || R;
209
+ function g() {
210
+ let $ = [];
211
+ return s.expandedRowKeys ? $ = s.expandedRowKeys : w ? $ = w : e && ($ = f.map((y, a) => {
212
+ const D = Z(y);
213
+ return S && "rowExpandable" in S && typeof S.rowExpandable == "function" ? S.rowExpandable(D) && u(y) : typeof T == "function" ? T(D, a) && u(y) : Tt(y, d) && u(y);
214
+ }).filter((y) => y)), $;
215
+ }
216
+ function k($) {
217
+ const y = C.indexOf($) === -1, a = y ? C.concat($) : C.filter((L) => $ !== L), D = f.filter((L) => a.indexOf(u(L)) !== -1).map((L) => u(L));
218
+ p(D), K($, y), m == null || m(D);
219
+ }
220
+ function K($, y) {
221
+ i == null || i(
222
+ Z(f.find((a) => u(a) === $)),
223
+ y
224
+ );
225
+ }
226
+ return [C, k];
227
+ }
228
+ function tn(s) {
229
+ return [...new Set(s)];
230
+ }
231
+ function io(s, f, u, w) {
232
+ const { rowSelection: e, childrenColumnName: T } = s, i = e == null ? void 0 : e.selectedRowKeys, m = e == null ? void 0 : e.onSelectAll, d = e == null ? void 0 : e.onSelect, S = e == null ? void 0 : e.onChange, R = e == null ? void 0 : e.pureKeys, p = typeof (e == null ? void 0 : e.checkStrictly) == "boolean" ? !e.checkStrictly : !1, C = e == null ? void 0 : e.preserveSelectedRowKeys;
233
+ function g() {
234
+ const r = [], F = [], N = (h) => {
235
+ Ce(h) && h.length && h.forEach((M) => {
236
+ const n = w(M);
237
+ (e && typeof e.checkboxProps == "function" ? e.checkboxProps(Z(M)) : {}).disabled || r.push(n), Tt(M, s.childrenColumnName) && N(M[s.childrenColumnName]);
238
+ });
239
+ };
240
+ N(f);
241
+ const _ = (h, M) => {
242
+ Ce(h) && h.length && h.forEach((n) => {
243
+ if (M && p && (n.__INTERNAL_PARENT = M), F.push(n), Tt(n, s.childrenColumnName)) {
244
+ const q = { ...n };
245
+ _(n[s.childrenColumnName], q);
246
+ }
247
+ });
248
+ };
249
+ return _(u, void 0), {
250
+ allSelectedRowKeys: r,
251
+ flattenData: F
252
+ };
253
+ }
254
+ const { allSelectedRowKeys: k, flattenData: K } = g(), [$, y] = me([]), [a, D] = me([]), L = Wn(
255
+ K,
256
+ tn(i || $),
257
+ w,
258
+ T,
259
+ p
260
+ ), E = p && !i ? $ : L.selectedRowKeys, J = p && !i ? a : L.indeterminateKeys, [Y, H] = me(
261
+ R ? [] : I(E)
262
+ );
263
+ function I(r, F) {
264
+ const N = F ? Y.concat(K) : K, _ = new Map(N.map((h) => [w(h), h]));
265
+ return r.map((h) => _.get(h)).filter((h) => h);
266
+ }
267
+ const v = new Set(K.map((r) => w(r)));
268
+ function B(r) {
269
+ return C ? r : r.filter((F) => v.has(F));
270
+ }
271
+ function P(r) {
272
+ let F = [], N = [];
273
+ if (r)
274
+ F = B(
275
+ tn(E.concat(k))
276
+ );
277
+ else {
278
+ const h = new Set(k);
279
+ F = B(
280
+ E.filter((M) => !h.has(M))
281
+ );
282
+ }
283
+ R || (N = I(F, !0));
284
+ const _ = Z(N);
285
+ y(F), H(N), D([]), S == null || S(F, _), m == null || m(r, _);
286
+ }
287
+ function A(r, F) {
288
+ const { selectedRowKeys: N, indeterminateKeys: _ } = zn(
289
+ F,
290
+ r,
291
+ E,
292
+ a,
293
+ w,
294
+ T,
295
+ p
296
+ ), h = B(N), M = I(h, !0), n = Z(M);
297
+ y(h), H(M), D(_), d == null || d(r, Z(F), n), S == null || S(h, n);
298
+ }
299
+ function j(r, F) {
300
+ const N = [K.find((h) => w(h) === r)], _ = Z(N);
301
+ y([r]), d == null || d(!0, Z(F), _), S == null || S([r], _);
302
+ }
303
+ return {
304
+ selectedRowKeys: E,
305
+ indeterminateKeys: J,
306
+ onCheckAll: P,
307
+ onCheck: A,
308
+ onCheckRadio: j,
309
+ setSelectedRowKeys: y,
310
+ allSelectedRowKeys: k,
311
+ flattenData: K
312
+ };
313
+ }
314
+ function lo(s, f) {
315
+ const [u, w] = me(f), [e, T] = me({}), i = he(s), m = Xe(
316
+ (R) => {
317
+ const { field: p, direction: C } = R;
318
+ return u.find((g) => g.field === p) ? C ? u.map(
319
+ (g) => g.field === p ? R : g
320
+ ) : u.filter((g) => g.field !== p) : C ? !Ve(R.priority) || u.find((g) => !Ve(g.priority)) ? [R] : [...u, R] : [...u];
321
+ },
322
+ [u]
323
+ ), d = Xe((R) => {
324
+ const p = R.filter((g) => "sortOrder" in g);
325
+ let C = [];
326
+ return p.forEach((g) => {
327
+ const k = Et(g.sorter), K = g.sortOrder, $ = {
328
+ field: g.dataIndex || g.key,
329
+ direction: K,
330
+ sorterFn: Ft(g.sorter),
331
+ priority: k
332
+ };
333
+ K ? Ve(k) ? C.every((y) => Ve(y.priority) || !y.direction) && C.push($) : C.every((y) => !y.direction) ? C.push($) : C = [$] : C.push($);
334
+ }), C;
335
+ }, []), S = Xe(
336
+ (R, p) => {
337
+ d(s).length || (w(p), T(R));
338
+ },
339
+ [s, d, w, T]
340
+ );
341
+ return vt(() => {
342
+ const R = i.current, p = d(R), C = d(s), g = p.map(
343
+ (K) => K.field
344
+ ), k = C.filter((K) => p.find(
345
+ ({ field: y, direction: a }) => K.field === y && K.direction !== a
346
+ ) ? !0 : !g.includes(K.field));
347
+ k && k.length && (w(C), T({})), i.current = s;
348
+ }, [
349
+ s,
350
+ d,
351
+ m,
352
+ T,
353
+ w
354
+ ]), {
355
+ currentSorter: e,
356
+ activeSorters: u,
357
+ getNextActiveSorters: m,
358
+ updateStateSorters: S
359
+ };
360
+ }
361
+ function ao(s, f, u) {
362
+ const w = f.map((m) => m.fixed);
363
+ function e(m, d) {
364
+ return ee({
365
+ [`${u}-col-fixed-left`]: m.fixed === "left",
366
+ [`${u}-col-fixed-right`]: m.fixed === "right",
367
+ [`${u}-col-fixed-left-last`]: m.fixed === "left" && (te(f[d + 1]) ? f[d + 1].fixed !== "left" : !0),
368
+ [`${u}-col-fixed-right-first`]: m.fixed === "right" && (te(f[d - 1]) ? f[d - 1].fixed !== "right" : !0)
369
+ });
370
+ }
371
+ const T = ae(() => f.map(
372
+ (m, d) => e(m, d)
373
+ ), [w.join("-")]);
374
+ return [ae(
375
+ () => s.map((m) => m.map((d, S) => {
376
+ let R = S;
377
+ const p = d.$$columnIndex;
378
+ return Array.isArray(p) && p.length === 2 ? R = d.fixed === "right" ? p[0] : p[1] : typeof p == "number" && (R = p), e(d, R);
379
+ })),
380
+ [
381
+ s.map((m) => `|${m.map((d) => d.fixed || "undefined").join("-")}|`).join("_")
382
+ ]
383
+ ), T];
384
+ }
385
+ function co(s) {
386
+ const f = s.map((e) => kt(e.width)), u = s.map((e) => e.fixed);
387
+ return ae(() => s.map((e) => {
388
+ let T = 0;
389
+ return e.fixed === "left" && s.some((i) => {
390
+ if (i.fixed === "left") {
391
+ if (i.key === e.key)
392
+ return !0;
393
+ let m = kt(i.width);
394
+ const d = i.$$isOperation ? m || 40 : m;
395
+ return T += d, !1;
396
+ }
397
+ return !1;
398
+ }), e.fixed === "right" && [...s].reverse().some((i) => {
399
+ if (i.fixed === "right") {
400
+ if (i.key === e.key)
401
+ return !0;
402
+ let m = kt(i.width);
403
+ const d = i.$$isOperation ? m || 40 : m;
404
+ return T += d, !1;
405
+ }
406
+ return !1;
407
+ }), T;
408
+ }), [f.join("-"), u.join("-")]);
409
+ }
410
+ function fo(s) {
411
+ return s && !Ue.isValidElement(s) && te(s);
412
+ }
413
+ function po(s) {
414
+ var se;
415
+ const f = Gn(), {
416
+ component: u,
417
+ InnerComponentTd: w,
418
+ column: e,
419
+ columnIndex: T,
420
+ prefixCls: i,
421
+ stickyClassName: m,
422
+ stickyOffset: d,
423
+ currentSorter: S,
424
+ virtualized: R,
425
+ record: p,
426
+ trIndex: C,
427
+ level: g,
428
+ placeholder: k = "-",
429
+ indentSize: K,
430
+ renderExpandIcon: $,
431
+ rowKey: y,
432
+ recordHaveChildren: a,
433
+ haveTreeData: D
434
+ } = s, { rtl: L } = Qe(Ze), { ComponentBodyCell: E } = _e(u), J = he(null), Y = he(null), H = he(null), I = he(null), v = (e == null ? void 0 : e.showTooltip) !== !1 && (e == null ? void 0 : e.ellipsis), B = ee(
435
+ `${i}-td`,
436
+ m,
437
+ {
438
+ [`${i}-col-sorted`]: S && S.direction && S.field === (e == null ? void 0 : e.dataIndex)
439
+ },
440
+ e == null ? void 0 : e.className,
441
+ e == null ? void 0 : e.bodyClassName
442
+ );
443
+ let P = {}, A, j, r = {};
444
+ (e == null ? void 0 : e.fixed) === "left" && (r[L ? "right" : "left"] = d), (e == null ? void 0 : e.fixed) === "right" && (r[L ? "left" : "right"] = d), te(e == null ? void 0 : e.cellStyle) && (r = {
445
+ ...r,
446
+ ...e == null ? void 0 : e.cellStyle
447
+ }), te(e == null ? void 0 : e.bodyCellStyle) && (r = {
448
+ ...r,
449
+ ...e == null ? void 0 : e.bodyCellStyle
450
+ }), mt(e == null ? void 0 : e.bodyCellStyle) && (r = {
451
+ ...r,
452
+ ...((se = e == null ? void 0 : e.bodyCellStyle) == null ? void 0 : se.call(e, p, C)) ?? {}
453
+ }), e != null && e.align && (r.textAlign = e == null ? void 0 : e.align), R && e.width && (r.width = e.width, r.minWidth = e.width, r.maxWidth = e.width);
454
+ const { onHandleSave: F, ...N } = e != null && e.onCell ? (e == null ? void 0 : e.onCell(
455
+ p,
456
+ C,
457
+ e,
458
+ { rowKey: y }
459
+ )) ?? {} : { onHandleSave: () => {
460
+ } }, _ = e == null ? void 0 : e.render;
461
+ let h = ae(() => _ == null ? void 0 : _(
462
+ Qt(p, e == null ? void 0 : e.dataIndex),
463
+ Z(p),
464
+ C,
465
+ e,
466
+ // 潘启宝添加
467
+ { rowKey: y }
468
+ ), [p, e, C]);
469
+ if (mt(_) || (h = Qt(p, (e == null ? void 0 : e.dataIndex) ?? "")), fo(h) && (P = h == null ? void 0 : h.props, A = P == null ? void 0 : P.rowSpan, j = P == null ? void 0 : P.colSpan, h = h == null ? void 0 : h.children), A === 0 || j === 0)
470
+ return null;
471
+ Ge(h) && (h = h.trim()), !h && h !== 0 && (h = (e == null ? void 0 : e.placeholder) ?? k ?? "-");
472
+ const M = e != null && e.ellipsis && Ge(h) ? {
473
+ // title: cellChildren // 暂时不需要title属性了,因为单独加了tooltip组件,潘启宝2023年4月1日于广东省惠州市
474
+ } : {}, n = D && (e == null ? void 0 : e.$$isFirstColumn), q = n && a;
475
+ let Q = n && g > 0 ? K * g : 0;
476
+ n && !a && (Q += 20);
477
+ function U(ie) {
478
+ f();
479
+ }
480
+ const de = `${T}-${C}-${Q}-${q}`, ne = /* @__PURE__ */ c(
481
+ "div",
482
+ {
483
+ ref: J,
484
+ className: ee(`${i}-cell`, {
485
+ [`${i}-cell-text-ellipsis`]: e == null ? void 0 : e.ellipsis
486
+ }),
487
+ ...M,
488
+ onMouseEnter: v ? U : void 0,
489
+ children: /* @__PURE__ */ ce(
490
+ E,
491
+ {
492
+ ref: Y,
493
+ className: `${i}-cell-wrap-value`,
494
+ ...Ge(E) ? {} : {
495
+ rowData: Z(p),
496
+ column: e,
497
+ onHandleSave: F,
498
+ ...N
499
+ },
500
+ children: [
501
+ !!Q && /* @__PURE__ */ c(
502
+ "span",
503
+ {
504
+ ref: H,
505
+ className: `${i}-cell-indent`,
506
+ style: { paddingLeft: Q }
507
+ }
508
+ ),
509
+ !!q && /* @__PURE__ */ c(
510
+ "span",
511
+ {
512
+ ref: I,
513
+ className: `${i}-cell-expand-icon`,
514
+ children: $(p, y)
515
+ }
516
+ ),
517
+ s.___dangerouslySetInnerHTML___ ? /* @__PURE__ */ c(
518
+ "span",
519
+ {
520
+ dangerouslySetInnerHTML: {
521
+ __html: h
522
+ }
523
+ }
524
+ ) : h
525
+ ]
526
+ },
527
+ de
528
+ )
529
+ },
530
+ de
531
+ );
532
+ let oe = /* @__PURE__ */ c(
533
+ w,
534
+ {
535
+ className: B,
536
+ style: r,
537
+ ...Ln(N, [
538
+ "onClick",
539
+ "onDoubleClick",
540
+ "onContextMenu",
541
+ "onMouseOver",
542
+ "onMouseEnter",
543
+ "onMouseLeave",
544
+ "onMouseMove",
545
+ "onMouseDown",
546
+ "onMouseUp"
547
+ ]),
548
+ ...P,
549
+ children: ne
550
+ },
551
+ (e == null ? void 0 : e.key) || (e == null ? void 0 : e.dataIndex) || T
552
+ );
553
+ if (v) {
554
+ let ie = 0, fe = 0, pe = 0, ue = 0;
555
+ if (J.current instanceof Element && (ie = J.current.getBoundingClientRect().width), Y.current instanceof Element && (fe = Y.current.getBoundingClientRect().width), H.current instanceof Element && (pe = H.current.getBoundingClientRect().width), I.current instanceof Element && (ue = I.current.getBoundingClientRect().width), ie < fe + pe + ue) {
556
+ const X = mt(e == null ? void 0 : e.tooltipContentRender) ? e.tooltipContentRender(p, C, e) : Jn(oe);
557
+ oe = /* @__PURE__ */ c(
558
+ rn,
559
+ {
560
+ className: ee(`${i}-cell-tooltip`, e.tooltipClassName),
561
+ style: e.tooltipStyle,
562
+ content: X,
563
+ children: oe
564
+ }
565
+ );
566
+ }
567
+ }
568
+ return yt(() => (f(), () => {
569
+ }), [J.current, Y.current]), oe;
570
+ }
571
+ const uo = Ue.memo(po);
572
+ function ho(s, f) {
573
+ const {
574
+ expandedRowRender: u,
575
+ onClickExpandBtn: w,
576
+ columns: e,
577
+ component: T,
578
+ onCheck: i,
579
+ onCheckRadio: m,
580
+ prefixCls: d,
581
+ selectedRowKeys: S,
582
+ indeterminateKeys: R,
583
+ rowClassName: p,
584
+ onRow: C,
585
+ rowSelection: g,
586
+ indentSize: k = 16,
587
+ activeSorters: K,
588
+ virtualized: $,
589
+ stickyOffsets: y,
590
+ stickyClassNames: a,
591
+ getRowKey: D,
592
+ placeholder: L,
593
+ expandProps: E = { strictTreeData: !0 },
594
+ data: J,
595
+ expandedRowKeys: Y,
596
+ childrenColumnName: H,
597
+ record: I,
598
+ index: v,
599
+ type: B,
600
+ shouldRowExpand: P,
601
+ level: A
602
+ } = s, { rtl: j } = Qe(Ze), r = Z(I), { ...F } = (C == null ? void 0 : C(r, v)) || {}, N = D(I), _ = B === "radio" ? S.slice(0, 1) : S, h = N || v, M = _.indexOf(N) > -1, n = Y.indexOf(N) > -1, q = R.indexOf(N) > -1, Q = ee(
603
+ `${d}-tr`,
604
+ {
605
+ [`${d}-row-checked`]: M,
606
+ [`${d}-row-expanded`]: n
607
+ },
608
+ p == null ? void 0 : p(r, v)
609
+ ), U = g && typeof g.checkboxProps == "function" ? g.checkboxProps(r) : {}, de = ee(`${d}-td`, `${d}-operation`), ne = (b) => ee(de, `${d}-${b}`, {
610
+ [`${d}-selection-col`]: $ && B === "checkbox" || B === "radio",
611
+ [`${d}-expand-icon-col`]: $ && u
612
+ });
613
+ function oe(b) {
614
+ return E.strictTreeData ? Ce(b[H]) && b[H].length : b[H] !== void 0;
615
+ }
616
+ function se() {
617
+ return J.find((b) => oe(b));
618
+ }
619
+ const ie = P(I, v), fe = oe(I), pe = se() && !u, ue = pe && fe, we = E.expandRowByClick && (ie || ue) ? {
620
+ onClick: (b) => {
621
+ var z;
622
+ w(N), (z = F == null ? void 0 : F.onClick) == null || z.call(F, b);
623
+ }
624
+ } : {}, { ComponentBodyRow: be, ComponentTd: re, getBodyComponentOperations: $e } = _e(T), ye = $ ? "div" : be, Se = $ ? "div" : re, Ie = {
625
+ className: Q,
626
+ key: h,
627
+ ...F,
628
+ ...we
629
+ }, Te = Ge(be) ? Ie : { ...Ie, record: I, index: v };
630
+ function Pe(b, z) {
631
+ const { icon: Oe } = E, De = !!~Y.indexOf(z), Re = {
632
+ onClick: (Le) => {
633
+ Le.stopPropagation(), w(z);
634
+ }
635
+ };
636
+ return typeof Oe == "function" ? Oe({ expanded: De, record: b, ...Re }) : /* @__PURE__ */ c("button", { ...Re, type: "button", children: De ? /* @__PURE__ */ c(qn, {}) : /* @__PURE__ */ c(Xn, {}) });
637
+ }
638
+ const Be = u && /* @__PURE__ */ c(Se, { className: ne("expand-icon-cell"), children: ie && Pe(I, N) }), Ee = g && g.renderCell;
639
+ let Ke;
640
+ const Fe = /* @__PURE__ */ c(
641
+ Pt,
642
+ {
643
+ value: N,
644
+ onChange: (b) => i(b, I),
645
+ checked: M,
646
+ indeterminate: q,
647
+ ...U
648
+ }
649
+ ), W = /* @__PURE__ */ c(
650
+ on,
651
+ {
652
+ onChange: () => m(N, I),
653
+ value: N,
654
+ checked: M,
655
+ ...U
656
+ }
657
+ );
658
+ B === "checkbox" && (Ke = /* @__PURE__ */ c(Se, { className: ne("checkbox"), children: Ee ? Ee(Fe, M, r) : Fe })), B === "radio" && (Ke = /* @__PURE__ */ c(Se, { className: ne("radio"), children: Ee ? Ee(W, M, r) : W }));
659
+ const le = $e({
660
+ selectionNode: Ke,
661
+ expandNode: Be
662
+ });
663
+ return /* @__PURE__ */ Je(ye, { ...Te, key: Te.key, ref: f }, e.map((b, z) => {
664
+ var Le, et, He, tt;
665
+ const Oe = `${b.key}-${b.dataIndex}-${b.title}-${z}`, De = y[z], Re = a[z];
666
+ if (b.$$isOperation) {
667
+ let xe = b.node, Ne = !0;
668
+ b.title === gt && (xe = (Le = le.find((je) => je.name === "selectionNode")) == null ? void 0 : Le.node, Ne = !1), b.title === xt && (xe = (et = le.find((je) => je.name === "expandNode")) == null ? void 0 : et.node, Ne = !1);
669
+ const ke = typeof xe == "function" ? xe(I) : xe;
670
+ return Ue.cloneElement(ke, {
671
+ key: Oe || z,
672
+ ...ke.props,
673
+ className: ee(
674
+ Ne ? de : "",
675
+ (He = ke == null ? void 0 : ke.props) == null ? void 0 : He.className,
676
+ Re
677
+ ),
678
+ style: {
679
+ ...(tt = ke == null ? void 0 : ke.props) == null ? void 0 : tt.style,
680
+ ...b.fixed === "left" ? {
681
+ [j ? "right" : "left"]: De
682
+ } : {},
683
+ width: b.width,
684
+ minWidth: b.width
685
+ }
686
+ });
687
+ }
688
+ return /* @__PURE__ */ c(
689
+ uo,
690
+ {
691
+ prefixCls: d,
692
+ virtualized: $,
693
+ component: T,
694
+ currentSorter: K.find(
695
+ (xe) => xe.field === (b.dataIndex || b.key)
696
+ ),
697
+ placeholder: L,
698
+ indentSize: k,
699
+ stickyClassName: Re,
700
+ stickyOffset: De,
701
+ InnerComponentTd: Se,
702
+ column: b,
703
+ columnIndex: z,
704
+ record: I,
705
+ trIndex: v,
706
+ level: A,
707
+ haveTreeData: pe,
708
+ recordHaveChildren: fe,
709
+ rowKey: N,
710
+ renderExpandIcon: Pe,
711
+ ___dangerouslySetInnerHTML___: s.___dangerouslySetInnerHTML___
712
+ },
713
+ Oe
714
+ );
715
+ }));
716
+ }
717
+ const nn = It(ho), mo = It(function({
718
+ record: f,
719
+ index: u,
720
+ virtualized: w,
721
+ tbodyProps: e
722
+ }, T) {
723
+ const {
724
+ prefixCls: i,
725
+ columns: m,
726
+ indentSize: d = 16,
727
+ childrenColumnName: S = "children",
728
+ expandProps: R = {},
729
+ rowSelection: p,
730
+ hasFixedColumn: C,
731
+ tableViewWidth: g,
732
+ getRowKey: k,
733
+ expandedRowKeys: K,
734
+ expandedRowRender: $
735
+ } = e;
736
+ let y;
737
+ p && "type" in p ? y = p.type : p && !("type" in p) && (y = "checkbox");
738
+ const a = $ && ((v, B) => $(Z(v), B)), D = (v) => Ce(v[S]) && v[S].length, L = (v, B) => "rowExpandable" in R && typeof R.rowExpandable == "function" ? R.rowExpandable(v) : (a == null ? void 0 : a(v, B)) !== null, E = (v, B) => {
739
+ const P = [], A = {
740
+ ...e,
741
+ type: y,
742
+ shouldRowExpand: L
743
+ };
744
+ P.push(
745
+ /* @__PURE__ */ c(
746
+ nn,
747
+ {
748
+ ref: T,
749
+ ...A,
750
+ record: v,
751
+ level: 0,
752
+ index: B
753
+ },
754
+ k(v)
755
+ )
756
+ );
757
+ const j = (r, F, N = 0) => {
758
+ Ce(r) && r.length && r.forEach((_, h) => {
759
+ K.indexOf(F) !== -1 && (P.push(
760
+ /* @__PURE__ */ Je(
761
+ nn,
762
+ {
763
+ ...A,
764
+ key: k(_),
765
+ record: _,
766
+ level: N + 1,
767
+ index: h
768
+ }
769
+ )
770
+ ), D(_) && j(_[S], k(_), N + 1));
771
+ });
772
+ };
773
+ return a || j(v[S], k(v)), P;
774
+ }, J = k(f), Y = L(f, u) && K.indexOf(J) !== -1, H = w ? "div" : "tr", I = w ? "div" : "td";
775
+ return /* @__PURE__ */ ce(Ue.Fragment, { children: [
776
+ E(f, u),
777
+ Y && /* @__PURE__ */ c(
778
+ H,
779
+ {
780
+ className: ee(`${i}-tr`, `${i}-expand-content`),
781
+ children: /* @__PURE__ */ c(
782
+ I,
783
+ {
784
+ className: ee(`${i}-td`),
785
+ style: { paddingLeft: d },
786
+ colSpan: m.length,
787
+ children: C ? /* @__PURE__ */ c(
788
+ "div",
789
+ {
790
+ className: `${i}-expand-fixed-row`,
791
+ style: { width: g },
792
+ children: a == null ? void 0 : a(f, u)
793
+ }
794
+ ) : a == null ? void 0 : a(f, u)
795
+ }
796
+ )
797
+ },
798
+ `${J}-expanded`
799
+ )
800
+ ] }, J);
801
+ });
802
+ function yo(s) {
803
+ const {
804
+ data: f,
805
+ columns: u,
806
+ prefixCls: w,
807
+ component: e,
808
+ noDataElement: T,
809
+ scroll: i,
810
+ tableViewWidth: m,
811
+ virtualized: d,
812
+ virtualListProps: S,
813
+ getRowKey: R,
814
+ saveVirtualListRef: p
815
+ } = s, C = (D) => {
816
+ var L;
817
+ (L = s.saveRef) == null || L.call(s, D);
818
+ }, { ComponentTbody: g } = _e(e);
819
+ let k = {}, K = {};
820
+ i && (i.x && (typeof i.x == "number" || typeof i.x == "string") && (k = {
821
+ width: i.x
822
+ }), i.y && (typeof i.y == "number" || typeof i.y == "string") && (K = {
823
+ maxHeight: i.y
824
+ }));
825
+ const $ = {
826
+ className: `${w}-no-data`
827
+ };
828
+ m && ($.className = `${w}-no-data ${w}-expand-fixed-row`, $.style = { width: m });
829
+ const y = /* @__PURE__ */ c("tr", { className: ee(`${w}-tr`, `${w}-empty-row`), children: /* @__PURE__ */ c("td", { className: `${w}-td`, colSpan: u.length, children: /* @__PURE__ */ c("div", { ...$, children: T }) }) }), a = (D, L) => {
830
+ const E = R(D) || L;
831
+ return /* @__PURE__ */ c(
832
+ mo,
833
+ {
834
+ record: D,
835
+ index: L,
836
+ virtualized: d,
837
+ tbodyProps: s
838
+ },
839
+ E
840
+ );
841
+ };
842
+ return d ? f.length > 0 ? /* @__PURE__ */ c(
843
+ Yn,
844
+ {
845
+ data: f,
846
+ height: K.maxHeight,
847
+ isStaticItemHeight: !1,
848
+ outerStyle: { ...k, minWidth: "100%", overflow: "visible" },
849
+ innerStyle: { right: "auto", minWidth: "100%" },
850
+ className: `${w}-body`,
851
+ ref: (D) => {
852
+ p(D), C(D == null ? void 0 : D.dom);
853
+ },
854
+ itemKey: R,
855
+ ...S,
856
+ children: a
857
+ }
858
+ ) : /* @__PURE__ */ c("div", { className: `${w}-body`, ref: C, children: /* @__PURE__ */ c("table", { children: /* @__PURE__ */ c("tbody", { children: y }) }) }) : /* @__PURE__ */ c(g, { ref: C, children: f.length > 0 ? f.map(a) : y });
859
+ }
860
+ const xo = On({});
861
+ function go(s) {
862
+ const { summary: f, data: u, prefixCls: w, columns: e, stickyOffsets: T, stickyClassNames: i } = s;
863
+ return /* @__PURE__ */ c("tfoot", { className: `${w}-tfoot`, children: /* @__PURE__ */ c(
864
+ xo.Provider,
865
+ {
866
+ value: { columns: e, stickyOffsets: T, stickyClassNames: i, prefixCls: w },
867
+ children: f(Z(u))
868
+ }
869
+ ) });
870
+ }
871
+ function Co(s, f) {
872
+ return s === "ascend" ? f.Table.sortAscend : s === "descend" ? f.Table.sortDescend : f.Table.cancelSort;
873
+ }
874
+ const wo = { bottom: 0 };
875
+ function $o(s) {
876
+ const {
877
+ onSort: f,
878
+ onFilter: u,
879
+ onHandleFilter: w,
880
+ onHandleFilterReset: e,
881
+ currentFilters: T = {},
882
+ currentSorter: i,
883
+ _key: m,
884
+ dataIndex: d,
885
+ title: S,
886
+ sorter: R,
887
+ sortDirections: p = ["ascend", "descend"],
888
+ filters: C = [],
889
+ columnFixedStyle: g,
890
+ className: k,
891
+ headerClassName: K,
892
+ cellStyle: $,
893
+ headerCellStyle: y,
894
+ rowSpan: a,
895
+ colSpan: D,
896
+ headerCellProps: L,
897
+ prefixCls: E,
898
+ align: J = "left",
899
+ component: Y,
900
+ filterIcon: H,
901
+ filterDropdown: I,
902
+ filterMultiple: v = !0,
903
+ ellipsis: B,
904
+ filterDropdownProps: P,
905
+ onFilterDropdownVisibleChange: A,
906
+ column: j,
907
+ showSorterTooltip: r,
908
+ index: F
909
+ } = s, { locale: N, rtl: _ } = Qe(Ze), h = m || d || F, [M, n, q] = to([], {
910
+ value: T[h] || []
911
+ }), [Q, U] = me(!1), [de, ne] = me(!1), oe = R && Ce(p) && p.length, se = oe ? ie() : void 0;
912
+ yt(() => {
913
+ n(T[h] || []);
914
+ }, [T, h]), yt(() => {
915
+ M && M !== q && n(M);
916
+ }, [Q]);
917
+ function ie() {
918
+ const W = i && i.direction;
919
+ if (!W || i && i.field !== h)
920
+ return p[0];
921
+ const le = p.indexOf(W);
922
+ if (le < p.length)
923
+ return p[le + 1];
924
+ }
925
+ function fe() {
926
+ M && (w == null || w(
927
+ { onFilter: u, filters: C, dataIndex: h },
928
+ q
929
+ ), ue(!1));
930
+ }
931
+ function pe() {
932
+ e({ dataIndex: h }), ue(!1);
933
+ }
934
+ function ue(W) {
935
+ U(W), A == null || A(W);
936
+ }
937
+ function X(W, le) {
938
+ let b = [...q];
939
+ if (v)
940
+ le ? b = b.concat(W) : b.splice(
941
+ b.findIndex((z) => z === W),
942
+ 1
943
+ );
944
+ else if (b.length > 0)
945
+ if (b[0] !== W)
946
+ b = [W];
947
+ else
948
+ return;
949
+ else
950
+ b = [W];
951
+ n(b);
952
+ }
953
+ function we(W) {
954
+ n(W || q), U(!1), w == null || w(
955
+ { filters: C, onFilter: u, dataIndex: h },
956
+ W || q
957
+ );
958
+ }
959
+ function be() {
960
+ return typeof I == "function" ? I({
961
+ filterKeys: q,
962
+ setFilterKeys: (W, le) => {
963
+ n(W), le == null || le();
964
+ },
965
+ confirm: we
966
+ }) : /* @__PURE__ */ ce("div", { className: `${E}-filters-popup`, children: [
967
+ /* @__PURE__ */ c("div", { className: `${E}-filters-list`, children: C.map((W) => {
968
+ const le = q.findIndex((b) => b === W.value) !== -1;
969
+ return /* @__PURE__ */ c("div", { className: `${E}-filters-item`, children: v ? /* @__PURE__ */ c(
970
+ Pt,
971
+ {
972
+ checked: le,
973
+ onChange: (b) => X(W.value, b),
974
+ children: W.text
975
+ }
976
+ ) : /* @__PURE__ */ c(
977
+ on,
978
+ {
979
+ checked: le,
980
+ onChange: (b) => X(W.value, b),
981
+ children: W.text
982
+ }
983
+ ) }, W.value);
984
+ }) }),
985
+ /* @__PURE__ */ ce(no, { className: `${E}-filters-btn`, children: [
986
+ /* @__PURE__ */ c(Zt, { onClick: pe, size: "mini", children: N.Table.resetText }),
987
+ /* @__PURE__ */ c(Zt, { onClick: fe, type: "primary", size: "mini", children: N.Table.okText })
988
+ ] })
989
+ ] });
990
+ }
991
+ const re = (W) => ee(`${E}-sorter-icon`, {
992
+ [`${E}-sorter-icon-active`]: i && i.direction === W && i.field === h
993
+ }), $e = ee(`${E}-filters`, {
994
+ [`${E}-filters-open`]: Q,
995
+ [`${E}-filters-active`]: M && M.length
996
+ });
997
+ let ye = {
998
+ ...g
999
+ };
1000
+ te($) && (ye = {
1001
+ ...ye,
1002
+ ...$
1003
+ }), te(y) && (ye = {
1004
+ ...ye,
1005
+ ...y
1006
+ }), mt(y) && (ye = {
1007
+ ...ye,
1008
+ ...y()
1009
+ }), J && J !== "left" && (ye.textAlign = J);
1010
+ const Se = {
1011
+ style: ye,
1012
+ key: m || h
1013
+ };
1014
+ D && D > 1 && (Se.colSpan = D), a && a > 1 && (Se.rowSpan = a);
1015
+ const { ComponentTh: Ie, ComponentHeaderCell: Te } = _e(Y), Pe = Ce(C) && C.length > 0 || typeof I == "function", Be = B && typeof S == "string" ? { title: S } : {}, Ee = P && P.triggerProps, Ke = /* @__PURE__ */ ce(ht, { children: [
1016
+ oe ? /* @__PURE__ */ c(
1017
+ rn,
1018
+ {
1019
+ content: Co(se, N),
1020
+ disabled: !r,
1021
+ ...te(r) ? r : {},
1022
+ children: /* @__PURE__ */ ce(
1023
+ "div",
1024
+ {
1025
+ className: `${E}-cell-with-sorter`,
1026
+ onMouseEnter: () => {
1027
+ ne(!0);
1028
+ },
1029
+ onMouseLeave: () => {
1030
+ ne(!1);
1031
+ },
1032
+ onClick: () => f(se, h),
1033
+ children: [
1034
+ /* @__PURE__ */ c("span", { className: `${E}-th-item-title`, ...Be, children: S }),
1035
+ oe && /* @__PURE__ */ ce(
1036
+ "div",
1037
+ {
1038
+ className: ee(`${E}-sorter`, {
1039
+ [`${E}-sorter-direction-one`]: p.length === 1
1040
+ }),
1041
+ children: [
1042
+ p.indexOf("ascend") !== -1 && /* @__PURE__ */ c("div", { className: re("ascend"), children: /* @__PURE__ */ c(Zn, {}) }),
1043
+ p.indexOf("descend") !== -1 && /* @__PURE__ */ c("div", { className: re("descend"), children: /* @__PURE__ */ c(Qn, {}) })
1044
+ ]
1045
+ }
1046
+ )
1047
+ ]
1048
+ }
1049
+ )
1050
+ }
1051
+ ) : /* @__PURE__ */ c("span", { className: `${E}-th-item-title`, ...Be, children: S }),
1052
+ Pe && /* @__PURE__ */ c(
1053
+ oo,
1054
+ {
1055
+ popup: be,
1056
+ trigger: "click",
1057
+ classNames: "slideDynamicOrigin",
1058
+ position: _ ? "bl" : "br",
1059
+ popupAlign: wo,
1060
+ popupVisible: Q,
1061
+ onVisibleChange: ue,
1062
+ ...Ee,
1063
+ children: /* @__PURE__ */ c("div", { className: $e, children: H || /* @__PURE__ */ c(eo, {}) })
1064
+ }
1065
+ )
1066
+ ] }), Fe = ee(`${E}-th-item`, {
1067
+ [`${E}-cell-text-ellipsis`]: B,
1068
+ [`${E}-cell-mouseenter`]: de,
1069
+ [`${E}-cell-next-${se}`]: de && se,
1070
+ [`${E}-col-has-sorter`]: oe,
1071
+ [`${E}-col-has-filter`]: Pe
1072
+ });
1073
+ return D !== 0 && /* @__PURE__ */ Je(
1074
+ Ie,
1075
+ {
1076
+ className: ee(
1077
+ `${E}-th`,
1078
+ {
1079
+ [`${E}-col-sorted`]: (i == null ? void 0 : i.direction) && i.field === h
1080
+ },
1081
+ k,
1082
+ K
1083
+ ),
1084
+ index: F,
1085
+ ...Se,
1086
+ key: Se.key,
1087
+ ...L
1088
+ },
1089
+ /* @__PURE__ */ c(
1090
+ Te,
1091
+ {
1092
+ className: Fe,
1093
+ column: Ge(Te) ? void 0 : j,
1094
+ children: Ke
1095
+ }
1096
+ )
1097
+ );
1098
+ }
1099
+ function So(s) {
1100
+ const {
1101
+ activeSorters: f,
1102
+ expandedRowRender: u,
1103
+ expandProps: w = {},
1104
+ onSort: e,
1105
+ onHandleFilter: T,
1106
+ onHandleFilterReset: i,
1107
+ onHeaderRow: m,
1108
+ prefixCls: d,
1109
+ currentFilters: S,
1110
+ component: R,
1111
+ data: p,
1112
+ selectedRowKeys: C,
1113
+ rowSelection: g,
1114
+ allSelectedRowKeys: k = [],
1115
+ groupColumns: K,
1116
+ stickyOffsets: $,
1117
+ groupStickyClassNames: y,
1118
+ showSorterTooltip: a
1119
+ } = s, { rtl: D } = Qe(Ze), { ComponentThead: L, ComponentHeaderRow: E, getHeaderComponentOperations: J } = _e(R), Y = g && (g.type === "checkbox" || !("type" in g)), H = g && "checkAll" in g ? g.checkAll : !0, I = g && g.type === "radio", { columnTitle: v } = w, B = ae(() => {
1120
+ const j = new Set(k);
1121
+ return C.filter((r) => j.has(r));
1122
+ }, [C, k]), P = K.length > 1 ? { rowSpan: K.length } : {}, A = ee(`${d}-th`, `${d}-operation`);
1123
+ return /* @__PURE__ */ c(L, { children: K.map((j, r) => {
1124
+ const F = m == null ? void 0 : m(j, r), N = (Y || I) && r === 0 && /* @__PURE__ */ c(
1125
+ "th",
1126
+ {
1127
+ className: ee(
1128
+ A,
1129
+ `${d}-${I ? "radio" : "checkbox"}`
1130
+ ),
1131
+ children: /* @__PURE__ */ ce("div", { className: `${d}-th-item`, children: [
1132
+ H && !I ? /* @__PURE__ */ c(
1133
+ Pt,
1134
+ {
1135
+ indeterminate: p && B.length > 0 && B.length !== k.length,
1136
+ checked: p && B.length !== 0 && B.length === k.length,
1137
+ disabled: !k.length,
1138
+ onChange: s.onCheckAll
1139
+ }
1140
+ ) : null,
1141
+ g && g.columnTitle
1142
+ ] })
1143
+ }
1144
+ ), _ = u && /* @__PURE__ */ c("th", { className: ee(A, `${d}-expand`), children: v && /* @__PURE__ */ c("div", { className: `${d}-th-item`, children: v }) }), h = y[r], M = J({
1145
+ selectionNode: N,
1146
+ expandNode: _
1147
+ });
1148
+ return /* @__PURE__ */ Je(
1149
+ E,
1150
+ {
1151
+ ...F,
1152
+ key: r,
1153
+ className: `${d}-tr`
1154
+ },
1155
+ j.map((n, q) => {
1156
+ var ie, fe, pe, ue, X;
1157
+ const Q = n.$$columnIndex;
1158
+ let U = 0;
1159
+ Array.isArray(Q) && Q.length === 2 ? U = n.fixed === "right" ? $[Q[1]] : $[Q[0]] : typeof Q == "number" && (U = $[Q] || 0);
1160
+ const de = h[q];
1161
+ if (n.$$isOperation) {
1162
+ let we = n.node, be = !0;
1163
+ n.title === gt && (we = (ie = M.find(
1164
+ ($e) => $e.name === "selectionNode"
1165
+ )) == null ? void 0 : ie.node, be = !1), n.title === xt && (we = (fe = M.find(
1166
+ ($e) => $e.name === "expandNode"
1167
+ )) == null ? void 0 : fe.node, be = !1);
1168
+ const re = we;
1169
+ return Ue.cloneElement(re, {
1170
+ key: n.key || q,
1171
+ ...re.props,
1172
+ ...P,
1173
+ className: ee(
1174
+ be ? A : "",
1175
+ (pe = re == null ? void 0 : re.props) == null ? void 0 : pe.className,
1176
+ de
1177
+ ),
1178
+ style: {
1179
+ ...(ue = re == null ? void 0 : re.props) == null ? void 0 : ue.style,
1180
+ ...n.fixed === "left" ? {
1181
+ [D ? "right" : "left"]: U
1182
+ } : {},
1183
+ width: n.width,
1184
+ minWidth: n.width
1185
+ }
1186
+ });
1187
+ }
1188
+ const ne = (X = n == null ? void 0 : n.onHeaderCell) == null ? void 0 : X.call(n, n, q), oe = ee(de, n.className), se = {};
1189
+ return n.fixed === "left" && (se[D ? "right" : "left"] = U), n.fixed === "right" && (se[D ? "left" : "right"] = U), /* @__PURE__ */ Je(
1190
+ $o,
1191
+ {
1192
+ index: q,
1193
+ onSort: e,
1194
+ onHandleFilter: T,
1195
+ onHandleFilterReset: i,
1196
+ currentSorter: f.find(
1197
+ (we) => we.field === (n.dataIndex || n.key)
1198
+ ),
1199
+ currentFilters: S,
1200
+ _key: n.key || n.dataIndex || q,
1201
+ ...n,
1202
+ key: n.key,
1203
+ column: n,
1204
+ headerCellProps: ne,
1205
+ prefixCls: d,
1206
+ component: R,
1207
+ className: oe,
1208
+ columnFixedStyle: se,
1209
+ showSorterTooltip: a
1210
+ }
1211
+ );
1212
+ })
1213
+ );
1214
+ }) });
1215
+ }
1216
+ const No = [], bo = [], Ro = {
1217
+ showHeader: !0,
1218
+ border: !0,
1219
+ hover: !0,
1220
+ rowKey: "key",
1221
+ pagePosition: "br",
1222
+ childrenColumnName: "children",
1223
+ indentSize: 15,
1224
+ showSorterTooltip: !0
1225
+ };
1226
+ function ko(s, f) {
1227
+ var Yt, qt;
1228
+ const {
1229
+ getPrefixCls: u,
1230
+ loadingElement: w,
1231
+ size: e,
1232
+ tablePagination: T,
1233
+ renderEmpty: i,
1234
+ componentConfig: m,
1235
+ rtl: d
1236
+ } = Qe(Ze), S = Xt(
1237
+ s,
1238
+ Ro,
1239
+ m == null ? void 0 : m.Table
1240
+ ), R = Xt(
1241
+ te(s == null ? void 0 : s.pagination) ? s == null ? void 0 : s.pagination : {},
1242
+ te((Yt = m == null ? void 0 : m.Table) == null ? void 0 : Yt.pagination) ? (qt = m == null ? void 0 : m.Table) == null ? void 0 : qt.pagination : {},
1243
+ T || {}
1244
+ ), {
1245
+ style: p,
1246
+ className: C,
1247
+ component: g,
1248
+ border: k,
1249
+ borderCell: K,
1250
+ columns: $ = bo,
1251
+ data: y = No,
1252
+ scroll: a,
1253
+ noDataElement: D,
1254
+ showHeader: L,
1255
+ stripe: E,
1256
+ hover: J,
1257
+ pagination: Y,
1258
+ onChange: H,
1259
+ pagePosition: I,
1260
+ childrenColumnName: v,
1261
+ indentSize: B,
1262
+ rowSelection: P,
1263
+ tableLayoutFixed: A,
1264
+ header: j,
1265
+ // 潘启宝添加
1266
+ footer: r,
1267
+ virtualized: F,
1268
+ renderPagination: N,
1269
+ summary: _,
1270
+ rowKey: h
1271
+ } = S, M = ae(
1272
+ () => Vn(y, v),
1273
+ [y, v]
1274
+ ), n = u("table"), q = S.size || (["default", "middle", "small"].indexOf(e) > -1 ? e : "default"), Q = he(null), U = he(null), de = he(null), ne = he(null), oe = he(null), se = he(null), ie = he(null), fe = he(0), pe = he(!1), [ue, X] = ro(S), { currentFilters: we, defaultSorters: be } = tt(), [re, $e] = me(1), [ye, Se] = me(
1275
+ R.pageSize || R.defaultPageSize || 10
1276
+ ), [Ie, Te] = me(we), [Pe, Be] = me(0), [Ee, Ke] = me([]), Fe = co(X), [W, le] = ao(
1277
+ ue,
1278
+ X,
1279
+ n
1280
+ ), {
1281
+ currentSorter: b,
1282
+ activeSorters: z,
1283
+ getNextActiveSorters: Oe,
1284
+ updateStateSorters: De
1285
+ } = lo(X, be), { ComponentTable: Re, ComponentBodyWrapper: Le, ComponentHeaderWrapper: et } = _e(g), He = ae(() => typeof h == "function" ? (t) => h(Z(t)) : (t) => t[h], [h]);
1286
+ function tt() {
1287
+ const t = {};
1288
+ let o = [];
1289
+ return X.forEach((l) => {
1290
+ const x = l.dataIndex || l.key;
1291
+ if (l.defaultFilters && (t[x] = l.defaultFilters), l.filteredValue && (t[x] = l.filteredValue), "defaultSortOrder" in l || "sortOrder" in l) {
1292
+ const O = Et(l.sorter), G = "sortOrder" in l ? l.sortOrder : l.defaultSortOrder, V = {
1293
+ field: x,
1294
+ direction: G,
1295
+ sorterFn: Ft(l.sorter),
1296
+ priority: O
1297
+ };
1298
+ G ? Ve(O) ? o.every(
1299
+ (ge) => Ve(ge.priority) || !ge.direction
1300
+ ) && o.push(V) : o.every((ge) => !ge.direction) ? o.push(V) : o = [V] : o.push(V);
1301
+ }
1302
+ }), { currentFilters: t, defaultSorters: o };
1303
+ }
1304
+ const xe = ae(() => {
1305
+ const t = X.filter(
1306
+ (l) => "filteredValue" in l
1307
+ ), o = {};
1308
+ return t.length && t.forEach((l, x) => {
1309
+ const O = l.key || l.dataIndex || x;
1310
+ O !== void 0 && (o[O] = l.filteredValue);
1311
+ }), o;
1312
+ }, [X]), Ne = ae(() => Object.keys(xe).length ? xe : Ie, [Ie, xe]);
1313
+ function ke(t, o) {
1314
+ const l = Lt(o);
1315
+ if (!l)
1316
+ return;
1317
+ const x = {
1318
+ direction: t,
1319
+ field: o,
1320
+ sorterFn: Ft(l.sorter),
1321
+ priority: Et(l.sorter)
1322
+ }, O = Oe(x);
1323
+ De(x, O);
1324
+ const G = st(
1325
+ x,
1326
+ O,
1327
+ Ne
1328
+ ), V = Ye(G);
1329
+ H == null || H(Me(G), x, Ne, {
1330
+ currentData: Z(V),
1331
+ currentAllData: Z(G),
1332
+ action: "sort"
1333
+ });
1334
+ }
1335
+ function je(t) {
1336
+ const o = function(x, O) {
1337
+ return (G, V) => {
1338
+ const ge = x(G, V);
1339
+ return O === "descend" ? -ge : ge;
1340
+ };
1341
+ }, l = [...t];
1342
+ return l.sort((x, O) => O.priority - x.priority), (x, O) => {
1343
+ for (let G = 0, V = l.length; G < V; G++) {
1344
+ const { sorterFn: ge, direction: Rt } = l[G];
1345
+ if (typeof ge != "function")
1346
+ continue;
1347
+ const dt = o(ge, Rt)(x, O);
1348
+ if (dt !== 0)
1349
+ return dt;
1350
+ }
1351
+ return 0;
1352
+ };
1353
+ }
1354
+ function ln(t, o) {
1355
+ const l = {
1356
+ ...Ne,
1357
+ [t.dataIndex]: o
1358
+ }, x = {
1359
+ ...l,
1360
+ ...xe
1361
+ };
1362
+ if (Ce(o) && o.length) {
1363
+ Te(x);
1364
+ const O = st(
1365
+ b,
1366
+ z,
1367
+ l
1368
+ ), G = Ye(O);
1369
+ H == null || H(
1370
+ Me(O),
1371
+ z.length === 1 ? z[0] : z,
1372
+ l,
1373
+ {
1374
+ currentData: Z(G),
1375
+ currentAllData: Z(O),
1376
+ action: "filter"
1377
+ }
1378
+ );
1379
+ } else Ce(o) && !o.length && Kt(t);
1380
+ }
1381
+ function Kt({ dataIndex: t }) {
1382
+ const o = {
1383
+ ...Ne
1384
+ };
1385
+ delete o[t], Te(o);
1386
+ const l = st(
1387
+ b,
1388
+ z,
1389
+ o
1390
+ ), x = Ye(l);
1391
+ H == null || H(
1392
+ Me(l),
1393
+ z.length === 1 ? z[0] : z,
1394
+ o,
1395
+ {
1396
+ currentData: Z(x),
1397
+ currentAllData: Z(l),
1398
+ action: "filter"
1399
+ }
1400
+ );
1401
+ }
1402
+ const nt = !!X.find((t) => t.fixed === "left"), ot = !!X.find((t) => t.fixed === "right"), rt = nt || ot;
1403
+ function st(t, o, l) {
1404
+ let x = (M || []).slice();
1405
+ Object.keys(l).forEach((G) => {
1406
+ if (l[G] && l[G].length) {
1407
+ const V = Lt(G);
1408
+ V && typeof V.onFilter == "function" && (x = x.filter((ge) => l[G].reduce(
1409
+ (Rt, dt) => Rt || V.onFilter(dt, ge),
1410
+ !1
1411
+ )));
1412
+ }
1413
+ });
1414
+ const O = (G) => G.slice().sort(je(o)).map((V) => Ce(V[v]) ? {
1415
+ ...V,
1416
+ [v]: O(V[v])
1417
+ } : V);
1418
+ return t.direction && typeof t.sorterFn == "function" || o.length ? O(x) : x;
1419
+ }
1420
+ const Ae = st(
1421
+ b,
1422
+ z,
1423
+ Ne
1424
+ );
1425
+ function Me(t = Ae) {
1426
+ const o = R.pageSize || ye || 10, l = q === "middle" ? "default" : q;
1427
+ let x = "top";
1428
+ I === "tl" || I === "bl" ? x = "bottom" : x = "top";
1429
+ const O = Ce(t) ? t.length : 0, G = Math.ceil(O / o) < re ? 1 : re;
1430
+ G !== re && $e(G);
1431
+ let V = {
1432
+ size: l,
1433
+ total: O,
1434
+ pageSize: o,
1435
+ current: G,
1436
+ selectProps: {
1437
+ triggerProps: {
1438
+ position: x
1439
+ }
1440
+ }
1441
+ };
1442
+ return typeof Y == "object" && Y.selectProps && (V.selectProps = {
1443
+ ...V.selectProps,
1444
+ ...Y.selectProps
1445
+ }), te(Y) && (V = {
1446
+ ...V,
1447
+ ...Y
1448
+ }), te(R) && (V = {
1449
+ ...V,
1450
+ ...R
1451
+ }), V.onChange = xn, V;
1452
+ }
1453
+ const it = Me(), We = Ye();
1454
+ function Ye(t = Ae, o = it) {
1455
+ const { current: l = 0, pageSize: x = 10 } = o;
1456
+ return Y === !1 || te(Y) && y.length <= x ? t : t.slice((l - 1) * x, l * x);
1457
+ }
1458
+ const Ot = Pn(Dt, 100), ve = !!(a && a.y), qe = _ == null ? void 0 : _(Z(Ae)), Ct = _ && Ue.isValidElement(qe) && qe.props.fixed, an = ve && Ct;
1459
+ _n(() => {
1460
+ Dt(), ft(window, "resize", Ot);
1461
+ const t = Q.current, o = U.current, l = ne.current;
1462
+ o && ft(o, "scroll", ze);
1463
+ const x = t && t.parentNode;
1464
+ return t && x && ft(x, "scroll", ze), l && ft(l, "scroll", ze), () => {
1465
+ pt(window, "resize", Ot), o && pt(o, "scroll", ze), x && pt(x, "scroll", ze), l && pt(l, "scroll", ze);
1466
+ };
1467
+ }, [
1468
+ nt,
1469
+ ot,
1470
+ a == null ? void 0 : a.x,
1471
+ a == null ? void 0 : a.y,
1472
+ X.length,
1473
+ y
1474
+ ]), vt(() => {
1475
+ const { total: t, pageSize: o } = Me(y);
1476
+ Math.ceil(t / o) < re && $e(1);
1477
+ }, [y == null ? void 0 : y.length]), vt(() => {
1478
+ lt();
1479
+ }, [y, nt, ot, d]), Dn(f, () => ({
1480
+ getRootDomElement: wt,
1481
+ scrollIntoView: (t) => {
1482
+ se.current && se.current.scrollTo({ key: t });
1483
+ },
1484
+ getRootDOMNode: wt
1485
+ }));
1486
+ function wt() {
1487
+ return oe.current;
1488
+ }
1489
+ function Dt() {
1490
+ var o, l;
1491
+ lt();
1492
+ const t = wt();
1493
+ if (t && (rt || a && a.x)) {
1494
+ const x = t.querySelector(`.${n}-body`) || t.querySelector(`.${n}-content-inner`), O = (l = (o = x == null ? void 0 : x.getBoundingClientRect) == null ? void 0 : o.call(x)) == null ? void 0 : l.width;
1495
+ Be(O);
1496
+ }
1497
+ }
1498
+ const cn = Xe(
1499
+ Kn(() => {
1500
+ const t = oe.current, o = ve ? U.current : ie.current && ie.current.parentNode;
1501
+ if (o) {
1502
+ const l = d ? -o.scrollLeft : o.scrollLeft, x = l === 0, O = l + 1 >= o.children[0].getBoundingClientRect().width - o.getBoundingClientRect().width;
1503
+ x && O ? at(
1504
+ t.classList,
1505
+ `${n}-scroll-position-both`
1506
+ ) : x ? at(
1507
+ t.classList,
1508
+ `${n}-scroll-position-${d ? "right" : "left"}`
1509
+ ) : O ? at(
1510
+ t.classList,
1511
+ `${n}-scroll-position-${d ? "left" : "right"}`
1512
+ ) : at(
1513
+ t.classList,
1514
+ `${n}-scroll-position-middle`
1515
+ );
1516
+ } else
1517
+ t && Bt(t.classList);
1518
+ }, 100),
1519
+ [oe.current, U.current, ve, d]
1520
+ );
1521
+ function lt() {
1522
+ if (rt || a && te(a) && a.x) {
1523
+ const t = oe.current;
1524
+ t && (nt && _t(
1525
+ t.classList,
1526
+ `${n}-has-fixed-col-left`
1527
+ ), ot && _t(
1528
+ t.classList,
1529
+ `${n}-has-fixed-col-right`
1530
+ )), cn();
1531
+ }
1532
+ }
1533
+ function _t(t, o) {
1534
+ t.contains(o) || t.add(o);
1535
+ }
1536
+ function Bt(t) {
1537
+ t.remove(`${n}-scroll-position-both`), t.remove(`${n}-scroll-position-left`), t.remove(`${n}-scroll-position-right`), t.remove(`${n}-scroll-position-middle`);
1538
+ }
1539
+ function at(t, o) {
1540
+ t.contains(o) || (Bt(t), t.add(o));
1541
+ }
1542
+ const {
1543
+ selectedRowKeys: $t,
1544
+ indeterminateKeys: dn,
1545
+ onCheckAll: fn,
1546
+ onCheck: pn,
1547
+ onCheckRadio: un,
1548
+ setSelectedRowKeys: hn,
1549
+ allSelectedRowKeys: mn,
1550
+ flattenData: yn
1551
+ } = io(S, We, M, He);
1552
+ function Lt(t) {
1553
+ return X.find((o, l) => typeof o.key < "u" ? typeof o.key == "number" && typeof t == "string" ? o.key.toString() === t : o.key === t : typeof o.dataIndex < "u" ? o.dataIndex === t : typeof t == "number" ? l === t : !1);
1554
+ }
1555
+ function xn(t, o) {
1556
+ var x, O;
1557
+ $e(t), Se(o), t !== re && gn(), P && !P.checkCrossPage && $t.length && (hn([]), (x = P.onChange) == null || x.call(P, [], []));
1558
+ const l = { ...Me(), current: t, pageSize: o };
1559
+ H == null || H(
1560
+ l,
1561
+ z.length === 1 ? z[0] : z,
1562
+ Ne,
1563
+ {
1564
+ currentData: Z(
1565
+ Ye(Ae, l)
1566
+ ),
1567
+ currentAllData: Z(Ae),
1568
+ action: "paginate"
1569
+ }
1570
+ ), (O = R.onChange) == null || O.call(R, t, o);
1571
+ }
1572
+ function gn() {
1573
+ if (!U.current)
1574
+ return;
1575
+ const o = U.current.scrollTop;
1576
+ new Fn({
1577
+ from: { scrollTop: o },
1578
+ to: { scrollTop: 0 },
1579
+ easing: In,
1580
+ duration: 300,
1581
+ onUpdate: (x) => {
1582
+ U.current && (U.current.scrollTop = x.scrollTop);
1583
+ }
1584
+ }).start();
1585
+ }
1586
+ function ze(t) {
1587
+ const { target: o } = t, l = U.current, x = Q.current && Q.current.parentNode, O = ne.current;
1588
+ o.scrollLeft !== fe.current && (x && (x.scrollLeft = o.scrollLeft), l && (l.scrollLeft = o.scrollLeft), O && (O.scrollLeft = o.scrollLeft), lt()), fe.current = t.target.scrollLeft;
1589
+ }
1590
+ function Cn(t) {
1591
+ const { target: o } = t, l = ie.current;
1592
+ o.scrollLeft !== fe.current && (l.scrollLeft = o.scrollLeft, lt()), fe.current = t.target.scrollLeft;
1593
+ }
1594
+ const [Ht, wn] = so(
1595
+ S,
1596
+ yn,
1597
+ He
1598
+ );
1599
+ let At = {}, St = {};
1600
+ a && (a.x && (typeof a.x == "number" || typeof a.x == "string") && (St = {
1601
+ width: a.x
1602
+ }), a.y && (typeof a.y == "number" || typeof a.y == "string") && (At = {
1603
+ maxHeight: a.y
1604
+ }));
1605
+ function $n() {
1606
+ requestAnimationFrame((t) => {
1607
+ const o = Q.current && Q.current.parentNode, l = Un(o);
1608
+ l && l > 0 && (o.style.marginBottom = `-${l}px`, o.style.paddingBottom = "0px", ne.current && (ne.current.style.marginBottom = `-${l}px`, ne.current.style.paddingBottom = "0px")), setTimeout(() => {
1609
+ const x = U.current;
1610
+ jn(x) ? (pe.current = !0, o && (o.style.overflowY = "scroll"), ne.current && (ne.current.style.overflowY = "scroll")) : o && pe.current && (pe.current = !1, o.style.overflowY = "auto", ne.current && (ne.current.style.overflowY = "auto"));
1611
+ }, 0);
1612
+ });
1613
+ }
1614
+ const Mt = /* @__PURE__ */ c(
1615
+ So,
1616
+ {
1617
+ ...S,
1618
+ activeSorters: z,
1619
+ currentSorter: b,
1620
+ selectedRowKeys: $t,
1621
+ currentFilters: Ne,
1622
+ onCheckAll: fn,
1623
+ onSort: ke,
1624
+ data: We,
1625
+ onHandleFilter: ln,
1626
+ onHandleFilterReset: Kt,
1627
+ prefixCls: n,
1628
+ allSelectedRowKeys: mn,
1629
+ groupColumns: ue,
1630
+ stickyOffsets: Fe,
1631
+ groupStickyClassNames: W
1632
+ }
1633
+ );
1634
+ function Sn() {
1635
+ const t = te(a) && a.x === "max-content";
1636
+ return ve || F ? /* @__PURE__ */ c(et, { className: `${n}-header`, children: /* @__PURE__ */ ce(
1637
+ Re,
1638
+ {
1639
+ ref: Q,
1640
+ style: t ? {} : St,
1641
+ children: [
1642
+ /* @__PURE__ */ c(
1643
+ ut,
1644
+ {
1645
+ columns: X,
1646
+ prefixCls: n,
1647
+ producer: !1,
1648
+ columnWidths: t && a.y ? Ee : null
1649
+ }
1650
+ ),
1651
+ Mt
1652
+ ]
1653
+ }
1654
+ ) }) : Mt;
1655
+ }
1656
+ const Wt = qe && /* @__PURE__ */ c(
1657
+ go,
1658
+ {
1659
+ prefixCls: n,
1660
+ summary: _,
1661
+ data: We,
1662
+ columns: X,
1663
+ stickyOffsets: Fe,
1664
+ stickyClassNames: le
1665
+ }
1666
+ ), zt = /* @__PURE__ */ c(
1667
+ yo,
1668
+ {
1669
+ ...S,
1670
+ saveRef: (t) => de.current = t,
1671
+ selectedRowKeys: $t,
1672
+ indeterminateKeys: dn,
1673
+ expandedRowKeys: Ht,
1674
+ onCheck: pn,
1675
+ onCheckRadio: un,
1676
+ onClickExpandBtn: wn,
1677
+ columns: X,
1678
+ data: We,
1679
+ prefixCls: n,
1680
+ hasFixedColumn: rt,
1681
+ tableViewWidth: Pe,
1682
+ indentSize: B,
1683
+ noDataElement: D || i("Table"),
1684
+ activeSorters: z,
1685
+ currentSorter: b,
1686
+ stickyOffsets: Fe,
1687
+ stickyClassNames: le,
1688
+ getRowKey: He,
1689
+ saveVirtualListRef: (t) => {
1690
+ F && (se.current = t, U.current = t == null ? void 0 : t.dom);
1691
+ },
1692
+ ___dangerouslySetInnerHTML___: S.___dangerouslySetInnerHTML___
1693
+ }
1694
+ ), Vt = !F && !an ? /* @__PURE__ */ ce(ht, { children: [
1695
+ zt,
1696
+ Wt
1697
+ ] }) : zt;
1698
+ yt(() => {
1699
+ const t = U.current || de.current, o = An([t], $n);
1700
+ return () => {
1701
+ o();
1702
+ };
1703
+ }, [U.current, de.current]);
1704
+ function Nn() {
1705
+ const t = te(a) && a.x === "max-content" && !!a.y && Ce(y) && y.length > 0;
1706
+ return ve && !F ? /* @__PURE__ */ c(
1707
+ Le,
1708
+ {
1709
+ ref: U,
1710
+ className: `${n}-body`,
1711
+ style: At,
1712
+ children: /* @__PURE__ */ ce(Re, { style: St, children: [
1713
+ /* @__PURE__ */ c(
1714
+ ut,
1715
+ {
1716
+ columns: X,
1717
+ prefixCls: n,
1718
+ producer: t,
1719
+ onSetColumnWidths: Ke,
1720
+ expandedRowKeys: Ht,
1721
+ data: y
1722
+ }
1723
+ ),
1724
+ Vt
1725
+ ] })
1726
+ }
1727
+ ) : Vt;
1728
+ }
1729
+ function bn() {
1730
+ let t = {};
1731
+ a && te(a) && a.x && (t = {
1732
+ width: a.x
1733
+ });
1734
+ const o = /* @__PURE__ */ c("div", { className: `${n}-tfoot`, ref: ne, children: /* @__PURE__ */ ce(Re, { style: t, children: [
1735
+ /* @__PURE__ */ c(ut, { columns: X, prefixCls: n }),
1736
+ Wt
1737
+ ] }) }), l = qe && ve && Ct === "top", x = qe && ve && Ct === "bottom", O = /* @__PURE__ */ ce(ht, { children: [
1738
+ L ? Sn() : null,
1739
+ l && o,
1740
+ Nn(),
1741
+ x && o
1742
+ ] });
1743
+ return /* @__PURE__ */ ce(ht, { children: [
1744
+ typeof j == "function" && /* @__PURE__ */ c("div", { className: `${n}-header-`, children: j(We) }),
1745
+ /* @__PURE__ */ c("div", { className: `${n}-container`, children: /* @__PURE__ */ c("div", { className: `${n}-content-scroll`, children: /* @__PURE__ */ c(
1746
+ "div",
1747
+ {
1748
+ className: `${n}-content-inner`,
1749
+ onScroll: ve ? void 0 : Cn,
1750
+ children: ve || F ? O : /* @__PURE__ */ ce(Re, { ref: ie, style: t, children: [
1751
+ /* @__PURE__ */ c(ut, { prefixCls: n, columns: X }),
1752
+ O
1753
+ ] })
1754
+ }
1755
+ ) }) }),
1756
+ typeof r == "function" && /* @__PURE__ */ c("div", { className: `${n}-footer`, children: r(We) })
1757
+ ] });
1758
+ }
1759
+ if (!$.length) return null;
1760
+ const Rn = te(k) ? k.wrapper : k, Nt = te(k) ? k.cell : K, kn = te(k) ? k.cell || k.headerCell : K, vn = te(k) ? k.cell || k.bodyCell : K, Tn = ee(
1761
+ n,
1762
+ `${n}-size-${q}`,
1763
+ {
1764
+ [`${n}-border`]: Rn,
1765
+ [`${n}-border-cell`]: Nt,
1766
+ [`${n}-border-header-cell`]: !Nt && kn,
1767
+ [`${n}-border-body-cell`]: !Nt && vn,
1768
+ [`${n}-stripe`]: E,
1769
+ [`${n}-hover`]: J,
1770
+ [`${n}-type-radio`]: P && P.type === "radio",
1771
+ [`${n}-layout-fixed`]: A || a && (a.x || a.y) || $.find((t) => t.ellipsis),
1772
+ [`${n}-fixed-column`]: rt,
1773
+ [`${n}-virtualized`]: F,
1774
+ [`${n}-rtl`]: d
1775
+ },
1776
+ C
1777
+ ), bt = I === "tl" || I === "tr" || I === "topCenter", En = ee(`${n}-pagination`, {
1778
+ [`${n}-pagination-left`]: I === "tl" || I === "bl",
1779
+ [`${n}-pagination-center`]: I === "topCenter" || I === "bottomCenter",
1780
+ [`${n}-pagination-top`]: bt
1781
+ });
1782
+ let ct = S.loading;
1783
+ typeof ct == "boolean" && (ct = { loading: ct });
1784
+ const Ut = typeof N == "function" ? N(/* @__PURE__ */ c(Gt, { ...it })) : /* @__PURE__ */ c("div", { className: En, children: /* @__PURE__ */ c(Gt, { ...it }) }), jt = Y !== !1 && (Ae.length !== 0 || it.total > 0);
1785
+ return /* @__PURE__ */ c(
1786
+ "div",
1787
+ {
1788
+ ref: oe,
1789
+ style: p,
1790
+ className: Tn,
1791
+ ...Hn(S),
1792
+ children: /* @__PURE__ */ ce(
1793
+ Bn,
1794
+ {
1795
+ className: `${n}-spin`,
1796
+ element: w,
1797
+ ...ct,
1798
+ children: [
1799
+ jt && bt && Ut,
1800
+ bn(),
1801
+ jt && !bt && Ut
1802
+ ]
1803
+ }
1804
+ )
1805
+ }
1806
+ );
1807
+ }
1808
+ const vo = It(ko);
1809
+ vo.displayName = "Table";
1810
+ export {
1811
+ xo as S,
1812
+ vo as T,
1813
+ _e as a,
1814
+ so as b,
1815
+ io as c,
1816
+ lo as d,
1817
+ ao as e,
1818
+ co as f,
1819
+ ro as u
1820
+ };