bj-web-components 0.2.20 → 0.2.22

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.
@@ -1,5 +1,5 @@
1
- import { jsxs as P, jsx as f } from "react/jsx-runtime";
2
- import { useRef as ne, useMemo as Q, useState as k, useEffect as Y, createElement as Ke, isValidElement as Zt } from "react";
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 ar from "../OverlayScrollbar/BOverlayScrollbar.mjs";
12
- import ir from "../SkuInputCard/spin_loading_red.gif.mjs";
13
- import sr from "../ProductField/no_data_light.png.mjs";
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 I(...u) {
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, n) => {
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[n];
26
+ return F[l];
27
27
  }, u);
28
28
  }
29
- function G(u, o, _) {
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: n,
54
- type: L = "checkbox"
53
+ onChange: l,
54
+ type: A = "checkbox"
55
55
  }) {
56
- return L === "checkbox" ? /* @__PURE__ */ f(
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: n,
64
+ onChange: l,
65
65
  skipGroup: !0
66
66
  }
67
- ) : /* @__PURE__ */ P("label", { className: I("bj-table__selection-control", u && "bj-table__selection-control--checked", o && "bj-table__selection-control--disabled"), children: [
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: n,
77
- type: L
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: n,
89
- pagination: L = !1,
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: Z = (le) => le,
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: g,
108
+ components: x,
109
109
  onRow: me,
110
110
  onHeaderRow: ve,
111
111
  id: vt,
112
112
  scroll: b,
113
- locale: X,
113
+ locale: Y,
114
114
  groupCollapse: h
115
115
  }) {
116
- var it, st, nt;
117
- const le = ne(null), Ve = ne(null), de = Q(
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
- ), C = Q(() => br(de), [de]), we = Q(() => hr(de), [de]), [gt, Ge] = k(
121
- (n == null ? void 0 : n.defaultSelectedRowKeys) ?? []
122
- ), [ge, ce] = k(
123
- L ? L.defaultCurrent ?? 1 : 1
124
- ), [Nt, xt] = k(
125
- L ? L.defaultPageSize ?? 10 : 10
126
- ), [Ft, Dt] = k(
127
- () => new Map(C.flatMap((e, t) => e.defaultSortOrder ? [[E(e, t), e.defaultSortOrder]] : []))
128
- ), [kt, Pt] = k(
129
- () => new Map(C.flatMap((e, t) => e.defaultFilteredValue === void 0 ? [] : [[E(e, t), e.defaultFilteredValue]]))
130
- ), [Rt, Ot] = k(
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
- ), [S, U] = k(null), [Le, ee] = k(/* @__PURE__ */ new Map()), [Et, fe] = k(null), Kt = ne(`btable-${Math.random().toString(36).slice(2, 10)}`).current, [W, Ne] = k(null), [xe, Ae] = k(null), [Fe, qe] = k(""), [te, He] = k(""), [Bt, De] = k(), ke = ne(0), Pe = ne(!1), a = L || void 0, A = (a == null ? void 0 : a.pageSize) ?? Nt, K = (n == null ? void 0 : n.selectedRowKeys) ?? gt, N = C, R = new Map(Ft), B = new Map(kt);
133
- N.forEach((e, t) => {
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 && R.set(r, e.sortOrder), e.filteredValue !== void 0 && B.set(r, e.filteredValue);
136
+ e.sortOrder !== void 0 && P.set(r, e.sortOrder), e.filteredValue !== void 0 && B.set(r, e.filteredValue);
137
137
  });
138
- const Ue = Q(
139
- () => dt(o, N, B),
140
- [N, B, o]
141
- ), z = Q(
142
- () => ct(Ue, N, R),
143
- [N, Ue, R]
144
- ), We = (a == null ? void 0 : a.total) ?? z.length, $e = _r(We, A), q = Math.min((a == null ? void 0 : a.current) ?? ge, $e), $ = (h == null ? void 0 : h.expandedKeys) ?? Rt, re = (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) => {
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 = $.includes(r), l = s ? $.filter((i) => i !== r) : [...$, r];
147
- (h == null ? void 0 : h.expandedKeys) === void 0 && Ot(l), (c = h == null ? void 0 : h.onExpandedKeysChange) == null || c.call(h, l, e, !s);
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
- Y(() => {
150
- q !== ge && (a == null ? void 0 : a.current) === void 0 && ce(q);
151
- }, [q, a == null ? void 0 : a.current, ge]), Y(() => {
152
- if (!W || S === null) {
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 = W.getBoundingClientRect();
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
- }, [W, S]), Y(() => {
164
- if (S === null) return;
163
+ }, [$, V]), C(() => {
164
+ if (V === null) return;
165
165
  const e = (t) => {
166
166
  const r = t.target;
167
- W != null && W.contains(r) || r.closest(".bj-table__filter-dropdown") || (U(null), Ne(null));
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
- }, [W, S]), Y(() => {
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]), Y(() => {
177
- if (S === null) return;
178
- const e = C.find((r, s) => E(r, s) === S);
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(te)).then(
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
- }, [te, C, S]);
190
- const H = Q(() => {
191
- if (!a || a.serverPagination)
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 || re(t, r)) return !0;
194
- const s = G(t, r, _);
193
+ if (!h || ie(t, r)) return !0;
194
+ const s = L(t, r, _);
195
195
  return z.some(
196
- (l, c) => re(l, c) && $.includes(be(l, c)) && Je(l, c).includes(s)
196
+ (d, c) => ie(d, c) && J.includes(be(d, c)) && Je(d, c).includes(s)
197
197
  );
198
198
  });
199
- const e = (q - 1) * A;
200
- return z.slice(e, e + A).map((t, r) => ({
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 || re(t, r)) return !0;
205
- const s = G(t, r, _);
204
+ if (!h || ie(t, r)) return !0;
205
+ const s = L(t, r, _);
206
206
  return z.some(
207
- (l, c) => re(l, c) && $.includes(be(l, c)) && Je(l, c).includes(s)
207
+ (d, c) => ie(d, c) && J.includes(be(d, c)) && Je(d, c).includes(s)
208
208
  );
209
209
  });
210
- }, [q, $, h, A, a, z, _]), Qe = Q(
211
- () => H.map(({ record: e, index: t }) => G(e, t, _)),
212
- [_, H]
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
- Y(() => {
215
- var l;
216
- if (!n || F || K.length === 0) return;
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
- n.selectedRowKeys === void 0 && Ge(t);
220
- const r = new Set(t), s = H.filter(({ record: c, index: i }) => r.has(G(c, i, _))).map(({ record: c }) => c);
221
- (l = n.onChange) == null || l.call(n, t, s, { type: "multiple" });
222
- }, [F, n, _, Mt, Tt, H]);
223
- const he = (e, t = R, r = B, s = q, l = A) => {
224
- const c = Object.fromEntries(r), i = dt(o, N, r), v = ct(i, N, t);
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
- { ...a, current: s, pageSize: l, total: (a == null ? void 0 : a.total) ?? v.length },
226
+ { ...i, current: s, pageSize: d, total: (i == null ? void 0 : i.total) ?? g.length },
227
227
  c,
228
- cr(N, t),
229
- { action: e, currentDataSource: v }
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(R.get(r) ?? null, e.sortDirections ?? mt), l = /* @__PURE__ */ new Map();
234
- l.set(r, s), e.sortOrder === void 0 && Dt(l), he("sort", l);
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), l = new Map(B);
237
- l.set(s, r), e.filteredValue === void 0 && Pt(l), U(null), (a == null ? void 0 : a.current) === void 0 && ce(1), he("filter", R, l, 1);
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
- ee((l) => new Map(l).set(r, s));
240
+ te((d) => new Map(d).set(r, s));
241
241
  }, oe = (e, t, r) => {
242
- var l, c, i, v;
242
+ var d, c, a, g;
243
243
  const s = E(e, t);
244
- if (S === s) {
245
- U(null), Ne(null), (l = e.onFilterDropdownOpenChange) == null || l.call(e, !1), (c = e.onFilterDropdownVisibleChange) == null || c.call(e, !1);
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), ee((p) => new Map(p).set(s, B.get(s) ?? [])), U(s), r && Ne(r), (i = e.onFilterDropdownOpenChange) == null || i.call(e, !0), (v = e.onFilterDropdownVisibleChange) == null || v.call(e, !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 T, se;
251
- const r = E(e, t), s = `bj-table-badge-${Kt}-${String(r).replace(/[^a-zA-Z0-9_-]/g, "-")}`, l = R.get(r) ?? null, c = B.get(r) ?? [], i = Le.get(r) ?? c, v = e.filterDropdownOpen ?? e.filterDropdownVisible ?? S === r, p = e.filtered || c.length > 0, M = l === "ascend" ? "icon-a-zhengxumian" : l === "descend" ? "icon-a-daoxumian" : "icon-a-weipaixumian", y = ft(e.title, {
252
- sortOrder: l,
253
- sortColumn: l ? e : void 0,
254
- sortColumns: l ? [{ column: e, order: l }] : [],
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
- }), J = typeof e.filterDropdown == "function" ? e.filterDropdown({
256
+ }), Q = typeof e.filterDropdown == "function" ? e.filterDropdown({
257
257
  prefixCls: "bj-table",
258
- selectedKeys: i.filter((d) => typeof d != "boolean"),
259
- setSelectedKeys: (d) => ee((j) => new Map(j).set(r, d)),
260
- confirm: (d) => {
261
- Re(e, t, Le.get(r) ?? i), (d == null ? void 0 : d.closeDropdown) === !1 && U(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: (d) => {
264
- const j = e.filterResetToDefaultFilteredValue ? e.defaultFilteredValue ?? [] : [];
265
- ee((O) => new Map(O).set(r, j)), (d == null ? void 0 : d.confirm) === !0 && Re(e, t, j), ((d == null ? void 0 : d.closeDropdown) === !1 || (d == null ? void 0 : d.confirm) !== !0) && U(r);
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: () => U(null),
269
- visible: v
270
- }) : e.filterDropdown, w = e.filterRequest ? Bt ?? [] : e.filters ?? [], m = te && !e.filterRequest ? w.filter((d) => typeof e.filterSearch == "function" ? e.filterSearch(te, d) : jr(te, d)) : w, D = !!(e.filterSearch || e.filterRequest), x = /* @__PURE__ */ P("div", { className: I("bj-table__column-header", e.sorter && "bj-table__column-header--sortable"), children: [
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: (d) => d.stopPropagation(),
278
+ onClick: (n) => n.stopPropagation(),
279
279
  onFocus: () => fe(r),
280
- onKeyDown: (d) => d.stopPropagation(),
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__ */ P("div", { className: "bj-table__column-title", children: [
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: M }) })
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__ */ P("div", { className: "bj-table__filter", children: [
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": v,
296
+ "aria-expanded": g,
297
297
  "aria-label": "筛选",
298
- className: I("bj-table__filter-trigger", p && "bj-table__filter-trigger--active"),
299
- onClick: (d) => {
300
- d.stopPropagation(), oe(e, t);
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(p) : e.filterIcon ?? /* @__PURE__ */ f(Be, { className: "bj-table__filter-icon", type: "icon-a-shaixuanxi" })
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
- v && xe && typeof document < "u" && Xt(
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: (d) => d.stopPropagation(),
311
+ onClick: (n) => n.stopPropagation(),
312
312
  role: "dialog",
313
- style: { left: xe.left, top: xe.top },
314
- children: J ?? /* @__PURE__ */ f(
313
+ style: { left: Ne.left, top: Ne.top },
314
+ children: Q ?? /* @__PURE__ */ f(
315
315
  rr,
316
316
  {
317
317
  ...e.filterDropdownProps,
318
- emptyText: (X == null ? void 0 : X.filterEmptyText) ?? Z("暂无结果"),
318
+ emptyText: (Y == null ? void 0 : Y.filterEmptyText) ?? X("暂无结果"),
319
319
  multiple: e.filterMultiple !== !1,
320
- onChange: (d, j) => {
320
+ onChange: (n, m) => {
321
321
  var O, lt;
322
- ee((Qt) => new Map(Qt).set(r, d)), (lt = (O = e.filterDropdownProps) == null ? void 0 : O.onChange) == null || lt.call(O, d, j);
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: (d) => {
325
- var j, O;
326
- Re(e, t, d), (O = (j = e.filterDropdownProps) == null ? void 0 : j.onConfirm) == null || O.call(j, d);
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 d, j;
330
- St(e, t), (j = (d = e.filterDropdownProps) == null ? void 0 : d.onReset) == null || j.call(d);
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: (d) => {
333
- var j, O;
334
- qe(d), (O = (j = e.filterDropdownProps) == null ? void 0 : j.onSearch) == null || O.call(j, d);
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: m.map((d) => ({
337
- label: d.text,
338
- description: d.description,
339
- value: d.value
336
+ options: I.map((n) => ({
337
+ label: n.text,
338
+ description: n.description,
339
+ value: n.value
340
340
  })),
341
- searchable: ((T = e.filterDropdownProps) == null ? void 0 : T.searchable) ?? D,
342
- searchPlaceholder: ((se = e.filterDropdownProps) == null ? void 0 : se.searchPlaceholder) ?? (e.filterRequest ? Z("请输入搜索内容") : (X == null ? void 0 : X.filterSearchPlaceholder) ?? Z("搜索")),
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: Z,
345
- value: i
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__ */ P(
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: x }),
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
- ) : x;
372
+ ) : M;
373
373
  }, Ze = (e, t, r) => {
374
- var c, i;
374
+ var c, a;
375
375
  t.selectedRowKeys === void 0 && Ge(e);
376
- const s = new Set(e), l = o.filter(
377
- (v, p) => s.has(G(v, p, _))
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, l), r && ((i = t.onSelect) == null || i.call(
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(G(r, o.indexOf(r), _)),
383
- l
382
+ s.has(L(r, o.indexOf(r), _)),
383
+ d
384
384
  ));
385
385
  }, wt = (e, t) => {
386
- if (!n)
386
+ if (!l)
387
387
  return;
388
- const r = G(e, t, _), s = K.includes(r), l = n.type === "radio" ? s ? [] : [r] : s ? K.filter((c) => c !== r) : [...K, r];
389
- Ze(l, n, e);
390
- }, Xe = H.filter(
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 = n == null ? void 0 : n.getCheckboxProps) != null && t.call(n, e).disabled);
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 }) => G(e, 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 (!n || n.type === "radio")
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, n), new Set(t), (r = n.onSelectAll) == null || r.call(
403
- n,
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
- !a || e < 1 || e > $e || e === q || (a.current === void 0 && ce(e), (t = a.onChange) == null || t.call(a, e, A), he("paginate", R, B, e));
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 (!a || e === A)
412
+ if (!i || e === q)
413
413
  return;
414
414
  const t = 1;
415
- Pe.current = !0, a.pageSize === void 0 && xt(e), a.current === void 0 && ce(t), (r = a.onShowSizeChange) == null || r.call(a, t, e), (s = a.onChange) == null || s.call(a, t, e), he("paginate", R, B, t, e);
416
- }, Ye = N.length + (n ? 1 : 0), ie = (n == null ? void 0 : n.columnWidth) ?? 48, Ce = (e) => typeof e.width == "number" ? e.width : 0, et = (e, t) => {
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: N.slice(0, t).reduce((l, c) => l + Ce(c), n && typeof ie == "number" ? ie : 0), zIndex: 2 } : r === "right" ? { position: "sticky", right: N.slice(t + 1).reduce((l, c) => l + Ce(c), 0), zIndex: 2 } : {};
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 = (g == null ? void 0 : g.table) ?? "table", Ut = ((it = g == null ? void 0 : g.header) == null ? void 0 : it.wrapper) ?? "thead", Wt = ((st = g == null ? void 0 : g.header) == null ? void 0 : st.row) ?? "tr", tt = ((nt = g == null ? void 0 : g.header) == null ? void 0 : nt.cell) ?? "th", V = typeof (g == null ? void 0 : g.body) == "object" ? g.body : void 0, $t = (V == null ? void 0 : V.wrapper) ?? "tbody", rt = (V == null ? void 0 : V.row) ?? "tr", Ee = (V == null ? void 0 : V.cell) ?? "td", Jt = typeof _e == "function" ? _e() : _e ?? Z("暂无数据"), at = typeof ye == "string" ? /* @__PURE__ */ f("img", { alt: "", className: "bj-table__empty-image", src: ye }) : ye;
424
- return /* @__PURE__ */ P(
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: I(
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__ */ P("div", { className: "bj-table__viewport", children: [
440
+ /* @__PURE__ */ k("div", { className: "bj-table__viewport", children: [
441
441
  /* @__PURE__ */ f(
442
442
  "div",
443
443
  {
444
- className: I("bj-table__scroll", !!(b != null && b.x || b != null && b.y) && "bj-overlay-scrollbar-hidden"),
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__ */ P(Ht, { className: "bj-table__native-table", style: qt, children: [
448
- N.some((e) => e.width) && /* @__PURE__ */ P("colgroup", { children: [
449
- n && /* @__PURE__ */ f("col", { className: "bj-table__selection-col", style: { width: ie } }),
450
- N.map((e, t) => /* @__PURE__ */ f("col", { style: { width: e.width } }, e.key ?? t))
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__ */ P(Wt, { className: "bj-table__header-row", ...ve == null ? void 0 : ve(N, t), children: [
453
- n && t === 0 && /* @__PURE__ */ P(
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: I("bj-table__header-cell", "bj-table__selection-cell", !!(b != null && b.x) && "bj-table__selection-cell--fixed"),
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: ie },
459
+ style: { width: se },
460
460
  children: [
461
- n.type !== "radio" && /* @__PURE__ */ f(
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
- n.columnTitle
470
+ l.columnTitle
471
471
  ]
472
472
  }
473
473
  ),
474
- e.map(({ column: r, colSpan: s, rowSpan: l }, c) => {
475
- var w;
476
- const i = r, v = N.indexOf(i), p = v >= 0 ? v : c, M = !("children" in r) && !!(i.filters || i.filterDropdown), y = !("children" in r) && !!i.sorter, J = () => {
477
- M ? oe(i, p) : y && It(i, p);
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
- ...(w = i.onHeaderCell) == null ? void 0 : w.call(i, r, c),
483
- "aria-label": typeof i.title == "string" ? i.title : void 0,
484
- "aria-sort": y ? R.get(E(i, p)) === "ascend" ? "ascending" : R.get(E(i, p)) === "descend" ? "descending" : "none" : void 0,
485
- className: I(
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
- i.fixed && "bj-table__cell--fixed",
488
- (i.fixed === "left" || i.fixed === !0) && "bj-table__cell--fixed-left",
489
- i.fixed === "right" && "bj-table__cell--fixed-right",
490
- i.sorter && "bj-table__header-cell--sortable",
491
- M && "bj-table__header-cell--filterable",
492
- R.get(E(i, p)) && "bj-table__header-cell--sorted",
493
- i.className
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: i.key ?? String(i.dataIndex ?? c),
497
- onClick: (m) => {
498
- var D, x, T;
499
- (T = (x = (D = i.onHeaderCell) == null ? void 0 : D.call(i, r, c)) == null ? void 0 : x.onClick) == null || T.call(x, m), !m.target.closest(".bj-table__filter-dropdown") && (M ? oe(i, p, m.currentTarget) : J());
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: (m) => {
502
- var D, x, T;
503
- (T = (x = (D = i.onHeaderCell) == null ? void 0 : D.call(i, r, c)) == null ? void 0 : x.onKeyDown) == null || T.call(x, m), !m.target.closest(".bj-table__filter-dropdown") && (m.key === "Enter" || m.key === " ") && (m.preventDefault(), M ? oe(i, p, m.currentTarget) : J());
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: l,
506
+ rowSpan: d,
506
507
  scope: "col",
507
- style: { textAlign: i.align, ...et(i, p) },
508
- tabIndex: M || y ? 0 : void 0
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(i, p)
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: H.length > 0 ? H.map(({ record: e, index: t }) => {
515
- var v;
516
- const r = G(e, t, _), s = re(e, t), l = ((v = n == null ? void 0 : n.getCheckboxProps) == null ? void 0 : v.call(n, e).disabled) ?? !1, c = K.includes(r), i = typeof je == "function" ? je(e, t, 0) : je;
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: I("bj-table__row", s && "bj-table__row--group", c && "bj-table__row--selected", i),
522
+ className: S("bj-table__row", s && "bj-table__row--group", c && "bj-table__row--selected", a),
522
523
  key: r
523
524
  },
524
- n && !s && /* @__PURE__ */ f(
525
+ l && !s && /* @__PURE__ */ f(
525
526
  Ee,
526
527
  {
527
- className: I("bj-table__cell", "bj-table__selection-cell", !!(b != null && b.x) && "bj-table__selection-cell--fixed"),
528
- style: { width: ie },
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: l,
534
+ disabled: d,
534
535
  label: `选择第 ${t + 1} 行`,
535
- name: n.type === "radio" ? "bj-table-row-selection" : void 0,
536
+ name: l.type === "radio" ? "bj-table-row-selection" : void 0,
536
537
  onChange: () => wt(e, t),
537
- type: n.type ?? "checkbox"
538
+ type: l.type ?? "checkbox"
538
539
  }
539
540
  )
540
541
  }
541
542
  ),
542
- N.map((p, M) => {
543
- var T, se;
544
- if (s && M > 0) return null;
545
- const y = p, J = ur(e, y.dataIndex), w = y.render ? y.render(J, e, t) : J, m = yr(w) ? w : void 0, D = { ...(T = y.onCell) == null ? void 0 : T.call(y, e, t), ...m == null ? void 0 : m.props }, x = m ? m.children : w;
546
- return D.colSpan === 0 || D.rowSpan === 0 ? null : /* @__PURE__ */ Ke(
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
- ...D,
550
- className: I(
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
- D.className
560
+ p.className
559
561
  ),
560
- key: y.key ?? String(y.dataIndex ?? M),
561
- colSpan: s ? Ye : D.colSpan,
562
- style: { textAlign: y.align, ...et(y, M), ...D.style }
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 ? ((se = h == null ? void 0 : h.render) == null ? void 0 : se.call(h, {
566
+ s ? ((n = h == null ? void 0 : h.render) == null ? void 0 : n.call(h, {
565
567
  record: e,
566
- expanded: $.includes(be(e, t)),
568
+ expanded: J.includes(be(e, t)),
567
569
  onToggle: () => zt(e, t)
568
- })) ?? x ?? "" : /* @__PURE__ */ f("div", { className: "bj-table__cell-content", children: x ?? "" })
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
- H.length === 0 && /* @__PURE__ */ f("div", { className: "bj-table__empty-overlay", children: /* @__PURE__ */ P("div", { className: "bj-table__empty-content", children: [
585
- at && /* @__PURE__ */ f("div", { className: "bj-table__empty-image-wrap", children: at }),
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
- ar,
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__ */ P("div", { "aria-live": "polite", "aria-busy": "true", className: "bj-table__loading", role: "status", children: [
603
- /* @__PURE__ */ f("img", { alt: "", className: "bj-table__loading-indicator", src: ir }),
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
- a && z.length > 0 && /* @__PURE__ */ f("div", { className: "bj-table__pagination", children: /* @__PURE__ */ f(
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 || a.disabled,
611
- current: q,
612
- defaultCurrent: a.defaultCurrent,
613
- defaultPageSize: a.defaultPageSize,
614
- dropdownClassName: a.dropdownClassName,
615
- hideOnSinglePage: a.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: A,
625
- pageSizeOptions: a.pageSizeOptions,
626
- popupPlacement: a.popupPlacement,
627
- resolvePopupPlacement: a.resolvePopupPlacement,
628
- showQuickJumper: a.showQuickJumper,
629
- showSizeChanger: a.showSizeChanger,
630
- showTotal: a.showTotal,
631
- simple: a.simple,
632
- size: a.size,
633
- t: a.t ?? Z,
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
  ) })