bitz-react-admin-ui 2.4.2 → 2.4.4

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