bj-web-components 0.2.11 → 0.2.13
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/README.md +38 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +45 -26
- package/dist/style.css +1 -1
- package/dist/web/BasicInput/BInput.js +1 -0
- package/dist/web/BasicInput/BInput.mjs +177 -0
- package/dist/web/BasicInput/utils.js +1 -0
- package/dist/web/BasicInput/utils.mjs +37 -0
- package/dist/web/CheckBox/BCheckBox.js +1 -0
- package/dist/web/CheckBox/BCheckBox.mjs +101 -0
- package/dist/web/CheckBox/Group.js +1 -0
- package/dist/web/CheckBox/Group.mjs +67 -0
- package/dist/web/CheckBox/context.js +1 -0
- package/dist/web/CheckBox/context.mjs +5 -0
- package/dist/web/CheckBox/index.js +1 -0
- package/dist/web/CheckBox/index.mjs +8 -0
- package/dist/web/Dropdown/BDropdown.js +1 -0
- package/dist/web/Dropdown/BDropdown.mjs +160 -0
- package/dist/web/OverlayScrollbar/BOverlayScrollbar.js +1 -0
- package/dist/web/OverlayScrollbar/BOverlayScrollbar.mjs +152 -0
- package/dist/web/Pagination/Pagination.js +1 -1
- package/dist/web/Pagination/Pagination.mjs +1 -1
- package/dist/web/ProductField/ProductField.mjs +12 -12
- package/dist/web/SkuInputCard/SkuInputCard.mjs +26 -26
- package/dist/web/Table/BTable.js +1 -0
- package/dist/web/Table/BTable.mjs +608 -0
- package/dist/web/Table/Column.js +1 -0
- package/dist/web/Table/Column.mjs +6 -0
- package/dist/web/Table/ColumnGroup.js +1 -0
- package/dist/web/Table/ColumnGroup.mjs +6 -0
- package/dist/web/Table/utils/columns.js +1 -0
- package/dist/web/Table/utils/columns.mjs +43 -0
- package/dist/web/Table/utils/sortFilter.js +1 -0
- package/dist/web/Table/utils/sortFilter.mjs +63 -0
- package/dist/web/Tabs/BTabs.js +1 -0
- package/dist/web/Tabs/BTabs.mjs +130 -0
- package/dist/web/Tabs/TabPane.js +1 -0
- package/dist/web/Tabs/TabPane.mjs +7 -0
- package/dist/web/Tooltip/ContentTooltip.js +1 -1
- package/dist/web/Tooltip/ContentTooltip.mjs +56 -20
- package/dist/web.js +1 -1
- package/dist/web.mjs +45 -26
- package/package.json +3 -3
- package/dist/index.d.ts +0 -534
- package/dist/miniapp.d.ts +0 -1
- package/dist/mobile.d.ts +0 -1
- package/dist/react.d.ts +0 -1
- package/dist/shared.d.ts +0 -1
- package/dist/web.d.ts +0 -534
|
@@ -11,7 +11,7 @@ import he from "./checkbox-ok.svg.mjs";
|
|
|
11
11
|
function G({ size: l = 20 }) {
|
|
12
12
|
return /* @__PURE__ */ t("svg", { width: l, height: l, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M16.5613 6.73027C16.7558 6.53571 17.0723 6.53442 17.2684 6.72736C17.4644 6.92032 17.4657 7.23444 17.2713 7.42901L12.7036 12.0002L17.2713 16.5714C17.4657 16.766 17.4644 17.0801 17.2684 17.273C17.0723 17.4659 16.7558 17.4646 16.5613 17.2701L11.9996 12.7047L7.43794 17.2701C7.24352 17.4647 6.92699 17.4659 6.73091 17.273C6.53485 17.0801 6.53355 16.7659 6.72798 16.5714L11.2955 12.0002L6.72798 7.42901C6.53355 7.23442 6.53485 6.92032 6.73091 6.72736C6.92698 6.53442 7.2435 6.53571 7.43794 6.73027L11.9996 11.2955L16.5613 6.73027Z", fill: "currentColor" }) });
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function De({
|
|
15
15
|
options: l = [],
|
|
16
16
|
value: a = [],
|
|
17
17
|
onChange: o,
|
|
@@ -28,7 +28,7 @@ function Ee({
|
|
|
28
28
|
style: V,
|
|
29
29
|
getPopupContainer: v
|
|
30
30
|
}) {
|
|
31
|
-
const W = (r == null ? void 0 : r.searchPlaceholder) ?? "搜索", Y = (r == null ? void 0 : r.sortDefault) ?? "默认顺序", ee = (r == null ? void 0 : r.sortAsc) ?? "名称A-Z", te = (r == null ? void 0 : r.sortDesc) ?? "名称Z-A", P = (r == null ? void 0 : r.noMatchText) ?? "暂无选项", re = (r == null ? void 0 : r.manageFieldPre) ?? "请前往", ne = (r == null ? void 0 : r.manageFieldLink) ?? "管理字段", ce = (r == null ? void 0 : r.manageFieldPost) ?? "添加", [f, R] = h(!1), [b, $] = h(""), [p, T] = h("none"), [L, k] = h(!1), g = m(null), x = m(null), X = m(null), [
|
|
31
|
+
const W = (r == null ? void 0 : r.searchPlaceholder) ?? "搜索", Y = (r == null ? void 0 : r.sortDefault) ?? "默认顺序", ee = (r == null ? void 0 : r.sortAsc) ?? "名称A-Z", te = (r == null ? void 0 : r.sortDesc) ?? "名称Z-A", P = (r == null ? void 0 : r.noMatchText) ?? "暂无选项", re = (r == null ? void 0 : r.manageFieldPre) ?? "请前往", ne = (r == null ? void 0 : r.manageFieldLink) ?? "管理字段", ce = (r == null ? void 0 : r.manageFieldPost) ?? "添加", [f, R] = h(!1), [b, $] = h(""), [p, T] = h("none"), [L, k] = h(!1), g = m(null), x = m(null), X = m(null), [y, se] = h({ top: 0, left: 0, width: 0 }), d = U(() => {
|
|
32
32
|
if (!g.current) return;
|
|
33
33
|
const e = g.current.getBoundingClientRect();
|
|
34
34
|
se({
|
|
@@ -44,7 +44,7 @@ function Ee({
|
|
|
44
44
|
const e = (n) => {
|
|
45
45
|
var i, N;
|
|
46
46
|
const c = n.target;
|
|
47
|
-
(i = X.current) != null && i.contains(c) || (N = g.current) != null && N.contains(c) ||
|
|
47
|
+
(i = X.current) != null && i.contains(c) || (N = g.current) != null && N.contains(c) || E();
|
|
48
48
|
};
|
|
49
49
|
return document.addEventListener("mousedown", e), window.addEventListener("scroll", d, !0), window.addEventListener("resize", d), () => {
|
|
50
50
|
document.removeEventListener("mousedown", e), window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
|
|
@@ -74,7 +74,7 @@ function Ee({
|
|
|
74
74
|
}), []);
|
|
75
75
|
function oe(e) {
|
|
76
76
|
if (!u) {
|
|
77
|
-
o == null || o(a.includes(e) ? [] : [e]), a.includes(e) ||
|
|
77
|
+
o == null || o(a.includes(e) ? [] : [e]), a.includes(e) || E();
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
80
|
const n = a.includes(e) ? a.filter((c) => c !== e) : [...a, e];
|
|
@@ -83,7 +83,7 @@ function Ee({
|
|
|
83
83
|
function S(e) {
|
|
84
84
|
o == null || o(a.filter((n) => n !== e));
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function E() {
|
|
87
87
|
R(!1), $(""), T("none");
|
|
88
88
|
}
|
|
89
89
|
function ie(e) {
|
|
@@ -93,7 +93,7 @@ function Ee({
|
|
|
93
93
|
let e = l.filter((c) => (c.searchText ?? (typeof c.label == "string" ? c.label : "")).toLowerCase().includes(b.toLowerCase()));
|
|
94
94
|
const n = (c) => c.searchText ?? (typeof c.label == "string" ? c.label : "");
|
|
95
95
|
return p === "asc" && (e = [...e].sort((c, i) => n(c).localeCompare(n(i)))), p === "desc" && (e = [...e].sort((c, i) => n(i).localeCompare(n(c)))), e;
|
|
96
|
-
}, [l, b, p]), _ = l.filter((e) => a.includes(e.value)),
|
|
96
|
+
}, [l, b, p]), _ = l.filter((e) => a.includes(e.value)), D = l.length > 0;
|
|
97
97
|
return /* @__PURE__ */ s("div", { ref: g, className: ["bu-pf", Q].filter(Boolean).join(" "), style: V, children: [
|
|
98
98
|
!f && /* @__PURE__ */ s("div", { className: `bu-pf__trigger${_.length > 0 ? " bu-pf__trigger--selected" : ""}`, onClick: () => R(!0), children: [
|
|
99
99
|
_.length > 0 ? /* @__PURE__ */ t(
|
|
@@ -142,10 +142,10 @@ function Ee({
|
|
|
142
142
|
] }, e.value)) : /* @__PURE__ */ t("span", { className: "bu-pf__placeholder-inline", children: O })
|
|
143
143
|
}
|
|
144
144
|
),
|
|
145
|
-
/* @__PURE__ */ t("button", { type: "button", className: "bu-pf__close", onClick:
|
|
145
|
+
/* @__PURE__ */ t("button", { type: "button", className: "bu-pf__close", onClick: E, children: /* @__PURE__ */ t("img", { src: q, width: 24, height: 24, alt: "" }) })
|
|
146
146
|
] }) }),
|
|
147
147
|
ue(
|
|
148
|
-
/* @__PURE__ */ t("div", { ref: X, className: "bu-pf__portal", style: { position: "fixed", top:
|
|
148
|
+
/* @__PURE__ */ t("div", { ref: X, className: "bu-pf__portal", style: { position: "fixed", top: y.top, left: y.left, width: y.width, zIndex: 1050 }, children: /* @__PURE__ */ s("div", { className: "bu-pf__dropdown", children: [
|
|
149
149
|
(C || F) && /* @__PURE__ */ s("div", { className: "bu-pf__toolbar", children: [
|
|
150
150
|
C && /* @__PURE__ */ s("div", { className: "bu-pf__search", children: [
|
|
151
151
|
/* @__PURE__ */ t("span", { className: "bu-pf__search-icon", children: /* @__PURE__ */ t("img", { src: pe, width: 20, height: 20, alt: "" }) }),
|
|
@@ -184,7 +184,7 @@ function Ee({
|
|
|
184
184
|
)) })
|
|
185
185
|
] })
|
|
186
186
|
] }),
|
|
187
|
-
/* @__PURE__ */ t("div", { className: "bu-pf__list", children:
|
|
187
|
+
/* @__PURE__ */ t("div", { className: "bu-pf__list", children: D && j.length > 0 ? j.map((e) => {
|
|
188
188
|
const n = a.includes(e.value);
|
|
189
189
|
return /* @__PURE__ */ s(
|
|
190
190
|
"div",
|
|
@@ -206,8 +206,8 @@ function Ee({
|
|
|
206
206
|
e.value
|
|
207
207
|
);
|
|
208
208
|
}) : /* @__PURE__ */ s("div", { className: "bu-pf__no-match", children: [
|
|
209
|
-
/* @__PURE__ */ t("img", { className: "bu-pf__no-match-img", src: fe, alt:
|
|
210
|
-
/* @__PURE__ */ t("p", { className: "bu-pf__no-match-text", children:
|
|
209
|
+
/* @__PURE__ */ t("img", { className: "bu-pf__no-match-img", src: fe, alt: D ? P : M }),
|
|
210
|
+
/* @__PURE__ */ t("p", { className: "bu-pf__no-match-text", children: D ? P : M }),
|
|
211
211
|
/* @__PURE__ */ s("p", { className: "bu-pf__no-match-hint", children: [
|
|
212
212
|
re,
|
|
213
213
|
/* @__PURE__ */ t("button", { type: "button", className: "bu-pf__manage-btn", onClick: J, children: ne }),
|
|
@@ -222,5 +222,5 @@ function Ee({
|
|
|
222
222
|
] });
|
|
223
223
|
}
|
|
224
224
|
export {
|
|
225
|
-
|
|
225
|
+
De as default
|
|
226
226
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as t, Fragment as B } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as v, useState as k, useEffect as A } from "react";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
5
|
-
function
|
|
4
|
+
import c1 from "./spin_loading_red.gif.mjs";
|
|
5
|
+
function e1() {
|
|
6
6
|
return /* @__PURE__ */ t("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M12.8333 8.66683H16.1666V5.3335H12.8333M12.8333 13.6668H16.1666V10.3335H12.8333M7.83331 13.6668H11.1666V10.3335H7.83331M7.83331 18.6668H11.1666V15.3335H7.83331M12.8333 18.6668H16.1666V15.3335H12.8333M7.83331 8.66683H11.1666V5.3335H7.83331V8.66683Z", fill: "currentColor" }) });
|
|
7
7
|
}
|
|
8
8
|
function u1() {
|
|
@@ -12,7 +12,7 @@ function s1() {
|
|
|
12
12
|
return /* @__PURE__ */ t("svg", { width: "24", height: "24", viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M515.512889 227.555556a21.070222 21.070222 0 0 1 21.070222 21.070222v245.816889h238.791111a21.070222 21.070222 0 0 1 0 42.140444h-238.791111v238.791111a21.070222 21.070222 0 0 1-42.140444 0v-238.791111H248.625778a21.070222 21.070222 0 0 1 0-42.140444h245.816889V248.625778A21.070222 21.070222 0 0 1 515.512889 227.555556z", fill: "currentColor" }) });
|
|
13
13
|
}
|
|
14
14
|
function a1() {
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ c("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
16
16
|
/* @__PURE__ */ t("path", { d: "M8.68576 19.3333C9.0645 19.3333 9.37153 19.6404 9.37153 20.0191V22.1714C9.37153 22.4239 9.5761 22.6285 9.82856 22.6285H11.9809C12.3596 22.6285 12.6667 22.9355 12.6667 23.3142C12.6667 23.693 12.3596 24 11.9809 24H9.82856L9.73438 23.9976C8.79946 23.9502 8.04983 23.2005 8.00239 22.2656L8 22.1714V20.0191C8 19.6404 8.30703 19.3333 8.68576 19.3333Z", fill: "currentColor" }),
|
|
17
17
|
/* @__PURE__ */ t("path", { d: "M23.3142 19.3333C23.693 19.3333 24 19.6404 24 20.0191V22.1714C24 23.1497 23.2317 23.9486 22.2656 23.9976L22.1714 24H20.0191C19.6404 24 19.3333 23.693 19.3333 23.3142C19.3333 22.9355 19.6404 22.6285 20.0191 22.6285H22.1714C22.4239 22.6285 22.6285 22.4239 22.6285 22.1714V20.0191C22.6285 19.6404 22.9355 19.3333 23.3142 19.3333Z", fill: "currentColor" }),
|
|
18
18
|
/* @__PURE__ */ t("path", { d: "M15.5573 11.2413C17.8315 11.2989 19.6575 13.1607 19.6576 15.4488L19.656 15.5573C19.6337 16.4372 19.3411 17.2497 18.8585 17.9156L20.5647 19.6217C20.825 19.8821 20.825 20.3043 20.5647 20.5647C20.3043 20.825 19.8823 20.825 19.622 20.5647L17.9156 18.8585C17.2224 19.3609 16.3703 19.6575 15.4488 19.6576L15.3401 19.656C13.102 19.5993 11.298 17.7954 11.2413 15.5573L11.24 15.4488C11.24 13.1244 13.1244 11.24 15.4488 11.24L15.5573 11.2413ZM15.4488 12.5734C13.8608 12.5734 12.5734 13.8608 12.5734 15.4488C12.5734 17.0368 13.8608 18.3242 15.4488 18.3242C17.0368 18.3242 18.3242 17.0368 18.3242 15.4488C18.3242 13.8608 17.0368 12.5734 15.4488 12.5734Z", fill: "currentColor" }),
|
|
@@ -31,7 +31,7 @@ function f1({ text: l, keyword: r }) {
|
|
|
31
31
|
const n = l.toLowerCase().indexOf(r.toLowerCase());
|
|
32
32
|
if (n === -1) return /* @__PURE__ */ t(B, { children: l });
|
|
33
33
|
const p = l.slice(0, n), C = l.slice(n, n + r.length), a = l.slice(n + r.length);
|
|
34
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ c(B, { children: [
|
|
35
35
|
p,
|
|
36
36
|
/* @__PURE__ */ t("span", { className: "sku-input-card__dropdown-highlight", children: C }),
|
|
37
37
|
a
|
|
@@ -44,16 +44,16 @@ function m1({
|
|
|
44
44
|
mode: p = "single",
|
|
45
45
|
activeLang: C = "zh",
|
|
46
46
|
onLangChange: a,
|
|
47
|
-
showBody:
|
|
47
|
+
showBody: W = !0,
|
|
48
48
|
error: O = !1,
|
|
49
|
-
onDelete:
|
|
49
|
+
onDelete: q,
|
|
50
50
|
onPreviewImage: H,
|
|
51
51
|
onDeleteImage: w,
|
|
52
52
|
onUpload: j,
|
|
53
53
|
onAssociate: g,
|
|
54
54
|
images: R,
|
|
55
55
|
labels: u,
|
|
56
|
-
inputEvents:
|
|
56
|
+
inputEvents: G,
|
|
57
57
|
className: J,
|
|
58
58
|
style: K,
|
|
59
59
|
options: _,
|
|
@@ -61,7 +61,7 @@ function m1({
|
|
|
61
61
|
onSelect: M,
|
|
62
62
|
onSearch: V,
|
|
63
63
|
open: N,
|
|
64
|
-
onDropdownVisibleChange:
|
|
64
|
+
onDropdownVisibleChange: e
|
|
65
65
|
}) {
|
|
66
66
|
const Q = (u == null ? void 0 : u.namePlaceholder) ?? "请填写产品名称", X = (u == null ? void 0 : u.uploadLocal) ?? "本地上传", Y = (u == null ? void 0 : u.associateImage) ?? "关联图片", I = v(null), Z = v(null), U = v(null), z = v(null), [P, F] = k([]), [L, h] = k(!1), [S, x] = k(!1), [D, T] = k(!1), y = Array.isArray(_) && _.length > 0, b = N !== void 0 ? N : y && S, $ = y ? r ? _.filter(
|
|
67
67
|
(i) => E ? E(i, r) : o1(i, r)
|
|
@@ -77,10 +77,10 @@ function m1({
|
|
|
77
77
|
function i(s) {
|
|
78
78
|
var o, f;
|
|
79
79
|
const d = s.target;
|
|
80
|
-
(o = U.current) != null && o.contains(d) || (f = z.current) != null && f.contains(d) || (x(!1),
|
|
80
|
+
(o = U.current) != null && o.contains(d) || (f = z.current) != null && f.contains(d) || (x(!1), e == null || e(!1));
|
|
81
81
|
}
|
|
82
82
|
return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
|
|
83
|
-
}, [b,
|
|
83
|
+
}, [b, e]);
|
|
84
84
|
const m = R ?? P;
|
|
85
85
|
async function t1(i) {
|
|
86
86
|
var d;
|
|
@@ -116,11 +116,11 @@ function m1({
|
|
|
116
116
|
p === "bilingual" && "sku-input-card__name-input--with-toggle",
|
|
117
117
|
O && "sku-input-card__name-input--error"
|
|
118
118
|
].filter(Boolean).join(" ");
|
|
119
|
-
return /* @__PURE__ */
|
|
120
|
-
/* @__PURE__ */ t("span", { className: "sku-input-card__drag", id: l, children: /* @__PURE__ */ t(
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
/* @__PURE__ */
|
|
119
|
+
return /* @__PURE__ */ c("div", { className: n1, style: K, children: [
|
|
120
|
+
/* @__PURE__ */ t("span", { className: "sku-input-card__drag", id: l, children: /* @__PURE__ */ t(e1, {}) }),
|
|
121
|
+
/* @__PURE__ */ c("div", { className: "sku-input-card__main", children: [
|
|
122
|
+
/* @__PURE__ */ c("div", { className: "sku-input-card__header", children: [
|
|
123
|
+
/* @__PURE__ */ c("div", { className: "sku-input-card__name-wrap", ref: z, children: [
|
|
124
124
|
/* @__PURE__ */ t(
|
|
125
125
|
"input",
|
|
126
126
|
{
|
|
@@ -130,10 +130,10 @@ function m1({
|
|
|
130
130
|
n == null || n(i.target.value), V == null || V(i.target.value);
|
|
131
131
|
},
|
|
132
132
|
onFocus: () => {
|
|
133
|
-
y && N === void 0 && (x(!0),
|
|
133
|
+
y && N === void 0 && (x(!0), e == null || e(!0));
|
|
134
134
|
},
|
|
135
135
|
placeholder: Q,
|
|
136
|
-
...
|
|
136
|
+
...G
|
|
137
137
|
}
|
|
138
138
|
),
|
|
139
139
|
b && $.length > 0 && /* 绝对定位锚定在 name-wrap(position: relative)下方,随输入框跟随滚动/视口变化。
|
|
@@ -150,14 +150,14 @@ function m1({
|
|
|
150
150
|
i.value === r && "sku-input-card__dropdown-item--selected"
|
|
151
151
|
].filter(Boolean).join(" "),
|
|
152
152
|
onMouseDown: (d) => {
|
|
153
|
-
d.preventDefault(), !i.disabled && (n == null || n(i.value), M == null || M(i.value, i), x(!1),
|
|
153
|
+
d.preventDefault(), !i.disabled && (n == null || n(i.value), M == null || M(i.value, i), x(!1), e == null || e(!1));
|
|
154
154
|
},
|
|
155
155
|
children: /* @__PURE__ */ t(f1, { text: s, keyword: r })
|
|
156
156
|
},
|
|
157
157
|
i.value
|
|
158
158
|
);
|
|
159
159
|
}) }) }),
|
|
160
|
-
p === "bilingual" && /* @__PURE__ */
|
|
160
|
+
p === "bilingual" && /* @__PURE__ */ c("div", { className: "sku-input-card__lang-toggle", children: [
|
|
161
161
|
/* @__PURE__ */ t(
|
|
162
162
|
"button",
|
|
163
163
|
{
|
|
@@ -176,9 +176,9 @@ function m1({
|
|
|
176
176
|
)
|
|
177
177
|
] })
|
|
178
178
|
] }),
|
|
179
|
-
/* @__PURE__ */ t("button", { className: "sku-input-card__delete", onClick:
|
|
179
|
+
/* @__PURE__ */ t("button", { className: "sku-input-card__delete", onClick: q, children: /* @__PURE__ */ t(u1, {}) })
|
|
180
180
|
] }),
|
|
181
|
-
|
|
181
|
+
W && /* @__PURE__ */ c("div", { className: "sku-input-card__body", children: [
|
|
182
182
|
/* @__PURE__ */ t(
|
|
183
183
|
"input",
|
|
184
184
|
{
|
|
@@ -189,11 +189,11 @@ function m1({
|
|
|
189
189
|
onChange: t1
|
|
190
190
|
}
|
|
191
191
|
),
|
|
192
|
-
D ? /* @__PURE__ */ t("div", { className: "sku-input-card__loading", children: /* @__PURE__ */ t("img", { src:
|
|
192
|
+
D ? /* @__PURE__ */ t("div", { className: "sku-input-card__loading", children: /* @__PURE__ */ t("img", { src: c1, alt: "上传中", className: "sku-input-card__loading-img" }) }) : m[0] ? (
|
|
193
193
|
/* Single image preview */
|
|
194
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ c("div", { className: "sku-input-card__image-item", children: [
|
|
195
195
|
/* @__PURE__ */ t("img", { src: m[0], alt: "图片", className: "sku-input-card__image-thumb" }),
|
|
196
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ c("div", { className: "sku-input-card__image-overlay", children: [
|
|
197
197
|
/* @__PURE__ */ t(
|
|
198
198
|
"button",
|
|
199
199
|
{
|
|
@@ -214,7 +214,7 @@ function m1({
|
|
|
214
214
|
] })
|
|
215
215
|
) : L ? (
|
|
216
216
|
/* Upload options — local upload / associate image */
|
|
217
|
-
/* @__PURE__ */ t("div", { className: "sku-input-card__upload-options", children: /* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ t("div", { className: "sku-input-card__upload-options", children: /* @__PURE__ */ c("div", { ref: Z, className: "sku-input-card__upload-options-box", children: [
|
|
218
218
|
/* @__PURE__ */ t("button", { className: "sku-input-card__upload-opt-btn", onClick: i1, children: X }),
|
|
219
219
|
/* @__PURE__ */ t("button", { className: "sku-input-card__upload-opt-btn", onClick: r1, children: Y })
|
|
220
220
|
] }) })
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),b=require("react"),Kt=require("react-dom"),qt=require("../Pagination/Pagination.js"),me=require("../Icon/Icon.js");;/* empty css */const Bt=require("../Tooltip/ContentTooltip.js"),Tt=require("../Tooltip/TooltipWrapper.js"),zt=require("../CheckBox/index.js"),It=require("../Dropdown/BDropdown.js"),Vt=require("../OverlayScrollbar/BOverlayScrollbar.js"),wt=require("../SkuInputCard/spin_loading_red.gif.js"),Lt=require("../ProductField/no_data_light.png.js"),At=require("./Column.js"),Ht=require("./ColumnGroup.js"),_=require("./utils/sortFilter.js"),ve=require("./utils/columns.js");;/* empty css */const Wt=300;function E(...p){return p.filter(Boolean).join(" ")}function Ut(p,u){return u===void 0?void 0:(Array.isArray(u)?u:[u]).reduce((r,k)=>{if(!(r==null||typeof r!="object"))return r[k]},p)}function H(p,u,j){if(typeof j=="function")return j(p,u);if(j){const r=p[String(j)];if(typeof r=="string"||typeof r=="number")return r}return u}function Ze(p,u){return Math.max(1,Math.ceil(p/u))}function $t(p){return!!(p&&typeof p=="object"&&!b.isValidElement(p)&&"props"in p)}function Gt(p,u){return(typeof u.text=="string"||typeof u.text=="number"?String(u.text):String(u.value)).toLocaleLowerCase().includes(p.toLocaleLowerCase())}function Xe({checked:p,disabled:u,label:j,name:r,onChange:k,type:U="checkbox"}){return U==="checkbox"?i.jsx(zt.BCheckBox,{"aria-label":j,checked:p,className:"bj-table__selection-checkbox",disabled:u,name:r,onChange:k,skipGroup:!0}):i.jsxs("label",{className:E("bj-table__selection-control",p&&"bj-table__selection-control--checked",u&&"bj-table__selection-control--disabled"),children:[i.jsx("input",{"aria-label":j,checked:p,className:"bj-table__selection-input",disabled:u,name:r,onChange:k,type:U}),i.jsx("span",{"aria-hidden":"true",className:"bj-table__selection-box",children:p&&i.jsx(me,{className:"bj-table__selection-check-icon",type:"icon-a-dagouxi"})})]})}function Jt({columns:p,dataSource:u=[],rowKey:j,rowSelection:r,pagination:k=!1,loading:U=!1,bordered:Ye=!0,size:et="middle",showHeader:tt=!0,emptyText:ae,emptyImage:le=Lt,emptyHeight:st,t:$=Y=>Y,className:rt,style:at,rowClassName:ie,sortDirections:lt=["ascend","descend",null],onChange:ne,children:Ce,title:Fe,footer:De,summary:Re,tableLayout:Pe,components:v,onRow:de,onHeaderRow:ce,id:it,scroll:o,locale:W}){var Ue,$e,Ge;const Y=b.useRef(null),ke=b.useRef(null),ee=b.useMemo(()=>p??ve.convertChildrenToColumns(Ce),[Ce,p]),G=b.useMemo(()=>ve.flattenColumns(ee),[ee]),Oe=b.useMemo(()=>ve.buildHeaderRows(ee),[ee]),[nt,Ee]=b.useState((r==null?void 0:r.defaultSelectedRowKeys)??[]),[oe,te]=b.useState(k?k.defaultCurrent??1:1),[dt,ct]=b.useState(k?k.defaultPageSize??10:10),[ot,bt]=b.useState(()=>new Map(G.flatMap((e,t)=>e.defaultSortOrder?[[_.getColumnKey(e,t),e.defaultSortOrder]]:[]))),[ft,ut]=b.useState(()=>new Map(G.flatMap((e,t)=>e.defaultFilteredValue===void 0?[]:[[_.getColumnKey(e,t),e.defaultFilteredValue]]))),[M,L]=b.useState(null),[Me,J]=b.useState(new Map),[ht,se]=b.useState(null),pt=b.useRef(`btable-${Math.random().toString(36).slice(2,10)}`).current,[A,be]=b.useState(null),[fe,Se]=b.useState(null),[ue,Ke]=b.useState(""),[Q,qe]=b.useState(""),[_t,he]=b.useState(),pe=b.useRef(0),a=k||void 0,B=(a==null?void 0:a.pageSize)??dt,D=(r==null?void 0:r.selectedRowKeys)??nt,m=G,R=new Map(ot),O=new Map(ft);m.forEach((e,t)=>{if("children"in e)return;const s=_.getColumnKey(e,t);e.sortOrder!==void 0&&R.set(s,e.sortOrder),e.filteredValue!==void 0&&O.set(s,e.filteredValue)});const Be=b.useMemo(()=>_.filterRecords(u,m,O),[m,O,u]),T=b.useMemo(()=>_.sortRecords(Be,m,R),[m,Be,R]),_e=(a==null?void 0:a.total)??T.length,Te=Ze(_e,B),S=Math.min((a==null?void 0:a.current)??oe,Te);b.useEffect(()=>{S!==oe&&(a==null?void 0:a.current)===void 0&&te(S)},[S,a==null?void 0:a.current,oe]),b.useEffect(()=>{if(!A||M===null){Se(null);return}const e=()=>{const t=A.getBoundingClientRect();Se({left:t.left,top:t.bottom+8})};return e(),document.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{document.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[A,M]),b.useEffect(()=>{if(M===null)return;const e=t=>{const s=t.target;A!=null&&A.contains(s)||s.closest(".bj-table__filter-dropdown")||(L(null),be(null))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[A,M]),b.useEffect(()=>{const e=window.setTimeout(()=>qe(ue.trim()),Wt);return()=>window.clearTimeout(e)},[ue]),b.useEffect(()=>{if(M===null)return;const e=G.find((s,d)=>_.getColumnKey(s,d)===M);if(!e||"children"in e||!e.filterRequest)return;const t=++pe.current;Promise.resolve().then(()=>e.filterRequest(Q)).then(s=>{pe.current===t&&he(s)},()=>{pe.current===t&&he([])})},[Q,G,M]);const z=b.useMemo(()=>{if(!a)return T.map((t,s)=>({record:t,index:s}));const e=(S-1)*B;return T.slice(e,e+B).map((t,s)=>({record:t,index:e+s}))},[S,B,a,T]),ze=b.useMemo(()=>z.map(({record:e,index:t})=>H(e,t,j)),[j,z]),jt=D.map(String).join("|"),gt=ze.map(String).join("|");b.useEffect(()=>{var c;if(!r||D.length===0)return;const e=new Set(ze),t=D.filter(f=>e.has(f));if(t.length===D.length)return;r.selectedRowKeys===void 0&&Ee(t);const s=new Set(t),d=z.filter(({record:f,index:l})=>s.has(H(f,l,j))).map(({record:f})=>f);(c=r.onChange)==null||c.call(r,t,d,{type:"multiple"})},[r,j,jt,gt,z]);const je=(e,t=R,s=O,d=S)=>{const c=Object.fromEntries(s),f=_.filterRecords(u,m,s),l=_.sortRecords(f,m,t);ne==null||ne({...a,current:d,pageSize:B,total:(a==null?void 0:a.total)??l.length},c,_.getSorterResult(m,t),{action:e,currentDataSource:l})},yt=(e,t)=>{if(!e.sorter)return;const s=_.getColumnKey(e,t),d=_.getNextSortOrder(R.get(s)??null,e.sortDirections??lt),c=new Map;c.set(s,d),e.sortOrder===void 0&&bt(c),je("sort",c)},ge=(e,t,s)=>{const d=_.getColumnKey(e,t),c=new Map(O);c.set(d,s),e.filteredValue===void 0&&ut(c),L(null),(a==null?void 0:a.current)===void 0&&te(1),je("filter",R,c,1)},xt=(e,t)=>{const s=_.getColumnKey(e,t),d=e.filterResetToDefaultFilteredValue?e.defaultFilteredValue??[]:[];J(c=>new Map(c).set(s,d))},re=(e,t,s)=>{var c,f,l,C;const d=_.getColumnKey(e,t);if(M===d){L(null),be(null),(c=e.onFilterDropdownOpenChange)==null||c.call(e,!1),(f=e.onFilterDropdownVisibleChange)==null||f.call(e,!1);return}Ke(""),qe(""),he(void 0),J(g=>new Map(g).set(d,O.get(d)??[])),L(d),s&&be(s),(l=e.onFilterDropdownOpenChange)==null||l.call(e,!0),(C=e.onFilterDropdownVisibleChange)==null||C.call(e,!0)},vt=(e,t)=>{var w,Je;const s=_.getColumnKey(e,t),d=`bj-table-badge-${pt}-${String(s).replace(/[^a-zA-Z0-9_-]/g,"-")}`,c=R.get(s)??null,f=O.get(s)??[],l=Me.get(s)??f,C=e.filterDropdownOpen??e.filterDropdownVisible??M===s,g=e.filtered||f.length>0,h=c==="ascend"?"icon-a-zhengxumian":c==="descend"?"icon-a-daoxumian":"icon-a-weipaixumian",I=_.renderColumnTitle(e.title,{sortOrder:c,sortColumn:c?e:void 0,sortColumns:c?[{column:e,order:c}]:[],filters:Object.fromEntries(O)}),V=typeof e.filterDropdown=="function"?e.filterDropdown({prefixCls:"bj-table",selectedKeys:l.filter(n=>typeof n!="boolean"),setSelectedKeys:n=>J(y=>new Map(y).set(s,n)),confirm:n=>{ge(e,t,Me.get(s)??l),(n==null?void 0:n.closeDropdown)===!1&&L(s)},clearFilters:n=>{const y=e.filterResetToDefaultFilteredValue?e.defaultFilteredValue??[]:[];J(F=>new Map(F).set(s,y)),(n==null?void 0:n.confirm)===!0&&ge(e,t,y),((n==null?void 0:n.closeDropdown)===!1||(n==null?void 0:n.confirm)!==!0)&&L(s)},filters:e.filters,close:()=>L(null),visible:C}):e.filterDropdown,P=e.filterRequest?_t??[]:e.filters??[],x=Q&&!e.filterRequest?P.filter(n=>typeof e.filterSearch=="function"?e.filterSearch(Q,n):Gt(Q,n)):P,q=!!(e.filterSearch||e.filterRequest),N=i.jsxs("div",{className:E("bj-table__column-header",e.sorter&&"bj-table__column-header--sortable"),children:[e.badge!==void 0&&i.jsx("span",{"aria-label":"表头提示",className:"bj-table__column-badge-trigger",id:d,onBlur:()=>se(null),onClick:n=>n.stopPropagation(),onFocus:()=>se(s),onKeyDown:n=>n.stopPropagation(),onMouseEnter:()=>se(s),onMouseLeave:()=>se(null),role:"button",tabIndex:0,children:i.jsx("span",{"aria-hidden":"true",className:"bj-table__column-badge-shape"})}),i.jsxs("div",{className:"bj-table__column-title",children:[i.jsx("span",{className:"bj-table__column-title-content",children:I}),e.sorter&&i.jsx("span",{"aria-hidden":"true",className:"bj-table__column-sorter",children:i.jsx(me,{className:"bj-table__column-sorter-icon",type:h})})]}),(e.filters||e.filterDropdown)&&i.jsxs("div",{className:"bj-table__filter",children:[i.jsx("button",{"aria-expanded":C,"aria-label":"筛选",className:E("bj-table__filter-trigger",g&&"bj-table__filter-trigger--active"),onClick:n=>{n.stopPropagation(),re(e,t)},type:"button",children:typeof e.filterIcon=="function"?e.filterIcon(g):e.filterIcon??i.jsx(me,{className:"bj-table__filter-icon",type:"icon-a-shaixuanxi"})}),C&&fe&&typeof document<"u"&&Kt.createPortal(i.jsx("div",{className:"bj-table__filter-dropdown",onClick:n=>n.stopPropagation(),role:"dialog",style:{left:fe.left,top:fe.top},children:V??i.jsx(It.BDropdown,{...e.filterDropdownProps,emptyText:(W==null?void 0:W.filterEmptyText)??$("暂无筛选项"),multiple:e.filterMultiple!==!1,onChange:(n,y)=>{var F,Qe;J(St=>new Map(St).set(s,n)),(Qe=(F=e.filterDropdownProps)==null?void 0:F.onChange)==null||Qe.call(F,n,y)},onConfirm:n=>{var y,F;ge(e,t,n),(F=(y=e.filterDropdownProps)==null?void 0:y.onConfirm)==null||F.call(y,n)},onReset:()=>{var n,y;xt(e,t),(y=(n=e.filterDropdownProps)==null?void 0:n.onReset)==null||y.call(n)},onSearch:n=>{var y,F;Ke(n),(F=(y=e.filterDropdownProps)==null?void 0:y.onSearch)==null||F.call(y,n)},options:x.map(n=>({label:n.text,value:n.value})),searchable:((w=e.filterDropdownProps)==null?void 0:w.searchable)??q,searchPlaceholder:((Je=e.filterDropdownProps)==null?void 0:Je.searchPlaceholder)??(e.filterRequest?$("请输入搜索内容"):(W==null?void 0:W.filterSearchPlaceholder)??$("搜索")),searchValue:ue,value:l})}),document.body)]})]});return e.badge!==void 0?i.jsxs(Tt,{className:"bj-table__column-tooltip-wrapper",children:[i.jsx("div",{className:"bj-table__column-tooltip-trigger",children:N}),ht===s&&i.jsx(Bt,{className:"bj-table__column-tooltip",content:e.badge,getAnchorElement:()=>document.getElementById(d),getPopupContainer:()=>document.body,placement:"top"})]}):N},Ie=(e,t,s)=>{var f,l;t.selectedRowKeys===void 0&&Ee(e);const d=new Set(e),c=u.filter((C,g)=>d.has(H(C,g,j)));(f=t.onChange)==null||f.call(t,e,c),s&&((l=t.onSelect)==null||l.call(t,s,d.has(H(s,u.indexOf(s),j)),c))},mt=(e,t)=>{if(!r)return;const s=H(e,t,j),d=D.includes(s),c=r.type==="radio"?d?[]:[s]:d?D.filter(f=>f!==s):[...D,s];Ie(c,r,e)},Ve=z.filter(({record:e})=>{var t;return!((t=r==null?void 0:r.getCheckboxProps)!=null&&t.call(r,e).disabled)}),Z=Ve.map(({record:e,index:t})=>H(e,t,j)),ye=Z.length>0&&Z.every(e=>D.includes(e)),Nt=()=>{var s;if(!r||r.type==="radio")return;const e=new Set(Z),t=ye?D.filter(d=>!e.has(d)):Array.from(new Set([...D,...Z]));Ie(t,r),new Set(t),(s=r.onSelectAll)==null||s.call(r,!ye,Ve.map(({record:d})=>d))},Ct=e=>{var t;!a||e<1||e>Te||e===S||(a.current===void 0&&te(e),(t=a.onChange)==null||t.call(a,e,B),je("paginate",R,O,e))},Ft=e=>{var s,d;if(!a||e===B)return;const t=Math.min(S,Ze(_e,e));a.pageSize===void 0&&ct(e),a.current===void 0&&te(t),(s=a.onShowSizeChange)==null||s.call(a,t,e),(d=a.onChange)==null||d.call(a,t,e)},Dt=m.length+(r?1:0),X=(r==null?void 0:r.columnWidth)??48,we=e=>typeof e.width=="number"?e.width:0,Le=(e,t)=>{const s=e.fixed===!0?"left":e.fixed;return s==="left"?{position:"sticky",left:m.slice(0,t).reduce((c,f)=>c+we(f),r&&typeof X=="number"?X:0),zIndex:2}:s==="right"?{position:"sticky",right:m.slice(t+1).reduce((c,f)=>c+we(f),0),zIndex:2}:{}},Rt=o!=null&&o.x?{width:o.x===!0?"max-content":o.x,minWidth:"100%",tableLayout:Pe??"fixed"}:{tableLayout:Pe},Pt=(v==null?void 0:v.table)??"table",kt=((Ue=v==null?void 0:v.header)==null?void 0:Ue.wrapper)??"thead",Ot=(($e=v==null?void 0:v.header)==null?void 0:$e.row)??"tr",Ae=((Ge=v==null?void 0:v.header)==null?void 0:Ge.cell)??"th",K=typeof(v==null?void 0:v.body)=="object"?v.body:void 0,Et=(K==null?void 0:K.wrapper)??"tbody",He=(K==null?void 0:K.row)??"tr",xe=(K==null?void 0:K.cell)??"td",Mt=typeof ae=="function"?ae():ae??$("暂无数据"),We=typeof le=="string"?i.jsx("img",{alt:"",className:"bj-table__empty-image",src:le}):le;return i.jsxs("div",{id:it,ref:Y,className:E("bj-table",Ye&&"bj-table--bordered",`bj-table--${et}`,U&&"bj-table--loading",T.length===0&&"bj-table--empty",rt),style:at,children:[Fe&&i.jsx("div",{className:"bj-table__title",children:Fe(T)}),i.jsxs("div",{className:"bj-table__viewport",children:[i.jsx("div",{className:E("bj-table__scroll",!!(o!=null&&o.x||o!=null&&o.y)&&"bj-overlay-scrollbar-hidden"),ref:ke,style:{maxHeight:o==null?void 0:o.y},children:i.jsxs(Pt,{className:"bj-table__native-table",style:Rt,children:[m.some(e=>e.width)&&i.jsxs("colgroup",{children:[r&&i.jsx("col",{className:"bj-table__selection-col",style:{width:X}}),m.map((e,t)=>i.jsx("col",{style:{width:e.width}},e.key??t))]}),tt&&i.jsx(kt,{className:"bj-table__header",children:Oe.map((e,t)=>i.jsxs(Ot,{className:"bj-table__header-row",...ce==null?void 0:ce(m,t),children:[r&&t===0&&i.jsxs(Ae,{className:E("bj-table__header-cell","bj-table__selection-cell",!!(o!=null&&o.x)&&"bj-table__selection-cell--fixed"),rowSpan:Oe.length,scope:"col",style:{width:X},children:[r.type!=="radio"&&i.jsx(Xe,{checked:ye,disabled:Z.length===0,onChange:Nt,label:"选择当前页所有行"}),r.columnTitle]}),e.map(({column:s,colSpan:d,rowSpan:c},f)=>{var P;const l=s,C=m.indexOf(l),g=C>=0?C:f,h=!("children"in s)&&!!(l.filters||l.filterDropdown),I=!("children"in s)&&!!l.sorter,V=()=>{h?re(l,g):I&&yt(l,g)};return b.createElement(Ae,{...(P=l.onHeaderCell)==null?void 0:P.call(l,s,f),"aria-label":typeof l.title=="string"?l.title:void 0,"aria-sort":I?R.get(_.getColumnKey(l,g))==="ascend"?"ascending":R.get(_.getColumnKey(l,g))==="descend"?"descending":"none":void 0,className:E("bj-table__header-cell",l.fixed&&"bj-table__cell--fixed",(l.fixed==="left"||l.fixed===!0)&&"bj-table__cell--fixed-left",l.fixed==="right"&&"bj-table__cell--fixed-right",l.sorter&&"bj-table__header-cell--sortable",h&&"bj-table__header-cell--filterable",R.get(_.getColumnKey(l,g))&&"bj-table__header-cell--sorted",l.className),colSpan:d,key:l.key??String(l.dataIndex??f),onClick:x=>{var q,N,w;(w=(N=(q=l.onHeaderCell)==null?void 0:q.call(l,s,f))==null?void 0:N.onClick)==null||w.call(N,x),!x.target.closest(".bj-table__filter-dropdown")&&(h?re(l,g,x.currentTarget):V())},onKeyDown:x=>{var q,N,w;(w=(N=(q=l.onHeaderCell)==null?void 0:q.call(l,s,f))==null?void 0:N.onKeyDown)==null||w.call(N,x),!x.target.closest(".bj-table__filter-dropdown")&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),h?re(l,g,x.currentTarget):V())},rowSpan:c,scope:"col",style:{textAlign:l.align,...Le(l,g)},tabIndex:h||I?0:void 0},"children"in s?_.renderColumnTitle(s.title,{filters:Object.fromEntries(O)}):vt(l,g))})]},t))}),i.jsx(Et,{className:"bj-table__body",children:z.length>0?z.map(({record:e,index:t})=>{var l;const s=H(e,t,j),d=((l=r==null?void 0:r.getCheckboxProps)==null?void 0:l.call(r,e).disabled)??!1,c=D.includes(s),f=typeof ie=="function"?ie(e,t,0):ie;return b.createElement(He,{...de==null?void 0:de(e,t),className:E("bj-table__row",c&&"bj-table__row--selected",f),key:s},r&&i.jsx(xe,{className:E("bj-table__cell","bj-table__selection-cell",!!(o!=null&&o.x)&&"bj-table__selection-cell--fixed"),style:{width:X},children:i.jsx(Xe,{checked:c,disabled:d,label:`选择第 ${t+1} 行`,name:r.type==="radio"?"bj-table-row-selection":void 0,onChange:()=>mt(e,t),type:r.type??"checkbox"})}),m.map((C,g)=>{var N;const h=C,I=Ut(e,h.dataIndex),V=h.render?h.render(I,e,t):I,P=$t(V)?V:void 0,x={...(N=h.onCell)==null?void 0:N.call(h,e,t),...P==null?void 0:P.props},q=P?P.children:V;return x.colSpan===0||x.rowSpan===0?null:b.createElement(xe,{...x,className:E("bj-table__cell",h.fixed&&"bj-table__cell--fixed",(h.fixed==="left"||h.fixed===!0)&&"bj-table__cell--fixed-left",h.fixed==="right"&&"bj-table__cell--fixed-right",h.ellipsis&&"bj-table__cell--ellipsis",h.className,x.className),key:h.key??String(h.dataIndex??g),style:{textAlign:h.align,...Le(h,g),...x.style}},i.jsx("div",{className:"bj-table__cell-content",children:q??""}))}))}):i.jsx(He,{className:"bj-table__empty-row",children:i.jsx(xe,{className:"bj-table__empty-cell",colSpan:Math.max(Dt,1),style:{height:st}})})}),Re&&i.jsx("tfoot",{className:"bj-table__summary",children:Re(T)})]})}),z.length===0&&i.jsx("div",{className:"bj-table__empty-overlay",children:i.jsxs("div",{className:"bj-table__empty-content",children:[We&&i.jsx("div",{className:"bj-table__empty-image-wrap",children:We}),i.jsx("div",{className:"bj-table__empty-text",children:Mt})]})})]}),((o==null?void 0:o.x)||(o==null?void 0:o.y))&&i.jsx(Vt,{containerRef:Y,direction:o!=null&&o.x&&(o!=null&&o.y)?"both":o!=null&&o.x?"horizontal":"vertical",gap:2,horizontalInsetEnd:0,horizontalInsetStart:0,size:4,targetRef:ke}),De&&i.jsx("div",{className:"bj-table__footer",children:De(T)}),U&&i.jsxs("div",{"aria-live":"polite","aria-busy":"true",className:"bj-table__loading",role:"status",children:[i.jsx("img",{alt:"",className:"bj-table__loading-indicator",src:wt}),i.jsx("span",{className:"bj-table__loading-text",children:"加载中..."})]}),a&&i.jsx("div",{className:"bj-table__pagination",children:i.jsx(qt,{align:"end",disabled:a.disabled,current:S,defaultCurrent:a.defaultCurrent,defaultPageSize:a.defaultPageSize,dropdownClassName:a.dropdownClassName,hideOnSinglePage:a.hideOnSinglePage,onChange:Ct,onShowSizeChange:(e,t)=>Ft(t),pageSize:B,pageSizeOptions:a.pageSizeOptions,popupPlacement:a.popupPlacement,resolvePopupPlacement:a.resolvePopupPlacement,showQuickJumper:a.showQuickJumper,showSizeChanger:a.showSizeChanger,showTotal:a.showTotal,simple:a.simple,size:a.size,t:a.t??$,total:_e})})]})}const Ne=Jt;Ne.Column=At;Ne.ColumnGroup=Ht;exports.BTable=Ne;
|