bitz-react-admin-ui 2.5.4 → 2.5.6

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 (38) hide show
  1. package/dist/_virtual/index.mjs +2 -2
  2. package/dist/_virtual/index2.mjs +2 -2
  3. package/dist/components/BitzTable/ActionBar/ActionBar.d.ts +4 -3
  4. package/dist/components/BitzTable/ActionBar/Button.d.ts +7 -3
  5. package/dist/components/BitzTable/ActionBar/Button.mjs +26 -7
  6. package/dist/components/BitzTable/ActionBar/index.d.ts +2 -0
  7. package/dist/components/BitzTable/Store/index.mjs +96 -101
  8. package/dist/components/BitzTable/Store/utils/index.mjs +29 -29
  9. package/dist/components/BitzTable/Table/ResizableTitle copy.mjs +36 -36
  10. package/dist/components/BitzTable/Table/index.mjs +399 -377
  11. package/dist/components/BitzTableSelect/Select/index.mjs +1 -1
  12. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +90 -91
  13. package/dist/components/BitzTableSelect/SingleSelect/index.mjs +42 -40
  14. package/dist/components/BitzText/index.d.ts +9 -0
  15. package/dist/components/BitzText/index.less.mjs +4 -0
  16. package/dist/components/BitzText/index.mjs +64 -0
  17. package/dist/components/BitzText/utils.d.ts +4 -0
  18. package/dist/components/BitzText/utils.mjs +5 -0
  19. package/dist/components/BitzTooltip/index.d.ts +17 -0
  20. package/dist/components/BitzTooltip/index.mjs +96 -0
  21. package/dist/components/BitzTooltip/style.d.ts +5 -0
  22. package/dist/components/BitzTooltip/style.mjs +50 -0
  23. package/dist/components/BitzTooltip/utils.d.ts +2 -0
  24. package/dist/components/BitzTooltip/utils.mjs +4 -0
  25. package/dist/index.d.ts +2 -0
  26. package/dist/index.mjs +42 -38
  27. package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/CopyOutlined.mjs +5 -0
  28. package/dist/node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/CopyOutlined.mjs +15 -0
  29. package/dist/node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useClickAway/index.mjs +27 -0
  30. package/dist/node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/utils/getDocumentOrShadow.mjs +21 -0
  31. package/dist/node_modules/.store/antd@5.17.3/node_modules/antd/es/typography/hooks/useCopyClick.mjs +63 -0
  32. package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
  33. package/dist/node_modules/.store/copy-to-clipboard@3.3.3/node_modules/copy-to-clipboard/index.mjs +46 -0
  34. package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
  35. package/dist/node_modules/.store/toggle-selection@1.0.6/node_modules/toggle-selection/index.mjs +25 -0
  36. package/dist/style.css +1 -1
  37. package/dist/utils/WithFluent.mjs +7 -6
  38. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- var s = { exports: {} };
1
+ var p = { exports: {} };
2
2
  export {
3
- s as __module
3
+ p as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var p = { exports: {} };
1
+ var s = { exports: {} };
2
2
  export {
3
- p as __module
3
+ s as __module
4
4
  };
@@ -2,6 +2,7 @@ import { FC, MouseEventHandler, ReactNode } from 'react';
2
2
  import { DropdownProps as AntDropdownProps, ButtonProps as AntButtonProps } from 'antd';
3
3
  import { SubMenuType } from 'antd/es/menu/interface';
4
4
  import { DensitySize } from '../Store';
5
+ import { BitzActionBarButtonType } from '.';
5
6
  interface AddButtonType extends Omit<AntButtonProps, 'children' | 'onClick'> {
6
7
  /** 按钮文字 */
7
8
  text: string;
@@ -22,15 +23,15 @@ interface ExcelButtonType extends Omit<AntDropdownProps, 'menu' | 'children'> {
22
23
  otherMenu?: SubMenuType[];
23
24
  }
24
25
  interface ButtonProps extends Omit<AntButtonProps, 'type' | 'children'> {
25
- type: 'primary' | 'secondary';
26
+ type: BitzActionBarButtonType;
26
27
  text: ReactNode;
27
28
  }
28
29
  interface DropdownProps extends AntDropdownProps {
29
30
  type: 'dropdown';
30
31
  text: ReactNode;
31
32
  }
32
- export type ActionbarBtnTypeValue = 'primary' | 'secondary' | 'dropdown';
33
- export type ActionbarBtnBaseType<T extends ActionbarBtnTypeValue = 'primary'> = T extends 'primary' | 'secondary' ? Omit<AntButtonProps, 'type'> : DropdownProps;
33
+ export type ActionbarBtnTypeValue = BitzActionBarButtonType | 'dropdown';
34
+ export type ActionbarBtnBaseType<T extends ActionbarBtnTypeValue = 'primary'> = T extends BitzActionBarButtonType ? Omit<AntButtonProps, 'type'> : DropdownProps;
34
35
  export type ActionbarBtnType<T extends ActionbarBtnTypeValue = 'primary'> = {
35
36
  type: T;
36
37
  } & ActionbarBtnBaseType<T>;
@@ -1,6 +1,10 @@
1
1
  import { ButtonProps as AntButtonProps } from 'antd';
2
- import { FC } from 'react';
3
- type BitzActionBarButtonProps = Omit<AntButtonProps, 'type' | 'className'>;
4
- /** SelectionBar的普通按钮 */
2
+ import { FC, ReactNode } from 'react';
3
+ import { BitzActionBarButtonType } from '.';
4
+ interface BitzActionBarButtonProps extends Omit<AntButtonProps, 'type'> {
5
+ icon?: ReactNode;
6
+ type?: BitzActionBarButtonType;
7
+ }
8
+ /** SelectionBar的按钮 */
5
9
  declare const BitzActionBarButton: FC<BitzActionBarButtonProps>;
6
10
  export default BitzActionBarButton;
@@ -1,10 +1,29 @@
1
- import { j as s } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
- import e from "../../BitzButton/index.mjs";
3
- import r from "./style.mjs";
4
- const i = ({ ...t }) => {
5
- const { btnClassName: o } = r();
6
- return /* @__PURE__ */ s.jsx(e, { className: o, type: "text", ...t });
1
+ import { j as e } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
+ import p from "../../BitzButton/index.mjs";
3
+ import c from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
4
+ import { useMemo as s } from "react";
5
+ import x from "./style.mjs";
6
+ import B from "../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/PlusCircleFilled.mjs";
7
+ const z = ({
8
+ className: o,
9
+ icon: n,
10
+ type: r,
11
+ ...i
12
+ }) => {
13
+ const { addBtnClassName: m, btnClassName: a } = x(), u = s(() => {
14
+ if (n)
15
+ return n;
16
+ if (r === "primary")
17
+ return /* @__PURE__ */ e.jsx(B, {});
18
+ }, [n, r]), l = s(() => {
19
+ let t = a;
20
+ return r === "primary" && (t = m), c(t, o);
21
+ }, [r, o]), f = s(() => {
22
+ let t = "text";
23
+ return r === "primary" && (t = "primary"), t;
24
+ }, [r, o]);
25
+ return /* @__PURE__ */ e.jsx(p, { className: l, icon: u, type: f, ...i });
7
26
  };
8
27
  export {
9
- i as default
28
+ z as default
10
29
  };
@@ -1,8 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { BitzTableActionBarProps } from './ActionBar';
3
3
  import BitzActionBarButton from './Button';
4
+ type BitzActionBarButtonType = 'primary' | 'secondary';
4
5
  type CompoundedComponent = React.ForwardRefExoticComponent<BitzTableActionBarProps> & {
5
6
  Button: typeof BitzActionBarButton;
6
7
  };
7
8
  declare const BitzTableActionBar: CompoundedComponent;
9
+ export type { BitzActionBarButtonType };
8
10
  export default BitzTableActionBar;
@@ -1,12 +1,12 @@
1
- import { j as Ve } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
- import { Table as le } from "antd";
3
- import v from "../../../hooks/useMergedState.mjs";
4
- import { createContext as ve, useRef as ze, useState as K, useContext as Ne, useEffect as d, useMemo as g, useCallback as z } from "react";
5
- import { genColumnKey as N } from "./utils/index.mjs";
6
- import { getUuid as Ee } from "../../../utils/uuid.mjs";
7
- import { BitzConfigContext as Ie } from "../../BitzConfigProvider/context.mjs";
1
+ import { j as ve } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
+ import { Table as fe } from "antd";
3
+ import z from "../../../hooks/useMergedState.mjs";
4
+ import { createContext as ze, useRef as Ne, useState as K, useContext as Ee, useEffect as d, useMemo as g, useCallback as N } from "react";
5
+ import { genColumnKey as E } from "./utils/index.mjs";
6
+ import { getUuid as Ie } from "../../../utils/uuid.mjs";
7
+ import { BitzConfigContext as Je } from "../../BitzConfigProvider/context.mjs";
8
8
  import m from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
9
- const Je = {
9
+ const Be = {
10
10
  fixed: "left",
11
11
  className: "sorterCol",
12
12
  isDragSorterCol: !0,
@@ -16,18 +16,18 @@ const Je = {
16
16
  onCell: () => ({
17
17
  "data-column-name": "dragSorterCell"
18
18
  })
19
- }, Be = [
20
- Je,
21
- le.SELECTION_COLUMN,
22
- le.EXPAND_COLUMN
19
+ }, je = [
20
+ Be,
21
+ fe.SELECTION_COLUMN,
22
+ fe.EXPAND_COLUMN
23
23
  ];
24
- function je(e) {
25
- var k, H, R, L, P, U, D, _, F, G, W, Z, A, X, q, Q, Y, $, p, ee, te, ne, ie, ae, oe;
26
- const T = ze(Ee()), [fe, re] = K(!1), [se, ue] = K(!1), [de, ye] = K(0), s = Ne(Ie).Table, Se = s == null ? void 0 : s.defaultSize, E = e.size ?? e.defaultSize ?? Se ?? "lg", Ce = e.zebra ?? e.defaultZebra ?? (s == null ? void 0 : s.zebra) ?? !0, ge = e.bordered ?? e.defaultBordered ?? (s == null ? void 0 : s.bordered) ?? "row-column", O = e.defaultStylesConfig || {
27
- size: E,
28
- zebra: Ce,
29
- bordered: ge
30
- }, [y, I] = v(
24
+ function Me(e) {
25
+ var H, R, L, P, U, D, _, F, G, W, Z, A, X, q, Q, Y, $, p, ee, te, ne, ie, ae, oe, ce;
26
+ const T = Ne(Ie()), [re, se] = K(!1), [ue, de] = K(!1), [ye, Se] = K(0), s = Ee(Je).Table, Ce = s == null ? void 0 : s.defaultSize, I = e.size ?? e.defaultSize ?? Ce ?? "lg", ge = e.zebra ?? e.defaultZebra ?? (s == null ? void 0 : s.zebra) ?? !0, me = e.bordered ?? e.defaultBordered ?? (s == null ? void 0 : s.bordered) ?? "row-column", O = e.defaultStylesConfig || {
27
+ size: I,
28
+ zebra: ge,
29
+ bordered: me
30
+ }, [y, J] = z(
31
31
  () => {
32
32
  var n, c, l, a;
33
33
  const { persistenceType: t, persistenceKey: i, onlineGet: o } = e.stylesConfigState || {};
@@ -47,8 +47,8 @@ function je(e) {
47
47
  return e.stylesConfig || ((l = e.stylesConfigState) == null ? void 0 : l.value) || ((a = e.stylesConfigState) == null ? void 0 : a.defaultValue) || O;
48
48
  },
49
49
  {
50
- value: ((k = e.stylesConfigState) == null ? void 0 : k.value) || e.stylesConfig,
51
- onChange: ((H = e.stylesConfigState) == null ? void 0 : H.onChange) || e.onStylesConfigChange
50
+ value: ((H = e.stylesConfigState) == null ? void 0 : H.value) || e.stylesConfig,
51
+ onChange: ((R = e.stylesConfigState) == null ? void 0 : R.onChange) || e.onStylesConfigChange
52
52
  }
53
53
  );
54
54
  d(() => {
@@ -65,13 +65,13 @@ function je(e) {
65
65
  try {
66
66
  c == null || c.setItem(i, JSON.stringify(y));
67
67
  } catch (l) {
68
- console.warn(l), B();
68
+ console.warn(l), j();
69
69
  }
70
70
  }
71
71
  }, [
72
- (R = e.stylesConfigState) == null ? void 0 : R.persistenceKey,
72
+ (L = e.stylesConfigState) == null ? void 0 : L.persistenceKey,
73
73
  y,
74
- (L = e.stylesConfigState) == null ? void 0 : L.persistenceType
74
+ (P = e.stylesConfigState) == null ? void 0 : P.persistenceType
75
75
  ]), d(() => {
76
76
  var t, i, o;
77
77
  if ((t = e.stylesConfigState) != null && t.persistenceKey && ((i = e.stylesConfigState) == null ? void 0 : i.persistenceType) === "online") {
@@ -80,7 +80,7 @@ function je(e) {
80
80
  (o = n == null ? void 0 : n(c)) == null || o.then((l) => {
81
81
  var f;
82
82
  const a = m(l ?? {}, (f = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : f.value);
83
- I(
83
+ J(
84
84
  Object.keys(a).length ? a : O
85
85
  );
86
86
  });
@@ -89,7 +89,7 @@ function je(e) {
89
89
  }
90
90
  }
91
91
  }, []);
92
- const u = g(() => (e.columns ?? []).filter((t) => !Be.includes(t)), [e.columns]), x = g(() => {
92
+ const u = g(() => (e.columns ?? []).filter((t) => !je.includes(t)), [e.columns]), h = 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,14 +101,14 @@ function je(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 = E(o, n);
105
105
  a && !l && t.fields.push({
106
106
  field: a,
107
107
  title: c,
108
108
  show: !0
109
109
  });
110
110
  }), t;
111
- }, [u]), [V, h] = v(
111
+ }, [u]), [V, x] = z(
112
112
  () => {
113
113
  var n, c, l, a;
114
114
  const { persistenceType: t, persistenceKey: i, onlineGet: o } = e.exportConfigState || {};
@@ -125,11 +125,11 @@ function je(e) {
125
125
  console.warn(r);
126
126
  }
127
127
  }
128
- return e.exportConfig || ((l = e.exportConfigState) == null ? void 0 : l.value) || ((a = e.exportConfigState) == null ? void 0 : a.defaultValue) || x;
128
+ return e.exportConfig || ((l = e.exportConfigState) == null ? void 0 : l.value) || ((a = e.exportConfigState) == null ? void 0 : a.defaultValue) || h;
129
129
  },
130
130
  {
131
- value: ((P = e.exportConfigState) == null ? void 0 : P.value) || e.exportConfig,
132
- onChange: ((U = e.exportConfigState) == null ? void 0 : U.onChange) || e.onExportConfigChange
131
+ value: ((U = e.exportConfigState) == null ? void 0 : U.value) || e.exportConfig,
132
+ onChange: ((D = e.exportConfigState) == null ? void 0 : D.onChange) || e.onExportConfigChange
133
133
  }
134
134
  );
135
135
  d(() => {
@@ -139,20 +139,20 @@ function je(e) {
139
139
  const l = window[t];
140
140
  try {
141
141
  const a = l == null ? void 0 : l.getItem(i);
142
- a ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? h(
142
+ a ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? x(
143
143
  m(
144
144
  JSON.parse(a),
145
145
  (c = e == null ? void 0 : e.exportConfigState) == null ? void 0 : c.defaultValue
146
146
  )
147
- ) : h(JSON.parse(a)) : h(x);
147
+ ) : x(JSON.parse(a)) : x(h);
148
148
  } catch (a) {
149
149
  console.warn(a);
150
150
  }
151
151
  }
152
152
  }, [
153
- (D = e.exportConfigState) == null ? void 0 : D.persistenceKey,
154
- (_ = e.exportConfigState) == null ? void 0 : _.persistenceType,
155
- x
153
+ (_ = e.exportConfigState) == null ? void 0 : _.persistenceKey,
154
+ (F = e.exportConfigState) == null ? void 0 : F.persistenceType,
155
+ h
156
156
  ]), d(() => {
157
157
  var o, n;
158
158
  if (!((o = e.exportConfigState) != null && o.persistenceKey) || !((n = e.exportConfigState) != null && n.persistenceType) || typeof window > "u")
@@ -167,13 +167,13 @@ function je(e) {
167
167
  try {
168
168
  c == null || c.setItem(i, JSON.stringify(V));
169
169
  } catch (l) {
170
- console.warn(l), j();
170
+ console.warn(l), M();
171
171
  }
172
172
  }
173
173
  }, [
174
- (F = e.exportConfigState) == null ? void 0 : F.persistenceKey,
174
+ (G = e.exportConfigState) == null ? void 0 : G.persistenceKey,
175
175
  V,
176
- (G = e.exportConfigState) == null ? void 0 : G.persistenceType
176
+ (W = e.exportConfigState) == null ? void 0 : W.persistenceType
177
177
  ]), d(() => {
178
178
  var t, i, o;
179
179
  if ((t = e.exportConfigState) != null && t.persistenceKey && ((i = e.exportConfigState) == null ? void 0 : i.persistenceType) === "online") {
@@ -182,8 +182,8 @@ function je(e) {
182
182
  (o = n == null ? void 0 : n(c)) == null || o.then((l) => {
183
183
  var f;
184
184
  const a = m(l ?? {}, (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
185
- h(
186
- Object.keys(a).length ? a : x
185
+ x(
186
+ Object.keys(a).length ? a : h
187
187
  );
188
188
  });
189
189
  } catch (l) {
@@ -197,20 +197,15 @@ function je(e) {
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 {
201
- order: r,
202
- /*width,*/
203
- fixed: Ke,
204
- disabled: Oe
205
- } = a, ce = N(a, f);
206
- ce && (c[ce] = {
200
+ const { order: r, width: le, fixed: Oe, disabled: Ve } = a, v = E(a, f);
201
+ v && (c[v] = {
207
202
  show: !0,
208
203
  order: r,
209
- fixed: Ke,
210
- disabled: Oe
211
- });
204
+ fixed: Oe,
205
+ disabled: Ve
206
+ }, typeof le == "number" && (c[v].width = le));
212
207
  }), c;
213
- }, [u]), [me, we] = K(!1), [C, w] = v(
208
+ }, [u]), [we, he] = K(!1), [C, w] = z(
214
209
  () => {
215
210
  var n, c, l, a;
216
211
  const { persistenceType: t, persistenceKey: i, onlineGet: o } = e.columnsState || {};
@@ -230,8 +225,8 @@ function je(e) {
230
225
  return e.columnsStateMap || ((l = e.columnsState) == null ? void 0 : l.value) || ((a = e.columnsState) == null ? void 0 : a.defaultValue) || {};
231
226
  },
232
227
  {
233
- value: ((W = e.columnsState) == null ? void 0 : W.value) || e.columnsStateMap,
234
- onChange: ((Z = e.columnsState) == null ? void 0 : Z.onChange) || e.onColumnsStateChange
228
+ value: ((Z = e.columnsState) == null ? void 0 : Z.value) || e.columnsStateMap,
229
+ onChange: ((A = e.columnsState) == null ? void 0 : A.onChange) || e.onColumnsStateChange
235
230
  }
236
231
  );
237
232
  d(() => {
@@ -252,11 +247,11 @@ function je(e) {
252
247
  }
253
248
  }
254
249
  }, [
255
- (A = e.columnsState) == null ? void 0 : A.persistenceKey,
256
- (X = e.columnsState) == null ? void 0 : X.persistenceType,
250
+ (X = e.columnsState) == null ? void 0 : X.persistenceKey,
251
+ (q = e.columnsState) == null ? void 0 : q.persistenceType,
257
252
  S
258
253
  ]);
259
- const J = z(() => {
254
+ const B = N(() => {
260
255
  const { persistenceType: t, persistenceKey: i } = e.columnsState || {};
261
256
  if (!i || !t || typeof window > "u")
262
257
  return;
@@ -266,7 +261,7 @@ function je(e) {
266
261
  } catch (n) {
267
262
  console.warn(n);
268
263
  }
269
- }, [e.columnsState]), B = z(() => {
264
+ }, [e.columnsState]), j = N(() => {
270
265
  const { persistenceType: t, persistenceKey: i } = e.stylesConfigState || {};
271
266
  if (!i || !t || typeof window > "u")
272
267
  return;
@@ -276,7 +271,7 @@ function je(e) {
276
271
  } catch (n) {
277
272
  console.warn(n);
278
273
  }
279
- }, [e.stylesConfigState]), j = z(() => {
274
+ }, [e.stylesConfigState]), M = N(() => {
280
275
  const { persistenceType: t, persistenceKey: i } = e.exportConfigState || {};
281
276
  if (!i || !t || typeof window > "u")
282
277
  return;
@@ -301,13 +296,13 @@ function je(e) {
301
296
  try {
302
297
  c == null || c.setItem(i, JSON.stringify(C));
303
298
  } catch (l) {
304
- console.warn(l), J();
299
+ console.warn(l), B();
305
300
  }
306
301
  }
307
302
  }, [
308
- (q = e.columnsState) == null ? void 0 : q.persistenceKey,
303
+ (Q = e.columnsState) == null ? void 0 : Q.persistenceKey,
309
304
  C,
310
- (Q = e.columnsState) == null ? void 0 : Q.persistenceType
305
+ (Y = e.columnsState) == null ? void 0 : Y.persistenceType
311
306
  ]), d(() => {
312
307
  var t, i, o;
313
308
  if ((t = e.columnsState) != null && t.persistenceKey && ((i = e.columnsState) == null ? void 0 : i.persistenceType) === "online") {
@@ -316,7 +311,7 @@ function je(e) {
316
311
  (o = n == null ? void 0 : n(c)) == null || o.then((l) => {
317
312
  var f;
318
313
  const a = m(l ?? {}, (f = e == null ? void 0 : e.columnsState) == null ? void 0 : f.value);
319
- w(a), we(!0);
314
+ w(a), he(!0);
320
315
  });
321
316
  } catch (l) {
322
317
  console.warn(l);
@@ -326,64 +321,64 @@ function je(e) {
326
321
  var i, o;
327
322
  const t = u.findIndex((n) => n == null ? void 0 : n.isOperationCol);
328
323
  if (t >= 0) {
329
- const n = u[t], c = N(n, t);
324
+ const n = u[t], c = E(n, t);
330
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);
331
326
  }
332
327
  }, [S, C]);
333
- const xe = 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]), he = g(() => e.zebra ?? y.zebra, [e.zebra, y.zebra]), b = g(() => e.bordered ?? y.bordered, [e.bordered, y.bordered]), Te = g(() => ["column", "row-column"].includes(b), [b]), be = g(() => {
328
+ const xe = 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]), Te = g(() => e.zebra ?? y.zebra, [e.zebra, y.zebra]), b = g(() => e.bordered ?? y.bordered, [e.bordered, y.bordered]), be = g(() => ["column", "row-column"].includes(b), [b]), Ke = g(() => {
334
329
  let t = !1;
335
330
  return ["hide", "column"].includes(b) && (t = !0), t;
336
- }, [b]), M = {
331
+ }, [b]), k = {
337
332
  loading: e.loading ?? !1,
338
333
  uuid: T.current,
339
- fullscreen: fe,
340
- setFullscreen: re,
341
- selected: se,
342
- setSelected: ue,
343
- toolbarWidth: de,
344
- setToolbarWidth: ye,
334
+ fullscreen: re,
335
+ setFullscreen: se,
336
+ selected: ue,
337
+ setSelected: de,
338
+ toolbarWidth: ye,
339
+ setToolbarWidth: Se,
345
340
  columns: e.columns,
346
341
  baseColumns: u,
347
- persistenceType: (Y = e.columnsState) == null ? void 0 : Y.persistenceType,
348
- persistenceKey: ($ = e.columnsState) == null ? void 0 : $.persistenceKey,
349
- onlineChange: (p = e.columnsState) == null ? void 0 : p.onlineChange,
350
- finish: me,
342
+ persistenceType: ($ = e.columnsState) == null ? void 0 : $.persistenceType,
343
+ persistenceKey: (p = e.columnsState) == null ? void 0 : p.persistenceKey,
344
+ onlineChange: (ee = e.columnsState) == null ? void 0 : ee.onlineChange,
345
+ finish: we,
351
346
  columnsMap: C,
352
347
  setColumnsMap: w,
353
348
  defaultColumnKeyMap: S,
354
- clearPersistenceStorage: J,
349
+ clearPersistenceStorage: B,
355
350
  stylesConfig: y,
356
- setTableStylesConfig: I,
357
- defaultTableSize: E,
351
+ setTableStylesConfig: J,
352
+ defaultTableSize: I,
358
353
  tableSize: y.size,
359
- stylesStorageType: (ee = e.stylesConfigState) == null ? void 0 : ee.persistenceType,
360
- stylesStorageKey: (te = e.stylesConfigState) == null ? void 0 : te.persistenceKey,
361
- onlineStylesConfigChange: (ne = e.stylesConfigState) == null ? void 0 : ne.onlineChange,
362
- clearStylesConfigCache: B,
354
+ stylesStorageType: (te = e.stylesConfigState) == null ? void 0 : te.persistenceType,
355
+ stylesStorageKey: (ne = e.stylesConfigState) == null ? void 0 : ne.persistenceKey,
356
+ onlineStylesConfigChange: (ie = e.stylesConfigState) == null ? void 0 : ie.onlineChange,
357
+ clearStylesConfigCache: j,
363
358
  defaultTableStylesConfig: O,
364
359
  exportConfig: V,
365
- setTableExportConfig: h,
366
- defaultTableExportConfig: x,
367
- exportStorageType: (ie = e.exportConfigState) == null ? void 0 : ie.persistenceType,
368
- exportStorageKey: (ae = e.exportConfigState) == null ? void 0 : ae.persistenceKey,
369
- onlineExportConfigChange: (oe = e.exportConfigState) == null ? void 0 : oe.onlineChange,
370
- clearExportConfigCache: j,
371
- zebra: he,
360
+ setTableExportConfig: x,
361
+ defaultTableExportConfig: h,
362
+ exportStorageType: (ae = e.exportConfigState) == null ? void 0 : ae.persistenceType,
363
+ exportStorageKey: (oe = e.exportConfigState) == null ? void 0 : oe.persistenceKey,
364
+ onlineExportConfigChange: (ce = e.exportConfigState) == null ? void 0 : ce.onlineChange,
365
+ clearExportConfigCache: M,
366
+ zebra: Te,
372
367
  rowHoverable: xe,
373
- showColumnBorder: Te,
374
- hideRowBorder: be
368
+ showColumnBorder: be,
369
+ hideRowBorder: Ke
375
370
  };
376
- return Object.defineProperty(M, "uuid", {
371
+ return Object.defineProperty(k, "uuid", {
377
372
  get: () => T.current
378
- }), M;
373
+ }), k;
379
374
  }
380
- const Me = ve({}), Fe = (e) => {
381
- const T = je(e.initValue);
382
- return /* @__PURE__ */ Ve.jsx(Me.Provider, { value: T, children: e.children });
375
+ const ke = ze({}), Ge = (e) => {
376
+ const T = Me(e.initValue);
377
+ return /* @__PURE__ */ ve.jsx(ke.Provider, { value: T, children: e.children });
383
378
  };
384
379
  export {
385
- Me as BitzTableContext,
386
- Je as SORTER_COLUMN,
387
- Fe as default,
388
- Be as toolCols
380
+ ke as BitzTableContext,
381
+ Be as SORTER_COLUMN,
382
+ Ge as default,
383
+ je as toolCols
389
384
  };
@@ -1,41 +1,41 @@
1
- const l = (e, i, x) => ((f, d) => f.map((t) => {
2
- const s = u(t, t.index), o = d[s];
3
- return o && o.show === !1 ? !1 : {
4
- ...t,
5
- ...o
6
- // ...(item?.isOperationCol && !finish) && {
7
- // width: item?.width,
8
- // },
1
+ const u = (r, d, x) => ((f, o) => f.map((e) => {
2
+ const s = l(e, e.index), i = o[s];
3
+ return i && i.show === !1 ? !1 : {
4
+ ...e,
5
+ ...i,
6
+ ...(e == null ? void 0 : e.isOperationCol) && !x && {
7
+ width: e == null ? void 0 : e.width
8
+ }
9
9
  };
10
- }))(e, i).filter(Boolean), u = (e, i) => "key" in e && e.key !== void 0 && e.key !== null ? e.key : e.dataIndex ? Array.isArray(e.dataIndex) ? e.dataIndex.join("-") : e.dataIndex : `${i}`, k = (e) => (i, x) => {
11
- var r, y, a, c;
12
- const { fixed: n, index: f } = i, { fixed: d, index: t } = x;
13
- if (n === "left" && d !== "left" || d === "right" && n !== "right")
10
+ }))(r, d).filter(Boolean), l = (r, d) => "key" in r && r.key !== void 0 && r.key !== null ? r.key : r.dataIndex ? Array.isArray(r.dataIndex) ? r.dataIndex.join("-") : r.dataIndex : `${d}`, h = (r) => (d, x) => {
11
+ var n, a, y, c;
12
+ const { fixed: t, index: f } = d, { fixed: o, index: e } = x;
13
+ if (t === "left" && o !== "left" || o === "right" && t !== "right")
14
14
  return -2;
15
- if (d === "left" && n !== "left" || n === "right" && d !== "right")
15
+ if (o === "left" && t !== "left" || t === "right" && o !== "right")
16
16
  return 2;
17
- const s = i.key || `${f}`, o = x.key || `${t}`;
18
- return (r = e[s]) != null && r.order || (y = e[o]) != null && y.order ? (((a = e[s]) == null ? void 0 : a.order) || 0) - (((c = e[o]) == null ? void 0 : c.order) || 0) : (i.index || 0) - (x.index || 0);
17
+ const s = d.key || `${f}`, i = x.key || `${e}`;
18
+ return (n = r[s]) != null && n.order || (a = r[i]) != null && a.order ? (((y = r[s]) == null ? void 0 : y.order) || 0) - (((c = r[i]) == null ? void 0 : c.order) || 0) : (d.index || 0) - (x.index || 0);
19
19
  };
20
- function h(e, i, x) {
21
- const n = {};
20
+ function k(r, d, x) {
21
+ const t = {};
22
22
  let f = "";
23
- const d = (t, s, o) => {
24
- for (const r in t)
25
- if (t.hasOwnProperty(r) && (typeof t[r] == "object" && t[r] !== null && (f = r, n[r] = { ...t[r] }, d(t[r], s, o)), r === s)) {
26
- const y = n[f];
27
- n[f] = {
28
- ...y,
29
- [s]: o
23
+ const o = (e, s, i) => {
24
+ for (const n in e)
25
+ if (e.hasOwnProperty(n) && (typeof e[n] == "object" && e[n] !== null && (f = n, t[n] = { ...e[n] }, o(e[n], s, i)), n === s)) {
26
+ const a = t[f];
27
+ t[f] = {
28
+ ...a,
29
+ [s]: i
30
30
  // [prop]: current.disabled || current.fixed ? true : val,
31
31
  }, f = "";
32
32
  }
33
33
  };
34
- return d(e, i, x), n;
34
+ return o(r, d, x), t;
35
35
  }
36
36
  export {
37
- k as columnSort,
38
- u as genColumnKey,
39
- l as loopFilter,
40
- h as updateNestedObject
37
+ h as columnSort,
38
+ l as genColumnKey,
39
+ u as loopFilter,
40
+ k as updateNestedObject
41
41
  };