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