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