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