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