bitz-react-admin-ui 2.2.0 → 2.2.1

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