bitz-react-admin-ui 1.8.0 → 1.8.1
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/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- package/dist/components/BitzConfigProvider/index.d.ts +10 -5
- package/dist/components/BitzConfirmModal/index.d.ts +3 -6
- package/dist/components/BitzTable/ActionBar/style.mjs +57 -34
- package/dist/components/BitzTable/ActionCol/style.mjs +75 -72
- package/dist/components/BitzTable/Table/index.mjs +204 -194
- package/dist/components/BitzTable/ToolBar/DensityIcon/index.mjs +15 -15
- package/dist/components/BitzTable/ToolBar/style.mjs +68 -35
- 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 +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,228 +1,238 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { isMobile as
|
|
4
|
-
import { Table as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
1
|
+
import { j as o } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { useContext as ol, useState as P, useMemo as T, useEffect as Ne, useRef as A, useCallback as ke } from "react";
|
|
3
|
+
import { isMobile as R } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
|
|
4
|
+
import { Table as O, Skeleton as nl } from "antd";
|
|
5
|
+
import He from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
6
|
+
import rl from "../../BitzDrawer/index.mjs";
|
|
7
|
+
import sl from "../../BitzPagination/index.mjs";
|
|
8
|
+
import al from "../../BitzNoData/index.mjs";
|
|
9
9
|
import "../../BitzList/index.less.mjs";
|
|
10
|
-
import
|
|
10
|
+
import il from "../../BitzList/List.mjs";
|
|
11
11
|
import "../../BitzPullRefresh/style/index.less.mjs";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { columnSort as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
12
|
+
import cl from "../../BitzPullRefresh/PullRefresh.mjs";
|
|
13
|
+
import hl, { TableContext as bl } from "../Store/index.mjs";
|
|
14
|
+
import dl from "../TableSkeleton/index.mjs";
|
|
15
|
+
import { columnSort as Se, genColumnKey as $e } from "../Store/utils/index.mjs";
|
|
16
|
+
import V from "../../../node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSize/index.mjs";
|
|
17
|
+
import gl from "../ActionCol/style.mjs";
|
|
18
|
+
import xl from "../../BitzTheme/index.mjs";
|
|
19
19
|
import "./index.less.mjs";
|
|
20
|
-
import
|
|
21
|
-
function
|
|
20
|
+
import fl from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
|
|
21
|
+
function Tl({
|
|
22
22
|
showPagination: z = !0,
|
|
23
|
-
fillEvenRow:
|
|
24
|
-
evenRowBgColor:
|
|
23
|
+
fillEvenRow: K = !0,
|
|
24
|
+
evenRowBgColor: ul = "#f9f9f9",
|
|
25
25
|
height: B,
|
|
26
26
|
dataSource: c = [],
|
|
27
|
-
total:
|
|
28
|
-
columns:
|
|
27
|
+
total: S = 0,
|
|
28
|
+
columns: m,
|
|
29
29
|
loading: v = !1,
|
|
30
|
-
skeletonNum:
|
|
31
|
-
skeletonRender:
|
|
32
|
-
skeletonRowNum:
|
|
33
|
-
skeletonRowsWidth:
|
|
34
|
-
mobileLoadEmit:
|
|
35
|
-
mobileRefreshEmit:
|
|
36
|
-
operationFilter:
|
|
37
|
-
enableControlPage:
|
|
38
|
-
pagination:
|
|
39
|
-
paginationEmit:
|
|
30
|
+
skeletonNum: Le = 2,
|
|
31
|
+
skeletonRender: _,
|
|
32
|
+
skeletonRowNum: Me = 4,
|
|
33
|
+
skeletonRowsWidth: We = ["35%", "100%", "100%", "60%"],
|
|
34
|
+
mobileLoadEmit: Ee,
|
|
35
|
+
mobileRefreshEmit: D,
|
|
36
|
+
operationFilter: $,
|
|
37
|
+
enableControlPage: Pe,
|
|
38
|
+
pagination: Ae,
|
|
39
|
+
paginationEmit: Re = () => {
|
|
40
40
|
},
|
|
41
|
-
mobilePageHeight:
|
|
42
|
-
mobileCancelText:
|
|
43
|
-
noDataTitle:
|
|
44
|
-
noDataImg:
|
|
45
|
-
color:
|
|
46
|
-
size:
|
|
47
|
-
showTableTool:
|
|
48
|
-
tableAction:
|
|
49
|
-
tableToolbar:
|
|
50
|
-
selectionBar:
|
|
51
|
-
scroll:
|
|
52
|
-
resetPage:
|
|
53
|
-
...
|
|
41
|
+
mobilePageHeight: ml = 500,
|
|
42
|
+
mobileCancelText: Oe = "取消",
|
|
43
|
+
noDataTitle: Ve,
|
|
44
|
+
noDataImg: Ke,
|
|
45
|
+
color: pl,
|
|
46
|
+
size: q,
|
|
47
|
+
showTableTool: F = !0,
|
|
48
|
+
tableAction: _e,
|
|
49
|
+
tableToolbar: De,
|
|
50
|
+
selectionBar: qe,
|
|
51
|
+
scroll: h,
|
|
52
|
+
resetPage: Fe,
|
|
53
|
+
...b
|
|
54
54
|
}) {
|
|
55
|
-
var
|
|
56
|
-
const { token:
|
|
57
|
-
var
|
|
58
|
-
const
|
|
55
|
+
var le;
|
|
56
|
+
const { token: n } = xl.useToken(), { gap: Ge } = gl(), d = ol(bl), [p, G] = P(!1), [Ue, L] = P(!1), Xe = T(() => !!(c != null && c.length) && (c == null ? void 0 : c.length) >= S, [c, S]), [Ie, Je] = P([]), Qe = (l, e) => {
|
|
57
|
+
var t;
|
|
58
|
+
const r = (t = $ == null ? void 0 : $(l, e)) == null ? void 0 : t.filter(
|
|
59
59
|
(s) => s.type !== "divider"
|
|
60
60
|
);
|
|
61
|
-
|
|
61
|
+
r != null && r.length && (Je(r), L(!0));
|
|
62
62
|
}, U = () => {
|
|
63
|
-
|
|
64
|
-
},
|
|
63
|
+
L(!1);
|
|
64
|
+
}, Ye = (l) => {
|
|
65
65
|
var e;
|
|
66
|
-
|
|
66
|
+
L(!1), (e = l.onClick) == null || e.call(l);
|
|
67
67
|
};
|
|
68
|
-
|
|
69
|
-
var e,
|
|
70
|
-
(e =
|
|
68
|
+
Ne(() => (document == null || document.addEventListener("fullscreenchange", (l) => {
|
|
69
|
+
var e, r, t;
|
|
70
|
+
(e = l.target) != null && e.classList.contains("bitzTableBlock") && (G(!!document.fullscreenElement), (t = (r = document.fullscreenElement) == null ? void 0 : r.classList) != null && t.contains("bitzTableBlock") || G(!1));
|
|
71
71
|
}), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
|
|
72
72
|
})), []);
|
|
73
|
-
const
|
|
74
|
-
var
|
|
75
|
-
const
|
|
73
|
+
const C = A(null), M = V(C), N = A(null), W = V(N), X = A(null), y = V(X), Ze = () => {
|
|
74
|
+
var r;
|
|
75
|
+
const l = (r = N.current) == null ? void 0 : r.querySelectorAll(
|
|
76
76
|
".ant-table-body tr:not(.ant-table-measure-row)"
|
|
77
77
|
), e = [];
|
|
78
|
-
if (
|
|
78
|
+
if (l == null || l.forEach((t) => {
|
|
79
79
|
var s;
|
|
80
80
|
e.push(
|
|
81
|
-
((s =
|
|
81
|
+
((s = t.querySelector(".operationCol .actionGroup")) == null ? void 0 : s.clientWidth) || 0
|
|
82
82
|
);
|
|
83
83
|
}), e.length)
|
|
84
|
-
return Math.ceil(Math.max(...e)) +
|
|
84
|
+
return Math.ceil(Math.max(...e)) + Ge * 2;
|
|
85
85
|
}, I = () => {
|
|
86
86
|
var s;
|
|
87
|
-
const
|
|
87
|
+
const l = (s = N.current) == null ? void 0 : s.querySelector(
|
|
88
88
|
".ant-table-body"
|
|
89
|
-
), e =
|
|
90
|
-
return { tbodyWidth: e, scrollBarWidth:
|
|
91
|
-
}, { y:
|
|
89
|
+
), e = l == null ? void 0 : l.clientWidth, r = ((l == null ? void 0 : l.offsetWidth) || 0) - e, t = r > 0;
|
|
90
|
+
return { tbodyWidth: e, scrollBarWidth: r, hasScrollBar: t };
|
|
91
|
+
}, { y: E, hasScrollBar: J } = T(() => {
|
|
92
92
|
if (typeof B > "u")
|
|
93
93
|
return {};
|
|
94
|
-
const { hasScrollBar:
|
|
95
|
-
let e = 40,
|
|
96
|
-
if (
|
|
97
|
-
const
|
|
98
|
-
e = parseInt(
|
|
94
|
+
const { hasScrollBar: l } = I();
|
|
95
|
+
let e = 40, r = 40, t = 10;
|
|
96
|
+
if (C.current) {
|
|
97
|
+
const f = window.getComputedStyle(C.current);
|
|
98
|
+
e = parseInt(f.getPropertyValue("--cell-block")), r = parseInt(f.getPropertyValue("--toolbar-height")), t = parseInt(f.getPropertyValue("--container-gap")) || 0;
|
|
99
99
|
}
|
|
100
|
-
const s = (
|
|
101
|
-
return { y: (p ? window.innerHeight : B) - s - a -
|
|
100
|
+
const s = (y == null ? void 0 : y.height) || 0, a = s ? t : 0;
|
|
101
|
+
return { y: (p ? window.innerHeight : B) - s - a - r - e, hasScrollBar: l };
|
|
102
102
|
}, [
|
|
103
103
|
p,
|
|
104
104
|
B,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
]), k =
|
|
109
|
-
(
|
|
110
|
-
const e =
|
|
105
|
+
y == null ? void 0 : y.height,
|
|
106
|
+
M == null ? void 0 : M.height,
|
|
107
|
+
W == null ? void 0 : W.height
|
|
108
|
+
]), k = T(() => h != null && h.x ? { x: h.x, y: h.y || E } : h != null && h.y ? { x: 1e3, y: h.y } : { x: 1e3, y: E }, [h, E]), Q = ke(
|
|
109
|
+
(l) => {
|
|
110
|
+
const e = l.length, r = l.filter((g) => g.width), s = r.map((g) => g.width).reduce((g, H) => g + H, 0);
|
|
111
111
|
let a = 0;
|
|
112
|
-
if (
|
|
113
|
-
const
|
|
114
|
-
a = parseInt(
|
|
112
|
+
if (C.current) {
|
|
113
|
+
const g = window.getComputedStyle(C.current);
|
|
114
|
+
a = parseInt(g.getPropertyValue("--toolCell-width"));
|
|
115
115
|
}
|
|
116
116
|
let i = 0;
|
|
117
|
-
|
|
118
|
-
const { tbodyWidth:
|
|
119
|
-
return j >= 0 ? j / (e -
|
|
117
|
+
b.rowSelection && (i += a), b.expandable && (i += a);
|
|
118
|
+
const { tbodyWidth: u } = I(), x = parseInt(`${k.x}`) || 0, f = Math.max(x, u), j = (parseInt(`${f}`) || 0) - s - i;
|
|
119
|
+
return j >= 0 ? j / (e - r.length) : void 0;
|
|
120
120
|
},
|
|
121
|
-
[
|
|
122
|
-
), w =
|
|
123
|
-
const
|
|
124
|
-
const
|
|
121
|
+
[b.expandable, b.rowSelection, k]
|
|
122
|
+
), w = T(() => {
|
|
123
|
+
const l = (a) => a.map((i) => {
|
|
124
|
+
const u = $e(
|
|
125
125
|
(i == null ? void 0 : i.key) || (i == null ? void 0 : i.dataIndex),
|
|
126
126
|
i.index
|
|
127
|
-
), x =
|
|
127
|
+
), x = d.columnsMap[u];
|
|
128
128
|
return x && x.show === !1 ? !1 : i.children ? {
|
|
129
129
|
...i,
|
|
130
|
-
children:
|
|
130
|
+
children: l(i.children)
|
|
131
131
|
} : i;
|
|
132
|
-
}).filter(Boolean), e =
|
|
133
|
-
if (
|
|
134
|
-
return e.sort(
|
|
135
|
-
const
|
|
132
|
+
}).filter(Boolean), e = l(m);
|
|
133
|
+
if (R)
|
|
134
|
+
return e.sort(Se(d.columnsMap));
|
|
135
|
+
const r = e.sort(Se(d.columnsMap)), t = Q(r), s = r.map((a) => ({
|
|
136
136
|
...a,
|
|
137
137
|
...a.width ? {
|
|
138
|
-
width: a.useMaxWidth ?
|
|
138
|
+
width: a.useMaxWidth ? Ze() ?? a.width : a.width
|
|
139
139
|
} : {
|
|
140
140
|
// 给未设置width的列设置平均数
|
|
141
|
-
width:
|
|
141
|
+
width: t
|
|
142
142
|
}
|
|
143
143
|
}));
|
|
144
|
-
return [
|
|
145
|
-
}, [
|
|
146
|
-
|
|
147
|
-
if (
|
|
148
|
-
const
|
|
144
|
+
return [O.SELECTION_COLUMN, O.EXPAND_COLUMN, ...s];
|
|
145
|
+
}, [m, d.columnsMap, Q, d.sortKeyColumns]);
|
|
146
|
+
Ne(() => {
|
|
147
|
+
if (m && m.length > 0) {
|
|
148
|
+
const l = m.map(
|
|
149
149
|
(e) => (
|
|
150
150
|
// @ts-ignore
|
|
151
|
-
|
|
151
|
+
$e((e == null ? void 0 : e.key) ?? (e == null ? void 0 : e.dataIndex), e == null ? void 0 : e.dataIndex)
|
|
152
152
|
)
|
|
153
153
|
);
|
|
154
|
-
|
|
154
|
+
d.setSortKeyColumns(l);
|
|
155
155
|
}
|
|
156
|
-
}, [
|
|
157
|
-
const Y =
|
|
156
|
+
}, [m]);
|
|
157
|
+
const Y = T(() => `${q ?? (d == null ? void 0 : d.tableSize) ?? "lg"}BitzTable`, [q, d.tableSize]), el = T(() => He(
|
|
158
158
|
"bitzTableContainer",
|
|
159
159
|
/* "hideBorder", */
|
|
160
160
|
{ hasScrollBar: J },
|
|
161
161
|
Y
|
|
162
|
-
), [Y, J, p]),
|
|
163
|
-
"--container-bgColor":
|
|
164
|
-
}), [
|
|
165
|
-
var
|
|
162
|
+
), [Y, J, p]), ll = T(() => ({
|
|
163
|
+
"--container-bgColor": n.colorBgContainer
|
|
164
|
+
}), [n.Table]), tl = T(() => {
|
|
165
|
+
var l, e, r, t, s, a, i, u, x, f, j, g, H, te, oe, ne, re, se, ae, ie, ce, he, be, de, ge, xe, fe, Te, ue, me, pe, Ce, ye, Be, we, je, ze, ve;
|
|
166
166
|
return {
|
|
167
167
|
height: p ? "100%" : B,
|
|
168
|
-
"--toolbar-bgColor": (
|
|
169
|
-
"--thead-bgColor": (e =
|
|
170
|
-
"--thead-hoverBgColor": (
|
|
171
|
-
"--evenRow-BgColor": (
|
|
172
|
-
"--radioCheckbox-borderColor": (s =
|
|
173
|
-
"--expandIcon-borderColor": (a =
|
|
174
|
-
"--rowHover-bgColor": (i =
|
|
175
|
-
"--tbodyRow-borderColor": (
|
|
176
|
-
"--xlTable-fontSize": `${(x =
|
|
177
|
-
"--lgTable-fontSize": `${(
|
|
178
|
-
"--mdTable-fontSize": `${(
|
|
179
|
-
"--smTable-fontSize": `${(
|
|
180
|
-
"--xsTable-fontSize": `${(
|
|
168
|
+
"--toolbar-bgColor": (l = n.Table) == null ? void 0 : l.toolbarBgColor,
|
|
169
|
+
"--thead-bgColor": (e = n.Table) == null ? void 0 : e.headerBg,
|
|
170
|
+
"--thead-hoverBgColor": (r = n.Table) == null ? void 0 : r.headerSortHoverBg,
|
|
171
|
+
"--evenRow-BgColor": (t = n.Table) == null ? void 0 : t.evenRowBgColor,
|
|
172
|
+
"--radioCheckbox-borderColor": (s = n.Table) == null ? void 0 : s.radioCheckboxBorderColor,
|
|
173
|
+
"--expandIcon-borderColor": (a = n.Table) == null ? void 0 : a.expandIconBorderColor,
|
|
174
|
+
"--rowHover-bgColor": (i = n.Table) == null ? void 0 : i.rowHoverBg,
|
|
175
|
+
"--tbodyRow-borderColor": (u = n.Table) == null ? void 0 : u.borderColor,
|
|
176
|
+
"--xlTable-fontSize": `${(f = (x = n.Table) == null ? void 0 : x.xlTable) == null ? void 0 : f.fontSize}px`,
|
|
177
|
+
"--lgTable-fontSize": `${(g = (j = n.Table) == null ? void 0 : j.lgTable) == null ? void 0 : g.fontSize}px`,
|
|
178
|
+
"--mdTable-fontSize": `${(te = (H = n.Table) == null ? void 0 : H.mdTable) == null ? void 0 : te.fontSize}px`,
|
|
179
|
+
"--smTable-fontSize": `${(ne = (oe = n.Table) == null ? void 0 : oe.smTable) == null ? void 0 : ne.fontSize}px`,
|
|
180
|
+
"--xsTable-fontSize": `${(se = (re = n.Table) == null ? void 0 : re.xsTable) == null ? void 0 : se.fontSize}px`,
|
|
181
|
+
"--xlTable-height": `${(ie = (ae = n.Table) == null ? void 0 : ae.xlTable) == null ? void 0 : ie.height}px`,
|
|
182
|
+
"--lgTable-height": `${(he = (ce = n.Table) == null ? void 0 : ce.lgTable) == null ? void 0 : he.height}px`,
|
|
183
|
+
"--mdTable-height": `${(de = (be = n.Table) == null ? void 0 : be.mdTable) == null ? void 0 : de.height}px`,
|
|
184
|
+
"--smTable-height": `${(xe = (ge = n.Table) == null ? void 0 : ge.smTable) == null ? void 0 : xe.height}px`,
|
|
185
|
+
"--xsTable-height": `${(Te = (fe = n.Table) == null ? void 0 : fe.xsTable) == null ? void 0 : Te.height}px`,
|
|
186
|
+
"--xlTable-lineHeight": `${(me = (ue = n.Table) == null ? void 0 : ue.xlTable) == null ? void 0 : me.lineHeight}px`,
|
|
187
|
+
"--lgTable-lineHeight": `${(Ce = (pe = n.Table) == null ? void 0 : pe.lgTable) == null ? void 0 : Ce.lineHeight}px`,
|
|
188
|
+
"--mdTable-lineHeight": `${(Be = (ye = n.Table) == null ? void 0 : ye.mdTable) == null ? void 0 : Be.lineHeight}px`,
|
|
189
|
+
"--smTable-lineHeight": `${(je = (we = n.Table) == null ? void 0 : we.smTable) == null ? void 0 : je.lineHeight}px`,
|
|
190
|
+
"--xsTable-lineHeight": `${(ve = (ze = n.Table) == null ? void 0 : ze.xsTable) == null ? void 0 : ve.lineHeight}px`
|
|
181
191
|
// '--tableBody-bootomBorderColor': token.Table?.borderColor || '#f0f0f0',
|
|
182
192
|
};
|
|
183
|
-
}, [p, B,
|
|
184
|
-
(
|
|
185
|
-
[
|
|
186
|
-
), ee = /* @__PURE__ */
|
|
187
|
-
|
|
193
|
+
}, [p, B, n.Table]), Z = ke(
|
|
194
|
+
(l, e) => K ? e % 2 === 0 ? "oddRow" : "evenRow" : "",
|
|
195
|
+
[K]
|
|
196
|
+
), ee = /* @__PURE__ */ o.jsx(
|
|
197
|
+
il,
|
|
188
198
|
{
|
|
189
|
-
finished:
|
|
190
|
-
onLoad:
|
|
199
|
+
finished: Xe,
|
|
200
|
+
onLoad: Ee,
|
|
191
201
|
loadingText: "加载中...",
|
|
192
202
|
finishedText: "没有更多了",
|
|
193
203
|
errorText: "加载失败",
|
|
194
|
-
children: /* @__PURE__ */
|
|
204
|
+
children: /* @__PURE__ */ o.jsxs(
|
|
195
205
|
"div",
|
|
196
206
|
{
|
|
197
207
|
className: "mobileList",
|
|
198
|
-
style: { backgroundColor: (
|
|
208
|
+
style: { backgroundColor: (le = n.Table) == null ? void 0 : le.mobileListBgColor },
|
|
199
209
|
children: [
|
|
200
|
-
c == null ? void 0 : c.map((
|
|
201
|
-
var
|
|
202
|
-
return /* @__PURE__ */
|
|
210
|
+
c == null ? void 0 : c.map((l, e) => {
|
|
211
|
+
var r;
|
|
212
|
+
return /* @__PURE__ */ o.jsx(
|
|
203
213
|
"div",
|
|
204
214
|
{
|
|
205
215
|
className: "listItem",
|
|
206
|
-
style: { backgroundColor: (
|
|
207
|
-
onClick: () =>
|
|
208
|
-
children: w == null ? void 0 : w.map((
|
|
216
|
+
style: { backgroundColor: (r = n.Table) == null ? void 0 : r.listItemBgColor },
|
|
217
|
+
onClick: () => Qe(l, e),
|
|
218
|
+
children: w == null ? void 0 : w.map((t, s) => {
|
|
209
219
|
var a;
|
|
210
|
-
return !(
|
|
220
|
+
return !(t != null && t.mobileHide) && /* @__PURE__ */ o.jsxs(
|
|
211
221
|
"div",
|
|
212
222
|
{
|
|
213
223
|
className: "row",
|
|
214
|
-
style: { color:
|
|
224
|
+
style: { color: n.colorText },
|
|
215
225
|
children: [
|
|
216
|
-
!
|
|
217
|
-
`${
|
|
226
|
+
!t.mobileHideLabel && /* @__PURE__ */ o.jsxs("div", { className: "label", children: [
|
|
227
|
+
`${t.title}`,
|
|
218
228
|
":"
|
|
219
229
|
] }),
|
|
220
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ o.jsx("div", { className: "value", children: ((a = t == null ? void 0 : t.render) == null ? void 0 : a.call(
|
|
231
|
+
t,
|
|
232
|
+
fl(l, (t == null ? void 0 : t.dataIndex) || ""),
|
|
221
233
|
l,
|
|
222
|
-
De(o, (l == null ? void 0 : l.dataIndex) || ""),
|
|
223
|
-
o,
|
|
224
234
|
e
|
|
225
|
-
)) || (
|
|
235
|
+
)) || (l == null ? void 0 : l[t.dataIndex]) })
|
|
226
236
|
]
|
|
227
237
|
},
|
|
228
238
|
s
|
|
@@ -232,20 +242,20 @@ function qe({
|
|
|
232
242
|
e
|
|
233
243
|
);
|
|
234
244
|
}),
|
|
235
|
-
v && Array.from({ length:
|
|
236
|
-
var
|
|
237
|
-
return /* @__PURE__ */
|
|
245
|
+
v && Array.from({ length: Le }).map((l, e) => {
|
|
246
|
+
var r;
|
|
247
|
+
return /* @__PURE__ */ o.jsx(
|
|
238
248
|
"div",
|
|
239
249
|
{
|
|
240
250
|
className: "listItem",
|
|
241
|
-
style: { backgroundColor: (
|
|
242
|
-
children: /* @__PURE__ */
|
|
243
|
-
|
|
251
|
+
style: { backgroundColor: (r = n.Table) == null ? void 0 : r.listItemBgColor },
|
|
252
|
+
children: /* @__PURE__ */ o.jsx("div", { className: "row", children: _ ? _() : /* @__PURE__ */ o.jsx(
|
|
253
|
+
nl,
|
|
244
254
|
{
|
|
245
255
|
title: !1,
|
|
246
256
|
paragraph: {
|
|
247
|
-
rows:
|
|
248
|
-
width:
|
|
257
|
+
rows: Me,
|
|
258
|
+
width: We
|
|
249
259
|
},
|
|
250
260
|
active: !0
|
|
251
261
|
}
|
|
@@ -259,87 +269,87 @@ function qe({
|
|
|
259
269
|
)
|
|
260
270
|
}
|
|
261
271
|
);
|
|
262
|
-
return /* @__PURE__ */
|
|
272
|
+
return /* @__PURE__ */ o.jsxs(
|
|
263
273
|
"div",
|
|
264
274
|
{
|
|
265
|
-
className:
|
|
266
|
-
style:
|
|
275
|
+
className: He("bitzTableBlock", { fullscreen: p }),
|
|
276
|
+
style: ll,
|
|
267
277
|
children: [
|
|
268
|
-
!
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
(
|
|
278
|
+
!R && /* @__PURE__ */ o.jsxs("div", { ref: C, className: el, style: tl, children: [
|
|
279
|
+
/* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref: N, children: [
|
|
280
|
+
F && /* @__PURE__ */ o.jsxs("div", { className: "bitzTableToolbarBlock", children: [
|
|
281
|
+
_e || /* @__PURE__ */ o.jsx("div", {}),
|
|
282
|
+
De,
|
|
283
|
+
(b == null ? void 0 : b.rowSelection) && /* @__PURE__ */ o.jsx(o.Fragment, { children: qe })
|
|
274
284
|
] }),
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
|
|
285
|
+
/* @__PURE__ */ o.jsx(
|
|
286
|
+
O,
|
|
277
287
|
{
|
|
278
288
|
columns: w,
|
|
279
289
|
dataSource: c,
|
|
280
290
|
loading: !1,
|
|
281
291
|
pagination: !1,
|
|
282
292
|
scroll: k,
|
|
283
|
-
...
|
|
293
|
+
...b,
|
|
284
294
|
rowClassName: Z,
|
|
285
295
|
className: "bitzTable"
|
|
286
296
|
}
|
|
287
297
|
),
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
|
|
298
|
+
/* @__PURE__ */ o.jsx(
|
|
299
|
+
dl,
|
|
290
300
|
{
|
|
291
301
|
columns: w,
|
|
292
302
|
dataLength: c.length,
|
|
293
303
|
scroll: k,
|
|
294
|
-
rowSelection:
|
|
295
|
-
expandable:
|
|
296
|
-
showTableTool:
|
|
304
|
+
rowSelection: b.rowSelection,
|
|
305
|
+
expandable: b.expandable,
|
|
306
|
+
showTableTool: F,
|
|
297
307
|
rowClassName: Z,
|
|
298
308
|
loading: v,
|
|
299
309
|
className: "bitzTableSkeleton"
|
|
300
310
|
}
|
|
301
311
|
)
|
|
302
312
|
] }),
|
|
303
|
-
z && /* @__PURE__ */
|
|
304
|
-
|
|
313
|
+
z && /* @__PURE__ */ o.jsx(
|
|
314
|
+
sl,
|
|
305
315
|
{
|
|
306
316
|
elRefInstance: X,
|
|
307
|
-
enableControl:
|
|
308
|
-
pagination:
|
|
309
|
-
total:
|
|
317
|
+
enableControl: Pe,
|
|
318
|
+
pagination: Ae,
|
|
319
|
+
total: S,
|
|
310
320
|
dataSource: c,
|
|
311
|
-
resetPage:
|
|
312
|
-
paginationEmit:
|
|
321
|
+
resetPage: Fe,
|
|
322
|
+
paginationEmit: Re
|
|
313
323
|
}
|
|
314
324
|
)
|
|
315
325
|
] }),
|
|
316
|
-
|
|
317
|
-
(v || (c == null ? void 0 : c.length) > 0) && /* @__PURE__ */
|
|
318
|
-
!v && /* @__PURE__ */
|
|
319
|
-
/* @__PURE__ */
|
|
320
|
-
|
|
326
|
+
R && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
327
|
+
(v || (c == null ? void 0 : c.length) > 0) && /* @__PURE__ */ o.jsx(o.Fragment, { children: D ? /* @__PURE__ */ o.jsx(cl, { onRefresh: D, children: ee }) : ee }),
|
|
328
|
+
!v && /* @__PURE__ */ o.jsx(al, { data: c, title: Ve, img: Ke }),
|
|
329
|
+
/* @__PURE__ */ o.jsx(
|
|
330
|
+
rl,
|
|
321
331
|
{
|
|
322
332
|
className: "tableMobileDrawer",
|
|
323
|
-
open:
|
|
333
|
+
open: Ue,
|
|
324
334
|
placement: "bottom",
|
|
325
335
|
height: "auto",
|
|
326
336
|
closable: !1,
|
|
327
337
|
onClose: U,
|
|
328
|
-
children: /* @__PURE__ */
|
|
329
|
-
/* @__PURE__ */
|
|
338
|
+
children: /* @__PURE__ */ o.jsxs("div", { className: "drawerBox", children: [
|
|
339
|
+
/* @__PURE__ */ o.jsx("div", { className: "boxBody", children: Ie.map((l, e) => /* @__PURE__ */ o.jsx(
|
|
330
340
|
"div",
|
|
331
341
|
{
|
|
332
342
|
className: "operaList",
|
|
333
|
-
onClick: () =>
|
|
334
|
-
...
|
|
335
|
-
style: { color:
|
|
343
|
+
onClick: () => Ye(l),
|
|
344
|
+
...l.danger && {
|
|
345
|
+
style: { color: n.colorError }
|
|
336
346
|
},
|
|
337
|
-
children:
|
|
347
|
+
children: l.label
|
|
338
348
|
},
|
|
339
349
|
e
|
|
340
350
|
)) }),
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ o.jsx("div", { className: "boxLine" }),
|
|
352
|
+
/* @__PURE__ */ o.jsx("div", { className: "boxFooter", onClick: U, children: Oe })
|
|
343
353
|
] })
|
|
344
354
|
}
|
|
345
355
|
)
|
|
@@ -348,7 +358,7 @@ function qe({
|
|
|
348
358
|
}
|
|
349
359
|
);
|
|
350
360
|
}
|
|
351
|
-
const
|
|
361
|
+
const Vl = (z) => /* @__PURE__ */ o.jsx(hl, { initValue: z, children: /* @__PURE__ */ o.jsx(Tl, { ...z }) });
|
|
352
362
|
export {
|
|
353
|
-
|
|
363
|
+
Vl as default
|
|
354
364
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as o } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import { memo as f, useContext as k } from "react";
|
|
3
3
|
import { Dropdown as b, Tooltip as g } from "antd";
|
|
4
4
|
import { TableContext as j } from "../../Store/index.mjs";
|
|
@@ -6,18 +6,18 @@ import h from "../style.mjs";
|
|
|
6
6
|
import C from "../../../BitzButton/index.mjs";
|
|
7
7
|
import w from "../../../../node_modules/.store/@ant-design_icons@5.3.3/node_modules/@ant-design/icons/es/icons/ColumnHeightOutlined.mjs";
|
|
8
8
|
const z = (e) => {
|
|
9
|
-
const { order: s, show:
|
|
10
|
-
sizeStorageType:
|
|
9
|
+
const { order: s, show: c = !0, icon: a = /* @__PURE__ */ o.jsx(w, {}) } = e, {
|
|
10
|
+
sizeStorageType: y,
|
|
11
11
|
sizeStorageKey: i,
|
|
12
|
-
onlineSizeChange:
|
|
13
|
-
tableSize:
|
|
14
|
-
setTableSize:
|
|
15
|
-
} = k(j), { toolbarItemClassName:
|
|
16
|
-
selectedKeys: [
|
|
17
|
-
onClick: (
|
|
18
|
-
var
|
|
19
|
-
const { key:
|
|
20
|
-
|
|
12
|
+
onlineSizeChange: l,
|
|
13
|
+
tableSize: m,
|
|
14
|
+
setTableSize: n
|
|
15
|
+
} = k(j), { toolbarItemClassName: u } = h(), x = {
|
|
16
|
+
selectedKeys: [m],
|
|
17
|
+
onClick: (d) => {
|
|
18
|
+
var r;
|
|
19
|
+
const { key: t } = d;
|
|
20
|
+
t !== m && (n == null || n(t), y === "online" && i && (l == null || l(i, t)), (r = e == null ? void 0 : e.onChange) == null || r.call(e, t));
|
|
21
21
|
},
|
|
22
22
|
items: [
|
|
23
23
|
{
|
|
@@ -42,13 +42,13 @@ const z = (e) => {
|
|
|
42
42
|
}
|
|
43
43
|
]
|
|
44
44
|
};
|
|
45
|
-
return
|
|
45
|
+
return c ? /* @__PURE__ */ o.jsx(b, { menu: x, trigger: ["click"], children: /* @__PURE__ */ o.jsx(g, { title: "表格密度", open: !1, children: /* @__PURE__ */ o.jsx(
|
|
46
46
|
C,
|
|
47
47
|
{
|
|
48
48
|
style: { order: s },
|
|
49
49
|
type: "text",
|
|
50
|
-
className:
|
|
51
|
-
icon:
|
|
50
|
+
className: u,
|
|
51
|
+
icon: a,
|
|
52
52
|
children: "表格密度"
|
|
53
53
|
}
|
|
54
54
|
) }) }) : null;
|