bitz-react-admin-ui 2.6.1 → 2.6.3

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