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