bitz-react-admin-ui 2.2.4 → 2.2.6

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