bitz-react-admin-ui 2.5.2 → 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,317 +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: c,
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: d } = 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
- } = d, { showColumnBorder: K, hideRowBorder: fe, rowHoverable: Ye, ...i } = 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: (i.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
- i.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
- i.columnsMap,
172
- i.finish
173
- ).sort(Tt(i.columnsMap));
174
- let n = 0;
175
- return u || (n = Fe()), { sortColumns: o, toolColWidth: n };
176
- }, [i.columnsMap, i.finish, X]), [M, Ce] = P([]), [xe, et] = P(!1);
177
- ne(() => {
178
- if (!(l != null && l.auto) && z && !xe && !i.finish) {
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
190
  }, [
186
- $,
191
+ q,
187
192
  l == null ? void 0 : l.auto,
188
- z,
189
- xe,
190
- i.finish
193
+ S,
194
+ we,
195
+ f.finish
191
196
  ]);
192
- const [ge, tt] = P(0), st = h(() => {
193
- if (!(l != null && l.auto) && z)
197
+ const [je, ut] = R(0), dt = c(() => {
198
+ if (!(l != null && l.auto) && S)
194
199
  return {
195
- width: ge ?? "auto",
200
+ width: je ?? "auto",
196
201
  maxWidth: "100%"
197
202
  };
198
- }, [l == null ? void 0 : l.auto, z, ge]), we = h(() => {
203
+ }, [l == null ? void 0 : l.auto, S, je]), Be = c(() => {
199
204
  let e;
200
- 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)
201
206
  return {
202
207
  x: void 0,
203
208
  y: e
204
209
  };
205
- let s = l == null ? void 0 : l.x;
206
- if (z) {
207
- s = M.reduce((n, y) => n + y, 0), s += ye;
208
- const t = K ? 1 : 0, o = W ? +k : 0;
209
- 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);
210
215
  }
211
- 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 };
212
217
  }, [
213
218
  l,
214
- re,
215
- z,
219
+ ne,
220
+ S,
216
221
  M,
217
- ye,
218
- K,
222
+ Ce,
223
+ Y,
219
224
  W,
220
- k
221
- ]), q = h(() => {
222
- if (u)
223
- return $;
224
- const e = $.length - 1, s = $.map((t, o) => ({
225
- ...t,
226
- ...e === o && {
227
- 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")
228
233
  },
229
- width: M.length ? M[o] : (t == null ? void 0 : t.width) || void 0,
230
- ...we.x !== void 0 ? {
231
- onHeaderCell: (n) => ({
232
- width: n.width,
233
- stretchref: me,
234
- datagridref: ee,
235
- 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)
236
241
  })
237
242
  } : {},
238
- ...!(t != null && t.render) && t.copyable ? {
239
- 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 })
240
245
  } : {}
241
246
  }));
242
- return Wt(
247
+ return Yt(
243
248
  X,
244
- s,
245
- L,
246
- !!p,
247
- !!I
249
+ t,
250
+ v,
251
+ !!L,
252
+ !!w
248
253
  );
249
- }, [$, M]), rt = (e) => (s, { size: t, minWidth: o }) => {
250
- const n = [...M], g = (t.width > o ? t.width : o) - M[e];
251
- n[e] = M[e] + g, et(!0), Ce(n);
252
- }, je = h(() => `${ce ?? i.stylesConfig.size}BitzTable`, [ce, i.stylesConfig.size]), ot = Q(
253
- (e, s) => {
254
- var o;
255
- const t = (o = f.onRow) == null ? void 0 : o.call(f, e, s);
256
- 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;
257
296
  },
258
- [f.onRow]
259
- ), nt = h(() => U(
297
+ [h.onRow, a]
298
+ ), jt = c(() => U(
260
299
  "bitzTableContainer",
261
- { hideBorder: fe },
300
+ { hideBorder: de },
262
301
  { hasScrollBar: W },
263
- je,
264
- f.className
302
+ Pe,
303
+ h.className
265
304
  ), [
266
- f.className,
267
- je,
305
+ h.className,
306
+ Pe,
268
307
  W,
269
- i.fullscreen,
270
- fe
271
- ]), lt = h(() => ({
272
- "--container-bgColor": j.colorBgContainer
273
- }), [j.colorBgContainer]), at = h(() => {
274
- const e = _ ?? G;
275
- let s;
276
- N && (s = N >= e ? N : e);
277
- const t = i.fullscreen ? "100%" : s;
278
- let o;
279
- return (k ?? 0) > 0 && (o = k), kt({
280
- height: t ?? "auto",
281
- token: j,
282
- evenRowBgColor: i.zebra ? d == null ? void 0 : d.evenRowBgColor : j.colorBgContainer,
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,
283
322
  table: d,
284
- gap: de,
285
- borderColor: (d == null ? void 0 : d.borderColor) || j.colorBorderSecondary,
286
- scrollbarWidth: o,
287
- other: f.style
323
+ gap: ue,
324
+ borderColor: (d == null ? void 0 : d.borderColor) || g.colorBorderSecondary,
325
+ scrollbarWidth: n,
326
+ other: h.style
288
327
  });
289
328
  }, [
290
- f.style,
291
- i.fullscreen,
329
+ h.style,
330
+ f.fullscreen,
292
331
  N,
293
- _,
332
+ O,
294
333
  G,
295
334
  d,
296
- i == null ? void 0 : i.zebra,
297
- k
298
- ]), it = Q(
299
- (e, s, t) => {
300
- const o = s % 2 === 0 ? "oddRow" : "evenRow";
301
- if (f.rowClassName) {
302
- const n = f.rowClassName(e, s, t);
303
- return U(o, n);
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);
304
343
  }
305
- return o;
344
+ return n;
306
345
  },
307
- [f.rowClassName]
308
- ), Be = h(() => /* @__PURE__ */ r.jsx(
309
- xt,
346
+ [h.rowClassName]
347
+ ), Me = c(() => /* @__PURE__ */ r.jsx(
348
+ Rt,
310
349
  {
311
350
  finished: he,
312
351
  onLoad: async () => (
313
352
  // @ts-ignore
314
- !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))
315
354
  ),
316
355
  loadingText: "加载中...",
317
356
  finishedText: "没有更多了",
@@ -322,244 +361,245 @@ function $t({
322
361
  className: "mobileList",
323
362
  style: { backgroundColor: d == null ? void 0 : d.mobileListBgColor },
324
363
  children: [
325
- m == null ? void 0 : m.map((e, s) => /* @__PURE__ */ r.jsx(
364
+ m == null ? void 0 : m.map((e, t) => /* @__PURE__ */ r.jsx(
326
365
  "div",
327
366
  {
328
367
  className: "listItem",
329
368
  style: { backgroundColor: d == null ? void 0 : d.listItemBgColor },
330
- onClick: () => Ze(e, s),
331
- children: q == null ? void 0 : q.map((t, o) => {
332
- var n;
333
- return !(t != null && t.mobileHide) && /* @__PURE__ */ r.jsxs(
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(
334
373
  "div",
335
374
  {
336
375
  className: "row",
337
- style: { color: j.colorText },
376
+ style: { color: g.colorText },
338
377
  children: [
339
- !t.mobileHideLabel && /* @__PURE__ */ r.jsxs("div", { className: "label", children: [
340
- `${t.title}`,
378
+ !s.mobileHideLabel && /* @__PURE__ */ r.jsxs("div", { className: "label", children: [
379
+ `${s.title}`,
341
380
  ":"
342
381
  ] }),
343
- /* @__PURE__ */ r.jsx("div", { className: "value", children: ((n = t == null ? void 0 : t.render) == null ? void 0 : n.call(
344
- t,
345
- 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) || ""),
346
385
  e,
347
- s
348
- )) || (e == null ? void 0 : e[t.dataIndex]) })
386
+ t
387
+ )) || (e == null ? void 0 : e[s.dataIndex]) })
349
388
  ]
350
389
  },
351
- o
390
+ n
352
391
  );
353
392
  })
354
393
  },
355
- s
394
+ t
356
395
  )),
357
- Array.from({ length: ae.mobile ?? 2 }).map((e, s) => /* @__PURE__ */ r.jsx(
396
+ Array.from({ length: _.mobile ?? 2 }).map((e, t) => /* @__PURE__ */ r.jsx(
358
397
  "div",
359
398
  {
360
399
  className: "listItem",
361
400
  style: {
362
- display: b ? "block" : "none",
401
+ display: a ? "block" : "none",
363
402
  backgroundColor: d == null ? void 0 : d.listItemBgColor
364
403
  },
365
404
  children: /* @__PURE__ */ r.jsx("div", { className: "row", children: Z ? Z() : /* @__PURE__ */ r.jsx(
366
- ht,
405
+ kt,
367
406
  {
368
407
  title: !1,
369
408
  paragraph: {
370
- rows: Pe,
371
- width: He
409
+ rows: Ke,
410
+ width: Oe
372
411
  },
373
412
  active: !0
374
413
  }
375
414
  ) })
376
415
  },
377
- `${Date.now()}${s}`
416
+ `${Date.now()}${t}`
378
417
  ))
379
418
  ]
380
419
  }
381
420
  )
382
421
  }
383
422
  ), [
384
- u ? he : 0,
385
- u ? b : 0,
386
- u ? C : 0,
387
- u ? d : 0,
388
- u ? m : 0,
389
- u ? q : 0,
390
- u ? ae : 0,
391
- 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
392
431
  ]);
393
- ne(() => {
394
- i.setSelected(!!(c != null && c.num));
395
- }, [c]);
396
- 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: [
397
436
  /* @__PURE__ */ r.jsx(
398
- ke,
437
+ Ve,
399
438
  {
400
439
  highlightTag: "strong",
401
- keywords: `${T}`,
402
- sourceString: `共 ${T} 条`,
440
+ keywords: `${z}`,
441
+ sourceString: `共 ${z} 条`,
403
442
  tagClass: "totalText"
404
443
  }
405
444
  ),
406
- !!c && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
407
- /* @__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: "/" }),
408
447
  /* @__PURE__ */ r.jsx(
409
- ke,
448
+ Ve,
410
449
  {
411
450
  highlightTag: "strong",
412
- keywords: `${(c == null ? void 0 : c.num) ?? 0}`,
413
- sourceString: `已选中 ${(c == null ? void 0 : c.num) ?? 0} 条`
451
+ keywords: `${(u == null ? void 0 : u.num) ?? 0}`,
452
+ sourceString: `已选中 ${(u == null ? void 0 : u.num) ?? 0} 条`
414
453
  }
415
454
  ),
416
- !!(c != null && c.num) && /* @__PURE__ */ r.jsx(
417
- We.Link,
455
+ !!(u != null && u.num) && /* @__PURE__ */ r.jsx(
456
+ qe.Link,
418
457
  {
419
458
  className: "cleanSelected",
420
- onClick: c == null ? void 0 : c.onClear,
459
+ onClick: u == null ? void 0 : u.onClear,
421
460
  children: "取消选中"
422
461
  }
423
462
  )
424
463
  ] })
425
- ] }), [T, c]), ct = (e) => {
426
- b || E == null || E(e);
427
- }, Te = Q(() => L ? {
428
- row: (e) => Mt({ ...e, loading: b == null ? void 0 : b.toString() })
429
- } : {}, [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(
430
469
  (e) => {
431
- var o, n;
432
- if (!(l != null && l.auto) && z)
433
- return Ht({ ...e, hasScrollBar: W, scrollbarSize: k });
434
- const s = { ...e };
435
- 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(
436
475
  "ant-table-cell-fix-right"
437
- )) && !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 });
438
477
  },
439
- [W, k, l == null ? void 0 : l.auto, z]
440
- ), dt = h(() => ({
441
- ...S,
478
+ [W, P, l == null ? void 0 : l.auto, S]
479
+ ), St = c(() => ({
480
+ ...k,
442
481
  header: {
443
- ...S == null ? void 0 : S.header,
444
- cell: ze
482
+ ...k == null ? void 0 : k.header,
483
+ cell: Re
445
484
  },
446
485
  body: {
447
- ...S == null ? void 0 : S.body,
448
- ...Te()
486
+ ...k == null ? void 0 : k.body,
487
+ ...Le()
449
488
  }
450
- }), [S, ze, Te]);
489
+ }), [k, Re, Le]);
451
490
  return /* @__PURE__ */ r.jsxs(
452
491
  "div",
453
492
  {
454
493
  className: U("bitzTableBlock", {
455
- fullscreen: i.fullscreen
494
+ fullscreen: f.fullscreen
456
495
  }),
457
- style: lt,
496
+ style: Bt,
458
497
  children: [
459
- !u && /* @__PURE__ */ r.jsxs("div", { ref: x, className: nt, style: at, children: [
460
- /* @__PURE__ */ r.jsxs("div", { className: "bitzTableContainerBody", ref: ee, children: [
461
- qe && /* @__PURE__ */ r.jsxs("div", { className: "bitzTableToolbarBlock", children: [
462
- Ve || /* @__PURE__ */ r.jsx("div", {}),
463
- Oe,
464
- _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
465
504
  ] }),
466
505
  /* @__PURE__ */ r.jsx(
467
506
  "div",
468
507
  {
469
508
  className: "stretchLine",
470
- ref: me,
509
+ ref: ye,
471
510
  style: {
472
- background: j.colorPrimary,
511
+ background: g.colorPrimary,
473
512
  bottom: W ? "var(--scrollbar-width)" : 0
474
513
  }
475
514
  }
476
515
  ),
477
516
  /* @__PURE__ */ r.jsx(
478
- Pt,
517
+ Ut,
479
518
  {
480
- enabledRowDragSort: L,
481
- dataSource: w ?? [],
482
- mergeRowKey: f.rowKey,
483
- onDragEnd: ct,
519
+ enabledRowDragSort: v,
520
+ dataSource: ze,
521
+ mergeRowKey: We,
522
+ onDragEnd: zt,
484
523
  children: /* @__PURE__ */ r.jsx(
485
- ut,
524
+ Wt,
486
525
  {
487
- ...f,
488
- bordered: K,
489
- columns: q,
490
- dataSource: w,
491
- loading: b,
526
+ ...h,
527
+ bordered: Y,
528
+ columns: bt,
529
+ dataSource: ze,
530
+ loading: !1,
492
531
  pagination: !1,
493
- scroll: we,
494
- expandable: I,
495
- rowSelection: p,
496
- style: st,
497
- onRow: ot,
498
- rowHoverable: Ye,
499
- rowClassName: it,
532
+ scroll: Be,
533
+ expandable: xt,
534
+ rowSelection: wt,
535
+ style: dt,
536
+ onRow: gt,
537
+ rowHoverable: Ae,
538
+ rowClassName: Nt,
500
539
  className: "bitzTable",
501
- components: dt,
502
- onChange: Ee,
503
- ref: A
540
+ components: St,
541
+ rowKey: We,
542
+ onChange: ot,
543
+ ref: F
504
544
  }
505
545
  )
506
546
  }
507
547
  )
508
548
  ] }),
509
- v && !!T && /* @__PURE__ */ r.jsxs("div", { className: "bitzTablePagination", ref: se, children: [
510
- Ne,
549
+ D && !!z && /* @__PURE__ */ r.jsxs("div", { className: "bitzTablePagination", ref: re, children: [
550
+ He,
511
551
  /* @__PURE__ */ r.jsx(
512
- yt,
552
+ Ht,
513
553
  {
514
554
  size: "small",
515
- enableControl: Le,
516
- pagination: C,
517
- total: T,
518
- dataSource: w,
519
- resetPage: Ge,
555
+ enableControl: _e,
556
+ pagination: x,
557
+ total: z,
558
+ dataSource: C,
559
+ resetPage: Ze,
520
560
  hideTotalText: !0,
521
- paginationEmit: Ie
561
+ paginationEmit: lt
522
562
  }
523
563
  )
524
564
  ] }),
525
- !v && !!c && !!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 })
526
566
  ] }),
527
- u && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
528
- (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 ? (
529
569
  // @ts-ignore
530
570
  /* @__PURE__ */ r.jsx(
531
- gt,
571
+ $t,
532
572
  {
533
- onRefresh: async () => !b && ie(),
534
- children: Be
573
+ onRefresh: async () => !a && ce(),
574
+ children: Me
535
575
  }
536
576
  )
537
- ) : Be }),
538
- !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 }),
539
579
  /* @__PURE__ */ r.jsx(
540
- mt,
580
+ Mt,
541
581
  {
542
582
  className: "tableMobileDrawer",
543
- open: Je,
583
+ open: Fe,
544
584
  placement: "bottom",
545
585
  height: "auto",
546
586
  closable: !1,
547
- onClose: be,
587
+ onClose: me,
548
588
  children: /* @__PURE__ */ r.jsxs("div", { className: "drawerBox", children: [
549
- /* @__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(
550
590
  "div",
551
591
  {
552
592
  className: "operaList",
553
- onClick: () => De(e, s),
593
+ onClick: () => nt(e, t),
554
594
  ...e.danger && {
555
- style: { color: j.colorError }
595
+ style: { color: g.colorError }
556
596
  },
557
597
  children: e.label
558
598
  },
559
- s
599
+ t
560
600
  )) }),
561
601
  /* @__PURE__ */ r.jsx("div", { className: "boxLine" }),
562
- /* @__PURE__ */ r.jsx("div", { className: "boxFooter", onClick: be, children: Re })
602
+ /* @__PURE__ */ r.jsx("div", { className: "boxFooter", onClick: me, children: Ge })
563
603
  ] })
564
604
  }
565
605
  )
@@ -568,7 +608,7 @@ function $t({
568
608
  }
569
609
  );
570
610
  }
571
- 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 }) });
572
612
  export {
573
- ds as default
613
+ Rs as default
574
614
  };