bitz-react-admin-ui 2.2.9 → 2.3.1

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.
@@ -102,7 +102,7 @@ declare function useContainer(props: UseContainerProps): {
102
102
  selected: boolean;
103
103
  setSelected: import("react").Dispatch<import("react").SetStateAction<boolean>>;
104
104
  columns: BitzTableColumnsType<any> | undefined;
105
- baseColumns: (BitzTableColumnType<any> | import("..").BitzTableColumnGroupType<any>)[] | undefined;
105
+ baseColumns: (BitzTableColumnType<any> | import("..").BitzTableColumnGroupType<any>)[];
106
106
  persistenceType: "online" | "localStorage" | "sessionStorage" | undefined;
107
107
  persistenceKey: any;
108
108
  onlineChange: ((key: any, ColumnsState: Record<string, ColumnsConfigProps>) => void) | undefined;
@@ -139,7 +139,7 @@ declare const BitzTableContext: import("react").Context<{
139
139
  selected: boolean;
140
140
  setSelected: import("react").Dispatch<import("react").SetStateAction<boolean>>;
141
141
  columns: BitzTableColumnsType<any> | undefined;
142
- baseColumns: (BitzTableColumnType<any> | import("..").BitzTableColumnGroupType<any>)[] | undefined;
142
+ baseColumns: (BitzTableColumnType<any> | import("..").BitzTableColumnGroupType<any>)[];
143
143
  persistenceType: "online" | "localStorage" | "sessionStorage" | undefined;
144
144
  persistenceKey: any;
145
145
  onlineChange: ((key: any, ColumnsState: Record<string, ColumnsConfigProps>) => void) | undefined;
@@ -1,12 +1,12 @@
1
- import { j as ve } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { Table as le } from "antd";
3
- import N from "../../../hooks/useMergedState.mjs";
4
- import { createContext as Ve, useRef as Oe, useState as fe, useContext as Ne, useEffect as S, useMemo as g, useCallback as z } from "react";
5
- import { genColumnKey as re } from "./utils/index.mjs";
6
- import { getUuid as ze } from "../../../utils/uuid.mjs";
7
- import { BitzConfigContext as Ee } from "../../BitzConfigProvider/context.mjs";
8
- import C from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
9
- const Je = {
1
+ import { j as Te } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { Table as ce } from "antd";
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";
6
+ import { getUuid as Ve } from "../../../utils/uuid.mjs";
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 = {
10
10
  fixed: "left",
11
11
  className: "sorterCol",
12
12
  isDragSorterCol: !0,
@@ -16,44 +16,44 @@ const Je = {
16
16
  onCell: () => ({
17
17
  "data-column-name": "dragSorterCell"
18
18
  })
19
- }, Ie = [
20
- Je,
21
- le.SELECTION_COLUMN,
22
- le.EXPAND_COLUMN
19
+ }, ze = [
20
+ Ne,
21
+ ce.SELECTION_COLUMN,
22
+ ce.EXPAND_COLUMN
23
23
  ];
24
- function Me(e) {
25
- var H, k, R, L, P, U, D, _, G, Z, A, F, X, q, Q, W, Y, $, p, ee, te, ne, ie, ae, ce;
26
- const K = Oe(ze()), [ue, se] = fe(!1), [de, ye] = fe(!1), u = Ne(Ee).Table, Se = u == null ? void 0 : u.defaultSize, E = e.defaultSize ?? Se ?? "lg", ge = e.defaultZebra ?? (u == null ? void 0 : u.zebra) ?? !0, Ce = e.defaultBordered ?? (u == null ? void 0 : u.bordered) ?? "row-column", v = e.defaultStylesConfig || {
27
- size: E,
28
- zebra: ge,
29
- bordered: Ce
30
- }, [y, J] = N(
24
+ function Ee(e) {
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,
28
+ zebra: ye,
29
+ bordered: Se
30
+ }, [y, E] = V(
31
31
  () => {
32
- var n, o, c, l;
33
- const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.stylesConfigState || {};
32
+ var n, c, l, a;
33
+ const { persistenceType: t, persistenceKey: i, onlineGet: o } = e.stylesConfigState || {};
34
34
  if (i && t && typeof window < "u" && t !== "online") {
35
35
  const f = window[t];
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 ? C(
39
+ return (n = e == null ? void 0 : e.stylesConfigState) != null && n.defaultValue ? g(
40
40
  JSON.parse(r),
41
- (o = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : o.defaultValue
41
+ (c = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : c.defaultValue
42
42
  ) : JSON.parse(r);
43
43
  } catch (r) {
44
44
  console.warn(r);
45
45
  }
46
46
  }
47
- return e.stylesConfig || ((c = e.stylesConfigState) == null ? void 0 : c.value) || ((l = e.stylesConfigState) == null ? void 0 : l.defaultValue) || v;
47
+ return e.stylesConfig || ((l = e.stylesConfigState) == null ? void 0 : l.value) || ((a = e.stylesConfigState) == null ? void 0 : a.defaultValue) || b;
48
48
  },
49
49
  {
50
- value: ((H = e.stylesConfigState) == null ? void 0 : H.value) || e.stylesConfig,
50
+ value: ((M = e.stylesConfigState) == null ? void 0 : M.value) || e.stylesConfig,
51
51
  onChange: ((k = e.stylesConfigState) == null ? void 0 : k.onChange) || e.onStylesConfigChange
52
52
  }
53
53
  );
54
- S(() => {
55
- var a, n;
56
- if (!((a = e.stylesConfigState) != null && a.persistenceKey) || !((n = e.stylesConfigState) != null && n.persistenceType) || typeof window > "u")
54
+ d(() => {
55
+ var o, n;
56
+ if (!((o = e.stylesConfigState) != null && o.persistenceKey) || !((n = e.stylesConfigState) != null && n.persistenceType) || typeof window > "u")
57
57
  return;
58
58
  const {
59
59
  persistenceType: t,
@@ -61,38 +61,35 @@ function Me(e) {
61
61
  // onlineChange
62
62
  } = e.stylesConfigState;
63
63
  if (t !== "online") {
64
- const o = window[t];
64
+ const c = window[t];
65
65
  try {
66
- o == null || o.setItem(i, JSON.stringify(y));
67
- } catch (c) {
68
- console.warn(c), M();
66
+ c == null || c.setItem(i, JSON.stringify(y));
67
+ } catch (l) {
68
+ console.warn(l), J();
69
69
  }
70
70
  }
71
71
  }, [
72
- (R = e.stylesConfigState) == null ? void 0 : R.persistenceKey,
72
+ (H = e.stylesConfigState) == null ? void 0 : H.persistenceKey,
73
73
  y,
74
- (L = e.stylesConfigState) == null ? void 0 : L.persistenceType
75
- ]), S(() => {
76
- var t, i, a;
74
+ (R = e.stylesConfigState) == null ? void 0 : R.persistenceType
75
+ ]), d(() => {
76
+ var t, i, o;
77
77
  if ((t = e.stylesConfigState) != null && t.persistenceKey && ((i = e.stylesConfigState) == null ? void 0 : i.persistenceType) === "online") {
78
- const { onlineGet: n, persistenceKey: o } = e.stylesConfigState;
78
+ const { onlineGet: n, persistenceKey: c } = e.stylesConfigState;
79
79
  try {
80
- (a = n == null ? void 0 : n(o)) == null || a.then((c) => {
80
+ (o = n == null ? void 0 : n(c)) == null || o.then((l) => {
81
81
  var f;
82
- const l = C(c ?? {}, (f = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : f.value);
83
- J(
84
- Object.keys(l).length ? l : v
82
+ const a = g(l ?? {}, (f = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : f.value);
83
+ E(
84
+ Object.keys(a).length ? a : b
85
85
  );
86
86
  });
87
- } catch (c) {
88
- console.warn(c);
87
+ } catch (l) {
88
+ console.warn(l);
89
89
  }
90
90
  }
91
91
  }, []);
92
- const s = g(() => {
93
- var t;
94
- return (t = e.columns) == null ? void 0 : t.filter((i) => !Ie.includes(i));
95
- }, [e.columns]), w = g(() => {
92
+ const u = C(() => (e.columns ?? []).filter((t) => !ze.includes(t)), [e.columns]), x = C(() => {
96
93
  var i;
97
94
  if ((i = e == null ? void 0 : e.exportConfigState) != null && i.defaultValue)
98
95
  return e.exportConfigState.defaultValue;
@@ -103,62 +100,62 @@ function Me(e) {
103
100
  info: void 0
104
101
  }
105
102
  };
106
- return s == null || s.forEach((a, n) => {
107
- const { title: o, isOperationCol: c } = a, l = re(a, n);
108
- l && !c && t.fields.push({
109
- field: l,
110
- title: o,
103
+ return u.forEach((o, n) => {
104
+ const { title: c, isOperationCol: l } = o, a = N(o, n);
105
+ a && !l && t.fields.push({
106
+ field: a,
107
+ title: c,
111
108
  show: !0
112
109
  });
113
110
  }), t;
114
- }, [s]), [V, x] = N(
111
+ }, [u]), [O, h] = V(
115
112
  () => {
116
- var n, o, c, l;
117
- const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.exportConfigState || {};
113
+ var n, c, l, a;
114
+ const { persistenceType: t, persistenceKey: i, onlineGet: o } = e.exportConfigState || {};
118
115
  if (i && t && typeof window < "u" && t !== "online") {
119
116
  const f = window[t];
120
117
  try {
121
118
  const r = f == null ? void 0 : f.getItem(i);
122
119
  if (r)
123
- return (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? C(
120
+ return (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? g(
124
121
  JSON.parse(r),
125
- (o = e == null ? void 0 : e.exportConfigState) == null ? void 0 : o.defaultValue
122
+ (c = e == null ? void 0 : e.exportConfigState) == null ? void 0 : c.defaultValue
126
123
  ) : JSON.parse(r);
127
124
  } catch (r) {
128
125
  console.warn(r);
129
126
  }
130
127
  }
131
- return e.exportConfig || ((c = e.exportConfigState) == null ? void 0 : c.value) || ((l = e.exportConfigState) == null ? void 0 : l.defaultValue) || w;
128
+ return e.exportConfig || ((l = e.exportConfigState) == null ? void 0 : l.value) || ((a = e.exportConfigState) == null ? void 0 : a.defaultValue) || x;
132
129
  },
133
130
  {
134
- value: ((P = e.exportConfigState) == null ? void 0 : P.value) || e.exportConfig,
135
- onChange: ((U = e.exportConfigState) == null ? void 0 : U.onChange) || e.onExportConfigChange
131
+ value: ((L = e.exportConfigState) == null ? void 0 : L.value) || e.exportConfig,
132
+ onChange: ((P = e.exportConfigState) == null ? void 0 : P.onChange) || e.onExportConfigChange
136
133
  }
137
134
  );
138
- S(() => {
139
- var n, o;
140
- const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.exportConfigState || {};
135
+ d(() => {
136
+ var n, c;
137
+ const { persistenceType: t, persistenceKey: i, onlineGet: o } = e.exportConfigState || {};
141
138
  if (i && t && typeof window < "u" && t !== "online") {
142
- const c = window[t];
139
+ const l = window[t];
143
140
  try {
144
- const l = c == null ? void 0 : c.getItem(i);
145
- l ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? x(
146
- C(
147
- JSON.parse(l),
148
- (o = e == null ? void 0 : e.exportConfigState) == null ? void 0 : o.defaultValue
141
+ const a = l == null ? void 0 : l.getItem(i);
142
+ a ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? h(
143
+ g(
144
+ JSON.parse(a),
145
+ (c = e == null ? void 0 : e.exportConfigState) == null ? void 0 : c.defaultValue
149
146
  )
150
- ) : x(JSON.parse(l)) : x(w);
151
- } catch (l) {
152
- console.warn(l);
147
+ ) : h(JSON.parse(a)) : h(x);
148
+ } catch (a) {
149
+ console.warn(a);
153
150
  }
154
151
  }
155
152
  }, [
156
- (D = e.exportConfigState) == null ? void 0 : D.persistenceKey,
157
- (_ = e.exportConfigState) == null ? void 0 : _.persistenceType,
158
- w
159
- ]), S(() => {
160
- var a, n;
161
- if (!((a = e.exportConfigState) != null && a.persistenceKey) || !((n = e.exportConfigState) != null && n.persistenceType) || typeof window > "u")
153
+ (U = e.exportConfigState) == null ? void 0 : U.persistenceKey,
154
+ (D = e.exportConfigState) == null ? void 0 : D.persistenceType,
155
+ x
156
+ ]), d(() => {
157
+ var o, n;
158
+ if (!((o = e.exportConfigState) != null && o.persistenceKey) || !((n = e.exportConfigState) != null && n.persistenceType) || typeof window > "u")
162
159
  return;
163
160
  const {
164
161
  persistenceType: t,
@@ -166,128 +163,128 @@ function Me(e) {
166
163
  // onlineChange
167
164
  } = e.exportConfigState;
168
165
  if (t !== "online") {
169
- const o = window[t];
166
+ const c = window[t];
170
167
  try {
171
- o == null || o.setItem(i, JSON.stringify(V));
172
- } catch (c) {
173
- console.warn(c), B();
168
+ c == null || c.setItem(i, JSON.stringify(O));
169
+ } catch (l) {
170
+ console.warn(l), B();
174
171
  }
175
172
  }
176
173
  }, [
177
- (G = e.exportConfigState) == null ? void 0 : G.persistenceKey,
178
- V,
179
- (Z = e.exportConfigState) == null ? void 0 : Z.persistenceType
180
- ]), S(() => {
181
- var t, i, a;
174
+ (_ = e.exportConfigState) == null ? void 0 : _.persistenceKey,
175
+ O,
176
+ (G = e.exportConfigState) == null ? void 0 : G.persistenceType
177
+ ]), d(() => {
178
+ var t, i, o;
182
179
  if ((t = e.exportConfigState) != null && t.persistenceKey && ((i = e.exportConfigState) == null ? void 0 : i.persistenceType) === "online") {
183
- const { onlineGet: n, persistenceKey: o } = e.exportConfigState;
180
+ const { onlineGet: n, persistenceKey: c } = e.exportConfigState;
184
181
  try {
185
- (a = n == null ? void 0 : n(o)) == null || a.then((c) => {
182
+ (o = n == null ? void 0 : n(c)) == null || o.then((l) => {
186
183
  var f;
187
- const l = C(c ?? {}, (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
188
- x(
189
- Object.keys(l).length ? l : w
184
+ const a = g(l ?? {}, (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
185
+ h(
186
+ Object.keys(a).length ? a : x
190
187
  );
191
188
  });
192
- } catch (c) {
193
- console.warn(c);
189
+ } catch (l) {
190
+ console.warn(l);
194
191
  }
195
192
  }
196
193
  }, []);
197
- const h = g(() => {
198
- var c, l, f, r;
199
- if ((c = e == null ? void 0 : e.columnsState) != null && c.defaultValue)
194
+ const S = C(() => {
195
+ var l;
196
+ if ((l = e == null ? void 0 : e.columnsState) != null && l.defaultValue)
200
197
  return e.columnsState.defaultValue;
201
- const t = ((l = s == null ? void 0 : s.filter((d) => d.fixed === "left")) == null ? void 0 : l.map((d, m) => ({ ...d, order: m }))) ?? [], i = ((f = s == null ? void 0 : s.filter((d) => d.fixed === "right")) == null ? void 0 : f.map((d, m) => ({ ...d, order: m }))) ?? [], a = ((r = s == null ? void 0 : s.filter((d) => !["left", "right"].includes(d.fixed))) == null ? void 0 : r.map((d, m) => ({ ...d, order: m }))) ?? [], n = [...t, ...a, ...i], o = {};
202
- return n == null || n.forEach((d, m) => {
203
- const { order: Te, fixed: Ke, disabled: be } = d, oe = re(d, m);
204
- oe && (o[oe] = {
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
+ return n.forEach((a, f) => {
200
+ const { order: r, fixed: xe, disabled: he } = a, oe = N(a, f);
201
+ oe && (c[oe] = {
205
202
  show: !0,
206
- order: Te,
207
- fixed: Ke,
208
- disabled: be
203
+ order: r,
204
+ fixed: xe,
205
+ disabled: he
209
206
  });
210
- }), o;
211
- }, [s]), [O, T] = N(
207
+ }), c;
208
+ }, [u]), [m, w] = V(
212
209
  () => {
213
- var n, o, c, l;
214
- const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.columnsState || {};
210
+ var n, c, l, a;
211
+ const { persistenceType: t, persistenceKey: i, onlineGet: o } = e.columnsState || {};
215
212
  if (i && t && typeof window < "u" && t !== "online") {
216
213
  const f = window[t];
217
214
  try {
218
215
  const r = f == null ? void 0 : f.getItem(i);
219
216
  if (r)
220
- return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? C(
217
+ return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? g(
221
218
  JSON.parse(r),
222
- (o = e == null ? void 0 : e.columnsState) == null ? void 0 : o.defaultValue
219
+ (c = e == null ? void 0 : e.columnsState) == null ? void 0 : c.defaultValue
223
220
  ) : JSON.parse(r);
224
221
  } catch (r) {
225
222
  console.warn(r);
226
223
  }
227
224
  }
228
- return e.columnsStateMap || ((c = e.columnsState) == null ? void 0 : c.value) || ((l = e.columnsState) == null ? void 0 : l.defaultValue) || h;
225
+ return e.columnsStateMap || ((l = e.columnsState) == null ? void 0 : l.value) || ((a = e.columnsState) == null ? void 0 : a.defaultValue) || {};
229
226
  },
230
227
  {
231
- value: ((A = e.columnsState) == null ? void 0 : A.value) || e.columnsStateMap,
232
- onChange: ((F = e.columnsState) == null ? void 0 : F.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
233
230
  }
234
231
  );
235
- S(() => {
236
- var n, o;
237
- const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.columnsState || {};
232
+ d(() => {
233
+ var n, c;
234
+ const { persistenceType: t, persistenceKey: i, onlineGet: o } = e.columnsState || {};
238
235
  if (i && t && typeof window < "u" && t !== "online") {
239
- const c = window[t];
236
+ const l = window[t];
240
237
  try {
241
- const l = c == null ? void 0 : c.getItem(i);
242
- l ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? T(
243
- C(
244
- JSON.parse(l),
245
- (o = e == null ? void 0 : e.columnsState) == null ? void 0 : o.defaultValue
238
+ const a = l == null ? void 0 : l.getItem(i);
239
+ a ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? w(
240
+ g(
241
+ JSON.parse(a),
242
+ (c = e == null ? void 0 : e.columnsState) == null ? void 0 : c.defaultValue
246
243
  )
247
- ) : T(JSON.parse(l)) : T(h);
248
- } catch (l) {
249
- console.warn(l);
244
+ ) : w(JSON.parse(a)) : w(S);
245
+ } catch (a) {
246
+ console.warn(a);
250
247
  }
251
248
  }
252
249
  }, [
253
- (X = e.columnsState) == null ? void 0 : X.persistenceKey,
254
- (q = e.columnsState) == null ? void 0 : q.persistenceType,
255
- h
250
+ (F = e.columnsState) == null ? void 0 : F.persistenceKey,
251
+ (X = e.columnsState) == null ? void 0 : X.persistenceType,
252
+ S
256
253
  ]);
257
- const I = z(() => {
254
+ const I = v(() => {
258
255
  const { persistenceType: t, persistenceKey: i } = e.columnsState || {};
259
256
  if (!i || !t || typeof window > "u")
260
257
  return;
261
- const a = window[t];
258
+ const o = window[t];
262
259
  try {
263
- a == null || a.removeItem(i);
260
+ o == null || o.removeItem(i);
264
261
  } catch (n) {
265
262
  console.warn(n);
266
263
  }
267
- }, [e.columnsState]), M = z(() => {
264
+ }, [e.columnsState]), J = v(() => {
268
265
  const { persistenceType: t, persistenceKey: i } = e.stylesConfigState || {};
269
266
  if (!i || !t || typeof window > "u")
270
267
  return;
271
- const a = window[t];
268
+ const o = window[t];
272
269
  try {
273
- a == null || a.removeItem(i);
270
+ o == null || o.removeItem(i);
274
271
  } catch (n) {
275
272
  console.warn(n);
276
273
  }
277
- }, [e.stylesConfigState]), B = z(() => {
274
+ }, [e.stylesConfigState]), B = v(() => {
278
275
  const { persistenceType: t, persistenceKey: i } = e.exportConfigState || {};
279
276
  if (!i || !t || typeof window > "u")
280
277
  return;
281
- const a = window[t];
278
+ const o = window[t];
282
279
  try {
283
- a == null || a.removeItem(i);
280
+ o == null || o.removeItem(i);
284
281
  } catch (n) {
285
282
  console.warn(n);
286
283
  }
287
284
  }, [e.exportConfigState]);
288
- S(() => {
289
- var a, n;
290
- if (!((a = e.columnsState) != null && a.persistenceKey) || !((n = e.columnsState) != null && n.persistenceType) || typeof window > "u")
285
+ d(() => {
286
+ var o, n;
287
+ if (!((o = e.columnsState) != null && o.persistenceKey) || !((n = e.columnsState) != null && n.persistenceType) || typeof window > "u")
291
288
  return;
292
289
  const {
293
290
  persistenceType: t,
@@ -295,83 +292,90 @@ function Me(e) {
295
292
  // onlineChange
296
293
  } = e.columnsState;
297
294
  if (t !== "online") {
298
- const o = window[t];
295
+ const c = window[t];
299
296
  try {
300
- o == null || o.setItem(i, JSON.stringify(O));
301
- } catch (c) {
302
- console.warn(c), I();
297
+ c == null || c.setItem(i, JSON.stringify(m));
298
+ } catch (l) {
299
+ console.warn(l), I();
303
300
  }
304
301
  }
305
302
  }, [
306
- (Q = e.columnsState) == null ? void 0 : Q.persistenceKey,
307
- O,
308
- (W = e.columnsState) == null ? void 0 : W.persistenceType
309
- ]), S(() => {
310
- var t, i, a;
303
+ (q = e.columnsState) == null ? void 0 : q.persistenceKey,
304
+ m,
305
+ (Q = e.columnsState) == null ? void 0 : Q.persistenceType
306
+ ]), d(() => {
307
+ var t, i, o;
311
308
  if ((t = e.columnsState) != null && t.persistenceKey && ((i = e.columnsState) == null ? void 0 : i.persistenceType) === "online") {
312
- const { onlineGet: n, persistenceKey: o } = e.columnsState;
309
+ const { onlineGet: n, persistenceKey: c } = e.columnsState;
313
310
  try {
314
- (a = n == null ? void 0 : n(o)) == null || a.then((c) => {
311
+ (o = n == null ? void 0 : n(c)) == null || o.then((l) => {
315
312
  var f;
316
- const l = C(c ?? {}, (f = e == null ? void 0 : e.columnsState) == null ? void 0 : f.value);
317
- T(Object.keys(l).length ? l : h);
313
+ const a = g(l ?? {}, (f = e == null ? void 0 : e.columnsState) == null ? void 0 : f.value);
314
+ w(a);
318
315
  });
319
- } catch (c) {
320
- console.warn(c);
316
+ } catch (l) {
317
+ console.warn(l);
321
318
  }
322
319
  }
323
- }, []);
324
- const me = g(() => (e == null ? void 0 : e.rowHoverable) ?? (u == null ? void 0 : u.rowHoverable) ?? !0, [e == null ? void 0 : e.rowHoverable, u == null ? void 0 : u.rowHoverable]), we = g(() => e.zebra ?? y.zebra, [e.zebra, y.zebra]), b = g(() => e.bordered ?? y.bordered, [e.bordered, y.bordered]), xe = g(() => ["column", "row-column"].includes(b), [b]), he = g(() => {
320
+ }, []), d(() => {
321
+ var i, o;
322
+ const t = u.findIndex((n) => n == null ? void 0 : n.isOperationCol);
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);
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(() => {
325
329
  let t = !1;
326
- return ["hide", "column"].includes(b) && (t = !0), t;
327
- }, [b]), j = {
330
+ return ["hide", "column"].includes(K) && (t = !0), t;
331
+ }, [K]), j = {
328
332
  loading: e.loading ?? !1,
329
- uuid: K.current,
330
- fullscreen: ue,
331
- setFullscreen: se,
332
- selected: de,
333
- setSelected: ye,
333
+ uuid: T.current,
334
+ fullscreen: fe,
335
+ setFullscreen: re,
336
+ selected: se,
337
+ setSelected: ue,
334
338
  columns: e.columns,
335
- baseColumns: s,
336
- persistenceType: (Y = e.columnsState) == null ? void 0 : Y.persistenceType,
337
- persistenceKey: ($ = e.columnsState) == null ? void 0 : $.persistenceKey,
338
- onlineChange: (p = e.columnsState) == null ? void 0 : p.onlineChange,
339
- columnsMap: O,
340
- setColumnsMap: T,
341
- defaultColumnKeyMap: h,
339
+ baseColumns: u,
340
+ persistenceType: (W = e.columnsState) == null ? void 0 : W.persistenceType,
341
+ persistenceKey: (Y = e.columnsState) == null ? void 0 : Y.persistenceKey,
342
+ onlineChange: ($ = e.columnsState) == null ? void 0 : $.onlineChange,
343
+ columnsMap: m,
344
+ setColumnsMap: w,
345
+ defaultColumnKeyMap: S,
342
346
  clearPersistenceStorage: I,
343
347
  stylesConfig: y,
344
- setTableStylesConfig: J,
345
- defaultTableSize: E,
348
+ setTableStylesConfig: E,
349
+ defaultTableSize: z,
346
350
  tableSize: y.size,
347
- stylesStorageType: (ee = e.stylesConfigState) == null ? void 0 : ee.persistenceType,
348
- stylesStorageKey: (te = e.stylesConfigState) == null ? void 0 : te.persistenceKey,
349
- onlineStylesConfigChange: (ne = e.stylesConfigState) == null ? void 0 : ne.onlineChange,
350
- clearStylesConfigCache: M,
351
- defaultTableStylesConfig: v,
352
- exportConfig: V,
353
- setTableExportConfig: x,
354
- defaultTableExportConfig: w,
355
- exportStorageType: (ie = e.exportConfigState) == null ? void 0 : ie.persistenceType,
356
- exportStorageKey: (ae = e.exportConfigState) == null ? void 0 : ae.persistenceKey,
357
- onlineExportConfigChange: (ce = e.exportConfigState) == null ? void 0 : ce.onlineChange,
351
+ stylesStorageType: (p = e.stylesConfigState) == null ? void 0 : p.persistenceType,
352
+ stylesStorageKey: (ee = e.stylesConfigState) == null ? void 0 : ee.persistenceKey,
353
+ onlineStylesConfigChange: (te = e.stylesConfigState) == null ? void 0 : te.onlineChange,
354
+ clearStylesConfigCache: J,
355
+ defaultTableStylesConfig: b,
356
+ exportConfig: O,
357
+ setTableExportConfig: h,
358
+ defaultTableExportConfig: x,
359
+ exportStorageType: (ne = e.exportConfigState) == null ? void 0 : ne.persistenceType,
360
+ exportStorageKey: (ie = e.exportConfigState) == null ? void 0 : ie.persistenceKey,
361
+ onlineExportConfigChange: (ae = e.exportConfigState) == null ? void 0 : ae.onlineChange,
358
362
  clearExportConfigCache: B,
359
- zebra: we,
360
- rowHoverable: me,
361
- showColumnBorder: xe,
362
- hideRowBorder: he
363
+ zebra: ge,
364
+ rowHoverable: Ce,
365
+ showColumnBorder: me,
366
+ hideRowBorder: we
363
367
  };
364
368
  return Object.defineProperty(j, "uuid", {
365
- get: () => K.current
369
+ get: () => T.current
366
370
  }), j;
367
371
  }
368
- const Be = Ve({}), _e = (e) => {
369
- const K = Me(e.initValue);
370
- return /* @__PURE__ */ ve.jsx(Be.Provider, { value: K, children: e.children });
372
+ const Ie = Ke({}), Pe = (e) => {
373
+ const T = Ee(e.initValue);
374
+ return /* @__PURE__ */ Te.jsx(Ie.Provider, { value: T, children: e.children });
371
375
  };
372
376
  export {
373
- Be as BitzTableContext,
374
- Je as SORTER_COLUMN,
375
- _e as default,
376
- Ie as toolCols
377
+ Ie as BitzTableContext,
378
+ Ne as SORTER_COLUMN,
379
+ Pe as default,
380
+ ze as toolCols
377
381
  };