bj-web-components 0.2.16 → 0.2.17

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