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