bitz-react-admin-ui 2.2.6 → 2.2.7

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