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