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