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