bitz-react-admin-ui 2.3.1 → 2.3.2

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 (58) hide show
  1. package/dist/_virtual/_commonjsHelpers.mjs +4 -26
  2. package/dist/_virtual/index.mjs +2 -2
  3. package/dist/_virtual/index2.mjs +2 -2
  4. package/dist/components/BitzConfigProvider/context.d.ts +1 -0
  5. package/dist/components/BitzConfigProvider/context.mjs +4 -3
  6. package/dist/components/BitzHighlight/style.mjs +12 -12
  7. package/dist/components/BitzTable/ActionBar/style.mjs +21 -21
  8. package/dist/components/BitzTable/ActionCol/index.mjs +59 -58
  9. package/dist/components/BitzTable/ActionCol/style.d.ts +1 -1
  10. package/dist/components/BitzTable/ActionCol/style.mjs +28 -28
  11. package/dist/components/BitzTable/Dropdown/style.mjs +25 -25
  12. package/dist/components/BitzTable/SelectionBar/style.mjs +24 -24
  13. package/dist/components/BitzTable/Store/index.mjs +37 -37
  14. package/dist/components/BitzTable/SubTable/index.mjs +94 -94
  15. package/dist/components/BitzTable/Table/index.mjs +244 -245
  16. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +51 -47
  17. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +61 -60
  18. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +46 -38
  19. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +44 -44
  20. package/dist/components/BitzTable/ToolBar/style.mjs +21 -21
  21. package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +14 -15
  22. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +14 -15
  23. package/dist/components/BitzTableSelect/TableCell/index.mjs +34 -33
  24. package/dist/components/BitzTableSelect/TextBlock/index.mjs +20 -18
  25. package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
  26. package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +8 -9
  27. package/dist/node_modules/.store/use-sync-external-store@1.2.0/node_modules/use-sync-external-store/shim/index.mjs +1 -1
  28. package/dist/style.css +1 -1
  29. package/package.json +1 -1
  30. package/dist/_virtual/Draggable.mjs +0 -4
  31. package/dist/_virtual/DraggableCore.mjs +0 -4
  32. package/dist/_virtual/Resizable.mjs +0 -4
  33. package/dist/_virtual/ResizableBox.mjs +0 -4
  34. package/dist/_virtual/cjs.mjs +0 -4
  35. package/dist/_virtual/clsx.m.mjs +0 -6
  36. package/dist/_virtual/domFns.mjs +0 -4
  37. package/dist/_virtual/getPrefix.mjs +0 -4
  38. package/dist/_virtual/index6.mjs +0 -4
  39. package/dist/_virtual/log.mjs +0 -4
  40. package/dist/_virtual/positionFns.mjs +0 -4
  41. package/dist/_virtual/propTypes.mjs +0 -4
  42. package/dist/_virtual/shims.mjs +0 -4
  43. package/dist/_virtual/utils.mjs +0 -4
  44. package/dist/components/BitzTable/Table/ResizableTitle.mjs +0 -32
  45. package/dist/node_modules/.store/clsx@1.2.1/node_modules/clsx/dist/clsx.m.mjs +0 -22
  46. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/Draggable.mjs +0 -343
  47. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/DraggableCore.mjs +0 -324
  48. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/cjs.mjs +0 -14
  49. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/domFns.mjs +0 -174
  50. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/getPrefix.mjs +0 -35
  51. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/log.mjs +0 -7
  52. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/positionFns.mjs +0 -107
  53. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/shims.mjs +0 -30
  54. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/Resizable.mjs +0 -201
  55. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/ResizableBox.mjs +0 -162
  56. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/propTypes.mjs +0 -118
  57. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/utils.mjs +0 -54
  58. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/index.mjs +0 -13
@@ -1,6 +1,6 @@
1
1
  import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/extractStyle.mjs";
2
2
  import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.mjs";
3
- import { useContext as C, useMemo as O } from "react";
3
+ import { useContext as R, useMemo as Y } from "react";
4
4
  import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/StyleContext.mjs";
5
5
  import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/theme/createTheme.mjs";
6
6
  import "../../../node_modules/.store/rc-util@5.39.1/node_modules/rc-util/es/warning.mjs";
@@ -8,14 +8,14 @@ import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@an
8
8
  import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.mjs";
9
9
  import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.mjs";
10
10
  import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useHMR.mjs";
11
- import G from "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.mjs";
11
+ import j from "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.mjs";
12
12
  import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/transformers/legacyLogicalProperties.mjs";
13
13
  import n from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
14
- import { BitzTableContext as I } from "../Store/index.mjs";
15
- import R from "../../BitzTheme/index.mjs";
16
- const V = () => {
17
- const { tableSize: a } = C(I), S = O(() => a ?? "lg", [a]), { theme: b, hashId: o, token: i } = R.useToken(), r = "bitzTableSelectionBar", s = "batchOperation", m = "selectionAction", f = "alertContent", l = "show", g = (t, y, B, N, v, e) => {
18
- var p, h, c, $, z;
14
+ import { BitzTableContext as A } from "../Store/index.mjs";
15
+ import D from "../../BitzTheme/index.mjs";
16
+ const _ = () => {
17
+ const { tableSize: a } = R(A), d = Y(() => a ?? "lg", [a]), { theme: T, hashId: o, token: i } = D.useToken(), r = "bitzTableSelectionBar", s = "batchOperation", m = "selectionAction", f = "alertContent", l = "show", x = (t, C, O, G, I, e) => {
18
+ var p, h, c, $, z, S, b, g, u;
19
19
  return [
20
20
  {
21
21
  [`.${t}`]: {
@@ -33,12 +33,12 @@ const V = () => {
33
33
  }
34
34
  },
35
35
  {
36
- [`.${t}.${y}`]: {
36
+ [`.${t}.${C}`]: {
37
37
  transform: "translateY(0%)"
38
38
  }
39
39
  },
40
40
  {
41
- [`.${t} .${B}`]: {
41
+ [`.${t} .${O}`]: {
42
42
  fontSize: "inherit",
43
43
  height: "100%",
44
44
  overflow: "auto hidden",
@@ -48,7 +48,7 @@ const V = () => {
48
48
  }
49
49
  },
50
50
  {
51
- [`.${t} .${v}`]: {
51
+ [`.${t} .${I}`]: {
52
52
  height: "100%",
53
53
  "span, strong": {
54
54
  wordBreak: "keep-all"
@@ -56,7 +56,7 @@ const V = () => {
56
56
  }
57
57
  },
58
58
  {
59
- [`.${t} .${N}`]: {
59
+ [`.${t} .${G}`]: {
60
60
  fontSize: "inherit",
61
61
  color: "#fff",
62
62
  height: "100%",
@@ -78,35 +78,35 @@ const V = () => {
78
78
  },
79
79
  {
80
80
  [`.${t}.lg${t}`]: {
81
- fontSize: (h = e.Table.lgTable) == null ? void 0 : h.fontSize
81
+ fontSize: (c = (h = e.Table) == null ? void 0 : h.lgTable) == null ? void 0 : c.fontSize
82
82
  }
83
83
  },
84
84
  {
85
85
  [`.${t}.md${t}`]: {
86
- fontSize: (c = e.Table.mdTable) == null ? void 0 : c.fontSize
86
+ fontSize: (z = ($ = e.Table) == null ? void 0 : $.mdTable) == null ? void 0 : z.fontSize
87
87
  }
88
88
  },
89
89
  {
90
90
  [`.${t}.sm${t}`]: {
91
- fontSize: ($ = e.Table.smTable) == null ? void 0 : $.fontSize
91
+ fontSize: (b = (S = e.Table) == null ? void 0 : S.smTable) == null ? void 0 : b.fontSize
92
92
  }
93
93
  },
94
94
  {
95
95
  [`.${t}.xs${t}`]: {
96
- fontSize: (z = e.Table.xsTable) == null ? void 0 : z.fontSize
96
+ fontSize: (u = (g = e.Table) == null ? void 0 : g.xsTable) == null ? void 0 : u.fontSize
97
97
  }
98
98
  }
99
99
  ];
100
100
  };
101
- G(
101
+ j(
102
102
  {
103
- theme: b,
103
+ theme: T,
104
104
  token: i,
105
105
  hashId: o,
106
106
  path: [r]
107
107
  },
108
108
  () => [
109
- g(
109
+ x(
110
110
  r,
111
111
  l,
112
112
  s,
@@ -116,15 +116,15 @@ const V = () => {
116
116
  )
117
117
  ]
118
118
  );
119
- const u = `${S}${r}`, d = n(r, u, o), T = n(m, o), x = n(f, o), w = n(s, o);
119
+ const w = `${d}${r}`, y = n(r, w, o), B = n(m, o), N = n(f, o), v = n(s, o);
120
120
  return {
121
- blockClassName: d,
121
+ blockClassName: y,
122
122
  showCls: l,
123
- btnClassName: T,
124
- batchOperationClassName: w,
125
- alertContentClassName: x
123
+ btnClassName: B,
124
+ batchOperationClassName: v,
125
+ alertContentClassName: N
126
126
  };
127
127
  };
128
128
  export {
129
- V as default
129
+ _ as default
130
130
  };
@@ -1,12 +1,12 @@
1
1
  import { j as Te } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
2
  import { Table as ce } from "antd";
3
3
  import V from "../../../hooks/useMergedState.mjs";
4
- import { createContext as Ke, useRef as be, useState as le, useContext as Oe, useEffect as d, useMemo as C, useCallback as v } from "react";
5
- import { genColumnKey as N } from "./utils/index.mjs";
4
+ import { createContext as be, useRef as Ke, useState as le, useContext as Oe, useEffect as d, useMemo as g, useCallback as v } from "react";
5
+ import { genColumnKey as z } from "./utils/index.mjs";
6
6
  import { getUuid as Ve } from "../../../utils/uuid.mjs";
7
7
  import { BitzConfigContext as ve } from "../../BitzConfigProvider/context.mjs";
8
- import g from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
9
- const Ne = {
8
+ import m from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
9
+ const ze = {
10
10
  fixed: "left",
11
11
  className: "sorterCol",
12
12
  isDragSorterCol: !0,
@@ -16,15 +16,15 @@ const Ne = {
16
16
  onCell: () => ({
17
17
  "data-column-name": "dragSorterCell"
18
18
  })
19
- }, ze = [
20
- Ne,
19
+ }, Ne = [
20
+ ze,
21
21
  ce.SELECTION_COLUMN,
22
22
  ce.EXPAND_COLUMN
23
23
  ];
24
24
  function Ee(e) {
25
25
  var M, k, H, R, L, P, U, D, _, G, Z, A, F, X, q, Q, W, Y, $, p, ee, te, ne, ie, ae;
26
- const T = be(Ve()), [fe, re] = le(!1), [se, ue] = le(!1), s = Oe(ve).Table, de = s == null ? void 0 : s.defaultSize, z = e.defaultSize ?? de ?? "lg", ye = e.defaultZebra ?? (s == null ? void 0 : s.zebra) ?? !0, Se = e.defaultBordered ?? (s == null ? void 0 : s.bordered) ?? "row-column", b = e.defaultStylesConfig || {
27
- size: z,
26
+ const T = Ke(Ve()), [fe, re] = le(!1), [se, ue] = le(!1), s = Oe(ve).Table, de = s == null ? void 0 : s.defaultSize, N = e.size ?? e.defaultSize ?? de ?? "lg", ye = e.zebra ?? e.defaultZebra ?? (s == null ? void 0 : s.zebra) ?? !0, Se = e.bordered ?? e.defaultBordered ?? (s == null ? void 0 : s.bordered) ?? "row-column", K = e.defaultStylesConfig || {
27
+ size: N,
28
28
  zebra: ye,
29
29
  bordered: Se
30
30
  }, [y, E] = V(
@@ -36,7 +36,7 @@ function Ee(e) {
36
36
  try {
37
37
  const r = f == null ? void 0 : f.getItem(i);
38
38
  if (r)
39
- return (n = e == null ? void 0 : e.stylesConfigState) != null && n.defaultValue ? g(
39
+ return (n = e == null ? void 0 : e.stylesConfigState) != null && n.defaultValue ? m(
40
40
  JSON.parse(r),
41
41
  (c = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : c.defaultValue
42
42
  ) : JSON.parse(r);
@@ -44,7 +44,7 @@ function Ee(e) {
44
44
  console.warn(r);
45
45
  }
46
46
  }
47
- return e.stylesConfig || ((l = e.stylesConfigState) == null ? void 0 : l.value) || ((a = e.stylesConfigState) == null ? void 0 : a.defaultValue) || b;
47
+ return e.stylesConfig || ((l = e.stylesConfigState) == null ? void 0 : l.value) || ((a = e.stylesConfigState) == null ? void 0 : a.defaultValue) || K;
48
48
  },
49
49
  {
50
50
  value: ((M = e.stylesConfigState) == null ? void 0 : M.value) || e.stylesConfig,
@@ -79,9 +79,9 @@ function Ee(e) {
79
79
  try {
80
80
  (o = n == null ? void 0 : n(c)) == null || o.then((l) => {
81
81
  var f;
82
- const a = g(l ?? {}, (f = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : f.value);
82
+ const a = m(l ?? {}, (f = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : f.value);
83
83
  E(
84
- Object.keys(a).length ? a : b
84
+ Object.keys(a).length ? a : K
85
85
  );
86
86
  });
87
87
  } catch (l) {
@@ -89,7 +89,7 @@ function Ee(e) {
89
89
  }
90
90
  }
91
91
  }, []);
92
- const u = C(() => (e.columns ?? []).filter((t) => !ze.includes(t)), [e.columns]), x = C(() => {
92
+ const u = g(() => (e.columns ?? []).filter((t) => !Ne.includes(t)), [e.columns]), x = g(() => {
93
93
  var i;
94
94
  if ((i = e == null ? void 0 : e.exportConfigState) != null && i.defaultValue)
95
95
  return e.exportConfigState.defaultValue;
@@ -101,7 +101,7 @@ function Ee(e) {
101
101
  }
102
102
  };
103
103
  return u.forEach((o, n) => {
104
- const { title: c, isOperationCol: l } = o, a = N(o, n);
104
+ const { title: c, isOperationCol: l } = o, a = z(o, n);
105
105
  a && !l && t.fields.push({
106
106
  field: a,
107
107
  title: c,
@@ -117,7 +117,7 @@ function Ee(e) {
117
117
  try {
118
118
  const r = f == null ? void 0 : f.getItem(i);
119
119
  if (r)
120
- return (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? g(
120
+ return (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? m(
121
121
  JSON.parse(r),
122
122
  (c = e == null ? void 0 : e.exportConfigState) == null ? void 0 : c.defaultValue
123
123
  ) : JSON.parse(r);
@@ -140,7 +140,7 @@ function Ee(e) {
140
140
  try {
141
141
  const a = l == null ? void 0 : l.getItem(i);
142
142
  a ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? h(
143
- g(
143
+ m(
144
144
  JSON.parse(a),
145
145
  (c = e == null ? void 0 : e.exportConfigState) == null ? void 0 : c.defaultValue
146
146
  )
@@ -181,7 +181,7 @@ function Ee(e) {
181
181
  try {
182
182
  (o = n == null ? void 0 : n(c)) == null || o.then((l) => {
183
183
  var f;
184
- const a = g(l ?? {}, (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
184
+ const a = m(l ?? {}, (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
185
185
  h(
186
186
  Object.keys(a).length ? a : x
187
187
  );
@@ -191,13 +191,13 @@ function Ee(e) {
191
191
  }
192
192
  }
193
193
  }, []);
194
- const S = C(() => {
194
+ const S = g(() => {
195
195
  var l;
196
196
  if ((l = e == null ? void 0 : e.columnsState) != null && l.defaultValue)
197
197
  return e.columnsState.defaultValue;
198
198
  const t = u.filter((a) => a.fixed === "left").map((a, f) => ({ ...a, order: f })), i = u.filter((a) => a.fixed === "right").map((a, f) => ({ ...a, order: f })), o = u.filter((a) => !["left", "right"].includes(a.fixed)).map((a, f) => ({ ...a, order: f })), n = [...t, ...o, ...i], c = {};
199
199
  return n.forEach((a, f) => {
200
- const { order: r, fixed: xe, disabled: he } = a, oe = N(a, f);
200
+ const { order: r, fixed: xe, disabled: he } = a, oe = z(a, f);
201
201
  oe && (c[oe] = {
202
202
  show: !0,
203
203
  order: r,
@@ -205,7 +205,7 @@ function Ee(e) {
205
205
  disabled: he
206
206
  });
207
207
  }), c;
208
- }, [u]), [m, w] = V(
208
+ }, [u]), [C, w] = V(
209
209
  () => {
210
210
  var n, c, l, a;
211
211
  const { persistenceType: t, persistenceKey: i, onlineGet: o } = e.columnsState || {};
@@ -214,7 +214,7 @@ function Ee(e) {
214
214
  try {
215
215
  const r = f == null ? void 0 : f.getItem(i);
216
216
  if (r)
217
- return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? g(
217
+ return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? m(
218
218
  JSON.parse(r),
219
219
  (c = e == null ? void 0 : e.columnsState) == null ? void 0 : c.defaultValue
220
220
  ) : JSON.parse(r);
@@ -237,7 +237,7 @@ function Ee(e) {
237
237
  try {
238
238
  const a = l == null ? void 0 : l.getItem(i);
239
239
  a ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? w(
240
- g(
240
+ m(
241
241
  JSON.parse(a),
242
242
  (c = e == null ? void 0 : e.columnsState) == null ? void 0 : c.defaultValue
243
243
  )
@@ -294,14 +294,14 @@ function Ee(e) {
294
294
  if (t !== "online") {
295
295
  const c = window[t];
296
296
  try {
297
- c == null || c.setItem(i, JSON.stringify(m));
297
+ c == null || c.setItem(i, JSON.stringify(C));
298
298
  } catch (l) {
299
299
  console.warn(l), I();
300
300
  }
301
301
  }
302
302
  }, [
303
303
  (q = e.columnsState) == null ? void 0 : q.persistenceKey,
304
- m,
304
+ C,
305
305
  (Q = e.columnsState) == null ? void 0 : Q.persistenceType
306
306
  ]), d(() => {
307
307
  var t, i, o;
@@ -310,7 +310,7 @@ function Ee(e) {
310
310
  try {
311
311
  (o = n == null ? void 0 : n(c)) == null || o.then((l) => {
312
312
  var f;
313
- const a = g(l ?? {}, (f = e == null ? void 0 : e.columnsState) == null ? void 0 : f.value);
313
+ const a = m(l ?? {}, (f = e == null ? void 0 : e.columnsState) == null ? void 0 : f.value);
314
314
  w(a);
315
315
  });
316
316
  } catch (l) {
@@ -321,14 +321,14 @@ function Ee(e) {
321
321
  var i, o;
322
322
  const t = u.findIndex((n) => n == null ? void 0 : n.isOperationCol);
323
323
  if (t >= 0) {
324
- const n = u[t], c = N(n, t);
325
- !(((i = m == null ? void 0 : m[c]) == null ? void 0 : i.fixed) === ((o = S == null ? void 0 : S[c]) == null ? void 0 : o.fixed)) && Object.keys(m ?? {}).length === 0 && w(S);
324
+ const n = u[t], c = z(n, t);
325
+ !(((i = C == null ? void 0 : C[c]) == null ? void 0 : i.fixed) === ((o = S == null ? void 0 : S[c]) == null ? void 0 : o.fixed)) && Object.keys(C ?? {}).length === 0 && w(S);
326
326
  }
327
- }, [S]);
328
- const Ce = C(() => (e == null ? void 0 : e.rowHoverable) ?? (s == null ? void 0 : s.rowHoverable) ?? !0, [e == null ? void 0 : e.rowHoverable, s == null ? void 0 : s.rowHoverable]), ge = C(() => e.zebra ?? y.zebra, [e.zebra, y.zebra]), K = C(() => e.bordered ?? y.bordered, [e.bordered, y.bordered]), me = C(() => ["column", "row-column"].includes(K), [K]), we = C(() => {
327
+ }, [S, C]);
328
+ const Ce = g(() => (e == null ? void 0 : e.rowHoverable) ?? (s == null ? void 0 : s.rowHoverable) ?? !0, [e == null ? void 0 : e.rowHoverable, s == null ? void 0 : s.rowHoverable]), ge = g(() => e.zebra ?? y.zebra, [e.zebra, y.zebra]), b = g(() => e.bordered ?? y.bordered, [e.bordered, y.bordered]), me = g(() => ["column", "row-column"].includes(b), [b]), we = g(() => {
329
329
  let t = !1;
330
- return ["hide", "column"].includes(K) && (t = !0), t;
331
- }, [K]), j = {
330
+ return ["hide", "column"].includes(b) && (t = !0), t;
331
+ }, [b]), j = {
332
332
  loading: e.loading ?? !1,
333
333
  uuid: T.current,
334
334
  fullscreen: fe,
@@ -340,19 +340,19 @@ function Ee(e) {
340
340
  persistenceType: (W = e.columnsState) == null ? void 0 : W.persistenceType,
341
341
  persistenceKey: (Y = e.columnsState) == null ? void 0 : Y.persistenceKey,
342
342
  onlineChange: ($ = e.columnsState) == null ? void 0 : $.onlineChange,
343
- columnsMap: m,
343
+ columnsMap: C,
344
344
  setColumnsMap: w,
345
345
  defaultColumnKeyMap: S,
346
346
  clearPersistenceStorage: I,
347
347
  stylesConfig: y,
348
348
  setTableStylesConfig: E,
349
- defaultTableSize: z,
349
+ defaultTableSize: N,
350
350
  tableSize: y.size,
351
351
  stylesStorageType: (p = e.stylesConfigState) == null ? void 0 : p.persistenceType,
352
352
  stylesStorageKey: (ee = e.stylesConfigState) == null ? void 0 : ee.persistenceKey,
353
353
  onlineStylesConfigChange: (te = e.stylesConfigState) == null ? void 0 : te.onlineChange,
354
354
  clearStylesConfigCache: J,
355
- defaultTableStylesConfig: b,
355
+ defaultTableStylesConfig: K,
356
356
  exportConfig: O,
357
357
  setTableExportConfig: h,
358
358
  defaultTableExportConfig: x,
@@ -369,13 +369,13 @@ function Ee(e) {
369
369
  get: () => T.current
370
370
  }), j;
371
371
  }
372
- const Ie = Ke({}), Pe = (e) => {
372
+ const Ie = be({}), Pe = (e) => {
373
373
  const T = Ee(e.initValue);
374
374
  return /* @__PURE__ */ Te.jsx(Ie.Provider, { value: T, children: e.children });
375
375
  };
376
376
  export {
377
377
  Ie as BitzTableContext,
378
- Ne as SORTER_COLUMN,
378
+ ze as SORTER_COLUMN,
379
379
  Pe as default,
380
- ze as toolCols
380
+ Ne as toolCols
381
381
  };
@@ -1,154 +1,154 @@
1
- import { j as y } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { useContext as D, useRef as Z, useMemo as o, useCallback as I } from "react";
3
- import { Table as tt } from "antd";
4
- import et from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
5
- import { BitzTableContext as rt, toolCols as nt } from "../Store/index.mjs";
6
- import ot from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
7
- import st from "../ActionCol/style.mjs";
8
- import at from "../../BitzTheme/index.mjs";
9
- import lt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/table/ExpandIcon.mjs";
1
+ import { j as C } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { useContext as L, useRef as ee, useMemo as o, useCallback as j } from "react";
3
+ import { Table as te } from "antd";
4
+ import ne from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
5
+ import { BitzTableContext as re, toolCols as oe } from "../Store/index.mjs";
6
+ import se from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
7
+ import ae from "../../BitzTheme/index.mjs";
8
+ import le from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/table/ExpandIcon.mjs";
10
9
  import "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/index.mjs";
11
- import ct from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/locale/en_US.mjs";
12
- import { getColumnsWithTool as it, loopBuildSkeleton as ut } from "../Table/utils.mjs";
13
- import { ConfigContext as mt } from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/context.mjs";
14
- function Bt({
10
+ import ie from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/locale/en_US.mjs";
11
+ import { getColumnsWithTool as ce, loopBuildSkeleton as ue } from "../Table/utils.mjs";
12
+ import { tablePaddingInline as me } from "../../BitzConfigProvider/context.mjs";
13
+ import { ConfigContext as fe } from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/context.mjs";
14
+ function Te({
15
15
  dataSource: u,
16
16
  columns: g,
17
17
  loading: l,
18
18
  scroll: s,
19
19
  components: f,
20
- expandable: c,
20
+ expandable: i,
21
21
  rowSelection: m,
22
22
  ...a
23
23
  }) {
24
- var T, p;
25
- const { token: L } = at.useToken(), { gap: j } = st(), { showColumnBorder: K, rowHoverable: M } = D(rt), h = Z(null), C = ot((T = h.current) == null ? void 0 : T.nativeElement), q = o(() => {
26
- let t = (s == null ? void 0 : s.x) ?? 1e3;
27
- return s != null && s.x ? { x: t, y: s.y || 400 } : s != null && s.y ? { x: t, y: s.y } : { x: t, y: 400 };
28
- }, [s]), P = () => {
29
- var n, r;
30
- const t = (r = (n = h.current) == null ? void 0 : n.nativeElement) == null ? void 0 : r.querySelectorAll(
24
+ var p, W, E;
25
+ const { token: x } = ae.useToken(), K = ((p = x.Table) == null ? void 0 : p.cellPaddingInline) ?? me, { showColumnBorder: M, rowHoverable: P } = L(re), h = ee(null), w = se((W = h.current) == null ? void 0 : W.nativeElement), q = o(() => {
26
+ let e = (s == null ? void 0 : s.x) ?? 1e3;
27
+ return s != null && s.x ? { x: e, y: s.y || 400 } : s != null && s.y ? { x: e, y: s.y } : { x: e, y: 400 };
28
+ }, [s]), A = () => {
29
+ var r, n;
30
+ const e = (n = (r = h.current) == null ? void 0 : r.nativeElement) == null ? void 0 : n.querySelectorAll(
31
31
  "& > .bitzTableContainerBody > .ant-table-wrapper.bitzTable > .ant-spin-nested-loading > .ant-spin-container > .ant-table > .ant-table-container > .ant-table-body > table > .ant-table-tbody > tr:not(.ant-table-measure-row, .ant-table-expanded-row)"
32
- ), e = [];
33
- if (t == null || t.forEach((i) => {
32
+ ), t = [];
33
+ if (e == null || e.forEach((c) => {
34
34
  var b;
35
- e.push(
36
- ((b = i.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : b.clientWidth) || 0
35
+ t.push(
36
+ ((b = c.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : b.clientWidth) || 0
37
37
  );
38
- }), e.length)
39
- return Math.ceil(Math.max(...e)) + j * 2;
40
- }, A = () => {
41
- var b, W, E, v, N;
42
- const t = (W = (b = h.current) == null ? void 0 : b.nativeElement) == null ? void 0 : W.querySelector(
38
+ }), t.length)
39
+ return Math.ceil(Math.max(...t)) + K * 2;
40
+ }, $ = () => {
41
+ var b, I, v, N, D;
42
+ const e = (I = (b = h.current) == null ? void 0 : b.nativeElement) == null ? void 0 : I.querySelector(
43
43
  ".ant-table-body"
44
- ), e = t == null ? void 0 : t.clientWidth, r = ((t == null ? void 0 : t.offsetWidth) || 0) - e > 0, i = (N = (v = (E = h.current) == null ? void 0 : E.nativeElement) == null ? void 0 : v.querySelector(
44
+ ), t = e == null ? void 0 : e.clientWidth, n = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, c = (D = (N = (v = h.current) == null ? void 0 : v.nativeElement) == null ? void 0 : N.querySelector(
45
45
  ".ant-table-cell-scrollbar"
46
- )) == null ? void 0 : N.offsetWidth;
47
- return { tbodyWidth: e, scrollbarSize: i, hasScrollBar: r };
48
- }, { hasScrollBar: x, scrollbarSize: R } = o(() => {
49
- const { hasScrollBar: t, scrollbarSize: e } = A();
46
+ )) == null ? void 0 : D.offsetWidth;
47
+ return { tbodyWidth: t, scrollbarSize: c, hasScrollBar: n };
48
+ }, { hasScrollBar: R, scrollbarSize: k } = o(() => {
49
+ const { hasScrollBar: e, scrollbarSize: t } = $();
50
50
  return {
51
- hasScrollBar: t,
52
- scrollbarSize: e
51
+ hasScrollBar: e,
52
+ scrollbarSize: t
53
53
  };
54
- }, [C == null ? void 0 : C.height]), d = o(() => {
55
- const t = g ?? [], n = t.filter((r) => !nt.includes(r)).map((r) => ({
56
- ...r,
57
- width: r.useMaxWidth ? P() ?? r.width : r.width
54
+ }, [w == null ? void 0 : w.height]), d = o(() => {
55
+ const e = g ?? [], r = e.filter((n) => !oe.includes(n)).map((n) => ({
56
+ ...n,
57
+ width: n.useMaxWidth ? A() ?? n.width : n.width
58
58
  }));
59
- return it(
60
- t,
61
- n,
59
+ return ce(
60
+ e,
61
+ r,
62
62
  !1,
63
63
  !!m,
64
- !!c
64
+ !!i
65
65
  );
66
- }, [g]), k = o(() => ut(d), [d]), G = o(() => l ? k : d, [l, d, k]), S = o(() => {
67
- const t = (u == null ? void 0 : u.length) ?? 0, e = t > 4 ? t >= 8 ? 8 : t : 4;
68
- return Array.from({ length: e }).map((r, i) => ({
69
- key: `${Date.now()}${i}`
66
+ }, [g]), S = o(() => ue(d), [d]), F = o(() => l ? S : d, [l, d, S]), z = o(() => {
67
+ const e = (u == null ? void 0 : u.length) ?? 0, t = e > 4 ? e >= 8 ? 8 : e : 4;
68
+ return Array.from({ length: t }).map((n, c) => ({
69
+ key: `${Date.now()}${c}`
70
70
  }));
71
- }, [u]), $ = o(() => l ? S : u, [l, u, S]), { table: w, locale: F = ct } = D(mt), H = { ...F.Table }, _ = ((p = w == null ? void 0 : w.expandable) == null ? void 0 : p.expandIcon) || (c == null ? void 0 : c.expandIcon) || lt(H), z = o(() => {
72
- if (c)
71
+ }, [u]), G = o(() => l ? z : u, [l, u, z]), { table: y, locale: H = ie } = L(fe), _ = { ...H.Table }, J = ((E = y == null ? void 0 : y.expandable) == null ? void 0 : E.expandIcon) || (i == null ? void 0 : i.expandIcon) || le(_), B = o(() => {
72
+ if (i)
73
73
  return {
74
- ...c,
75
- expandedRowRender: () => /* @__PURE__ */ y.jsx(y.Fragment, {}),
76
- expandIcon: (t) => {
77
- const e = _(t);
74
+ ...i,
75
+ expandedRowRender: () => /* @__PURE__ */ C.jsx(C.Fragment, {}),
76
+ expandIcon: (e) => {
77
+ const t = J(e);
78
78
  return {
79
- ...e,
79
+ ...t,
80
80
  props: {
81
- ...e.props,
81
+ ...t.props,
82
82
  disabled: !0,
83
83
  style: {
84
- ...e.props.style,
85
- backgroundColor: L.colorBgContainerDisabled
84
+ ...t.props.style,
85
+ backgroundColor: x.colorBgContainerDisabled
86
86
  }
87
87
  }
88
88
  };
89
89
  }
90
90
  };
91
- }, [c]), J = o(() => l ? z : c, [l, c, z]), B = o(() => {
91
+ }, [i]), O = o(() => l ? B : i, [l, i, B]), T = o(() => {
92
92
  if (m)
93
93
  return {
94
94
  ...m,
95
95
  selectedRowKeys: [],
96
96
  getCheckboxProps: () => ({ disabled: !0 })
97
97
  };
98
- }, [m]), O = o(() => l ? B : m, [l, m, B]), Q = o(() => l ? void 0 : a.rowKey, [l, a.rowKey]), U = I(
99
- (t, e) => {
100
- var r;
98
+ }, [m]), Q = o(() => l ? T : m, [l, m, T]), U = o(() => l ? void 0 : a.rowKey, [l, a.rowKey]), V = j(
99
+ (e, t) => {
100
+ var n;
101
101
  if (!a.onRow)
102
102
  return {};
103
- const n = (r = a.onRow) == null ? void 0 : r.call(a, t, e);
104
- return n.onClick && (n.className = "rowPointerCursor"), n;
103
+ const r = (n = a.onRow) == null ? void 0 : n.call(a, e, t);
104
+ return r.onClick && (r.className = "rowPointerCursor"), r;
105
105
  },
106
106
  [a.onRow]
107
- ), V = I(
108
- (t, e, n) => {
109
- const r = e % 2 === 0 ? "oddRow" : "evenRow";
107
+ ), X = j(
108
+ (e, t, r) => {
109
+ const n = t % 2 === 0 ? "oddRow" : "evenRow";
110
110
  if (a.rowClassName) {
111
- const i = a.rowClassName(t, e, n);
112
- return et(r, i);
111
+ const c = a.rowClassName(e, t, r);
112
+ return ne(n, c);
113
113
  }
114
- return r;
114
+ return n;
115
115
  },
116
116
  [a.rowClassName]
117
- ), X = (t) => {
118
- var n;
119
- const e = { ...t };
120
- return e.className.includes("ant-table-cell-fix-right") && !x && ((n = e.style) != null && n.right) && (e.style = {
121
- ...e.style,
122
- right: e.style.right - (R || 0)
123
- }), /* @__PURE__ */ y.jsx("th", { ...e });
124
- }, Y = o(() => ({
117
+ ), Y = (e) => {
118
+ var r;
119
+ const t = { ...e };
120
+ return t.className.includes("ant-table-cell-fix-right") && !R && ((r = t.style) != null && r.right) && (t.style = {
121
+ ...t.style,
122
+ right: t.style.right - (k || 0)
123
+ }), /* @__PURE__ */ C.jsx("th", { ...t });
124
+ }, Z = o(() => ({
125
125
  ...f,
126
126
  header: {
127
127
  ...f == null ? void 0 : f.header,
128
- cell: X
128
+ cell: Y
129
129
  }
130
- }), [f, x, R]);
131
- return /* @__PURE__ */ y.jsx(
132
- tt,
130
+ }), [f, R, k]);
131
+ return /* @__PURE__ */ C.jsx(
132
+ te,
133
133
  {
134
134
  ...a,
135
- bordered: K,
136
- columns: G,
137
- dataSource: $,
135
+ bordered: M,
136
+ columns: F,
137
+ dataSource: G,
138
138
  loading: !1,
139
139
  pagination: !1,
140
140
  scroll: q,
141
- expandable: J,
142
- rowSelection: O,
143
- onRow: U,
144
- rowClassName: V,
145
- components: Y,
146
- rowKey: Q,
147
- rowHoverable: M,
141
+ expandable: O,
142
+ rowSelection: Q,
143
+ onRow: V,
144
+ rowClassName: X,
145
+ components: Z,
146
+ rowKey: U,
147
+ rowHoverable: P,
148
148
  ref: h
149
149
  }
150
150
  );
151
151
  }
152
152
  export {
153
- Bt as default
153
+ Te as default
154
154
  };