bitz-react-admin-ui 2.4.4 → 2.4.6

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