bitz-react-admin-ui 2.1.5 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/dayjs.min.mjs +2 -5
- package/dist/_virtual/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- 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/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/Dropdown/index.mjs +16 -15
- package/dist/components/BitzTable/Store/index.d.ts +11 -2
- package/dist/components/BitzTable/Store/index.mjs +121 -114
- package/dist/components/BitzTable/Store/utils/index.mjs +24 -24
- package/dist/components/BitzTable/Table/index.d.ts +3 -1
- package/dist/components/BitzTable/Table/index.mjs +226 -229
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.d.ts +4 -2
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +116 -106
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +24 -25
- package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.d.ts +10 -4
- package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.mjs +58 -50
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.d.ts +0 -4
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +45 -28
- package/dist/components/BitzTable/ToolBar/index.d.ts +6 -3
- package/dist/components/BitzTable/index.d.ts +2 -2
- 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/time.mjs +1 -1
- package/package.json +1 -1
- package/dist/_virtual/dayjs.min2.mjs +0 -4
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { __require as o } from "../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
3
|
-
var t = o();
|
|
4
|
-
const s = /* @__PURE__ */ r(t);
|
|
1
|
+
var a = { exports: {} };
|
|
5
2
|
export {
|
|
6
|
-
|
|
3
|
+
a as __module
|
|
7
4
|
};
|
package/dist/_virtual/index.mjs
CHANGED
package/dist/_virtual/index2.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as n } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import { useRef as O, useEffect as R } from "react";
|
|
3
3
|
import { Calendar as k, Select as a, Row as w, Col as y } from "antd";
|
|
4
|
-
import N from "../../
|
|
4
|
+
import N from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
5
5
|
import B from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/weekOfYear.mjs";
|
|
6
6
|
import "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs";
|
|
7
7
|
N.extend(B);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { create as a } from "../../node_modules/.store/zustand@4.5.2/node_modules/zustand/esm/index.mjs";
|
|
2
|
-
import o from "../../
|
|
2
|
+
import o from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
3
3
|
var d = /* @__PURE__ */ ((e) => (e.day = "day", e.workWeek = "workWeek", e.week = "week", e.agendum = "agendum", e))(d || {});
|
|
4
4
|
const i = a((e, k) => ({
|
|
5
5
|
colHeight: 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as d } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import { useState as y, useEffect as j, useMemo as D } from "react";
|
|
3
3
|
import M from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isToday.mjs";
|
|
4
|
-
import n from "../../
|
|
4
|
+
import n from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
5
5
|
import { useBitzFuiCalendarStore as S, CalendarTypeEnum as C } from "./BitzFuiCalendarStore.mjs";
|
|
6
6
|
import N from "./CalendarAgendumItem.mjs";
|
|
7
7
|
import x from "./CalendarAgendum.module.less.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as i } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import { useMemo as a } from "react";
|
|
3
3
|
import e from "./CalendarAgendum.module.less.mjs";
|
|
4
|
-
import l from "../../
|
|
4
|
+
import l from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
5
5
|
import { Button as c } from "antd";
|
|
6
6
|
const d = (_, s) => {
|
|
7
7
|
let t = s.diff(_, "minute"), m;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as a } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import { memo as m, useMemo as r } from "react";
|
|
3
|
-
import d from "../../
|
|
3
|
+
import d from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
4
4
|
import i from "../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
5
5
|
const n = (t) => {
|
|
6
6
|
const { time: e } = t, s = r(() => e.isSame(d(), "day"), [e]);
|
|
@@ -2,7 +2,7 @@ import { j as e } from "../../node_modules/.store/react@18.2.0/node_modules/reac
|
|
|
2
2
|
import { memo as C, useMemo as i } from "react";
|
|
3
3
|
import { Space as c, Button as o, DatePicker as b, Dropdown as h } from "antd";
|
|
4
4
|
import { useBitzFuiCalendarStore as w, CalendarTypeEnum as a } from "./BitzFuiCalendarStore.mjs";
|
|
5
|
-
import g from "../../
|
|
5
|
+
import g from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
6
6
|
import T from "../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/AppstoreOutlined.mjs";
|
|
7
7
|
import v from "../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/LeftOutlined.mjs";
|
|
8
8
|
import _ from "../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/RightOutlined.mjs";
|
|
@@ -4,7 +4,7 @@ import E from "./FuiCalendarItem.mjs";
|
|
|
4
4
|
import b from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isSameOrAfter.mjs";
|
|
5
5
|
import F from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isSameOrBefore.mjs";
|
|
6
6
|
import M from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/utc.mjs";
|
|
7
|
-
import r from "../../
|
|
7
|
+
import r from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
8
8
|
import { useBitzFuiCalendarStore as z } from "./BitzFuiCalendarStore.mjs";
|
|
9
9
|
r.extend(M);
|
|
10
10
|
r.extend(F);
|
|
@@ -3,7 +3,7 @@ import { useState as w, useMemo as x, useEffect as E } from "react";
|
|
|
3
3
|
import A from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/objectSupport.mjs";
|
|
4
4
|
import H from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isSameOrAfter.mjs";
|
|
5
5
|
import D from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/utc.mjs";
|
|
6
|
-
import e from "../../
|
|
6
|
+
import e from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
7
7
|
import "./index.less.mjs";
|
|
8
8
|
e.extend(A);
|
|
9
9
|
e.extend(H);
|
|
@@ -2,7 +2,7 @@ import { j as e } from "../../node_modules/.store/react@18.2.0/node_modules/reac
|
|
|
2
2
|
import { useMemo as d } from "react";
|
|
3
3
|
import p from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/objectSupport.mjs";
|
|
4
4
|
import T from "./BitzMeetingTimeItem.mjs";
|
|
5
|
-
import m from "../../
|
|
5
|
+
import m from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
6
6
|
import "./index.less.mjs";
|
|
7
7
|
m.extend(p);
|
|
8
8
|
const x = (a) => {
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { Dropdown as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { j as e } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { Dropdown as c } from "antd";
|
|
3
|
+
import d from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
4
|
+
import { useMemo as m } from "react";
|
|
5
|
+
import n from "./style.mjs";
|
|
6
|
+
const p = (r, s) => r == null ? void 0 : r.map((t) => {
|
|
7
|
+
const o = { ...t };
|
|
8
|
+
return o != null && o.children && (o.children = p(o == null ? void 0 : o.children, s), o.popupClassName = s), o;
|
|
9
|
+
}), j = ({ menu: r, overlayClassName: s, ...t }) => {
|
|
10
|
+
const { popupClassName: o } = n(), a = m(() => p(r == null ? void 0 : r.items, o), [r == null ? void 0 : r.items]);
|
|
11
|
+
return /* @__PURE__ */ e.jsx(
|
|
12
|
+
c,
|
|
12
13
|
{
|
|
13
|
-
...
|
|
14
|
-
menu: { ...
|
|
15
|
-
overlayClassName:
|
|
14
|
+
...t,
|
|
15
|
+
menu: { ...r, items: a },
|
|
16
|
+
overlayClassName: d(o, s)
|
|
16
17
|
}
|
|
17
18
|
);
|
|
18
19
|
};
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
j as default
|
|
21
22
|
};
|
|
@@ -44,7 +44,7 @@ export interface ExportConfigProps {
|
|
|
44
44
|
title: string;
|
|
45
45
|
show: boolean;
|
|
46
46
|
}
|
|
47
|
-
export interface
|
|
47
|
+
export interface ExportColumnStateType<TableKey = any> {
|
|
48
48
|
persistenceType?: 'localStorage' | 'sessionStorage' | 'online';
|
|
49
49
|
persistenceKey?: TableKey;
|
|
50
50
|
defaultValue?: ExportConfigProps[];
|
|
@@ -71,10 +71,11 @@ export type UseContainerProps<T = any> = {
|
|
|
71
71
|
bordered?: BitzTableBorderedType;
|
|
72
72
|
defaultBordered?: BitzTableBorderedType;
|
|
73
73
|
/** 导出配置 */
|
|
74
|
-
exportConfigState?:
|
|
74
|
+
exportConfigState?: ExportColumnStateType;
|
|
75
75
|
defaultExportConfig?: ExportConfigProps[];
|
|
76
76
|
exportConfig?: ExportConfigProps[];
|
|
77
77
|
onExportConfigChange?: (value: ExportConfigProps[]) => void;
|
|
78
|
+
rowHoverable?: boolean;
|
|
78
79
|
};
|
|
79
80
|
declare function useContainer(props: UseContainerProps): {
|
|
80
81
|
uuid: string;
|
|
@@ -104,6 +105,10 @@ declare function useContainer(props: UseContainerProps): {
|
|
|
104
105
|
exportStorageKey: any;
|
|
105
106
|
onlineExportConfigChange: ((key: any, state: ExportConfigProps[]) => void) | undefined;
|
|
106
107
|
clearExportConfigCache: () => void;
|
|
108
|
+
zebra: boolean | undefined;
|
|
109
|
+
rowHoverable: boolean;
|
|
110
|
+
showColumnBorder: boolean;
|
|
111
|
+
hideRowBorder: boolean;
|
|
107
112
|
};
|
|
108
113
|
declare const BitzTableContext: import("react").Context<{
|
|
109
114
|
uuid: string;
|
|
@@ -133,6 +138,10 @@ declare const BitzTableContext: import("react").Context<{
|
|
|
133
138
|
exportStorageKey: any;
|
|
134
139
|
onlineExportConfigChange: ((key: any, state: ExportConfigProps[]) => void) | undefined;
|
|
135
140
|
clearExportConfigCache: () => void;
|
|
141
|
+
zebra: boolean | undefined;
|
|
142
|
+
rowHoverable: boolean;
|
|
143
|
+
showColumnBorder: boolean;
|
|
144
|
+
hideRowBorder: boolean;
|
|
136
145
|
}>;
|
|
137
146
|
export type ContainerType = typeof useContainer;
|
|
138
147
|
declare const Container: React.FC<{
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import { createContext as
|
|
1
|
+
import { j as be } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import J from "../../../hooks/useMergedState.mjs";
|
|
3
|
+
import { createContext as Ve, useRef as re, useContext as ve, useEffect as d, useMemo as C, useCallback as N } from "react";
|
|
4
4
|
import { genColumnKey as se } from "./utils/index.mjs";
|
|
5
|
-
import { getUuid as
|
|
6
|
-
import { BitzConfigContext as
|
|
5
|
+
import { getUuid as ze } from "../../../utils/uuid.mjs";
|
|
6
|
+
import { BitzConfigContext as Oe } from "../../BitzConfigProvider/context.mjs";
|
|
7
7
|
import S from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
|
|
8
|
-
function
|
|
9
|
-
var
|
|
10
|
-
const
|
|
11
|
-
size:
|
|
12
|
-
zebra:
|
|
13
|
-
bordered:
|
|
14
|
-
}, [
|
|
8
|
+
function Je(e) {
|
|
9
|
+
var H, P, k, R, G, Z, D, U, q, A, F, L, Q, W, X, Y, _, $, p, ee, te, ne, ie, ae, ce;
|
|
10
|
+
const K = re(ze()), b = re([]), r = ve(Oe).Table, ye = r == null ? void 0 : r.defaultSize, I = e.defaultSize ?? ye ?? "lg", de = e.defaultZebra ?? (r == null ? void 0 : r.zebra) ?? !0, Se = e.defaultBordered ?? (r == null ? void 0 : r.bordered) ?? "row-column", V = e.defaultStylesConfig || {
|
|
11
|
+
size: I,
|
|
12
|
+
zebra: de,
|
|
13
|
+
bordered: Se
|
|
14
|
+
}, [y, E] = J(
|
|
15
15
|
() => {
|
|
16
16
|
var n, o, c, l;
|
|
17
17
|
const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.stylesConfigState || {};
|
|
@@ -28,14 +28,14 @@ function ve(e) {
|
|
|
28
28
|
console.warn(u);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
return e.stylesConfig || ((c = e.stylesConfigState) == null ? void 0 : c.value) || ((l = e.stylesConfigState) == null ? void 0 : l.defaultValue) ||
|
|
31
|
+
return e.stylesConfig || ((c = e.stylesConfigState) == null ? void 0 : c.value) || ((l = e.stylesConfigState) == null ? void 0 : l.defaultValue) || V;
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
value: ((
|
|
35
|
-
onChange: ((
|
|
34
|
+
value: ((H = e.stylesConfigState) == null ? void 0 : H.value) || e.stylesConfig,
|
|
35
|
+
onChange: ((P = e.stylesConfigState) == null ? void 0 : P.onChange) || e.onStylesConfigChange
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
|
-
|
|
38
|
+
d(() => {
|
|
39
39
|
var a, n;
|
|
40
40
|
if (!((a = e.stylesConfigState) != null && a.persistenceKey) || !((n = e.stylesConfigState) != null && n.persistenceType) || typeof window > "u")
|
|
41
41
|
return;
|
|
@@ -47,16 +47,16 @@ function ve(e) {
|
|
|
47
47
|
if (t !== "online") {
|
|
48
48
|
const o = window[t];
|
|
49
49
|
try {
|
|
50
|
-
o == null || o.setItem(i, JSON.stringify(
|
|
50
|
+
o == null || o.setItem(i, JSON.stringify(y));
|
|
51
51
|
} catch (c) {
|
|
52
|
-
console.warn(c),
|
|
52
|
+
console.warn(c), M();
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}, [
|
|
56
|
-
(
|
|
57
|
-
|
|
58
|
-
(
|
|
59
|
-
]),
|
|
56
|
+
(k = e.stylesConfigState) == null ? void 0 : k.persistenceKey,
|
|
57
|
+
y,
|
|
58
|
+
(R = e.stylesConfigState) == null ? void 0 : R.persistenceType
|
|
59
|
+
]), d(() => {
|
|
60
60
|
var t, i, a;
|
|
61
61
|
if ((t = e.stylesConfigState) != null && t.persistenceKey && ((i = e.stylesConfigState) == null ? void 0 : i.persistenceType) === "online") {
|
|
62
62
|
const { onlineGet: n, persistenceKey: o } = e.stylesConfigState;
|
|
@@ -64,8 +64,8 @@ function ve(e) {
|
|
|
64
64
|
(a = n == null ? void 0 : n(o)) == null || a.then((c) => {
|
|
65
65
|
var f, u;
|
|
66
66
|
const l = S(c, (f = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : f.value);
|
|
67
|
-
|
|
68
|
-
(u = Object.keys(l ?? {})) != null && u.length ? l ?? {} :
|
|
67
|
+
E(
|
|
68
|
+
(u = Object.keys(l ?? {})) != null && u.length ? l ?? {} : V
|
|
69
69
|
);
|
|
70
70
|
});
|
|
71
71
|
} catch (c) {
|
|
@@ -73,22 +73,22 @@ function ve(e) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}, []);
|
|
76
|
-
const
|
|
76
|
+
const m = C(() => {
|
|
77
77
|
var i, a;
|
|
78
78
|
if ((i = e == null ? void 0 : e.exportConfigState) != null && i.defaultValue)
|
|
79
79
|
return e.exportConfigState.defaultValue;
|
|
80
80
|
const t = [];
|
|
81
81
|
return (a = e.columns) == null || a.forEach(
|
|
82
|
-
({ key: n, dataIndex: o, title: c },
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
field:
|
|
82
|
+
({ key: n, dataIndex: o, title: c, isOperationCol: l }, f) => {
|
|
83
|
+
const u = se(n ?? o, f);
|
|
84
|
+
u && !l && t.push({
|
|
85
|
+
field: u,
|
|
86
86
|
title: c,
|
|
87
87
|
show: !0
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
), t;
|
|
91
|
-
}, [e.columns]), [
|
|
91
|
+
}, [e.columns]), [v, w] = J(
|
|
92
92
|
() => {
|
|
93
93
|
var n, o, c, l;
|
|
94
94
|
const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.exportConfigState || {};
|
|
@@ -105,35 +105,35 @@ function ve(e) {
|
|
|
105
105
|
console.warn(u);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
return e.exportConfig || ((c = e.exportConfigState) == null ? void 0 : c.value) || ((l = e.exportConfigState) == null ? void 0 : l.defaultValue) ||
|
|
108
|
+
return e.exportConfig || ((c = e.exportConfigState) == null ? void 0 : c.value) || ((l = e.exportConfigState) == null ? void 0 : l.defaultValue) || m;
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
|
-
value: ((
|
|
111
|
+
value: ((G = e.exportConfigState) == null ? void 0 : G.value) || e.exportConfig,
|
|
112
112
|
onChange: ((Z = e.exportConfigState) == null ? void 0 : Z.onChange) || e.onExportConfigChange
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
|
-
|
|
115
|
+
d(() => {
|
|
116
116
|
var n, o;
|
|
117
117
|
const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.exportConfigState || {};
|
|
118
118
|
if (i && t && typeof window < "u" && t !== "online") {
|
|
119
119
|
const c = window[t];
|
|
120
120
|
try {
|
|
121
121
|
const l = c == null ? void 0 : c.getItem(i);
|
|
122
|
-
l ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ?
|
|
122
|
+
l ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? w(
|
|
123
123
|
S(
|
|
124
124
|
JSON.parse(l),
|
|
125
125
|
(o = e == null ? void 0 : e.exportConfigState) == null ? void 0 : o.defaultValue
|
|
126
126
|
)
|
|
127
|
-
) :
|
|
127
|
+
) : w(JSON.parse(l)) : w(m);
|
|
128
128
|
} catch (l) {
|
|
129
129
|
console.warn(l);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
}, [
|
|
133
|
-
(
|
|
134
|
-
(
|
|
135
|
-
|
|
136
|
-
]),
|
|
133
|
+
(D = e.exportConfigState) == null ? void 0 : D.persistenceKey,
|
|
134
|
+
(U = e.exportConfigState) == null ? void 0 : U.persistenceType,
|
|
135
|
+
m
|
|
136
|
+
]), d(() => {
|
|
137
137
|
var a, n;
|
|
138
138
|
if (!((a = e.exportConfigState) != null && a.persistenceKey) || !((n = e.exportConfigState) != null && n.persistenceType) || typeof window > "u")
|
|
139
139
|
return;
|
|
@@ -145,47 +145,47 @@ function ve(e) {
|
|
|
145
145
|
if (t !== "online") {
|
|
146
146
|
const o = window[t];
|
|
147
147
|
try {
|
|
148
|
-
o == null || o.setItem(i, JSON.stringify(
|
|
148
|
+
o == null || o.setItem(i, JSON.stringify(v));
|
|
149
149
|
} catch (c) {
|
|
150
|
-
console.warn(c),
|
|
150
|
+
console.warn(c), j();
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
}, [
|
|
154
|
-
(
|
|
155
|
-
|
|
156
|
-
(
|
|
157
|
-
]),
|
|
154
|
+
(q = e.exportConfigState) == null ? void 0 : q.persistenceKey,
|
|
155
|
+
v,
|
|
156
|
+
(A = e.exportConfigState) == null ? void 0 : A.persistenceType
|
|
157
|
+
]), d(() => {
|
|
158
158
|
var t, i, a;
|
|
159
159
|
if ((t = e.exportConfigState) != null && t.persistenceKey && ((i = e.exportConfigState) == null ? void 0 : i.persistenceType) === "online") {
|
|
160
160
|
const { onlineGet: n, persistenceKey: o } = e.exportConfigState;
|
|
161
161
|
try {
|
|
162
162
|
(a = n == null ? void 0 : n(o)) == null || a.then((c) => {
|
|
163
163
|
var f;
|
|
164
|
-
const l = S(c, (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
|
|
165
|
-
|
|
164
|
+
const l = S(c ?? [], (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
|
|
165
|
+
w(l != null && l.length ? l : m);
|
|
166
166
|
});
|
|
167
167
|
} catch (c) {
|
|
168
168
|
console.warn(c);
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
}, []);
|
|
172
|
-
const
|
|
173
|
-
var c, l, f, u,
|
|
172
|
+
const x = C(() => {
|
|
173
|
+
var c, l, f, u, oe, le, ue;
|
|
174
174
|
if ((c = e == null ? void 0 : e.columnsState) != null && c.defaultValue)
|
|
175
175
|
return e.columnsState.defaultValue;
|
|
176
|
-
const t = ((f = (l = e.columns) == null ? void 0 : l.filter((s) => s.fixed === "left")) == null ? void 0 : f.map((s,
|
|
176
|
+
const t = ((f = (l = e.columns) == null ? void 0 : l.filter((s) => s.fixed === "left")) == null ? void 0 : f.map((s, g) => ({ ...s, order: g }))) ?? [], i = ((oe = (u = e.columns) == null ? void 0 : u.filter((s) => s.fixed === "right")) == null ? void 0 : oe.map((s, g) => ({ ...s, order: g }))) ?? [], a = ((ue = (le = e.columns) == null ? void 0 : le.filter((s) => !["left", "right"].includes(s.fixed))) == null ? void 0 : ue.map((s, g) => ({ ...s, order: g }))) ?? [], n = [...t, ...a, ...i], o = {};
|
|
177
177
|
return n == null || n.forEach(
|
|
178
|
-
({ key: s, dataIndex:
|
|
179
|
-
const
|
|
180
|
-
|
|
178
|
+
({ key: s, dataIndex: g, order: xe, fixed: he, disabled: Ke }, Te) => {
|
|
179
|
+
const fe = se(s ?? g, Te);
|
|
180
|
+
fe && (o[fe] = {
|
|
181
181
|
show: !0,
|
|
182
|
-
order:
|
|
183
|
-
fixed:
|
|
184
|
-
disabled:
|
|
182
|
+
order: xe,
|
|
183
|
+
fixed: he,
|
|
184
|
+
disabled: Ke
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
), o;
|
|
188
|
-
}, [e.columns]), [
|
|
188
|
+
}, [e.columns]), [z, h] = J(
|
|
189
189
|
() => {
|
|
190
190
|
var n, o, c, l;
|
|
191
191
|
const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.columnsState || {};
|
|
@@ -202,36 +202,36 @@ function ve(e) {
|
|
|
202
202
|
console.warn(u);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
return e.columnsStateMap || ((c = e.columnsState) == null ? void 0 : c.value) || ((l = e.columnsState) == null ? void 0 : l.defaultValue) ||
|
|
205
|
+
return e.columnsStateMap || ((c = e.columnsState) == null ? void 0 : c.value) || ((l = e.columnsState) == null ? void 0 : l.defaultValue) || x;
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
|
-
value: ((
|
|
209
|
-
onChange: ((
|
|
208
|
+
value: ((F = e.columnsState) == null ? void 0 : F.value) || e.columnsStateMap,
|
|
209
|
+
onChange: ((L = e.columnsState) == null ? void 0 : L.onChange) || e.onColumnsStateChange
|
|
210
210
|
}
|
|
211
211
|
);
|
|
212
|
-
|
|
212
|
+
d(() => {
|
|
213
213
|
var n, o;
|
|
214
214
|
const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.columnsState || {};
|
|
215
215
|
if (i && t && typeof window < "u" && t !== "online") {
|
|
216
216
|
const c = window[t];
|
|
217
217
|
try {
|
|
218
218
|
const l = c == null ? void 0 : c.getItem(i);
|
|
219
|
-
l ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ?
|
|
219
|
+
l ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? h(
|
|
220
220
|
S(
|
|
221
221
|
JSON.parse(l),
|
|
222
222
|
(o = e == null ? void 0 : e.columnsState) == null ? void 0 : o.defaultValue
|
|
223
223
|
)
|
|
224
|
-
) :
|
|
224
|
+
) : h(JSON.parse(l)) : h(x);
|
|
225
225
|
} catch (l) {
|
|
226
226
|
console.warn(l);
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
}, [
|
|
230
|
-
(
|
|
231
|
-
(
|
|
232
|
-
|
|
230
|
+
(Q = e.columnsState) == null ? void 0 : Q.persistenceKey,
|
|
231
|
+
(W = e.columnsState) == null ? void 0 : W.persistenceType,
|
|
232
|
+
x
|
|
233
233
|
]);
|
|
234
|
-
const
|
|
234
|
+
const B = N(() => {
|
|
235
235
|
const { persistenceType: t, persistenceKey: i } = e.columnsState || {};
|
|
236
236
|
if (!i || !t || typeof window > "u")
|
|
237
237
|
return;
|
|
@@ -241,7 +241,7 @@ function ve(e) {
|
|
|
241
241
|
} catch (n) {
|
|
242
242
|
console.warn(n);
|
|
243
243
|
}
|
|
244
|
-
}, [e.columnsState]),
|
|
244
|
+
}, [e.columnsState]), M = N(() => {
|
|
245
245
|
const { persistenceType: t, persistenceKey: i } = e.stylesConfigState || {};
|
|
246
246
|
if (!i || !t || typeof window > "u")
|
|
247
247
|
return;
|
|
@@ -251,7 +251,7 @@ function ve(e) {
|
|
|
251
251
|
} catch (n) {
|
|
252
252
|
console.warn(n);
|
|
253
253
|
}
|
|
254
|
-
}, [e.stylesConfigState]),
|
|
254
|
+
}, [e.stylesConfigState]), j = N(() => {
|
|
255
255
|
const { persistenceType: t, persistenceKey: i } = e.exportConfigState || {};
|
|
256
256
|
if (!i || !t || typeof window > "u")
|
|
257
257
|
return;
|
|
@@ -262,7 +262,7 @@ function ve(e) {
|
|
|
262
262
|
console.warn(n);
|
|
263
263
|
}
|
|
264
264
|
}, [e.exportConfigState]);
|
|
265
|
-
|
|
265
|
+
d(() => {
|
|
266
266
|
var a, n;
|
|
267
267
|
if (!((a = e.columnsState) != null && a.persistenceKey) || !((n = e.columnsState) != null && n.persistenceType) || typeof window > "u")
|
|
268
268
|
return;
|
|
@@ -274,16 +274,16 @@ function ve(e) {
|
|
|
274
274
|
if (t !== "online") {
|
|
275
275
|
const o = window[t];
|
|
276
276
|
try {
|
|
277
|
-
o == null || o.setItem(i, JSON.stringify(
|
|
277
|
+
o == null || o.setItem(i, JSON.stringify(z));
|
|
278
278
|
} catch (c) {
|
|
279
|
-
console.warn(c),
|
|
279
|
+
console.warn(c), B();
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
}, [
|
|
283
|
-
(
|
|
284
|
-
|
|
285
|
-
(
|
|
286
|
-
]),
|
|
283
|
+
(X = e.columnsState) == null ? void 0 : X.persistenceKey,
|
|
284
|
+
z,
|
|
285
|
+
(Y = e.columnsState) == null ? void 0 : Y.persistenceType
|
|
286
|
+
]), d(() => {
|
|
287
287
|
var t, i, a;
|
|
288
288
|
if ((t = e.columnsState) != null && t.persistenceKey && ((i = e.columnsState) == null ? void 0 : i.persistenceType) === "online") {
|
|
289
289
|
const { onlineGet: n, persistenceKey: o } = e.columnsState;
|
|
@@ -291,8 +291,8 @@ function ve(e) {
|
|
|
291
291
|
(a = n == null ? void 0 : n(o)) == null || a.then((c) => {
|
|
292
292
|
var f, u;
|
|
293
293
|
const l = S(c, (f = e == null ? void 0 : e.columnsState) == null ? void 0 : f.value);
|
|
294
|
-
|
|
295
|
-
(u = Object.keys(l ?? {})) != null && u.length ? l ?? {} :
|
|
294
|
+
h(
|
|
295
|
+
(u = Object.keys(l ?? {})) != null && u.length ? l ?? {} : x
|
|
296
296
|
);
|
|
297
297
|
});
|
|
298
298
|
} catch (c) {
|
|
@@ -300,48 +300,55 @@ function ve(e) {
|
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
}, []);
|
|
303
|
-
const
|
|
304
|
-
|
|
303
|
+
const ge = C(() => (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]), Ce = C(() => e.zebra ?? y.zebra, [e.zebra, y.zebra]), T = C(() => e.bordered ?? y.bordered, [e.bordered, y.bordered]), me = C(() => ["column", "row-column"].includes(T), [T]), we = C(() => {
|
|
304
|
+
let t = !1;
|
|
305
|
+
return ["hide", "column"].includes(T) && (t = !0), t;
|
|
306
|
+
}, [T]), O = {
|
|
307
|
+
uuid: K.current,
|
|
305
308
|
columns: e.columns,
|
|
306
|
-
persistenceType: (
|
|
307
|
-
persistenceKey: (
|
|
308
|
-
onlineChange: (
|
|
309
|
-
sortKeyColumns:
|
|
309
|
+
persistenceType: (_ = e.columnsState) == null ? void 0 : _.persistenceType,
|
|
310
|
+
persistenceKey: ($ = e.columnsState) == null ? void 0 : $.persistenceKey,
|
|
311
|
+
onlineChange: (p = e.columnsState) == null ? void 0 : p.onlineChange,
|
|
312
|
+
sortKeyColumns: b.current,
|
|
310
313
|
setSortKeyColumns: (t) => {
|
|
311
|
-
|
|
314
|
+
b.current = t;
|
|
312
315
|
},
|
|
313
|
-
columnsMap:
|
|
314
|
-
setColumnsMap:
|
|
315
|
-
defaultColumnKeyMap:
|
|
316
|
-
clearPersistenceStorage:
|
|
317
|
-
stylesConfig:
|
|
318
|
-
setTableStylesConfig:
|
|
319
|
-
defaultTableSize:
|
|
320
|
-
tableSize:
|
|
321
|
-
stylesStorageType: (
|
|
322
|
-
stylesStorageKey: (
|
|
323
|
-
onlineStylesConfigChange: (
|
|
324
|
-
clearStylesConfigCache:
|
|
325
|
-
defaultTableStylesConfig:
|
|
326
|
-
exportConfig:
|
|
327
|
-
setTableExportConfig:
|
|
328
|
-
defaultTableExportConfig:
|
|
329
|
-
exportStorageType: (
|
|
330
|
-
exportStorageKey: (
|
|
331
|
-
onlineExportConfigChange: (
|
|
332
|
-
clearExportConfigCache:
|
|
316
|
+
columnsMap: z,
|
|
317
|
+
setColumnsMap: h,
|
|
318
|
+
defaultColumnKeyMap: x,
|
|
319
|
+
clearPersistenceStorage: B,
|
|
320
|
+
stylesConfig: y,
|
|
321
|
+
setTableStylesConfig: E,
|
|
322
|
+
defaultTableSize: I,
|
|
323
|
+
tableSize: y.size,
|
|
324
|
+
stylesStorageType: (ee = e.stylesConfigState) == null ? void 0 : ee.persistenceType,
|
|
325
|
+
stylesStorageKey: (te = e.stylesConfigState) == null ? void 0 : te.persistenceKey,
|
|
326
|
+
onlineStylesConfigChange: (ne = e.stylesConfigState) == null ? void 0 : ne.onlineChange,
|
|
327
|
+
clearStylesConfigCache: M,
|
|
328
|
+
defaultTableStylesConfig: V,
|
|
329
|
+
exportConfig: v,
|
|
330
|
+
setTableExportConfig: w,
|
|
331
|
+
defaultTableExportConfig: m,
|
|
332
|
+
exportStorageType: (ie = e.exportConfigState) == null ? void 0 : ie.persistenceType,
|
|
333
|
+
exportStorageKey: (ae = e.exportConfigState) == null ? void 0 : ae.persistenceKey,
|
|
334
|
+
onlineExportConfigChange: (ce = e.exportConfigState) == null ? void 0 : ce.onlineChange,
|
|
335
|
+
clearExportConfigCache: j,
|
|
336
|
+
zebra: Ce,
|
|
337
|
+
rowHoverable: ge,
|
|
338
|
+
showColumnBorder: me,
|
|
339
|
+
hideRowBorder: we
|
|
333
340
|
};
|
|
334
|
-
return Object.defineProperty(
|
|
341
|
+
return Object.defineProperty(O, "sortKeyColumns", {
|
|
342
|
+
get: () => b.current
|
|
343
|
+
}), Object.defineProperty(O, "uuid", {
|
|
335
344
|
get: () => K.current
|
|
336
|
-
}),
|
|
337
|
-
get: () => x.current
|
|
338
|
-
}), v;
|
|
345
|
+
}), O;
|
|
339
346
|
}
|
|
340
|
-
const
|
|
341
|
-
const
|
|
342
|
-
return /* @__PURE__ */
|
|
347
|
+
const Ne = Ve({}), ke = (e) => {
|
|
348
|
+
const K = Je(e.initValue);
|
|
349
|
+
return /* @__PURE__ */ be.jsx(Ne.Provider, { value: K, children: e.children });
|
|
343
350
|
};
|
|
344
351
|
export {
|
|
345
|
-
|
|
346
|
-
|
|
352
|
+
Ne as BitzTableContext,
|
|
353
|
+
ke as default
|
|
347
354
|
};
|