bitz-react-admin-ui 2.6.9 → 2.7.0

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