bitz-react-admin-ui 2.3.2 → 2.3.3
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/_virtual/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +26 -15
- package/dist/components/BitzTable/Store/index.d.ts +4 -0
- package/dist/components/BitzTable/Store/index.mjs +73 -71
- package/dist/components/BitzTable/Table/SortTableContext.d.ts +3 -5
- package/dist/components/BitzTable/Table/SortTableContext.mjs +42 -19
- package/dist/components/BitzTable/Table/index.d.ts +1 -2
- package/dist/components/BitzTable/Table/index.mjs +86 -83
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +19 -12
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +46 -43
- package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +1 -1
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +1 -1
- package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
- package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as o } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { useContext as Ne, useRef as
|
|
2
|
+
import { useContext as Ne, useRef as q, useState as k, useEffect as ke, useMemo as c, useCallback as K } from "react";
|
|
3
3
|
import { isMobile as O } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
|
|
4
4
|
import { Skeleton as gt, Typography as Se, Table as wt } from "antd";
|
|
5
5
|
import oe from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
@@ -22,18 +22,18 @@ import Rt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/local
|
|
|
22
22
|
import { getColumnsWithTool as Ht, loopBuildSkeleton as $t } from "./utils.mjs";
|
|
23
23
|
import { getCssVar as Ft } from "./style.mjs";
|
|
24
24
|
import Vt from "./SortableRow.mjs";
|
|
25
|
-
import
|
|
25
|
+
import qt from "./SortTableContext.mjs";
|
|
26
26
|
import "./index.less.mjs";
|
|
27
|
-
import { ConfigContext as
|
|
28
|
-
import
|
|
27
|
+
import { ConfigContext as Kt } from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/context.mjs";
|
|
28
|
+
import Ot from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
|
|
29
29
|
function Dt({
|
|
30
|
-
showPagination:
|
|
31
|
-
height:
|
|
30
|
+
showPagination: R = !0,
|
|
31
|
+
height: H,
|
|
32
32
|
dataSource: b,
|
|
33
33
|
total: j = 0,
|
|
34
|
-
columns:
|
|
34
|
+
columns: D,
|
|
35
35
|
loading: l,
|
|
36
|
-
skeletonNum:
|
|
36
|
+
skeletonNum: _ = {
|
|
37
37
|
pc: 10,
|
|
38
38
|
mobile: 10
|
|
39
39
|
},
|
|
@@ -41,53 +41,53 @@ function Dt({
|
|
|
41
41
|
skeletonRowNum: Le = 4,
|
|
42
42
|
skeletonRowsWidth: Pe = ["35%", "100%", "100%", "60%"],
|
|
43
43
|
// mobileLoadEmit,
|
|
44
|
-
mobileRefreshEmit:
|
|
45
|
-
operationFilter:
|
|
44
|
+
mobileRefreshEmit: le,
|
|
45
|
+
operationFilter: G,
|
|
46
46
|
enableControlPage: ve,
|
|
47
|
-
pagination:
|
|
48
|
-
paginationEmit:
|
|
47
|
+
pagination: x,
|
|
48
|
+
paginationEmit: F = () => {
|
|
49
49
|
},
|
|
50
50
|
enabledRowDragSort: S,
|
|
51
|
-
onRowDragEnd:
|
|
51
|
+
onRowDragEnd: I,
|
|
52
52
|
mobilePageHeight: _t = 500,
|
|
53
53
|
mobileCancelText: Re = "取消",
|
|
54
54
|
noDataTitle: He,
|
|
55
55
|
noDataImg: $e,
|
|
56
56
|
color: Gt,
|
|
57
|
-
size:
|
|
57
|
+
size: ie,
|
|
58
58
|
showTableTool: Fe = !0,
|
|
59
59
|
tableAction: Ve,
|
|
60
|
-
tableToolbar:
|
|
61
|
-
selectionBar:
|
|
60
|
+
tableToolbar: qe,
|
|
61
|
+
selectionBar: Ke,
|
|
62
62
|
scroll: i,
|
|
63
63
|
components: z,
|
|
64
64
|
expandable: g,
|
|
65
65
|
rowSelection: T,
|
|
66
66
|
selectionAlert: u,
|
|
67
|
-
resetPage:
|
|
67
|
+
resetPage: Oe,
|
|
68
68
|
...f
|
|
69
69
|
}) {
|
|
70
70
|
var We;
|
|
71
71
|
const { token: w } = Lt.useToken(), { Table: h } = w, {
|
|
72
72
|
tableSpaceBetweenPage: ae = 10,
|
|
73
73
|
cellPaddingInline: De = Pt
|
|
74
|
-
} = h, { showColumnBorder: _e, hideRowBorder: ce, rowHoverable: Ge, ...m } = Ne(Nt), C =
|
|
74
|
+
} = h, { showColumnBorder: _e, hideRowBorder: ce, rowHoverable: Ge, ...m } = Ne(Nt), C = q(void 0), [J, Ie] = k(0), [Q, Je] = k(0), [U, Qe] = k(0), [Ue, X] = k(!1), [y, Xe] = k([]);
|
|
75
75
|
ke(() => {
|
|
76
76
|
let e = [...b ?? []];
|
|
77
|
-
(
|
|
77
|
+
(x == null ? void 0 : x.page) !== 1 && (e = [...y, ...e]), Xe(e);
|
|
78
78
|
}, [b]);
|
|
79
|
-
const Ye = c(() => !!(
|
|
79
|
+
const Ye = c(() => !!(y != null && y.length) && (y == null ? void 0 : y.length) >= j, [y, j]), [Ze, Ee] = k([]), Ae = (e, t) => {
|
|
80
80
|
var s;
|
|
81
|
-
const r = (s =
|
|
81
|
+
const r = (s = G == null ? void 0 : G(e, t)) == null ? void 0 : s.filter(
|
|
82
82
|
(n) => n.type !== "divider"
|
|
83
83
|
);
|
|
84
|
-
r != null && r.length && (Ee(r),
|
|
84
|
+
r != null && r.length && (Ee(r), X(!0));
|
|
85
85
|
}, he = () => {
|
|
86
|
-
|
|
86
|
+
X(!1);
|
|
87
87
|
}, et = (e) => {
|
|
88
88
|
var t;
|
|
89
|
-
|
|
90
|
-
}, B =
|
|
89
|
+
X(!1), (t = e.onClick) == null || t.call(e);
|
|
90
|
+
}, B = q(null), Y = ne(B), de = q(null), Z = ne(de), E = q(null), M = ne(E), tt = () => {
|
|
91
91
|
var r;
|
|
92
92
|
const e = (r = B.current) == null ? void 0 : r.querySelectorAll(
|
|
93
93
|
"& > .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)"
|
|
@@ -100,16 +100,20 @@ function Dt({
|
|
|
100
100
|
}), t.length)
|
|
101
101
|
return Math.ceil(Math.max(...t)) + De * 2;
|
|
102
102
|
}, ue = () => {
|
|
103
|
-
var a, d, P;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
)
|
|
103
|
+
var a, d, P, v;
|
|
104
|
+
let e = (a = B.current) == null ? void 0 : a.querySelector(
|
|
105
|
+
".ant-table-content"
|
|
106
|
+
);
|
|
107
|
+
e || (e = (d = B.current) == null ? void 0 : d.querySelector(
|
|
108
|
+
".ant-table-body"
|
|
109
|
+
));
|
|
110
|
+
const t = e == null ? void 0 : e.clientWidth, s = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, n = (v = (P = B.current) == null ? void 0 : P.querySelector(
|
|
107
111
|
".ant-table-cell-scrollbar"
|
|
108
|
-
)) == null ? void 0 :
|
|
112
|
+
)) == null ? void 0 : v.offsetWidth;
|
|
109
113
|
return { tbodyWidth: t, hasScrollBar: s, scrollbarSize: n };
|
|
110
|
-
}, { y:
|
|
114
|
+
}, { y: A, tbodyWidth: L, hasScrollBar: V, scrollbarSize: $ } = c(() => {
|
|
111
115
|
const { tbodyWidth: e, hasScrollBar: t, scrollbarSize: r } = ue();
|
|
112
|
-
if (typeof
|
|
116
|
+
if (typeof H > "u")
|
|
113
117
|
return {
|
|
114
118
|
tbodyWidth: e,
|
|
115
119
|
hasScrollBar: t,
|
|
@@ -121,17 +125,17 @@ function Dt({
|
|
|
121
125
|
s = parseInt(W.getPropertyValue("--cell-height")), n = parseInt(W.getPropertyValue("--toolbar-height"));
|
|
122
126
|
}
|
|
123
127
|
const a = (M == null ? void 0 : M.height) || 0, d = a ? ae : 0;
|
|
124
|
-
return { y: (m.fullscreen ? window.innerHeight :
|
|
128
|
+
return { y: (m.fullscreen ? window.innerHeight : H) - a - d - n - s, tbodyWidth: e, hasScrollBar: t, scrollbarSize: r };
|
|
125
129
|
}, [
|
|
126
130
|
m.fullscreen,
|
|
127
|
-
|
|
131
|
+
H,
|
|
128
132
|
M == null ? void 0 : M.height,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
]),
|
|
133
|
+
Y == null ? void 0 : Y.height,
|
|
134
|
+
Z == null ? void 0 : Z.height
|
|
135
|
+
]), ee = c(() => {
|
|
132
136
|
let e = (i == null ? void 0 : i.x) ?? 1e3;
|
|
133
|
-
return
|
|
134
|
-
}, [i,
|
|
137
|
+
return J && (e -= J), Q && C.current && (e -= Q * C.current), L && (i != null && i.x && e < L && (i == null ? void 0 : i.x) > L && Qe(L - e), e = Math.max(e, L)), i != null && i.x ? { x: e, y: i.y || A } : i != null && i.y ? { x: e, y: i.y } : { x: e, y: A };
|
|
138
|
+
}, [i, A, L, J, Q]), rt = () => {
|
|
135
139
|
let e = 0;
|
|
136
140
|
if (B.current) {
|
|
137
141
|
const r = window.getComputedStyle(B.current), s = parseInt(
|
|
@@ -142,38 +146,38 @@ function Dt({
|
|
|
142
146
|
let t = 0;
|
|
143
147
|
return T && (t += e), g && (t += e), S && (t += e), t;
|
|
144
148
|
}, ot = (e, t) => {
|
|
145
|
-
const r = e.length, s = e.filter((W) => W.width), a = s.map((W) => W.width).reduce((W,
|
|
146
|
-
return
|
|
149
|
+
const r = e.length, s = e.filter((W) => W.width), a = s.map((W) => W.width).reduce((W, xt) => W + xt, 0), { tbodyWidth: d } = ue(), v = Math.max((i == null ? void 0 : i.x) ?? 0, d ?? 0) - a - t, Te = r - s.length;
|
|
150
|
+
return v >= 0 ? Math.floor(v / Te) : 0;
|
|
147
151
|
}, { sortColumns: p, toolColWidth: fe } = c(() => {
|
|
148
|
-
const t = (
|
|
152
|
+
const t = (D ?? []).filter((P) => !kt.includes(P)), { filterColumns: r, hiddenTotalWidth: s, autoWidthColLength: n } = St(
|
|
149
153
|
t,
|
|
150
154
|
m.columnsMap
|
|
151
155
|
), a = r.sort(Mt(m.columnsMap));
|
|
152
156
|
let d = 0;
|
|
153
157
|
return O || (d = rt(), C.current = ot(t, d), Ie(s), Je(n)), { sortColumns: a, toolColWidth: d };
|
|
154
|
-
}, [m.columnsMap,
|
|
158
|
+
}, [m.columnsMap, D]), [te, nt] = k([]);
|
|
155
159
|
ke(() => {
|
|
156
160
|
if (C.current) {
|
|
157
161
|
let e = 0;
|
|
158
|
-
if (
|
|
162
|
+
if (U) {
|
|
159
163
|
const n = p == null ? void 0 : p.filter(
|
|
160
164
|
(a) => !a.width && !(a != null && a.isOperationCol)
|
|
161
165
|
).length;
|
|
162
|
-
e = Math.floor(
|
|
166
|
+
e = Math.floor(U / n);
|
|
163
167
|
}
|
|
164
168
|
let t = 0, r = -1;
|
|
165
169
|
const s = p.map((n, a) => {
|
|
166
170
|
let d = n.width;
|
|
167
171
|
return n != null && n.isOperationCol && (r = a, n != null && n.useMaxWidth && (d = tt() ?? n.width)), !d && (C != null && C.current) && (d = C.current + e), t += d ?? 0, d;
|
|
168
172
|
});
|
|
169
|
-
if (t <
|
|
170
|
-
const n =
|
|
173
|
+
if (t < ee.x - fe) {
|
|
174
|
+
const n = ee.x - fe - t;
|
|
171
175
|
let a = 0;
|
|
172
176
|
r === 0 && s.length > 1 && a++, s[a] = (s[a] ?? 0) + n;
|
|
173
177
|
}
|
|
174
178
|
nt(s);
|
|
175
179
|
}
|
|
176
|
-
}, [p,
|
|
180
|
+
}, [p, U]);
|
|
177
181
|
const N = c(() => {
|
|
178
182
|
if (O)
|
|
179
183
|
return p;
|
|
@@ -182,25 +186,25 @@ function Dt({
|
|
|
182
186
|
// ...(sortColumns[i + 1]?.isOperationCol && {
|
|
183
187
|
// className: classNames(v.className, 'disabledResize'),
|
|
184
188
|
// }),
|
|
185
|
-
width:
|
|
189
|
+
width: te.length ? te[r] : C == null ? void 0 : C.current
|
|
186
190
|
// onHeaderCell: (column: BitzTableColumnsType<T>[number]) => ({
|
|
187
191
|
// width: column.width,
|
|
188
192
|
// onResize: handleResize(i) as React.ReactEventHandler<any>,
|
|
189
193
|
// }),
|
|
190
194
|
}));
|
|
191
195
|
return Ht(
|
|
192
|
-
|
|
196
|
+
D,
|
|
193
197
|
e,
|
|
194
198
|
S,
|
|
195
199
|
!!T,
|
|
196
200
|
!!g
|
|
197
201
|
);
|
|
198
|
-
}, [p,
|
|
199
|
-
const e = (b ?? []).length, t = e > (
|
|
202
|
+
}, [p, te]), me = c(() => $t(N), [N]), st = c(() => l ? me : N, [l, N, me]), be = c(() => {
|
|
203
|
+
const e = (b ?? []).length, t = e > (_.pc ?? 10) ? e >= 20 ? 20 : e : _.pc ?? 10;
|
|
200
204
|
return Array.from({ length: t }).map((s, n) => ({
|
|
201
205
|
key: `${Date.now()}${n}`
|
|
202
206
|
}));
|
|
203
|
-
}, [b]), Ce = c(() => l ? be : b ?? [], [l, b, be]), { table:
|
|
207
|
+
}, [b]), Ce = c(() => l ? be : b ?? [], [l, b, be]), { table: re, locale: lt = Rt } = Ne(Kt), it = { ...lt.Table }, at = ((We = re == null ? void 0 : re.expandable) == null ? void 0 : We.expandIcon) || (g == null ? void 0 : g.expandIcon) || vt(it), ye = c(() => {
|
|
204
208
|
if (g)
|
|
205
209
|
return {
|
|
206
210
|
...g,
|
|
@@ -220,14 +224,14 @@ function Dt({
|
|
|
220
224
|
};
|
|
221
225
|
}
|
|
222
226
|
};
|
|
223
|
-
}, [g]), ct = c(() => l ?
|
|
227
|
+
}, [g]), ct = c(() => l ? ye : g, [l, g, ye]), xe = c(() => {
|
|
224
228
|
if (T)
|
|
225
229
|
return {
|
|
226
230
|
...T,
|
|
227
231
|
selectedRowKeys: [],
|
|
228
232
|
getCheckboxProps: () => ({ disabled: !0 })
|
|
229
233
|
};
|
|
230
|
-
}, [T]), ht = c(() => l ?
|
|
234
|
+
}, [T]), ht = c(() => l ? xe : T, [l, T, xe]), ge = c(() => l ? "key" : f.rowKey, [l, f.rowKey]), we = c(() => `${ie ?? m.stylesConfig.size}BitzTable`, [ie, m.stylesConfig.size]), dt = K(
|
|
231
235
|
(e, t) => {
|
|
232
236
|
var s;
|
|
233
237
|
if (!f.onRow || l)
|
|
@@ -239,21 +243,21 @@ function Dt({
|
|
|
239
243
|
), ut = c(() => oe(
|
|
240
244
|
"bitzTableContainer",
|
|
241
245
|
{ hideBorder: ce },
|
|
242
|
-
{ hasScrollBar:
|
|
246
|
+
{ hasScrollBar: V },
|
|
243
247
|
we,
|
|
244
248
|
f.className
|
|
245
249
|
), [
|
|
246
250
|
f.className,
|
|
247
251
|
we,
|
|
248
|
-
|
|
252
|
+
V,
|
|
249
253
|
m.fullscreen,
|
|
250
254
|
ce
|
|
251
255
|
]), ft = c(() => ({
|
|
252
256
|
"--container-bgColor": w.colorBgContainer
|
|
253
257
|
}), [w.colorBgContainer]), mt = c(() => {
|
|
254
|
-
const e = m.fullscreen ? "100%" :
|
|
258
|
+
const e = m.fullscreen ? "100%" : H;
|
|
255
259
|
let t;
|
|
256
|
-
return (
|
|
260
|
+
return ($ ?? 0) > 0 && (t = $), Ft({
|
|
257
261
|
height: e,
|
|
258
262
|
fontFamily: w.fontFamily,
|
|
259
263
|
evenRowBgColor: m.zebra ? h == null ? void 0 : h.evenRowBgColor : w.colorBgContainer,
|
|
@@ -267,10 +271,10 @@ function Dt({
|
|
|
267
271
|
}, [
|
|
268
272
|
f.style,
|
|
269
273
|
m.fullscreen,
|
|
270
|
-
|
|
274
|
+
H,
|
|
271
275
|
h,
|
|
272
276
|
m == null ? void 0 : m.zebra,
|
|
273
|
-
|
|
277
|
+
$
|
|
274
278
|
]), bt = K(
|
|
275
279
|
(e, t, r) => {
|
|
276
280
|
const s = t % 2 === 0 ? "oddRow" : "evenRow";
|
|
@@ -287,7 +291,7 @@ function Dt({
|
|
|
287
291
|
finished: Ye,
|
|
288
292
|
onLoad: async () => (
|
|
289
293
|
// @ts-ignore
|
|
290
|
-
!l && (
|
|
294
|
+
!l && (F == null ? void 0 : F((x == null ? void 0 : x.page) + 1, x == null ? void 0 : x.size))
|
|
291
295
|
),
|
|
292
296
|
loadingText: "加载中...",
|
|
293
297
|
finishedText: "没有更多了",
|
|
@@ -298,7 +302,7 @@ function Dt({
|
|
|
298
302
|
className: "mobileList",
|
|
299
303
|
style: { backgroundColor: h == null ? void 0 : h.mobileListBgColor },
|
|
300
304
|
children: [
|
|
301
|
-
|
|
305
|
+
y == null ? void 0 : y.map((e, t) => /* @__PURE__ */ o.jsx(
|
|
302
306
|
"div",
|
|
303
307
|
{
|
|
304
308
|
className: "listItem",
|
|
@@ -318,7 +322,7 @@ function Dt({
|
|
|
318
322
|
] }),
|
|
319
323
|
/* @__PURE__ */ o.jsx("div", { className: "value", children: ((n = r == null ? void 0 : r.render) == null ? void 0 : n.call(
|
|
320
324
|
r,
|
|
321
|
-
|
|
325
|
+
Ot(e, (r == null ? void 0 : r.dataIndex) || ""),
|
|
322
326
|
e,
|
|
323
327
|
t
|
|
324
328
|
)) || (e == null ? void 0 : e[r.dataIndex]) })
|
|
@@ -330,7 +334,7 @@ function Dt({
|
|
|
330
334
|
},
|
|
331
335
|
t
|
|
332
336
|
)),
|
|
333
|
-
Array.from({ length:
|
|
337
|
+
Array.from({ length: _.mobile ?? 2 }).map((e, t) => /* @__PURE__ */ o.jsx(
|
|
334
338
|
"div",
|
|
335
339
|
{
|
|
336
340
|
className: "listItem",
|
|
@@ -386,8 +390,7 @@ function Dt({
|
|
|
386
390
|
)
|
|
387
391
|
] })
|
|
388
392
|
] }), [j, u]), Ct = (e) => {
|
|
389
|
-
|
|
390
|
-
l || e.active.id !== ((t = e.over) == null ? void 0 : t.id) && (G == null || G(e));
|
|
393
|
+
l || I == null || I(e);
|
|
391
394
|
}, ze = K(() => S ? {
|
|
392
395
|
row: (e) => Vt({ ...e, loading: l == null ? void 0 : l.toString() })
|
|
393
396
|
} : {}, [S, S ? l : !1]), pe = K(
|
|
@@ -396,10 +399,10 @@ function Dt({
|
|
|
396
399
|
const t = { ...e };
|
|
397
400
|
return ((s = t.className) == null ? void 0 : s.includes(
|
|
398
401
|
"ant-table-cell-fix-right"
|
|
399
|
-
)) && !
|
|
402
|
+
)) && !V && ((n = t.style) != null && n.right) && (t.style = { ...t.style ?? {} }, t.style.right = Number(t.style.right ?? 0) - ($ || 0)), /* @__PURE__ */ o.jsx("th", { ...t });
|
|
400
403
|
},
|
|
401
|
-
[
|
|
402
|
-
),
|
|
404
|
+
[V, $]
|
|
405
|
+
), yt = c(() => ({
|
|
403
406
|
...z,
|
|
404
407
|
header: {
|
|
405
408
|
...z == null ? void 0 : z.header,
|
|
@@ -422,11 +425,11 @@ function Dt({
|
|
|
422
425
|
/* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref: de, children: [
|
|
423
426
|
Fe && /* @__PURE__ */ o.jsxs("div", { className: "bitzTableToolbarBlock", children: [
|
|
424
427
|
Ve || /* @__PURE__ */ o.jsx("div", {}),
|
|
425
|
-
|
|
426
|
-
|
|
428
|
+
qe,
|
|
429
|
+
Ke
|
|
427
430
|
] }),
|
|
428
431
|
/* @__PURE__ */ o.jsx(
|
|
429
|
-
|
|
432
|
+
qt,
|
|
430
433
|
{
|
|
431
434
|
enabledRowDragSort: S,
|
|
432
435
|
dataSource: Ce,
|
|
@@ -441,45 +444,45 @@ function Dt({
|
|
|
441
444
|
dataSource: Ce,
|
|
442
445
|
loading: !1,
|
|
443
446
|
pagination: !1,
|
|
444
|
-
scroll:
|
|
447
|
+
scroll: ee,
|
|
445
448
|
expandable: ct,
|
|
446
449
|
rowSelection: ht,
|
|
447
450
|
onRow: dt,
|
|
448
451
|
rowHoverable: Ge,
|
|
449
452
|
rowClassName: bt,
|
|
450
453
|
className: "bitzTable",
|
|
451
|
-
components:
|
|
454
|
+
components: yt,
|
|
452
455
|
rowKey: ge
|
|
453
456
|
}
|
|
454
457
|
)
|
|
455
458
|
}
|
|
456
459
|
)
|
|
457
460
|
] }),
|
|
458
|
-
|
|
461
|
+
R && !!j && /* @__PURE__ */ o.jsxs("div", { className: "bitzTablePagination", ref: E, children: [
|
|
459
462
|
je,
|
|
460
463
|
/* @__PURE__ */ o.jsx(
|
|
461
464
|
jt,
|
|
462
465
|
{
|
|
463
466
|
size: "small",
|
|
464
467
|
enableControl: ve,
|
|
465
|
-
pagination:
|
|
468
|
+
pagination: x,
|
|
466
469
|
total: j,
|
|
467
470
|
dataSource: b,
|
|
468
|
-
resetPage:
|
|
471
|
+
resetPage: Oe,
|
|
469
472
|
hideTotalText: !0,
|
|
470
|
-
paginationEmit:
|
|
473
|
+
paginationEmit: F
|
|
471
474
|
}
|
|
472
475
|
)
|
|
473
476
|
] }),
|
|
474
|
-
!
|
|
477
|
+
!R && !!u && !!j && /* @__PURE__ */ o.jsx("div", { className: "bitzTablePagination", ref: E, children: je })
|
|
475
478
|
] }),
|
|
476
479
|
O && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
477
|
-
(l || !!(b != null && b.length)) && /* @__PURE__ */ o.jsx(o.Fragment, { children:
|
|
480
|
+
(l || !!(b != null && b.length)) && /* @__PURE__ */ o.jsx(o.Fragment, { children: le ? (
|
|
478
481
|
// @ts-ignore
|
|
479
482
|
/* @__PURE__ */ o.jsx(
|
|
480
483
|
Wt,
|
|
481
484
|
{
|
|
482
|
-
onRefresh: async () => !l &&
|
|
485
|
+
onRefresh: async () => !l && le(),
|
|
483
486
|
children: Be
|
|
484
487
|
}
|
|
485
488
|
)
|
|
@@ -517,7 +520,7 @@ function Dt({
|
|
|
517
520
|
}
|
|
518
521
|
);
|
|
519
522
|
}
|
|
520
|
-
const gr = (
|
|
523
|
+
const gr = (R) => /* @__PURE__ */ o.jsx(Tt, { initValue: R, children: /* @__PURE__ */ o.jsx(Dt, { ...R }) });
|
|
521
524
|
export {
|
|
522
525
|
gr as default
|
|
523
526
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as r } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { Modal as N, Typography as k, Card as B, Flex as
|
|
3
|
-
import { useMemo as
|
|
2
|
+
import { Modal as N, Typography as k, Card as B, Flex as m } from "antd";
|
|
3
|
+
import { useMemo as f, useState as F, useRef as h } from "react";
|
|
4
4
|
import H from "../../../BitzTheme/index.mjs";
|
|
5
5
|
import R from "../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
6
6
|
import { styles as T } from "./style.mjs";
|
|
7
7
|
function $({
|
|
8
|
-
open:
|
|
8
|
+
open: l,
|
|
9
9
|
title: C,
|
|
10
10
|
close: g,
|
|
11
11
|
closeAfter: p,
|
|
@@ -14,11 +14,11 @@ function $({
|
|
|
14
14
|
extra: t,
|
|
15
15
|
children: j
|
|
16
16
|
}) {
|
|
17
|
-
const { token: o } = H.useToken(), n =
|
|
18
|
-
p(), b(
|
|
19
|
-
}, e =
|
|
20
|
-
var
|
|
21
|
-
return e.current && s.current ? ((
|
|
17
|
+
const { token: o } = H.useToken(), n = f(() => o.mode === "dark", [o.mode]), [i, b] = F(0), M = () => {
|
|
18
|
+
p(), b(i + 1);
|
|
19
|
+
}, e = h(null), s = h(null), c = f(() => {
|
|
20
|
+
var a, d, u;
|
|
21
|
+
return e.current && s.current ? ((a = e.current) == null ? void 0 : a.clientHeight) - ((d = s.current) == null ? void 0 : d.clientHeight) - 24 : e.current && !t ? (u = e.current) == null ? void 0 : u.clientHeight : "100%";
|
|
22
22
|
}, [e.current, s.current, t]);
|
|
23
23
|
return /* @__PURE__ */ r.jsx(
|
|
24
24
|
N,
|
|
@@ -26,7 +26,7 @@ function $({
|
|
|
26
26
|
className: R(T(o), "tableConfigModal"),
|
|
27
27
|
title: /* @__PURE__ */ r.jsx(k.Title, { style: { fontSize: 16, margin: 0 }, children: C }),
|
|
28
28
|
getContainer: x,
|
|
29
|
-
open:
|
|
29
|
+
open: l,
|
|
30
30
|
onCancel: g,
|
|
31
31
|
afterClose: M,
|
|
32
32
|
style: {
|
|
@@ -38,7 +38,7 @@ function $({
|
|
|
38
38
|
width: 700,
|
|
39
39
|
footer: y,
|
|
40
40
|
children: /* @__PURE__ */ r.jsx(B, { className: "container", bordered: !1, children: /* @__PURE__ */ r.jsxs(
|
|
41
|
-
|
|
41
|
+
m,
|
|
42
42
|
{
|
|
43
43
|
ref: e,
|
|
44
44
|
vertical: !0,
|
|
@@ -47,10 +47,17 @@ function $({
|
|
|
47
47
|
style: { height: "100%" },
|
|
48
48
|
children: [
|
|
49
49
|
t && /* @__PURE__ */ r.jsx("div", { className: "extraContent", ref: s, children: t }),
|
|
50
|
-
/* @__PURE__ */ r.jsx(
|
|
50
|
+
l && /* @__PURE__ */ r.jsx(
|
|
51
|
+
m,
|
|
52
|
+
{
|
|
53
|
+
className: "containerBody",
|
|
54
|
+
style: { height: c || "100%" },
|
|
55
|
+
children: j(c)
|
|
56
|
+
}
|
|
57
|
+
)
|
|
51
58
|
]
|
|
52
59
|
},
|
|
53
|
-
|
|
60
|
+
i
|
|
54
61
|
) })
|
|
55
62
|
}
|
|
56
63
|
);
|
|
@@ -1,76 +1,79 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { Space as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { BitzConfigContext as
|
|
9
|
-
import { BitzToolBarContext as
|
|
10
|
-
import { BitzTableContext as
|
|
11
|
-
const
|
|
12
|
-
size:
|
|
13
|
-
tools:
|
|
14
|
-
toolsConfig:
|
|
1
|
+
import { j as r } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { useContext as c, useMemo as h, useRef as g, useEffect as C } from "react";
|
|
3
|
+
import { Flex as j, Space as z } from "antd";
|
|
4
|
+
import B from "../RefreshIcon/index.mjs";
|
|
5
|
+
import T from "../ColConfigIcon/index.mjs";
|
|
6
|
+
import E from "../FullscreenIcon/index.mjs";
|
|
7
|
+
import I from "../ExportIcon/index.mjs";
|
|
8
|
+
import { BitzConfigContext as R } from "../../../BitzConfigProvider/context.mjs";
|
|
9
|
+
import { BitzToolBarContext as b } from "./context.mjs";
|
|
10
|
+
import { BitzTableContext as k } from "../../Store/index.mjs";
|
|
11
|
+
const F = ["export", "refresh", "fullscreen", "config"], J = ({
|
|
12
|
+
size: W,
|
|
13
|
+
tools: l,
|
|
14
|
+
toolsConfig: m,
|
|
15
15
|
exclude: t,
|
|
16
|
-
onExport:
|
|
17
|
-
onRefresh:
|
|
18
|
-
onColumnChange:
|
|
16
|
+
onExport: p,
|
|
17
|
+
onRefresh: d,
|
|
18
|
+
onColumnChange: a
|
|
19
19
|
}) => {
|
|
20
|
-
const { Table:
|
|
21
|
-
const
|
|
22
|
-
return t != null && t.length ?
|
|
23
|
-
}, [
|
|
24
|
-
const
|
|
20
|
+
const { Table: e } = c(R), { selected: u, setToolbarWidth: x } = c(k), i = h(() => {
|
|
21
|
+
const s = l || (e == null ? void 0 : e.toolbar) || F;
|
|
22
|
+
return t != null && t.length ? s.filter((n) => !t.includes(n)) : s;
|
|
23
|
+
}, [e == null ? void 0 : e.toolbar, t, l]), o = h(() => {
|
|
24
|
+
const s = {
|
|
25
25
|
export: { order: 1, show: !1 },
|
|
26
26
|
refresh: { order: 2, show: !1 },
|
|
27
27
|
fullscreen: { order: 3, show: !1 },
|
|
28
28
|
config: { order: 4, show: !1 }
|
|
29
29
|
};
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
}),
|
|
33
|
-
}, [
|
|
34
|
-
return
|
|
35
|
-
x.
|
|
30
|
+
return i.forEach((n, w) => {
|
|
31
|
+
s[n].order = w + 1, s[n].show = i.includes(n);
|
|
32
|
+
}), s;
|
|
33
|
+
}, [i]), f = g(null);
|
|
34
|
+
return C(() => {
|
|
35
|
+
f.current && x(f.current.clientWidth);
|
|
36
|
+
}, [f.current]), /* @__PURE__ */ r.jsx(b.Provider, { value: m ?? {}, children: /* @__PURE__ */ r.jsx(
|
|
37
|
+
j,
|
|
36
38
|
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
ref: f,
|
|
40
|
+
style: { height: "100%", ...u && { zIndex: 10 } },
|
|
41
|
+
children: /* @__PURE__ */ r.jsxs(z.Compact, { children: [
|
|
42
|
+
/* @__PURE__ */ r.jsx(
|
|
43
|
+
I,
|
|
41
44
|
{
|
|
42
45
|
order: o.export.order,
|
|
43
46
|
show: o.export.show,
|
|
44
|
-
onClick:
|
|
47
|
+
onClick: p
|
|
45
48
|
}
|
|
46
49
|
),
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
50
|
+
/* @__PURE__ */ r.jsx(
|
|
51
|
+
B,
|
|
49
52
|
{
|
|
50
53
|
order: o.refresh.order,
|
|
51
54
|
show: o.refresh.show,
|
|
52
|
-
onClick:
|
|
55
|
+
onClick: d
|
|
53
56
|
}
|
|
54
57
|
),
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
|
|
58
|
+
/* @__PURE__ */ r.jsx(
|
|
59
|
+
E,
|
|
57
60
|
{
|
|
58
61
|
order: o.fullscreen.order,
|
|
59
62
|
show: o.fullscreen.show
|
|
60
63
|
}
|
|
61
64
|
),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
|
|
65
|
+
/* @__PURE__ */ r.jsx(
|
|
66
|
+
T,
|
|
64
67
|
{
|
|
65
68
|
order: o.config.order,
|
|
66
69
|
show: o.config.show,
|
|
67
|
-
onChange:
|
|
70
|
+
onChange: a
|
|
68
71
|
}
|
|
69
72
|
)
|
|
70
|
-
]
|
|
73
|
+
] })
|
|
71
74
|
}
|
|
72
75
|
) });
|
|
73
76
|
};
|
|
74
77
|
export {
|
|
75
|
-
|
|
78
|
+
J as default
|
|
76
79
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as u } from "../../../../../_virtual/_commonjsHelpers.mjs";
|
|
2
|
-
import { __module as i } from "../../../../../_virtual/
|
|
2
|
+
import { __module as i } from "../../../../../_virtual/index2.mjs";
|
|
3
3
|
/*!
|
|
4
4
|
Copyright (c) 2018 Jed Watson.
|
|
5
5
|
Licensed under the MIT License (MIT), see
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as e } from "../../../../../_virtual/_commonjsHelpers.mjs";
|
|
2
|
-
import { __module as r } from "../../../../../_virtual/
|
|
2
|
+
import { __module as r } from "../../../../../_virtual/index.mjs";
|
|
3
3
|
import { __require as o } from "../../../react-is@16.13.1/node_modules/react-is/index.mjs";
|
|
4
4
|
import { __require as t } from "./factoryWithTypeCheckers.mjs";
|
|
5
5
|
import { __require as p } from "./factoryWithThrowingShims.mjs";
|