bitz-react-admin-ui 2.1.3 → 2.1.5

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 (65) hide show
  1. package/dist/_virtual/dayjs.min.mjs +5 -2
  2. package/dist/_virtual/dayjs.min2.mjs +4 -0
  3. package/dist/_virtual/index.mjs +2 -2
  4. package/dist/_virtual/index2.mjs +2 -2
  5. package/dist/assets/iconfont/IconColumnCancelFixed.d.ts +7 -0
  6. package/dist/assets/iconfont/IconColumnCancelFixed.mjs +35 -0
  7. package/dist/assets/iconfont/IconColumnFixedLeft.d.ts +7 -0
  8. package/dist/assets/iconfont/IconColumnFixedLeft.mjs +35 -0
  9. package/dist/assets/iconfont/IconColumnFixedRight.d.ts +7 -0
  10. package/dist/assets/iconfont/IconColumnFixedRight.mjs +35 -0
  11. package/dist/assets/iconfont/IconDragOrder.d.ts +7 -0
  12. package/dist/assets/iconfont/IconDragOrder.mjs +35 -0
  13. package/dist/assets/iconfont/index.d.ts +5 -1
  14. package/dist/assets/iconfont/index.mjs +105 -89
  15. package/dist/components/BitzCalendar/index.mjs +1 -1
  16. package/dist/components/BitzDayJs/index.mjs +1 -1
  17. package/dist/components/BitzFluentInput/index.d.ts +2 -5
  18. package/dist/components/BitzFluentInput/index.mjs +4 -58
  19. package/dist/components/BitzFluentSelect/index.d.ts +4 -5
  20. package/dist/components/BitzFluentSelect/index.mjs +4 -58
  21. package/dist/components/BitzFluentTreeSelect/index.mjs +6 -0
  22. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +1 -1
  23. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +1 -1
  24. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +1 -1
  25. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +1 -1
  26. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +1 -1
  27. package/dist/components/BitzFuiCalendar/ColumnData.mjs +1 -1
  28. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
  29. package/dist/components/BitzMeetingTime/index.mjs +1 -1
  30. package/dist/components/BitzTable/Select/index.d.ts +4 -0
  31. package/dist/components/BitzTable/Select/index.mjs +11 -0
  32. package/dist/components/BitzTable/Select/style.d.ts +4 -0
  33. package/dist/components/BitzTable/Select/style.mjs +66 -0
  34. package/dist/components/BitzTable/Store/index.d.ts +43 -9
  35. package/dist/components/BitzTable/Store/index.mjs +259 -146
  36. package/dist/components/BitzTable/Store/utils/index.mjs +26 -25
  37. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +73 -61
  38. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +118 -61
  39. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.d.ts +4 -3
  40. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +48 -47
  41. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +5 -1
  42. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +84 -15
  43. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +59 -50
  44. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.d.ts +1 -1
  45. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +47 -21
  46. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.d.ts +5 -0
  47. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.mjs +89 -0
  48. package/dist/components/BitzTable/ToolBar/ExportIcon/index.d.ts +1 -2
  49. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +46 -32
  50. package/dist/components/BitzTable/ToolBar/index.d.ts +5 -2
  51. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +148 -123
  52. package/dist/components/BitzTableSelect/TextBlock/index.mjs +21 -18
  53. package/dist/index.d.ts +1 -0
  54. package/dist/index.mjs +94 -92
  55. package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
  56. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
  57. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
  58. package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
  59. package/dist/style.css +1 -1
  60. package/dist/utils/WithFluent.d.ts +9 -0
  61. package/dist/utils/WithFluent.mjs +58 -0
  62. package/dist/utils/time.mjs +1 -1
  63. package/package.json +2 -1
  64. package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/PicRightOutlined.mjs +0 -5
  65. 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,347 @@
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 he } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import O from "../../../hooks/useMergedState.mjs";
3
+ import { createContext as Ke, useRef as fe, useContext as Te, useEffect as y, useMemo as ue, useCallback as J } from "react";
4
+ import { genColumnKey as se } from "./utils/index.mjs";
5
+ import { getUuid as Ve } from "../../../utils/uuid.mjs";
6
+ import { BitzConfigContext as be } from "../../BitzConfigProvider/context.mjs";
7
+ import S from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
8
+ function ve(e) {
9
+ var j, B, P, k, D, Z, G, R, U, q, A, F, H, L, Q, W, X, Y, _, $, p, ee, te, ne, ie;
10
+ const x = fe(Ve()), K = fe([]), r = Te(be).Table, re = r == null ? void 0 : r.defaultSize, N = e.defaultSize ?? re ?? "lg", ye = r == null ? void 0 : r.zebra, Se = e.defaultZebra ?? ye ?? !0, de = r == null ? void 0 : r.bordered, ge = e.defaultBordered ?? de ?? "row-column", T = e.defaultStylesConfig || {
11
+ size: N,
12
+ zebra: Se,
13
+ bordered: ge
14
+ }, [h, z] = O(
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 f = window[t];
20
20
  try {
21
- const u = o == null ? void 0 : o.getItem(c);
21
+ const u = f == null ? void 0 : f.getItem(i);
22
22
  if (u)
23
- return (n = e == null ? void 0 : e.stylesConfigState) != null && n.defaultValue ? g(
23
+ return (n = e == null ? void 0 : e.stylesConfigState) != null && n.defaultValue ? S(
24
24
  JSON.parse(u),
25
- (a = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : a.defaultValue
25
+ (o = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : o.defaultValue
26
26
  ) : JSON.parse(u);
27
27
  } catch (u) {
28
28
  console.warn(u);
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) || T;
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: ((j = e.stylesConfigState) == null ? void 0 : j.value) || e.stylesConfig,
35
+ onChange: ((B = e.stylesConfigState) == null ? void 0 : B.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
+ y(() => {
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(h));
51
+ } catch (c) {
52
+ console.warn(c), E();
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
+ (P = e.stylesConfigState) == null ? void 0 : P.persistenceKey,
57
+ h,
58
+ (k = e.stylesConfigState) == null ? void 0 : k.persistenceType
59
+ ]), y(() => {
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 f, u;
66
+ const l = S(c, (f = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : f.value);
67
+ z(
68
+ (u = Object.keys(l ?? {})) != null && u.length ? l ?? {} : T
69
69
  );
70
70
  });
71
+ } catch (c) {
72
+ console.warn(c);
73
+ }
74
+ }
75
+ }, []);
76
+ const g = ue(() => {
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 f = se(n ?? o, l);
84
+ f && t.push({
85
+ field: f,
86
+ title: c,
87
+ show: !0
88
+ });
89
+ }
90
+ ), t;
91
+ }, [e.columns]), [V, C] = O(
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 f = window[t];
97
+ try {
98
+ const u = f == null ? void 0 : f.getItem(i);
99
+ if (u)
100
+ return (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? S(
101
+ JSON.parse(u),
102
+ (o = e == null ? void 0 : e.exportConfigState) == null ? void 0 : o.defaultValue
103
+ ) : JSON.parse(u);
104
+ } catch (u) {
105
+ console.warn(u);
106
+ }
107
+ }
108
+ return e.exportConfig || ((c = e.exportConfigState) == null ? void 0 : c.value) || ((l = e.exportConfigState) == null ? void 0 : l.defaultValue) || g;
109
+ },
110
+ {
111
+ value: ((D = e.exportConfigState) == null ? void 0 : D.value) || e.exportConfig,
112
+ onChange: ((Z = e.exportConfigState) == null ? void 0 : Z.onChange) || e.onExportConfigChange
113
+ }
114
+ );
115
+ y(() => {
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 ? C(
123
+ S(
124
+ JSON.parse(l),
125
+ (o = e == null ? void 0 : e.exportConfigState) == null ? void 0 : o.defaultValue
126
+ )
127
+ ) : C(JSON.parse(l)) : C(g);
71
128
  } catch (l) {
72
129
  console.warn(l);
73
130
  }
74
131
  }
132
+ }, [
133
+ (G = e.exportConfigState) == null ? void 0 : G.persistenceKey,
134
+ (R = e.exportConfigState) == null ? void 0 : R.persistenceType,
135
+ g
136
+ ]), y(() => {
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), M();
151
+ }
152
+ }
153
+ }, [
154
+ (U = e.exportConfigState) == null ? void 0 : U.persistenceKey,
155
+ V,
156
+ (q = e.exportConfigState) == null ? void 0 : q.persistenceType
157
+ ]), y(() => {
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 f;
164
+ const l = S(c, (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
165
+ C(l ?? g);
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 m = ue(() => {
173
+ var c, l, f, u, ae, ce, oe;
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 = ((f = (l = e.columns) == null ? void 0 : l.filter((s) => s.fixed === "left")) == null ? void 0 : f.map((s, d) => ({ ...s, order: d }))) ?? [], i = ((ae = (u = e.columns) == null ? void 0 : u.filter((s) => s.fixed === "right")) == null ? void 0 : ae.map((s, d) => ({ ...s, order: d }))) ?? [], a = ((oe = (ce = e.columns) == null ? void 0 : ce.filter((s) => !["left", "right"].includes(s.fixed))) == null ? void 0 : oe.map((s, d) => ({ ...s, order: d }))) ?? [], 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: d, order: Ce, fixed: me, disabled: we }, xe) => {
179
+ const le = se(s ?? d, xe);
180
+ le && (o[le] = {
85
181
  show: !0,
86
- order: te,
87
- fixed: ne,
88
- disabled: ce
182
+ order: Ce,
183
+ fixed: me,
184
+ disabled: we
89
185
  });
90
186
  }
91
- ), a;
92
- }, [e.columns]), [w, S] = Q(
187
+ ), o;
188
+ }, [e.columns]), [b, w] = O(
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 f = window[t];
98
194
  try {
99
- const u = o == null ? void 0 : o.getItem(c);
195
+ const u = f == null ? void 0 : f.getItem(i);
100
196
  if (u)
101
- return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? g(
197
+ return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? S(
102
198
  JSON.parse(u),
103
- (a = e == null ? void 0 : e.columnsState) == null ? void 0 : a.defaultValue
199
+ (o = e == null ? void 0 : e.columnsState) == null ? void 0 : o.defaultValue
104
200
  ) : JSON.parse(u);
105
201
  } catch (u) {
106
202
  console.warn(u);
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) || m;
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: ((A = e.columnsState) == null ? void 0 : A.value) || e.columnsStateMap,
209
+ onChange: ((F = e.columnsState) == null ? void 0 : F.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
+ y(() => {
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 ? w(
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
+ ) : w(JSON.parse(l)) : w(m);
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
+ (H = e.columnsState) == null ? void 0 : H.persistenceKey,
231
+ (L = e.columnsState) == null ? void 0 : L.persistenceType,
232
+ m
137
233
  ]);
138
- const v = X(() => {
139
- const { persistenceType: t, persistenceKey: c } = e.columnsState || {};
140
- if (!c || !t || typeof window > "u")
234
+ const I = J(() => {
235
+ const { persistenceType: t, persistenceKey: i } = e.columnsState || {};
236
+ if (!i || !t || typeof window > "u")
237
+ return;
238
+ const a = window[t];
239
+ try {
240
+ a == null || a.removeItem(i);
241
+ } catch (n) {
242
+ console.warn(n);
243
+ }
244
+ }, [e.columnsState]), E = J(() => {
245
+ const { persistenceType: t, persistenceKey: i } = e.stylesConfigState || {};
246
+ if (!i || !t || typeof window > "u")
141
247
  return;
142
- const i = window[t];
248
+ const a = window[t];
143
249
  try {
144
- i == null || i.removeItem(c);
250
+ a == null || a.removeItem(i);
145
251
  } catch (n) {
146
252
  console.warn(n);
147
253
  }
148
- }, [e.columnsState]), z = X(() => {
149
- const { persistenceType: t, persistenceKey: c } = e.stylesConfigState || {};
150
- if (!c || !t || typeof window > "u")
254
+ }, [e.stylesConfigState]), M = J(() => {
255
+ const { persistenceType: t, persistenceKey: i } = e.exportConfigState || {};
256
+ if (!i || !t || typeof window > "u")
151
257
  return;
152
- const i = window[t];
258
+ const a = window[t];
153
259
  try {
154
- i == null || i.removeItem(c);
260
+ a == null || a.removeItem(i);
155
261
  } catch (n) {
156
262
  console.warn(n);
157
263
  }
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")
264
+ }, [e.exportConfigState]);
265
+ y(() => {
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(b));
278
+ } catch (c) {
279
+ console.warn(c), I();
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
+ (Q = e.columnsState) == null ? void 0 : Q.persistenceKey,
284
+ b,
285
+ (W = e.columnsState) == null ? void 0 : W.persistenceType
286
+ ]), y(() => {
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 f, u;
293
+ const l = S(c, (f = e == null ? void 0 : e.columnsState) == null ? void 0 : f.value);
294
+ w(
295
+ (u = Object.keys(l ?? {})) != null && u.length ? l ?? {} : m
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 v = {
304
+ uuid: x.current,
305
+ columns: e.columns,
306
+ persistenceType: (X = e.columnsState) == null ? void 0 : X.persistenceType,
307
+ persistenceKey: (Y = e.columnsState) == null ? void 0 : Y.persistenceKey,
308
+ onlineChange: (_ = e.columnsState) == null ? void 0 : _.onlineChange,
309
+ sortKeyColumns: K.current,
203
310
  setSortKeyColumns: (t) => {
204
- h.current = t;
311
+ K.current = t;
205
312
  },
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
313
+ columnsMap: b,
314
+ setColumnsMap: w,
315
+ defaultColumnKeyMap: m,
316
+ clearPersistenceStorage: I,
317
+ stylesConfig: h,
318
+ setTableStylesConfig: z,
319
+ defaultTableSize: N,
320
+ tableSize: h.size,
321
+ stylesStorageType: ($ = e.stylesConfigState) == null ? void 0 : $.persistenceType,
322
+ stylesStorageKey: (p = e.stylesConfigState) == null ? void 0 : p.persistenceKey,
323
+ onlineStylesConfigChange: (ee = e.stylesConfigState) == null ? void 0 : ee.onlineChange,
324
+ clearStylesConfigCache: E,
325
+ defaultTableStylesConfig: T,
326
+ exportConfig: V,
327
+ setTableExportConfig: C,
328
+ defaultTableExportConfig: g,
329
+ exportStorageType: (te = e.exportConfigState) == null ? void 0 : te.persistenceType,
330
+ exportStorageKey: (ne = e.exportConfigState) == null ? void 0 : ne.persistenceKey,
331
+ onlineExportConfigChange: (ie = e.exportConfigState) == null ? void 0 : ie.onlineChange,
332
+ clearExportConfigCache: M
220
333
  };
221
- return Object.defineProperty(V, "sortKeyColumns", {
222
- get: () => h.current
223
- }), Object.defineProperty(V, "uuid", {
224
- get: () => C.current
225
- }), V;
334
+ return Object.defineProperty(v, "sortKeyColumns", {
335
+ get: () => K.current
336
+ }), Object.defineProperty(v, "uuid", {
337
+ get: () => x.current
338
+ }), v;
226
339
  }
227
- const de = ae({}), Te = (e) => {
228
- const C = ye(e.initValue);
229
- return /* @__PURE__ */ le.jsx(de.Provider, { value: C, children: e.children });
340
+ const Oe = Ke({}), Be = (e) => {
341
+ const x = ve(e.initValue);
342
+ return /* @__PURE__ */ he.jsx(Oe.Provider, { value: x, children: e.children });
230
343
  };
231
344
  export {
232
- de as BitzTableContext,
233
- Te as default
345
+ Oe as BitzTableContext,
346
+ Be as default
234
347
  };
@@ -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,