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