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