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