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