bitz-react-admin-ui 2.4.7 → 2.4.9

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