bj-web-components 0.2.19 → 0.2.21
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/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +5 -5
- package/dist/style.css +1 -1
- package/dist/web/Dropdown/BDropdown.mjs +16 -16
- package/dist/web/ProductField/ProductField.mjs +12 -12
- package/dist/web/ProductField/no_data_light.svg.js +1 -0
- package/dist/web/ProductField/no_data_light.svg.mjs +4 -0
- package/dist/web/Table/BTable.js +1 -1
- package/dist/web/Table/BTable.mjs +255 -253
- package/dist/web/Tabs/BTabs.js +1 -1
- package/dist/web/Tabs/BTabs.mjs +1 -1
- package/dist/web/Tabs/TabPane.js +1 -1
- package/dist/web/Tabs/TabPane.mjs +1 -0
- package/dist/web/Tooltip/ContentTooltip.js +1 -1
- package/dist/web/Tooltip/ContentTooltip.mjs +61 -43
- package/dist/web.d.ts +2 -1
- package/dist/web.js +1 -1
- package/dist/web.mjs +5 -5
- package/package.json +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as ne, useMemo as
|
|
1
|
+
import { jsxs as k, jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as ne, useMemo as Z, useState as D, useEffect as C, createElement as Ke, isValidElement as Zt } from "react";
|
|
3
3
|
import { createPortal as Xt } from "react-dom";
|
|
4
4
|
import Yt from "../Pagination/Pagination.mjs";
|
|
5
5
|
import Be from "../Icon/Icon.mjs";
|
|
@@ -8,25 +8,25 @@ import Ct from "../Tooltip/ContentTooltip.mjs";
|
|
|
8
8
|
import er from "../Tooltip/TooltipWrapper.mjs";
|
|
9
9
|
import { BCheckBox as tr } from "../CheckBox/index.mjs";
|
|
10
10
|
import { BDropdown as rr } from "../Dropdown/BDropdown.mjs";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import sr from "../ProductField/no_data_light.
|
|
11
|
+
import ir from "../OverlayScrollbar/BOverlayScrollbar.mjs";
|
|
12
|
+
import ar from "../SkuInputCard/spin_loading_red.gif.mjs";
|
|
13
|
+
import sr from "../ProductField/no_data_light.svg.mjs";
|
|
14
14
|
import nr from "./Column.mjs";
|
|
15
15
|
import lr from "./ColumnGroup.mjs";
|
|
16
16
|
import { getColumnKey as E, filterRecords as dt, sortRecords as ct, renderColumnTitle as ft, getNextSortOrder as dr, getSorterResult as cr } from "./utils/sortFilter.mjs";
|
|
17
17
|
import { convertChildrenToColumns as fr, flattenColumns as br, buildHeaderRows as hr } from "./utils/columns.mjs";
|
|
18
18
|
/* empty css */
|
|
19
19
|
const or = 300;
|
|
20
|
-
function
|
|
20
|
+
function S(...u) {
|
|
21
21
|
return u.filter(Boolean).join(" ");
|
|
22
22
|
}
|
|
23
23
|
function ur(u, o) {
|
|
24
|
-
return o === void 0 ? void 0 : (Array.isArray(o) ? o : [o]).reduce((F,
|
|
24
|
+
return o === void 0 ? void 0 : (Array.isArray(o) ? o : [o]).reduce((F, l) => {
|
|
25
25
|
if (!(F == null || typeof F != "object"))
|
|
26
|
-
return F[
|
|
26
|
+
return F[l];
|
|
27
27
|
}, u);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function L(u, o, _) {
|
|
30
30
|
if (typeof _ == "function")
|
|
31
31
|
return _(u, o);
|
|
32
32
|
if (_) {
|
|
@@ -50,10 +50,10 @@ function bt({
|
|
|
50
50
|
disabled: o,
|
|
51
51
|
label: _,
|
|
52
52
|
name: F,
|
|
53
|
-
onChange:
|
|
54
|
-
type:
|
|
53
|
+
onChange: l,
|
|
54
|
+
type: A = "checkbox"
|
|
55
55
|
}) {
|
|
56
|
-
return
|
|
56
|
+
return A === "checkbox" ? /* @__PURE__ */ f(
|
|
57
57
|
tr,
|
|
58
58
|
{
|
|
59
59
|
"aria-label": _,
|
|
@@ -61,10 +61,10 @@ function bt({
|
|
|
61
61
|
className: "bj-table__selection-checkbox",
|
|
62
62
|
disabled: o,
|
|
63
63
|
name: F,
|
|
64
|
-
onChange:
|
|
64
|
+
onChange: l,
|
|
65
65
|
skipGroup: !0
|
|
66
66
|
}
|
|
67
|
-
) : /* @__PURE__ */
|
|
67
|
+
) : /* @__PURE__ */ k("label", { className: S("bj-table__selection-control", u && "bj-table__selection-control--checked", o && "bj-table__selection-control--disabled"), children: [
|
|
68
68
|
/* @__PURE__ */ f(
|
|
69
69
|
"input",
|
|
70
70
|
{
|
|
@@ -73,8 +73,8 @@ function bt({
|
|
|
73
73
|
className: "bj-table__selection-input",
|
|
74
74
|
disabled: o,
|
|
75
75
|
name: F,
|
|
76
|
-
onChange:
|
|
77
|
-
type:
|
|
76
|
+
onChange: l,
|
|
77
|
+
type: A
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
80
|
/* @__PURE__ */ f("span", { "aria-hidden": "true", className: "bj-table__selection-box", children: u && /* @__PURE__ */ f(Be, { className: "bj-table__selection-check-icon", type: "icon-a-dagouxi" }) })
|
|
@@ -85,8 +85,8 @@ function pr({
|
|
|
85
85
|
dataSource: o = [],
|
|
86
86
|
rowKey: _,
|
|
87
87
|
preserveSelectedRowKeys: F = !1,
|
|
88
|
-
rowSelection:
|
|
89
|
-
pagination:
|
|
88
|
+
rowSelection: l,
|
|
89
|
+
pagination: A = !1,
|
|
90
90
|
loading: ue = !1,
|
|
91
91
|
bordered: ot = !0,
|
|
92
92
|
size: ut = "middle",
|
|
@@ -94,7 +94,7 @@ function pr({
|
|
|
94
94
|
emptyText: _e,
|
|
95
95
|
emptyImage: ye = sr,
|
|
96
96
|
emptyHeight: yt,
|
|
97
|
-
t:
|
|
97
|
+
t: X = (le) => le,
|
|
98
98
|
className: jt,
|
|
99
99
|
style: pt,
|
|
100
100
|
rowClassName: je,
|
|
@@ -105,80 +105,80 @@ function pr({
|
|
|
105
105
|
footer: Te,
|
|
106
106
|
summary: Ie,
|
|
107
107
|
tableLayout: Se,
|
|
108
|
-
components:
|
|
108
|
+
components: x,
|
|
109
109
|
onRow: me,
|
|
110
110
|
onHeaderRow: ve,
|
|
111
111
|
id: vt,
|
|
112
112
|
scroll: b,
|
|
113
|
-
locale:
|
|
113
|
+
locale: Y,
|
|
114
114
|
groupCollapse: h
|
|
115
115
|
}) {
|
|
116
|
-
var
|
|
117
|
-
const le = ne(null), Ve = ne(null), de =
|
|
116
|
+
var at, st, nt;
|
|
117
|
+
const le = ne(null), Ve = ne(null), de = Z(
|
|
118
118
|
() => u ?? fr(ze),
|
|
119
119
|
[ze, u]
|
|
120
|
-
),
|
|
121
|
-
(
|
|
122
|
-
), [ge, ce] =
|
|
123
|
-
|
|
124
|
-
), [
|
|
125
|
-
|
|
126
|
-
), [Ft, Dt] =
|
|
127
|
-
() => new Map(
|
|
128
|
-
), [kt, Pt] =
|
|
129
|
-
() => new Map(
|
|
130
|
-
), [Rt, Ot] =
|
|
120
|
+
), ee = Z(() => br(de), [de]), we = Z(() => hr(de), [de]), [gt, Ge] = D(
|
|
121
|
+
(l == null ? void 0 : l.defaultSelectedRowKeys) ?? []
|
|
122
|
+
), [ge, ce] = D(
|
|
123
|
+
A ? A.defaultCurrent ?? 1 : 1
|
|
124
|
+
), [xt, Nt] = D(
|
|
125
|
+
A ? A.defaultPageSize ?? 10 : 10
|
|
126
|
+
), [Ft, Dt] = D(
|
|
127
|
+
() => new Map(ee.flatMap((e, t) => e.defaultSortOrder ? [[E(e, t), e.defaultSortOrder]] : []))
|
|
128
|
+
), [kt, Pt] = D(
|
|
129
|
+
() => new Map(ee.flatMap((e, t) => e.defaultFilteredValue === void 0 ? [] : [[E(e, t), e.defaultFilteredValue]]))
|
|
130
|
+
), [Rt, Ot] = D(
|
|
131
131
|
h != null && h.defaultExpandedKeys ? [...h.defaultExpandedKeys] : []
|
|
132
|
-
), [
|
|
133
|
-
|
|
132
|
+
), [V, W] = D(null), [Le, te] = D(/* @__PURE__ */ new Map()), [Et, fe] = D(null), Kt = ne(`btable-${Math.random().toString(36).slice(2, 10)}`).current, [$, xe] = D(null), [Ne, Ae] = D(null), [Fe, qe] = D(""), [re, He] = D(""), [Bt, De] = D(), ke = ne(0), Pe = ne(!1), i = A || void 0, q = (i == null ? void 0 : i.pageSize) ?? xt, K = (l == null ? void 0 : l.selectedRowKeys) ?? gt, v = ee, P = new Map(Ft), B = new Map(kt);
|
|
133
|
+
v.forEach((e, t) => {
|
|
134
134
|
if ("children" in e) return;
|
|
135
135
|
const r = E(e, t);
|
|
136
|
-
e.sortOrder !== void 0 &&
|
|
136
|
+
e.sortOrder !== void 0 && P.set(r, e.sortOrder), e.filteredValue !== void 0 && B.set(r, e.filteredValue);
|
|
137
137
|
});
|
|
138
|
-
const Ue =
|
|
139
|
-
() => dt(o,
|
|
140
|
-
[
|
|
141
|
-
), z =
|
|
142
|
-
() => ct(Ue,
|
|
143
|
-
[
|
|
144
|
-
), We = (
|
|
138
|
+
const Ue = Z(
|
|
139
|
+
() => dt(o, v, B),
|
|
140
|
+
[v, B, o]
|
|
141
|
+
), z = Z(
|
|
142
|
+
() => ct(Ue, v, P),
|
|
143
|
+
[v, Ue, P]
|
|
144
|
+
), We = (i == null ? void 0 : i.total) ?? z.length, $e = _r(We, q), H = Math.min((i == null ? void 0 : i.current) ?? ge, $e), J = (h == null ? void 0 : h.expandedKeys) ?? Rt, ie = (e, t) => h != null && h.isGroupRow ? h.isGroupRow(e, t) : !!e.isGroup, be = (e, t) => h != null && h.groupKey ? h.groupKey(e, t) : e.groupId, Je = (e, t) => h != null && h.childrenKeys ? h.childrenKeys(e, t) : e.childrenIds ?? [], zt = (e, t) => {
|
|
145
145
|
var c;
|
|
146
|
-
const r = be(e, t), s =
|
|
147
|
-
(h == null ? void 0 : h.expandedKeys) === void 0 && Ot(
|
|
146
|
+
const r = be(e, t), s = J.includes(r), d = s ? J.filter((a) => a !== r) : [...J, r];
|
|
147
|
+
(h == null ? void 0 : h.expandedKeys) === void 0 && Ot(d), (c = h == null ? void 0 : h.onExpandedKeysChange) == null || c.call(h, d, e, !s);
|
|
148
148
|
};
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}, [
|
|
152
|
-
if (
|
|
149
|
+
C(() => {
|
|
150
|
+
H !== ge && (i == null ? void 0 : i.current) === void 0 && ce(H);
|
|
151
|
+
}, [H, i == null ? void 0 : i.current, ge]), C(() => {
|
|
152
|
+
if (!$ || V === null) {
|
|
153
153
|
Ae(null);
|
|
154
154
|
return;
|
|
155
155
|
}
|
|
156
156
|
const e = () => {
|
|
157
|
-
const t =
|
|
157
|
+
const t = $.getBoundingClientRect();
|
|
158
158
|
Ae({ left: t.left, top: t.bottom + 8 });
|
|
159
159
|
};
|
|
160
160
|
return e(), document.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
161
161
|
document.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
162
162
|
};
|
|
163
|
-
}, [
|
|
164
|
-
if (
|
|
163
|
+
}, [$, V]), C(() => {
|
|
164
|
+
if (V === null) return;
|
|
165
165
|
const e = (t) => {
|
|
166
166
|
const r = t.target;
|
|
167
|
-
|
|
167
|
+
$ != null && $.contains(r) || r.closest(".bj-table__filter-dropdown") || (W(null), xe(null));
|
|
168
168
|
};
|
|
169
169
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
170
|
-
}, [
|
|
170
|
+
}, [$, V]), C(() => {
|
|
171
171
|
const e = window.setTimeout(
|
|
172
172
|
() => He(Fe.trim()),
|
|
173
173
|
or
|
|
174
174
|
);
|
|
175
175
|
return () => window.clearTimeout(e);
|
|
176
|
-
}, [Fe]),
|
|
177
|
-
if (
|
|
178
|
-
const e =
|
|
176
|
+
}, [Fe]), C(() => {
|
|
177
|
+
if (V === null) return;
|
|
178
|
+
const e = ee.find((r, s) => E(r, s) === V);
|
|
179
179
|
if (!e || "children" in e || !e.filterRequest) return;
|
|
180
180
|
const t = ++ke.current;
|
|
181
|
-
Promise.resolve().then(() => e.filterRequest(
|
|
181
|
+
Promise.resolve().then(() => e.filterRequest(re)).then(
|
|
182
182
|
(r) => {
|
|
183
183
|
ke.current === t && De(r);
|
|
184
184
|
},
|
|
@@ -186,88 +186,88 @@ function pr({
|
|
|
186
186
|
ke.current === t && De([]);
|
|
187
187
|
}
|
|
188
188
|
);
|
|
189
|
-
}, [
|
|
190
|
-
const
|
|
191
|
-
if (!
|
|
189
|
+
}, [re, ee, V]);
|
|
190
|
+
const U = Z(() => {
|
|
191
|
+
if (!i || i.serverPagination)
|
|
192
192
|
return z.map((t, r) => ({ record: t, index: r })).filter(({ record: t, index: r }) => {
|
|
193
|
-
if (!h ||
|
|
194
|
-
const s =
|
|
193
|
+
if (!h || ie(t, r)) return !0;
|
|
194
|
+
const s = L(t, r, _);
|
|
195
195
|
return z.some(
|
|
196
|
-
(
|
|
196
|
+
(d, c) => ie(d, c) && J.includes(be(d, c)) && Je(d, c).includes(s)
|
|
197
197
|
);
|
|
198
198
|
});
|
|
199
|
-
const e = (
|
|
200
|
-
return z.slice(e, e +
|
|
199
|
+
const e = (H - 1) * q;
|
|
200
|
+
return z.slice(e, e + q).map((t, r) => ({
|
|
201
201
|
record: t,
|
|
202
202
|
index: e + r
|
|
203
203
|
})).filter(({ record: t, index: r }) => {
|
|
204
|
-
if (!h ||
|
|
205
|
-
const s =
|
|
204
|
+
if (!h || ie(t, r)) return !0;
|
|
205
|
+
const s = L(t, r, _);
|
|
206
206
|
return z.some(
|
|
207
|
-
(
|
|
207
|
+
(d, c) => ie(d, c) && J.includes(be(d, c)) && Je(d, c).includes(s)
|
|
208
208
|
);
|
|
209
209
|
});
|
|
210
|
-
}, [
|
|
211
|
-
() =>
|
|
212
|
-
[_,
|
|
210
|
+
}, [H, J, h, q, i, z, _]), Qe = Z(
|
|
211
|
+
() => U.map(({ record: e, index: t }) => L(e, t, _)),
|
|
212
|
+
[_, U]
|
|
213
213
|
), Mt = K.map(String).join("|"), Tt = Qe.map(String).join("|");
|
|
214
|
-
|
|
215
|
-
var
|
|
216
|
-
if (!
|
|
214
|
+
C(() => {
|
|
215
|
+
var d;
|
|
216
|
+
if (!l || F || K.length === 0) return;
|
|
217
217
|
const e = new Set(Qe), t = K.filter((c) => e.has(c));
|
|
218
218
|
if (t.length === K.length) return;
|
|
219
|
-
|
|
220
|
-
const r = new Set(t), s =
|
|
221
|
-
(
|
|
222
|
-
}, [F,
|
|
223
|
-
const he = (e, t =
|
|
224
|
-
const c = Object.fromEntries(r),
|
|
219
|
+
l.selectedRowKeys === void 0 && Ge(t);
|
|
220
|
+
const r = new Set(t), s = U.filter(({ record: c, index: a }) => r.has(L(c, a, _))).map(({ record: c }) => c);
|
|
221
|
+
(d = l.onChange) == null || d.call(l, t, s, { type: "multiple" });
|
|
222
|
+
}, [F, l, _, Mt, Tt, U]);
|
|
223
|
+
const he = (e, t = P, r = B, s = H, d = q) => {
|
|
224
|
+
const c = Object.fromEntries(r), a = dt(o, v, r), g = ct(a, v, t);
|
|
225
225
|
pe == null || pe(
|
|
226
|
-
{ ...
|
|
226
|
+
{ ...i, current: s, pageSize: d, total: (i == null ? void 0 : i.total) ?? g.length },
|
|
227
227
|
c,
|
|
228
|
-
cr(
|
|
229
|
-
{ action: e, currentDataSource:
|
|
228
|
+
cr(v, t),
|
|
229
|
+
{ action: e, currentDataSource: g }
|
|
230
230
|
);
|
|
231
231
|
}, It = (e, t) => {
|
|
232
232
|
if (!e.sorter) return;
|
|
233
|
-
const r = E(e, t), s = dr(
|
|
234
|
-
|
|
233
|
+
const r = E(e, t), s = dr(P.get(r) ?? null, e.sortDirections ?? mt), d = /* @__PURE__ */ new Map();
|
|
234
|
+
d.set(r, s), e.sortOrder === void 0 && Dt(d), he("sort", d);
|
|
235
235
|
}, Re = (e, t, r) => {
|
|
236
|
-
const s = E(e, t),
|
|
237
|
-
|
|
236
|
+
const s = E(e, t), d = new Map(B);
|
|
237
|
+
d.set(s, r), e.filteredValue === void 0 && Pt(d), W(null), (i == null ? void 0 : i.current) === void 0 && ce(1), he("filter", P, d, 1);
|
|
238
238
|
}, St = (e, t) => {
|
|
239
239
|
const r = E(e, t), s = e.filterResetToDefaultFilteredValue ? e.defaultFilteredValue ?? [] : [];
|
|
240
|
-
|
|
240
|
+
te((d) => new Map(d).set(r, s));
|
|
241
241
|
}, oe = (e, t, r) => {
|
|
242
|
-
var
|
|
242
|
+
var d, c, a, g;
|
|
243
243
|
const s = E(e, t);
|
|
244
|
-
if (
|
|
245
|
-
|
|
244
|
+
if (V === s) {
|
|
245
|
+
W(null), xe(null), (d = e.onFilterDropdownOpenChange) == null || d.call(e, !1), (c = e.onFilterDropdownVisibleChange) == null || c.call(e, !1);
|
|
246
246
|
return;
|
|
247
247
|
}
|
|
248
|
-
qe(""), He(""), De(void 0),
|
|
248
|
+
qe(""), He(""), De(void 0), te((j) => new Map(j).set(s, B.get(s) ?? [])), W(s), r && xe(r), (a = e.onFilterDropdownOpenChange) == null || a.call(e, !0), (g = e.onFilterDropdownVisibleChange) == null || g.call(e, !0);
|
|
249
249
|
}, Vt = (e, t) => {
|
|
250
|
-
var
|
|
251
|
-
const r = E(e, t), s = `bj-table-badge-${Kt}-${String(r).replace(/[^a-zA-Z0-9_-]/g, "-")}`,
|
|
252
|
-
sortOrder:
|
|
253
|
-
sortColumn:
|
|
254
|
-
sortColumns:
|
|
250
|
+
var N, T;
|
|
251
|
+
const r = E(e, t), s = `bj-table-badge-${Kt}-${String(r).replace(/[^a-zA-Z0-9_-]/g, "-")}`, d = P.get(r) ?? null, c = B.get(r) ?? [], a = Le.get(r) ?? c, g = e.filterDropdownOpen ?? e.filterDropdownVisible ?? V === r, j = e.filtered || c.length > 0, R = d === "ascend" ? "icon-a-zhengxumian" : d === "descend" ? "icon-a-daoxumian" : "icon-a-weipaixumian", y = ft(e.title, {
|
|
252
|
+
sortOrder: d,
|
|
253
|
+
sortColumn: d ? e : void 0,
|
|
254
|
+
sortColumns: d ? [{ column: e, order: d }] : [],
|
|
255
255
|
filters: Object.fromEntries(B)
|
|
256
|
-
}),
|
|
256
|
+
}), Q = typeof e.filterDropdown == "function" ? e.filterDropdown({
|
|
257
257
|
prefixCls: "bj-table",
|
|
258
|
-
selectedKeys:
|
|
259
|
-
setSelectedKeys: (
|
|
260
|
-
confirm: (
|
|
261
|
-
Re(e, t, Le.get(r) ??
|
|
258
|
+
selectedKeys: a.filter((n) => typeof n != "boolean"),
|
|
259
|
+
setSelectedKeys: (n) => te((m) => new Map(m).set(r, n)),
|
|
260
|
+
confirm: (n) => {
|
|
261
|
+
Re(e, t, Le.get(r) ?? a), (n == null ? void 0 : n.closeDropdown) === !1 && W(r);
|
|
262
262
|
},
|
|
263
|
-
clearFilters: (
|
|
264
|
-
const
|
|
265
|
-
|
|
263
|
+
clearFilters: (n) => {
|
|
264
|
+
const m = e.filterResetToDefaultFilteredValue ? e.defaultFilteredValue ?? [] : [];
|
|
265
|
+
te((O) => new Map(O).set(r, m)), (n == null ? void 0 : n.confirm) === !0 && Re(e, t, m), ((n == null ? void 0 : n.closeDropdown) === !1 || (n == null ? void 0 : n.confirm) !== !0) && W(r);
|
|
266
266
|
},
|
|
267
267
|
filters: e.filters,
|
|
268
|
-
close: () =>
|
|
269
|
-
visible:
|
|
270
|
-
}) : e.filterDropdown,
|
|
268
|
+
close: () => W(null),
|
|
269
|
+
visible: g
|
|
270
|
+
}) : e.filterDropdown, G = e.filterRequest ? Bt ?? [] : e.filters ?? [], I = re && !e.filterRequest ? G.filter((n) => typeof e.filterSearch == "function" ? e.filterSearch(re, n) : jr(re, n)) : G, p = !!(e.filterSearch || e.filterRequest), M = /* @__PURE__ */ k("div", { className: S("bj-table__column-header", e.sorter && "bj-table__column-header--sortable"), children: [
|
|
271
271
|
e.badge !== void 0 && /* @__PURE__ */ f(
|
|
272
272
|
"span",
|
|
273
273
|
{
|
|
@@ -275,9 +275,9 @@ function pr({
|
|
|
275
275
|
className: "bj-table__column-badge-trigger",
|
|
276
276
|
id: s,
|
|
277
277
|
onBlur: () => fe(null),
|
|
278
|
-
onClick: (
|
|
278
|
+
onClick: (n) => n.stopPropagation(),
|
|
279
279
|
onFocus: () => fe(r),
|
|
280
|
-
onKeyDown: (
|
|
280
|
+
onKeyDown: (n) => n.stopPropagation(),
|
|
281
281
|
onMouseEnter: () => fe(r),
|
|
282
282
|
onMouseLeave: () => fe(null),
|
|
283
283
|
role: "button",
|
|
@@ -285,64 +285,64 @@ function pr({
|
|
|
285
285
|
children: /* @__PURE__ */ f("span", { "aria-hidden": "true", className: "bj-table__column-badge-shape" })
|
|
286
286
|
}
|
|
287
287
|
),
|
|
288
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ k("div", { className: "bj-table__column-title", children: [
|
|
289
289
|
/* @__PURE__ */ f("span", { className: "bj-table__column-title-content", children: y }),
|
|
290
|
-
e.sorter && /* @__PURE__ */ f("span", { "aria-hidden": "true", className: "bj-table__column-sorter", children: /* @__PURE__ */ f(Be, { className: "bj-table__column-sorter-icon", type:
|
|
290
|
+
e.sorter && /* @__PURE__ */ f("span", { "aria-hidden": "true", className: "bj-table__column-sorter", children: /* @__PURE__ */ f(Be, { className: "bj-table__column-sorter-icon", type: R }) })
|
|
291
291
|
] }),
|
|
292
|
-
(e.filters || e.filterDropdown) && /* @__PURE__ */
|
|
292
|
+
(e.filters || e.filterDropdown) && /* @__PURE__ */ k("div", { className: "bj-table__filter", children: [
|
|
293
293
|
/* @__PURE__ */ f(
|
|
294
294
|
"button",
|
|
295
295
|
{
|
|
296
|
-
"aria-expanded":
|
|
296
|
+
"aria-expanded": g,
|
|
297
297
|
"aria-label": "筛选",
|
|
298
|
-
className:
|
|
299
|
-
onClick: (
|
|
300
|
-
|
|
298
|
+
className: S("bj-table__filter-trigger", j && "bj-table__filter-trigger--active"),
|
|
299
|
+
onClick: (n) => {
|
|
300
|
+
n.stopPropagation(), oe(e, t);
|
|
301
301
|
},
|
|
302
302
|
type: "button",
|
|
303
|
-
children: typeof e.filterIcon == "function" ? e.filterIcon(
|
|
303
|
+
children: typeof e.filterIcon == "function" ? e.filterIcon(j) : e.filterIcon ?? /* @__PURE__ */ f(Be, { className: "bj-table__filter-icon", type: "icon-a-shaixuanxi" })
|
|
304
304
|
}
|
|
305
305
|
),
|
|
306
|
-
|
|
306
|
+
g && Ne && typeof document < "u" && Xt(
|
|
307
307
|
/* @__PURE__ */ f(
|
|
308
308
|
"div",
|
|
309
309
|
{
|
|
310
310
|
className: "bj-table__filter-dropdown",
|
|
311
|
-
onClick: (
|
|
311
|
+
onClick: (n) => n.stopPropagation(),
|
|
312
312
|
role: "dialog",
|
|
313
|
-
style: { left:
|
|
314
|
-
children:
|
|
313
|
+
style: { left: Ne.left, top: Ne.top },
|
|
314
|
+
children: Q ?? /* @__PURE__ */ f(
|
|
315
315
|
rr,
|
|
316
316
|
{
|
|
317
317
|
...e.filterDropdownProps,
|
|
318
|
-
emptyText: (
|
|
318
|
+
emptyText: (Y == null ? void 0 : Y.filterEmptyText) ?? X("暂无结果"),
|
|
319
319
|
multiple: e.filterMultiple !== !1,
|
|
320
|
-
onChange: (
|
|
320
|
+
onChange: (n, m) => {
|
|
321
321
|
var O, lt;
|
|
322
|
-
|
|
322
|
+
te((Qt) => new Map(Qt).set(r, n)), (lt = (O = e.filterDropdownProps) == null ? void 0 : O.onChange) == null || lt.call(O, n, m);
|
|
323
323
|
},
|
|
324
|
-
onConfirm: (
|
|
325
|
-
var
|
|
326
|
-
Re(e, t,
|
|
324
|
+
onConfirm: (n) => {
|
|
325
|
+
var m, O;
|
|
326
|
+
Re(e, t, n), (O = (m = e.filterDropdownProps) == null ? void 0 : m.onConfirm) == null || O.call(m, n);
|
|
327
327
|
},
|
|
328
328
|
onReset: () => {
|
|
329
|
-
var
|
|
330
|
-
St(e, t), (
|
|
329
|
+
var n, m;
|
|
330
|
+
St(e, t), (m = (n = e.filterDropdownProps) == null ? void 0 : n.onReset) == null || m.call(n);
|
|
331
331
|
},
|
|
332
|
-
onSearch: (
|
|
333
|
-
var
|
|
334
|
-
qe(
|
|
332
|
+
onSearch: (n) => {
|
|
333
|
+
var m, O;
|
|
334
|
+
qe(n), (O = (m = e.filterDropdownProps) == null ? void 0 : m.onSearch) == null || O.call(m, n);
|
|
335
335
|
},
|
|
336
|
-
options:
|
|
337
|
-
label:
|
|
338
|
-
description:
|
|
339
|
-
value:
|
|
336
|
+
options: I.map((n) => ({
|
|
337
|
+
label: n.text,
|
|
338
|
+
description: n.description,
|
|
339
|
+
value: n.value
|
|
340
340
|
})),
|
|
341
|
-
searchable: ((
|
|
342
|
-
searchPlaceholder: ((
|
|
341
|
+
searchable: ((N = e.filterDropdownProps) == null ? void 0 : N.searchable) ?? p,
|
|
342
|
+
searchPlaceholder: ((T = e.filterDropdownProps) == null ? void 0 : T.searchPlaceholder) ?? (e.filterRequest ? X("请输入搜索内容") : (Y == null ? void 0 : Y.filterSearchPlaceholder) ?? X("搜索")),
|
|
343
343
|
searchValue: Fe,
|
|
344
|
-
t:
|
|
345
|
-
value:
|
|
344
|
+
t: X,
|
|
345
|
+
value: a
|
|
346
346
|
}
|
|
347
347
|
)
|
|
348
348
|
}
|
|
@@ -351,12 +351,12 @@ function pr({
|
|
|
351
351
|
)
|
|
352
352
|
] })
|
|
353
353
|
] });
|
|
354
|
-
return e.badge !== void 0 ? /* @__PURE__ */
|
|
354
|
+
return e.badge !== void 0 ? /* @__PURE__ */ k(
|
|
355
355
|
er,
|
|
356
356
|
{
|
|
357
357
|
className: "bj-table__column-tooltip-wrapper",
|
|
358
358
|
children: [
|
|
359
|
-
/* @__PURE__ */ f("div", { className: "bj-table__column-tooltip-trigger", children:
|
|
359
|
+
/* @__PURE__ */ f("div", { className: "bj-table__column-tooltip-trigger", children: M }),
|
|
360
360
|
Et === r && /* @__PURE__ */ f(
|
|
361
361
|
Ct,
|
|
362
362
|
{
|
|
@@ -369,64 +369,64 @@ function pr({
|
|
|
369
369
|
)
|
|
370
370
|
]
|
|
371
371
|
}
|
|
372
|
-
) :
|
|
372
|
+
) : M;
|
|
373
373
|
}, Ze = (e, t, r) => {
|
|
374
|
-
var c,
|
|
374
|
+
var c, a;
|
|
375
375
|
t.selectedRowKeys === void 0 && Ge(e);
|
|
376
|
-
const s = new Set(e),
|
|
377
|
-
(
|
|
376
|
+
const s = new Set(e), d = o.filter(
|
|
377
|
+
(g, j) => s.has(L(g, j, _))
|
|
378
378
|
);
|
|
379
|
-
(c = t.onChange) == null || c.call(t, e,
|
|
379
|
+
(c = t.onChange) == null || c.call(t, e, d), r && ((a = t.onSelect) == null || a.call(
|
|
380
380
|
t,
|
|
381
381
|
r,
|
|
382
|
-
s.has(
|
|
383
|
-
|
|
382
|
+
s.has(L(r, o.indexOf(r), _)),
|
|
383
|
+
d
|
|
384
384
|
));
|
|
385
385
|
}, wt = (e, t) => {
|
|
386
|
-
if (!
|
|
386
|
+
if (!l)
|
|
387
387
|
return;
|
|
388
|
-
const r =
|
|
389
|
-
Ze(
|
|
390
|
-
}, Xe =
|
|
388
|
+
const r = L(e, t, _), s = K.includes(r), d = l.type === "radio" ? s ? [] : [r] : s ? K.filter((c) => c !== r) : [...K, r];
|
|
389
|
+
Ze(d, l, e);
|
|
390
|
+
}, Xe = U.filter(
|
|
391
391
|
({ record: e }) => {
|
|
392
392
|
var t;
|
|
393
|
-
return !((t =
|
|
393
|
+
return !((t = l == null ? void 0 : l.getCheckboxProps) != null && t.call(l, e).disabled);
|
|
394
394
|
}
|
|
395
395
|
), ae = Xe.map(
|
|
396
|
-
({ record: e, index: t }) =>
|
|
396
|
+
({ record: e, index: t }) => L(e, t, _)
|
|
397
397
|
), Oe = ae.length > 0 && ae.every((e) => K.includes(e)), Gt = () => {
|
|
398
398
|
var r;
|
|
399
|
-
if (!
|
|
399
|
+
if (!l || l.type === "radio")
|
|
400
400
|
return;
|
|
401
401
|
const e = new Set(ae), t = Oe ? K.filter((s) => !e.has(s)) : Array.from(/* @__PURE__ */ new Set([...K, ...ae]));
|
|
402
|
-
Ze(t,
|
|
403
|
-
|
|
402
|
+
Ze(t, l), new Set(t), (r = l.onSelectAll) == null || r.call(
|
|
403
|
+
l,
|
|
404
404
|
!Oe,
|
|
405
405
|
Xe.map(({ record: s }) => s)
|
|
406
406
|
);
|
|
407
407
|
}, Lt = (e) => {
|
|
408
408
|
var t;
|
|
409
|
-
!
|
|
409
|
+
!i || e < 1 || e > $e || e === H || (i.current === void 0 && ce(e), (t = i.onChange) == null || t.call(i, e, q), he("paginate", P, B, e));
|
|
410
410
|
}, At = (e) => {
|
|
411
411
|
var r, s;
|
|
412
|
-
if (!
|
|
412
|
+
if (!i || e === q)
|
|
413
413
|
return;
|
|
414
414
|
const t = 1;
|
|
415
|
-
Pe.current = !0,
|
|
416
|
-
}, Ye =
|
|
415
|
+
Pe.current = !0, i.pageSize === void 0 && Nt(e), i.current === void 0 && ce(t), (r = i.onShowSizeChange) == null || r.call(i, t, e), (s = i.onChange) == null || s.call(i, t, e), he("paginate", P, B, t, e);
|
|
416
|
+
}, Ye = v.length + (l ? 1 : 0), se = (l == null ? void 0 : l.columnWidth) ?? 48, Ce = (e) => typeof e.width == "number" ? e.width : 0, et = (e, t) => {
|
|
417
417
|
const r = e.fixed === !0 ? "left" : e.fixed;
|
|
418
|
-
return r === "left" ? { position: "sticky", left:
|
|
418
|
+
return r === "left" ? { position: "sticky", left: v.slice(0, t).reduce((d, c) => d + Ce(c), l && typeof se == "number" ? se : 0), zIndex: 2 } : r === "right" ? { position: "sticky", right: v.slice(t + 1).reduce((d, c) => d + Ce(c), 0), zIndex: 2 } : {};
|
|
419
419
|
}, qt = b != null && b.x ? {
|
|
420
420
|
width: b.x === !0 ? "max-content" : b.x,
|
|
421
421
|
minWidth: "100%",
|
|
422
422
|
tableLayout: Se ?? "fixed"
|
|
423
|
-
} : { tableLayout: Se }, Ht = (
|
|
424
|
-
return /* @__PURE__ */
|
|
423
|
+
} : { tableLayout: Se }, Ht = (x == null ? void 0 : x.table) ?? "table", Ut = ((at = x == null ? void 0 : x.header) == null ? void 0 : at.wrapper) ?? "thead", Wt = ((st = x == null ? void 0 : x.header) == null ? void 0 : st.row) ?? "tr", tt = ((nt = x == null ? void 0 : x.header) == null ? void 0 : nt.cell) ?? "th", w = typeof (x == null ? void 0 : x.body) == "object" ? x.body : void 0, $t = (w == null ? void 0 : w.wrapper) ?? "tbody", rt = (w == null ? void 0 : w.row) ?? "tr", Ee = (w == null ? void 0 : w.cell) ?? "td", Jt = typeof _e == "function" ? _e() : _e ?? X("暂无数据"), it = typeof ye == "string" ? /* @__PURE__ */ f("img", { alt: "", className: "bj-table__empty-image", src: ye }) : ye;
|
|
424
|
+
return /* @__PURE__ */ k(
|
|
425
425
|
"div",
|
|
426
426
|
{
|
|
427
427
|
id: vt,
|
|
428
428
|
ref: le,
|
|
429
|
-
className:
|
|
429
|
+
className: S(
|
|
430
430
|
"bj-table",
|
|
431
431
|
ot && "bj-table--bordered",
|
|
432
432
|
`bj-table--${ut}`,
|
|
@@ -437,28 +437,28 @@ function pr({
|
|
|
437
437
|
style: pt,
|
|
438
438
|
children: [
|
|
439
439
|
Me && /* @__PURE__ */ f("div", { className: "bj-table__title", children: Me(z) }),
|
|
440
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ k("div", { className: "bj-table__viewport", children: [
|
|
441
441
|
/* @__PURE__ */ f(
|
|
442
442
|
"div",
|
|
443
443
|
{
|
|
444
|
-
className:
|
|
444
|
+
className: S("bj-table__scroll", !!(b != null && b.x || b != null && b.y) && "bj-overlay-scrollbar-hidden"),
|
|
445
445
|
ref: Ve,
|
|
446
446
|
style: { maxHeight: b == null ? void 0 : b.y },
|
|
447
|
-
children: /* @__PURE__ */
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
447
|
+
children: /* @__PURE__ */ k(Ht, { className: "bj-table__native-table", style: qt, children: [
|
|
448
|
+
v.some((e) => e.width) && /* @__PURE__ */ k("colgroup", { children: [
|
|
449
|
+
l && /* @__PURE__ */ f("col", { className: "bj-table__selection-col", style: { width: se } }),
|
|
450
|
+
v.map((e, t) => /* @__PURE__ */ f("col", { style: { width: e.width } }, e.key ?? t))
|
|
451
451
|
] }),
|
|
452
|
-
_t && /* @__PURE__ */ f(Ut, { className: "bj-table__header", children: we.map((e, t) => /* @__PURE__ */
|
|
453
|
-
|
|
452
|
+
_t && /* @__PURE__ */ f(Ut, { className: "bj-table__header", children: we.map((e, t) => /* @__PURE__ */ k(Wt, { className: "bj-table__header-row", ...ve == null ? void 0 : ve(v, t), children: [
|
|
453
|
+
l && t === 0 && /* @__PURE__ */ k(
|
|
454
454
|
tt,
|
|
455
455
|
{
|
|
456
|
-
className:
|
|
456
|
+
className: S("bj-table__header-cell", "bj-table__selection-cell", !!(b != null && b.x) && "bj-table__selection-cell--fixed"),
|
|
457
457
|
rowSpan: we.length,
|
|
458
458
|
scope: "col",
|
|
459
|
-
style: { width:
|
|
459
|
+
style: { width: se },
|
|
460
460
|
children: [
|
|
461
|
-
|
|
461
|
+
l.type !== "radio" && /* @__PURE__ */ f(
|
|
462
462
|
bt,
|
|
463
463
|
{
|
|
464
464
|
checked: Oe,
|
|
@@ -467,105 +467,107 @@ function pr({
|
|
|
467
467
|
label: "选择当前页所有行"
|
|
468
468
|
}
|
|
469
469
|
),
|
|
470
|
-
|
|
470
|
+
l.columnTitle
|
|
471
471
|
]
|
|
472
472
|
}
|
|
473
473
|
),
|
|
474
|
-
e.map(({ column: r, colSpan: s, rowSpan:
|
|
475
|
-
var
|
|
476
|
-
const
|
|
477
|
-
|
|
474
|
+
e.map(({ column: r, colSpan: s, rowSpan: d }, c) => {
|
|
475
|
+
var G, I;
|
|
476
|
+
const a = r, g = v.indexOf(a), j = g >= 0 ? g : c, R = !("children" in r) && !!(a.filters || a.filterDropdown), y = !("children" in r) && !!a.sorter, Q = () => {
|
|
477
|
+
R ? oe(a, j) : y && It(a, j);
|
|
478
478
|
};
|
|
479
479
|
return /* @__PURE__ */ Ke(
|
|
480
480
|
tt,
|
|
481
481
|
{
|
|
482
|
-
...(
|
|
483
|
-
"aria-label": typeof
|
|
484
|
-
"aria-sort": y ?
|
|
485
|
-
className:
|
|
482
|
+
...(G = a.onHeaderCell) == null ? void 0 : G.call(a, r, c),
|
|
483
|
+
"aria-label": typeof a.title == "string" ? a.title : void 0,
|
|
484
|
+
"aria-sort": y ? P.get(E(a, j)) === "ascend" ? "ascending" : P.get(E(a, j)) === "descend" ? "descending" : "none" : void 0,
|
|
485
|
+
className: S(
|
|
486
486
|
"bj-table__header-cell",
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
R
|
|
493
|
-
|
|
487
|
+
((I = v[j + 1]) == null ? void 0 : I.fixed) === "right" && "bj-table__cell--before-fixed-right",
|
|
488
|
+
a.fixed && "bj-table__cell--fixed",
|
|
489
|
+
(a.fixed === "left" || a.fixed === !0) && "bj-table__cell--fixed-left",
|
|
490
|
+
a.fixed === "right" && "bj-table__cell--fixed-right",
|
|
491
|
+
a.sorter && "bj-table__header-cell--sortable",
|
|
492
|
+
R && "bj-table__header-cell--filterable",
|
|
493
|
+
P.get(E(a, j)) && "bj-table__header-cell--sorted",
|
|
494
|
+
a.className
|
|
494
495
|
),
|
|
495
496
|
colSpan: s,
|
|
496
|
-
key:
|
|
497
|
-
onClick: (
|
|
498
|
-
var
|
|
499
|
-
(T = (
|
|
497
|
+
key: a.key ?? String(a.dataIndex ?? c),
|
|
498
|
+
onClick: (p) => {
|
|
499
|
+
var M, N, T;
|
|
500
|
+
(T = (N = (M = a.onHeaderCell) == null ? void 0 : M.call(a, r, c)) == null ? void 0 : N.onClick) == null || T.call(N, p), !p.target.closest(".bj-table__filter-dropdown") && (R ? oe(a, j, p.currentTarget) : Q());
|
|
500
501
|
},
|
|
501
|
-
onKeyDown: (
|
|
502
|
-
var
|
|
503
|
-
(T = (
|
|
502
|
+
onKeyDown: (p) => {
|
|
503
|
+
var M, N, T;
|
|
504
|
+
(T = (N = (M = a.onHeaderCell) == null ? void 0 : M.call(a, r, c)) == null ? void 0 : N.onKeyDown) == null || T.call(N, p), !p.target.closest(".bj-table__filter-dropdown") && (p.key === "Enter" || p.key === " ") && (p.preventDefault(), R ? oe(a, j, p.currentTarget) : Q());
|
|
504
505
|
},
|
|
505
|
-
rowSpan:
|
|
506
|
+
rowSpan: d,
|
|
506
507
|
scope: "col",
|
|
507
|
-
style: { textAlign:
|
|
508
|
-
tabIndex:
|
|
508
|
+
style: { textAlign: a.align, ...et(a, j) },
|
|
509
|
+
tabIndex: R || y ? 0 : void 0
|
|
509
510
|
},
|
|
510
|
-
"children" in r ? ft(r.title, { filters: Object.fromEntries(B) }) : Vt(
|
|
511
|
+
"children" in r ? ft(r.title, { filters: Object.fromEntries(B) }) : Vt(a, j)
|
|
511
512
|
);
|
|
512
513
|
})
|
|
513
514
|
] }, t)) }),
|
|
514
|
-
/* @__PURE__ */ f($t, { className: "bj-table__body", children:
|
|
515
|
-
var
|
|
516
|
-
const r =
|
|
515
|
+
/* @__PURE__ */ f($t, { className: "bj-table__body", children: U.length > 0 ? U.map(({ record: e, index: t }) => {
|
|
516
|
+
var g;
|
|
517
|
+
const r = L(e, t, _), s = ie(e, t), d = ((g = l == null ? void 0 : l.getCheckboxProps) == null ? void 0 : g.call(l, e).disabled) ?? !1, c = K.includes(r), a = typeof je == "function" ? je(e, t, 0) : je;
|
|
517
518
|
return /* @__PURE__ */ Ke(
|
|
518
519
|
rt,
|
|
519
520
|
{
|
|
520
521
|
...me == null ? void 0 : me(e, t),
|
|
521
|
-
className:
|
|
522
|
+
className: S("bj-table__row", s && "bj-table__row--group", c && "bj-table__row--selected", a),
|
|
522
523
|
key: r
|
|
523
524
|
},
|
|
524
|
-
|
|
525
|
+
l && !s && /* @__PURE__ */ f(
|
|
525
526
|
Ee,
|
|
526
527
|
{
|
|
527
|
-
className:
|
|
528
|
-
style: { width:
|
|
528
|
+
className: S("bj-table__cell", "bj-table__selection-cell", !!(b != null && b.x) && "bj-table__selection-cell--fixed"),
|
|
529
|
+
style: { width: se },
|
|
529
530
|
children: /* @__PURE__ */ f(
|
|
530
531
|
bt,
|
|
531
532
|
{
|
|
532
533
|
checked: c,
|
|
533
|
-
disabled:
|
|
534
|
+
disabled: d,
|
|
534
535
|
label: `选择第 ${t + 1} 行`,
|
|
535
|
-
name:
|
|
536
|
+
name: l.type === "radio" ? "bj-table-row-selection" : void 0,
|
|
536
537
|
onChange: () => wt(e, t),
|
|
537
|
-
type:
|
|
538
|
+
type: l.type ?? "checkbox"
|
|
538
539
|
}
|
|
539
540
|
)
|
|
540
541
|
}
|
|
541
542
|
),
|
|
542
|
-
|
|
543
|
-
var T,
|
|
544
|
-
if (s &&
|
|
545
|
-
const y =
|
|
546
|
-
return
|
|
543
|
+
v.map((j, R) => {
|
|
544
|
+
var N, T, n;
|
|
545
|
+
if (s && R > 0) return null;
|
|
546
|
+
const y = j, Q = ur(e, y.dataIndex), G = y.render ? y.render(Q, e, t) : Q, I = yr(G) ? G : void 0, p = { ...(N = y.onCell) == null ? void 0 : N.call(y, e, t), ...I == null ? void 0 : I.props }, M = I ? I.children : G;
|
|
547
|
+
return p.colSpan === 0 || p.rowSpan === 0 ? null : /* @__PURE__ */ Ke(
|
|
547
548
|
Ee,
|
|
548
549
|
{
|
|
549
|
-
...
|
|
550
|
-
className:
|
|
550
|
+
...p,
|
|
551
|
+
className: S(
|
|
551
552
|
"bj-table__cell",
|
|
553
|
+
((T = v[R + 1]) == null ? void 0 : T.fixed) === "right" && "bj-table__cell--before-fixed-right",
|
|
552
554
|
s && "bj-table__cell--group",
|
|
553
555
|
y.fixed && "bj-table__cell--fixed",
|
|
554
556
|
(y.fixed === "left" || y.fixed === !0) && "bj-table__cell--fixed-left",
|
|
555
557
|
y.fixed === "right" && "bj-table__cell--fixed-right",
|
|
556
558
|
y.ellipsis && "bj-table__cell--ellipsis",
|
|
557
559
|
y.className,
|
|
558
|
-
|
|
560
|
+
p.className
|
|
559
561
|
),
|
|
560
|
-
key: y.key ?? String(y.dataIndex ??
|
|
561
|
-
colSpan: s ? Ye :
|
|
562
|
-
style: { textAlign: y.align, ...et(y,
|
|
562
|
+
key: y.key ?? String(y.dataIndex ?? R),
|
|
563
|
+
colSpan: s ? Ye : p.colSpan,
|
|
564
|
+
style: { textAlign: y.align, ...et(y, R), ...p.style }
|
|
563
565
|
},
|
|
564
|
-
s ? ((
|
|
566
|
+
s ? ((n = h == null ? void 0 : h.render) == null ? void 0 : n.call(h, {
|
|
565
567
|
record: e,
|
|
566
|
-
expanded:
|
|
568
|
+
expanded: J.includes(be(e, t)),
|
|
567
569
|
onToggle: () => zt(e, t)
|
|
568
|
-
})) ??
|
|
570
|
+
})) ?? M ?? "" : /* @__PURE__ */ f("div", { className: "bj-table__cell-content", children: M ?? "" })
|
|
569
571
|
);
|
|
570
572
|
})
|
|
571
573
|
);
|
|
@@ -581,13 +583,13 @@ function pr({
|
|
|
581
583
|
] })
|
|
582
584
|
}
|
|
583
585
|
),
|
|
584
|
-
|
|
585
|
-
|
|
586
|
+
U.length === 0 && /* @__PURE__ */ f("div", { className: "bj-table__empty-overlay", children: /* @__PURE__ */ k("div", { className: "bj-table__empty-content", children: [
|
|
587
|
+
it && /* @__PURE__ */ f("div", { className: "bj-table__empty-image-wrap", children: it }),
|
|
586
588
|
/* @__PURE__ */ f("div", { className: "bj-table__empty-text", children: Jt })
|
|
587
589
|
] }) })
|
|
588
590
|
] }),
|
|
589
591
|
((b == null ? void 0 : b.x) || (b == null ? void 0 : b.y)) && /* @__PURE__ */ f(
|
|
590
|
-
|
|
592
|
+
ir,
|
|
591
593
|
{
|
|
592
594
|
containerRef: le,
|
|
593
595
|
direction: b != null && b.x && (b != null && b.y) ? "both" : b != null && b.x ? "horizontal" : "vertical",
|
|
@@ -599,20 +601,20 @@ function pr({
|
|
|
599
601
|
}
|
|
600
602
|
),
|
|
601
603
|
Te && /* @__PURE__ */ f("div", { className: "bj-table__footer", children: Te(z) }),
|
|
602
|
-
ue && /* @__PURE__ */
|
|
603
|
-
/* @__PURE__ */ f("img", { alt: "", className: "bj-table__loading-indicator", src:
|
|
604
|
+
ue && /* @__PURE__ */ k("div", { "aria-live": "polite", "aria-busy": "true", className: "bj-table__loading", role: "status", children: [
|
|
605
|
+
/* @__PURE__ */ f("img", { alt: "", className: "bj-table__loading-indicator", src: ar }),
|
|
604
606
|
/* @__PURE__ */ f("span", { className: "bj-table__loading-text", children: "加载中..." })
|
|
605
607
|
] }),
|
|
606
|
-
|
|
608
|
+
i && z.length > 0 && /* @__PURE__ */ f("div", { className: "bj-table__pagination", children: /* @__PURE__ */ f(
|
|
607
609
|
Yt,
|
|
608
610
|
{
|
|
609
611
|
align: "end",
|
|
610
|
-
disabled: ue ||
|
|
611
|
-
current:
|
|
612
|
-
defaultCurrent:
|
|
613
|
-
defaultPageSize:
|
|
614
|
-
dropdownClassName:
|
|
615
|
-
hideOnSinglePage:
|
|
612
|
+
disabled: ue || i.disabled,
|
|
613
|
+
current: H,
|
|
614
|
+
defaultCurrent: i.defaultCurrent,
|
|
615
|
+
defaultPageSize: i.defaultPageSize,
|
|
616
|
+
dropdownClassName: i.dropdownClassName,
|
|
617
|
+
hideOnSinglePage: i.hideOnSinglePage,
|
|
616
618
|
onChange: (e) => {
|
|
617
619
|
if (Pe.current) {
|
|
618
620
|
Pe.current = !1;
|
|
@@ -621,16 +623,16 @@ function pr({
|
|
|
621
623
|
Lt(e);
|
|
622
624
|
},
|
|
623
625
|
onShowSizeChange: (e, t) => At(t),
|
|
624
|
-
pageSize:
|
|
625
|
-
pageSizeOptions:
|
|
626
|
-
popupPlacement:
|
|
627
|
-
resolvePopupPlacement:
|
|
628
|
-
showQuickJumper:
|
|
629
|
-
showSizeChanger:
|
|
630
|
-
showTotal:
|
|
631
|
-
simple:
|
|
632
|
-
size:
|
|
633
|
-
t:
|
|
626
|
+
pageSize: q,
|
|
627
|
+
pageSizeOptions: i.pageSizeOptions,
|
|
628
|
+
popupPlacement: i.popupPlacement,
|
|
629
|
+
resolvePopupPlacement: i.resolvePopupPlacement,
|
|
630
|
+
showQuickJumper: i.showQuickJumper,
|
|
631
|
+
showSizeChanger: i.showSizeChanger,
|
|
632
|
+
showTotal: i.showTotal,
|
|
633
|
+
simple: i.simple,
|
|
634
|
+
size: i.size,
|
|
635
|
+
t: i.t ?? X,
|
|
634
636
|
total: We
|
|
635
637
|
}
|
|
636
638
|
) })
|