bitz-react-admin-ui 2.3.1 → 2.3.3
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/_commonjsHelpers.mjs +4 -26
- package/dist/components/BitzConfigProvider/context.d.ts +1 -0
- package/dist/components/BitzConfigProvider/context.mjs +4 -3
- package/dist/components/BitzHighlight/style.mjs +12 -12
- package/dist/components/BitzTable/ActionBar/style.mjs +21 -21
- package/dist/components/BitzTable/ActionCol/index.mjs +59 -58
- package/dist/components/BitzTable/ActionCol/style.d.ts +1 -1
- package/dist/components/BitzTable/ActionCol/style.mjs +28 -28
- package/dist/components/BitzTable/Dropdown/style.mjs +25 -25
- package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +26 -15
- package/dist/components/BitzTable/SelectionBar/style.mjs +24 -24
- package/dist/components/BitzTable/Store/index.d.ts +4 -0
- package/dist/components/BitzTable/Store/index.mjs +90 -88
- package/dist/components/BitzTable/SubTable/index.mjs +94 -94
- package/dist/components/BitzTable/Table/SortTableContext.d.ts +3 -5
- package/dist/components/BitzTable/Table/SortTableContext.mjs +42 -19
- package/dist/components/BitzTable/Table/index.d.ts +1 -2
- package/dist/components/BitzTable/Table/index.mjs +247 -245
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +51 -47
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +61 -60
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +46 -38
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +44 -44
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +19 -12
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +46 -43
- package/dist/components/BitzTable/ToolBar/style.mjs +21 -21
- package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +15 -16
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +13 -14
- package/dist/components/BitzTableSelect/TableCell/index.mjs +34 -33
- package/dist/components/BitzTableSelect/TextBlock/index.mjs +20 -18
- package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +7 -8
- package/dist/node_modules/.store/use-sync-external-store@1.2.0/node_modules/use-sync-external-store/shim/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/_virtual/Draggable.mjs +0 -4
- package/dist/_virtual/DraggableCore.mjs +0 -4
- package/dist/_virtual/Resizable.mjs +0 -4
- package/dist/_virtual/ResizableBox.mjs +0 -4
- package/dist/_virtual/cjs.mjs +0 -4
- package/dist/_virtual/clsx.m.mjs +0 -6
- package/dist/_virtual/domFns.mjs +0 -4
- package/dist/_virtual/getPrefix.mjs +0 -4
- package/dist/_virtual/index6.mjs +0 -4
- package/dist/_virtual/log.mjs +0 -4
- package/dist/_virtual/positionFns.mjs +0 -4
- package/dist/_virtual/propTypes.mjs +0 -4
- package/dist/_virtual/shims.mjs +0 -4
- package/dist/_virtual/utils.mjs +0 -4
- package/dist/components/BitzTable/Table/ResizableTitle.mjs +0 -32
- package/dist/node_modules/.store/clsx@1.2.1/node_modules/clsx/dist/clsx.m.mjs +0 -22
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/Draggable.mjs +0 -343
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/DraggableCore.mjs +0 -324
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/cjs.mjs +0 -14
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/domFns.mjs +0 -174
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/getPrefix.mjs +0 -35
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/log.mjs +0 -7
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/positionFns.mjs +0 -107
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/shims.mjs +0 -30
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/Resizable.mjs +0 -201
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/ResizableBox.mjs +0 -162
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/propTypes.mjs +0 -118
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/utils.mjs +0 -54
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/index.mjs +0 -13
|
@@ -1,22 +1,33 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { Space as
|
|
1
|
+
import { j as e } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { Space as i } from "antd";
|
|
3
3
|
import n from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
4
|
-
import { useContext as
|
|
4
|
+
import { useContext as p, useMemo as f, useEffect as x } from "react";
|
|
5
5
|
import { BitzTableContext as C } from "../Store/index.mjs";
|
|
6
|
-
import
|
|
7
|
-
const v = ({ show:
|
|
6
|
+
import d from "./style.mjs";
|
|
7
|
+
const v = ({ show: t, children: a }) => {
|
|
8
8
|
const {
|
|
9
|
-
blockClassName:
|
|
10
|
-
showCls:
|
|
11
|
-
btnClassName:
|
|
12
|
-
batchOperationClassName:
|
|
9
|
+
blockClassName: o,
|
|
10
|
+
showCls: r,
|
|
11
|
+
btnClassName: u,
|
|
12
|
+
batchOperationClassName: l,
|
|
13
13
|
alertContentClassName: N
|
|
14
|
-
} =
|
|
15
|
-
[`${
|
|
16
|
-
}), [
|
|
17
|
-
return
|
|
18
|
-
m(
|
|
19
|
-
}, [
|
|
14
|
+
} = d(), { setSelected: m, toolbarWidth: s } = p(C), c = f(() => n(o, {
|
|
15
|
+
[`${r}`]: t
|
|
16
|
+
}), [t]);
|
|
17
|
+
return x(() => {
|
|
18
|
+
m(t ?? !1);
|
|
19
|
+
}, [t]), /* @__PURE__ */ e.jsx("div", { className: c, children: /* @__PURE__ */ e.jsx(
|
|
20
|
+
i.Compact,
|
|
21
|
+
{
|
|
22
|
+
className: l,
|
|
23
|
+
style: {
|
|
24
|
+
...s && {
|
|
25
|
+
width: `calc(100% - 50px - ${s}px)`
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
children: a || /* @__PURE__ */ e.jsx("div", {})
|
|
29
|
+
}
|
|
30
|
+
) });
|
|
20
31
|
};
|
|
21
32
|
export {
|
|
22
33
|
v as default
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/extractStyle.mjs";
|
|
2
2
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.mjs";
|
|
3
|
-
import { useContext as
|
|
3
|
+
import { useContext as R, useMemo as Y } from "react";
|
|
4
4
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/StyleContext.mjs";
|
|
5
5
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/theme/createTheme.mjs";
|
|
6
6
|
import "../../../node_modules/.store/rc-util@5.39.1/node_modules/rc-util/es/warning.mjs";
|
|
@@ -8,14 +8,14 @@ import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@an
|
|
|
8
8
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.mjs";
|
|
9
9
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.mjs";
|
|
10
10
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useHMR.mjs";
|
|
11
|
-
import
|
|
11
|
+
import j from "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.mjs";
|
|
12
12
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/transformers/legacyLogicalProperties.mjs";
|
|
13
13
|
import n from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
14
|
-
import { BitzTableContext as
|
|
15
|
-
import
|
|
16
|
-
const
|
|
17
|
-
const { tableSize: a } =
|
|
18
|
-
var p, h, c, $, z;
|
|
14
|
+
import { BitzTableContext as A } from "../Store/index.mjs";
|
|
15
|
+
import D from "../../BitzTheme/index.mjs";
|
|
16
|
+
const _ = () => {
|
|
17
|
+
const { tableSize: a } = R(A), d = Y(() => a ?? "lg", [a]), { theme: T, hashId: o, token: i } = D.useToken(), r = "bitzTableSelectionBar", s = "batchOperation", m = "selectionAction", f = "alertContent", l = "show", x = (t, C, O, G, I, e) => {
|
|
18
|
+
var p, h, c, $, z, S, b, g, u;
|
|
19
19
|
return [
|
|
20
20
|
{
|
|
21
21
|
[`.${t}`]: {
|
|
@@ -33,12 +33,12 @@ const V = () => {
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
|
-
[`.${t}.${
|
|
36
|
+
[`.${t}.${C}`]: {
|
|
37
37
|
transform: "translateY(0%)"
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
|
-
[`.${t} .${
|
|
41
|
+
[`.${t} .${O}`]: {
|
|
42
42
|
fontSize: "inherit",
|
|
43
43
|
height: "100%",
|
|
44
44
|
overflow: "auto hidden",
|
|
@@ -48,7 +48,7 @@ const V = () => {
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
[`.${t} .${
|
|
51
|
+
[`.${t} .${I}`]: {
|
|
52
52
|
height: "100%",
|
|
53
53
|
"span, strong": {
|
|
54
54
|
wordBreak: "keep-all"
|
|
@@ -56,7 +56,7 @@ const V = () => {
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
|
-
[`.${t} .${
|
|
59
|
+
[`.${t} .${G}`]: {
|
|
60
60
|
fontSize: "inherit",
|
|
61
61
|
color: "#fff",
|
|
62
62
|
height: "100%",
|
|
@@ -78,35 +78,35 @@ const V = () => {
|
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
[`.${t}.lg${t}`]: {
|
|
81
|
-
fontSize: (h = e.Table.lgTable) == null ? void 0 :
|
|
81
|
+
fontSize: (c = (h = e.Table) == null ? void 0 : h.lgTable) == null ? void 0 : c.fontSize
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
[`.${t}.md${t}`]: {
|
|
86
|
-
fontSize: (
|
|
86
|
+
fontSize: (z = ($ = e.Table) == null ? void 0 : $.mdTable) == null ? void 0 : z.fontSize
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
[`.${t}.sm${t}`]: {
|
|
91
|
-
fontSize: (
|
|
91
|
+
fontSize: (b = (S = e.Table) == null ? void 0 : S.smTable) == null ? void 0 : b.fontSize
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
[`.${t}.xs${t}`]: {
|
|
96
|
-
fontSize: (
|
|
96
|
+
fontSize: (u = (g = e.Table) == null ? void 0 : g.xsTable) == null ? void 0 : u.fontSize
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
];
|
|
100
100
|
};
|
|
101
|
-
|
|
101
|
+
j(
|
|
102
102
|
{
|
|
103
|
-
theme:
|
|
103
|
+
theme: T,
|
|
104
104
|
token: i,
|
|
105
105
|
hashId: o,
|
|
106
106
|
path: [r]
|
|
107
107
|
},
|
|
108
108
|
() => [
|
|
109
|
-
|
|
109
|
+
x(
|
|
110
110
|
r,
|
|
111
111
|
l,
|
|
112
112
|
s,
|
|
@@ -116,15 +116,15 @@ const V = () => {
|
|
|
116
116
|
)
|
|
117
117
|
]
|
|
118
118
|
);
|
|
119
|
-
const
|
|
119
|
+
const w = `${d}${r}`, y = n(r, w, o), B = n(m, o), N = n(f, o), v = n(s, o);
|
|
120
120
|
return {
|
|
121
|
-
blockClassName:
|
|
121
|
+
blockClassName: y,
|
|
122
122
|
showCls: l,
|
|
123
|
-
btnClassName:
|
|
124
|
-
batchOperationClassName:
|
|
125
|
-
alertContentClassName:
|
|
123
|
+
btnClassName: B,
|
|
124
|
+
batchOperationClassName: v,
|
|
125
|
+
alertContentClassName: N
|
|
126
126
|
};
|
|
127
127
|
};
|
|
128
128
|
export {
|
|
129
|
-
|
|
129
|
+
_ as default
|
|
130
130
|
};
|
|
@@ -101,6 +101,8 @@ declare function useContainer(props: UseContainerProps): {
|
|
|
101
101
|
setFullscreen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
102
102
|
selected: boolean;
|
|
103
103
|
setSelected: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
104
|
+
toolbarWidth: number;
|
|
105
|
+
setToolbarWidth: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
104
106
|
columns: BitzTableColumnsType<any> | undefined;
|
|
105
107
|
baseColumns: (BitzTableColumnType<any> | import("..").BitzTableColumnGroupType<any>)[];
|
|
106
108
|
persistenceType: "online" | "localStorage" | "sessionStorage" | undefined;
|
|
@@ -138,6 +140,8 @@ declare const BitzTableContext: import("react").Context<{
|
|
|
138
140
|
setFullscreen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
139
141
|
selected: boolean;
|
|
140
142
|
setSelected: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
143
|
+
toolbarWidth: number;
|
|
144
|
+
setToolbarWidth: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
141
145
|
columns: BitzTableColumnsType<any> | undefined;
|
|
142
146
|
baseColumns: (BitzTableColumnType<any> | import("..").BitzTableColumnGroupType<any>)[];
|
|
143
147
|
persistenceType: "online" | "localStorage" | "sessionStorage" | undefined;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { Table as
|
|
1
|
+
import { j as Ke } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { Table as le } from "antd";
|
|
3
3
|
import V from "../../../hooks/useMergedState.mjs";
|
|
4
|
-
import { createContext as
|
|
4
|
+
import { createContext as Oe, useRef as Ve, useState as v, useContext as ve, useEffect as d, useMemo as g, useCallback as z } from "react";
|
|
5
5
|
import { genColumnKey as N } from "./utils/index.mjs";
|
|
6
|
-
import { getUuid as
|
|
7
|
-
import { BitzConfigContext as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
6
|
+
import { getUuid as ze } from "../../../utils/uuid.mjs";
|
|
7
|
+
import { BitzConfigContext as Ne } from "../../BitzConfigProvider/context.mjs";
|
|
8
|
+
import m from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
|
|
9
|
+
const Ee = {
|
|
10
10
|
fixed: "left",
|
|
11
11
|
className: "sorterCol",
|
|
12
12
|
isDragSorterCol: !0,
|
|
@@ -16,18 +16,18 @@ const Ne = {
|
|
|
16
16
|
onCell: () => ({
|
|
17
17
|
"data-column-name": "dragSorterCell"
|
|
18
18
|
})
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
}, Ie = [
|
|
20
|
+
Ee,
|
|
21
|
+
le.SELECTION_COLUMN,
|
|
22
|
+
le.EXPAND_COLUMN
|
|
23
23
|
];
|
|
24
|
-
function
|
|
25
|
-
var
|
|
26
|
-
const T =
|
|
27
|
-
size:
|
|
28
|
-
zebra:
|
|
29
|
-
bordered:
|
|
30
|
-
}, [y,
|
|
24
|
+
function Je(e) {
|
|
25
|
+
var k, H, R, L, P, U, D, _, G, W, Z, A, F, X, q, Q, Y, $, p, ee, te, ne, ie, ae, oe;
|
|
26
|
+
const T = Ve(ze()), [fe, re] = v(!1), [se, ue] = v(!1), [de, ye] = v(0), s = ve(Ne).Table, Se = s == null ? void 0 : s.defaultSize, E = e.size ?? e.defaultSize ?? Se ?? "lg", Ce = e.zebra ?? e.defaultZebra ?? (s == null ? void 0 : s.zebra) ?? !0, ge = e.bordered ?? e.defaultBordered ?? (s == null ? void 0 : s.bordered) ?? "row-column", K = e.defaultStylesConfig || {
|
|
27
|
+
size: E,
|
|
28
|
+
zebra: Ce,
|
|
29
|
+
bordered: ge
|
|
30
|
+
}, [y, I] = V(
|
|
31
31
|
() => {
|
|
32
32
|
var n, c, l, a;
|
|
33
33
|
const { persistenceType: t, persistenceKey: i, onlineGet: o } = e.stylesConfigState || {};
|
|
@@ -36,7 +36,7 @@ function Ee(e) {
|
|
|
36
36
|
try {
|
|
37
37
|
const r = f == null ? void 0 : f.getItem(i);
|
|
38
38
|
if (r)
|
|
39
|
-
return (n = e == null ? void 0 : e.stylesConfigState) != null && n.defaultValue ?
|
|
39
|
+
return (n = e == null ? void 0 : e.stylesConfigState) != null && n.defaultValue ? m(
|
|
40
40
|
JSON.parse(r),
|
|
41
41
|
(c = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : c.defaultValue
|
|
42
42
|
) : JSON.parse(r);
|
|
@@ -44,11 +44,11 @@ function Ee(e) {
|
|
|
44
44
|
console.warn(r);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
return e.stylesConfig || ((l = e.stylesConfigState) == null ? void 0 : l.value) || ((a = e.stylesConfigState) == null ? void 0 : a.defaultValue) ||
|
|
47
|
+
return e.stylesConfig || ((l = e.stylesConfigState) == null ? void 0 : l.value) || ((a = e.stylesConfigState) == null ? void 0 : a.defaultValue) || K;
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
|
-
value: ((
|
|
51
|
-
onChange: ((
|
|
50
|
+
value: ((k = e.stylesConfigState) == null ? void 0 : k.value) || e.stylesConfig,
|
|
51
|
+
onChange: ((H = e.stylesConfigState) == null ? void 0 : H.onChange) || e.onStylesConfigChange
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
54
|
d(() => {
|
|
@@ -65,13 +65,13 @@ function Ee(e) {
|
|
|
65
65
|
try {
|
|
66
66
|
c == null || c.setItem(i, JSON.stringify(y));
|
|
67
67
|
} catch (l) {
|
|
68
|
-
console.warn(l),
|
|
68
|
+
console.warn(l), B();
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
}, [
|
|
72
|
-
(
|
|
72
|
+
(R = e.stylesConfigState) == null ? void 0 : R.persistenceKey,
|
|
73
73
|
y,
|
|
74
|
-
(
|
|
74
|
+
(L = e.stylesConfigState) == null ? void 0 : L.persistenceType
|
|
75
75
|
]), d(() => {
|
|
76
76
|
var t, i, o;
|
|
77
77
|
if ((t = e.stylesConfigState) != null && t.persistenceKey && ((i = e.stylesConfigState) == null ? void 0 : i.persistenceType) === "online") {
|
|
@@ -79,9 +79,9 @@ function Ee(e) {
|
|
|
79
79
|
try {
|
|
80
80
|
(o = n == null ? void 0 : n(c)) == null || o.then((l) => {
|
|
81
81
|
var f;
|
|
82
|
-
const a =
|
|
83
|
-
|
|
84
|
-
Object.keys(a).length ? a :
|
|
82
|
+
const a = m(l ?? {}, (f = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : f.value);
|
|
83
|
+
I(
|
|
84
|
+
Object.keys(a).length ? a : K
|
|
85
85
|
);
|
|
86
86
|
});
|
|
87
87
|
} catch (l) {
|
|
@@ -89,7 +89,7 @@ function Ee(e) {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}, []);
|
|
92
|
-
const u =
|
|
92
|
+
const u = g(() => (e.columns ?? []).filter((t) => !Ie.includes(t)), [e.columns]), x = g(() => {
|
|
93
93
|
var i;
|
|
94
94
|
if ((i = e == null ? void 0 : e.exportConfigState) != null && i.defaultValue)
|
|
95
95
|
return e.exportConfigState.defaultValue;
|
|
@@ -117,7 +117,7 @@ function Ee(e) {
|
|
|
117
117
|
try {
|
|
118
118
|
const r = f == null ? void 0 : f.getItem(i);
|
|
119
119
|
if (r)
|
|
120
|
-
return (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ?
|
|
120
|
+
return (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? m(
|
|
121
121
|
JSON.parse(r),
|
|
122
122
|
(c = e == null ? void 0 : e.exportConfigState) == null ? void 0 : c.defaultValue
|
|
123
123
|
) : JSON.parse(r);
|
|
@@ -128,8 +128,8 @@ function Ee(e) {
|
|
|
128
128
|
return e.exportConfig || ((l = e.exportConfigState) == null ? void 0 : l.value) || ((a = e.exportConfigState) == null ? void 0 : a.defaultValue) || x;
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
|
-
value: ((
|
|
132
|
-
onChange: ((
|
|
131
|
+
value: ((P = e.exportConfigState) == null ? void 0 : P.value) || e.exportConfig,
|
|
132
|
+
onChange: ((U = e.exportConfigState) == null ? void 0 : U.onChange) || e.onExportConfigChange
|
|
133
133
|
}
|
|
134
134
|
);
|
|
135
135
|
d(() => {
|
|
@@ -140,7 +140,7 @@ function Ee(e) {
|
|
|
140
140
|
try {
|
|
141
141
|
const a = l == null ? void 0 : l.getItem(i);
|
|
142
142
|
a ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? h(
|
|
143
|
-
|
|
143
|
+
m(
|
|
144
144
|
JSON.parse(a),
|
|
145
145
|
(c = e == null ? void 0 : e.exportConfigState) == null ? void 0 : c.defaultValue
|
|
146
146
|
)
|
|
@@ -150,8 +150,8 @@ function Ee(e) {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
}, [
|
|
153
|
-
(
|
|
154
|
-
(
|
|
153
|
+
(D = e.exportConfigState) == null ? void 0 : D.persistenceKey,
|
|
154
|
+
(_ = e.exportConfigState) == null ? void 0 : _.persistenceType,
|
|
155
155
|
x
|
|
156
156
|
]), d(() => {
|
|
157
157
|
var o, n;
|
|
@@ -167,13 +167,13 @@ function Ee(e) {
|
|
|
167
167
|
try {
|
|
168
168
|
c == null || c.setItem(i, JSON.stringify(O));
|
|
169
169
|
} catch (l) {
|
|
170
|
-
console.warn(l),
|
|
170
|
+
console.warn(l), j();
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
}, [
|
|
174
|
-
(
|
|
174
|
+
(G = e.exportConfigState) == null ? void 0 : G.persistenceKey,
|
|
175
175
|
O,
|
|
176
|
-
(
|
|
176
|
+
(W = e.exportConfigState) == null ? void 0 : W.persistenceType
|
|
177
177
|
]), d(() => {
|
|
178
178
|
var t, i, o;
|
|
179
179
|
if ((t = e.exportConfigState) != null && t.persistenceKey && ((i = e.exportConfigState) == null ? void 0 : i.persistenceType) === "online") {
|
|
@@ -181,7 +181,7 @@ function Ee(e) {
|
|
|
181
181
|
try {
|
|
182
182
|
(o = n == null ? void 0 : n(c)) == null || o.then((l) => {
|
|
183
183
|
var f;
|
|
184
|
-
const a =
|
|
184
|
+
const a = m(l ?? {}, (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
|
|
185
185
|
h(
|
|
186
186
|
Object.keys(a).length ? a : x
|
|
187
187
|
);
|
|
@@ -191,21 +191,21 @@ function Ee(e) {
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
}, []);
|
|
194
|
-
const S =
|
|
194
|
+
const S = g(() => {
|
|
195
195
|
var l;
|
|
196
196
|
if ((l = e == null ? void 0 : e.columnsState) != null && l.defaultValue)
|
|
197
197
|
return e.columnsState.defaultValue;
|
|
198
198
|
const t = u.filter((a) => a.fixed === "left").map((a, f) => ({ ...a, order: f })), i = u.filter((a) => a.fixed === "right").map((a, f) => ({ ...a, order: f })), o = u.filter((a) => !["left", "right"].includes(a.fixed)).map((a, f) => ({ ...a, order: f })), n = [...t, ...o, ...i], c = {};
|
|
199
199
|
return n.forEach((a, f) => {
|
|
200
|
-
const { order: r, fixed:
|
|
201
|
-
|
|
200
|
+
const { order: r, fixed: Te, disabled: be } = a, ce = N(a, f);
|
|
201
|
+
ce && (c[ce] = {
|
|
202
202
|
show: !0,
|
|
203
203
|
order: r,
|
|
204
|
-
fixed:
|
|
205
|
-
disabled:
|
|
204
|
+
fixed: Te,
|
|
205
|
+
disabled: be
|
|
206
206
|
});
|
|
207
207
|
}), c;
|
|
208
|
-
}, [u]), [
|
|
208
|
+
}, [u]), [C, w] = V(
|
|
209
209
|
() => {
|
|
210
210
|
var n, c, l, a;
|
|
211
211
|
const { persistenceType: t, persistenceKey: i, onlineGet: o } = e.columnsState || {};
|
|
@@ -214,7 +214,7 @@ function Ee(e) {
|
|
|
214
214
|
try {
|
|
215
215
|
const r = f == null ? void 0 : f.getItem(i);
|
|
216
216
|
if (r)
|
|
217
|
-
return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ?
|
|
217
|
+
return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? m(
|
|
218
218
|
JSON.parse(r),
|
|
219
219
|
(c = e == null ? void 0 : e.columnsState) == null ? void 0 : c.defaultValue
|
|
220
220
|
) : JSON.parse(r);
|
|
@@ -237,7 +237,7 @@ function Ee(e) {
|
|
|
237
237
|
try {
|
|
238
238
|
const a = l == null ? void 0 : l.getItem(i);
|
|
239
239
|
a ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? w(
|
|
240
|
-
|
|
240
|
+
m(
|
|
241
241
|
JSON.parse(a),
|
|
242
242
|
(c = e == null ? void 0 : e.columnsState) == null ? void 0 : c.defaultValue
|
|
243
243
|
)
|
|
@@ -251,7 +251,7 @@ function Ee(e) {
|
|
|
251
251
|
(X = e.columnsState) == null ? void 0 : X.persistenceType,
|
|
252
252
|
S
|
|
253
253
|
]);
|
|
254
|
-
const
|
|
254
|
+
const J = z(() => {
|
|
255
255
|
const { persistenceType: t, persistenceKey: i } = e.columnsState || {};
|
|
256
256
|
if (!i || !t || typeof window > "u")
|
|
257
257
|
return;
|
|
@@ -261,7 +261,7 @@ function Ee(e) {
|
|
|
261
261
|
} catch (n) {
|
|
262
262
|
console.warn(n);
|
|
263
263
|
}
|
|
264
|
-
}, [e.columnsState]),
|
|
264
|
+
}, [e.columnsState]), B = z(() => {
|
|
265
265
|
const { persistenceType: t, persistenceKey: i } = e.stylesConfigState || {};
|
|
266
266
|
if (!i || !t || typeof window > "u")
|
|
267
267
|
return;
|
|
@@ -271,7 +271,7 @@ function Ee(e) {
|
|
|
271
271
|
} catch (n) {
|
|
272
272
|
console.warn(n);
|
|
273
273
|
}
|
|
274
|
-
}, [e.stylesConfigState]),
|
|
274
|
+
}, [e.stylesConfigState]), j = z(() => {
|
|
275
275
|
const { persistenceType: t, persistenceKey: i } = e.exportConfigState || {};
|
|
276
276
|
if (!i || !t || typeof window > "u")
|
|
277
277
|
return;
|
|
@@ -294,14 +294,14 @@ function Ee(e) {
|
|
|
294
294
|
if (t !== "online") {
|
|
295
295
|
const c = window[t];
|
|
296
296
|
try {
|
|
297
|
-
c == null || c.setItem(i, JSON.stringify(
|
|
297
|
+
c == null || c.setItem(i, JSON.stringify(C));
|
|
298
298
|
} catch (l) {
|
|
299
|
-
console.warn(l),
|
|
299
|
+
console.warn(l), J();
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
}, [
|
|
303
303
|
(q = e.columnsState) == null ? void 0 : q.persistenceKey,
|
|
304
|
-
|
|
304
|
+
C,
|
|
305
305
|
(Q = e.columnsState) == null ? void 0 : Q.persistenceType
|
|
306
306
|
]), d(() => {
|
|
307
307
|
var t, i, o;
|
|
@@ -310,7 +310,7 @@ function Ee(e) {
|
|
|
310
310
|
try {
|
|
311
311
|
(o = n == null ? void 0 : n(c)) == null || o.then((l) => {
|
|
312
312
|
var f;
|
|
313
|
-
const a =
|
|
313
|
+
const a = m(l ?? {}, (f = e == null ? void 0 : e.columnsState) == null ? void 0 : f.value);
|
|
314
314
|
w(a);
|
|
315
315
|
});
|
|
316
316
|
} catch (l) {
|
|
@@ -322,60 +322,62 @@ function Ee(e) {
|
|
|
322
322
|
const t = u.findIndex((n) => n == null ? void 0 : n.isOperationCol);
|
|
323
323
|
if (t >= 0) {
|
|
324
324
|
const n = u[t], c = N(n, t);
|
|
325
|
-
!(((i =
|
|
325
|
+
!(((i = C == null ? void 0 : C[c]) == null ? void 0 : i.fixed) === ((o = S == null ? void 0 : S[c]) == null ? void 0 : o.fixed)) && Object.keys(C ?? {}).length === 0 && w(S);
|
|
326
326
|
}
|
|
327
|
-
}, [S]);
|
|
328
|
-
const
|
|
327
|
+
}, [S, C]);
|
|
328
|
+
const me = g(() => (e == null ? void 0 : e.rowHoverable) ?? (s == null ? void 0 : s.rowHoverable) ?? !0, [e == null ? void 0 : e.rowHoverable, s == null ? void 0 : s.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(() => {
|
|
329
329
|
let t = !1;
|
|
330
|
-
return ["hide", "column"].includes(
|
|
331
|
-
}, [
|
|
330
|
+
return ["hide", "column"].includes(b) && (t = !0), t;
|
|
331
|
+
}, [b]), M = {
|
|
332
332
|
loading: e.loading ?? !1,
|
|
333
333
|
uuid: T.current,
|
|
334
334
|
fullscreen: fe,
|
|
335
335
|
setFullscreen: re,
|
|
336
336
|
selected: se,
|
|
337
337
|
setSelected: ue,
|
|
338
|
+
toolbarWidth: de,
|
|
339
|
+
setToolbarWidth: ye,
|
|
338
340
|
columns: e.columns,
|
|
339
341
|
baseColumns: u,
|
|
340
|
-
persistenceType: (
|
|
341
|
-
persistenceKey: (
|
|
342
|
-
onlineChange: (
|
|
343
|
-
columnsMap:
|
|
342
|
+
persistenceType: (Y = e.columnsState) == null ? void 0 : Y.persistenceType,
|
|
343
|
+
persistenceKey: ($ = e.columnsState) == null ? void 0 : $.persistenceKey,
|
|
344
|
+
onlineChange: (p = e.columnsState) == null ? void 0 : p.onlineChange,
|
|
345
|
+
columnsMap: C,
|
|
344
346
|
setColumnsMap: w,
|
|
345
347
|
defaultColumnKeyMap: S,
|
|
346
|
-
clearPersistenceStorage:
|
|
348
|
+
clearPersistenceStorage: J,
|
|
347
349
|
stylesConfig: y,
|
|
348
|
-
setTableStylesConfig:
|
|
349
|
-
defaultTableSize:
|
|
350
|
+
setTableStylesConfig: I,
|
|
351
|
+
defaultTableSize: E,
|
|
350
352
|
tableSize: y.size,
|
|
351
|
-
stylesStorageType: (
|
|
352
|
-
stylesStorageKey: (
|
|
353
|
-
onlineStylesConfigChange: (
|
|
354
|
-
clearStylesConfigCache:
|
|
355
|
-
defaultTableStylesConfig:
|
|
353
|
+
stylesStorageType: (ee = e.stylesConfigState) == null ? void 0 : ee.persistenceType,
|
|
354
|
+
stylesStorageKey: (te = e.stylesConfigState) == null ? void 0 : te.persistenceKey,
|
|
355
|
+
onlineStylesConfigChange: (ne = e.stylesConfigState) == null ? void 0 : ne.onlineChange,
|
|
356
|
+
clearStylesConfigCache: B,
|
|
357
|
+
defaultTableStylesConfig: K,
|
|
356
358
|
exportConfig: O,
|
|
357
359
|
setTableExportConfig: h,
|
|
358
360
|
defaultTableExportConfig: x,
|
|
359
|
-
exportStorageType: (
|
|
360
|
-
exportStorageKey: (
|
|
361
|
-
onlineExportConfigChange: (
|
|
362
|
-
clearExportConfigCache:
|
|
363
|
-
zebra:
|
|
364
|
-
rowHoverable:
|
|
365
|
-
showColumnBorder:
|
|
366
|
-
hideRowBorder:
|
|
361
|
+
exportStorageType: (ie = e.exportConfigState) == null ? void 0 : ie.persistenceType,
|
|
362
|
+
exportStorageKey: (ae = e.exportConfigState) == null ? void 0 : ae.persistenceKey,
|
|
363
|
+
onlineExportConfigChange: (oe = e.exportConfigState) == null ? void 0 : oe.onlineChange,
|
|
364
|
+
clearExportConfigCache: j,
|
|
365
|
+
zebra: we,
|
|
366
|
+
rowHoverable: me,
|
|
367
|
+
showColumnBorder: xe,
|
|
368
|
+
hideRowBorder: he
|
|
367
369
|
};
|
|
368
|
-
return Object.defineProperty(
|
|
370
|
+
return Object.defineProperty(M, "uuid", {
|
|
369
371
|
get: () => T.current
|
|
370
|
-
}),
|
|
372
|
+
}), M;
|
|
371
373
|
}
|
|
372
|
-
const
|
|
373
|
-
const T =
|
|
374
|
-
return /* @__PURE__ */
|
|
374
|
+
const Be = Oe({}), De = (e) => {
|
|
375
|
+
const T = Je(e.initValue);
|
|
376
|
+
return /* @__PURE__ */ Ke.jsx(Be.Provider, { value: T, children: e.children });
|
|
375
377
|
};
|
|
376
378
|
export {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
Be as BitzTableContext,
|
|
380
|
+
Ee as SORTER_COLUMN,
|
|
381
|
+
De as default,
|
|
382
|
+
Ie as toolCols
|
|
381
383
|
};
|