bitz-react-admin-ui 2.4.3 → 2.4.5

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