bitz-react-admin-ui 2.4.2 → 2.4.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/components/BitzConfigProvider/index.d.ts +2 -0
- package/dist/components/BitzTable/ActionCol/index.d.ts +2 -1
- package/dist/components/BitzTable/ActionCol/index.mjs +127 -94
- 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 +339 -320
- package/dist/components/BitzTable/index.d.ts +21 -6
- package/dist/components/BitzTableSelect/Select/index.d.ts +1 -1
- package/dist/components/BitzTableSelect/Select/index.mjs +70 -69
- package/dist/components/BitzTableSelect/SingleSelect/index.d.ts +1 -1
- package/dist/components/BitzTableSelect/SingleSelect/index.mjs +73 -72
- 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 Re, useState as z, useEffect as ie, useMemo as d, useRef as Q, useCallback as U } from "react";
|
|
3
|
+
import { isMobile as X } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
|
|
4
|
+
import { Skeleton as St, Typography as $e, Table as kt, Spin as pt } from "antd";
|
|
5
|
+
import ae from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
6
|
+
import vt from "../../BitzDrawer/index.mjs";
|
|
7
|
+
import Mt from "../../BitzPagination/index.mjs";
|
|
8
|
+
import Lt 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 ce 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 qe 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: q = !0,
|
|
31
|
+
height: p,
|
|
32
|
+
minHeight: O,
|
|
33
|
+
dataSource: x,
|
|
34
|
+
total: T = 0,
|
|
35
|
+
columns: Y,
|
|
35
36
|
loading: i,
|
|
36
|
-
skeletonNum:
|
|
37
|
+
skeletonNum: Z = {
|
|
37
38
|
pc: 10,
|
|
38
39
|
mobile: 10
|
|
39
40
|
},
|
|
40
|
-
skeletonRender:
|
|
41
|
-
skeletonRowNum:
|
|
42
|
-
skeletonRowsWidth:
|
|
41
|
+
skeletonRender: de,
|
|
42
|
+
skeletonRowNum: Ve = 4,
|
|
43
|
+
skeletonRowsWidth: Ke = ["35%", "100%", "100%", "60%"],
|
|
43
44
|
// mobileLoadEmit,
|
|
44
|
-
mobileRefreshEmit:
|
|
45
|
-
operationFilter:
|
|
46
|
-
enableControlPage:
|
|
47
|
-
pagination:
|
|
48
|
-
paginationEmit:
|
|
45
|
+
mobileRefreshEmit: he,
|
|
46
|
+
operationFilter: b,
|
|
47
|
+
enableControlPage: Oe,
|
|
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:
|
|
51
|
+
enabledRowDragSort: P,
|
|
52
|
+
onRowDragEnd: E,
|
|
53
|
+
mobilePageHeight: At = 500,
|
|
54
|
+
mobileCancelText: De = "取消",
|
|
55
|
+
noDataTitle: _e,
|
|
56
|
+
noDataImg: Ge,
|
|
57
|
+
color: Ft,
|
|
58
|
+
size: fe,
|
|
59
|
+
showTableTool: Ie = !0,
|
|
60
|
+
tableAction: Je,
|
|
61
|
+
tableToolbar: Qe,
|
|
62
|
+
selectionBar: Ue,
|
|
63
|
+
scroll: c,
|
|
64
|
+
components: N,
|
|
65
|
+
expandable: w,
|
|
66
|
+
rowSelection: v,
|
|
66
67
|
selectionAlert: h,
|
|
67
|
-
resetPage:
|
|
68
|
-
...
|
|
68
|
+
resetPage: Xe,
|
|
69
|
+
...y
|
|
69
70
|
}) {
|
|
70
|
-
var
|
|
71
|
-
const { token:
|
|
72
|
-
tableSpaceBetweenPage:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
71
|
+
var He;
|
|
72
|
+
const { token: W } = Ot.useToken(), { Table: f } = W, {
|
|
73
|
+
tableSpaceBetweenPage: ue = 10,
|
|
74
|
+
minHeight: _ = 500,
|
|
75
|
+
cellPaddingInline: Ye = Dt
|
|
76
|
+
} = f, { showColumnBorder: me, hideRowBorder: be, rowHoverable: Ze, ...m } = Re($t), [M, Ee] = z(void 0), [A, Ae] = z(0), [F, Fe] = z(0), [G, et] = z(0), [ye, es] = z(0), [tt, I] = z(!1), [C, st] = z([]);
|
|
77
|
+
ie(() => {
|
|
78
|
+
let e = [...x ?? []];
|
|
79
|
+
(g == null ? void 0 : g.page) !== 1 && (e = [...C, ...e]), st(e);
|
|
80
|
+
}, [x]);
|
|
81
|
+
const rt = d(() => !!(C != null && C.length) && (C == null ? void 0 : C.length) >= T, [C, T]), [ot, nt] = z([]), [lt, xe] = z(!1), it = async (e, t) => {
|
|
82
|
+
var n, l;
|
|
83
|
+
let s, o = !1;
|
|
84
|
+
if (typeof b == "function")
|
|
85
|
+
s = (n = b == null ? void 0 : b(e, t)) == null ? void 0 : n.filter(
|
|
86
|
+
(a) => a.type !== "divider"
|
|
87
|
+
);
|
|
88
|
+
else if (s = (l = b == null ? void 0 : b.custom) == null ? void 0 : l.call(b, e, t), b != null && b.request) {
|
|
89
|
+
xe(!0), I(!0), o = !0;
|
|
90
|
+
try {
|
|
91
|
+
s = await (b == null ? void 0 : b.request(e, t));
|
|
92
|
+
} finally {
|
|
93
|
+
xe(!1);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
s != null && s.length && (nt(s), o || I(!0));
|
|
97
|
+
}, Ce = () => {
|
|
98
|
+
I(!1);
|
|
99
|
+
}, at = (e) => {
|
|
88
100
|
var t;
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
var
|
|
92
|
-
const e = (
|
|
101
|
+
I(!1), (t = e.onClick) == null || t.call(e);
|
|
102
|
+
}, ct = Q(null), j = Q(null), ee = ce(j), ge = Q(null), te = ce(ge), se = Q(null), R = ce(se), dt = () => {
|
|
103
|
+
var s;
|
|
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,
|
|
104
|
-
let e = (n =
|
|
113
|
+
return Math.ceil(Math.max(...t)) + Ye * 2;
|
|
114
|
+
}, we = () => {
|
|
115
|
+
var n, l, a, 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 - (me ? 1 : 0), s = e.offsetWidth - e.clientWidth > 0, o = (u = (a = j.current) == null ? void 0 : a.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: re, tbodyWidth: $, hasScrollBar: V, scrollbarSize: K } = d(() => {
|
|
127
|
+
const { tbodyWidth: e, hasScrollBar: t, scrollbarSize: s } = we();
|
|
128
|
+
if (typeof p > "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 Pe = window.getComputedStyle(j.current);
|
|
137
|
+
o = parseInt(Pe.getPropertyValue("--cell-height")), n = parseInt(Pe.getPropertyValue("--toolbar-height"));
|
|
126
138
|
}
|
|
127
|
-
const l = (
|
|
128
|
-
return { y:
|
|
139
|
+
const l = (R == null ? void 0 : R.height) || 0, a = l ? ue : 0, H = (m.fullscreen ? window.innerHeight : p) - l - a - n - o, B = O ?? _;
|
|
140
|
+
return { y: H >= B ? H : B, tbodyWidth: e, hasScrollBar: t, scrollbarSize: s };
|
|
129
141
|
}, [
|
|
130
142
|
m.fullscreen,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
143
|
+
p,
|
|
144
|
+
O,
|
|
145
|
+
_,
|
|
146
|
+
R == null ? void 0 : R.height,
|
|
147
|
+
ee == null ? void 0 : ee.height,
|
|
148
|
+
te == null ? void 0 : te.height
|
|
149
|
+
]), oe = d(() => {
|
|
150
|
+
let e = (c == null ? void 0 : c.x) ?? 1e3;
|
|
151
|
+
return A && (e -= A), F && M && (e -= F * M), $ && (c != null && c.x && e < $ && (c == null ? void 0 : c.x) > $ && et($ - e), e = Math.max(e, $), e += ye), c != null && c.x ? { x: e, y: c.y || re } : c != null && c.y ? { x: e, y: c.y } : { x: e, y: re };
|
|
152
|
+
}, [c, re, $, A, F, ye]), 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 v && (t += e), w && (t += e), P && (t += e), t;
|
|
162
|
+
}, ft = (e, t) => {
|
|
163
|
+
const s = e.length, o = e.filter((B) => B.width), l = o.map((B) => B.width).reduce((B, J) => B + J, 0), { tbodyWidth: a } = we(), k = Math.max((c == null ? void 0 : c.x) ?? 1e3, a ?? 0) - l - t, H = s - o.length;
|
|
164
|
+
return k >= 0 ? Math.floor(k / H) : 0;
|
|
165
|
+
}, { sortColumns: S, toolColWidth: We } = d(() => {
|
|
166
|
+
const t = (Y ?? []).filter((u) => !qt.includes(u)), { filterColumns: s, hiddenTotalWidth: o, autoWidthColLength: n } = Vt(
|
|
153
167
|
t,
|
|
154
168
|
m.columnsMap
|
|
155
|
-
), l =
|
|
156
|
-
let
|
|
157
|
-
return
|
|
158
|
-
}, [m.columnsMap,
|
|
159
|
-
|
|
160
|
-
if (
|
|
169
|
+
), l = s.sort(Kt(m.columnsMap));
|
|
170
|
+
let a = 0;
|
|
171
|
+
return X || (a = ht(), Ee(ft(t, a)), Ae(o), Fe(n)), { sortColumns: l, toolColWidth: a };
|
|
172
|
+
}, [m.columnsMap, Y]), [ne, ut] = z([]);
|
|
173
|
+
ie(() => {
|
|
174
|
+
if (M) {
|
|
161
175
|
let e = 0, t = 0;
|
|
162
|
-
if (
|
|
163
|
-
const l =
|
|
164
|
-
(
|
|
176
|
+
if (G) {
|
|
177
|
+
const l = S == null ? void 0 : S.filter(
|
|
178
|
+
(a) => !a.width && !(a != null && a.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, a) => {
|
|
183
|
+
let u = l.width;
|
|
184
|
+
return l != null && l.isOperationCol && (o = a, l != null && l.useMaxWidth && (u = dt() ?? l.width)), !u && M && (u = M + e), s += u ?? 0, u;
|
|
171
185
|
});
|
|
172
|
-
if (
|
|
173
|
-
const l =
|
|
174
|
-
let
|
|
175
|
-
if (
|
|
176
|
-
let
|
|
186
|
+
if (s < oe.x - We) {
|
|
187
|
+
const l = oe.x - We - s;
|
|
188
|
+
let a = l, u = S.length;
|
|
189
|
+
if (o >= 0 && u--, l >= u) {
|
|
190
|
+
let H = Math.floor(l / u);
|
|
177
191
|
n = n.map(
|
|
178
|
-
(
|
|
179
|
-
),
|
|
192
|
+
(B, J) => B + (o === J ? 0 : H)
|
|
193
|
+
), a = l - H * u;
|
|
180
194
|
}
|
|
181
|
-
let
|
|
182
|
-
|
|
195
|
+
let k = 0;
|
|
196
|
+
o === 0 && n.length > 1 && k++, n[k] = (n[k] ?? 0) + a + t;
|
|
183
197
|
}
|
|
184
|
-
|
|
198
|
+
ut(n);
|
|
185
199
|
}
|
|
186
|
-
}, [
|
|
187
|
-
const
|
|
188
|
-
if (
|
|
189
|
-
return
|
|
190
|
-
const e =
|
|
200
|
+
}, [M, G]);
|
|
201
|
+
const L = d(() => {
|
|
202
|
+
if (X)
|
|
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: ne.length ? ne[s] : M
|
|
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
|
+
Y,
|
|
209
223
|
e,
|
|
210
|
-
|
|
211
|
-
!!
|
|
212
|
-
!!
|
|
224
|
+
P,
|
|
225
|
+
!!v,
|
|
226
|
+
!!w
|
|
213
227
|
);
|
|
214
|
-
}, [
|
|
215
|
-
const e = (
|
|
216
|
-
return Array.from({ length: t }).map((
|
|
228
|
+
}, [S, ne]), je = d(() => Jt(L), [L]), mt = d(() => i ? je : L, [i, L, je]), Be = d(() => {
|
|
229
|
+
const e = (x ?? []).length, t = e > (Z.pc ?? 10) ? e >= 20 ? 20 : e : Z.pc ?? 10;
|
|
230
|
+
return Array.from({ length: t }).map((o, n) => ({
|
|
217
231
|
key: `${Date.now()}${n}`
|
|
218
232
|
}));
|
|
219
|
-
}, [
|
|
220
|
-
if (
|
|
233
|
+
}, [x]), ze = d(() => i ? Be : x ?? [], [i, x, Be]), { table: le, locale: bt = Gt } = Re(Yt), yt = { ...bt.Table }, xt = ((He = le == null ? void 0 : le.expandable) == null ? void 0 : He.expandIcon) || (w == null ? void 0 : w.expandIcon) || _t(yt), Te = d(() => {
|
|
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 = xt(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]), Ct = d(() => i ? Te : w, [i, w, Te]), Ne = d(() => {
|
|
254
|
+
if (v)
|
|
241
255
|
return {
|
|
242
|
-
...
|
|
256
|
+
...v,
|
|
243
257
|
selectedRowKeys: [],
|
|
244
258
|
getCheckboxProps: () => ({ disabled: !0 })
|
|
245
259
|
};
|
|
246
|
-
}, [
|
|
260
|
+
}, [v]), gt = d(() => i ? Ne : v, [i, v, Ne]), Se = d(() => i ? "key" : y.rowKey, [i, y.rowKey]), ke = d(() => `${fe ?? m.stylesConfig.size}BitzTable`, [fe, m.stylesConfig.size]), wt = U(
|
|
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 = d(() => ae(
|
|
256
270
|
"bitzTableContainer",
|
|
257
|
-
{ hideBorder:
|
|
258
|
-
{ hasScrollBar:
|
|
259
|
-
|
|
260
|
-
|
|
271
|
+
{ hideBorder: be },
|
|
272
|
+
{ hasScrollBar: V },
|
|
273
|
+
ke,
|
|
274
|
+
y.className
|
|
261
275
|
), [
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
276
|
+
y.className,
|
|
277
|
+
ke,
|
|
278
|
+
V,
|
|
265
279
|
m.fullscreen,
|
|
266
|
-
|
|
267
|
-
]),
|
|
268
|
-
"--container-bgColor":
|
|
269
|
-
}), [
|
|
270
|
-
const e =
|
|
280
|
+
be
|
|
281
|
+
]), jt = d(() => ({
|
|
282
|
+
"--container-bgColor": W.colorBgContainer
|
|
283
|
+
}), [W.colorBgContainer]), Bt = d(() => {
|
|
284
|
+
const e = O ?? _;
|
|
271
285
|
let t;
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
286
|
+
p && (t = p >= e ? p : e);
|
|
287
|
+
const s = m.fullscreen ? "100%" : t;
|
|
288
|
+
let o;
|
|
289
|
+
return (K ?? 0) > 0 && (o = K), Qt({
|
|
290
|
+
height: s,
|
|
291
|
+
token: W,
|
|
292
|
+
evenRowBgColor: m.zebra ? f == null ? void 0 : f.evenRowBgColor : W.colorBgContainer,
|
|
293
|
+
table: f,
|
|
294
|
+
gap: ue,
|
|
295
|
+
borderColor: (f == null ? void 0 : f.borderColor) || W.colorBorderSecondary,
|
|
296
|
+
scrollbarWidth: o,
|
|
297
|
+
other: y.style
|
|
281
298
|
});
|
|
282
299
|
}, [
|
|
283
|
-
|
|
300
|
+
y.style,
|
|
284
301
|
m.fullscreen,
|
|
285
|
-
|
|
286
|
-
|
|
302
|
+
p,
|
|
303
|
+
O,
|
|
304
|
+
_,
|
|
305
|
+
f,
|
|
287
306
|
m == null ? void 0 : m.zebra,
|
|
288
|
-
|
|
289
|
-
]),
|
|
290
|
-
(e, t,
|
|
291
|
-
const
|
|
292
|
-
if (
|
|
293
|
-
const n =
|
|
294
|
-
return
|
|
307
|
+
K
|
|
308
|
+
]), zt = U(
|
|
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
|
+
), pe = /* @__PURE__ */ r.jsx(
|
|
319
|
+
Ht,
|
|
301
320
|
{
|
|
302
|
-
finished:
|
|
321
|
+
finished: rt,
|
|
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: f == null ? void 0 : f.mobileListBgColor },
|
|
315
334
|
children: [
|
|
316
|
-
|
|
335
|
+
C == null ? void 0 : C.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: f == null ? void 0 : f.listItemBgColor },
|
|
340
|
+
onClick: () => it(e, t),
|
|
341
|
+
children: L == null ? void 0 : L.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: Z.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: f == null ? void 0 : f.listItemBgColor
|
|
355
374
|
},
|
|
356
|
-
children: /* @__PURE__ */
|
|
357
|
-
|
|
375
|
+
children: /* @__PURE__ */ r.jsx("div", { className: "row", children: de ? de() : /* @__PURE__ */ r.jsx(
|
|
376
|
+
St,
|
|
358
377
|
{
|
|
359
378
|
title: !1,
|
|
360
379
|
paragraph: {
|
|
361
|
-
rows:
|
|
362
|
-
width:
|
|
380
|
+
rows: Ve,
|
|
381
|
+
width: Ke
|
|
363
382
|
},
|
|
364
383
|
active: !0
|
|
365
384
|
}
|
|
@@ -372,31 +391,31 @@ function It({
|
|
|
372
391
|
)
|
|
373
392
|
}
|
|
374
393
|
);
|
|
375
|
-
|
|
394
|
+
ie(() => {
|
|
376
395
|
m.setSelected(!!(h != null && h.num));
|
|
377
396
|
}, [h]);
|
|
378
|
-
const
|
|
379
|
-
/* @__PURE__ */
|
|
380
|
-
|
|
397
|
+
const ve = d(() => /* @__PURE__ */ r.jsxs("div", { className: "alert", children: [
|
|
398
|
+
/* @__PURE__ */ r.jsx(
|
|
399
|
+
qe,
|
|
381
400
|
{
|
|
382
401
|
highlightTag: "strong",
|
|
383
|
-
keywords: `${
|
|
384
|
-
sourceString: `共 ${
|
|
402
|
+
keywords: `${T}`,
|
|
403
|
+
sourceString: `共 ${T} 条`,
|
|
385
404
|
tagClass: "totalText"
|
|
386
405
|
}
|
|
387
406
|
),
|
|
388
|
-
!!h && /* @__PURE__ */
|
|
389
|
-
/* @__PURE__ */
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
|
|
407
|
+
!!h && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
408
|
+
/* @__PURE__ */ r.jsx($e.Text, { className: "splitBorder", children: "/" }),
|
|
409
|
+
/* @__PURE__ */ r.jsx(
|
|
410
|
+
qe,
|
|
392
411
|
{
|
|
393
412
|
highlightTag: "strong",
|
|
394
413
|
keywords: `${(h == null ? void 0 : h.num) ?? 0}`,
|
|
395
414
|
sourceString: `已选中 ${(h == null ? void 0 : h.num) ?? 0} 条`
|
|
396
415
|
}
|
|
397
416
|
),
|
|
398
|
-
!!(h != null && h.num) && /* @__PURE__ */
|
|
399
|
-
|
|
417
|
+
!!(h != null && h.num) && /* @__PURE__ */ r.jsx(
|
|
418
|
+
$e.Link,
|
|
400
419
|
{
|
|
401
420
|
className: "cleanSelected",
|
|
402
421
|
onClick: h == null ? void 0 : h.onClear,
|
|
@@ -404,140 +423,140 @@ function It({
|
|
|
404
423
|
}
|
|
405
424
|
)
|
|
406
425
|
] })
|
|
407
|
-
] }), [
|
|
408
|
-
i ||
|
|
409
|
-
},
|
|
410
|
-
row: (e) =>
|
|
411
|
-
} : {}, [
|
|
426
|
+
] }), [T, h]), Tt = (e) => {
|
|
427
|
+
i || E == null || E(e);
|
|
428
|
+
}, Me = U(() => P ? {
|
|
429
|
+
row: (e) => Ut({ ...e, loading: i == null ? void 0 : i.toString() })
|
|
430
|
+
} : {}, [P, P ? i : !1]), Le = U(
|
|
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
|
+
)) && !V && ((n = t.style) != null && n.right) && (t.style = { ...t.style ?? {} }, t.style.right = Number(t.style.right ?? 0) - (K || 0)), /* @__PURE__ */ r.jsx("th", { ...t });
|
|
418
437
|
},
|
|
419
|
-
[
|
|
420
|
-
),
|
|
421
|
-
...
|
|
438
|
+
[V, K]
|
|
439
|
+
), Nt = d(() => ({
|
|
440
|
+
...N,
|
|
422
441
|
header: {
|
|
423
|
-
...
|
|
424
|
-
cell:
|
|
442
|
+
...N == null ? void 0 : N.header,
|
|
443
|
+
cell: Le
|
|
425
444
|
},
|
|
426
445
|
body: {
|
|
427
|
-
...
|
|
428
|
-
...
|
|
446
|
+
...N == null ? void 0 : N.body,
|
|
447
|
+
...Me()
|
|
429
448
|
}
|
|
430
|
-
}), [
|
|
431
|
-
return /* @__PURE__ */
|
|
449
|
+
}), [N, Le, Me]);
|
|
450
|
+
return /* @__PURE__ */ r.jsxs(
|
|
432
451
|
"div",
|
|
433
452
|
{
|
|
434
|
-
className:
|
|
453
|
+
className: ae("bitzTableBlock", {
|
|
435
454
|
fullscreen: m.fullscreen
|
|
436
455
|
}),
|
|
437
|
-
style:
|
|
456
|
+
style: jt,
|
|
438
457
|
children: [
|
|
439
|
-
!
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
458
|
+
!X && /* @__PURE__ */ r.jsxs("div", { ref: j, className: Wt, style: Bt, children: [
|
|
459
|
+
/* @__PURE__ */ r.jsxs("div", { className: "bitzTableContainerBody", ref: ge, children: [
|
|
460
|
+
Ie && /* @__PURE__ */ r.jsxs("div", { className: "bitzTableToolbarBlock", children: [
|
|
461
|
+
Je || /* @__PURE__ */ r.jsx("div", {}),
|
|
462
|
+
Qe,
|
|
463
|
+
Ue
|
|
445
464
|
] }),
|
|
446
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ r.jsx(
|
|
447
466
|
"div",
|
|
448
467
|
{
|
|
449
468
|
className: "stretchLine",
|
|
450
|
-
ref:
|
|
469
|
+
ref: ct,
|
|
451
470
|
style: {
|
|
452
|
-
background:
|
|
453
|
-
bottom:
|
|
471
|
+
background: W.colorPrimary,
|
|
472
|
+
bottom: V ? "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: P,
|
|
480
|
+
dataSource: ze,
|
|
481
|
+
mergeRowKey: Se,
|
|
482
|
+
onDragEnd: Tt,
|
|
483
|
+
children: /* @__PURE__ */ r.jsx(
|
|
484
|
+
kt,
|
|
466
485
|
{
|
|
467
|
-
...
|
|
468
|
-
bordered:
|
|
469
|
-
columns:
|
|
470
|
-
dataSource:
|
|
486
|
+
...y,
|
|
487
|
+
bordered: me,
|
|
488
|
+
columns: mt,
|
|
489
|
+
dataSource: ze,
|
|
471
490
|
loading: !1,
|
|
472
491
|
pagination: !1,
|
|
473
|
-
scroll:
|
|
474
|
-
expandable:
|
|
475
|
-
rowSelection:
|
|
476
|
-
onRow:
|
|
477
|
-
rowHoverable:
|
|
478
|
-
rowClassName:
|
|
492
|
+
scroll: oe,
|
|
493
|
+
expandable: Ct,
|
|
494
|
+
rowSelection: gt,
|
|
495
|
+
onRow: wt,
|
|
496
|
+
rowHoverable: Ze,
|
|
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
|
+
q && !!T && /* @__PURE__ */ r.jsxs("div", { className: "bitzTablePagination", ref: se, children: [
|
|
507
|
+
ve,
|
|
508
|
+
/* @__PURE__ */ r.jsx(
|
|
509
|
+
Mt,
|
|
491
510
|
{
|
|
492
511
|
size: "small",
|
|
493
|
-
enableControl:
|
|
494
|
-
pagination:
|
|
495
|
-
total:
|
|
496
|
-
dataSource:
|
|
497
|
-
resetPage:
|
|
512
|
+
enableControl: Oe,
|
|
513
|
+
pagination: g,
|
|
514
|
+
total: T,
|
|
515
|
+
dataSource: x,
|
|
516
|
+
resetPage: Xe,
|
|
498
517
|
hideTotalText: !0,
|
|
499
|
-
paginationEmit:
|
|
518
|
+
paginationEmit: D
|
|
500
519
|
}
|
|
501
520
|
)
|
|
502
521
|
] }),
|
|
503
|
-
!
|
|
522
|
+
!q && !!h && !!T && /* @__PURE__ */ r.jsx("div", { className: "bitzTablePagination", ref: se, children: ve })
|
|
504
523
|
] }),
|
|
505
|
-
|
|
506
|
-
(i || !!(
|
|
524
|
+
X && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
525
|
+
(i || !!(x != null && x.length)) && /* @__PURE__ */ r.jsx(r.Fragment, { children: he ? (
|
|
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 && he(),
|
|
531
|
+
children: pe
|
|
513
532
|
}
|
|
514
533
|
)
|
|
515
|
-
) :
|
|
516
|
-
!i && /* @__PURE__ */
|
|
517
|
-
/* @__PURE__ */
|
|
518
|
-
|
|
534
|
+
) : pe }),
|
|
535
|
+
!i && /* @__PURE__ */ r.jsx(Lt, { data: x, title: _e, img: Ge }),
|
|
536
|
+
/* @__PURE__ */ r.jsx(
|
|
537
|
+
vt,
|
|
519
538
|
{
|
|
520
539
|
className: "tableMobileDrawer",
|
|
521
|
-
open:
|
|
540
|
+
open: tt,
|
|
522
541
|
placement: "bottom",
|
|
523
542
|
height: "auto",
|
|
524
543
|
closable: !1,
|
|
525
|
-
onClose:
|
|
526
|
-
children: /* @__PURE__ */
|
|
527
|
-
/* @__PURE__ */
|
|
544
|
+
onClose: Ce,
|
|
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(pt, {}) }) : ot.map((e, t) => /* @__PURE__ */ r.jsx(
|
|
528
547
|
"div",
|
|
529
548
|
{
|
|
530
549
|
className: "operaList",
|
|
531
|
-
onClick: () =>
|
|
550
|
+
onClick: () => at(e),
|
|
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: Ce, children: De })
|
|
541
560
|
] })
|
|
542
561
|
}
|
|
543
562
|
)
|
|
@@ -546,7 +565,7 @@ function It({
|
|
|
546
565
|
}
|
|
547
566
|
);
|
|
548
567
|
}
|
|
549
|
-
const
|
|
568
|
+
const ps = (q) => /* @__PURE__ */ r.jsx(Rt, { initValue: q, children: /* @__PURE__ */ r.jsx(Et, { ...q }) });
|
|
550
569
|
export {
|
|
551
|
-
|
|
570
|
+
ps as default
|
|
552
571
|
};
|