bitz-react-admin-ui 2.6.2 → 2.6.4

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