bitz-react-admin-ui 2.10.0 → 2.10.2

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.
@@ -1,134 +1,134 @@
1
1
  import { j as r } from "../../../node_modules/react/jsx-runtime.mjs";
2
- import { useRef as O, useContext as De, useState as G, useEffect as Je, useMemo as h, useLayoutEffect as Qe, useCallback as ce } from "react";
2
+ import { useRef as v, useContext as Je, useState as V, useEffect as Qe, useMemo as m, useLayoutEffect as Ue, useCallback as ce } from "react";
3
3
  import { isMobile as g } from "../../../node_modules/react-device-detect/dist/lib.mjs";
4
- import { Typography as xe, Skeleton as Gt, Alert as It, Table as Yt, Spin as Dt } from "antd";
4
+ import { Typography as ge, Skeleton as Rt, Alert as Dt, Table as Jt, Spin as Qt } from "antd";
5
5
  import ie from "../../../node_modules/classnames/index.mjs";
6
- import Jt from "../../BitzDrawer/index.mjs";
7
- import Qt from "../../BitzPagination/index.mjs";
8
- import Rt from "../../BitzNoData/index.mjs";
6
+ import Ut from "../../BitzDrawer/index.mjs";
7
+ import Xt from "../../BitzPagination/index.mjs";
8
+ import Zt from "../../BitzNoData/index.mjs";
9
9
  import "../../BitzList/index.less.mjs";
10
- import Ut from "../../BitzList/List.mjs";
10
+ import Et from "../../BitzList/List.mjs";
11
11
  import "../../BitzPullRefresh/style/index.less.mjs";
12
- import Xt from "../../BitzPullRefresh/PullRefresh.mjs";
13
- import Zt, { BitzTableContext as Et, toolCols as pt } from "../Store/index.mjs";
14
- import { loopFilter as At, columnSort as Ft, genColumnKey as es } from "../Store/utils/index.mjs";
15
- import ts from "../../BitzTheme/index.mjs";
16
- import { tablePaddingInline as ss } from "../../BitzConfigProvider/context.mjs";
17
- import Re from "../../BitzHighlight/index.mjs";
18
- import rs from "../../../node_modules/antd/es/table/ExpandIcon.mjs";
12
+ import pt from "../../BitzPullRefresh/PullRefresh.mjs";
13
+ import At, { BitzTableContext as Ft, toolCols as es } from "../Store/index.mjs";
14
+ import { loopFilter as ts, columnSort as ss, genColumnKey as rs } from "../Store/utils/index.mjs";
15
+ import ns from "../../BitzTheme/index.mjs";
16
+ import { tablePaddingInline as ls } from "../../BitzConfigProvider/context.mjs";
17
+ import Xe from "../../BitzHighlight/index.mjs";
18
+ import os from "../../../node_modules/antd/es/table/ExpandIcon.mjs";
19
19
  import "../../../node_modules/antd/es/config-provider/index.mjs";
20
- import ns from "../../../node_modules/antd/locale/en_US.mjs";
21
- import { getColumnsWithTool as ls, resetScroll as Ue } from "./utils.mjs";
22
- import { getCssVar as os } from "./style.mjs";
23
- import cs from "./SortableRow.mjs";
24
- import is from "./SortTableContext.mjs";
25
- import us from "./ResizableTitle copy.mjs";
26
- import as from "../TextOverflow/index.mjs";
20
+ import cs from "../../../node_modules/antd/locale/en_US.mjs";
21
+ import { getColumnsWithTool as is, resetScroll as Ze } from "./utils.mjs";
22
+ import { getCssVar as us } from "./style.mjs";
23
+ import as from "./SortableRow.mjs";
24
+ import ds from "./SortTableContext.mjs";
25
+ import fs from "./ResizableTitle copy.mjs";
26
+ import hs from "../TextOverflow/index.mjs";
27
27
  import "./index.less.mjs";
28
- import { querySelectorAll as ds, querySelector as hs } from "../../../utils/select-query.mjs";
29
- import { TdCell as fs } from "./TdCell.mjs";
30
- import ms from "../../../node_modules/lodash-es/isNil.mjs";
31
- import { ConfigContext as bs } from "../../../node_modules/antd/es/config-provider/context.mjs";
32
- import ys from "../../../node_modules/lodash-es/at.mjs";
33
- function Cs({
34
- showPagination: R = !0,
28
+ import { querySelectorAll as ms, querySelector as bs } from "../../../utils/select-query.mjs";
29
+ import { TdCell as ys } from "./TdCell.mjs";
30
+ import Cs from "../../../node_modules/lodash-es/isNil.mjs";
31
+ import { ConfigContext as xs } from "../../../node_modules/antd/es/config-provider/context.mjs";
32
+ import ws from "../../../node_modules/lodash-es/at.mjs";
33
+ function gs({
34
+ showPagination: Q = !0,
35
35
  height: H,
36
36
  minHeight: ue,
37
37
  dataSource: z,
38
38
  total: M = 0,
39
39
  columns: ae,
40
- loading: a,
41
- dataProps: Xe = {},
42
- skeletonNum: we = {
40
+ loading: f,
41
+ dataProps: Ee = {},
42
+ skeletonNum: Te = {
43
43
  pc: 10,
44
44
  mobile: 10
45
45
  },
46
46
  skeletonRender: de,
47
- skeletonRowNum: Ze = 4,
48
- skeletonRowsWidth: Ee = ["35%", "100%", "100%", "60%"],
47
+ skeletonRowNum: pe = 4,
48
+ skeletonRowsWidth: Ae = ["35%", "100%", "100%", "60%"],
49
49
  // mobileLoadEmit,
50
- mobileRefreshEmit: ge,
51
- operationFilter: d,
52
- enableControlPage: pe,
50
+ mobileRefreshEmit: je,
51
+ operationFilter: h,
52
+ enableControlPage: Fe,
53
53
  pagination: x,
54
- paginationEmit: I = () => {
54
+ paginationEmit: R = () => {
55
55
  },
56
- onChange: he,
57
- enabledRowDragSort: Y,
58
- onRowDragEnd: fe,
59
- resizableColumns: F,
56
+ onChange: fe,
57
+ enabledRowDragSort: D,
58
+ onRowDragEnd: he,
59
+ resizableColumns: p,
60
60
  // mobilePageHeight = 500,
61
- mobileCancelText: Ae = "取消",
62
- noDataTitle: Fe,
63
- noDataImg: et,
61
+ mobileCancelText: et = "取消",
62
+ noDataTitle: tt,
63
+ noDataImg: st,
64
64
  // color,
65
- size: Te,
66
- showTableTool: tt = !0,
67
- tableAction: st,
68
- tableToolbar: rt,
69
- selectionBar: nt,
70
- scroll: f,
65
+ size: ze,
66
+ showTableTool: rt = !0,
67
+ tableAction: nt,
68
+ tableToolbar: lt,
69
+ selectionBar: ot,
70
+ scroll: b,
71
71
  components: P,
72
72
  expandable: k,
73
- rowSelection: V,
73
+ rowSelection: Y,
74
74
  selectionAlert: C,
75
- resetPage: lt,
76
- inview: je,
75
+ resetPage: ct,
76
+ inview: Ne,
77
77
  ...u
78
78
  }) {
79
- var ve, _e, Ge;
80
- const { token: W } = ts.useToken(), ze = O([]), { Table: m } = W, Ne = m.tableSpaceBetweenPage ?? 10, ot = m.cellPaddingInline ?? ss, U = m.minHeight ?? 500, { showColumnBorder: me, hideRowBorder: ke, rowHoverable: ct, ...c } = De(Et), [it, ee] = G(!1), [T, ut] = G([]);
81
- Je(() => {
79
+ var _e, le, Ge, Ie, Re;
80
+ const { token: S } = ns.useToken(), ke = v([]), { Table: y } = S, Se = y.tableSpaceBetweenPage ?? 10, it = y.cellPaddingInline ?? ls, U = y.minHeight ?? 500, { showColumnBorder: me, hideRowBorder: We, rowHoverable: ut, ...c } = Je(Ft), [at, A] = V(!1), [T, dt] = V([]), [F, be] = V({ y: 0, fullscreen: !1 });
81
+ Qe(() => {
82
82
  let e = [...z ?? []];
83
- (x == null ? void 0 : x.page) !== 1 && (e = [...T, ...e]), ut(e);
83
+ (x == null ? void 0 : x.page) !== 1 && (e = [...T, ...e]), dt(e);
84
84
  }, [g ? z : 0]);
85
- const We = h(() => !!(T != null && T.length) && (T == null ? void 0 : T.length) >= M, [T, M]), [te, at] = G([]), [dt, Be] = G(!1), ht = async (e, s) => {
86
- var l, o, b;
85
+ const Be = m(() => !!(T != null && T.length) && (T == null ? void 0 : T.length) >= M, [T, M]), [ee, ft] = V([]), [ht, He] = V(!1), mt = async (e, s) => {
86
+ var l, o, a;
87
87
  let t, n = !1;
88
- if (typeof d == "function")
89
- t = (l = d == null ? void 0 : d(e, s)) == null ? void 0 : l.filter(
90
- (y) => y.type !== "divider"
88
+ if (typeof h == "function")
89
+ t = (l = h == null ? void 0 : h(e, s)) == null ? void 0 : l.filter(
90
+ (d) => d.type !== "divider"
91
91
  );
92
- else if (t = (o = d == null ? void 0 : d.custom) == null ? void 0 : o.call(d, e, s), d != null && d.request) {
93
- Be(!0), ee(!0), n = !0;
92
+ else if (t = (o = h == null ? void 0 : h.custom) == null ? void 0 : o.call(h, e, s), h != null && h.request) {
93
+ He(!0), A(!0), n = !0;
94
94
  try {
95
- const y = await (d == null ? void 0 : d.request(e, s));
96
- (b = d.fieldsName) != null && b.label ? t = y == null ? void 0 : y.map((w) => {
97
- var S;
95
+ const d = await (h == null ? void 0 : h.request(e, s));
96
+ (a = h.fieldsName) != null && a.label ? t = d == null ? void 0 : d.map((w) => {
97
+ var W;
98
98
  return {
99
99
  ...w,
100
- label: w == null ? void 0 : w[((S = d.fieldsName) == null ? void 0 : S.label) ?? "label"]
100
+ label: w == null ? void 0 : w[((W = h.fieldsName) == null ? void 0 : W.label) ?? "label"]
101
101
  };
102
- }) : t = y ?? [];
102
+ }) : t = d ?? [];
103
103
  } finally {
104
- Be(!1);
104
+ He(!1);
105
105
  }
106
106
  }
107
- t != null && t.length && (at(t), n || ee(!0));
108
- }, Se = () => {
109
- ee(!1);
110
- }, ft = (e, s) => {
107
+ t != null && t.length && (ft(t), n || A(!0));
108
+ }, Me = () => {
109
+ A(!1);
110
+ }, bt = (e, s) => {
111
111
  var t, n;
112
- ee(!1), (t = e.onClick) == null || t.call(e), !(e != null && e.onClick) && typeof d != "function" && (d != null && d.onClick) && d.onClick((n = te == null ? void 0 : te[s]) == null ? void 0 : n.key);
113
- }, D = O(null), He = O(null), i = O(null), $ = O(null), X = O(null), mt = (...e) => {
114
- Ue(D), he == null || he(...e);
115
- }, bt = (...e) => {
116
- Ue(D), I == null || I(...e);
117
- }, se = h(() => !(f != null && f.auto) && F, [f == null ? void 0 : f.auto, F]), yt = () => {
112
+ A(!1), (t = e.onClick) == null || t.call(e), !(e != null && e.onClick) && typeof h != "function" && (h != null && h.onClick) && h.onClick((n = ee == null ? void 0 : ee[s]) == null ? void 0 : n.key);
113
+ }, ye = v(null), Pe = v(null), i = v(null), q = v(null), X = v(null), yt = (...e) => {
114
+ Ze(ye), fe == null || fe(...e);
115
+ }, Ct = (...e) => {
116
+ Ze(ye), R == null || R(...e);
117
+ }, te = m(() => !(b != null && b.auto) && p, [b == null ? void 0 : b.auto, p]), xt = () => {
118
118
  var t;
119
- const e = ds(
119
+ const e = ms(
120
120
  "& > .bitzTableContainerBody > .ant-table-wrapper.bitzTable > .ant-spin-nested-loading > .ant-spin-container > .ant-table > .ant-table-container > .ant-table-tbody > table > .ant-table-tbody > tr:not(.ant-table-measure-row, .ant-table-expanded-row)",
121
121
  (t = i.current) == null ? void 0 : t.querySelectorAll
122
122
  ), s = [];
123
123
  if (e == null || e.forEach((n) => {
124
124
  var l;
125
125
  s.push(
126
- ((l = hs("& > .operationCol .actionGroup", n.querySelector)) == null ? void 0 : l.clientWidth) || 0
126
+ ((l = bs("& > .operationCol .actionGroup", n.querySelector)) == null ? void 0 : l.clientWidth) || 0
127
127
  );
128
128
  }), s.length)
129
129
  return Math.ceil(Math.max(...s));
130
- }, Ct = () => {
131
- var l, o, b, y;
130
+ }, wt = () => {
131
+ var l, o, a, d;
132
132
  let e = (l = i.current) == null ? void 0 : l.querySelector(
133
133
  ".ant-table-content"
134
134
  );
@@ -136,39 +136,44 @@ function Cs({
136
136
  ".ant-table-tbody"
137
137
  ));
138
138
  let s = 0, t = !1, n = 0;
139
- return e && (s = e.clientWidth - (me ? 1 : 0), t = e.offsetWidth - e.clientWidth > 0, n = (y = (b = i.current) == null ? void 0 : b.querySelector(
139
+ return e && (s = e.clientWidth - (me ? 1 : 0), t = e.offsetWidth - e.clientWidth > 0, n = (d = (a = i.current) == null ? void 0 : a.querySelector(
140
140
  ".ant-table-cell-scrollbar"
141
- )) == null ? void 0 : y.offsetWidth), { hasScrollBar: t, scrollbarSize: n, tbodyWidth: s };
142
- }, re = h(() => a ? ze.current : (ze.current = z, z), [a, z]), { hasScrollBar: v, scrollbarSize: q, tbodyWidth: ne } = h(() => Ct(), [re, c.fullscreen]), be = h(() => {
143
- var S, _, B, E, p, Q, K, N, A, oe, Ie;
144
- if (typeof H > "u" || ms((S = i == null ? void 0 : i.current) == null ? void 0 : S.clientHeight))
141
+ )) == null ? void 0 : d.offsetWidth), { hasScrollBar: t, scrollbarSize: n, tbodyWidth: s };
142
+ }, se = m(() => f ? ke.current : (ke.current = z, z), [f, z]), { hasScrollBar: _, scrollbarSize: L, tbodyWidth: re } = m(() => wt(), [se, c.fullscreen]), Ce = m(() => {
143
+ var W, B, K, E, G, oe, O, N, I, De;
144
+ if (typeof H > "u" || Cs((W = i == null ? void 0 : i.current) == null ? void 0 : W.clientHeight))
145
145
  return;
146
- (_ = i == null ? void 0 : i.current) == null || _.clientHeight;
147
- const e = ((p = (E = (B = i == null ? void 0 : i.current) == null ? void 0 : B.querySelector) == null ? void 0 : E.call(B, ".ant-table-header")) == null ? void 0 : p.clientHeight) ?? 50, s = ((N = (K = (Q = i == null ? void 0 : i.current) == null ? void 0 : Q.querySelector) == null ? void 0 : K.call(Q, ".bitzTablePagination")) == null ? void 0 : N.clientHeight) ?? 30;
146
+ if (!F.fullscreen && F.y)
147
+ return F.y;
148
+ const e = ((E = (K = (B = i == null ? void 0 : i.current) == null ? void 0 : B.querySelector) == null ? void 0 : K.call(B, ".ant-table-header")) == null ? void 0 : E.clientHeight) ?? 50, s = ((O = (oe = (G = i == null ? void 0 : i.current) == null ? void 0 : G.querySelector) == null ? void 0 : oe.call(G, ".bitzTablePagination")) == null ? void 0 : O.clientHeight) ?? 30;
148
149
  let t = 40;
149
150
  if (i.current) {
150
- const Ye = window.getComputedStyle(i.current);
151
- parseInt(Ye.getPropertyValue("--cell-height")), t = parseInt(Ye.getPropertyValue("--toolbar-height"));
151
+ const It = window.getComputedStyle(i.current);
152
+ t = parseInt(It.getPropertyValue("--toolbar-height"));
152
153
  }
153
- const o = ((((A = X == null ? void 0 : X.current) == null ? void 0 : A.clientHeight) || 30 ? Ne : 0) || 10) + t + s + (e ?? 50), b = (Ie = (oe = i == null ? void 0 : i.current) == null ? void 0 : oe.querySelector) == null ? void 0 : Ie.call(
154
- oe,
154
+ const o = ((((N = X == null ? void 0 : X.current) == null ? void 0 : N.clientHeight) || 30 ? Se : 0) || 10) + t + s + (e ?? 50), a = (De = (I = i == null ? void 0 : i.current) == null ? void 0 : I.querySelector) == null ? void 0 : De.call(
155
+ I,
155
156
  ".ant-table-tbody"
156
- ), y = (H > U ? H : U) - o;
157
- if (!document.fullscreenElement && (b == null ? void 0 : b.clientHeight) > y)
158
- return b.style.maxHeight = `${y}px`, y;
157
+ ), d = (H > U ? H : U) - o, w = document.fullscreenElement;
158
+ if (setTimeout(() => {
159
+ if (!w && (a == null ? void 0 : a.clientHeight) > d)
160
+ return a.style.maxHeight = `${d}px`, be({ fullscreen: !1, y: d });
161
+ be({ fullscreen: !1, y: 0 });
162
+ }, 100), !w && (a == null ? void 0 : a.clientHeight) > d)
163
+ return a.style.maxHeight = `${d}px`, d;
159
164
  }, [
160
- (ve = i == null ? void 0 : i.current) == null ? void 0 : ve.clientHeight,
161
- // @ts-ignore
162
- (_e = D == null ? void 0 : D.current) == null ? void 0 : _e.clientHeight,
165
+ (_e = i == null ? void 0 : i.current) == null ? void 0 : _e.clientHeight,
166
+ (Ie = (Ge = (le = i == null ? void 0 : i.current) == null ? void 0 : le.querySelector) == null ? void 0 : Ge.call(le, ".ant-table-tbody")) == null ? void 0 : Ie.clientHeight,
163
167
  c.fullscreen,
164
168
  H,
165
169
  ue,
170
+ F,
166
171
  U,
167
172
  // paginationRect?.height,
168
- re,
173
+ se,
169
174
  // containerBodyRect?.height,
170
175
  c.tableSize
171
- ]), xt = () => {
176
+ ]), gt = () => {
172
177
  let e = 0;
173
178
  if (i.current) {
174
179
  const t = window.getComputedStyle(i.current), n = parseInt(
@@ -177,72 +182,73 @@ function Cs({
177
182
  e = parseInt(t.getPropertyValue("--fontSize")) + 4 + 2 * n;
178
183
  }
179
184
  let s = 0;
180
- return V && (s += e), k && (s += e), Y && (s += e), s;
181
- }, [L, wt] = G([]), [ye, gt] = G(0);
182
- Qe(() => {
183
- var y;
184
- const e = ae ?? [], s = (y = e.find((w) => w.isOperationCol)) == null ? void 0 : y.width, t = e.filter((w) => !pt.includes(w)), l = At(t, c.columnsMap).sort(Ft(c.columnsMap)), o = l.findIndex((w) => w.isOperationCol);
185
+ return Y && (s += e), k && (s += e), D && (s += e), s;
186
+ }, [$, Tt] = V([]), [xe, jt] = V(0);
187
+ Ue(() => {
188
+ var d;
189
+ const e = ae ?? [], s = (d = e.find((w) => w.isOperationCol)) == null ? void 0 : d.width, t = e.filter((w) => !es.includes(w)), l = ts(t, c.columnsMap).sort(ss(c.columnsMap)), o = l.findIndex((w) => w.isOperationCol);
185
190
  o >= 0 && (l[o].width = s);
186
- let b = 0;
187
- g || (b = xt()), wt(l), gt(b);
191
+ let a = 0;
192
+ g || (a = gt()), Tt(l), jt(a);
188
193
  }, [c.columnsMap, ae]);
189
- const [j, Tt] = G([]);
190
- Je(() => {
191
- if (se) {
192
- const e = L.map((s, t) => {
194
+ const [j, zt] = V([]);
195
+ Qe(() => {
196
+ if (te) {
197
+ const e = $.map((s, t) => {
193
198
  let n = s.width;
194
199
  if (s != null && s.isOperationCol && (s != null && s.useMaxWidth)) {
195
- const o = yt();
196
- o && (n = o + ot * 2);
200
+ const o = xt();
201
+ o && (n = o + it * 2);
197
202
  }
198
203
  return {
199
- key: es(s, t),
204
+ key: rs(s, t),
200
205
  width: n ?? 0
201
206
  };
202
207
  });
203
- Tt(e);
208
+ zt(e);
204
209
  }
205
- }, [L, se]);
206
- const jt = O(!1), zt = O(!1), le = h(() => {
210
+ }, [$, te]);
211
+ const Nt = v(!1), kt = v(!1), ne = m(() => {
207
212
  let e;
208
- if (typeof be == "number" && (e = be - 1), typeof (f == null ? void 0 : f.y) == "number" && (e = f.y - 2), f != null && f.auto)
213
+ if (typeof Ce == "number" && (e = Ce - 1), typeof (b == null ? void 0 : b.y) == "number" && (e = b.y - 2), b != null && b.auto)
209
214
  return {
210
215
  x: void 0,
211
216
  y: e
212
217
  };
213
- let s = f == null ? void 0 : f.x;
214
- return F && j.length && (s = j.reduce((l, o) => l + o.width, 0) + ye, ne && s < ne - (v ? q : 0) && (jt.current = !0, s = ne)), f != null && f.y ? { x: s, y: f.y } : { x: s, y: e };
218
+ let s = b == null ? void 0 : b.x;
219
+ return p && j.length && (s = j.reduce((l, o) => l + o.width, 0) + xe, re && s < re - (_ ? L : 0) && (Nt.current = !0, s = re)), b != null && b.y ? { x: s, y: b.y } : { x: s, y: e };
215
220
  }, [
216
- f,
217
- be,
218
- F,
221
+ b,
222
+ Ce,
223
+ p,
219
224
  j,
220
- ye,
225
+ xe,
221
226
  me,
222
- v,
223
- q
224
- ]), Nt = h(() => {
227
+ _,
228
+ L
229
+ ]), St = m(() => {
225
230
  var e, s, t;
226
231
  if (c.fullscreen) {
227
232
  const n = document.body.clientHeight, l = (e = document.fullscreenElement) != null && e.classList.contains(
228
233
  "bz-fullscreen"
229
- ) ? 50 : 0, o = 130, b = (t = (s = document.fullscreenElement) == null ? void 0 : s.querySelector) == null ? void 0 : t.call(
234
+ ) ? 50 : 0, o = 130, a = (t = (s = document.fullscreenElement) == null ? void 0 : s.querySelector) == null ? void 0 : t.call(
230
235
  s,
231
236
  ".ant-table-tbody"
232
- ), y = n - o - l;
233
- if ((b == null ? void 0 : b.clientHeight) > y)
234
- return { y };
237
+ ), d = n - o - l;
238
+ if ((a == null ? void 0 : a.clientHeight) > d)
239
+ return { y: d };
240
+ be({ fullscreen: !0, y: 0 });
235
241
  }
236
- }, [c.fullscreen]), Z = h(() => {
242
+ }, [c.fullscreen]), Z = m(() => {
237
243
  if (g)
238
- return L;
239
- const e = L.length - 1, s = L.map((t, n) => {
244
+ return $;
245
+ const e = $.length - 1, s = $.map((t, n) => {
240
246
  var l;
241
247
  return {
242
248
  ...t,
243
249
  ...typeof t.title == "string" && {
244
250
  title: /* @__PURE__ */ r.jsx(
245
- xe.Paragraph,
251
+ ge.Paragraph,
246
252
  {
247
253
  className: "bitzTableTitle",
248
254
  ellipsis: { rows: 2 },
@@ -254,64 +260,64 @@ function Cs({
254
260
  className: ie(t.className, "lastColumn")
255
261
  },
256
262
  width: j.length ? (l = j[n]) == null ? void 0 : l.width : (t == null ? void 0 : t.width) || void 0,
257
- ...le.x !== void 0 ? {
263
+ ...ne.x !== void 0 ? {
258
264
  onHeaderCell: (o) => {
259
- var b;
265
+ var a;
260
266
  return {
261
- ...(b = t.onHeaderCell) == null ? void 0 : b.call(t),
267
+ ...(a = t.onHeaderCell) == null ? void 0 : a.call(t),
262
268
  width: o.width,
263
- stretchref: He,
264
- datagridref: $,
265
- onResize: kt(n)
269
+ stretchref: Pe,
270
+ datagridref: q,
271
+ onResize: Wt(n)
266
272
  };
267
273
  }
268
274
  } : {},
269
275
  ...!(t != null && t.render) && t.copyable ? {
270
- render: (o) => ["number", "bigint"].includes(typeof o) ? o : /* @__PURE__ */ r.jsx(as, { value: o })
276
+ render: (o) => ["number", "bigint"].includes(typeof o) ? o : /* @__PURE__ */ r.jsx(hs, { value: o })
271
277
  } : {}
272
278
  };
273
279
  });
274
- return ls(
280
+ return is(
275
281
  ae,
276
282
  s,
277
- Y,
278
- !!V,
283
+ D,
284
+ !!Y,
279
285
  !!k
280
286
  );
281
- }, [L, j]), kt = (e) => (s, { size: t, minWidth: n }) => {
287
+ }, [$, j]), Wt = (e) => (s, { size: t, minWidth: n }) => {
282
288
  const o = (t.width > n ? t.width : n) - j[e].width;
283
289
  if (o === 0)
284
290
  return;
285
- const y = j.reduce((K, N) => K + N.width, 0) + o + ye, S = ne - (v ? q : 0);
286
- let _ = "", B = -1, E = 0;
287
- if (o < 0 && y < S) {
288
- B = e + 1;
289
- const K = L.length - 1, N = L[K];
290
- (e === K - 1 && (N != null && N.isOperationCol) || e === K && !(N != null && N.isOperationCol)) && (B = e - 1);
291
- let A = 0;
292
- le.x > S && (A = le.x - S), _ = `${j[B].key}`, E = j[B].width - o - A;
291
+ const d = j.reduce((O, N) => O + N.width, 0) + o + xe, W = re - (_ ? L : 0);
292
+ let B = "", K = -1, E = 0;
293
+ if (o < 0 && d < W) {
294
+ K = e + 1;
295
+ const O = $.length - 1, N = $[O];
296
+ (e === O - 1 && (N != null && N.isOperationCol) || e === O && !(N != null && N.isOperationCol)) && (K = e - 1);
297
+ let I = 0;
298
+ ne.x > W && (I = ne.x - W), B = `${j[K].key}`, E = j[K].width - o - I;
293
299
  }
294
- const p = `${j[e].key}`, Q = {
300
+ const G = `${j[e].key}`, oe = {
295
301
  ...c.columnsMap,
296
- [p]: {
297
- ...c.columnsMap[p],
302
+ [G]: {
303
+ ...c.columnsMap[G],
298
304
  width: j[e].width + o
299
305
  },
300
- ..._ && B >= 0 && {
301
- [_]: {
302
- ...c.columnsMap[_],
306
+ ...B && K >= 0 && {
307
+ [B]: {
308
+ ...c.columnsMap[B],
303
309
  width: E
304
310
  }
305
311
  }
306
312
  };
307
- c.setColumnsMap(Q), zt.current = !0, c.persistenceType === "online" && c.persistenceKey && c.startAutoSaveCountdown();
308
- }, J = Z, { table: Ce, locale: Wt = ns } = De(bs), Bt = { ...Wt.Table }, St = ((Ge = Ce == null ? void 0 : Ce.expandable) == null ? void 0 : Ge.expandIcon) || (k == null ? void 0 : k.expandIcon) || rs(Bt), Me = h(() => {
313
+ c.setColumnsMap(oe), kt.current = !0, c.persistenceType === "online" && c.persistenceKey && c.startAutoSaveCountdown();
314
+ }, J = Z, { table: we, locale: Bt = cs } = Je(xs), Ht = { ...Bt.Table }, Mt = ((Re = we == null ? void 0 : we.expandable) == null ? void 0 : Re.expandIcon) || (k == null ? void 0 : k.expandIcon) || os(Ht), qe = m(() => {
309
315
  if (k)
310
316
  return {
311
317
  ...k,
312
318
  expandedRowRender: () => /* @__PURE__ */ r.jsx(r.Fragment, {}),
313
319
  expandIcon: (e) => {
314
- const s = St(e);
320
+ const s = Mt(e);
315
321
  return {
316
322
  ...s,
317
323
  props: {
@@ -319,57 +325,57 @@ function Cs({
319
325
  disabled: !0,
320
326
  style: {
321
327
  ...s.props.style,
322
- backgroundColor: W.colorBgContainerDisabled
328
+ backgroundColor: S.colorBgContainerDisabled
323
329
  }
324
330
  }
325
331
  };
326
332
  }
327
333
  };
328
- }, [k]), Ht = h(() => a ? Me : k, [a, k, Me]), Pe = h(() => {
329
- if (V)
334
+ }, [k]), Pt = m(() => f ? qe : k, [f, k, qe]), Le = m(() => {
335
+ if (Y)
330
336
  return {
331
- ...V,
337
+ ...Y,
332
338
  selectedRowKeys: [],
333
339
  getCheckboxProps: () => ({ disabled: !0 })
334
340
  };
335
- }, [V]), Mt = h(() => a ? Pe : V, [a, V, Pe]), $e = h(() => a ? "key" : u.rowKey, [a, u.rowKey]), qe = h(() => `${Te ?? c.stylesConfig.size}BitzTable`, [Te, c.stylesConfig.size]), Pt = ce(
341
+ }, [Y]), qt = m(() => f ? Le : Y, [f, Y, Le]), $e = m(() => f ? "key" : u.rowKey, [f, u.rowKey]), Ke = m(() => `${ze ?? c.stylesConfig.size}BitzTable`, [ze, c.stylesConfig.size]), Lt = ce(
336
342
  (e, s) => {
337
343
  var n;
338
- if (!u.onRow || a)
344
+ if (!u.onRow || f)
339
345
  return {};
340
346
  const t = (n = u.onRow) == null ? void 0 : n.call(u, e, s);
341
347
  return t.onClick && (t.className = "rowPointerCursor"), t;
342
348
  },
343
- [u.onRow, a]
344
- ), $t = h(() => ie(
349
+ [u.onRow, f]
350
+ ), $t = m(() => ie(
345
351
  "bitzTableContainer",
346
- { hideBorder: ke },
347
- { hasScrollBar: v },
352
+ { hideBorder: We },
353
+ { hasScrollBar: _ },
348
354
  { stickyTable: !!(u != null && u.sticky) },
349
- qe,
355
+ Ke,
350
356
  u.className
351
357
  ), [
352
358
  u.className,
353
- qe,
354
- v,
359
+ Ke,
360
+ _,
355
361
  c.fullscreen,
356
- ke,
362
+ We,
357
363
  u.sticky
358
- ]), qt = h(() => ({
359
- "--container-bgColor": W.colorBgContainer
360
- }), [W.colorBgContainer]), Lt = h(() => {
364
+ ]), Kt = m(() => ({
365
+ "--container-bgColor": S.colorBgContainer
366
+ }), [S.colorBgContainer]), Ot = m(() => {
361
367
  const e = ue ?? U;
362
368
  let s;
363
369
  H && (s = H >= e ? H : e);
364
370
  const t = c.fullscreen ? "100%" : s;
365
371
  let n;
366
- return (q ?? 0) > 0 && (n = q), os({
372
+ return (L ?? 0) > 0 && (n = L), us({
367
373
  height: t ?? "auto",
368
- token: W,
369
- evenRowBgColor: c.zebra ? m == null ? void 0 : m.evenRowBgColor : W.colorBgContainer,
370
- table: m,
371
- gap: Ne,
372
- borderColor: (m == null ? void 0 : m.borderColor) || W.colorBorderSecondary,
374
+ token: S,
375
+ evenRowBgColor: c.zebra ? y == null ? void 0 : y.evenRowBgColor : S.colorBgContainer,
376
+ table: y,
377
+ gap: Se,
378
+ borderColor: (y == null ? void 0 : y.borderColor) || S.colorBorderSecondary,
373
379
  scrollbarWidth: n,
374
380
  other: u.style
375
381
  });
@@ -379,10 +385,10 @@ function Cs({
379
385
  H,
380
386
  ue,
381
387
  U,
382
- m,
388
+ y,
383
389
  c == null ? void 0 : c.zebra,
384
- q
385
- ]), Kt = ce(
390
+ L
391
+ ]), vt = ce(
386
392
  (e, s, t) => {
387
393
  const n = s % 2 === 0 ? "oddRow" : "evenRow";
388
394
  if (u.rowClassName) {
@@ -392,13 +398,13 @@ function Cs({
392
398
  return n;
393
399
  },
394
400
  [u.rowClassName]
395
- ), Le = h(() => /* @__PURE__ */ r.jsx(
396
- Ut,
401
+ ), Oe = m(() => /* @__PURE__ */ r.jsx(
402
+ Et,
397
403
  {
398
- finished: We,
404
+ finished: Be,
399
405
  onLoad: async () => (
400
406
  // @ts-ignore
401
- !a && (I == null ? void 0 : I((x == null ? void 0 : x.page) + 1, x == null ? void 0 : x.size))
407
+ !f && (R == null ? void 0 : R((x == null ? void 0 : x.page) + 1, x == null ? void 0 : x.size))
402
408
  ),
403
409
  loadingText: "加载中...",
404
410
  finishedText: "没有更多了",
@@ -407,21 +413,21 @@ function Cs({
407
413
  "div",
408
414
  {
409
415
  className: "mobileList",
410
- style: { backgroundColor: m == null ? void 0 : m.mobileListBgColor },
416
+ style: { backgroundColor: y == null ? void 0 : y.mobileListBgColor },
411
417
  children: [
412
418
  T == null ? void 0 : T.map((e, s) => /* @__PURE__ */ r.jsx(
413
419
  "div",
414
420
  {
415
421
  className: "listItem",
416
- style: { backgroundColor: m == null ? void 0 : m.listItemBgColor },
417
- onClick: () => ht(e, s),
422
+ style: { backgroundColor: y == null ? void 0 : y.listItemBgColor },
423
+ onClick: () => mt(e, s),
418
424
  children: Z == null ? void 0 : Z.map((t, n) => {
419
425
  var l;
420
426
  return !(t != null && t.mobileHide) && /* @__PURE__ */ r.jsxs(
421
427
  "div",
422
428
  {
423
429
  className: "row",
424
- style: { color: W.colorText },
430
+ style: { color: S.colorText },
425
431
  children: [
426
432
  !t.mobileHideLabel && /* @__PURE__ */ r.jsxs("div", { className: "label", children: [
427
433
  `${t.title}`,
@@ -429,7 +435,7 @@ function Cs({
429
435
  ] }),
430
436
  /* @__PURE__ */ r.jsx("div", { className: "value", children: ((l = t == null ? void 0 : t.render) == null ? void 0 : l.call(
431
437
  t,
432
- ys(e, (t == null ? void 0 : t.dataIndex) || ""),
438
+ ws(e, (t == null ? void 0 : t.dataIndex) || ""),
433
439
  e,
434
440
  s
435
441
  )) || (e == null ? void 0 : e[t.dataIndex]) })
@@ -441,21 +447,21 @@ function Cs({
441
447
  },
442
448
  s
443
449
  )),
444
- Array.from({ length: we.mobile ?? 2 }).map((e, s) => /* @__PURE__ */ r.jsx(
450
+ Array.from({ length: Te.mobile ?? 2 }).map((e, s) => /* @__PURE__ */ r.jsx(
445
451
  "div",
446
452
  {
447
453
  className: "listItem",
448
454
  style: {
449
- display: a ? "block" : "none",
450
- backgroundColor: m == null ? void 0 : m.listItemBgColor
455
+ display: f ? "block" : "none",
456
+ backgroundColor: y == null ? void 0 : y.listItemBgColor
451
457
  },
452
458
  children: /* @__PURE__ */ r.jsx("div", { className: "row", children: de ? de() : /* @__PURE__ */ r.jsx(
453
- Gt,
459
+ Rt,
454
460
  {
455
461
  title: !1,
456
462
  paragraph: {
457
- rows: Ze,
458
- width: Ee
463
+ rows: pe,
464
+ width: Ae
459
465
  },
460
466
  active: !0
461
467
  }
@@ -468,21 +474,21 @@ function Cs({
468
474
  )
469
475
  }
470
476
  ), [
471
- g ? We : 0,
472
- g ? a : 0,
477
+ g ? Be : 0,
478
+ g ? f : 0,
473
479
  g ? x : 0,
474
- g ? m : 0,
480
+ g ? y : 0,
475
481
  g ? T : 0,
476
482
  g ? Z : 0,
477
- g ? we : 0,
483
+ g ? Te : 0,
478
484
  g ? de : 0
479
485
  ]);
480
- Qe(() => {
486
+ Ue(() => {
481
487
  c.setSelected(!!(C != null && C.num));
482
488
  }, [C]);
483
- const Ke = h(() => /* @__PURE__ */ r.jsxs("div", { className: "alert", children: [
489
+ const ve = m(() => /* @__PURE__ */ r.jsxs("div", { className: "alert", children: [
484
490
  /* @__PURE__ */ r.jsx(
485
- Re,
491
+ Xe,
486
492
  {
487
493
  highlightTag: "strong",
488
494
  keywords: `${M}`,
@@ -491,9 +497,9 @@ function Cs({
491
497
  }
492
498
  ),
493
499
  !!C && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
494
- /* @__PURE__ */ r.jsx(xe.Text, { className: "splitBorder", children: "/" }),
500
+ /* @__PURE__ */ r.jsx(ge.Text, { className: "splitBorder", children: "/" }),
495
501
  /* @__PURE__ */ r.jsx(
496
- Re,
502
+ Xe,
497
503
  {
498
504
  highlightTag: "strong",
499
505
  keywords: `${(C == null ? void 0 : C.num) ?? 0}`,
@@ -501,7 +507,7 @@ function Cs({
501
507
  }
502
508
  ),
503
509
  !!(C != null && C.num) && /* @__PURE__ */ r.jsx(
504
- xe.Link,
510
+ ge.Link,
505
511
  {
506
512
  className: "cleanSelected",
507
513
  onClick: C == null ? void 0 : C.onClear,
@@ -509,36 +515,36 @@ function Cs({
509
515
  }
510
516
  )
511
517
  ] })
512
- ] }), [M, C]), Ot = (e) => {
513
- a || fe == null || fe(e);
514
- }, Oe = ce(() => Y ? {
515
- row: (e) => cs({ ...e, loading: a == null ? void 0 : a.toString() })
516
- } : {}, [Y, Y ? a : !1]), Ve = ce(
518
+ ] }), [M, C]), Vt = (e) => {
519
+ f || he == null || he(e);
520
+ }, Ve = ce(() => D ? {
521
+ row: (e) => as({ ...e, loading: f == null ? void 0 : f.toString() })
522
+ } : {}, [D, D ? f : !1]), Ye = ce(
517
523
  (e) => {
518
- if (se)
519
- return us({ ...e, hasScrollBar: v, scrollbarSize: q });
524
+ if (te)
525
+ return fs({ ...e, hasScrollBar: _, scrollbarSize: L });
520
526
  const s = { ...e };
521
527
  return /* @__PURE__ */ r.jsx("th", { ...s });
522
528
  },
523
- [v, q, se, c.fullscreen]
524
- ), Vt = h(() => u != null && u.virtual ? {} : je ?? (x == null ? void 0 : x.size) > 10 ? { cell: fs } : {}, [je, u == null ? void 0 : u.virtual, z, x, c.fullscreen]), vt = h(() => ({
529
+ [_, L, te, c.fullscreen]
530
+ ), Yt = m(() => u != null && u.virtual ? {} : Ne ?? (x == null ? void 0 : x.size) > 10 ? { cell: ys } : {}, [Ne, u == null ? void 0 : u.virtual, z, x, c.fullscreen]), _t = m(() => ({
525
531
  ...P,
526
532
  header: {
527
533
  ...P == null ? void 0 : P.header,
528
- cell: Ve
534
+ cell: Ye
529
535
  },
530
536
  body: {
531
- ...Vt,
537
+ ...Yt,
532
538
  ...P == null ? void 0 : P.body,
533
- ...Oe()
539
+ ...Ve()
534
540
  }
535
- }), [P, Ve, Oe]), _t = h(() => {
541
+ }), [P, Ye, Ve]), Gt = m(() => {
536
542
  var e;
537
- if ((J == null ? void 0 : J.length) > 5 && ($ != null && $.current)) {
543
+ if ((J == null ? void 0 : J.length) > 5 && (q != null && q.current)) {
538
544
  const s = J.reduce(
539
545
  (n, l) => (l.fixed && (n += l.width), n),
540
546
  0
541
- ), t = (e = $ == null ? void 0 : $.current) == null ? void 0 : e.clientWidth;
547
+ ), t = (e = q == null ? void 0 : q.current) == null ? void 0 : e.clientWidth;
542
548
  return s > t - 300;
543
549
  }
544
550
  return !1;
@@ -549,37 +555,37 @@ function Cs({
549
555
  className: ie("bitzTableBlock", {
550
556
  fullscreen: c.fullscreen
551
557
  }),
552
- style: qt,
553
- ...Xe,
558
+ style: Kt,
559
+ ...Ee,
554
560
  children: [
555
- !g && /* @__PURE__ */ r.jsxs("div", { ref: i, className: $t, style: Lt, children: [
556
- /* @__PURE__ */ r.jsxs("div", { className: "bitzTableContainerBody", ref: $, children: [
557
- tt && /* @__PURE__ */ r.jsxs("div", { className: "bitzTableToolbarBlock", children: [
558
- st || /* @__PURE__ */ r.jsx("div", {}),
559
- rt,
560
- nt
561
+ !g && /* @__PURE__ */ r.jsxs("div", { ref: i, className: $t, style: Ot, children: [
562
+ /* @__PURE__ */ r.jsxs("div", { className: "bitzTableContainerBody", ref: q, children: [
563
+ rt && /* @__PURE__ */ r.jsxs("div", { className: "bitzTableToolbarBlock", children: [
564
+ nt || /* @__PURE__ */ r.jsx("div", {}),
565
+ lt,
566
+ ot
561
567
  ] }),
562
568
  /* @__PURE__ */ r.jsx(
563
569
  "div",
564
570
  {
565
571
  className: "stretchLine",
566
- ref: He,
572
+ ref: Pe,
567
573
  style: {
568
- background: W.colorPrimary,
574
+ background: S.colorPrimary,
569
575
  bottom: 0
570
576
  }
571
577
  }
572
578
  ),
573
579
  /* @__PURE__ */ r.jsxs(
574
- is,
580
+ ds,
575
581
  {
576
- enabledRowDragSort: Y,
577
- dataSource: re,
582
+ enabledRowDragSort: D,
583
+ dataSource: se,
578
584
  mergeRowKey: $e,
579
- onDragEnd: Ot,
585
+ onDragEnd: Vt,
580
586
  children: [
581
- _t && /* @__PURE__ */ r.jsx(
582
- It,
587
+ Gt && /* @__PURE__ */ r.jsx(
588
+ Dt,
583
589
  {
584
590
  closable: !0,
585
591
  type: "error",
@@ -587,85 +593,85 @@ function Cs({
587
593
  }
588
594
  ),
589
595
  /* @__PURE__ */ r.jsx(
590
- Yt,
596
+ Jt,
591
597
  {
592
598
  ...u,
593
599
  bordered: me,
594
600
  columns: J,
595
- dataSource: re,
596
- loading: a,
601
+ dataSource: se,
602
+ loading: f,
597
603
  pagination: !1,
598
- scroll: { ...le, ...Nt },
599
- expandable: Ht,
600
- rowSelection: Mt,
601
- onRow: Pt,
602
- rowHoverable: ct,
603
- rowClassName: Kt,
604
+ scroll: { ...ne, ...St },
605
+ expandable: Pt,
606
+ rowSelection: qt,
607
+ onRow: Lt,
608
+ rowHoverable: ut,
609
+ rowClassName: vt,
604
610
  className: "bitzTable",
605
- components: vt,
611
+ components: _t,
606
612
  rowKey: $e,
607
- onChange: mt,
608
- ref: D
613
+ onChange: yt,
614
+ ref: ye
609
615
  }
610
616
  )
611
617
  ]
612
618
  }
613
619
  )
614
620
  ] }),
615
- R && !!M && /* @__PURE__ */ r.jsxs("div", { className: "bitzTablePagination", ref: X, children: [
616
- Ke,
621
+ Q && !!M && /* @__PURE__ */ r.jsxs("div", { className: "bitzTablePagination", ref: X, children: [
622
+ ve,
617
623
  /* @__PURE__ */ r.jsx(
618
- Qt,
624
+ Xt,
619
625
  {
620
626
  size: "small",
621
- enableControl: pe,
627
+ enableControl: Fe,
622
628
  pagination: x,
623
629
  total: M,
624
630
  dataSource: z,
625
- resetPage: lt,
631
+ resetPage: ct,
626
632
  hideTotalText: !0,
627
- paginationEmit: bt
633
+ paginationEmit: Ct
628
634
  }
629
635
  )
630
636
  ] }),
631
- !R && !!C && !!M && /* @__PURE__ */ r.jsx("div", { className: "bitzTablePagination", ref: X, children: Ke })
637
+ !Q && !!C && !!M && /* @__PURE__ */ r.jsx("div", { className: "bitzTablePagination", ref: X, children: ve })
632
638
  ] }),
633
639
  g && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
634
- (a || !!(z != null && z.length)) && /* @__PURE__ */ r.jsx(r.Fragment, { children: ge ? (
640
+ (f || !!(z != null && z.length)) && /* @__PURE__ */ r.jsx(r.Fragment, { children: je ? (
635
641
  // @ts-ignore
636
642
  /* @__PURE__ */ r.jsx(
637
- Xt,
643
+ pt,
638
644
  {
639
- onRefresh: async () => !a && ge(),
640
- children: Le
645
+ onRefresh: async () => !f && je(),
646
+ children: Oe
641
647
  }
642
648
  )
643
- ) : Le }),
644
- !a && /* @__PURE__ */ r.jsx(Rt, { data: z, title: Fe, img: et }),
649
+ ) : Oe }),
650
+ !f && /* @__PURE__ */ r.jsx(Zt, { data: z, title: tt, img: st }),
645
651
  /* @__PURE__ */ r.jsx(
646
- Jt,
652
+ Ut,
647
653
  {
648
654
  className: "tableMobileDrawer",
649
- open: it,
655
+ open: at,
650
656
  placement: "bottom",
651
657
  height: "auto",
652
658
  closable: !1,
653
- onClose: Se,
659
+ onClose: Me,
654
660
  children: /* @__PURE__ */ r.jsxs("div", { className: "drawerBox", children: [
655
- /* @__PURE__ */ r.jsx("div", { className: "boxBody", children: dt ? /* @__PURE__ */ r.jsx("div", { className: "operaList", children: /* @__PURE__ */ r.jsx(Dt, {}) }) : te.map((e, s) => /* @__PURE__ */ r.jsx(
661
+ /* @__PURE__ */ r.jsx("div", { className: "boxBody", children: ht ? /* @__PURE__ */ r.jsx("div", { className: "operaList", children: /* @__PURE__ */ r.jsx(Qt, {}) }) : ee.map((e, s) => /* @__PURE__ */ r.jsx(
656
662
  "div",
657
663
  {
658
664
  className: "operaList",
659
- onClick: () => ft(e, s),
665
+ onClick: () => bt(e, s),
660
666
  ...e.danger && {
661
- style: { color: W.colorError }
667
+ style: { color: S.colorError }
662
668
  },
663
669
  children: e.label
664
670
  },
665
671
  s
666
672
  )) }),
667
673
  /* @__PURE__ */ r.jsx("div", { className: "boxLine" }),
668
- /* @__PURE__ */ r.jsx("div", { className: "boxFooter", onClick: Se, children: Ae })
674
+ /* @__PURE__ */ r.jsx("div", { className: "boxFooter", onClick: Me, children: et })
669
675
  ] })
670
676
  }
671
677
  )
@@ -674,7 +680,7 @@ function Cs({
674
680
  }
675
681
  );
676
682
  }
677
- const Es = (R) => /* @__PURE__ */ r.jsx(Zt, { initValue: R, children: /* @__PURE__ */ r.jsx(Cs, { ...R }) });
683
+ const Fs = (Q) => /* @__PURE__ */ r.jsx(At, { initValue: Q, children: /* @__PURE__ */ r.jsx(gs, { ...Q }) });
678
684
  export {
679
- Es as default
685
+ Fs as default
680
686
  };