bitz-react-admin-ui 2.1.8 → 2.1.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/dayjs.min.mjs +2 -5
- package/dist/components/BitzCalendar/index.mjs +1 -1
- package/dist/components/BitzDayJs/index.mjs +1 -1
- package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +1 -1
- package/dist/components/BitzFuiCalendar/ColumnData.mjs +1 -1
- package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
- package/dist/components/BitzMeetingTime/index.mjs +1 -1
- package/dist/components/BitzTable/SubTable/index.d.ts +21 -0
- package/dist/components/BitzTable/SubTable/index.mjs +165 -0
- package/dist/components/BitzTable/Table/index.mjs +135 -134
- package/dist/components/BitzTable/index.d.ts +2 -0
- package/dist/components/BitzTable/index.mjs +13 -11
- package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
- package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
- package/dist/style.css +1 -1
- package/dist/utils/WithFluent.mjs +16 -12
- package/dist/utils/time.mjs +1 -1
- package/package.json +1 -1
- package/dist/_virtual/dayjs.min2.mjs +0 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as o } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { useContext as ge, useState as H, useRef as T, useEffect as
|
|
3
|
-
import { isMobile as
|
|
4
|
-
import { Table as
|
|
5
|
-
import
|
|
2
|
+
import { useContext as ge, useState as H, useRef as T, useEffect as J, useMemo as c, useCallback as we } from "react";
|
|
3
|
+
import { isMobile as Q } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
|
|
4
|
+
import { Table as ee, Skeleton as lt } from "antd";
|
|
5
|
+
import Y from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
6
6
|
import ct from "../../BitzDrawer/index.mjs";
|
|
7
7
|
import it from "../../BitzPagination/index.mjs";
|
|
8
8
|
import at from "../../BitzNoData/index.mjs";
|
|
@@ -11,9 +11,9 @@ import dt from "../../BitzList/List.mjs";
|
|
|
11
11
|
import "../../BitzPullRefresh/style/index.less.mjs";
|
|
12
12
|
import ht from "../../BitzPullRefresh/PullRefresh.mjs";
|
|
13
13
|
import ut, { BitzTableContext as ft } from "../Store/index.mjs";
|
|
14
|
-
import { loopFilter as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
14
|
+
import { loopFilter as bt, columnSort as mt, genColumnKey as yt } from "../Store/utils/index.mjs";
|
|
15
|
+
import Z from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
|
|
16
|
+
import Ct from "../ActionCol/style.mjs";
|
|
17
17
|
import xt from "../../BitzTheme/index.mjs";
|
|
18
18
|
import gt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/table/ExpandIcon.mjs";
|
|
19
19
|
import "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/index.mjs";
|
|
@@ -23,10 +23,10 @@ import { getCssVar as jt } from "./style.mjs";
|
|
|
23
23
|
import "./index.less.mjs";
|
|
24
24
|
import { ConfigContext as vt } from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/context.mjs";
|
|
25
25
|
import Nt from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
|
|
26
|
-
const Be = [
|
|
26
|
+
const Be = [ee.SELECTION_COLUMN, ee.EXPAND_COLUMN];
|
|
27
27
|
function kt({
|
|
28
|
-
showPagination:
|
|
29
|
-
height:
|
|
28
|
+
showPagination: M = !0,
|
|
29
|
+
height: p,
|
|
30
30
|
dataSource: d = [],
|
|
31
31
|
total: A = 0,
|
|
32
32
|
columns: N,
|
|
@@ -35,59 +35,59 @@ function kt({
|
|
|
35
35
|
pc: 10,
|
|
36
36
|
mobile: 10
|
|
37
37
|
},
|
|
38
|
-
skeletonRender:
|
|
38
|
+
skeletonRender: te,
|
|
39
39
|
skeletonRowNum: ze = 4,
|
|
40
40
|
skeletonRowsWidth: je = ["35%", "100%", "100%", "60%"],
|
|
41
41
|
// mobileLoadEmit,
|
|
42
|
-
mobileRefreshEmit:
|
|
42
|
+
mobileRefreshEmit: re,
|
|
43
43
|
operationFilter: K,
|
|
44
44
|
enableControlPage: ve,
|
|
45
|
-
pagination:
|
|
45
|
+
pagination: y,
|
|
46
46
|
paginationEmit: R = () => {
|
|
47
47
|
},
|
|
48
|
-
mobilePageHeight:
|
|
48
|
+
mobilePageHeight: Wt = 500,
|
|
49
49
|
mobileCancelText: Ne = "取消",
|
|
50
50
|
noDataTitle: ke,
|
|
51
|
-
noDataImg:
|
|
51
|
+
noDataImg: We,
|
|
52
52
|
color: Tt,
|
|
53
|
-
size:
|
|
53
|
+
size: oe,
|
|
54
54
|
showTableTool: Te = !0,
|
|
55
|
-
tableAction:
|
|
56
|
-
tableToolbar:
|
|
57
|
-
selectionBar:
|
|
58
|
-
scroll:
|
|
59
|
-
components:
|
|
55
|
+
tableAction: pe,
|
|
56
|
+
tableToolbar: Se,
|
|
57
|
+
selectionBar: Le,
|
|
58
|
+
scroll: u,
|
|
59
|
+
components: S,
|
|
60
60
|
expandable: C,
|
|
61
61
|
rowSelection: z,
|
|
62
|
-
resetPage:
|
|
62
|
+
resetPage: Me,
|
|
63
63
|
...a
|
|
64
64
|
}) {
|
|
65
|
-
var
|
|
66
|
-
const { token:
|
|
67
|
-
|
|
65
|
+
var xe;
|
|
66
|
+
const { token: x } = xt.useToken(), { Table: l } = x, { tableSpaceBetweenPage: ne = 10 } = l, { gap: Re } = Ct(), { showColumnBorder: Pe, hideRowBorder: se, rowHoverable: De, ...f } = ge(ft), [k, le] = H(!1), V = T(void 0), $ = T(0), O = T(0), [He, _] = H(!1), [b, Ae] = H([]);
|
|
67
|
+
J(() => {
|
|
68
68
|
let e = [...d];
|
|
69
|
-
(
|
|
69
|
+
(y == null ? void 0 : y.page) !== 1 && (e = [...b, ...e]), Ae(e);
|
|
70
70
|
}, [d]);
|
|
71
|
-
const Ee = c(() => !!(
|
|
71
|
+
const Ee = c(() => !!(b != null && b.length) && (b == null ? void 0 : b.length) >= A, [b, A]), [Ke, Ve] = H([]), $e = (e, t) => {
|
|
72
72
|
var n;
|
|
73
73
|
const r = (n = K == null ? void 0 : K(e, t)) == null ? void 0 : n.filter(
|
|
74
74
|
(s) => s.type !== "divider"
|
|
75
75
|
);
|
|
76
|
-
r != null && r.length && (
|
|
77
|
-
},
|
|
78
|
-
|
|
76
|
+
r != null && r.length && (Ve(r), _(!0));
|
|
77
|
+
}, ce = () => {
|
|
78
|
+
_(!1);
|
|
79
79
|
}, Oe = (e) => {
|
|
80
80
|
var t;
|
|
81
|
-
|
|
81
|
+
_(!1), (t = e.onClick) == null || t.call(e);
|
|
82
82
|
};
|
|
83
|
-
|
|
83
|
+
J(() => (document == null || document.addEventListener("fullscreenchange", (e) => {
|
|
84
84
|
var t, r, n;
|
|
85
|
-
(t = e.target) != null && t.classList.contains("bitzTableBlock") && (
|
|
85
|
+
(t = e.target) != null && t.classList.contains("bitzTableBlock") && (le(!!document.fullscreenElement), (n = (r = document.fullscreenElement) == null ? void 0 : r.classList) != null && n.contains("bitzTableBlock") || le(!1));
|
|
86
86
|
}), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
|
|
87
87
|
})), []);
|
|
88
|
-
const
|
|
88
|
+
const g = T(null), q = Z(g), ie = T(null), F = Z(ie), ae = T(null), W = Z(ae), _e = () => {
|
|
89
89
|
var r;
|
|
90
|
-
const e = (r =
|
|
90
|
+
const e = (r = g.current) == null ? void 0 : r.querySelectorAll(
|
|
91
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)"
|
|
92
92
|
), t = [];
|
|
93
93
|
if (e == null || e.forEach((n) => {
|
|
@@ -97,89 +97,90 @@ function kt({
|
|
|
97
97
|
);
|
|
98
98
|
}), t.length)
|
|
99
99
|
return Math.ceil(Math.max(...t)) + Re * 2;
|
|
100
|
-
},
|
|
101
|
-
var
|
|
102
|
-
const e = (
|
|
100
|
+
}, de = () => {
|
|
101
|
+
var h, m, v;
|
|
102
|
+
const e = (h = g.current) == null ? void 0 : h.querySelector(
|
|
103
103
|
".ant-table-body"
|
|
104
|
-
), t = e == null ? void 0 : e.clientWidth, n = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, s = (v = (
|
|
104
|
+
), t = e == null ? void 0 : e.clientWidth, n = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, s = (v = (m = g.current) == null ? void 0 : m.querySelector(
|
|
105
105
|
".ant-table-cell-scrollbar"
|
|
106
106
|
)) == null ? void 0 : v.offsetWidth;
|
|
107
|
-
return { tbodyWidth: t,
|
|
108
|
-
}, { y:
|
|
109
|
-
const {
|
|
110
|
-
if (typeof
|
|
107
|
+
return { tbodyWidth: t, hasScrollBar: n, scrollbarSize: s };
|
|
108
|
+
}, { y: G, tbodyWidth: pt, hasScrollBar: P, scrollbarSize: L } = c(() => {
|
|
109
|
+
const { tbodyWidth: e, hasScrollBar: t, scrollbarSize: r } = de();
|
|
110
|
+
if (typeof p > "u")
|
|
111
111
|
return {
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
tbodyWidth: e,
|
|
113
|
+
hasScrollBar: t,
|
|
114
|
+
scrollbarSize: r
|
|
114
115
|
};
|
|
115
|
-
let
|
|
116
|
-
if (
|
|
117
|
-
const D = window.getComputedStyle(
|
|
118
|
-
|
|
116
|
+
let n = 40, s = 40;
|
|
117
|
+
if (g.current) {
|
|
118
|
+
const D = window.getComputedStyle(g.current);
|
|
119
|
+
n = parseInt(D.getPropertyValue("--cell-height")), s = parseInt(D.getPropertyValue("--toolbar-height"));
|
|
119
120
|
}
|
|
120
|
-
const
|
|
121
|
-
return { y: (k ? window.innerHeight :
|
|
121
|
+
const h = (W == null ? void 0 : W.height) || 0, m = h ? ne : 0;
|
|
122
|
+
return { y: (k ? window.innerHeight : p) - h - m - s - n, tbodyWidth: e, hasScrollBar: t, scrollbarSize: r };
|
|
122
123
|
}, [
|
|
123
124
|
k,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
]),
|
|
129
|
-
let e = (
|
|
130
|
-
return
|
|
131
|
-
}, [
|
|
132
|
-
const t = e.length, r = e.filter((B) => B.width), s = r.map((B) => B.width).reduce((B,
|
|
133
|
-
let
|
|
134
|
-
if (
|
|
135
|
-
const B = window.getComputedStyle(
|
|
125
|
+
p,
|
|
126
|
+
W == null ? void 0 : W.height,
|
|
127
|
+
q == null ? void 0 : q.height,
|
|
128
|
+
F == null ? void 0 : F.height
|
|
129
|
+
]), he = c(() => {
|
|
130
|
+
let e = (u == null ? void 0 : u.x) ?? 1e3;
|
|
131
|
+
return $.current && (e -= $.current), O.current && (e -= O.current * (V.current || 0)), u != null && u.x ? { x: e, y: u.y || G } : u != null && u.y ? { x: e, y: u.y } : { x: e, y: G };
|
|
132
|
+
}, [u, G, V.current]), qe = (e) => {
|
|
133
|
+
const t = e.length, r = e.filter((B) => B.width), s = r.map((B) => B.width).reduce((B, X) => B + X, 0);
|
|
134
|
+
let h = 0;
|
|
135
|
+
if (g.current) {
|
|
136
|
+
const B = window.getComputedStyle(g.current), X = parseInt(
|
|
136
137
|
B.getPropertyValue("--toolCell-paddingInline")
|
|
137
138
|
);
|
|
138
|
-
|
|
139
|
+
h = parseInt(B.getPropertyValue("--fontSize")) + 4 + 2 * X;
|
|
139
140
|
}
|
|
140
|
-
let
|
|
141
|
-
z && (
|
|
142
|
-
const { tbodyWidth: v } =
|
|
143
|
-
return
|
|
141
|
+
let m = 0;
|
|
142
|
+
z && (m += h), C && (m += h);
|
|
143
|
+
const { tbodyWidth: v } = de(), U = Math.max(he.x, v ?? 0) - s - m, D = t - r.length;
|
|
144
|
+
return U >= 0 ? U / D : void 0;
|
|
144
145
|
}, j = c(() => {
|
|
145
|
-
const e = N ?? [], t = e.filter((
|
|
146
|
+
const e = N ?? [], t = e.filter((w) => !Be.includes(w)), { filterColumns: r, width: n, autoWidthColLength: s } = bt(
|
|
146
147
|
t,
|
|
147
148
|
f.columnsMap
|
|
148
149
|
);
|
|
149
|
-
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
152
|
-
return
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
const v =
|
|
156
|
-
...
|
|
157
|
-
...
|
|
158
|
-
width:
|
|
150
|
+
$.current = Math.ceil(n), O.current = s;
|
|
151
|
+
const h = r.sort(mt(f.columnsMap));
|
|
152
|
+
if (Q)
|
|
153
|
+
return h;
|
|
154
|
+
const m = qe(h);
|
|
155
|
+
V.current = Math.ceil(m ?? 0);
|
|
156
|
+
const v = h.map((w) => ({
|
|
157
|
+
...w,
|
|
158
|
+
...w.width ? {
|
|
159
|
+
width: w.useMaxWidth ? _e() ?? w.width : w.width
|
|
159
160
|
} : {
|
|
160
161
|
// 给未设置width的列设置平均数
|
|
161
|
-
width:
|
|
162
|
+
width: m
|
|
162
163
|
}
|
|
163
164
|
}));
|
|
164
165
|
return Bt(e, v, z, C);
|
|
165
166
|
}, [N, f.columnsMap, f.sortKeyColumns]);
|
|
166
|
-
|
|
167
|
+
J(() => {
|
|
167
168
|
if (N && N.length > 0) {
|
|
168
169
|
const e = N.map(
|
|
169
170
|
(t) => (
|
|
170
171
|
// @ts-ignore
|
|
171
|
-
|
|
172
|
+
yt((t == null ? void 0 : t.key) ?? (t == null ? void 0 : t.dataIndex), t == null ? void 0 : t.dataIndex)
|
|
172
173
|
)
|
|
173
174
|
);
|
|
174
175
|
f.setSortKeyColumns(e);
|
|
175
176
|
}
|
|
176
177
|
}, [N]);
|
|
177
|
-
const
|
|
178
|
+
const ue = c(() => zt(j, Be), [j]), Fe = c(() => i ? ue : j, [i, j, ue]), fe = c(() => {
|
|
178
179
|
const e = d == null ? void 0 : d.length, t = e > (E.pc ?? 10) ? e >= 20 ? 20 : e : E.pc ?? 10;
|
|
179
180
|
return Array.from({ length: t }).map((n, s) => ({
|
|
180
181
|
key: `${Date.now()}${s}`
|
|
181
182
|
}));
|
|
182
|
-
}, [d]),
|
|
183
|
+
}, [d]), Ge = c(() => i ? fe : d, [i, d, fe]), { table: I, locale: Ie = wt } = ge(vt), Ue = { ...Ie.Table }, Xe = ((xe = I == null ? void 0 : I.expandable) == null ? void 0 : xe.expandIcon) || (C == null ? void 0 : C.expandIcon) || gt(Ue), be = c(() => {
|
|
183
184
|
if (C)
|
|
184
185
|
return {
|
|
185
186
|
...C,
|
|
@@ -193,20 +194,20 @@ function kt({
|
|
|
193
194
|
disabled: !0,
|
|
194
195
|
style: {
|
|
195
196
|
...t.props.style,
|
|
196
|
-
backgroundColor:
|
|
197
|
+
backgroundColor: x.colorBgContainerDisabled
|
|
197
198
|
}
|
|
198
199
|
}
|
|
199
200
|
};
|
|
200
201
|
}
|
|
201
202
|
};
|
|
202
|
-
}, [C]), Je = c(() => i ?
|
|
203
|
+
}, [C]), Je = c(() => i ? be : C, [i, C, be]), me = c(() => {
|
|
203
204
|
if (z)
|
|
204
205
|
return {
|
|
205
206
|
...z,
|
|
206
207
|
selectedRowKeys: [],
|
|
207
208
|
getCheckboxProps: () => ({ disabled: !0 })
|
|
208
209
|
};
|
|
209
|
-
}, [z]), Qe = c(() => i ? me : z, [i, z, me]), Ye = c(() => i ? void 0 : a.rowKey, [i, a.rowKey]),
|
|
210
|
+
}, [z]), Qe = c(() => i ? me : z, [i, z, me]), Ye = c(() => i ? void 0 : a.rowKey, [i, a.rowKey]), ye = c(() => `${oe ?? f.stylesConfig.size}BitzTable`, [oe, f.stylesConfig.size]), Ze = we(
|
|
210
211
|
(e, t) => {
|
|
211
212
|
var n;
|
|
212
213
|
if (!a.onRow)
|
|
@@ -215,39 +216,39 @@ function kt({
|
|
|
215
216
|
return r.onClick && (r.className = "rowPointerCursor"), r;
|
|
216
217
|
},
|
|
217
218
|
[a.onRow]
|
|
218
|
-
), et = c(() =>
|
|
219
|
+
), et = c(() => Y(
|
|
219
220
|
"bitzTableContainer",
|
|
220
|
-
{ hideBorder:
|
|
221
|
+
{ hideBorder: se },
|
|
221
222
|
{ hasScrollBar: P },
|
|
222
|
-
|
|
223
|
+
ye,
|
|
223
224
|
a.className
|
|
224
225
|
), [
|
|
225
226
|
a.className,
|
|
226
|
-
|
|
227
|
+
ye,
|
|
227
228
|
P,
|
|
228
229
|
k,
|
|
229
|
-
|
|
230
|
+
se
|
|
230
231
|
]), tt = c(() => ({
|
|
231
|
-
"--container-bgColor":
|
|
232
|
-
}), [
|
|
233
|
-
const e = k ? "100%" :
|
|
232
|
+
"--container-bgColor": x.colorBgContainer
|
|
233
|
+
}), [x.colorBgContainer]), rt = c(() => {
|
|
234
|
+
const e = k ? "100%" : p;
|
|
234
235
|
let t;
|
|
235
|
-
return (
|
|
236
|
+
return (L ?? 0) > 0 && (t = L), jt({
|
|
236
237
|
height: e,
|
|
237
|
-
evenRowBgColor: f.zebra ? l == null ? void 0 : l.evenRowBgColor :
|
|
238
|
-
colorBgContainer:
|
|
238
|
+
evenRowBgColor: f.zebra ? l == null ? void 0 : l.evenRowBgColor : x.colorBgContainer,
|
|
239
|
+
colorBgContainer: x.colorBgContainer,
|
|
239
240
|
table: l,
|
|
240
|
-
gap:
|
|
241
|
-
borderColor: (l == null ? void 0 : l.borderColor) ||
|
|
241
|
+
gap: ne,
|
|
242
|
+
borderColor: (l == null ? void 0 : l.borderColor) || x.colorBorderSecondary,
|
|
242
243
|
scrollbarWidth: t,
|
|
243
244
|
other: a.style
|
|
244
245
|
});
|
|
245
|
-
}, [a.style, k,
|
|
246
|
+
}, [a.style, k, p, l, f == null ? void 0 : f.zebra, L]), ot = we(
|
|
246
247
|
(e, t, r) => {
|
|
247
248
|
const n = t % 2 === 0 ? "oddRow" : "evenRow";
|
|
248
249
|
if (a.rowClassName) {
|
|
249
250
|
const s = a.rowClassName(e, t, r);
|
|
250
|
-
return
|
|
251
|
+
return Y(n, s);
|
|
251
252
|
}
|
|
252
253
|
return n;
|
|
253
254
|
},
|
|
@@ -258,7 +259,7 @@ function kt({
|
|
|
258
259
|
finished: Ee,
|
|
259
260
|
onLoad: async () => (
|
|
260
261
|
// @ts-ignore
|
|
261
|
-
!i && (R == null ? void 0 : R((
|
|
262
|
+
!i && (R == null ? void 0 : R((y == null ? void 0 : y.page) + 1, y == null ? void 0 : y.size))
|
|
262
263
|
),
|
|
263
264
|
loadingText: "加载中...",
|
|
264
265
|
finishedText: "没有更多了",
|
|
@@ -269,19 +270,19 @@ function kt({
|
|
|
269
270
|
className: "mobileList",
|
|
270
271
|
style: { backgroundColor: l == null ? void 0 : l.mobileListBgColor },
|
|
271
272
|
children: [
|
|
272
|
-
|
|
273
|
+
b == null ? void 0 : b.map((e, t) => /* @__PURE__ */ o.jsx(
|
|
273
274
|
"div",
|
|
274
275
|
{
|
|
275
276
|
className: "listItem",
|
|
276
277
|
style: { backgroundColor: l == null ? void 0 : l.listItemBgColor },
|
|
277
|
-
onClick: () =>
|
|
278
|
+
onClick: () => $e(e, t),
|
|
278
279
|
children: j == null ? void 0 : j.map((r, n) => {
|
|
279
280
|
var s;
|
|
280
281
|
return !(r != null && r.mobileHide) && /* @__PURE__ */ o.jsxs(
|
|
281
282
|
"div",
|
|
282
283
|
{
|
|
283
284
|
className: "row",
|
|
284
|
-
style: { color:
|
|
285
|
+
style: { color: x.colorText },
|
|
285
286
|
children: [
|
|
286
287
|
!r.mobileHideLabel && /* @__PURE__ */ o.jsxs("div", { className: "label", children: [
|
|
287
288
|
`${r.title}`,
|
|
@@ -309,7 +310,7 @@ function kt({
|
|
|
309
310
|
display: i ? "block" : "none",
|
|
310
311
|
backgroundColor: l == null ? void 0 : l.listItemBgColor
|
|
311
312
|
},
|
|
312
|
-
children: /* @__PURE__ */ o.jsx("div", { className: "row", children:
|
|
313
|
+
children: /* @__PURE__ */ o.jsx("div", { className: "row", children: te ? te() : /* @__PURE__ */ o.jsx(
|
|
313
314
|
lt,
|
|
314
315
|
{
|
|
315
316
|
title: !1,
|
|
@@ -332,38 +333,38 @@ function kt({
|
|
|
332
333
|
const t = { ...e };
|
|
333
334
|
return t.className.includes("ant-table-cell-fix-right") && !P && ((r = t.style) != null && r.right) && (t.style = {
|
|
334
335
|
...t.style,
|
|
335
|
-
right: t.style.right - (
|
|
336
|
+
right: t.style.right - (L || 0)
|
|
336
337
|
}), /* @__PURE__ */ o.jsx("th", { ...t });
|
|
337
338
|
}, st = c(() => ({
|
|
338
|
-
...
|
|
339
|
+
...S,
|
|
339
340
|
header: {
|
|
340
|
-
...
|
|
341
|
+
...S == null ? void 0 : S.header,
|
|
341
342
|
cell: nt
|
|
342
343
|
}
|
|
343
|
-
}), [
|
|
344
|
+
}), [S, P, L]);
|
|
344
345
|
return /* @__PURE__ */ o.jsxs(
|
|
345
346
|
"div",
|
|
346
347
|
{
|
|
347
|
-
className:
|
|
348
|
+
className: Y("bitzTableBlock", { fullscreen: k }),
|
|
348
349
|
style: tt,
|
|
349
350
|
children: [
|
|
350
|
-
!
|
|
351
|
-
/* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref:
|
|
351
|
+
!Q && /* @__PURE__ */ o.jsxs("div", { ref: g, className: et, style: rt, children: [
|
|
352
|
+
/* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref: ie, children: [
|
|
352
353
|
Te && /* @__PURE__ */ o.jsxs("div", { className: "bitzTableToolbarBlock", children: [
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
354
|
+
pe || /* @__PURE__ */ o.jsx("div", {}),
|
|
355
|
+
Se,
|
|
356
|
+
Le
|
|
356
357
|
] }),
|
|
357
358
|
/* @__PURE__ */ o.jsx(
|
|
358
|
-
|
|
359
|
+
ee,
|
|
359
360
|
{
|
|
360
361
|
...a,
|
|
361
362
|
bordered: Pe,
|
|
362
|
-
columns:
|
|
363
|
-
dataSource:
|
|
363
|
+
columns: Fe,
|
|
364
|
+
dataSource: Ge,
|
|
364
365
|
loading: !1,
|
|
365
366
|
pagination: !1,
|
|
366
|
-
scroll:
|
|
367
|
+
scroll: he,
|
|
367
368
|
expandable: Je,
|
|
368
369
|
rowSelection: Qe,
|
|
369
370
|
onRow: Ze,
|
|
@@ -375,32 +376,32 @@ function kt({
|
|
|
375
376
|
}
|
|
376
377
|
)
|
|
377
378
|
] }),
|
|
378
|
-
|
|
379
|
+
M && /* @__PURE__ */ o.jsx(
|
|
379
380
|
it,
|
|
380
381
|
{
|
|
381
382
|
size: "small",
|
|
382
|
-
elRefInstance:
|
|
383
|
+
elRefInstance: ae,
|
|
383
384
|
enableControl: ve,
|
|
384
|
-
pagination:
|
|
385
|
+
pagination: y,
|
|
385
386
|
total: A,
|
|
386
387
|
dataSource: d,
|
|
387
|
-
resetPage:
|
|
388
|
+
resetPage: Me,
|
|
388
389
|
paginationEmit: R
|
|
389
390
|
}
|
|
390
391
|
)
|
|
391
392
|
] }),
|
|
392
|
-
|
|
393
|
-
(i || (d == null ? void 0 : d.length) > 0) && /* @__PURE__ */ o.jsx(o.Fragment, { children:
|
|
393
|
+
Q && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
394
|
+
(i || (d == null ? void 0 : d.length) > 0) && /* @__PURE__ */ o.jsx(o.Fragment, { children: re ? (
|
|
394
395
|
// @ts-ignore
|
|
395
396
|
/* @__PURE__ */ o.jsx(
|
|
396
397
|
ht,
|
|
397
398
|
{
|
|
398
|
-
onRefresh: async () => !i &&
|
|
399
|
+
onRefresh: async () => !i && re(),
|
|
399
400
|
children: Ce
|
|
400
401
|
}
|
|
401
402
|
)
|
|
402
403
|
) : Ce }),
|
|
403
|
-
!i && /* @__PURE__ */ o.jsx(at, { data: d, title: ke, img:
|
|
404
|
+
!i && /* @__PURE__ */ o.jsx(at, { data: d, title: ke, img: We }),
|
|
404
405
|
/* @__PURE__ */ o.jsx(
|
|
405
406
|
ct,
|
|
406
407
|
{
|
|
@@ -409,7 +410,7 @@ function kt({
|
|
|
409
410
|
placement: "bottom",
|
|
410
411
|
height: "auto",
|
|
411
412
|
closable: !1,
|
|
412
|
-
onClose:
|
|
413
|
+
onClose: ce,
|
|
413
414
|
children: /* @__PURE__ */ o.jsxs("div", { className: "drawerBox", children: [
|
|
414
415
|
/* @__PURE__ */ o.jsx("div", { className: "boxBody", children: Ke.map((e, t) => /* @__PURE__ */ o.jsx(
|
|
415
416
|
"div",
|
|
@@ -417,14 +418,14 @@ function kt({
|
|
|
417
418
|
className: "operaList",
|
|
418
419
|
onClick: () => Oe(e),
|
|
419
420
|
...e.danger && {
|
|
420
|
-
style: { color:
|
|
421
|
+
style: { color: x.colorError }
|
|
421
422
|
},
|
|
422
423
|
children: e.label
|
|
423
424
|
},
|
|
424
425
|
t
|
|
425
426
|
)) }),
|
|
426
427
|
/* @__PURE__ */ o.jsx("div", { className: "boxLine" }),
|
|
427
|
-
/* @__PURE__ */ o.jsx("div", { className: "boxFooter", onClick:
|
|
428
|
+
/* @__PURE__ */ o.jsx("div", { className: "boxFooter", onClick: ce, children: Ne })
|
|
428
429
|
] })
|
|
429
430
|
}
|
|
430
431
|
)
|
|
@@ -433,7 +434,7 @@ function kt({
|
|
|
433
434
|
}
|
|
434
435
|
);
|
|
435
436
|
}
|
|
436
|
-
const
|
|
437
|
+
const rr = (M) => /* @__PURE__ */ o.jsx(ut, { initValue: M, children: /* @__PURE__ */ o.jsx(kt, { ...M }) });
|
|
437
438
|
export {
|
|
438
|
-
|
|
439
|
+
rr as default
|
|
439
440
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BitzTableProps } from './Table';
|
|
2
2
|
import BitzTableProvider, { BitzTableContext, DensitySize as BitzTableSizeType, StylesStateType, ColumnStateType, ExportColumnStateType } from './Store';
|
|
3
|
+
import SubTable from './SubTable';
|
|
3
4
|
import ActionBar from './ActionBar';
|
|
4
5
|
import ToolBar from './ToolBar/Wrapper';
|
|
5
6
|
import ActionCol from './ActionCol';
|
|
@@ -60,6 +61,7 @@ interface BitzTableColumnGroupType<RecordType> extends Omit<BitzTableColumnType<
|
|
|
60
61
|
}
|
|
61
62
|
type BitzTableColumnsType<RecordType> = (BitzTableColumnType<RecordType> | BitzTableColumnGroupType<RecordType>)[];
|
|
62
63
|
type CompoundedComponent = React.ForwardRefExoticComponent<BitzTableProps> & {
|
|
64
|
+
SubTable: typeof SubTable;
|
|
63
65
|
ActionBar: typeof ActionBar;
|
|
64
66
|
ToolBar: typeof ToolBar;
|
|
65
67
|
SelectionBar: typeof SelectionBar;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import t from "./Table/index.mjs";
|
|
2
|
-
import { BitzTableContext as
|
|
3
|
-
import r from "./
|
|
4
|
-
import i from "./
|
|
5
|
-
import e from "./
|
|
6
|
-
import a from "./
|
|
2
|
+
import { BitzTableContext as z, default as d } from "./Store/index.mjs";
|
|
3
|
+
import r from "./SubTable/index.mjs";
|
|
4
|
+
import i from "./ActionBar/index.mjs";
|
|
5
|
+
import e from "./ToolBar/Wrapper/index.mjs";
|
|
6
|
+
import a from "./ActionCol/index.mjs";
|
|
7
|
+
import l from "./SelectionBar/index.mjs";
|
|
7
8
|
const o = t;
|
|
8
9
|
process.env.NODE_ENV !== "production" && (o.displayName = "BitzTable");
|
|
9
|
-
o.
|
|
10
|
-
o.
|
|
11
|
-
o.
|
|
12
|
-
o.
|
|
10
|
+
o.SubTable = r;
|
|
11
|
+
o.ActionBar = i;
|
|
12
|
+
o.ToolBar = e;
|
|
13
|
+
o.SelectionBar = l;
|
|
14
|
+
o.ActionCol = a;
|
|
13
15
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
z as BitzTableContext,
|
|
17
|
+
d as BitzTableProvider,
|
|
16
18
|
o as default
|
|
17
19
|
};
|