bitz-react-admin-ui 2.1.3 → 2.1.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 (48) hide show
  1. package/dist/assets/iconfont/IconColumnCancelFixed.d.ts +7 -0
  2. package/dist/assets/iconfont/IconColumnCancelFixed.mjs +35 -0
  3. package/dist/assets/iconfont/IconColumnFixedLeft.d.ts +7 -0
  4. package/dist/assets/iconfont/IconColumnFixedLeft.mjs +35 -0
  5. package/dist/assets/iconfont/IconColumnFixedRight.d.ts +7 -0
  6. package/dist/assets/iconfont/IconColumnFixedRight.mjs +35 -0
  7. package/dist/assets/iconfont/IconDragOrder.d.ts +7 -0
  8. package/dist/assets/iconfont/IconDragOrder.mjs +35 -0
  9. package/dist/assets/iconfont/index.d.ts +5 -1
  10. package/dist/assets/iconfont/index.mjs +105 -89
  11. package/dist/components/BitzFluentInput/index.d.ts +2 -5
  12. package/dist/components/BitzFluentInput/index.mjs +4 -58
  13. package/dist/components/BitzFluentSelect/index.d.ts +4 -5
  14. package/dist/components/BitzFluentSelect/index.mjs +4 -58
  15. package/dist/components/BitzFluentTreeSelect/index.mjs +6 -0
  16. package/dist/components/BitzTable/Dropdown/index.mjs +16 -15
  17. package/dist/components/BitzTable/Select/index.d.ts +4 -0
  18. package/dist/components/BitzTable/Select/index.mjs +11 -0
  19. package/dist/components/BitzTable/Select/style.d.ts +4 -0
  20. package/dist/components/BitzTable/Select/style.mjs +66 -0
  21. package/dist/components/BitzTable/Store/index.d.ts +52 -9
  22. package/dist/components/BitzTable/Store/index.mjs +276 -156
  23. package/dist/components/BitzTable/Store/utils/index.mjs +26 -25
  24. package/dist/components/BitzTable/Table/index.mjs +226 -229
  25. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +82 -67
  26. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +118 -61
  27. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.d.ts +4 -3
  28. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +48 -47
  29. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +5 -1
  30. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +84 -15
  31. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +59 -50
  32. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.d.ts +1 -1
  33. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +47 -21
  34. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.d.ts +11 -0
  35. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.mjs +97 -0
  36. package/dist/components/BitzTable/ToolBar/ExportIcon/index.d.ts +1 -6
  37. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +63 -32
  38. package/dist/components/BitzTable/ToolBar/index.d.ts +9 -3
  39. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +148 -123
  40. package/dist/components/BitzTableSelect/TextBlock/index.mjs +21 -18
  41. package/dist/index.d.ts +1 -0
  42. package/dist/index.mjs +94 -92
  43. package/dist/style.css +1 -1
  44. package/dist/utils/WithFluent.d.ts +9 -0
  45. package/dist/utils/WithFluent.mjs +58 -0
  46. package/package.json +2 -1
  47. package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/PicRightOutlined.mjs +0 -5
  48. package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/PicRightOutlined.mjs +0 -15
@@ -1,234 +1,354 @@
1
- import { j as le } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import Q from "../../../hooks/useMergedState.mjs";
3
- import { createContext as ae, useRef as W, useContext as se, useEffect as m, useMemo as ue, useCallback as X } from "react";
4
- import { genColumnKey as oe } from "./utils/index.mjs";
5
- import { getUuid as fe } from "../../../utils/uuid.mjs";
6
- import { BitzConfigContext as re } from "../../BitzConfigProvider/context.mjs";
7
- import g from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
8
- function ye(e) {
9
- var O, J, M, N, j, I, B, P, k, D, E, Z, R, G, U, q;
10
- const C = W(fe()), h = W([]), r = se(re).Table, Y = r == null ? void 0 : r.defaultSize, b = e.defaultSize ?? Y ?? "lg", _ = r == null ? void 0 : r.zebra, $ = e.defaultZebra ?? _ ?? !0, p = r == null ? void 0 : r.bordered, ee = e.defaultBordered ?? p ?? "row-column", K = e.defaultStylesConfig || {
11
- size: b,
12
- zebra: $,
13
- bordered: ee
14
- }, [T, x] = Q(
1
+ import { j as be } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import J from "../../../hooks/useMergedState.mjs";
3
+ import { createContext as Ve, useRef as re, useContext as ve, useEffect as d, useMemo as C, useCallback as N } from "react";
4
+ import { genColumnKey as se } from "./utils/index.mjs";
5
+ import { getUuid as ze } from "../../../utils/uuid.mjs";
6
+ import { BitzConfigContext as Oe } from "../../BitzConfigProvider/context.mjs";
7
+ import S from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
8
+ function Je(e) {
9
+ var H, P, k, R, G, Z, D, U, q, A, F, L, Q, W, X, Y, _, $, p, ee, te, ne, ie, ae, ce;
10
+ const K = re(ze()), b = re([]), r = ve(Oe).Table, ye = r == null ? void 0 : r.defaultSize, I = e.defaultSize ?? ye ?? "lg", de = e.defaultZebra ?? (r == null ? void 0 : r.zebra) ?? !0, Se = e.defaultBordered ?? (r == null ? void 0 : r.bordered) ?? "row-column", V = e.defaultStylesConfig || {
11
+ size: I,
12
+ zebra: de,
13
+ bordered: Se
14
+ }, [y, E] = J(
15
15
  () => {
16
- var n, a, l, s;
17
- const { persistenceType: t, persistenceKey: c, onlineGet: i } = e.stylesConfigState || {};
18
- if (c && t && typeof window < "u" && t !== "online") {
19
- const o = window[t];
16
+ var n, o, c, l;
17
+ const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.stylesConfigState || {};
18
+ if (i && t && typeof window < "u" && t !== "online") {
19
+ const u = window[t];
20
20
  try {
21
- const u = o == null ? void 0 : o.getItem(c);
22
- if (u)
23
- return (n = e == null ? void 0 : e.stylesConfigState) != null && n.defaultValue ? g(
24
- JSON.parse(u),
25
- (a = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : a.defaultValue
26
- ) : JSON.parse(u);
27
- } catch (u) {
28
- console.warn(u);
21
+ const f = u == null ? void 0 : u.getItem(i);
22
+ if (f)
23
+ return (n = e == null ? void 0 : e.stylesConfigState) != null && n.defaultValue ? S(
24
+ JSON.parse(f),
25
+ (o = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : o.defaultValue
26
+ ) : JSON.parse(f);
27
+ } catch (f) {
28
+ console.warn(f);
29
29
  }
30
30
  }
31
- return e.stylesConfig || ((l = e.stylesConfigState) == null ? void 0 : l.value) || ((s = e.stylesConfigState) == null ? void 0 : s.defaultValue) || K;
31
+ return e.stylesConfig || ((c = e.stylesConfigState) == null ? void 0 : c.value) || ((l = e.stylesConfigState) == null ? void 0 : l.defaultValue) || V;
32
32
  },
33
33
  {
34
- value: ((O = e.stylesConfigState) == null ? void 0 : O.value) || e.stylesConfig,
35
- onChange: ((J = e.stylesConfigState) == null ? void 0 : J.onChange) || e.onStylesConfigChange
34
+ value: ((H = e.stylesConfigState) == null ? void 0 : H.value) || e.stylesConfig,
35
+ onChange: ((P = e.stylesConfigState) == null ? void 0 : P.onChange) || e.onStylesConfigChange
36
36
  }
37
37
  );
38
- m(() => {
39
- var i, n;
40
- if (!((i = e.stylesConfigState) != null && i.persistenceKey) || !((n = e.stylesConfigState) != null && n.persistenceType) || typeof window > "u")
38
+ d(() => {
39
+ var a, n;
40
+ if (!((a = e.stylesConfigState) != null && a.persistenceKey) || !((n = e.stylesConfigState) != null && n.persistenceType) || typeof window > "u")
41
41
  return;
42
42
  const {
43
43
  persistenceType: t,
44
- persistenceKey: c
44
+ persistenceKey: i
45
45
  // onlineChange
46
46
  } = e.stylesConfigState;
47
47
  if (t !== "online") {
48
- const a = window[t];
48
+ const o = window[t];
49
49
  try {
50
- a == null || a.setItem(c, JSON.stringify(w));
51
- } catch (l) {
52
- console.warn(l), z();
50
+ o == null || o.setItem(i, JSON.stringify(y));
51
+ } catch (c) {
52
+ console.warn(c), M();
53
53
  }
54
54
  }
55
55
  }, [
56
- (M = e.stylesConfigState) == null ? void 0 : M.persistenceKey,
57
- T,
58
- (N = e.stylesConfigState) == null ? void 0 : N.persistenceType
59
- ]), m(() => {
60
- var t, c, i;
61
- if ((t = e.stylesConfigState) != null && t.persistenceKey && ((c = e.stylesConfigState) == null ? void 0 : c.persistenceType) === "online") {
62
- const { onlineGet: n, persistenceKey: a } = e.stylesConfigState;
56
+ (k = e.stylesConfigState) == null ? void 0 : k.persistenceKey,
57
+ y,
58
+ (R = e.stylesConfigState) == null ? void 0 : R.persistenceType
59
+ ]), d(() => {
60
+ var t, i, a;
61
+ if ((t = e.stylesConfigState) != null && t.persistenceKey && ((i = e.stylesConfigState) == null ? void 0 : i.persistenceType) === "online") {
62
+ const { onlineGet: n, persistenceKey: o } = e.stylesConfigState;
63
63
  try {
64
- (i = n == null ? void 0 : n(a)) == null || i.then((l) => {
65
- var o, u;
66
- const s = g(l, (o = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : o.value);
67
- x(
68
- (u = Object.keys(s ?? {})) != null && u.length ? s ?? {} : K
64
+ (a = n == null ? void 0 : n(o)) == null || a.then((c) => {
65
+ var u, f;
66
+ const l = S(c, (u = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : u.value);
67
+ E(
68
+ (f = Object.keys(l ?? {})) != null && f.length ? l ?? {} : V
69
69
  );
70
70
  });
71
+ } catch (c) {
72
+ console.warn(c);
73
+ }
74
+ }
75
+ }, []);
76
+ const m = C(() => {
77
+ var i, a;
78
+ if ((i = e == null ? void 0 : e.exportConfigState) != null && i.defaultValue)
79
+ return e.exportConfigState.defaultValue;
80
+ const t = [];
81
+ return (a = e.columns) == null || a.forEach(
82
+ ({ key: n, dataIndex: o, title: c }, l) => {
83
+ const u = se(n ?? o, l);
84
+ u && t.push({
85
+ field: u,
86
+ title: c,
87
+ show: !0
88
+ });
89
+ }
90
+ ), t;
91
+ }, [e.columns]), [v, w] = J(
92
+ () => {
93
+ var n, o, c, l;
94
+ const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.exportConfigState || {};
95
+ if (i && t && typeof window < "u" && t !== "online") {
96
+ const u = window[t];
97
+ try {
98
+ const f = u == null ? void 0 : u.getItem(i);
99
+ if (f)
100
+ return (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? S(
101
+ JSON.parse(f),
102
+ (o = e == null ? void 0 : e.exportConfigState) == null ? void 0 : o.defaultValue
103
+ ) : JSON.parse(f);
104
+ } catch (f) {
105
+ console.warn(f);
106
+ }
107
+ }
108
+ return e.exportConfig || ((c = e.exportConfigState) == null ? void 0 : c.value) || ((l = e.exportConfigState) == null ? void 0 : l.defaultValue) || m;
109
+ },
110
+ {
111
+ value: ((G = e.exportConfigState) == null ? void 0 : G.value) || e.exportConfig,
112
+ onChange: ((Z = e.exportConfigState) == null ? void 0 : Z.onChange) || e.onExportConfigChange
113
+ }
114
+ );
115
+ d(() => {
116
+ var n, o;
117
+ const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.exportConfigState || {};
118
+ if (i && t && typeof window < "u" && t !== "online") {
119
+ const c = window[t];
120
+ try {
121
+ const l = c == null ? void 0 : c.getItem(i);
122
+ l ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? w(
123
+ S(
124
+ JSON.parse(l),
125
+ (o = e == null ? void 0 : e.exportConfigState) == null ? void 0 : o.defaultValue
126
+ )
127
+ ) : w(JSON.parse(l)) : w(m);
71
128
  } catch (l) {
72
129
  console.warn(l);
73
130
  }
74
131
  }
132
+ }, [
133
+ (D = e.exportConfigState) == null ? void 0 : D.persistenceKey,
134
+ (U = e.exportConfigState) == null ? void 0 : U.persistenceType,
135
+ m
136
+ ]), d(() => {
137
+ var a, n;
138
+ if (!((a = e.exportConfigState) != null && a.persistenceKey) || !((n = e.exportConfigState) != null && n.persistenceType) || typeof window > "u")
139
+ return;
140
+ const {
141
+ persistenceType: t,
142
+ persistenceKey: i
143
+ // onlineChange
144
+ } = e.exportConfigState;
145
+ if (t !== "online") {
146
+ const o = window[t];
147
+ try {
148
+ o == null || o.setItem(i, JSON.stringify(v));
149
+ } catch (c) {
150
+ console.warn(c), j();
151
+ }
152
+ }
153
+ }, [
154
+ (q = e.exportConfigState) == null ? void 0 : q.persistenceKey,
155
+ v,
156
+ (A = e.exportConfigState) == null ? void 0 : A.persistenceType
157
+ ]), d(() => {
158
+ var t, i, a;
159
+ if ((t = e.exportConfigState) != null && t.persistenceKey && ((i = e.exportConfigState) == null ? void 0 : i.persistenceType) === "online") {
160
+ const { onlineGet: n, persistenceKey: o } = e.exportConfigState;
161
+ try {
162
+ (a = n == null ? void 0 : n(o)) == null || a.then((c) => {
163
+ var u;
164
+ const l = S(c, (u = e == null ? void 0 : e.exportConfigState) == null ? void 0 : u.value);
165
+ w(l ?? m);
166
+ });
167
+ } catch (c) {
168
+ console.warn(c);
169
+ }
170
+ }
75
171
  }, []);
76
- const d = ue(() => {
77
- var l, s, o, u, A, F, H;
78
- if ((l = e == null ? void 0 : e.columnsState) != null && l.defaultValue)
172
+ const x = C(() => {
173
+ var c, l, u, f, oe, le, ue;
174
+ if ((c = e == null ? void 0 : e.columnsState) != null && c.defaultValue)
79
175
  return e.columnsState.defaultValue;
80
- const t = ((o = (s = e.columns) == null ? void 0 : s.filter((f) => f.fixed === "left")) == null ? void 0 : o.map((f, y) => ({ ...f, order: y }))) ?? [], c = ((A = (u = e.columns) == null ? void 0 : u.filter((f) => f.fixed === "right")) == null ? void 0 : A.map((f, y) => ({ ...f, order: y }))) ?? [], i = ((H = (F = e.columns) == null ? void 0 : F.filter((f) => !["left", "right"].includes(f.fixed))) == null ? void 0 : H.map((f, y) => ({ ...f, order: y }))) ?? [], n = [...t, ...i, ...c], a = {};
176
+ const t = ((u = (l = e.columns) == null ? void 0 : l.filter((s) => s.fixed === "left")) == null ? void 0 : u.map((s, g) => ({ ...s, order: g }))) ?? [], i = ((oe = (f = e.columns) == null ? void 0 : f.filter((s) => s.fixed === "right")) == null ? void 0 : oe.map((s, g) => ({ ...s, order: g }))) ?? [], a = ((ue = (le = e.columns) == null ? void 0 : le.filter((s) => !["left", "right"].includes(s.fixed))) == null ? void 0 : ue.map((s, g) => ({ ...s, order: g }))) ?? [], n = [...t, ...a, ...i], o = {};
81
177
  return n == null || n.forEach(
82
- ({ key: f, dataIndex: y, order: te, fixed: ne, disabled: ce }, ie) => {
83
- const L = oe(f ?? y, ie);
84
- L && (a[L] = {
178
+ ({ key: s, dataIndex: g, order: xe, fixed: he, disabled: Ke }, Te) => {
179
+ const fe = se(s ?? g, Te);
180
+ fe && (o[fe] = {
85
181
  show: !0,
86
- order: te,
87
- fixed: ne,
88
- disabled: ce
182
+ order: xe,
183
+ fixed: he,
184
+ disabled: Ke
89
185
  });
90
186
  }
91
- ), a;
92
- }, [e.columns]), [w, S] = Q(
187
+ ), o;
188
+ }, [e.columns]), [z, h] = J(
93
189
  () => {
94
- var n, a, l, s;
95
- const { persistenceType: t, persistenceKey: c, onlineGet: i } = e.columnsState || {};
96
- if (c && t && typeof window < "u" && t !== "online") {
97
- const o = window[t];
190
+ var n, o, c, l;
191
+ const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.columnsState || {};
192
+ if (i && t && typeof window < "u" && t !== "online") {
193
+ const u = window[t];
98
194
  try {
99
- const u = o == null ? void 0 : o.getItem(c);
100
- if (u)
101
- return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? g(
102
- JSON.parse(u),
103
- (a = e == null ? void 0 : e.columnsState) == null ? void 0 : a.defaultValue
104
- ) : JSON.parse(u);
105
- } catch (u) {
106
- console.warn(u);
195
+ const f = u == null ? void 0 : u.getItem(i);
196
+ if (f)
197
+ return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? S(
198
+ JSON.parse(f),
199
+ (o = e == null ? void 0 : e.columnsState) == null ? void 0 : o.defaultValue
200
+ ) : JSON.parse(f);
201
+ } catch (f) {
202
+ console.warn(f);
107
203
  }
108
204
  }
109
- return e.columnsStateMap || ((l = e.columnsState) == null ? void 0 : l.value) || ((s = e.columnsState) == null ? void 0 : s.defaultValue) || d;
205
+ return e.columnsStateMap || ((c = e.columnsState) == null ? void 0 : c.value) || ((l = e.columnsState) == null ? void 0 : l.defaultValue) || x;
110
206
  },
111
207
  {
112
- value: ((j = e.columnsState) == null ? void 0 : j.value) || e.columnsStateMap,
113
- onChange: ((I = e.columnsState) == null ? void 0 : I.onChange) || e.onColumnsStateChange
208
+ value: ((F = e.columnsState) == null ? void 0 : F.value) || e.columnsStateMap,
209
+ onChange: ((L = e.columnsState) == null ? void 0 : L.onChange) || e.onColumnsStateChange
114
210
  }
115
211
  );
116
- m(() => {
117
- var n, a;
118
- const { persistenceType: t, persistenceKey: c, onlineGet: i } = e.columnsState || {};
119
- if (c && t && typeof window < "u" && t !== "online") {
120
- const l = window[t];
212
+ d(() => {
213
+ var n, o;
214
+ const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.columnsState || {};
215
+ if (i && t && typeof window < "u" && t !== "online") {
216
+ const c = window[t];
121
217
  try {
122
- const s = l == null ? void 0 : l.getItem(c);
123
- s ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? S(
124
- g(
125
- JSON.parse(s),
126
- (a = e == null ? void 0 : e.columnsState) == null ? void 0 : a.defaultValue
218
+ const l = c == null ? void 0 : c.getItem(i);
219
+ l ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? h(
220
+ S(
221
+ JSON.parse(l),
222
+ (o = e == null ? void 0 : e.columnsState) == null ? void 0 : o.defaultValue
127
223
  )
128
- ) : S(JSON.parse(s)) : S(d);
129
- } catch (s) {
130
- console.warn(s);
224
+ ) : h(JSON.parse(l)) : h(x);
225
+ } catch (l) {
226
+ console.warn(l);
131
227
  }
132
228
  }
133
229
  }, [
134
- (B = e.columnsState) == null ? void 0 : B.persistenceKey,
135
- (P = e.columnsState) == null ? void 0 : P.persistenceType,
136
- d
230
+ (Q = e.columnsState) == null ? void 0 : Q.persistenceKey,
231
+ (W = e.columnsState) == null ? void 0 : W.persistenceType,
232
+ x
137
233
  ]);
138
- const v = X(() => {
139
- const { persistenceType: t, persistenceKey: c } = e.columnsState || {};
140
- if (!c || !t || typeof window > "u")
234
+ const B = N(() => {
235
+ const { persistenceType: t, persistenceKey: i } = e.columnsState || {};
236
+ if (!i || !t || typeof window > "u")
141
237
  return;
142
- const i = window[t];
238
+ const a = window[t];
143
239
  try {
144
- i == null || i.removeItem(c);
240
+ a == null || a.removeItem(i);
145
241
  } catch (n) {
146
242
  console.warn(n);
147
243
  }
148
- }, [e.columnsState]), z = X(() => {
149
- const { persistenceType: t, persistenceKey: c } = e.stylesConfigState || {};
150
- if (!c || !t || typeof window > "u")
244
+ }, [e.columnsState]), M = N(() => {
245
+ const { persistenceType: t, persistenceKey: i } = e.stylesConfigState || {};
246
+ if (!i || !t || typeof window > "u")
151
247
  return;
152
- const i = window[t];
248
+ const a = window[t];
153
249
  try {
154
- i == null || i.removeItem(c);
250
+ a == null || a.removeItem(i);
155
251
  } catch (n) {
156
252
  console.warn(n);
157
253
  }
158
- }, [e.stylesConfigState]);
159
- m(() => {
160
- var i, n;
161
- if (!((i = e.columnsState) != null && i.persistenceKey) || !((n = e.columnsState) != null && n.persistenceType) || typeof window > "u")
254
+ }, [e.stylesConfigState]), j = N(() => {
255
+ const { persistenceType: t, persistenceKey: i } = e.exportConfigState || {};
256
+ if (!i || !t || typeof window > "u")
257
+ return;
258
+ const a = window[t];
259
+ try {
260
+ a == null || a.removeItem(i);
261
+ } catch (n) {
262
+ console.warn(n);
263
+ }
264
+ }, [e.exportConfigState]);
265
+ d(() => {
266
+ var a, n;
267
+ if (!((a = e.columnsState) != null && a.persistenceKey) || !((n = e.columnsState) != null && n.persistenceType) || typeof window > "u")
162
268
  return;
163
269
  const {
164
270
  persistenceType: t,
165
- persistenceKey: c
271
+ persistenceKey: i
166
272
  // onlineChange
167
273
  } = e.columnsState;
168
274
  if (t !== "online") {
169
- const a = window[t];
275
+ const o = window[t];
170
276
  try {
171
- a == null || a.setItem(c, JSON.stringify(w));
172
- } catch (l) {
173
- console.warn(l), v();
277
+ o == null || o.setItem(i, JSON.stringify(z));
278
+ } catch (c) {
279
+ console.warn(c), B();
174
280
  }
175
281
  }
176
282
  }, [
177
- (k = e.columnsState) == null ? void 0 : k.persistenceKey,
178
- w,
179
- (D = e.columnsState) == null ? void 0 : D.persistenceType
180
- ]), m(() => {
181
- var t, c, i;
182
- if ((t = e.columnsState) != null && t.persistenceKey && ((c = e.columnsState) == null ? void 0 : c.persistenceType) === "online") {
183
- const { onlineGet: n, persistenceKey: a } = e.columnsState;
283
+ (X = e.columnsState) == null ? void 0 : X.persistenceKey,
284
+ z,
285
+ (Y = e.columnsState) == null ? void 0 : Y.persistenceType
286
+ ]), d(() => {
287
+ var t, i, a;
288
+ if ((t = e.columnsState) != null && t.persistenceKey && ((i = e.columnsState) == null ? void 0 : i.persistenceType) === "online") {
289
+ const { onlineGet: n, persistenceKey: o } = e.columnsState;
184
290
  try {
185
- (i = n == null ? void 0 : n(a)) == null || i.then((l) => {
186
- var o, u;
187
- const s = g(l, (o = e == null ? void 0 : e.columnsState) == null ? void 0 : o.value);
188
- S(
189
- (u = Object.keys(s ?? {})) != null && u.length ? s ?? {} : d
291
+ (a = n == null ? void 0 : n(o)) == null || a.then((c) => {
292
+ var u, f;
293
+ const l = S(c, (u = e == null ? void 0 : e.columnsState) == null ? void 0 : u.value);
294
+ h(
295
+ (f = Object.keys(l ?? {})) != null && f.length ? l ?? {} : x
190
296
  );
191
297
  });
192
- } catch (l) {
193
- console.warn(l);
298
+ } catch (c) {
299
+ console.warn(c);
194
300
  }
195
301
  }
196
302
  }, []);
197
- const V = {
198
- uuid: C.current,
199
- persistenceType: (E = e.columnsState) == null ? void 0 : E.persistenceType,
200
- persistenceKey: (Z = e.columnsState) == null ? void 0 : Z.persistenceKey,
201
- onlineChange: (R = e.columnsState) == null ? void 0 : R.onlineChange,
202
- sortKeyColumns: h.current,
303
+ const ge = C(() => (e == null ? void 0 : e.rowHoverable) ?? (r == null ? void 0 : r.rowHoverable) ?? !0, [e == null ? void 0 : e.rowHoverable, r == null ? void 0 : r.rowHoverable]), Ce = C(() => e.zebra ?? y.zebra, [e.zebra, y.zebra]), T = C(() => e.bordered ?? y.bordered, [e.bordered, y.bordered]), me = C(() => ["column", "row-column"].includes(T), [T]), we = C(() => {
304
+ let t = !1;
305
+ return ["hide", "column"].includes(T) && (t = !0), t;
306
+ }, [T]), O = {
307
+ uuid: K.current,
308
+ columns: e.columns,
309
+ persistenceType: (_ = e.columnsState) == null ? void 0 : _.persistenceType,
310
+ persistenceKey: ($ = e.columnsState) == null ? void 0 : $.persistenceKey,
311
+ onlineChange: (p = e.columnsState) == null ? void 0 : p.onlineChange,
312
+ sortKeyColumns: b.current,
203
313
  setSortKeyColumns: (t) => {
204
- h.current = t;
314
+ b.current = t;
205
315
  },
206
- columnsMap: w,
207
- setColumnsMap: S,
208
- stylesConfig: T,
209
- setTableStylesConfig: x,
210
- defaultTableSize: b,
211
- tableSize: T.size,
212
- stylesStorageType: (G = e.stylesConfigState) == null ? void 0 : G.persistenceType,
213
- stylesStorageKey: (U = e.stylesConfigState) == null ? void 0 : U.persistenceKey,
214
- onlineStylesConfigChange: (q = e.stylesConfigState) == null ? void 0 : q.onlineChange,
215
- columns: e.columns,
216
- clearPersistenceStorage: v,
217
- clearStylesConfigCache: z,
218
- defaultTableStylesConfig: K,
219
- defaultColumnKeyMap: d
316
+ columnsMap: z,
317
+ setColumnsMap: h,
318
+ defaultColumnKeyMap: x,
319
+ clearPersistenceStorage: B,
320
+ stylesConfig: y,
321
+ setTableStylesConfig: E,
322
+ defaultTableSize: I,
323
+ tableSize: y.size,
324
+ stylesStorageType: (ee = e.stylesConfigState) == null ? void 0 : ee.persistenceType,
325
+ stylesStorageKey: (te = e.stylesConfigState) == null ? void 0 : te.persistenceKey,
326
+ onlineStylesConfigChange: (ne = e.stylesConfigState) == null ? void 0 : ne.onlineChange,
327
+ clearStylesConfigCache: M,
328
+ defaultTableStylesConfig: V,
329
+ exportConfig: v,
330
+ setTableExportConfig: w,
331
+ defaultTableExportConfig: m,
332
+ exportStorageType: (ie = e.exportConfigState) == null ? void 0 : ie.persistenceType,
333
+ exportStorageKey: (ae = e.exportConfigState) == null ? void 0 : ae.persistenceKey,
334
+ onlineExportConfigChange: (ce = e.exportConfigState) == null ? void 0 : ce.onlineChange,
335
+ clearExportConfigCache: j,
336
+ zebra: Ce,
337
+ rowHoverable: ge,
338
+ showColumnBorder: me,
339
+ hideRowBorder: we
220
340
  };
221
- return Object.defineProperty(V, "sortKeyColumns", {
222
- get: () => h.current
223
- }), Object.defineProperty(V, "uuid", {
224
- get: () => C.current
225
- }), V;
341
+ return Object.defineProperty(O, "sortKeyColumns", {
342
+ get: () => b.current
343
+ }), Object.defineProperty(O, "uuid", {
344
+ get: () => K.current
345
+ }), O;
226
346
  }
227
- const de = ae({}), Te = (e) => {
228
- const C = ye(e.initValue);
229
- return /* @__PURE__ */ le.jsx(de.Provider, { value: C, children: e.children });
347
+ const Ne = Ve({}), ke = (e) => {
348
+ const K = Je(e.initValue);
349
+ return /* @__PURE__ */ be.jsx(Ne.Provider, { value: K, children: e.children });
230
350
  };
231
351
  export {
232
- de as BitzTableContext,
233
- Te as default
352
+ Ne as BitzTableContext,
353
+ ke as default
234
354
  };
@@ -1,37 +1,38 @@
1
- const a = (r, f) => {
2
- let i = 0, t = 0;
1
+ const a = (r, d) => {
2
+ let f = 0, t = 0;
3
3
  return {
4
- filterColumns: ((o, s) => o.map((e) => {
5
- const n = h((e == null ? void 0 : e.key) || (e == null ? void 0 : e.dataIndex), e.index), d = s[n];
6
- return d && d.show === !1 ? (e.width ? i += e.width : t += 1, !1) : { ...e, ...d };
7
- }))(r, f).filter(Boolean),
8
- width: i,
4
+ filterColumns: ((o, l) => o.map((n) => {
5
+ const e = h((n == null ? void 0 : n.key) || (n == null ? void 0 : n.dataIndex), n.index), s = l[e];
6
+ return s && s.show === !1 ? (n.width ? f += n.width : t += 1, !1) : { ...n, ...s };
7
+ }))(r, d).filter(Boolean),
8
+ width: f,
9
9
  autoWidthColLength: t
10
10
  };
11
- }, h = (r, f) => r ? Array.isArray(r) ? r.join("-") : r.toString() : `${f}`, y = (r) => (f, i) => {
12
- var n, d, c, x;
13
- const { fixed: t, index: u } = f, { fixed: l, index: o } = i;
14
- if (t === "left" && l !== "left" || l === "right" && t !== "right")
11
+ }, h = (r, d) => r ? Array.isArray(r) ? r.join("-") : r.toString() : `${d}`, y = (r) => (d, f) => {
12
+ var e, s, u, x;
13
+ const { fixed: t, index: c } = d, { fixed: i, index: o } = f;
14
+ if (t === "left" && i !== "left" || i === "right" && t !== "right")
15
15
  return -2;
16
- if (l === "left" && t !== "left" || t === "right" && l !== "right")
16
+ if (i === "left" && t !== "left" || t === "right" && i !== "right")
17
17
  return 2;
18
- const s = f.key || `${u}`, e = i.key || `${o}`;
19
- return (n = r[s]) != null && n.order || (d = r[e]) != null && d.order ? (((c = r[s]) == null ? void 0 : c.order) || 0) - (((x = r[e]) == null ? void 0 : x.order) || 0) : (f.index || 0) - (i.index || 0);
18
+ const l = d.key || `${c}`, n = f.key || `${o}`;
19
+ return (e = r[l]) != null && e.order || (s = r[n]) != null && s.order ? (((u = r[l]) == null ? void 0 : u.order) || 0) - (((x = r[n]) == null ? void 0 : x.order) || 0) : (d.index || 0) - (f.index || 0);
20
20
  };
21
- function g(r, f, i) {
21
+ function g(r, d, f) {
22
22
  const t = {};
23
- let u = "";
24
- const l = (o, s, e) => {
25
- for (const n in o)
26
- if (o.hasOwnProperty(n) && (typeof o[n] == "object" && o[n] !== null && (u = n, t[n] = { ...o[n] }, l(o[n], s, e)), n === s)) {
27
- const d = t[u];
28
- t[u] = {
29
- ...d,
30
- [s]: d.disabled || d.fixed ? !0 : e
31
- }, u = "";
23
+ let c = "";
24
+ const i = (o, l, n) => {
25
+ for (const e in o)
26
+ if (o.hasOwnProperty(e) && (typeof o[e] == "object" && o[e] !== null && (c = e, t[e] = { ...o[e] }, i(o[e], l, n)), e === l)) {
27
+ const s = t[c];
28
+ t[c] = {
29
+ ...s,
30
+ [l]: n
31
+ // [prop]: current.disabled || current.fixed ? true : val,
32
+ }, c = "";
32
33
  }
33
34
  };
34
- return l(r, f, i), t;
35
+ return i(r, d, f), t;
35
36
  }
36
37
  export {
37
38
  y as columnSort,