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