bitz-react-admin-ui 2.5.1 → 2.5.3

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