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