@unicom-cloud/ui 0.8.105 → 0.8.107

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