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