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