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