bitz-react-admin-ui 2.4.7 → 2.4.8
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/components/BitzTable/Table/ResizableTitle copy.mjs +24 -24
- package/dist/components/BitzTable/Table/index.d.ts +26 -26
- package/dist/components/BitzTable/Table/index.mjs +206 -199
- package/dist/components/BitzTable/index.d.ts +3 -0
- package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +1 -1
- package/dist/components/BitzTableSelect/SingleSelect/index.mjs +50 -49
- package/dist/components/BitzTableSelect/TextBlock/index.mjs +4 -4
- package/dist/components/BitzTableSelect/index.d.ts +0 -1
- package/dist/components/BitzTableSelect/index.mjs +17 -19
- package/dist/components/BitzTableSelect/utils.d.ts +4 -0
- package/dist/components/BitzTableSelect/utils.mjs +5 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as r } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import { useContext as Ve, useState as S, useEffect as ue, useMemo as f, useRef as G, useCallback as E } from "react";
|
|
3
3
|
import { isMobile as A } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
|
|
4
4
|
import { Skeleton as Ht, Typography as Ke, Table as Pt, Spin as vt } from "antd";
|
|
@@ -26,16 +26,16 @@ import es from "./SortTableContext.mjs";
|
|
|
26
26
|
import ts from "./ResizableTitle copy.mjs";
|
|
27
27
|
import ss from "../TextOverflow/index.mjs";
|
|
28
28
|
import "./index.less.mjs";
|
|
29
|
-
import { ConfigContext as
|
|
30
|
-
import
|
|
29
|
+
import { ConfigContext as os } from "../../../node_modules/.store/antd@5.17.3/node_modules/antd/es/config-provider/context.mjs";
|
|
30
|
+
import rs from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
|
|
31
31
|
function ns({
|
|
32
32
|
showPagination: _ = !0,
|
|
33
|
-
height:
|
|
33
|
+
height: p,
|
|
34
34
|
minHeight: I,
|
|
35
35
|
dataSource: C,
|
|
36
|
-
total:
|
|
36
|
+
total: M = 0,
|
|
37
37
|
columns: ee,
|
|
38
|
-
loading:
|
|
38
|
+
loading: d,
|
|
39
39
|
skeletonNum: te = {
|
|
40
40
|
pc: 10,
|
|
41
41
|
mobile: 10
|
|
@@ -47,12 +47,12 @@ function ns({
|
|
|
47
47
|
mobileRefreshEmit: ye,
|
|
48
48
|
operationFilter: h,
|
|
49
49
|
enableControlPage: Je,
|
|
50
|
-
pagination:
|
|
50
|
+
pagination: W,
|
|
51
51
|
paginationEmit: V = () => {
|
|
52
52
|
},
|
|
53
53
|
onChange: se,
|
|
54
54
|
enabledRowDragSort: K,
|
|
55
|
-
onRowDragEnd:
|
|
55
|
+
onRowDragEnd: oe,
|
|
56
56
|
mobilePageHeight: ls = 500,
|
|
57
57
|
mobileCancelText: Qe = "取消",
|
|
58
58
|
noDataTitle: Ue,
|
|
@@ -63,170 +63,177 @@ function ns({
|
|
|
63
63
|
tableAction: Ze,
|
|
64
64
|
tableToolbar: Ee,
|
|
65
65
|
selectionBar: Ae,
|
|
66
|
-
scroll:
|
|
67
|
-
components:
|
|
68
|
-
expandable:
|
|
66
|
+
scroll: c,
|
|
67
|
+
components: L,
|
|
68
|
+
expandable: j,
|
|
69
69
|
rowSelection: H,
|
|
70
70
|
selectionAlert: u,
|
|
71
71
|
resetPage: Fe,
|
|
72
|
-
...
|
|
72
|
+
...x
|
|
73
73
|
}) {
|
|
74
74
|
var qe;
|
|
75
|
-
const { token:
|
|
75
|
+
const { token: z } = Qt.useToken(), { Table: m } = z, {
|
|
76
76
|
tableSpaceBetweenPage: Ce = 10,
|
|
77
77
|
minHeight: J = 500,
|
|
78
78
|
cellPaddingInline: et = Ut
|
|
79
|
-
} = m, { showColumnBorder: ge, hideRowBorder: we, rowHoverable: tt, ...
|
|
79
|
+
} = m, { showColumnBorder: ge, hideRowBorder: we, rowHoverable: tt, ...y } = Ve(_t), [P, st] = S(void 0), [re, ot] = S(0), [ne, rt] = S(0), [Q, nt] = S(0), [le, lt] = S(0), [it, U] = S(!1), [g, at] = S([]);
|
|
80
80
|
ue(() => {
|
|
81
81
|
let e = [...C ?? []];
|
|
82
|
-
(
|
|
82
|
+
(W == null ? void 0 : W.page) !== 1 && (e = [...g, ...e]), at(e);
|
|
83
83
|
}, [C]);
|
|
84
|
-
const ct = f(() => !!(g != null && g.length) && (g == null ? void 0 : g.length) >=
|
|
85
|
-
var l, n;
|
|
86
|
-
let t,
|
|
84
|
+
const ct = f(() => !!(g != null && g.length) && (g == null ? void 0 : g.length) >= M, [g, M]), [X, dt] = S([]), [ht, We] = S(!1), ft = async (e, s) => {
|
|
85
|
+
var l, n, a;
|
|
86
|
+
let t, o = !1;
|
|
87
87
|
if (typeof h == "function")
|
|
88
88
|
t = (l = h == null ? void 0 : h(e, s)) == null ? void 0 : l.filter(
|
|
89
89
|
(i) => i.type !== "divider"
|
|
90
90
|
);
|
|
91
91
|
else if (t = (n = h == null ? void 0 : h.custom) == null ? void 0 : n.call(h, e, s), h != null && h.request) {
|
|
92
|
-
We(!0), U(!0),
|
|
92
|
+
We(!0), U(!0), o = !0;
|
|
93
93
|
try {
|
|
94
|
-
|
|
94
|
+
const i = await (h == null ? void 0 : h.request(e, s));
|
|
95
|
+
(a = h.fieldsName) != null && a.label ? t = i == null ? void 0 : i.map((b) => {
|
|
96
|
+
var w;
|
|
97
|
+
return {
|
|
98
|
+
...b,
|
|
99
|
+
label: b == null ? void 0 : b[((w = h.fieldsName) == null ? void 0 : w.label) ?? "label"]
|
|
100
|
+
};
|
|
101
|
+
}) : t = i ?? [];
|
|
95
102
|
} finally {
|
|
96
103
|
We(!1);
|
|
97
104
|
}
|
|
98
105
|
}
|
|
99
|
-
t != null && t.length && (dt(t),
|
|
106
|
+
t != null && t.length && (dt(t), o || U(!0));
|
|
100
107
|
}, je = () => {
|
|
101
108
|
U(!1);
|
|
102
109
|
}, ut = (e, s) => {
|
|
103
|
-
var t,
|
|
104
|
-
U(!1), (t = e.onClick) == null || t.call(e), !(e != null && e.onClick) && typeof h != "function" && (h != null && h.onClick) && h.onClick((
|
|
105
|
-
}, ie = G(null), ze = G(null),
|
|
110
|
+
var t, o;
|
|
111
|
+
U(!1), (t = e.onClick) == null || t.call(e), !(e != null && e.onClick) && typeof h != "function" && (h != null && h.onClick) && h.onClick((o = X == null ? void 0 : X[s]) == null ? void 0 : o.key);
|
|
112
|
+
}, ie = G(null), ze = G(null), B = G(null), ae = me(B), ce = G(null), de = me(ce), he = G(null), D = me(he), mt = (...e) => {
|
|
106
113
|
_e(ie), se == null || se(...e);
|
|
107
114
|
}, bt = (...e) => {
|
|
108
115
|
_e(ie), V == null || V(...e);
|
|
109
116
|
}, yt = () => {
|
|
110
117
|
var t;
|
|
111
|
-
const e = (t =
|
|
118
|
+
const e = (t = B.current) == null ? void 0 : t.querySelectorAll(
|
|
112
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)"
|
|
113
120
|
), s = [];
|
|
114
|
-
if (e == null || e.forEach((
|
|
121
|
+
if (e == null || e.forEach((o) => {
|
|
115
122
|
var l;
|
|
116
123
|
s.push(
|
|
117
|
-
((l =
|
|
124
|
+
((l = o.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : l.clientWidth) || 0
|
|
118
125
|
);
|
|
119
126
|
}), s.length)
|
|
120
127
|
return Math.ceil(Math.max(...s)) + et * 2;
|
|
121
128
|
}, Be = () => {
|
|
122
|
-
var l, n,
|
|
123
|
-
let e = (l =
|
|
129
|
+
var l, n, a, i;
|
|
130
|
+
let e = (l = B.current) == null ? void 0 : l.querySelector(
|
|
124
131
|
".ant-table-content"
|
|
125
132
|
);
|
|
126
|
-
e || (e = (n =
|
|
133
|
+
e || (e = (n = B.current) == null ? void 0 : n.querySelector(
|
|
127
134
|
".ant-table-body"
|
|
128
135
|
));
|
|
129
|
-
let s = 0, t = !1,
|
|
130
|
-
return e && (s = e.clientWidth - (ge ? 1 : 0), t = e.offsetWidth - e.clientWidth > 0,
|
|
136
|
+
let s = 0, t = !1, o = 0;
|
|
137
|
+
return e && (s = e.clientWidth - (ge ? 1 : 0), t = e.offsetWidth - e.clientWidth > 0, o = (i = (a = B.current) == null ? void 0 : a.querySelector(
|
|
131
138
|
".ant-table-cell-scrollbar"
|
|
132
|
-
)) == null ? void 0 :
|
|
133
|
-
}, { y: Y, tbodyWidth:
|
|
139
|
+
)) == null ? void 0 : i.offsetWidth), { tbodyWidth: s, hasScrollBar: t, scrollbarSize: o };
|
|
140
|
+
}, { y: Y, tbodyWidth: T, hasScrollBar: v, scrollbarSize: $ } = f(() => {
|
|
134
141
|
const { tbodyWidth: e, hasScrollBar: s, scrollbarSize: t } = Be();
|
|
135
|
-
if (typeof
|
|
142
|
+
if (typeof p > "u")
|
|
136
143
|
return {
|
|
137
144
|
tbodyWidth: e,
|
|
138
145
|
hasScrollBar: s,
|
|
139
146
|
scrollbarSize: t
|
|
140
147
|
};
|
|
141
|
-
let
|
|
142
|
-
if (
|
|
143
|
-
const Oe = window.getComputedStyle(
|
|
144
|
-
|
|
148
|
+
let o = 40, l = 40;
|
|
149
|
+
if (B.current) {
|
|
150
|
+
const Oe = window.getComputedStyle(B.current);
|
|
151
|
+
o = parseInt(Oe.getPropertyValue("--cell-height")), l = parseInt(Oe.getPropertyValue("--toolbar-height"));
|
|
145
152
|
}
|
|
146
|
-
const n = (D == null ? void 0 : D.height) || 0,
|
|
147
|
-
return { y: (
|
|
153
|
+
const n = (D == null ? void 0 : D.height) || 0, a = n ? Ce : 0, i = I ?? J, b = p >= i ? p : i;
|
|
154
|
+
return { y: (y.fullscreen ? window.innerHeight : b) - n - a - l - o, tbodyWidth: e, hasScrollBar: s, scrollbarSize: t };
|
|
148
155
|
}, [
|
|
149
|
-
|
|
150
|
-
|
|
156
|
+
y.fullscreen,
|
|
157
|
+
p,
|
|
151
158
|
I,
|
|
152
159
|
J,
|
|
153
160
|
D == null ? void 0 : D.height,
|
|
154
161
|
ae == null ? void 0 : ae.height,
|
|
155
162
|
de == null ? void 0 : de.height
|
|
156
|
-
]),
|
|
157
|
-
if (
|
|
163
|
+
]), k = f(() => {
|
|
164
|
+
if (c != null && c.auto)
|
|
158
165
|
return {
|
|
159
166
|
x: void 0,
|
|
160
|
-
y:
|
|
167
|
+
y: c.y || Y
|
|
161
168
|
};
|
|
162
|
-
let e = (
|
|
163
|
-
return
|
|
164
|
-
}, [
|
|
169
|
+
let e = (c == null ? void 0 : c.x) ?? 1e3;
|
|
170
|
+
return re && (e -= re), ne && P && (e -= ne * P), T && (c != null && c.x && e < T && (c == null ? void 0 : c.x) > T && nt(T - e), e = Math.max(e, T), e += le), c != null && c.x ? { x: e, y: c.y || Y } : c != null && c.y ? { x: e, y: c.y } : { x: e, y: Y };
|
|
171
|
+
}, [c, Y, T, re, ne, le]), xt = () => {
|
|
165
172
|
let e = 0;
|
|
166
|
-
if (
|
|
167
|
-
const t = window.getComputedStyle(
|
|
173
|
+
if (B.current) {
|
|
174
|
+
const t = window.getComputedStyle(B.current), o = parseInt(
|
|
168
175
|
t.getPropertyValue("--toolCell-paddingInline")
|
|
169
176
|
);
|
|
170
|
-
e = parseInt(t.getPropertyValue("--fontSize")) + 4 + 2 *
|
|
177
|
+
e = parseInt(t.getPropertyValue("--fontSize")) + 4 + 2 * o;
|
|
171
178
|
}
|
|
172
179
|
let s = 0;
|
|
173
|
-
return H && (s += e),
|
|
180
|
+
return H && (s += e), j && (s += e), K && (s += e), s;
|
|
174
181
|
}, Ct = (e, s) => {
|
|
175
|
-
const t = e.length,
|
|
176
|
-
return
|
|
177
|
-
}, { sortColumns:
|
|
178
|
-
const s = (ee ?? []).filter((
|
|
182
|
+
const t = e.length, o = e.filter((R) => R.width), n = o.map((R) => R.width).reduce((R, Z) => R + Z, 0), { tbodyWidth: a } = Be(), b = Math.max((c == null ? void 0 : c.x) ?? 1e3, a ?? 0) - n - s, w = t - o.length;
|
|
183
|
+
return b >= 0 ? Math.floor(b / w) : 0;
|
|
184
|
+
}, { sortColumns: N, toolColWidth: Te } = f(() => {
|
|
185
|
+
const s = (ee ?? []).filter((i) => !Gt.includes(i)), { filterColumns: t, hiddenTotalWidth: o, autoWidthColLength: l } = It(
|
|
179
186
|
s,
|
|
180
|
-
|
|
181
|
-
), n = t.sort(Jt(
|
|
182
|
-
let
|
|
183
|
-
return A || (
|
|
184
|
-
}, [
|
|
187
|
+
y.columnsMap
|
|
188
|
+
), n = t.sort(Jt(y.columnsMap));
|
|
189
|
+
let a = 0;
|
|
190
|
+
return A || (a = xt(), k.x !== void 0 && st(Ct(s, a)), ot(o), rt(l)), { sortColumns: n, toolColWidth: a };
|
|
191
|
+
}, [y.columnsMap, ee]), [q, Ne] = S([]);
|
|
185
192
|
ue(() => {
|
|
186
|
-
if (P &&
|
|
193
|
+
if (P && k.x !== void 0) {
|
|
187
194
|
let e = 0, s = 0;
|
|
188
195
|
if (Q) {
|
|
189
|
-
const n =
|
|
190
|
-
(
|
|
196
|
+
const n = N == null ? void 0 : N.filter(
|
|
197
|
+
(a) => !a.width && !(a != null && a.isOperationCol)
|
|
191
198
|
).length;
|
|
192
199
|
e = Math.floor(Q / n), s = Q - e * n;
|
|
193
200
|
}
|
|
194
|
-
let t = 0,
|
|
195
|
-
let
|
|
196
|
-
return n != null && n.isOperationCol && (
|
|
201
|
+
let t = 0, o = -1, l = N.map((n, a) => {
|
|
202
|
+
let i = n.width;
|
|
203
|
+
return n != null && n.isOperationCol && (o = a, n != null && n.useMaxWidth && (i = yt() ?? n.width)), !i && P && (i = P + e), t += i ?? 0, i;
|
|
197
204
|
});
|
|
198
|
-
if (t <
|
|
199
|
-
const n =
|
|
200
|
-
let
|
|
201
|
-
if (
|
|
202
|
-
let
|
|
205
|
+
if (t < k.x - Te) {
|
|
206
|
+
const n = k.x - Te - t;
|
|
207
|
+
let a = n, i = N.length;
|
|
208
|
+
if (o >= 0 && i--, n >= i) {
|
|
209
|
+
let w = Math.floor(n / i);
|
|
203
210
|
l = l.map(
|
|
204
|
-
(R, Z) => R + (
|
|
205
|
-
),
|
|
211
|
+
(R, Z) => R + (o === Z ? 0 : w)
|
|
212
|
+
), a = n - w * i;
|
|
206
213
|
}
|
|
207
|
-
let
|
|
208
|
-
|
|
214
|
+
let b = 0;
|
|
215
|
+
o === 0 && l.length > 1 && b++, l[b] = (l[b] ?? 0) + a + s;
|
|
209
216
|
}
|
|
210
|
-
|
|
217
|
+
Ne(l);
|
|
211
218
|
}
|
|
212
219
|
}, [P, Q]);
|
|
213
220
|
const O = f(() => {
|
|
214
221
|
if (A)
|
|
215
|
-
return
|
|
216
|
-
const e =
|
|
222
|
+
return N;
|
|
223
|
+
const e = N.length - 1, s = N.map((t, o) => {
|
|
217
224
|
var l;
|
|
218
225
|
return {
|
|
219
226
|
...t,
|
|
220
|
-
...(e ===
|
|
227
|
+
...(e === o || ((l = N[o + 1]) == null ? void 0 : l.isOperationCol)) && {
|
|
221
228
|
className: F(t.className, "disabledResize")
|
|
222
229
|
},
|
|
223
|
-
width: q.length ? q[
|
|
224
|
-
...
|
|
230
|
+
width: q.length ? q[o] : P || (t == null ? void 0 : t.width),
|
|
231
|
+
...k.x !== void 0 ? {
|
|
225
232
|
onHeaderCell: (n) => ({
|
|
226
233
|
width: n.width,
|
|
227
234
|
stretchref: ze,
|
|
228
235
|
datagridref: ce,
|
|
229
|
-
onResize: gt(
|
|
236
|
+
onResize: gt(o)
|
|
230
237
|
})
|
|
231
238
|
} : {},
|
|
232
239
|
// ...tableScroll.x !== undefined ? {
|
|
@@ -236,7 +243,7 @@ function ns({
|
|
|
236
243
|
// })
|
|
237
244
|
// } : {},
|
|
238
245
|
...!(t != null && t.render) && t.copyable ? {
|
|
239
|
-
render: (n) => ["number", "bigint"].includes(typeof n) ? n : /* @__PURE__ */
|
|
246
|
+
render: (n) => ["number", "bigint"].includes(typeof n) ? n : /* @__PURE__ */ r.jsx(ss, { value: n })
|
|
240
247
|
} : {}
|
|
241
248
|
};
|
|
242
249
|
});
|
|
@@ -245,30 +252,30 @@ function ns({
|
|
|
245
252
|
s,
|
|
246
253
|
K,
|
|
247
254
|
!!H,
|
|
248
|
-
!!
|
|
255
|
+
!!j
|
|
249
256
|
);
|
|
250
|
-
}, [
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
let
|
|
254
|
-
const
|
|
255
|
-
if (n < 0 &&
|
|
256
|
-
|
|
257
|
-
const
|
|
258
|
-
let
|
|
259
|
-
|
|
257
|
+
}, [N, q]), gt = (e) => (s, { size: t }) => {
|
|
258
|
+
const o = [...q], n = (t.width > 48 ? t.width : 48) - q[e];
|
|
259
|
+
o[e] = q[e] + n;
|
|
260
|
+
let a = n + le;
|
|
261
|
+
const i = k.x + n;
|
|
262
|
+
if (n < 0 && i < T) {
|
|
263
|
+
a = a + T - i;
|
|
264
|
+
const b = e + 1;
|
|
265
|
+
let w = 0;
|
|
266
|
+
k.x > T && (w = k.x - T), o[b] = q[b] - n - w;
|
|
260
267
|
}
|
|
261
|
-
|
|
262
|
-
},
|
|
268
|
+
Ne(o), lt(a);
|
|
269
|
+
}, Se = f(() => Et(O), [O]), wt = f(() => d ? Se : O, [d, O, Se]), ke = f(() => {
|
|
263
270
|
const e = (C ?? []).length, s = e > (te.pc ?? 10) ? e >= 20 ? 20 : e : te.pc ?? 10;
|
|
264
|
-
return Array.from({ length: s }).map((
|
|
271
|
+
return Array.from({ length: s }).map((o, l) => ({
|
|
265
272
|
key: `${Date.now()}${l}`
|
|
266
273
|
}));
|
|
267
|
-
}, [C]), pe = f(() =>
|
|
268
|
-
if (
|
|
274
|
+
}, [C]), pe = f(() => d ? ke : C ?? [], [d, C, ke]), { table: fe, locale: Wt = Yt } = Ve(os), jt = { ...Wt.Table }, zt = ((qe = fe == null ? void 0 : fe.expandable) == null ? void 0 : qe.expandIcon) || (j == null ? void 0 : j.expandIcon) || Xt(jt), Me = f(() => {
|
|
275
|
+
if (j)
|
|
269
276
|
return {
|
|
270
|
-
...
|
|
271
|
-
expandedRowRender: () => /* @__PURE__ */
|
|
277
|
+
...j,
|
|
278
|
+
expandedRowRender: () => /* @__PURE__ */ r.jsx(r.Fragment, {}),
|
|
272
279
|
expandIcon: (e) => {
|
|
273
280
|
const s = zt(e);
|
|
274
281
|
return {
|
|
@@ -278,135 +285,135 @@ function ns({
|
|
|
278
285
|
disabled: !0,
|
|
279
286
|
style: {
|
|
280
287
|
...s.props.style,
|
|
281
|
-
backgroundColor:
|
|
288
|
+
backgroundColor: z.colorBgContainerDisabled
|
|
282
289
|
}
|
|
283
290
|
}
|
|
284
291
|
};
|
|
285
292
|
}
|
|
286
293
|
};
|
|
287
|
-
}, [
|
|
294
|
+
}, [j]), Bt = f(() => d ? Me : j, [d, j, Me]), Le = f(() => {
|
|
288
295
|
if (H)
|
|
289
296
|
return {
|
|
290
297
|
...H,
|
|
291
298
|
selectedRowKeys: [],
|
|
292
299
|
getCheckboxProps: () => ({ disabled: !0 })
|
|
293
300
|
};
|
|
294
|
-
}, [H]), Tt = f(() =>
|
|
301
|
+
}, [H]), Tt = f(() => d ? Le : H, [d, H, Le]), Re = f(() => d ? "key" : x.rowKey, [d, x.rowKey]), He = f(() => `${xe ?? y.stylesConfig.size}BitzTable`, [xe, y.stylesConfig.size]), Nt = E(
|
|
295
302
|
(e, s) => {
|
|
296
|
-
var
|
|
297
|
-
if (!
|
|
303
|
+
var o;
|
|
304
|
+
if (!x.onRow || d)
|
|
298
305
|
return {};
|
|
299
|
-
const t = (
|
|
306
|
+
const t = (o = x.onRow) == null ? void 0 : o.call(x, e, s);
|
|
300
307
|
return t.onClick && (t.className = "rowPointerCursor"), t;
|
|
301
308
|
},
|
|
302
|
-
[
|
|
303
|
-
),
|
|
309
|
+
[x.onRow, d]
|
|
310
|
+
), St = f(() => F(
|
|
304
311
|
"bitzTableContainer",
|
|
305
312
|
{ hideBorder: we },
|
|
306
313
|
{ hasScrollBar: v },
|
|
307
314
|
He,
|
|
308
|
-
|
|
315
|
+
x.className
|
|
309
316
|
), [
|
|
310
|
-
|
|
317
|
+
x.className,
|
|
311
318
|
He,
|
|
312
319
|
v,
|
|
313
|
-
|
|
320
|
+
y.fullscreen,
|
|
314
321
|
we
|
|
315
322
|
]), kt = f(() => ({
|
|
316
|
-
"--container-bgColor":
|
|
317
|
-
}), [
|
|
323
|
+
"--container-bgColor": z.colorBgContainer
|
|
324
|
+
}), [z.colorBgContainer]), pt = f(() => {
|
|
318
325
|
const e = I ?? J;
|
|
319
326
|
let s;
|
|
320
|
-
|
|
321
|
-
const t =
|
|
322
|
-
let
|
|
323
|
-
return ($ ?? 0) > 0 && (
|
|
327
|
+
p && (s = p >= e ? p : e);
|
|
328
|
+
const t = y.fullscreen ? "100%" : s;
|
|
329
|
+
let o;
|
|
330
|
+
return ($ ?? 0) > 0 && (o = $), At({
|
|
324
331
|
height: t,
|
|
325
|
-
token:
|
|
326
|
-
evenRowBgColor:
|
|
332
|
+
token: z,
|
|
333
|
+
evenRowBgColor: y.zebra ? m == null ? void 0 : m.evenRowBgColor : z.colorBgContainer,
|
|
327
334
|
table: m,
|
|
328
335
|
gap: Ce,
|
|
329
|
-
borderColor: (m == null ? void 0 : m.borderColor) ||
|
|
330
|
-
scrollbarWidth:
|
|
331
|
-
other:
|
|
336
|
+
borderColor: (m == null ? void 0 : m.borderColor) || z.colorBorderSecondary,
|
|
337
|
+
scrollbarWidth: o,
|
|
338
|
+
other: x.style
|
|
332
339
|
});
|
|
333
340
|
}, [
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
341
|
+
x.style,
|
|
342
|
+
y.fullscreen,
|
|
343
|
+
p,
|
|
337
344
|
I,
|
|
338
345
|
J,
|
|
339
346
|
m,
|
|
340
|
-
|
|
347
|
+
y == null ? void 0 : y.zebra,
|
|
341
348
|
$
|
|
342
349
|
]), Mt = E(
|
|
343
350
|
(e, s, t) => {
|
|
344
|
-
const
|
|
345
|
-
if (
|
|
346
|
-
const l =
|
|
347
|
-
return F(
|
|
351
|
+
const o = s % 2 === 0 ? "oddRow" : "evenRow";
|
|
352
|
+
if (x.rowClassName) {
|
|
353
|
+
const l = x.rowClassName(e, s, t);
|
|
354
|
+
return F(o, l);
|
|
348
355
|
}
|
|
349
|
-
return
|
|
356
|
+
return o;
|
|
350
357
|
},
|
|
351
|
-
[
|
|
352
|
-
), Pe = /* @__PURE__ */
|
|
358
|
+
[x.rowClassName]
|
|
359
|
+
), Pe = /* @__PURE__ */ r.jsx(
|
|
353
360
|
Vt,
|
|
354
361
|
{
|
|
355
362
|
finished: ct,
|
|
356
363
|
onLoad: async () => (
|
|
357
364
|
// @ts-ignore
|
|
358
|
-
!
|
|
365
|
+
!d && (V == null ? void 0 : V((W == null ? void 0 : W.page) + 1, W == null ? void 0 : W.size))
|
|
359
366
|
),
|
|
360
367
|
loadingText: "加载中...",
|
|
361
368
|
finishedText: "没有更多了",
|
|
362
369
|
errorText: "加载失败",
|
|
363
|
-
children: /* @__PURE__ */
|
|
370
|
+
children: /* @__PURE__ */ r.jsxs(
|
|
364
371
|
"div",
|
|
365
372
|
{
|
|
366
373
|
className: "mobileList",
|
|
367
374
|
style: { backgroundColor: m == null ? void 0 : m.mobileListBgColor },
|
|
368
375
|
children: [
|
|
369
|
-
g == null ? void 0 : g.map((e, s) => /* @__PURE__ */
|
|
376
|
+
g == null ? void 0 : g.map((e, s) => /* @__PURE__ */ r.jsx(
|
|
370
377
|
"div",
|
|
371
378
|
{
|
|
372
379
|
className: "listItem",
|
|
373
380
|
style: { backgroundColor: m == null ? void 0 : m.listItemBgColor },
|
|
374
381
|
onClick: () => ft(e, s),
|
|
375
|
-
children: O == null ? void 0 : O.map((t,
|
|
382
|
+
children: O == null ? void 0 : O.map((t, o) => {
|
|
376
383
|
var l;
|
|
377
|
-
return !(t != null && t.mobileHide) && /* @__PURE__ */
|
|
384
|
+
return !(t != null && t.mobileHide) && /* @__PURE__ */ r.jsxs(
|
|
378
385
|
"div",
|
|
379
386
|
{
|
|
380
387
|
className: "row",
|
|
381
|
-
style: { color:
|
|
388
|
+
style: { color: z.colorText },
|
|
382
389
|
children: [
|
|
383
|
-
!t.mobileHideLabel && /* @__PURE__ */
|
|
390
|
+
!t.mobileHideLabel && /* @__PURE__ */ r.jsxs("div", { className: "label", children: [
|
|
384
391
|
`${t.title}`,
|
|
385
392
|
":"
|
|
386
393
|
] }),
|
|
387
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ r.jsx("div", { className: "value", children: ((l = t == null ? void 0 : t.render) == null ? void 0 : l.call(
|
|
388
395
|
t,
|
|
389
|
-
|
|
396
|
+
rs(e, (t == null ? void 0 : t.dataIndex) || ""),
|
|
390
397
|
e,
|
|
391
398
|
s
|
|
392
399
|
)) || (e == null ? void 0 : e[t.dataIndex]) })
|
|
393
400
|
]
|
|
394
401
|
},
|
|
395
|
-
|
|
402
|
+
o
|
|
396
403
|
);
|
|
397
404
|
})
|
|
398
405
|
},
|
|
399
406
|
s
|
|
400
407
|
)),
|
|
401
|
-
Array.from({ length: te.mobile ?? 2 }).map((e, s) => /* @__PURE__ */
|
|
408
|
+
Array.from({ length: te.mobile ?? 2 }).map((e, s) => /* @__PURE__ */ r.jsx(
|
|
402
409
|
"div",
|
|
403
410
|
{
|
|
404
411
|
className: "listItem",
|
|
405
412
|
style: {
|
|
406
|
-
display:
|
|
413
|
+
display: d ? "block" : "none",
|
|
407
414
|
backgroundColor: m == null ? void 0 : m.listItemBgColor
|
|
408
415
|
},
|
|
409
|
-
children: /* @__PURE__ */
|
|
416
|
+
children: /* @__PURE__ */ r.jsx("div", { className: "row", children: be ? be() : /* @__PURE__ */ r.jsx(
|
|
410
417
|
Ht,
|
|
411
418
|
{
|
|
412
419
|
title: !1,
|
|
@@ -426,21 +433,21 @@ function ns({
|
|
|
426
433
|
}
|
|
427
434
|
);
|
|
428
435
|
ue(() => {
|
|
429
|
-
|
|
436
|
+
y.setSelected(!!(u != null && u.num));
|
|
430
437
|
}, [u]);
|
|
431
|
-
const ve = f(() => /* @__PURE__ */
|
|
432
|
-
/* @__PURE__ */
|
|
438
|
+
const ve = f(() => /* @__PURE__ */ r.jsxs("div", { className: "alert", children: [
|
|
439
|
+
/* @__PURE__ */ r.jsx(
|
|
433
440
|
De,
|
|
434
441
|
{
|
|
435
442
|
highlightTag: "strong",
|
|
436
|
-
keywords: `${
|
|
437
|
-
sourceString: `共 ${
|
|
443
|
+
keywords: `${M}`,
|
|
444
|
+
sourceString: `共 ${M} 条`,
|
|
438
445
|
tagClass: "totalText"
|
|
439
446
|
}
|
|
440
447
|
),
|
|
441
|
-
!!u && /* @__PURE__ */
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
/* @__PURE__ */
|
|
448
|
+
!!u && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
449
|
+
/* @__PURE__ */ r.jsx(Ke.Text, { className: "splitBorder", children: "/" }),
|
|
450
|
+
/* @__PURE__ */ r.jsx(
|
|
444
451
|
De,
|
|
445
452
|
{
|
|
446
453
|
highlightTag: "strong",
|
|
@@ -448,7 +455,7 @@ function ns({
|
|
|
448
455
|
sourceString: `已选中 ${(u == null ? void 0 : u.num) ?? 0} 条`
|
|
449
456
|
}
|
|
450
457
|
),
|
|
451
|
-
!!(u != null && u.num) && /* @__PURE__ */
|
|
458
|
+
!!(u != null && u.num) && /* @__PURE__ */ r.jsx(
|
|
452
459
|
Ke.Link,
|
|
453
460
|
{
|
|
454
461
|
className: "cleanSelected",
|
|
@@ -457,78 +464,78 @@ function ns({
|
|
|
457
464
|
}
|
|
458
465
|
)
|
|
459
466
|
] })
|
|
460
|
-
] }), [
|
|
461
|
-
|
|
467
|
+
] }), [M, u]), Lt = (e) => {
|
|
468
|
+
d || oe == null || oe(e);
|
|
462
469
|
}, $e = E(() => K ? {
|
|
463
|
-
row: (e) => Ft({ ...e, loading:
|
|
464
|
-
} : {}, [K, K ?
|
|
470
|
+
row: (e) => Ft({ ...e, loading: d == null ? void 0 : d.toString() })
|
|
471
|
+
} : {}, [K, K ? d : !1]);
|
|
465
472
|
E(
|
|
466
473
|
(e) => {
|
|
467
|
-
var
|
|
474
|
+
var o, l;
|
|
468
475
|
const s = { ...e };
|
|
469
|
-
return ((
|
|
476
|
+
return ((o = s.className) == null ? void 0 : o.includes(
|
|
470
477
|
"ant-table-cell-fix-right"
|
|
471
|
-
)) && !v && ((l = s.style) != null && l.right) && (s.style = { ...s.style ?? {} }, s.style.right = Number(s.style.right ?? 0) - ($ || 0)), /* @__PURE__ */
|
|
478
|
+
)) && !v && ((l = s.style) != null && l.right) && (s.style = { ...s.style ?? {} }, s.style.right = Number(s.style.right ?? 0) - ($ || 0)), /* @__PURE__ */ r.jsx("th", { ...s });
|
|
472
479
|
},
|
|
473
480
|
[v, $]
|
|
474
481
|
);
|
|
475
482
|
const Rt = f(() => ({
|
|
476
|
-
...
|
|
483
|
+
...L,
|
|
477
484
|
header: {
|
|
478
|
-
...
|
|
485
|
+
...L == null ? void 0 : L.header,
|
|
479
486
|
cell: (e) => ts({ ...e, hasScrollBar: v, scrollbarSize: $ })
|
|
480
487
|
},
|
|
481
488
|
body: {
|
|
482
|
-
...
|
|
489
|
+
...L == null ? void 0 : L.body,
|
|
483
490
|
...$e()
|
|
484
491
|
}
|
|
485
|
-
}), [
|
|
486
|
-
return /* @__PURE__ */
|
|
492
|
+
}), [L, v, $, $e]);
|
|
493
|
+
return /* @__PURE__ */ r.jsxs(
|
|
487
494
|
"div",
|
|
488
495
|
{
|
|
489
496
|
className: F("bitzTableBlock", {
|
|
490
|
-
fullscreen:
|
|
497
|
+
fullscreen: y.fullscreen
|
|
491
498
|
}),
|
|
492
499
|
style: kt,
|
|
493
500
|
children: [
|
|
494
|
-
!A && /* @__PURE__ */
|
|
495
|
-
/* @__PURE__ */
|
|
496
|
-
Ye && /* @__PURE__ */
|
|
497
|
-
Ze || /* @__PURE__ */
|
|
501
|
+
!A && /* @__PURE__ */ r.jsxs("div", { ref: B, className: St, style: pt, children: [
|
|
502
|
+
/* @__PURE__ */ r.jsxs("div", { className: "bitzTableContainerBody", ref: ce, children: [
|
|
503
|
+
Ye && /* @__PURE__ */ r.jsxs("div", { className: "bitzTableToolbarBlock", children: [
|
|
504
|
+
Ze || /* @__PURE__ */ r.jsx("div", {}),
|
|
498
505
|
Ee,
|
|
499
506
|
Ae
|
|
500
507
|
] }),
|
|
501
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ r.jsx(
|
|
502
509
|
"div",
|
|
503
510
|
{
|
|
504
511
|
className: "stretchLine",
|
|
505
512
|
ref: ze,
|
|
506
513
|
style: {
|
|
507
|
-
background:
|
|
514
|
+
background: z.colorPrimary,
|
|
508
515
|
bottom: v ? "var(--scrollbar-width)" : 0
|
|
509
516
|
}
|
|
510
517
|
}
|
|
511
518
|
),
|
|
512
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ r.jsx(
|
|
513
520
|
es,
|
|
514
521
|
{
|
|
515
522
|
enabledRowDragSort: K,
|
|
516
523
|
dataSource: pe,
|
|
517
524
|
mergeRowKey: Re,
|
|
518
525
|
onDragEnd: Lt,
|
|
519
|
-
children: /* @__PURE__ */
|
|
526
|
+
children: /* @__PURE__ */ r.jsx(
|
|
520
527
|
Pt,
|
|
521
528
|
{
|
|
522
|
-
...
|
|
529
|
+
...x,
|
|
523
530
|
bordered: ge,
|
|
524
531
|
columns: wt,
|
|
525
532
|
dataSource: pe,
|
|
526
533
|
loading: !1,
|
|
527
534
|
pagination: !1,
|
|
528
|
-
scroll:
|
|
535
|
+
scroll: k,
|
|
529
536
|
expandable: Bt,
|
|
530
537
|
rowSelection: Tt,
|
|
531
|
-
onRow:
|
|
538
|
+
onRow: Nt,
|
|
532
539
|
rowHoverable: tt,
|
|
533
540
|
rowClassName: Mt,
|
|
534
541
|
className: "bitzTable",
|
|
@@ -541,15 +548,15 @@ function ns({
|
|
|
541
548
|
}
|
|
542
549
|
)
|
|
543
550
|
] }),
|
|
544
|
-
_ && !!
|
|
551
|
+
_ && !!M && /* @__PURE__ */ r.jsxs("div", { className: "bitzTablePagination", ref: he, children: [
|
|
545
552
|
ve,
|
|
546
|
-
/* @__PURE__ */
|
|
553
|
+
/* @__PURE__ */ r.jsx(
|
|
547
554
|
qt,
|
|
548
555
|
{
|
|
549
556
|
size: "small",
|
|
550
557
|
enableControl: Je,
|
|
551
|
-
pagination:
|
|
552
|
-
total:
|
|
558
|
+
pagination: W,
|
|
559
|
+
total: M,
|
|
553
560
|
dataSource: C,
|
|
554
561
|
resetPage: Fe,
|
|
555
562
|
hideTotalText: !0,
|
|
@@ -557,21 +564,21 @@ function ns({
|
|
|
557
564
|
}
|
|
558
565
|
)
|
|
559
566
|
] }),
|
|
560
|
-
!_ && !!u && !!
|
|
567
|
+
!_ && !!u && !!M && /* @__PURE__ */ r.jsx("div", { className: "bitzTablePagination", ref: he, children: ve })
|
|
561
568
|
] }),
|
|
562
|
-
A && /* @__PURE__ */
|
|
563
|
-
(
|
|
569
|
+
A && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
570
|
+
(d || !!(C != null && C.length)) && /* @__PURE__ */ r.jsx(r.Fragment, { children: ye ? (
|
|
564
571
|
// @ts-ignore
|
|
565
|
-
/* @__PURE__ */
|
|
572
|
+
/* @__PURE__ */ r.jsx(
|
|
566
573
|
Kt,
|
|
567
574
|
{
|
|
568
|
-
onRefresh: async () => !
|
|
575
|
+
onRefresh: async () => !d && ye(),
|
|
569
576
|
children: Pe
|
|
570
577
|
}
|
|
571
578
|
)
|
|
572
579
|
) : Pe }),
|
|
573
|
-
!
|
|
574
|
-
/* @__PURE__ */
|
|
580
|
+
!d && /* @__PURE__ */ r.jsx(Ot, { data: C, title: Ue, img: Xe }),
|
|
581
|
+
/* @__PURE__ */ r.jsx(
|
|
575
582
|
$t,
|
|
576
583
|
{
|
|
577
584
|
className: "tableMobileDrawer",
|
|
@@ -580,21 +587,21 @@ function ns({
|
|
|
580
587
|
height: "auto",
|
|
581
588
|
closable: !1,
|
|
582
589
|
onClose: je,
|
|
583
|
-
children: /* @__PURE__ */
|
|
584
|
-
/* @__PURE__ */
|
|
590
|
+
children: /* @__PURE__ */ r.jsxs("div", { className: "drawerBox", children: [
|
|
591
|
+
/* @__PURE__ */ r.jsx("div", { className: "boxBody", children: ht ? /* @__PURE__ */ r.jsx("div", { className: "operaList", children: /* @__PURE__ */ r.jsx(vt, {}) }) : X.map((e, s) => /* @__PURE__ */ r.jsx(
|
|
585
592
|
"div",
|
|
586
593
|
{
|
|
587
594
|
className: "operaList",
|
|
588
595
|
onClick: () => ut(e, s),
|
|
589
596
|
...e.danger && {
|
|
590
|
-
style: { color:
|
|
597
|
+
style: { color: z.colorError }
|
|
591
598
|
},
|
|
592
599
|
children: e.label
|
|
593
600
|
},
|
|
594
601
|
s
|
|
595
602
|
)) }),
|
|
596
|
-
/* @__PURE__ */
|
|
597
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ r.jsx("div", { className: "boxLine" }),
|
|
604
|
+
/* @__PURE__ */ r.jsx("div", { className: "boxFooter", onClick: je, children: Qe })
|
|
598
605
|
] })
|
|
599
606
|
}
|
|
600
607
|
)
|
|
@@ -603,7 +610,7 @@ function ns({
|
|
|
603
610
|
}
|
|
604
611
|
);
|
|
605
612
|
}
|
|
606
|
-
const Os = (_) => /* @__PURE__ */
|
|
613
|
+
const Os = (_) => /* @__PURE__ */ r.jsx(Dt, { initValue: _, children: /* @__PURE__ */ r.jsx(ns, { ..._ }) });
|
|
607
614
|
export {
|
|
608
615
|
Os as default
|
|
609
616
|
};
|