bitz-react-admin-ui 2.5.1 → 2.5.2

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