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