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