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