bitz-react-admin-ui 2.3.2 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/dayjs.min.mjs +5 -2
- package/dist/_virtual/dayjs.min2.mjs +4 -0
- package/dist/_virtual/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- package/dist/components/BitzCalendar/index.mjs +1 -1
- package/dist/components/BitzDayJs/index.mjs +1 -1
- package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarBody.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarHead.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +1 -1
- package/dist/components/BitzFuiCalendar/ColumnData.mjs +1 -1
- package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
- package/dist/components/BitzMeetingTime/index.mjs +1 -1
- package/dist/components/BitzTable/ActionCol/index.mjs +1 -1
- package/dist/components/BitzTable/ActionCol/style.mjs +8 -7
- package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +21 -18
- 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 +193 -186
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +19 -12
- package/dist/components/BitzTable/ToolBar/Modal/style.mjs +43 -45
- 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 +50 -50
- package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
- package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
- package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
- 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/dist/utils/time.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { j as o } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { useContext as
|
|
2
|
+
import { useContext as ke, useRef as q, useState as k, useEffect as oe, 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
|
-
import
|
|
5
|
+
import se from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
6
6
|
import Bt from "../../BitzDrawer/index.mjs";
|
|
7
7
|
import jt from "../../BitzPagination/index.mjs";
|
|
8
8
|
import zt from "../../BitzNoData/index.mjs";
|
|
9
9
|
import "../../BitzList/index.less.mjs";
|
|
10
|
-
import
|
|
10
|
+
import Wt from "../../BitzList/List.mjs";
|
|
11
11
|
import "../../BitzPullRefresh/style/index.less.mjs";
|
|
12
|
-
import
|
|
12
|
+
import pt from "../../BitzPullRefresh/PullRefresh.mjs";
|
|
13
13
|
import Tt, { BitzTableContext as Nt, toolCols as kt } from "../Store/index.mjs";
|
|
14
14
|
import { loopFilter as St, columnSort as Mt } from "../Store/utils/index.mjs";
|
|
15
15
|
import ne from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
|
|
@@ -22,185 +22,189 @@ 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
|
},
|
|
40
|
-
skeletonRender:
|
|
40
|
+
skeletonRender: le,
|
|
41
41
|
skeletonRowNum: Le = 4,
|
|
42
42
|
skeletonRowsWidth: Pe = ["35%", "100%", "100%", "60%"],
|
|
43
43
|
// mobileLoadEmit,
|
|
44
44
|
mobileRefreshEmit: ie,
|
|
45
|
-
operationFilter:
|
|
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: ae,
|
|
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
|
-
selectionAlert:
|
|
67
|
-
resetPage:
|
|
68
|
-
...
|
|
66
|
+
selectionAlert: h,
|
|
67
|
+
resetPage: Oe,
|
|
68
|
+
...m
|
|
69
69
|
}) {
|
|
70
|
-
var
|
|
71
|
-
const { token: w } = Lt.useToken(), { Table:
|
|
72
|
-
tableSpaceBetweenPage:
|
|
70
|
+
var Te;
|
|
71
|
+
const { token: w } = Lt.useToken(), { Table: d } = w, {
|
|
72
|
+
tableSpaceBetweenPage: ce = 10,
|
|
73
73
|
cellPaddingInline: De = Pt
|
|
74
|
-
} =
|
|
75
|
-
|
|
74
|
+
} = d, { showColumnBorder: _e, hideRowBorder: he, rowHoverable: Ge, ...u } = ke(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
|
+
oe(() => {
|
|
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(() => !!(
|
|
80
|
-
var
|
|
81
|
-
const r = (
|
|
82
|
-
(
|
|
79
|
+
const Ye = c(() => !!(y != null && y.length) && (y == null ? void 0 : y.length) >= j, [y, j]), [Ze, Ee] = k([]), Ae = (e, t) => {
|
|
80
|
+
var n;
|
|
81
|
+
const r = (n = G == null ? void 0 : G(e, t)) == null ? void 0 : n.filter(
|
|
82
|
+
(s) => s.type !== "divider"
|
|
83
83
|
);
|
|
84
|
-
r != null && r.length && (Ee(r),
|
|
85
|
-
},
|
|
86
|
-
|
|
84
|
+
r != null && r.length && (Ee(r), X(!0));
|
|
85
|
+
}, de = () => {
|
|
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), ue = q(null), Z = ne(ue), 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)"
|
|
94
94
|
), t = [];
|
|
95
|
-
if (e == null || e.forEach((
|
|
96
|
-
var
|
|
95
|
+
if (e == null || e.forEach((n) => {
|
|
96
|
+
var s;
|
|
97
97
|
t.push(
|
|
98
|
-
((
|
|
98
|
+
((s = n.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : s.clientWidth) || 0
|
|
99
99
|
);
|
|
100
100
|
}), t.length)
|
|
101
101
|
return Math.ceil(Math.max(...t)) + De * 2;
|
|
102
|
-
},
|
|
103
|
-
var a,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
)
|
|
102
|
+
}, fe = () => {
|
|
103
|
+
var a, f, P, v;
|
|
104
|
+
let e = (a = B.current) == null ? void 0 : a.querySelector(
|
|
105
|
+
".ant-table-content"
|
|
106
|
+
);
|
|
107
|
+
e || (e = (f = B.current) == null ? void 0 : f.querySelector(
|
|
108
|
+
".ant-table-body"
|
|
109
|
+
));
|
|
110
|
+
const t = e == null ? void 0 : e.clientWidth, n = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, s = (v = (P = B.current) == null ? void 0 : P.querySelector(
|
|
107
111
|
".ant-table-cell-scrollbar"
|
|
108
|
-
)) == null ? void 0 :
|
|
109
|
-
return { tbodyWidth: t, hasScrollBar:
|
|
110
|
-
}, { y:
|
|
111
|
-
const { tbodyWidth: e, hasScrollBar: t, scrollbarSize: r } =
|
|
112
|
-
if (typeof
|
|
112
|
+
)) == null ? void 0 : v.offsetWidth;
|
|
113
|
+
return { tbodyWidth: t, hasScrollBar: n, scrollbarSize: s };
|
|
114
|
+
}, { y: A, tbodyWidth: L, hasScrollBar: V, scrollbarSize: $ } = c(() => {
|
|
115
|
+
const { tbodyWidth: e, hasScrollBar: t, scrollbarSize: r } = fe();
|
|
116
|
+
if (typeof H > "u")
|
|
113
117
|
return {
|
|
114
118
|
tbodyWidth: e,
|
|
115
119
|
hasScrollBar: t,
|
|
116
120
|
scrollbarSize: r
|
|
117
121
|
};
|
|
118
|
-
let
|
|
122
|
+
let n = 40, s = 40;
|
|
119
123
|
if (B.current) {
|
|
120
|
-
const
|
|
121
|
-
|
|
124
|
+
const p = window.getComputedStyle(B.current);
|
|
125
|
+
n = parseInt(p.getPropertyValue("--cell-height")), s = parseInt(p.getPropertyValue("--toolbar-height"));
|
|
122
126
|
}
|
|
123
|
-
const a = (M == null ? void 0 : M.height) || 0,
|
|
124
|
-
return { y: (
|
|
127
|
+
const a = (M == null ? void 0 : M.height) || 0, f = a ? ce : 0;
|
|
128
|
+
return { y: (u.fullscreen ? window.innerHeight : H) - a - f - s - n, tbodyWidth: e, hasScrollBar: t, scrollbarSize: r };
|
|
125
129
|
}, [
|
|
126
|
-
|
|
127
|
-
|
|
130
|
+
u.fullscreen,
|
|
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
|
-
const r = window.getComputedStyle(B.current),
|
|
141
|
+
const r = window.getComputedStyle(B.current), n = parseInt(
|
|
138
142
|
r.getPropertyValue("--toolCell-paddingInline")
|
|
139
143
|
);
|
|
140
|
-
e = parseInt(r.getPropertyValue("--fontSize")) + 4 + 2 *
|
|
144
|
+
e = parseInt(r.getPropertyValue("--fontSize")) + 4 + 2 * n;
|
|
141
145
|
}
|
|
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,
|
|
146
|
-
return
|
|
147
|
-
}, { sortColumns:
|
|
148
|
-
const t = (
|
|
149
|
+
const r = e.length, n = e.filter((p) => p.width), a = n.map((p) => p.width).reduce((p, xt) => p + xt, 0), { tbodyWidth: f } = fe(), v = Math.max((i == null ? void 0 : i.x) ?? 0, f ?? 0) - a - t, Ne = r - n.length;
|
|
150
|
+
return v >= 0 ? Math.floor(v / Ne) : 0;
|
|
151
|
+
}, { sortColumns: W, toolColWidth: me } = c(() => {
|
|
152
|
+
const t = (D ?? []).filter((P) => !kt.includes(P)), { filterColumns: r, hiddenTotalWidth: n, autoWidthColLength: s } = St(
|
|
149
153
|
t,
|
|
150
|
-
|
|
151
|
-
), a = r.sort(Mt(
|
|
152
|
-
let
|
|
153
|
-
return O || (
|
|
154
|
-
}, [
|
|
155
|
-
|
|
154
|
+
u.columnsMap
|
|
155
|
+
), a = r.sort(Mt(u.columnsMap));
|
|
156
|
+
let f = 0;
|
|
157
|
+
return O || (f = rt(), C.current = ot(t, f), Ie(n), Je(s)), { sortColumns: a, toolColWidth: f };
|
|
158
|
+
}, [u.columnsMap, D]), [te, st] = k([]);
|
|
159
|
+
oe(() => {
|
|
156
160
|
if (C.current) {
|
|
157
161
|
let e = 0;
|
|
158
|
-
if (
|
|
159
|
-
const
|
|
162
|
+
if (U) {
|
|
163
|
+
const s = W == null ? void 0 : W.filter(
|
|
160
164
|
(a) => !a.width && !(a != null && a.isOperationCol)
|
|
161
165
|
).length;
|
|
162
|
-
e = Math.floor(
|
|
166
|
+
e = Math.floor(U / s);
|
|
163
167
|
}
|
|
164
168
|
let t = 0, r = -1;
|
|
165
|
-
const
|
|
166
|
-
let
|
|
167
|
-
return
|
|
169
|
+
const n = W.map((s, a) => {
|
|
170
|
+
let f = s.width;
|
|
171
|
+
return s != null && s.isOperationCol && (r = a, s != null && s.useMaxWidth && (f = tt() ?? s.width)), !f && (C != null && C.current) && (f = C.current + e), t += f ?? 0, f;
|
|
168
172
|
});
|
|
169
|
-
if (t <
|
|
170
|
-
const
|
|
173
|
+
if (t < ee.x - me) {
|
|
174
|
+
const s = ee.x - me - t;
|
|
171
175
|
let a = 0;
|
|
172
|
-
r === 0 &&
|
|
176
|
+
r === 0 && n.length > 1 && a++, n[a] = (n[a] ?? 0) + s;
|
|
173
177
|
}
|
|
174
|
-
|
|
178
|
+
st(n);
|
|
175
179
|
}
|
|
176
|
-
}, [
|
|
180
|
+
}, [W, U]);
|
|
177
181
|
const N = c(() => {
|
|
178
182
|
if (O)
|
|
179
|
-
return
|
|
180
|
-
const e =
|
|
183
|
+
return W;
|
|
184
|
+
const e = W.map((t, r) => ({
|
|
181
185
|
...t,
|
|
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
|
-
}, [
|
|
199
|
-
const e = (b ?? []).length, t = e > (
|
|
200
|
-
return Array.from({ length: t }).map((
|
|
201
|
-
key: `${Date.now()}${
|
|
202
|
+
}, [W, te]), be = c(() => $t(N), [N]), nt = c(() => l ? be : N, [l, N, be]), Ce = c(() => {
|
|
203
|
+
const e = (b ?? []).length, t = e > (_.pc ?? 10) ? e >= 20 ? 20 : e : _.pc ?? 10;
|
|
204
|
+
return Array.from({ length: t }).map((n, s) => ({
|
|
205
|
+
key: `${Date.now()}${s}`
|
|
202
206
|
}));
|
|
203
|
-
}, [b]),
|
|
207
|
+
}, [b]), ye = c(() => l ? Ce : b ?? [], [l, b, Ce]), { table: re, locale: lt = Rt } = ke(Kt), it = { ...lt.Table }, at = ((Te = re == null ? void 0 : re.expandable) == null ? void 0 : Te.expandIcon) || (g == null ? void 0 : g.expandIcon) || vt(it), xe = c(() => {
|
|
204
208
|
if (g)
|
|
205
209
|
return {
|
|
206
210
|
...g,
|
|
@@ -220,74 +224,74 @@ function Dt({
|
|
|
220
224
|
};
|
|
221
225
|
}
|
|
222
226
|
};
|
|
223
|
-
}, [g]), ct = c(() => l ? xe : g, [l, g, xe]),
|
|
227
|
+
}, [g]), ct = c(() => l ? xe : g, [l, g, xe]), ge = 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 ? ge : T, [l, T, ge]), we = c(() => l ? "key" : m.rowKey, [l, m.rowKey]), Be = c(() => `${ae ?? u.stylesConfig.size}BitzTable`, [ae, u.stylesConfig.size]), dt = K(
|
|
231
235
|
(e, t) => {
|
|
232
|
-
var
|
|
233
|
-
if (!
|
|
236
|
+
var n;
|
|
237
|
+
if (!m.onRow || l)
|
|
234
238
|
return {};
|
|
235
|
-
const r = (
|
|
239
|
+
const r = (n = m.onRow) == null ? void 0 : n.call(m, e, t);
|
|
236
240
|
return r.onClick && (r.className = "rowPointerCursor"), r;
|
|
237
241
|
},
|
|
238
|
-
[
|
|
239
|
-
), ut = c(() =>
|
|
242
|
+
[m.onRow, l]
|
|
243
|
+
), ut = c(() => se(
|
|
240
244
|
"bitzTableContainer",
|
|
241
|
-
{ hideBorder:
|
|
242
|
-
{ hasScrollBar:
|
|
243
|
-
|
|
244
|
-
|
|
245
|
+
{ hideBorder: he },
|
|
246
|
+
{ hasScrollBar: V },
|
|
247
|
+
Be,
|
|
248
|
+
m.className
|
|
245
249
|
), [
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
250
|
+
m.className,
|
|
251
|
+
Be,
|
|
252
|
+
V,
|
|
253
|
+
u.fullscreen,
|
|
254
|
+
he
|
|
251
255
|
]), ft = c(() => ({
|
|
252
256
|
"--container-bgColor": w.colorBgContainer
|
|
253
257
|
}), [w.colorBgContainer]), mt = c(() => {
|
|
254
|
-
const e =
|
|
258
|
+
const e = u.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
|
-
evenRowBgColor:
|
|
263
|
+
evenRowBgColor: u.zebra ? d == null ? void 0 : d.evenRowBgColor : w.colorBgContainer,
|
|
260
264
|
colorBgContainer: w.colorBgContainer,
|
|
261
|
-
table:
|
|
262
|
-
gap:
|
|
263
|
-
borderColor: (
|
|
265
|
+
table: d,
|
|
266
|
+
gap: ce,
|
|
267
|
+
borderColor: (d == null ? void 0 : d.borderColor) || w.colorBorderSecondary,
|
|
264
268
|
scrollbarWidth: t,
|
|
265
|
-
other:
|
|
269
|
+
other: m.style
|
|
266
270
|
});
|
|
267
271
|
}, [
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
m.style,
|
|
273
|
+
u.fullscreen,
|
|
274
|
+
H,
|
|
275
|
+
d,
|
|
276
|
+
u == null ? void 0 : u.zebra,
|
|
277
|
+
$
|
|
274
278
|
]), bt = K(
|
|
275
279
|
(e, t, r) => {
|
|
276
|
-
const
|
|
277
|
-
if (
|
|
278
|
-
const
|
|
279
|
-
return
|
|
280
|
+
const n = t % 2 === 0 ? "oddRow" : "evenRow";
|
|
281
|
+
if (m.rowClassName) {
|
|
282
|
+
const s = m.rowClassName(e, t, r);
|
|
283
|
+
return se(n, s);
|
|
280
284
|
}
|
|
281
|
-
return
|
|
285
|
+
return n;
|
|
282
286
|
},
|
|
283
|
-
[
|
|
284
|
-
),
|
|
285
|
-
|
|
287
|
+
[m.rowClassName]
|
|
288
|
+
), je = /* @__PURE__ */ o.jsx(
|
|
289
|
+
Wt,
|
|
286
290
|
{
|
|
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: "没有更多了",
|
|
@@ -296,16 +300,16 @@ function Dt({
|
|
|
296
300
|
"div",
|
|
297
301
|
{
|
|
298
302
|
className: "mobileList",
|
|
299
|
-
style: { backgroundColor:
|
|
303
|
+
style: { backgroundColor: d == null ? void 0 : d.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",
|
|
305
|
-
style: { backgroundColor:
|
|
309
|
+
style: { backgroundColor: d == null ? void 0 : d.listItemBgColor },
|
|
306
310
|
onClick: () => Ae(e, t),
|
|
307
|
-
children: N == null ? void 0 : N.map((r,
|
|
308
|
-
var
|
|
311
|
+
children: N == null ? void 0 : N.map((r, n) => {
|
|
312
|
+
var s;
|
|
309
313
|
return !(r != null && r.mobileHide) && /* @__PURE__ */ o.jsxs(
|
|
310
314
|
"div",
|
|
311
315
|
{
|
|
@@ -316,29 +320,29 @@ function Dt({
|
|
|
316
320
|
`${r.title}`,
|
|
317
321
|
":"
|
|
318
322
|
] }),
|
|
319
|
-
/* @__PURE__ */ o.jsx("div", { className: "value", children: ((
|
|
323
|
+
/* @__PURE__ */ o.jsx("div", { className: "value", children: ((s = r == null ? void 0 : r.render) == null ? void 0 : s.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]) })
|
|
325
329
|
]
|
|
326
330
|
},
|
|
327
|
-
|
|
331
|
+
n
|
|
328
332
|
);
|
|
329
333
|
})
|
|
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",
|
|
337
341
|
style: {
|
|
338
342
|
display: l ? "block" : "none",
|
|
339
|
-
backgroundColor:
|
|
343
|
+
backgroundColor: d == null ? void 0 : d.listItemBgColor
|
|
340
344
|
},
|
|
341
|
-
children: /* @__PURE__ */ o.jsx("div", { className: "row", children:
|
|
345
|
+
children: /* @__PURE__ */ o.jsx("div", { className: "row", children: le ? le() : /* @__PURE__ */ o.jsx(
|
|
342
346
|
gt,
|
|
343
347
|
{
|
|
344
348
|
title: !1,
|
|
@@ -356,7 +360,11 @@ function Dt({
|
|
|
356
360
|
}
|
|
357
361
|
)
|
|
358
362
|
}
|
|
359
|
-
)
|
|
363
|
+
);
|
|
364
|
+
oe(() => {
|
|
365
|
+
u.setSelected(!!(h != null && h.num));
|
|
366
|
+
}, [h]);
|
|
367
|
+
const ze = c(() => /* @__PURE__ */ o.jsxs("div", { className: "alert", children: [
|
|
360
368
|
/* @__PURE__ */ o.jsx(
|
|
361
369
|
Me,
|
|
362
370
|
{
|
|
@@ -366,40 +374,39 @@ function Dt({
|
|
|
366
374
|
tagClass: "totalText"
|
|
367
375
|
}
|
|
368
376
|
),
|
|
369
|
-
!!
|
|
377
|
+
!!h && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
370
378
|
/* @__PURE__ */ o.jsx(Se.Text, { className: "splitBorder", children: "/" }),
|
|
371
379
|
/* @__PURE__ */ o.jsx(
|
|
372
380
|
Me,
|
|
373
381
|
{
|
|
374
382
|
highlightTag: "strong",
|
|
375
|
-
keywords: `${(
|
|
376
|
-
sourceString: `已选中 ${(
|
|
383
|
+
keywords: `${(h == null ? void 0 : h.num) ?? 0}`,
|
|
384
|
+
sourceString: `已选中 ${(h == null ? void 0 : h.num) ?? 0} 条`
|
|
377
385
|
}
|
|
378
386
|
),
|
|
379
|
-
!!(
|
|
387
|
+
!!(h != null && h.num) && /* @__PURE__ */ o.jsx(
|
|
380
388
|
Se.Link,
|
|
381
389
|
{
|
|
382
390
|
className: "cleanSelected",
|
|
383
|
-
onClick:
|
|
391
|
+
onClick: h == null ? void 0 : h.onClear,
|
|
384
392
|
children: "取消选中"
|
|
385
393
|
}
|
|
386
394
|
)
|
|
387
395
|
] })
|
|
388
|
-
] }), [j,
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
}, ze = K(() => S ? {
|
|
396
|
+
] }), [j, h]), Ct = (e) => {
|
|
397
|
+
l || I == null || I(e);
|
|
398
|
+
}, We = K(() => S ? {
|
|
392
399
|
row: (e) => Vt({ ...e, loading: l == null ? void 0 : l.toString() })
|
|
393
400
|
} : {}, [S, S ? l : !1]), pe = K(
|
|
394
401
|
(e) => {
|
|
395
|
-
var
|
|
402
|
+
var n, s;
|
|
396
403
|
const t = { ...e };
|
|
397
|
-
return ((
|
|
404
|
+
return ((n = t.className) == null ? void 0 : n.includes(
|
|
398
405
|
"ant-table-cell-fix-right"
|
|
399
|
-
)) && !
|
|
406
|
+
)) && !V && ((s = t.style) != null && s.right) && (t.style = { ...t.style ?? {} }, t.style.right = Number(t.style.right ?? 0) - ($ || 0)), /* @__PURE__ */ o.jsx("th", { ...t });
|
|
400
407
|
},
|
|
401
|
-
[
|
|
402
|
-
),
|
|
408
|
+
[V, $]
|
|
409
|
+
), yt = c(() => ({
|
|
403
410
|
...z,
|
|
404
411
|
header: {
|
|
405
412
|
...z == null ? void 0 : z.header,
|
|
@@ -407,83 +414,83 @@ function Dt({
|
|
|
407
414
|
},
|
|
408
415
|
body: {
|
|
409
416
|
...z == null ? void 0 : z.body,
|
|
410
|
-
...
|
|
417
|
+
...We()
|
|
411
418
|
}
|
|
412
|
-
}), [z, pe,
|
|
419
|
+
}), [z, pe, We]);
|
|
413
420
|
return /* @__PURE__ */ o.jsxs(
|
|
414
421
|
"div",
|
|
415
422
|
{
|
|
416
|
-
className:
|
|
417
|
-
fullscreen:
|
|
423
|
+
className: se("bitzTableBlock", {
|
|
424
|
+
fullscreen: u.fullscreen
|
|
418
425
|
}),
|
|
419
426
|
style: ft,
|
|
420
427
|
children: [
|
|
421
428
|
!O && /* @__PURE__ */ o.jsxs("div", { ref: B, className: ut, style: mt, children: [
|
|
422
|
-
/* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref:
|
|
429
|
+
/* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref: ue, children: [
|
|
423
430
|
Fe && /* @__PURE__ */ o.jsxs("div", { className: "bitzTableToolbarBlock", children: [
|
|
424
431
|
Ve || /* @__PURE__ */ o.jsx("div", {}),
|
|
425
|
-
|
|
426
|
-
|
|
432
|
+
qe,
|
|
433
|
+
Ke
|
|
427
434
|
] }),
|
|
428
435
|
/* @__PURE__ */ o.jsx(
|
|
429
|
-
|
|
436
|
+
qt,
|
|
430
437
|
{
|
|
431
438
|
enabledRowDragSort: S,
|
|
432
|
-
dataSource:
|
|
433
|
-
mergeRowKey:
|
|
439
|
+
dataSource: ye,
|
|
440
|
+
mergeRowKey: we,
|
|
434
441
|
onDragEnd: Ct,
|
|
435
442
|
children: /* @__PURE__ */ o.jsx(
|
|
436
443
|
wt,
|
|
437
444
|
{
|
|
438
|
-
...
|
|
445
|
+
...m,
|
|
439
446
|
bordered: _e,
|
|
440
|
-
columns:
|
|
441
|
-
dataSource:
|
|
447
|
+
columns: nt,
|
|
448
|
+
dataSource: ye,
|
|
442
449
|
loading: !1,
|
|
443
450
|
pagination: !1,
|
|
444
|
-
scroll:
|
|
451
|
+
scroll: ee,
|
|
445
452
|
expandable: ct,
|
|
446
453
|
rowSelection: ht,
|
|
447
454
|
onRow: dt,
|
|
448
455
|
rowHoverable: Ge,
|
|
449
456
|
rowClassName: bt,
|
|
450
457
|
className: "bitzTable",
|
|
451
|
-
components:
|
|
452
|
-
rowKey:
|
|
458
|
+
components: yt,
|
|
459
|
+
rowKey: we
|
|
453
460
|
}
|
|
454
461
|
)
|
|
455
462
|
}
|
|
456
463
|
)
|
|
457
464
|
] }),
|
|
458
|
-
|
|
459
|
-
|
|
465
|
+
R && !!j && /* @__PURE__ */ o.jsxs("div", { className: "bitzTablePagination", ref: E, children: [
|
|
466
|
+
ze,
|
|
460
467
|
/* @__PURE__ */ o.jsx(
|
|
461
468
|
jt,
|
|
462
469
|
{
|
|
463
470
|
size: "small",
|
|
464
471
|
enableControl: ve,
|
|
465
|
-
pagination:
|
|
472
|
+
pagination: x,
|
|
466
473
|
total: j,
|
|
467
474
|
dataSource: b,
|
|
468
|
-
resetPage:
|
|
475
|
+
resetPage: Oe,
|
|
469
476
|
hideTotalText: !0,
|
|
470
|
-
paginationEmit:
|
|
477
|
+
paginationEmit: F
|
|
471
478
|
}
|
|
472
479
|
)
|
|
473
480
|
] }),
|
|
474
|
-
!
|
|
481
|
+
!R && !!h && !!j && /* @__PURE__ */ o.jsx("div", { className: "bitzTablePagination", ref: E, children: ze })
|
|
475
482
|
] }),
|
|
476
483
|
O && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
477
484
|
(l || !!(b != null && b.length)) && /* @__PURE__ */ o.jsx(o.Fragment, { children: ie ? (
|
|
478
485
|
// @ts-ignore
|
|
479
486
|
/* @__PURE__ */ o.jsx(
|
|
480
|
-
|
|
487
|
+
pt,
|
|
481
488
|
{
|
|
482
489
|
onRefresh: async () => !l && ie(),
|
|
483
|
-
children:
|
|
490
|
+
children: je
|
|
484
491
|
}
|
|
485
492
|
)
|
|
486
|
-
) :
|
|
493
|
+
) : je }),
|
|
487
494
|
!l && /* @__PURE__ */ o.jsx(zt, { data: b, title: He, img: $e }),
|
|
488
495
|
/* @__PURE__ */ o.jsx(
|
|
489
496
|
Bt,
|
|
@@ -493,7 +500,7 @@ function Dt({
|
|
|
493
500
|
placement: "bottom",
|
|
494
501
|
height: "auto",
|
|
495
502
|
closable: !1,
|
|
496
|
-
onClose:
|
|
503
|
+
onClose: de,
|
|
497
504
|
children: /* @__PURE__ */ o.jsxs("div", { className: "drawerBox", children: [
|
|
498
505
|
/* @__PURE__ */ o.jsx("div", { className: "boxBody", children: Ze.map((e, t) => /* @__PURE__ */ o.jsx(
|
|
499
506
|
"div",
|
|
@@ -508,7 +515,7 @@ function Dt({
|
|
|
508
515
|
t
|
|
509
516
|
)) }),
|
|
510
517
|
/* @__PURE__ */ o.jsx("div", { className: "boxLine" }),
|
|
511
|
-
/* @__PURE__ */ o.jsx("div", { className: "boxFooter", onClick:
|
|
518
|
+
/* @__PURE__ */ o.jsx("div", { className: "boxFooter", onClick: de, children: Re })
|
|
512
519
|
] })
|
|
513
520
|
}
|
|
514
521
|
)
|
|
@@ -517,7 +524,7 @@ function Dt({
|
|
|
517
524
|
}
|
|
518
525
|
);
|
|
519
526
|
}
|
|
520
|
-
const gr = (
|
|
527
|
+
const gr = (R) => /* @__PURE__ */ o.jsx(Tt, { initValue: R, children: /* @__PURE__ */ o.jsx(Dt, { ...R }) });
|
|
521
528
|
export {
|
|
522
529
|
gr as default
|
|
523
530
|
};
|