bitz-react-admin-ui 2.7.1 → 2.7.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/Store/index.mjs +168 -167
- package/dist/components/BitzTable/SubTable/index.d.ts +1 -0
- package/dist/components/BitzTable/SubTable/index.mjs +82 -76
- package/dist/components/BitzTable/Table/index.mjs +113 -109
- package/dist/components/BitzTable/Table/utils.mjs +32 -32
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/ScopeSwitch.mjs +9 -9
- 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.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { useContext as
|
|
2
|
+
import { useContext as Ge, useState as V, useEffect as we, useMemo as d, useRef as _, useLayoutEffect as Ye, useCallback as ie } from "react";
|
|
3
3
|
import { isMobile as T } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
|
|
4
4
|
import { Typography as xe, Skeleton as Kt, Table as Ot, Spin as qt } from "antd";
|
|
5
5
|
import ce from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
@@ -9,17 +9,17 @@ import It from "../../BitzNoData/index.mjs";
|
|
|
9
9
|
import "../../BitzList/index.less.mjs";
|
|
10
10
|
import Dt 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 Gt from "../../BitzPullRefresh/PullRefresh.mjs";
|
|
13
|
+
import Yt, { BitzTableContext as Jt, toolCols as Qt } from "../Store/index.mjs";
|
|
14
|
+
import { loopFilter as Ut, columnSort as Xt, genColumnKey as ge } from "../Store/utils/index.mjs";
|
|
15
|
+
import Je from "../../../node_modules/.store/ahooks@3.8.0/node_modules/ahooks/es/useSize/index.mjs";
|
|
16
|
+
import Zt from "../../BitzTheme/index.mjs";
|
|
17
|
+
import { tablePaddingInline as Et } from "../../BitzConfigProvider/context.mjs";
|
|
18
|
+
import Qe from "../../BitzHighlight/index.mjs";
|
|
19
|
+
import vt from "../../../node_modules/.store/antd@5.18.3/node_modules/antd/es/table/ExpandIcon.mjs";
|
|
20
20
|
import "../../../node_modules/.store/antd@5.18.3/node_modules/antd/es/config-provider/index.mjs";
|
|
21
21
|
import At from "../../../node_modules/.store/antd@5.18.3/node_modules/antd/locale/en_US.mjs";
|
|
22
|
-
import { getColumnsWithTool as Ft, loopBuildSkeleton as es, resetScroll as
|
|
22
|
+
import { getColumnsWithTool as Ft, loopBuildSkeleton as es, resetScroll as Ue } from "./utils.mjs";
|
|
23
23
|
import { getCssVar as ts } from "./style.mjs";
|
|
24
24
|
import ss from "./SortableRow.mjs";
|
|
25
25
|
import os from "./SortTableContext.mjs";
|
|
@@ -29,25 +29,25 @@ import "./index.less.mjs";
|
|
|
29
29
|
import { ConfigContext as ls } from "../../../node_modules/.store/antd@5.18.3/node_modules/antd/es/config-provider/context.mjs";
|
|
30
30
|
import is from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
|
|
31
31
|
function cs({
|
|
32
|
-
showPagination:
|
|
33
|
-
height:
|
|
34
|
-
minHeight:
|
|
32
|
+
showPagination: Q = !0,
|
|
33
|
+
height: H,
|
|
34
|
+
minHeight: E,
|
|
35
35
|
dataSource: z,
|
|
36
|
-
total:
|
|
36
|
+
total: L = 0,
|
|
37
37
|
columns: ae,
|
|
38
38
|
loading: c,
|
|
39
|
-
dataProps:
|
|
40
|
-
skeletonNum:
|
|
39
|
+
dataProps: Xe = {},
|
|
40
|
+
skeletonNum: v = {
|
|
41
41
|
pc: 10,
|
|
42
42
|
mobile: 10
|
|
43
43
|
},
|
|
44
44
|
skeletonRender: de,
|
|
45
|
-
skeletonRowNum:
|
|
46
|
-
skeletonRowsWidth:
|
|
45
|
+
skeletonRowNum: Ze = 4,
|
|
46
|
+
skeletonRowsWidth: Ee = ["35%", "100%", "100%", "60%"],
|
|
47
47
|
// mobileLoadEmit,
|
|
48
48
|
mobileRefreshEmit: Te,
|
|
49
49
|
operationFilter: a,
|
|
50
|
-
enableControlPage:
|
|
50
|
+
enableControlPage: ve,
|
|
51
51
|
pagination: N,
|
|
52
52
|
paginationEmit: I = () => {
|
|
53
53
|
},
|
|
@@ -74,13 +74,13 @@ function cs({
|
|
|
74
74
|
...b
|
|
75
75
|
}) {
|
|
76
76
|
var Ie;
|
|
77
|
-
const { token: S } =
|
|
77
|
+
const { token: S } = Zt.useToken(), { Table: f } = S, ke = f.tableSpaceBetweenPage ?? 10, lt = f.cellPaddingInline ?? Et, F = f.minHeight ?? 500, { showColumnBorder: ee, hideRowBorder: ze, rowHoverable: it, ...i } = Ge(Jt), [ct, te] = V(!1), [j, at] = V([]);
|
|
78
78
|
we(() => {
|
|
79
79
|
let e = [...z ?? []];
|
|
80
80
|
(N == null ? void 0 : N.page) !== 1 && (e = [...j, ...e]), at(e);
|
|
81
81
|
}, [T ? z : 0]);
|
|
82
|
-
const Ne = d(() => !!(j != null && j.length) && (j == null ? void 0 : j.length) >=
|
|
83
|
-
var r, l,
|
|
82
|
+
const Ne = d(() => !!(j != null && j.length) && (j == null ? void 0 : j.length) >= L, [j, L]), [se, dt] = V([]), [ut, Be] = V(!1), ft = async (e, t) => {
|
|
83
|
+
var r, l, w;
|
|
84
84
|
let s, n = !1;
|
|
85
85
|
if (typeof a == "function")
|
|
86
86
|
s = (r = a == null ? void 0 : a(e, t)) == null ? void 0 : r.filter(
|
|
@@ -90,7 +90,7 @@ function cs({
|
|
|
90
90
|
Be(!0), te(!0), n = !0;
|
|
91
91
|
try {
|
|
92
92
|
const h = await (a == null ? void 0 : a.request(e, t));
|
|
93
|
-
(
|
|
93
|
+
(w = a.fieldsName) != null && w.label ? s = h == null ? void 0 : h.map((y) => {
|
|
94
94
|
var k;
|
|
95
95
|
return {
|
|
96
96
|
...y,
|
|
@@ -107,11 +107,11 @@ function cs({
|
|
|
107
107
|
}, ht = (e, t) => {
|
|
108
108
|
var s, n;
|
|
109
109
|
te(!1), (s = e.onClick) == null || s.call(e), !(e != null && e.onClick) && typeof a != "function" && (a != null && a.onClick) && a.onClick((n = se == null ? void 0 : se[t]) == null ? void 0 : n.key);
|
|
110
|
-
}, he = _(null), Se = _(null), P = _(null), me = _(null),
|
|
111
|
-
|
|
110
|
+
}, he = _(null), Se = _(null), P = _(null), me = _(null), G = Je(me), be = _(null), Y = Je(be), mt = (...e) => {
|
|
111
|
+
Ue(he), ue == null || ue(...e);
|
|
112
112
|
}, bt = (...e) => {
|
|
113
|
-
|
|
114
|
-
},
|
|
113
|
+
Ue(he), I == null || I(...e);
|
|
114
|
+
}, J = d(() => !(u != null && u.auto) && A, [u == null ? void 0 : u.auto, A]), yt = () => {
|
|
115
115
|
var s;
|
|
116
116
|
const e = (s = P.current) == null ? void 0 : s.querySelectorAll(
|
|
117
117
|
"& > .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)"
|
|
@@ -124,7 +124,7 @@ function cs({
|
|
|
124
124
|
}), t.length)
|
|
125
125
|
return Math.ceil(Math.max(...t));
|
|
126
126
|
}, Ct = () => {
|
|
127
|
-
var r, l,
|
|
127
|
+
var r, l, w, h;
|
|
128
128
|
let e = (r = P.current) == null ? void 0 : r.querySelector(
|
|
129
129
|
".ant-table-content"
|
|
130
130
|
);
|
|
@@ -132,32 +132,32 @@ function cs({
|
|
|
132
132
|
".ant-table-body"
|
|
133
133
|
));
|
|
134
134
|
let t = 0, s = !1, n = 0;
|
|
135
|
-
return e && (t = e.clientWidth - (ee ? 1 : 0), s = e.offsetWidth - e.clientWidth > 0, n = (h = (
|
|
135
|
+
return e && (t = e.clientWidth - (ee ? 1 : 0), s = e.offsetWidth - e.clientWidth > 0, n = (h = (w = P.current) == null ? void 0 : w.querySelector(
|
|
136
136
|
".ant-table-cell-scrollbar"
|
|
137
137
|
)) == null ? void 0 : h.offsetWidth), { hasScrollBar: s, scrollbarSize: n, tbodyWidth: t };
|
|
138
138
|
}, Me = d(() => {
|
|
139
|
-
const e = (z ?? []).length, t = e > (
|
|
139
|
+
const e = (z ?? []).length, t = e > (v.pc ?? 10) ? e >= 15 ? 15 : e : v.pc ?? 10;
|
|
140
140
|
return Array.from({ length: t }).map((n, r) => ({
|
|
141
141
|
key: `${Date.now()}${r}`
|
|
142
142
|
}));
|
|
143
|
-
}, [z]), oe = d(() => c ? Me : z ?? [], [c, z, Me]), { hasScrollBar: M, scrollbarSize: B, tbodyWidth:
|
|
144
|
-
if (typeof
|
|
143
|
+
}, [z]), oe = d(() => c ? Me : z ?? [], [c, z, Me]), { hasScrollBar: M, scrollbarSize: B, tbodyWidth: U } = d(() => Ct(), [oe, i.fullscreen, G == null ? void 0 : G.height]), ye = d(() => {
|
|
144
|
+
if (typeof H > "u")
|
|
145
145
|
return;
|
|
146
146
|
let e = 40, t = 40;
|
|
147
147
|
if (P.current) {
|
|
148
148
|
const k = window.getComputedStyle(P.current);
|
|
149
149
|
e = parseInt(k.getPropertyValue("--cell-height")), t = parseInt(k.getPropertyValue("--toolbar-height"));
|
|
150
150
|
}
|
|
151
|
-
const s = (
|
|
151
|
+
const s = (Y == null ? void 0 : Y.height) || 0, n = s ? ke : 0, r = E ?? F, l = H >= r ? H : r;
|
|
152
152
|
return (i.fullscreen ? window.innerHeight : l) - s - n - t - e;
|
|
153
153
|
}, [
|
|
154
154
|
i.fullscreen,
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
H,
|
|
156
|
+
E,
|
|
157
157
|
F,
|
|
158
|
-
|
|
158
|
+
Y == null ? void 0 : Y.height,
|
|
159
159
|
oe,
|
|
160
|
-
|
|
160
|
+
G == null ? void 0 : G.height,
|
|
161
161
|
i.tableSize
|
|
162
162
|
]), wt = () => {
|
|
163
163
|
let e = 0;
|
|
@@ -169,18 +169,18 @@ function cs({
|
|
|
169
169
|
}
|
|
170
170
|
let t = 0;
|
|
171
171
|
return O && (t += e), W && (t += e), D && (t += e), t;
|
|
172
|
-
}, [
|
|
173
|
-
|
|
172
|
+
}, [g, xt] = V([]), [X, gt] = V(0);
|
|
173
|
+
Ye(() => {
|
|
174
174
|
var h;
|
|
175
|
-
const e = ae ?? [], t = (h = e.find((y) => y.isOperationCol)) == null ? void 0 : h.width, s = e.filter((y) => !
|
|
175
|
+
const e = ae ?? [], t = (h = e.find((y) => y.isOperationCol)) == null ? void 0 : h.width, s = e.filter((y) => !Qt.includes(y)), r = Ut(s, i.columnsMap).sort(Xt(i.columnsMap)), l = r.findIndex((y) => y.isOperationCol);
|
|
176
176
|
l >= 0 && (r[l].width = t);
|
|
177
|
-
let
|
|
178
|
-
T || (
|
|
177
|
+
let w = 0;
|
|
178
|
+
T || (w = wt()), xt(r), gt(w);
|
|
179
179
|
}, [i.columnsMap, ae]);
|
|
180
180
|
const [C, Tt] = V([]);
|
|
181
181
|
we(() => {
|
|
182
|
-
if (
|
|
183
|
-
const e =
|
|
182
|
+
if (J) {
|
|
183
|
+
const e = g.map((t, s) => {
|
|
184
184
|
let n = t.width;
|
|
185
185
|
if (t != null && t.isOperationCol && (t != null && t.useMaxWidth)) {
|
|
186
186
|
const l = yt();
|
|
@@ -193,7 +193,7 @@ function cs({
|
|
|
193
193
|
});
|
|
194
194
|
Tt(e);
|
|
195
195
|
}
|
|
196
|
-
}, [
|
|
196
|
+
}, [g, J]);
|
|
197
197
|
const pe = _(!1), Pe = _(!1), ne = d(() => {
|
|
198
198
|
let e;
|
|
199
199
|
if (typeof ye == "number" && (e = ye - 1), typeof (u == null ? void 0 : u.y) == "number" && (e = u.y - 2), u != null && u.auto)
|
|
@@ -202,58 +202,58 @@ function cs({
|
|
|
202
202
|
y: e
|
|
203
203
|
};
|
|
204
204
|
let t = u == null ? void 0 : u.x;
|
|
205
|
-
return A && C.length && (t = C.reduce((r, l) => r + l.width, 0) +
|
|
205
|
+
return A && C.length && (t = C.reduce((r, l) => r + l.width, 0) + X, U && t < U - (M ? B : 0) && (pe.current = !0, t = U)), u != null && u.y ? { x: t, y: u.y } : { x: t, y: e };
|
|
206
206
|
}, [
|
|
207
207
|
u,
|
|
208
208
|
ye,
|
|
209
209
|
A,
|
|
210
210
|
C,
|
|
211
|
-
|
|
211
|
+
X,
|
|
212
212
|
ee,
|
|
213
213
|
M,
|
|
214
214
|
B
|
|
215
215
|
]);
|
|
216
216
|
we(() => {
|
|
217
|
-
if (
|
|
218
|
-
const t = C.reduce((r, l) => r + l.width, 0) +
|
|
217
|
+
if (J && C.length) {
|
|
218
|
+
const t = C.reduce((r, l) => r + l.width, 0) + X, n = U - (M ? B : 0);
|
|
219
219
|
if (t < n || pe.current && t > n && !Pe.current) {
|
|
220
|
-
const r = /* @__PURE__ */ new Map(), l =
|
|
221
|
-
(
|
|
220
|
+
const r = /* @__PURE__ */ new Map(), l = g.findIndex(
|
|
221
|
+
(x) => x == null ? void 0 : x.isOperationCol
|
|
222
222
|
);
|
|
223
|
-
let
|
|
224
|
-
l >= 0 && (
|
|
225
|
-
|
|
223
|
+
let w = "";
|
|
224
|
+
l >= 0 && (w = ge(
|
|
225
|
+
g[l],
|
|
226
226
|
l
|
|
227
|
-
)), C.forEach((
|
|
228
|
-
let h = n - t, y =
|
|
227
|
+
)), C.forEach((x) => r.set(x.key, x.width));
|
|
228
|
+
let h = n - t, y = g.length;
|
|
229
229
|
if (l >= 0 && y--, h >= y) {
|
|
230
|
-
const
|
|
230
|
+
const x = Math.floor(h / y);
|
|
231
231
|
r.forEach((re, le) => {
|
|
232
|
-
r.set(le, re + (
|
|
233
|
-
}), h = h -
|
|
232
|
+
r.set(le, re + (w === le ? 0 : x));
|
|
233
|
+
}), h = h - x * y;
|
|
234
234
|
}
|
|
235
235
|
let k = 0;
|
|
236
|
-
l === 0 &&
|
|
237
|
-
const q = ge(
|
|
236
|
+
l === 0 && g.length > 1 && k++;
|
|
237
|
+
const q = ge(g[k]);
|
|
238
238
|
r.set(q, r.get(q) + h);
|
|
239
239
|
const p = { ...i.columnsMap };
|
|
240
|
-
for (const
|
|
241
|
-
p[
|
|
240
|
+
for (const x in p)
|
|
241
|
+
p[x].show && (p[x].width = r.get(x));
|
|
242
242
|
i.setColumnsMap(p);
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
}, [
|
|
246
|
-
|
|
246
|
+
J,
|
|
247
247
|
C,
|
|
248
|
-
|
|
248
|
+
X,
|
|
249
249
|
ee,
|
|
250
250
|
M,
|
|
251
251
|
B
|
|
252
252
|
]);
|
|
253
253
|
const $ = d(() => {
|
|
254
254
|
if (T)
|
|
255
|
-
return
|
|
256
|
-
const e =
|
|
255
|
+
return g;
|
|
256
|
+
const e = g.length - 1, t = g.map((s, n) => {
|
|
257
257
|
var r;
|
|
258
258
|
return {
|
|
259
259
|
...s,
|
|
@@ -272,12 +272,16 @@ function cs({
|
|
|
272
272
|
},
|
|
273
273
|
width: C.length ? (r = C[n]) == null ? void 0 : r.width : (s == null ? void 0 : s.width) || void 0,
|
|
274
274
|
...ne.x !== void 0 ? {
|
|
275
|
-
onHeaderCell: (l) =>
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
275
|
+
onHeaderCell: (l) => {
|
|
276
|
+
var w;
|
|
277
|
+
return {
|
|
278
|
+
...(w = s.onHeaderCell) == null ? void 0 : w.call(s),
|
|
279
|
+
width: l.width,
|
|
280
|
+
stretchref: Se,
|
|
281
|
+
datagridref: me,
|
|
282
|
+
onResize: jt(n)
|
|
283
|
+
};
|
|
284
|
+
}
|
|
281
285
|
} : {},
|
|
282
286
|
...!(s != null && s.render) && s.copyable ? {
|
|
283
287
|
render: (l) => ["number", "bigint"].includes(typeof l) ? l : /* @__PURE__ */ o.jsx(rs, { value: l })
|
|
@@ -291,18 +295,18 @@ function cs({
|
|
|
291
295
|
!!O,
|
|
292
296
|
!!W
|
|
293
297
|
);
|
|
294
|
-
}, [
|
|
298
|
+
}, [g, C]), jt = (e) => (t, { size: s, minWidth: n }) => {
|
|
295
299
|
const l = (s.width > n ? s.width : n) - C[e].width;
|
|
296
300
|
if (l === 0)
|
|
297
301
|
return;
|
|
298
|
-
const h = C.reduce((
|
|
299
|
-
let q = "", p = -1,
|
|
302
|
+
const h = C.reduce((Z, K) => Z + K.width, 0) + l + X, k = U - (M ? B : 0);
|
|
303
|
+
let q = "", p = -1, x = 0;
|
|
300
304
|
if (l < 0 && h < k) {
|
|
301
305
|
p = e + 1;
|
|
302
|
-
const
|
|
303
|
-
(e ===
|
|
306
|
+
const Z = g.length - 1, K = g[Z];
|
|
307
|
+
(e === Z - 1 && (K != null && K.isOperationCol) || e === Z && !(K != null && K.isOperationCol)) && (p = e - 1);
|
|
304
308
|
let De = 0;
|
|
305
|
-
ne.x > k && (De = ne.x - k), q = `${C[p].key}`,
|
|
309
|
+
ne.x > k && (De = ne.x - k), q = `${C[p].key}`, x = C[p].width - l - De;
|
|
306
310
|
}
|
|
307
311
|
const re = `${C[e].key}`, le = {
|
|
308
312
|
...i.columnsMap,
|
|
@@ -313,12 +317,12 @@ function cs({
|
|
|
313
317
|
...q && p >= 0 && {
|
|
314
318
|
[q]: {
|
|
315
319
|
...i.columnsMap[q],
|
|
316
|
-
width:
|
|
320
|
+
width: x
|
|
317
321
|
}
|
|
318
322
|
}
|
|
319
323
|
};
|
|
320
324
|
i.setColumnsMap(le), Pe.current = !0, i.persistenceType === "online" && i.persistenceKey && i.startAutoSaveCountdown();
|
|
321
|
-
},
|
|
325
|
+
}, He = d(() => es($), [$]), kt = d(() => c ? He : $, [c, $, He]), { table: Ce, locale: zt = At } = Ge(ls), Nt = { ...zt.Table }, Bt = ((Ie = Ce == null ? void 0 : Ce.expandable) == null ? void 0 : Ie.expandIcon) || (W == null ? void 0 : W.expandIcon) || vt(Nt), Le = d(() => {
|
|
322
326
|
if (W)
|
|
323
327
|
return {
|
|
324
328
|
...W,
|
|
@@ -338,7 +342,7 @@ function cs({
|
|
|
338
342
|
};
|
|
339
343
|
}
|
|
340
344
|
};
|
|
341
|
-
}, [W]), Wt = d(() => c ?
|
|
345
|
+
}, [W]), Wt = d(() => c ? Le : W, [c, W, Le]), Re = d(() => {
|
|
342
346
|
if (O)
|
|
343
347
|
return {
|
|
344
348
|
...O,
|
|
@@ -370,10 +374,10 @@ function cs({
|
|
|
370
374
|
b.sticky
|
|
371
375
|
]), Pt = d(() => ({
|
|
372
376
|
"--container-bgColor": S.colorBgContainer
|
|
373
|
-
}), [S.colorBgContainer]),
|
|
374
|
-
const e =
|
|
377
|
+
}), [S.colorBgContainer]), Ht = d(() => {
|
|
378
|
+
const e = E ?? F;
|
|
375
379
|
let t;
|
|
376
|
-
|
|
380
|
+
H && (t = H >= e ? H : e);
|
|
377
381
|
const s = i.fullscreen ? "100%" : t;
|
|
378
382
|
let n;
|
|
379
383
|
return (B ?? 0) > 0 && (n = B), ts({
|
|
@@ -389,13 +393,13 @@ function cs({
|
|
|
389
393
|
}, [
|
|
390
394
|
b.style,
|
|
391
395
|
i.fullscreen,
|
|
392
|
-
|
|
393
|
-
|
|
396
|
+
H,
|
|
397
|
+
E,
|
|
394
398
|
F,
|
|
395
399
|
f,
|
|
396
400
|
i == null ? void 0 : i.zebra,
|
|
397
401
|
B
|
|
398
|
-
]),
|
|
402
|
+
]), Lt = ie(
|
|
399
403
|
(e, t, s) => {
|
|
400
404
|
const n = t % 2 === 0 ? "oddRow" : "evenRow";
|
|
401
405
|
if (b.rowClassName) {
|
|
@@ -454,7 +458,7 @@ function cs({
|
|
|
454
458
|
},
|
|
455
459
|
t
|
|
456
460
|
)),
|
|
457
|
-
Array.from({ length:
|
|
461
|
+
Array.from({ length: v.mobile ?? 2 }).map((e, t) => /* @__PURE__ */ o.jsx(
|
|
458
462
|
"div",
|
|
459
463
|
{
|
|
460
464
|
className: "listItem",
|
|
@@ -467,8 +471,8 @@ function cs({
|
|
|
467
471
|
{
|
|
468
472
|
title: !1,
|
|
469
473
|
paragraph: {
|
|
470
|
-
rows:
|
|
471
|
-
width:
|
|
474
|
+
rows: Ze,
|
|
475
|
+
width: Ee
|
|
472
476
|
},
|
|
473
477
|
active: !0
|
|
474
478
|
}
|
|
@@ -487,26 +491,26 @@ function cs({
|
|
|
487
491
|
T ? f : 0,
|
|
488
492
|
T ? j : 0,
|
|
489
493
|
T ? $ : 0,
|
|
490
|
-
T ?
|
|
494
|
+
T ? v : 0,
|
|
491
495
|
T ? de : 0
|
|
492
496
|
]);
|
|
493
|
-
|
|
497
|
+
Ye(() => {
|
|
494
498
|
i.setSelected(!!(m != null && m.num));
|
|
495
499
|
}, [m]);
|
|
496
500
|
const qe = d(() => /* @__PURE__ */ o.jsxs("div", { className: "alert", children: [
|
|
497
501
|
/* @__PURE__ */ o.jsx(
|
|
498
|
-
|
|
502
|
+
Qe,
|
|
499
503
|
{
|
|
500
504
|
highlightTag: "strong",
|
|
501
|
-
keywords: `${
|
|
502
|
-
sourceString: `共 ${
|
|
505
|
+
keywords: `${L}`,
|
|
506
|
+
sourceString: `共 ${L} 条`,
|
|
503
507
|
tagClass: "totalText"
|
|
504
508
|
}
|
|
505
509
|
),
|
|
506
510
|
!!m && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
507
511
|
/* @__PURE__ */ o.jsx(xe.Text, { className: "splitBorder", children: "/" }),
|
|
508
512
|
/* @__PURE__ */ o.jsx(
|
|
509
|
-
|
|
513
|
+
Qe,
|
|
510
514
|
{
|
|
511
515
|
highlightTag: "strong",
|
|
512
516
|
keywords: `${(m == null ? void 0 : m.num) ?? 0}`,
|
|
@@ -522,21 +526,21 @@ function cs({
|
|
|
522
526
|
}
|
|
523
527
|
)
|
|
524
528
|
] })
|
|
525
|
-
] }), [
|
|
529
|
+
] }), [L, m]), Rt = (e) => {
|
|
526
530
|
c || fe == null || fe(e);
|
|
527
531
|
}, Ve = ie(() => D ? {
|
|
528
532
|
row: (e) => ss({ ...e, loading: c == null ? void 0 : c.toString() })
|
|
529
533
|
} : {}, [D, D ? c : !1]), _e = ie(
|
|
530
534
|
(e) => {
|
|
531
535
|
var n, r;
|
|
532
|
-
if (
|
|
536
|
+
if (J)
|
|
533
537
|
return ns({ ...e, hasScrollBar: M, scrollbarSize: B });
|
|
534
538
|
const t = { ...e };
|
|
535
539
|
return ((n = t.className) == null ? void 0 : n.includes(
|
|
536
540
|
"ant-table-cell-fix-right"
|
|
537
541
|
)) && !M && ((r = t.style) != null && r.right) && (t.style = { ...t.style ?? {} }, t.style.right = Number(t.style.right ?? 0) - (B || 0)), /* @__PURE__ */ o.jsx("th", { ...t });
|
|
538
542
|
},
|
|
539
|
-
[M, B,
|
|
543
|
+
[M, B, J]
|
|
540
544
|
), $t = d(() => ({
|
|
541
545
|
...R,
|
|
542
546
|
header: {
|
|
@@ -555,9 +559,9 @@ function cs({
|
|
|
555
559
|
fullscreen: i.fullscreen
|
|
556
560
|
}),
|
|
557
561
|
style: Pt,
|
|
558
|
-
...
|
|
562
|
+
...Xe,
|
|
559
563
|
children: [
|
|
560
|
-
!T && /* @__PURE__ */ o.jsxs("div", { ref: P, className: pt, style:
|
|
564
|
+
!T && /* @__PURE__ */ o.jsxs("div", { ref: P, className: pt, style: Ht, children: [
|
|
561
565
|
/* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref: me, children: [
|
|
562
566
|
tt && /* @__PURE__ */ o.jsxs("div", { className: "bitzTableToolbarBlock", children: [
|
|
563
567
|
st || /* @__PURE__ */ o.jsx("div", {}),
|
|
@@ -597,7 +601,7 @@ function cs({
|
|
|
597
601
|
rowSelection: St,
|
|
598
602
|
onRow: Mt,
|
|
599
603
|
rowHoverable: it,
|
|
600
|
-
rowClassName:
|
|
604
|
+
rowClassName: Lt,
|
|
601
605
|
className: "bitzTable",
|
|
602
606
|
components: $t,
|
|
603
607
|
rowKey: $e,
|
|
@@ -608,15 +612,15 @@ function cs({
|
|
|
608
612
|
}
|
|
609
613
|
)
|
|
610
614
|
] }),
|
|
611
|
-
|
|
615
|
+
Q && !!L && /* @__PURE__ */ o.jsxs("div", { className: "bitzTablePagination", ref: be, children: [
|
|
612
616
|
qe,
|
|
613
617
|
/* @__PURE__ */ o.jsx(
|
|
614
618
|
_t,
|
|
615
619
|
{
|
|
616
620
|
size: "small",
|
|
617
|
-
enableControl:
|
|
621
|
+
enableControl: ve,
|
|
618
622
|
pagination: N,
|
|
619
|
-
total:
|
|
623
|
+
total: L,
|
|
620
624
|
dataSource: z,
|
|
621
625
|
resetPage: rt,
|
|
622
626
|
hideTotalText: !0,
|
|
@@ -624,13 +628,13 @@ function cs({
|
|
|
624
628
|
}
|
|
625
629
|
)
|
|
626
630
|
] }),
|
|
627
|
-
!
|
|
631
|
+
!Q && !!m && !!L && /* @__PURE__ */ o.jsx("div", { className: "bitzTablePagination", ref: be, children: qe })
|
|
628
632
|
] }),
|
|
629
633
|
T && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
630
634
|
(c || !!(z != null && z.length)) && /* @__PURE__ */ o.jsx(o.Fragment, { children: Te ? (
|
|
631
635
|
// @ts-ignore
|
|
632
636
|
/* @__PURE__ */ o.jsx(
|
|
633
|
-
|
|
637
|
+
Gt,
|
|
634
638
|
{
|
|
635
639
|
onRefresh: async () => !c && Te(),
|
|
636
640
|
children: Oe
|
|
@@ -670,7 +674,7 @@ function cs({
|
|
|
670
674
|
}
|
|
671
675
|
);
|
|
672
676
|
}
|
|
673
|
-
const Is = (
|
|
677
|
+
const Is = (Q) => /* @__PURE__ */ o.jsx(Yt, { initValue: Q, children: /* @__PURE__ */ o.jsx(cs, { ...Q }) });
|
|
674
678
|
export {
|
|
675
679
|
Is as default
|
|
676
680
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { Skeleton as
|
|
3
|
-
import { toolCols as
|
|
4
|
-
function
|
|
1
|
+
import { j as E } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { Skeleton as O, Table as f } from "antd";
|
|
3
|
+
import { toolCols as I, SORTER_COLUMN as p } from "../Store/index.mjs";
|
|
4
|
+
function S(t) {
|
|
5
5
|
return t == null ? void 0 : t.map((e) => {
|
|
6
6
|
const o = { ...e };
|
|
7
|
-
return e != null && e.isOperationCol || e != null && e.isCheckboxCol || e != null && e.isExpandIconCol ||
|
|
7
|
+
return e != null && e.isOperationCol || e != null && e.isCheckboxCol || e != null && e.isExpandIconCol || I.includes(e) ? e : (o != null && o.children && (o.children = S(o == null ? void 0 : o.children)), {
|
|
8
8
|
...o,
|
|
9
9
|
sorter: !1,
|
|
10
|
-
render: (
|
|
11
|
-
|
|
10
|
+
render: (c, d, n) => /* @__PURE__ */ E.jsx(
|
|
11
|
+
O,
|
|
12
12
|
{
|
|
13
13
|
active: !0,
|
|
14
14
|
title: !1,
|
|
15
15
|
paragraph: {
|
|
16
16
|
rows: 1,
|
|
17
|
-
width: (
|
|
17
|
+
width: (n + 1) % 2 === 0 ? "100%" : "60%"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
)
|
|
@@ -22,35 +22,35 @@ function I(t) {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
const L = (t) => {
|
|
25
|
-
var o,
|
|
26
|
-
let e = (
|
|
27
|
-
e || (e = (
|
|
25
|
+
var o, c, d, n;
|
|
26
|
+
let e = (c = (o = t.current) == null ? void 0 : o.nativeElement) == null ? void 0 : c.querySelector(".ant-table-content");
|
|
27
|
+
e || (e = (n = (d = t.current) == null ? void 0 : d.nativeElement) == null ? void 0 : n.querySelector(".ant-table-body")), e && e.scroll({
|
|
28
28
|
top: 0,
|
|
29
29
|
left: 0
|
|
30
30
|
// behavior: 'smooth'
|
|
31
31
|
});
|
|
32
|
-
},
|
|
33
|
-
function
|
|
34
|
-
const
|
|
35
|
-
let
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
32
|
+
}, a = 0, C = 1, h = 2;
|
|
33
|
+
function y(t, e, o, c, d) {
|
|
34
|
+
const n = [...t ?? []], x = [...e];
|
|
35
|
+
let r = n.indexOf(p);
|
|
36
|
+
o ? r === -1 && (r = a) : r = -1;
|
|
37
|
+
let l = n.indexOf(f.SELECTION_COLUMN);
|
|
38
|
+
c ? l === -1 && (r === a ? l = C : r === -1 && (l = 0)) : l = -1;
|
|
39
|
+
let i = n.indexOf(f.EXPAND_COLUMN);
|
|
40
|
+
return d ? i === -1 && (r === a && l === C ? i = h : r === -1 && l === -1 ? i = 0 : (r === a && l === -1 || r === -1 && [0, C].includes(l)) && (i = 1)) : i = -1, [
|
|
41
|
+
{ key: "sorter", order: r, col: p },
|
|
42
|
+
{
|
|
43
|
+
key: "selection",
|
|
44
|
+
order: l,
|
|
45
|
+
col: f.SELECTION_COLUMN
|
|
46
|
+
},
|
|
47
|
+
{ key: "expand", order: i, col: f.EXPAND_COLUMN }
|
|
48
|
+
].filter((s) => s.order >= 0).sort((s, u) => s.order - u.order).forEach((s) => {
|
|
49
|
+
x.splice(s.order, 0, s.col);
|
|
50
|
+
}), x;
|
|
51
51
|
}
|
|
52
52
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
y as getColumnsWithTool,
|
|
54
|
+
S as loopBuildSkeleton,
|
|
55
55
|
L as resetScroll
|
|
56
56
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { j as e } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import { Flex as l, Switch as i } from "antd";
|
|
3
|
-
import { useId as
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
return /* @__PURE__ */ e.jsxs(l, { gap: 10, children: [
|
|
7
|
-
/* @__PURE__ */ e.jsx("label", { htmlFor: `${
|
|
3
|
+
import { useId as n } from "react";
|
|
4
|
+
const s = "stylesScope", h = ({ value: t, disabled: o, onChange: c }) => {
|
|
5
|
+
const r = n();
|
|
6
|
+
return /* @__PURE__ */ e.jsxs(l, { align: "center", gap: 10, children: [
|
|
7
|
+
/* @__PURE__ */ e.jsx("label", { htmlFor: `${s}${r}`, className: "stylesScopeLabel", children: "应用到全局表格" }),
|
|
8
8
|
/* @__PURE__ */ e.jsx(
|
|
9
9
|
i,
|
|
10
10
|
{
|
|
11
|
-
id: `${
|
|
12
|
-
value:
|
|
11
|
+
id: `${s}${r}`,
|
|
12
|
+
value: t,
|
|
13
13
|
onChange: c,
|
|
14
|
-
disabled:
|
|
14
|
+
disabled: o,
|
|
15
15
|
checkedChildren: "是",
|
|
16
16
|
unCheckedChildren: "否"
|
|
17
17
|
}
|
|
@@ -19,5 +19,5 @@ const r = "stylesScope", m = ({ value: o, disabled: t, onChange: c }) => {
|
|
|
19
19
|
] });
|
|
20
20
|
};
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
h as default
|
|
23
23
|
};
|
|
@@ -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 p } from "./factoryWithTypeCheckers.mjs";
|
|
5
5
|
import { __require as t } from "./factoryWithThrowingShims.mjs";
|