bitz-react-admin-ui 1.9.6 → 1.9.8
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/components/BitzFluentInput/index.mjs +18 -18
- package/dist/components/BitzFluentSelect/index.mjs +13 -13
- package/dist/components/BitzTable/Store/index.mjs +10 -8
- package/dist/components/BitzTable/Table/index.mjs +199 -203
- package/dist/components/BitzTable/Table/utils.d.ts +2 -0
- package/dist/components/BitzTable/Table/utils.mjs +35 -13
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.d.ts +2 -0
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.mjs +244 -236
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +32 -27
- package/dist/components/BitzTable/index.d.ts +10 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,237 +1,232 @@
|
|
|
1
1
|
import { j as o } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { useContext as A, useState as
|
|
2
|
+
import { useContext as A, useState as K, useMemo as i, useEffect as he, useRef as $, useCallback as ue } from "react";
|
|
3
3
|
import { isMobile as O } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
|
|
4
|
-
import { Table as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
4
|
+
import { Table as _, Skeleton as tt } from "antd";
|
|
5
|
+
import V from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
6
|
+
import nt from "../../BitzDrawer/index.mjs";
|
|
7
|
+
import ot from "../../BitzPagination/index.mjs";
|
|
8
|
+
import rt from "../../BitzNoData/index.mjs";
|
|
9
9
|
import "../../BitzList/index.less.mjs";
|
|
10
|
-
import
|
|
10
|
+
import st 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 { BitzConfigContext as
|
|
19
|
-
import
|
|
12
|
+
import lt from "../../BitzPullRefresh/PullRefresh.mjs";
|
|
13
|
+
import it, { TableContext as at } from "../Store/index.mjs";
|
|
14
|
+
import { loopFilter as ct, columnSort as dt, genColumnKey as ht } from "../Store/utils/index.mjs";
|
|
15
|
+
import I from "../../../node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSize/index.mjs";
|
|
16
|
+
import ut from "../ActionCol/style.mjs";
|
|
17
|
+
import mt from "../../BitzTheme/index.mjs";
|
|
18
|
+
import { BitzConfigContext as ft } from "../../BitzConfigProvider/context.mjs";
|
|
19
|
+
import bt from "../../../node_modules/.store/antd@5.15.4/node_modules/antd/es/table/ExpandIcon.mjs";
|
|
20
20
|
import "../../../node_modules/.store/antd@5.15.4/node_modules/antd/es/config-provider/index.mjs";
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
21
|
+
import gt from "../../../node_modules/.store/antd@5.15.4/node_modules/antd/locale/en_US.mjs";
|
|
22
|
+
import { getColumnsWithTool as xt, loopBuildSkeleton as yt } from "./utils.mjs";
|
|
23
|
+
import { getCssVar as Ct } from "./style.mjs";
|
|
24
24
|
import "./index.less.mjs";
|
|
25
|
-
import { ConfigContext as
|
|
26
|
-
import
|
|
27
|
-
const
|
|
28
|
-
function
|
|
29
|
-
rowHoverable:
|
|
30
|
-
fillEvenRow:
|
|
31
|
-
showPagination:
|
|
32
|
-
height:
|
|
33
|
-
dataSource:
|
|
34
|
-
total:
|
|
25
|
+
import { ConfigContext as pt } from "../../../node_modules/.store/antd@5.15.4/node_modules/antd/es/config-provider/context.mjs";
|
|
26
|
+
import wt from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
|
|
27
|
+
const me = [_.SELECTION_COLUMN, _.EXPAND_COLUMN];
|
|
28
|
+
function Bt({
|
|
29
|
+
rowHoverable: T,
|
|
30
|
+
fillEvenRow: S,
|
|
31
|
+
showPagination: fe = !0,
|
|
32
|
+
height: k,
|
|
33
|
+
dataSource: s = [],
|
|
34
|
+
total: N = 0,
|
|
35
35
|
columns: w,
|
|
36
36
|
loading: d = !1,
|
|
37
|
-
skeletonNum:
|
|
37
|
+
skeletonNum: be = 2,
|
|
38
38
|
skeletonRender: q,
|
|
39
|
-
skeletonRowNum:
|
|
40
|
-
skeletonRowsWidth:
|
|
41
|
-
mobileLoadEmit:
|
|
42
|
-
mobileRefreshEmit:
|
|
39
|
+
skeletonRowNum: ge = 4,
|
|
40
|
+
skeletonRowsWidth: xe = ["35%", "100%", "100%", "60%"],
|
|
41
|
+
mobileLoadEmit: ye,
|
|
42
|
+
mobileRefreshEmit: F,
|
|
43
43
|
operationFilter: L,
|
|
44
44
|
enableControlPage: Ce,
|
|
45
|
-
pagination:
|
|
45
|
+
pagination: pe,
|
|
46
46
|
paginationEmit: we = () => {
|
|
47
47
|
},
|
|
48
|
-
mobilePageHeight:
|
|
48
|
+
mobilePageHeight: jt = 500,
|
|
49
49
|
mobileCancelText: Be = "取消",
|
|
50
50
|
noDataTitle: je,
|
|
51
|
-
noDataImg:
|
|
52
|
-
color:
|
|
53
|
-
size:
|
|
54
|
-
showTableTool:
|
|
55
|
-
tableAction:
|
|
56
|
-
tableToolbar:
|
|
57
|
-
selectionBar:
|
|
58
|
-
scroll:
|
|
51
|
+
noDataImg: ve,
|
|
52
|
+
color: vt,
|
|
53
|
+
size: G,
|
|
54
|
+
showTableTool: Te = !0,
|
|
55
|
+
tableAction: ke,
|
|
56
|
+
tableToolbar: ze,
|
|
57
|
+
selectionBar: Ne,
|
|
58
|
+
scroll: m,
|
|
59
59
|
components: M,
|
|
60
60
|
expandable: f,
|
|
61
|
-
rowSelection:
|
|
61
|
+
rowSelection: C,
|
|
62
62
|
resetPage: Le,
|
|
63
|
-
...
|
|
63
|
+
...h
|
|
64
64
|
}) {
|
|
65
65
|
var ae;
|
|
66
|
-
const { token:
|
|
66
|
+
const { token: b } = mt.useToken(), { Table: a } = b, { tableSpaceBetweenPage: U = 10 } = a, { gap: Me } = ut(), g = A(at), { Table: c } = A(ft), [B, X] = K(!1), [Ee, E] = K(!1), Re = i(() => !!(s != null && s.length) && (s == null ? void 0 : s.length) >= N, [s, N]), [We, Pe] = K([]), De = (e, t) => {
|
|
67
67
|
var r;
|
|
68
|
-
const n = (r = L == null ? void 0 : L(
|
|
69
|
-
(
|
|
68
|
+
const n = (r = L == null ? void 0 : L(e, t)) == null ? void 0 : r.filter(
|
|
69
|
+
(l) => l.type !== "divider"
|
|
70
70
|
);
|
|
71
71
|
n != null && n.length && (Pe(n), E(!0));
|
|
72
72
|
}, J = () => {
|
|
73
73
|
E(!1);
|
|
74
|
-
}, He = (
|
|
75
|
-
var
|
|
76
|
-
E(!1), (
|
|
74
|
+
}, He = (e) => {
|
|
75
|
+
var t;
|
|
76
|
+
E(!1), (t = e.onClick) == null || t.call(e);
|
|
77
77
|
};
|
|
78
|
-
he(() => (document == null || document.addEventListener("fullscreenchange", (
|
|
79
|
-
var
|
|
80
|
-
(
|
|
78
|
+
he(() => (document == null || document.addEventListener("fullscreenchange", (e) => {
|
|
79
|
+
var t, n, r;
|
|
80
|
+
(t = e.target) != null && t.classList.contains("bitzTableBlock") && (X(!!document.fullscreenElement), (r = (n = document.fullscreenElement) == null ? void 0 : n.classList) != null && r.contains("bitzTableBlock") || X(!1));
|
|
81
81
|
}), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
|
|
82
82
|
})), []);
|
|
83
|
-
const x =
|
|
83
|
+
const x = $(null), R = I(x), Q = $(null), W = I(Q), Y = $(null), j = I(Y), Ae = () => {
|
|
84
84
|
var n;
|
|
85
|
-
const
|
|
85
|
+
const e = (n = x.current) == null ? void 0 : n.querySelectorAll(
|
|
86
86
|
"& > .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)"
|
|
87
|
-
),
|
|
88
|
-
if (
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
((
|
|
87
|
+
), t = [];
|
|
88
|
+
if (e == null || e.forEach((r) => {
|
|
89
|
+
var l;
|
|
90
|
+
t.push(
|
|
91
|
+
((l = r.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : l.clientWidth) || 0
|
|
92
92
|
);
|
|
93
|
-
}),
|
|
94
|
-
return Math.ceil(Math.max(...
|
|
93
|
+
}), t.length)
|
|
94
|
+
return Math.ceil(Math.max(...t)) + Me * 2;
|
|
95
95
|
}, Z = () => {
|
|
96
|
-
var
|
|
97
|
-
const
|
|
96
|
+
var l;
|
|
97
|
+
const e = (l = x.current) == null ? void 0 : l.querySelector(
|
|
98
98
|
"& > .bitzTableContainerBody > .ant-table-wrapper.bitzTable > .ant-spin-nested-loading > .ant-spin-container > .ant-table > .ant-table-container > .ant-table-body"
|
|
99
|
-
),
|
|
100
|
-
return { tbodyWidth:
|
|
101
|
-
}, { y: P, hasScrollBar: ee } =
|
|
102
|
-
if (typeof
|
|
99
|
+
), t = e == null ? void 0 : e.clientWidth, n = ((e == null ? void 0 : e.offsetWidth) || 0) - t, r = n > 0;
|
|
100
|
+
return { tbodyWidth: t, scrollBarWidth: n, hasScrollBar: r };
|
|
101
|
+
}, { y: P, hasScrollBar: ee } = i(() => {
|
|
102
|
+
if (typeof k > "u")
|
|
103
103
|
return {};
|
|
104
|
-
const { hasScrollBar:
|
|
105
|
-
let
|
|
104
|
+
const { hasScrollBar: e } = Z();
|
|
105
|
+
let t = 40, n = 40;
|
|
106
106
|
if (x.current) {
|
|
107
|
-
const
|
|
108
|
-
|
|
107
|
+
const z = window.getComputedStyle(x.current);
|
|
108
|
+
t = parseInt(z.getPropertyValue("--cell-height")), n = parseInt(z.getPropertyValue("--toolbar-height"));
|
|
109
109
|
}
|
|
110
|
-
const r = (j == null ? void 0 : j.height) || 0,
|
|
111
|
-
return { y: (B ? window.innerHeight :
|
|
110
|
+
const r = (j == null ? void 0 : j.height) || 0, l = r ? U : 0;
|
|
111
|
+
return { y: (B ? window.innerHeight : k) - r - l - n - t, hasScrollBar: e };
|
|
112
112
|
}, [
|
|
113
113
|
B,
|
|
114
|
-
|
|
114
|
+
k,
|
|
115
115
|
j == null ? void 0 : j.height,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
]), te =
|
|
119
|
-
const
|
|
120
|
-
let
|
|
116
|
+
R == null ? void 0 : R.height,
|
|
117
|
+
W == null ? void 0 : W.height
|
|
118
|
+
]), te = i(() => m != null && m.x ? { x: m.x, y: m.y || P } : m != null && m.y ? { x: 1e3, y: m.y } : { x: 1e3, y: P }, [m, P]), Ke = (e) => {
|
|
119
|
+
const t = e.length, n = e.filter((y) => y.width), l = n.map((y) => y.width).reduce((y, H) => y + H, 0);
|
|
120
|
+
let v = 0;
|
|
121
121
|
if (x.current) {
|
|
122
|
-
const
|
|
123
|
-
|
|
122
|
+
const y = window.getComputedStyle(x.current), H = parseInt(
|
|
123
|
+
y.getPropertyValue("--toolCell-paddingInline")
|
|
124
124
|
);
|
|
125
|
-
|
|
125
|
+
v = parseInt(y.getPropertyValue("--fontSize")) + 4 + 2 * H;
|
|
126
126
|
}
|
|
127
|
-
let
|
|
128
|
-
|
|
129
|
-
const { tbodyWidth: ce } = Z(),
|
|
130
|
-
return de >= 0 ? de / (
|
|
131
|
-
},
|
|
132
|
-
const
|
|
127
|
+
let u = 0;
|
|
128
|
+
C && (u += v), f && (u += v);
|
|
129
|
+
const { tbodyWidth: ce } = Z(), z = parseInt(`${te.x}`) || 0, et = Math.max(z, ce), de = (parseInt(`${et}`) || 0) - l - u;
|
|
130
|
+
return de >= 0 ? de / (t - n.length) : void 0;
|
|
131
|
+
}, p = i(() => {
|
|
132
|
+
const e = w ?? [], t = e.filter((u) => !me.includes(u)), r = ct(t, g.columnsMap).sort(dt(g.columnsMap));
|
|
133
133
|
if (O)
|
|
134
134
|
return r;
|
|
135
|
-
const
|
|
136
|
-
...
|
|
137
|
-
...
|
|
138
|
-
width:
|
|
135
|
+
const l = Ke(r), v = r.map((u) => ({
|
|
136
|
+
...u,
|
|
137
|
+
...u.width ? {
|
|
138
|
+
width: u.useMaxWidth ? Ae() ?? u.width : u.width
|
|
139
139
|
} : {
|
|
140
140
|
// 给未设置width的列设置平均数
|
|
141
|
-
width:
|
|
141
|
+
width: l
|
|
142
142
|
}
|
|
143
143
|
}));
|
|
144
|
-
return
|
|
145
|
-
}, [w,
|
|
144
|
+
return xt(e, v, C, f);
|
|
145
|
+
}, [w, g.columnsMap, g.sortKeyColumns]);
|
|
146
146
|
he(() => {
|
|
147
147
|
if (w && w.length > 0) {
|
|
148
|
-
const
|
|
149
|
-
(
|
|
148
|
+
const e = w.map(
|
|
149
|
+
(t) => (
|
|
150
150
|
// @ts-ignore
|
|
151
|
-
|
|
151
|
+
ht((t == null ? void 0 : t.key) ?? (t == null ? void 0 : t.dataIndex), t == null ? void 0 : t.dataIndex)
|
|
152
152
|
)
|
|
153
153
|
);
|
|
154
|
-
|
|
154
|
+
g.setSortKeyColumns(e);
|
|
155
155
|
}
|
|
156
156
|
}, [w]);
|
|
157
|
-
const ne =
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
ue,
|
|
162
|
-
{
|
|
163
|
-
active: !0,
|
|
164
|
-
title: !1,
|
|
165
|
-
paragraph: {
|
|
166
|
-
rows: 1,
|
|
167
|
-
width: (s + 1) % 2 === 0 ? "100%" : "60%"
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
)
|
|
171
|
-
}), [b]), Ke = c(() => d ? ne : b, [d, b, ne]), oe = c(() => {
|
|
172
|
-
const t = l == null ? void 0 : l.length, e = t > 4 ? t >= 20 ? 20 : t : 4;
|
|
173
|
-
return Array.from({ length: e }).map((r, s) => ({
|
|
174
|
-
key: `${Date.now()}${s}`
|
|
157
|
+
const ne = i(() => yt(p, me), [p]), $e = i(() => d ? ne : p, [d, p, ne]), oe = i(() => {
|
|
158
|
+
const e = s == null ? void 0 : s.length, t = e > 4 ? e >= 20 ? 20 : e : 4;
|
|
159
|
+
return Array.from({ length: t }).map((r, l) => ({
|
|
160
|
+
key: `${Date.now()}${l}`
|
|
175
161
|
}));
|
|
176
|
-
}, [
|
|
162
|
+
}, [s]), Oe = i(() => d ? oe : s, [d, s, oe]), { table: D, locale: Ve = gt } = A(pt), Ie = { ...Ve.Table }, _e = ((ae = D == null ? void 0 : D.expandable) == null ? void 0 : ae.expandIcon) || (f == null ? void 0 : f.expandIcon) || bt(Ie), re = i(() => {
|
|
177
163
|
if (f)
|
|
178
164
|
return {
|
|
179
165
|
...f,
|
|
180
166
|
expandedRowRender: () => /* @__PURE__ */ o.jsx(o.Fragment, {}),
|
|
181
|
-
expandIcon: (
|
|
182
|
-
const
|
|
167
|
+
expandIcon: (e) => {
|
|
168
|
+
const t = _e(e);
|
|
183
169
|
return {
|
|
184
|
-
...
|
|
170
|
+
...t,
|
|
185
171
|
props: {
|
|
186
|
-
...
|
|
172
|
+
...t.props,
|
|
187
173
|
disabled: !0,
|
|
188
174
|
style: {
|
|
189
|
-
...
|
|
190
|
-
backgroundColor:
|
|
175
|
+
...t.props.style,
|
|
176
|
+
backgroundColor: b.colorBgContainerDisabled
|
|
191
177
|
}
|
|
192
178
|
}
|
|
193
179
|
};
|
|
194
180
|
}
|
|
195
181
|
};
|
|
196
|
-
}, [f]),
|
|
197
|
-
if (
|
|
182
|
+
}, [f]), Se = i(() => d ? re : f, [d, f, re]), se = i(() => {
|
|
183
|
+
if (C)
|
|
198
184
|
return {
|
|
199
|
-
...
|
|
185
|
+
...C,
|
|
200
186
|
selectedRowKeys: [],
|
|
201
187
|
getCheckboxProps: () => ({ disabled: !0 })
|
|
202
188
|
};
|
|
203
|
-
}, [
|
|
189
|
+
}, [C]), qe = i(() => d ? se : C, [d, C, se]), Fe = i(() => d ? void 0 : h.rowKey, [d, h.rowKey]), le = i(() => `${G ?? (g == null ? void 0 : g.tableSize)}BitzTable`, [G, g.tableSize]), Ge = i(() => h.bordered ?? (c == null ? void 0 : c.bordered), [h.bordered, c == null ? void 0 : c.bordered]), Ue = ue(
|
|
190
|
+
(e, t) => {
|
|
191
|
+
var r;
|
|
192
|
+
if (!h.onRow)
|
|
193
|
+
return {};
|
|
194
|
+
const n = (r = h.onRow) == null ? void 0 : r.call(h, e, t);
|
|
195
|
+
return n.onClick && (n.className = "rowPointerCursor"), n;
|
|
196
|
+
},
|
|
197
|
+
[h.onRow]
|
|
198
|
+
), Xe = i(() => V(
|
|
204
199
|
"bitzTableContainer",
|
|
205
200
|
/* "hideBorder", */
|
|
206
201
|
{ hasScrollBar: ee },
|
|
207
202
|
le
|
|
208
|
-
), [le, ee, B]),
|
|
209
|
-
"--container-bgColor":
|
|
210
|
-
}), [
|
|
211
|
-
const
|
|
212
|
-
return
|
|
213
|
-
height: B ? "100%" :
|
|
214
|
-
evenRowBgColor:
|
|
215
|
-
colorBgContainer:
|
|
216
|
-
table:
|
|
203
|
+
), [le, ee, B]), Je = i(() => ({
|
|
204
|
+
"--container-bgColor": b.colorBgContainer
|
|
205
|
+
}), [b.colorBgContainer]), Qe = i(() => {
|
|
206
|
+
const e = S ?? (c == null ? void 0 : c.fillEvenRow) ?? !0;
|
|
207
|
+
return Ct({
|
|
208
|
+
height: B ? "100%" : k,
|
|
209
|
+
evenRowBgColor: e ? a == null ? void 0 : a.evenRowBgColor : b.colorBgContainer,
|
|
210
|
+
colorBgContainer: b.colorBgContainer,
|
|
211
|
+
table: a,
|
|
217
212
|
gap: U,
|
|
218
|
-
borderColor: (
|
|
213
|
+
borderColor: (a == null ? void 0 : a.borderColor) || b.colorBorderSecondary
|
|
219
214
|
});
|
|
220
|
-
}, [B,
|
|
221
|
-
(
|
|
222
|
-
const r =
|
|
223
|
-
if (
|
|
224
|
-
const
|
|
225
|
-
return
|
|
215
|
+
}, [B, k, a, S, c == null ? void 0 : c.fillEvenRow]), Ye = ue(
|
|
216
|
+
(e, t, n) => {
|
|
217
|
+
const r = t % 2 === 0 ? "oddRow" : "evenRow";
|
|
218
|
+
if (h.rowClassName) {
|
|
219
|
+
const l = h.rowClassName(e, t, n);
|
|
220
|
+
return V(r, l);
|
|
226
221
|
}
|
|
227
222
|
return r;
|
|
228
223
|
},
|
|
229
|
-
[
|
|
224
|
+
[h.rowClassName]
|
|
230
225
|
), ie = /* @__PURE__ */ o.jsx(
|
|
231
|
-
|
|
226
|
+
st,
|
|
232
227
|
{
|
|
233
|
-
finished:
|
|
234
|
-
onLoad:
|
|
228
|
+
finished: Re,
|
|
229
|
+
onLoad: ye,
|
|
235
230
|
loadingText: "加载中...",
|
|
236
231
|
finishedText: "没有更多了",
|
|
237
232
|
errorText: "加载失败",
|
|
@@ -239,124 +234,125 @@ function Ct({
|
|
|
239
234
|
"div",
|
|
240
235
|
{
|
|
241
236
|
className: "mobileList",
|
|
242
|
-
style: { backgroundColor:
|
|
237
|
+
style: { backgroundColor: a == null ? void 0 : a.mobileListBgColor },
|
|
243
238
|
children: [
|
|
244
|
-
|
|
239
|
+
s == null ? void 0 : s.map((e, t) => /* @__PURE__ */ o.jsx(
|
|
245
240
|
"div",
|
|
246
241
|
{
|
|
247
242
|
className: "listItem",
|
|
248
|
-
style: { backgroundColor:
|
|
249
|
-
onClick: () => De(
|
|
250
|
-
children:
|
|
251
|
-
var
|
|
243
|
+
style: { backgroundColor: a == null ? void 0 : a.listItemBgColor },
|
|
244
|
+
onClick: () => De(e, t),
|
|
245
|
+
children: p == null ? void 0 : p.map((n, r) => {
|
|
246
|
+
var l;
|
|
252
247
|
return !(n != null && n.mobileHide) && /* @__PURE__ */ o.jsxs(
|
|
253
248
|
"div",
|
|
254
249
|
{
|
|
255
250
|
className: "row",
|
|
256
|
-
style: { color:
|
|
251
|
+
style: { color: b.colorText },
|
|
257
252
|
children: [
|
|
258
253
|
!n.mobileHideLabel && /* @__PURE__ */ o.jsxs("div", { className: "label", children: [
|
|
259
254
|
`${n.title}`,
|
|
260
255
|
":"
|
|
261
256
|
] }),
|
|
262
|
-
/* @__PURE__ */ o.jsx("div", { className: "value", children: ((
|
|
257
|
+
/* @__PURE__ */ o.jsx("div", { className: "value", children: ((l = n == null ? void 0 : n.render) == null ? void 0 : l.call(
|
|
263
258
|
n,
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
)) || (
|
|
259
|
+
wt(e, (n == null ? void 0 : n.dataIndex) || ""),
|
|
260
|
+
e,
|
|
261
|
+
t
|
|
262
|
+
)) || (e == null ? void 0 : e[n.dataIndex]) })
|
|
268
263
|
]
|
|
269
264
|
},
|
|
270
265
|
r
|
|
271
266
|
);
|
|
272
267
|
})
|
|
273
268
|
},
|
|
274
|
-
|
|
269
|
+
t
|
|
275
270
|
)),
|
|
276
|
-
d && Array.from({ length:
|
|
271
|
+
d && Array.from({ length: be }).map((e, t) => /* @__PURE__ */ o.jsx(
|
|
277
272
|
"div",
|
|
278
273
|
{
|
|
279
274
|
className: "listItem",
|
|
280
|
-
style: { backgroundColor:
|
|
275
|
+
style: { backgroundColor: a == null ? void 0 : a.listItemBgColor },
|
|
281
276
|
children: /* @__PURE__ */ o.jsx("div", { className: "row", children: q ? q() : /* @__PURE__ */ o.jsx(
|
|
282
|
-
|
|
277
|
+
tt,
|
|
283
278
|
{
|
|
284
279
|
title: !1,
|
|
285
280
|
paragraph: {
|
|
286
|
-
rows:
|
|
287
|
-
width:
|
|
281
|
+
rows: ge,
|
|
282
|
+
width: xe
|
|
288
283
|
},
|
|
289
284
|
active: !0
|
|
290
285
|
}
|
|
291
286
|
) })
|
|
292
287
|
},
|
|
293
|
-
|
|
288
|
+
t
|
|
294
289
|
))
|
|
295
290
|
]
|
|
296
291
|
}
|
|
297
292
|
)
|
|
298
293
|
}
|
|
299
|
-
),
|
|
294
|
+
), Ze = i(() => {
|
|
300
295
|
if (M)
|
|
301
296
|
return M;
|
|
302
|
-
if (!(
|
|
297
|
+
if (!(T ?? (c == null ? void 0 : c.rowHoverable) ?? !0))
|
|
303
298
|
return {
|
|
304
299
|
body: {
|
|
305
|
-
cell: ({ onMouseEnter:
|
|
300
|
+
cell: ({ onMouseEnter: t, onMouseLeave: n, ...r }) => /* @__PURE__ */ o.jsx("td", { ...r })
|
|
306
301
|
}
|
|
307
302
|
};
|
|
308
|
-
}, [M,
|
|
303
|
+
}, [M, T, c == null ? void 0 : c.rowHoverable]);
|
|
309
304
|
return /* @__PURE__ */ o.jsxs(
|
|
310
305
|
"div",
|
|
311
306
|
{
|
|
312
|
-
className:
|
|
313
|
-
style:
|
|
307
|
+
className: V("bitzTableBlock", { fullscreen: B }),
|
|
308
|
+
style: Je,
|
|
314
309
|
children: [
|
|
315
|
-
!O && /* @__PURE__ */ o.jsxs("div", { ref: x, className:
|
|
310
|
+
!O && /* @__PURE__ */ o.jsxs("div", { ref: x, className: Xe, style: Qe, children: [
|
|
316
311
|
/* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref: Q, children: [
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
312
|
+
Te && /* @__PURE__ */ o.jsxs("div", { className: "bitzTableToolbarBlock", children: [
|
|
313
|
+
ke || /* @__PURE__ */ o.jsx("div", {}),
|
|
314
|
+
ze,
|
|
315
|
+
Ne
|
|
321
316
|
] }),
|
|
322
317
|
/* @__PURE__ */ o.jsx(
|
|
323
|
-
|
|
318
|
+
_,
|
|
324
319
|
{
|
|
325
|
-
...
|
|
320
|
+
...h,
|
|
326
321
|
bordered: Ge,
|
|
327
|
-
columns:
|
|
322
|
+
columns: $e,
|
|
328
323
|
dataSource: Oe,
|
|
329
324
|
loading: !1,
|
|
330
325
|
pagination: !1,
|
|
331
326
|
scroll: te,
|
|
332
|
-
expandable:
|
|
327
|
+
expandable: Se,
|
|
333
328
|
rowSelection: qe,
|
|
334
|
-
|
|
329
|
+
onRow: Ue,
|
|
330
|
+
rowClassName: Ye,
|
|
335
331
|
className: "bitzTable",
|
|
336
|
-
components:
|
|
337
|
-
rowKey:
|
|
332
|
+
components: Ze,
|
|
333
|
+
rowKey: Fe
|
|
338
334
|
}
|
|
339
335
|
)
|
|
340
336
|
] }),
|
|
341
|
-
|
|
342
|
-
|
|
337
|
+
fe && /* @__PURE__ */ o.jsx(
|
|
338
|
+
ot,
|
|
343
339
|
{
|
|
344
340
|
size: "small",
|
|
345
341
|
elRefInstance: Y,
|
|
346
342
|
enableControl: Ce,
|
|
347
|
-
pagination:
|
|
348
|
-
total:
|
|
349
|
-
dataSource:
|
|
343
|
+
pagination: pe,
|
|
344
|
+
total: N,
|
|
345
|
+
dataSource: s,
|
|
350
346
|
resetPage: Le,
|
|
351
347
|
paginationEmit: we
|
|
352
348
|
}
|
|
353
349
|
)
|
|
354
350
|
] }),
|
|
355
351
|
O && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
356
|
-
(d || (
|
|
357
|
-
!d && /* @__PURE__ */ o.jsx(
|
|
352
|
+
(d || (s == null ? void 0 : s.length) > 0) && /* @__PURE__ */ o.jsx(o.Fragment, { children: F ? /* @__PURE__ */ o.jsx(lt, { onRefresh: F, children: ie }) : ie }),
|
|
353
|
+
!d && /* @__PURE__ */ o.jsx(rt, { data: s, title: je, img: ve }),
|
|
358
354
|
/* @__PURE__ */ o.jsx(
|
|
359
|
-
|
|
355
|
+
nt,
|
|
360
356
|
{
|
|
361
357
|
className: "tableMobileDrawer",
|
|
362
358
|
open: Ee,
|
|
@@ -365,17 +361,17 @@ function Ct({
|
|
|
365
361
|
closable: !1,
|
|
366
362
|
onClose: J,
|
|
367
363
|
children: /* @__PURE__ */ o.jsxs("div", { className: "drawerBox", children: [
|
|
368
|
-
/* @__PURE__ */ o.jsx("div", { className: "boxBody", children:
|
|
364
|
+
/* @__PURE__ */ o.jsx("div", { className: "boxBody", children: We.map((e, t) => /* @__PURE__ */ o.jsx(
|
|
369
365
|
"div",
|
|
370
366
|
{
|
|
371
367
|
className: "operaList",
|
|
372
|
-
onClick: () => He(
|
|
373
|
-
...
|
|
374
|
-
style: { color:
|
|
368
|
+
onClick: () => He(e),
|
|
369
|
+
...e.danger && {
|
|
370
|
+
style: { color: b.colorError }
|
|
375
371
|
},
|
|
376
|
-
children:
|
|
372
|
+
children: e.label
|
|
377
373
|
},
|
|
378
|
-
|
|
374
|
+
t
|
|
379
375
|
)) }),
|
|
380
376
|
/* @__PURE__ */ o.jsx("div", { className: "boxLine" }),
|
|
381
377
|
/* @__PURE__ */ o.jsx("div", { className: "boxFooter", onClick: J, children: Be })
|
|
@@ -387,7 +383,7 @@ function Ct({
|
|
|
387
383
|
}
|
|
388
384
|
);
|
|
389
385
|
}
|
|
390
|
-
const
|
|
386
|
+
const Yt = (T) => /* @__PURE__ */ o.jsx(it, { initValue: T, children: /* @__PURE__ */ o.jsx(Bt, { ...T }) });
|
|
391
387
|
export {
|
|
392
|
-
|
|
388
|
+
Yt as default
|
|
393
389
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { BitzTableColumnsType } from '..';
|
|
2
|
+
/** build skeleton */
|
|
3
|
+
export declare function loopBuildSkeleton<T>(columns: BitzTableColumnsType<T>, toolCols: any): BitzTableColumnsType<T>;
|
|
2
4
|
/** 设置复选框列、展开列的位置 */
|
|
3
5
|
export declare function getColumnsWithTool<T>(sortCols: any, cols: any, rowSelection: any, expandable: any): BitzTableColumnsType<T>;
|