bitz-react-admin-ui 2.1.3 → 2.1.5
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/_virtual/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- package/dist/assets/iconfont/IconColumnCancelFixed.d.ts +7 -0
- package/dist/assets/iconfont/IconColumnCancelFixed.mjs +35 -0
- package/dist/assets/iconfont/IconColumnFixedLeft.d.ts +7 -0
- package/dist/assets/iconfont/IconColumnFixedLeft.mjs +35 -0
- package/dist/assets/iconfont/IconColumnFixedRight.d.ts +7 -0
- package/dist/assets/iconfont/IconColumnFixedRight.mjs +35 -0
- package/dist/assets/iconfont/IconDragOrder.d.ts +7 -0
- package/dist/assets/iconfont/IconDragOrder.mjs +35 -0
- package/dist/assets/iconfont/index.d.ts +5 -1
- package/dist/assets/iconfont/index.mjs +105 -89
- package/dist/components/BitzCalendar/index.mjs +1 -1
- package/dist/components/BitzDayJs/index.mjs +1 -1
- package/dist/components/BitzFluentInput/index.d.ts +2 -5
- package/dist/components/BitzFluentInput/index.mjs +4 -58
- package/dist/components/BitzFluentSelect/index.d.ts +4 -5
- package/dist/components/BitzFluentSelect/index.mjs +4 -58
- package/dist/components/BitzFluentTreeSelect/index.mjs +6 -0
- 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/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/Select/index.d.ts +4 -0
- package/dist/components/BitzTable/Select/index.mjs +11 -0
- package/dist/components/BitzTable/Select/style.d.ts +4 -0
- package/dist/components/BitzTable/Select/style.mjs +66 -0
- package/dist/components/BitzTable/Store/index.d.ts +43 -9
- package/dist/components/BitzTable/Store/index.mjs +259 -146
- package/dist/components/BitzTable/Store/utils/index.mjs +26 -25
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +73 -61
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +118 -61
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.d.ts +4 -3
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +48 -47
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +5 -1
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +84 -15
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +59 -50
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.d.ts +1 -1
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +47 -21
- package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.d.ts +5 -0
- package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.mjs +89 -0
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.d.ts +1 -2
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +46 -32
- package/dist/components/BitzTable/ToolBar/index.d.ts +5 -2
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +148 -123
- package/dist/components/BitzTableSelect/TextBlock/index.mjs +21 -18
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +94 -92
- package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
- package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
- package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
- 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 +9 -0
- package/dist/utils/WithFluent.mjs +58 -0
- package/dist/utils/time.mjs +1 -1
- package/package.json +2 -1
- package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/PicRightOutlined.mjs +0 -5
- package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/PicRightOutlined.mjs +0 -15
|
@@ -1,234 +1,347 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { genColumnKey as
|
|
5
|
-
import { getUuid as
|
|
6
|
-
import { BitzConfigContext as
|
|
7
|
-
import
|
|
8
|
-
function
|
|
9
|
-
var
|
|
10
|
-
const
|
|
11
|
-
size:
|
|
12
|
-
zebra:
|
|
13
|
-
bordered:
|
|
14
|
-
}, [
|
|
1
|
+
import { j as he } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import O from "../../../hooks/useMergedState.mjs";
|
|
3
|
+
import { createContext as Ke, useRef as fe, useContext as Te, useEffect as y, useMemo as ue, useCallback as J } from "react";
|
|
4
|
+
import { genColumnKey as se } from "./utils/index.mjs";
|
|
5
|
+
import { getUuid as Ve } from "../../../utils/uuid.mjs";
|
|
6
|
+
import { BitzConfigContext as be } from "../../BitzConfigProvider/context.mjs";
|
|
7
|
+
import S from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
|
|
8
|
+
function ve(e) {
|
|
9
|
+
var j, B, P, k, D, Z, G, R, U, q, A, F, H, L, Q, W, X, Y, _, $, p, ee, te, ne, ie;
|
|
10
|
+
const x = fe(Ve()), K = fe([]), r = Te(be).Table, re = r == null ? void 0 : r.defaultSize, N = e.defaultSize ?? re ?? "lg", ye = r == null ? void 0 : r.zebra, Se = e.defaultZebra ?? ye ?? !0, de = r == null ? void 0 : r.bordered, ge = e.defaultBordered ?? de ?? "row-column", T = e.defaultStylesConfig || {
|
|
11
|
+
size: N,
|
|
12
|
+
zebra: Se,
|
|
13
|
+
bordered: ge
|
|
14
|
+
}, [h, z] = O(
|
|
15
15
|
() => {
|
|
16
|
-
var n,
|
|
17
|
-
const { persistenceType: t, persistenceKey:
|
|
18
|
-
if (
|
|
19
|
-
const
|
|
16
|
+
var n, o, c, l;
|
|
17
|
+
const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.stylesConfigState || {};
|
|
18
|
+
if (i && t && typeof window < "u" && t !== "online") {
|
|
19
|
+
const f = window[t];
|
|
20
20
|
try {
|
|
21
|
-
const u =
|
|
21
|
+
const u = f == null ? void 0 : f.getItem(i);
|
|
22
22
|
if (u)
|
|
23
|
-
return (n = e == null ? void 0 : e.stylesConfigState) != null && n.defaultValue ?
|
|
23
|
+
return (n = e == null ? void 0 : e.stylesConfigState) != null && n.defaultValue ? S(
|
|
24
24
|
JSON.parse(u),
|
|
25
|
-
(
|
|
25
|
+
(o = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : o.defaultValue
|
|
26
26
|
) : JSON.parse(u);
|
|
27
27
|
} catch (u) {
|
|
28
28
|
console.warn(u);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
return e.stylesConfig || ((
|
|
31
|
+
return e.stylesConfig || ((c = e.stylesConfigState) == null ? void 0 : c.value) || ((l = e.stylesConfigState) == null ? void 0 : l.defaultValue) || T;
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
value: ((
|
|
35
|
-
onChange: ((
|
|
34
|
+
value: ((j = e.stylesConfigState) == null ? void 0 : j.value) || e.stylesConfig,
|
|
35
|
+
onChange: ((B = e.stylesConfigState) == null ? void 0 : B.onChange) || e.onStylesConfigChange
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
|
-
|
|
39
|
-
var
|
|
40
|
-
if (!((
|
|
38
|
+
y(() => {
|
|
39
|
+
var a, n;
|
|
40
|
+
if (!((a = e.stylesConfigState) != null && a.persistenceKey) || !((n = e.stylesConfigState) != null && n.persistenceType) || typeof window > "u")
|
|
41
41
|
return;
|
|
42
42
|
const {
|
|
43
43
|
persistenceType: t,
|
|
44
|
-
persistenceKey:
|
|
44
|
+
persistenceKey: i
|
|
45
45
|
// onlineChange
|
|
46
46
|
} = e.stylesConfigState;
|
|
47
47
|
if (t !== "online") {
|
|
48
|
-
const
|
|
48
|
+
const o = window[t];
|
|
49
49
|
try {
|
|
50
|
-
|
|
51
|
-
} catch (
|
|
52
|
-
console.warn(
|
|
50
|
+
o == null || o.setItem(i, JSON.stringify(h));
|
|
51
|
+
} catch (c) {
|
|
52
|
+
console.warn(c), E();
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}, [
|
|
56
|
-
(
|
|
57
|
-
|
|
58
|
-
(
|
|
59
|
-
]),
|
|
60
|
-
var t,
|
|
61
|
-
if ((t = e.stylesConfigState) != null && t.persistenceKey && ((
|
|
62
|
-
const { onlineGet: n, persistenceKey:
|
|
56
|
+
(P = e.stylesConfigState) == null ? void 0 : P.persistenceKey,
|
|
57
|
+
h,
|
|
58
|
+
(k = e.stylesConfigState) == null ? void 0 : k.persistenceType
|
|
59
|
+
]), y(() => {
|
|
60
|
+
var t, i, a;
|
|
61
|
+
if ((t = e.stylesConfigState) != null && t.persistenceKey && ((i = e.stylesConfigState) == null ? void 0 : i.persistenceType) === "online") {
|
|
62
|
+
const { onlineGet: n, persistenceKey: o } = e.stylesConfigState;
|
|
63
63
|
try {
|
|
64
|
-
(
|
|
65
|
-
var
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
(u = Object.keys(
|
|
64
|
+
(a = n == null ? void 0 : n(o)) == null || a.then((c) => {
|
|
65
|
+
var f, u;
|
|
66
|
+
const l = S(c, (f = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : f.value);
|
|
67
|
+
z(
|
|
68
|
+
(u = Object.keys(l ?? {})) != null && u.length ? l ?? {} : T
|
|
69
69
|
);
|
|
70
70
|
});
|
|
71
|
+
} catch (c) {
|
|
72
|
+
console.warn(c);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}, []);
|
|
76
|
+
const g = ue(() => {
|
|
77
|
+
var i, a;
|
|
78
|
+
if ((i = e == null ? void 0 : e.exportConfigState) != null && i.defaultValue)
|
|
79
|
+
return e.exportConfigState.defaultValue;
|
|
80
|
+
const t = [];
|
|
81
|
+
return (a = e.columns) == null || a.forEach(
|
|
82
|
+
({ key: n, dataIndex: o, title: c }, l) => {
|
|
83
|
+
const f = se(n ?? o, l);
|
|
84
|
+
f && t.push({
|
|
85
|
+
field: f,
|
|
86
|
+
title: c,
|
|
87
|
+
show: !0
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
), t;
|
|
91
|
+
}, [e.columns]), [V, C] = O(
|
|
92
|
+
() => {
|
|
93
|
+
var n, o, c, l;
|
|
94
|
+
const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.exportConfigState || {};
|
|
95
|
+
if (i && t && typeof window < "u" && t !== "online") {
|
|
96
|
+
const f = window[t];
|
|
97
|
+
try {
|
|
98
|
+
const u = f == null ? void 0 : f.getItem(i);
|
|
99
|
+
if (u)
|
|
100
|
+
return (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? S(
|
|
101
|
+
JSON.parse(u),
|
|
102
|
+
(o = e == null ? void 0 : e.exportConfigState) == null ? void 0 : o.defaultValue
|
|
103
|
+
) : JSON.parse(u);
|
|
104
|
+
} catch (u) {
|
|
105
|
+
console.warn(u);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return e.exportConfig || ((c = e.exportConfigState) == null ? void 0 : c.value) || ((l = e.exportConfigState) == null ? void 0 : l.defaultValue) || g;
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
value: ((D = e.exportConfigState) == null ? void 0 : D.value) || e.exportConfig,
|
|
112
|
+
onChange: ((Z = e.exportConfigState) == null ? void 0 : Z.onChange) || e.onExportConfigChange
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
y(() => {
|
|
116
|
+
var n, o;
|
|
117
|
+
const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.exportConfigState || {};
|
|
118
|
+
if (i && t && typeof window < "u" && t !== "online") {
|
|
119
|
+
const c = window[t];
|
|
120
|
+
try {
|
|
121
|
+
const l = c == null ? void 0 : c.getItem(i);
|
|
122
|
+
l ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? C(
|
|
123
|
+
S(
|
|
124
|
+
JSON.parse(l),
|
|
125
|
+
(o = e == null ? void 0 : e.exportConfigState) == null ? void 0 : o.defaultValue
|
|
126
|
+
)
|
|
127
|
+
) : C(JSON.parse(l)) : C(g);
|
|
71
128
|
} catch (l) {
|
|
72
129
|
console.warn(l);
|
|
73
130
|
}
|
|
74
131
|
}
|
|
132
|
+
}, [
|
|
133
|
+
(G = e.exportConfigState) == null ? void 0 : G.persistenceKey,
|
|
134
|
+
(R = e.exportConfigState) == null ? void 0 : R.persistenceType,
|
|
135
|
+
g
|
|
136
|
+
]), y(() => {
|
|
137
|
+
var a, n;
|
|
138
|
+
if (!((a = e.exportConfigState) != null && a.persistenceKey) || !((n = e.exportConfigState) != null && n.persistenceType) || typeof window > "u")
|
|
139
|
+
return;
|
|
140
|
+
const {
|
|
141
|
+
persistenceType: t,
|
|
142
|
+
persistenceKey: i
|
|
143
|
+
// onlineChange
|
|
144
|
+
} = e.exportConfigState;
|
|
145
|
+
if (t !== "online") {
|
|
146
|
+
const o = window[t];
|
|
147
|
+
try {
|
|
148
|
+
o == null || o.setItem(i, JSON.stringify(V));
|
|
149
|
+
} catch (c) {
|
|
150
|
+
console.warn(c), M();
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}, [
|
|
154
|
+
(U = e.exportConfigState) == null ? void 0 : U.persistenceKey,
|
|
155
|
+
V,
|
|
156
|
+
(q = e.exportConfigState) == null ? void 0 : q.persistenceType
|
|
157
|
+
]), y(() => {
|
|
158
|
+
var t, i, a;
|
|
159
|
+
if ((t = e.exportConfigState) != null && t.persistenceKey && ((i = e.exportConfigState) == null ? void 0 : i.persistenceType) === "online") {
|
|
160
|
+
const { onlineGet: n, persistenceKey: o } = e.exportConfigState;
|
|
161
|
+
try {
|
|
162
|
+
(a = n == null ? void 0 : n(o)) == null || a.then((c) => {
|
|
163
|
+
var f;
|
|
164
|
+
const l = S(c, (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
|
|
165
|
+
C(l ?? g);
|
|
166
|
+
});
|
|
167
|
+
} catch (c) {
|
|
168
|
+
console.warn(c);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
75
171
|
}, []);
|
|
76
|
-
const
|
|
77
|
-
var
|
|
78
|
-
if ((
|
|
172
|
+
const m = ue(() => {
|
|
173
|
+
var c, l, f, u, ae, ce, oe;
|
|
174
|
+
if ((c = e == null ? void 0 : e.columnsState) != null && c.defaultValue)
|
|
79
175
|
return e.columnsState.defaultValue;
|
|
80
|
-
const t = ((
|
|
176
|
+
const t = ((f = (l = e.columns) == null ? void 0 : l.filter((s) => s.fixed === "left")) == null ? void 0 : f.map((s, d) => ({ ...s, order: d }))) ?? [], i = ((ae = (u = e.columns) == null ? void 0 : u.filter((s) => s.fixed === "right")) == null ? void 0 : ae.map((s, d) => ({ ...s, order: d }))) ?? [], a = ((oe = (ce = e.columns) == null ? void 0 : ce.filter((s) => !["left", "right"].includes(s.fixed))) == null ? void 0 : oe.map((s, d) => ({ ...s, order: d }))) ?? [], n = [...t, ...a, ...i], o = {};
|
|
81
177
|
return n == null || n.forEach(
|
|
82
|
-
({ key:
|
|
83
|
-
const
|
|
84
|
-
|
|
178
|
+
({ key: s, dataIndex: d, order: Ce, fixed: me, disabled: we }, xe) => {
|
|
179
|
+
const le = se(s ?? d, xe);
|
|
180
|
+
le && (o[le] = {
|
|
85
181
|
show: !0,
|
|
86
|
-
order:
|
|
87
|
-
fixed:
|
|
88
|
-
disabled:
|
|
182
|
+
order: Ce,
|
|
183
|
+
fixed: me,
|
|
184
|
+
disabled: we
|
|
89
185
|
});
|
|
90
186
|
}
|
|
91
|
-
),
|
|
92
|
-
}, [e.columns]), [
|
|
187
|
+
), o;
|
|
188
|
+
}, [e.columns]), [b, w] = O(
|
|
93
189
|
() => {
|
|
94
|
-
var n,
|
|
95
|
-
const { persistenceType: t, persistenceKey:
|
|
96
|
-
if (
|
|
97
|
-
const
|
|
190
|
+
var n, o, c, l;
|
|
191
|
+
const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.columnsState || {};
|
|
192
|
+
if (i && t && typeof window < "u" && t !== "online") {
|
|
193
|
+
const f = window[t];
|
|
98
194
|
try {
|
|
99
|
-
const u =
|
|
195
|
+
const u = f == null ? void 0 : f.getItem(i);
|
|
100
196
|
if (u)
|
|
101
|
-
return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ?
|
|
197
|
+
return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? S(
|
|
102
198
|
JSON.parse(u),
|
|
103
|
-
(
|
|
199
|
+
(o = e == null ? void 0 : e.columnsState) == null ? void 0 : o.defaultValue
|
|
104
200
|
) : JSON.parse(u);
|
|
105
201
|
} catch (u) {
|
|
106
202
|
console.warn(u);
|
|
107
203
|
}
|
|
108
204
|
}
|
|
109
|
-
return e.columnsStateMap || ((
|
|
205
|
+
return e.columnsStateMap || ((c = e.columnsState) == null ? void 0 : c.value) || ((l = e.columnsState) == null ? void 0 : l.defaultValue) || m;
|
|
110
206
|
},
|
|
111
207
|
{
|
|
112
|
-
value: ((
|
|
113
|
-
onChange: ((
|
|
208
|
+
value: ((A = e.columnsState) == null ? void 0 : A.value) || e.columnsStateMap,
|
|
209
|
+
onChange: ((F = e.columnsState) == null ? void 0 : F.onChange) || e.onColumnsStateChange
|
|
114
210
|
}
|
|
115
211
|
);
|
|
116
|
-
|
|
117
|
-
var n,
|
|
118
|
-
const { persistenceType: t, persistenceKey:
|
|
119
|
-
if (
|
|
120
|
-
const
|
|
212
|
+
y(() => {
|
|
213
|
+
var n, o;
|
|
214
|
+
const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.columnsState || {};
|
|
215
|
+
if (i && t && typeof window < "u" && t !== "online") {
|
|
216
|
+
const c = window[t];
|
|
121
217
|
try {
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
JSON.parse(
|
|
126
|
-
(
|
|
218
|
+
const l = c == null ? void 0 : c.getItem(i);
|
|
219
|
+
l ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? w(
|
|
220
|
+
S(
|
|
221
|
+
JSON.parse(l),
|
|
222
|
+
(o = e == null ? void 0 : e.columnsState) == null ? void 0 : o.defaultValue
|
|
127
223
|
)
|
|
128
|
-
) :
|
|
129
|
-
} catch (
|
|
130
|
-
console.warn(
|
|
224
|
+
) : w(JSON.parse(l)) : w(m);
|
|
225
|
+
} catch (l) {
|
|
226
|
+
console.warn(l);
|
|
131
227
|
}
|
|
132
228
|
}
|
|
133
229
|
}, [
|
|
134
|
-
(
|
|
135
|
-
(
|
|
136
|
-
|
|
230
|
+
(H = e.columnsState) == null ? void 0 : H.persistenceKey,
|
|
231
|
+
(L = e.columnsState) == null ? void 0 : L.persistenceType,
|
|
232
|
+
m
|
|
137
233
|
]);
|
|
138
|
-
const
|
|
139
|
-
const { persistenceType: t, persistenceKey:
|
|
140
|
-
if (!
|
|
234
|
+
const I = J(() => {
|
|
235
|
+
const { persistenceType: t, persistenceKey: i } = e.columnsState || {};
|
|
236
|
+
if (!i || !t || typeof window > "u")
|
|
237
|
+
return;
|
|
238
|
+
const a = window[t];
|
|
239
|
+
try {
|
|
240
|
+
a == null || a.removeItem(i);
|
|
241
|
+
} catch (n) {
|
|
242
|
+
console.warn(n);
|
|
243
|
+
}
|
|
244
|
+
}, [e.columnsState]), E = J(() => {
|
|
245
|
+
const { persistenceType: t, persistenceKey: i } = e.stylesConfigState || {};
|
|
246
|
+
if (!i || !t || typeof window > "u")
|
|
141
247
|
return;
|
|
142
|
-
const
|
|
248
|
+
const a = window[t];
|
|
143
249
|
try {
|
|
144
|
-
|
|
250
|
+
a == null || a.removeItem(i);
|
|
145
251
|
} catch (n) {
|
|
146
252
|
console.warn(n);
|
|
147
253
|
}
|
|
148
|
-
}, [e.
|
|
149
|
-
const { persistenceType: t, persistenceKey:
|
|
150
|
-
if (!
|
|
254
|
+
}, [e.stylesConfigState]), M = J(() => {
|
|
255
|
+
const { persistenceType: t, persistenceKey: i } = e.exportConfigState || {};
|
|
256
|
+
if (!i || !t || typeof window > "u")
|
|
151
257
|
return;
|
|
152
|
-
const
|
|
258
|
+
const a = window[t];
|
|
153
259
|
try {
|
|
154
|
-
|
|
260
|
+
a == null || a.removeItem(i);
|
|
155
261
|
} catch (n) {
|
|
156
262
|
console.warn(n);
|
|
157
263
|
}
|
|
158
|
-
}, [e.
|
|
159
|
-
|
|
160
|
-
var
|
|
161
|
-
if (!((
|
|
264
|
+
}, [e.exportConfigState]);
|
|
265
|
+
y(() => {
|
|
266
|
+
var a, n;
|
|
267
|
+
if (!((a = e.columnsState) != null && a.persistenceKey) || !((n = e.columnsState) != null && n.persistenceType) || typeof window > "u")
|
|
162
268
|
return;
|
|
163
269
|
const {
|
|
164
270
|
persistenceType: t,
|
|
165
|
-
persistenceKey:
|
|
271
|
+
persistenceKey: i
|
|
166
272
|
// onlineChange
|
|
167
273
|
} = e.columnsState;
|
|
168
274
|
if (t !== "online") {
|
|
169
|
-
const
|
|
275
|
+
const o = window[t];
|
|
170
276
|
try {
|
|
171
|
-
|
|
172
|
-
} catch (
|
|
173
|
-
console.warn(
|
|
277
|
+
o == null || o.setItem(i, JSON.stringify(b));
|
|
278
|
+
} catch (c) {
|
|
279
|
+
console.warn(c), I();
|
|
174
280
|
}
|
|
175
281
|
}
|
|
176
282
|
}, [
|
|
177
|
-
(
|
|
178
|
-
|
|
179
|
-
(
|
|
180
|
-
]),
|
|
181
|
-
var t,
|
|
182
|
-
if ((t = e.columnsState) != null && t.persistenceKey && ((
|
|
183
|
-
const { onlineGet: n, persistenceKey:
|
|
283
|
+
(Q = e.columnsState) == null ? void 0 : Q.persistenceKey,
|
|
284
|
+
b,
|
|
285
|
+
(W = e.columnsState) == null ? void 0 : W.persistenceType
|
|
286
|
+
]), y(() => {
|
|
287
|
+
var t, i, a;
|
|
288
|
+
if ((t = e.columnsState) != null && t.persistenceKey && ((i = e.columnsState) == null ? void 0 : i.persistenceType) === "online") {
|
|
289
|
+
const { onlineGet: n, persistenceKey: o } = e.columnsState;
|
|
184
290
|
try {
|
|
185
|
-
(
|
|
186
|
-
var
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
(u = Object.keys(
|
|
291
|
+
(a = n == null ? void 0 : n(o)) == null || a.then((c) => {
|
|
292
|
+
var f, u;
|
|
293
|
+
const l = S(c, (f = e == null ? void 0 : e.columnsState) == null ? void 0 : f.value);
|
|
294
|
+
w(
|
|
295
|
+
(u = Object.keys(l ?? {})) != null && u.length ? l ?? {} : m
|
|
190
296
|
);
|
|
191
297
|
});
|
|
192
|
-
} catch (
|
|
193
|
-
console.warn(
|
|
298
|
+
} catch (c) {
|
|
299
|
+
console.warn(c);
|
|
194
300
|
}
|
|
195
301
|
}
|
|
196
302
|
}, []);
|
|
197
|
-
const
|
|
198
|
-
uuid:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
303
|
+
const v = {
|
|
304
|
+
uuid: x.current,
|
|
305
|
+
columns: e.columns,
|
|
306
|
+
persistenceType: (X = e.columnsState) == null ? void 0 : X.persistenceType,
|
|
307
|
+
persistenceKey: (Y = e.columnsState) == null ? void 0 : Y.persistenceKey,
|
|
308
|
+
onlineChange: (_ = e.columnsState) == null ? void 0 : _.onlineChange,
|
|
309
|
+
sortKeyColumns: K.current,
|
|
203
310
|
setSortKeyColumns: (t) => {
|
|
204
|
-
|
|
311
|
+
K.current = t;
|
|
205
312
|
},
|
|
206
|
-
columnsMap:
|
|
207
|
-
setColumnsMap:
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
clearStylesConfigCache:
|
|
218
|
-
defaultTableStylesConfig:
|
|
219
|
-
|
|
313
|
+
columnsMap: b,
|
|
314
|
+
setColumnsMap: w,
|
|
315
|
+
defaultColumnKeyMap: m,
|
|
316
|
+
clearPersistenceStorage: I,
|
|
317
|
+
stylesConfig: h,
|
|
318
|
+
setTableStylesConfig: z,
|
|
319
|
+
defaultTableSize: N,
|
|
320
|
+
tableSize: h.size,
|
|
321
|
+
stylesStorageType: ($ = e.stylesConfigState) == null ? void 0 : $.persistenceType,
|
|
322
|
+
stylesStorageKey: (p = e.stylesConfigState) == null ? void 0 : p.persistenceKey,
|
|
323
|
+
onlineStylesConfigChange: (ee = e.stylesConfigState) == null ? void 0 : ee.onlineChange,
|
|
324
|
+
clearStylesConfigCache: E,
|
|
325
|
+
defaultTableStylesConfig: T,
|
|
326
|
+
exportConfig: V,
|
|
327
|
+
setTableExportConfig: C,
|
|
328
|
+
defaultTableExportConfig: g,
|
|
329
|
+
exportStorageType: (te = e.exportConfigState) == null ? void 0 : te.persistenceType,
|
|
330
|
+
exportStorageKey: (ne = e.exportConfigState) == null ? void 0 : ne.persistenceKey,
|
|
331
|
+
onlineExportConfigChange: (ie = e.exportConfigState) == null ? void 0 : ie.onlineChange,
|
|
332
|
+
clearExportConfigCache: M
|
|
220
333
|
};
|
|
221
|
-
return Object.defineProperty(
|
|
222
|
-
get: () =>
|
|
223
|
-
}), Object.defineProperty(
|
|
224
|
-
get: () =>
|
|
225
|
-
}),
|
|
334
|
+
return Object.defineProperty(v, "sortKeyColumns", {
|
|
335
|
+
get: () => K.current
|
|
336
|
+
}), Object.defineProperty(v, "uuid", {
|
|
337
|
+
get: () => x.current
|
|
338
|
+
}), v;
|
|
226
339
|
}
|
|
227
|
-
const
|
|
228
|
-
const
|
|
229
|
-
return /* @__PURE__ */
|
|
340
|
+
const Oe = Ke({}), Be = (e) => {
|
|
341
|
+
const x = ve(e.initValue);
|
|
342
|
+
return /* @__PURE__ */ he.jsx(Oe.Provider, { value: x, children: e.children });
|
|
230
343
|
};
|
|
231
344
|
export {
|
|
232
|
-
|
|
233
|
-
|
|
345
|
+
Oe as BitzTableContext,
|
|
346
|
+
Be as default
|
|
234
347
|
};
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
const a = (r,
|
|
2
|
-
let
|
|
1
|
+
const a = (r, d) => {
|
|
2
|
+
let f = 0, t = 0;
|
|
3
3
|
return {
|
|
4
|
-
filterColumns: ((o,
|
|
5
|
-
const
|
|
6
|
-
return
|
|
7
|
-
}))(r,
|
|
8
|
-
width:
|
|
4
|
+
filterColumns: ((o, l) => o.map((n) => {
|
|
5
|
+
const e = h((n == null ? void 0 : n.key) || (n == null ? void 0 : n.dataIndex), n.index), s = l[e];
|
|
6
|
+
return s && s.show === !1 ? (n.width ? f += n.width : t += 1, !1) : { ...n, ...s };
|
|
7
|
+
}))(r, d).filter(Boolean),
|
|
8
|
+
width: f,
|
|
9
9
|
autoWidthColLength: t
|
|
10
10
|
};
|
|
11
|
-
}, h = (r,
|
|
12
|
-
var
|
|
13
|
-
const { fixed: t, index:
|
|
14
|
-
if (t === "left" &&
|
|
11
|
+
}, h = (r, d) => r ? Array.isArray(r) ? r.join("-") : r.toString() : `${d}`, y = (r) => (d, f) => {
|
|
12
|
+
var e, s, u, x;
|
|
13
|
+
const { fixed: t, index: c } = d, { fixed: i, index: o } = f;
|
|
14
|
+
if (t === "left" && i !== "left" || i === "right" && t !== "right")
|
|
15
15
|
return -2;
|
|
16
|
-
if (
|
|
16
|
+
if (i === "left" && t !== "left" || t === "right" && i !== "right")
|
|
17
17
|
return 2;
|
|
18
|
-
const
|
|
19
|
-
return (
|
|
18
|
+
const l = d.key || `${c}`, n = f.key || `${o}`;
|
|
19
|
+
return (e = r[l]) != null && e.order || (s = r[n]) != null && s.order ? (((u = r[l]) == null ? void 0 : u.order) || 0) - (((x = r[n]) == null ? void 0 : x.order) || 0) : (d.index || 0) - (f.index || 0);
|
|
20
20
|
};
|
|
21
|
-
function g(r,
|
|
21
|
+
function g(r, d, f) {
|
|
22
22
|
const t = {};
|
|
23
|
-
let
|
|
24
|
-
const
|
|
25
|
-
for (const
|
|
26
|
-
if (o.hasOwnProperty(
|
|
27
|
-
const
|
|
28
|
-
t[
|
|
29
|
-
...
|
|
30
|
-
[
|
|
31
|
-
|
|
23
|
+
let c = "";
|
|
24
|
+
const i = (o, l, n) => {
|
|
25
|
+
for (const e in o)
|
|
26
|
+
if (o.hasOwnProperty(e) && (typeof o[e] == "object" && o[e] !== null && (c = e, t[e] = { ...o[e] }, i(o[e], l, n)), e === l)) {
|
|
27
|
+
const s = t[c];
|
|
28
|
+
t[c] = {
|
|
29
|
+
...s,
|
|
30
|
+
[l]: n
|
|
31
|
+
// [prop]: current.disabled || current.fixed ? true : val,
|
|
32
|
+
}, c = "";
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
|
-
return
|
|
35
|
+
return i(r, d, f), t;
|
|
35
36
|
}
|
|
36
37
|
export {
|
|
37
38
|
y as columnSort,
|