bitz-react-admin-ui 1.7.6 → 1.7.8
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/components/BitzCalendar/index.mjs +1 -1
- package/dist/components/BitzConfigProvider/context.d.ts +1 -0
- package/dist/components/BitzConfigProvider/index.d.ts +10 -0
- 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/Store/index.d.ts +12 -0
- package/dist/components/BitzTable/Store/index.mjs +150 -99
- package/dist/components/BitzTable/Table/index.mjs +191 -185
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.d.ts +5 -3
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.mjs +93 -89
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.d.ts +2 -1
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +21 -17
- package/dist/components/BitzTable/ToolBar/DensityIcon/index.mjs +26 -20
- package/dist/components/BitzTable/ToolBar/index.d.ts +2 -1
- 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
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.mjs";
|
|
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);
|
|
2
5
|
export {
|
|
3
|
-
|
|
6
|
+
s as default
|
|
4
7
|
};
|
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 "../../_virtual/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);
|
|
@@ -14,6 +14,16 @@ export interface BitzTableComponentToken extends TableComponentToken {
|
|
|
14
14
|
radioCheckboxBorderColor?: string;
|
|
15
15
|
/** 展开按钮border颜色 */
|
|
16
16
|
expandIconBorderColor?: string;
|
|
17
|
+
/** xl */
|
|
18
|
+
xlFontSize?: number;
|
|
19
|
+
/** lg */
|
|
20
|
+
lgFontSize?: number;
|
|
21
|
+
/** md */
|
|
22
|
+
mdFontSize?: number;
|
|
23
|
+
/** sm */
|
|
24
|
+
smFontSize?: number;
|
|
25
|
+
/** xs */
|
|
26
|
+
xsFontSize?: number;
|
|
17
27
|
/** list背景颜色 移动端 */
|
|
18
28
|
mobileListBgColor?: string;
|
|
19
29
|
/** listItem背景颜色 移动端 */
|
|
@@ -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 "../../_virtual/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 "../../_virtual/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 "../../_virtual/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 "../../_virtual/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 "../../_virtual/dayjs.min.mjs";
|
|
6
6
|
import T from "../../node_modules/.store/@ant-design_icons@5.3.3/node_modules/@ant-design/icons/es/icons/AppstoreOutlined.mjs";
|
|
7
7
|
import v from "../../node_modules/.store/@ant-design_icons@5.3.3/node_modules/@ant-design/icons/es/icons/LeftOutlined.mjs";
|
|
8
8
|
import _ from "../../node_modules/.store/@ant-design_icons@5.3.3/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 "../../_virtual/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 "../../_virtual/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 "../../_virtual/dayjs.min.mjs";
|
|
6
6
|
import "./index.less.mjs";
|
|
7
7
|
m.extend(p);
|
|
8
8
|
const x = (a) => {
|
|
@@ -21,12 +21,22 @@ export type ColumnStateType = {
|
|
|
21
21
|
/** 仅在 persistenceType=online 有效 用于获取网络数据 */
|
|
22
22
|
onlineGet?: (key: string) => Promise<Record<string, ColumnsConfigProps> | null | undefined>;
|
|
23
23
|
};
|
|
24
|
+
export type SizeStateType = {
|
|
25
|
+
persistenceType?: 'localStorage' | 'sessionStorage' | 'online';
|
|
26
|
+
persistenceKey?: string;
|
|
27
|
+
defaultValue?: DensitySize;
|
|
28
|
+
value?: DensitySize;
|
|
29
|
+
onChange?: (val: DensitySize) => void;
|
|
30
|
+
onlineChange?: (key: string, sizeState: DensitySize) => void;
|
|
31
|
+
onlineGet?: (key: string) => Promise<DensitySize | null | undefined>;
|
|
32
|
+
};
|
|
24
33
|
export type UseContainerProps<T = any> = {
|
|
25
34
|
columnsStateMap?: Record<string, ColumnsConfigProps>;
|
|
26
35
|
onColumnsStateChange?: (map: Record<string, ColumnsConfigProps>) => void;
|
|
27
36
|
size?: DensitySize;
|
|
28
37
|
defaultSize?: DensitySize;
|
|
29
38
|
onSizeChange?: (size: DensitySize) => void;
|
|
39
|
+
sizeState?: SizeStateType;
|
|
30
40
|
columns?: BitzTableColumnsType<T>;
|
|
31
41
|
columnsState?: ColumnStateType;
|
|
32
42
|
/** 仅在 persistenceType=online 有效 用于数据修改后数据上报 */
|
|
@@ -45,6 +55,7 @@ declare function useContainer(props?: UseContainerProps): {
|
|
|
45
55
|
setColumnsMap: (updater: Record<string, ColumnsConfigProps> | ((origin: Record<string, ColumnsConfigProps>) => Record<string, ColumnsConfigProps>), ignoreDestroy?: boolean | undefined) => void;
|
|
46
56
|
setTableSize: (updater: DensitySize | ((origin: DensitySize) => DensitySize), ignoreDestroy?: boolean | undefined) => void;
|
|
47
57
|
tableSize: DensitySize;
|
|
58
|
+
onlineSizeChange: ((key: string, sizeState: DensitySize) => void) | undefined;
|
|
48
59
|
columns: BitzTableColumnsType<any> | undefined;
|
|
49
60
|
clearPersistenceStorage: () => void;
|
|
50
61
|
defaultColumnKeyMap: Record<string, any>;
|
|
@@ -60,6 +71,7 @@ declare const TableContext: import("react").Context<{
|
|
|
60
71
|
setColumnsMap: (updater: Record<string, ColumnsConfigProps> | ((origin: Record<string, ColumnsConfigProps>) => Record<string, ColumnsConfigProps>), ignoreDestroy?: boolean | undefined) => void;
|
|
61
72
|
setTableSize: (updater: DensitySize | ((origin: DensitySize) => DensitySize), ignoreDestroy?: boolean | undefined) => void;
|
|
62
73
|
tableSize: DensitySize;
|
|
74
|
+
onlineSizeChange: ((key: string, sizeState: DensitySize) => void) | undefined;
|
|
63
75
|
columns: BitzTableColumnsType<any> | undefined;
|
|
64
76
|
clearPersistenceStorage: () => void;
|
|
65
77
|
defaultColumnKeyMap: Record<string, any>;
|
|
@@ -1,110 +1,160 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { genColumnKey as
|
|
5
|
-
import { getUuid as
|
|
6
|
-
import
|
|
7
|
-
function
|
|
8
|
-
var
|
|
9
|
-
const
|
|
10
|
-
() =>
|
|
1
|
+
import { j as B } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import k from "../../../hooks/useMergedState.mjs";
|
|
3
|
+
import { createContext as D, useRef as U, useEffect as K, useMemo as F, useCallback as H } from "react";
|
|
4
|
+
import { genColumnKey as L } from "./utils/index.mjs";
|
|
5
|
+
import { getUuid as Q } from "../../../utils/uuid.mjs";
|
|
6
|
+
import S from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
|
|
7
|
+
function W(e = {}) {
|
|
8
|
+
var g, T, O, v, J, M, N, b, x, I, j, P, E, R;
|
|
9
|
+
const d = U(Q()), h = U([]), { defaultSize: q = "lg" } = e, [V, A] = k(
|
|
10
|
+
() => {
|
|
11
|
+
var c, i, m, l, s;
|
|
12
|
+
const { persistenceType: t, persistenceKey: u, onlineGet: a } = e.sizeState || {};
|
|
13
|
+
if (u && t && typeof window < "u")
|
|
14
|
+
if (t !== "online") {
|
|
15
|
+
const n = window[t];
|
|
16
|
+
try {
|
|
17
|
+
const f = n == null ? void 0 : n.getItem(u);
|
|
18
|
+
if (f)
|
|
19
|
+
return (c = e == null ? void 0 : e.sizeState) != null && c.defaultValue ? S(
|
|
20
|
+
JSON.parse(f),
|
|
21
|
+
(i = e == null ? void 0 : e.sizeState) == null ? void 0 : i.defaultValue
|
|
22
|
+
) : JSON.parse(f);
|
|
23
|
+
} catch (f) {
|
|
24
|
+
console.warn(f);
|
|
25
|
+
}
|
|
26
|
+
} else
|
|
27
|
+
try {
|
|
28
|
+
(m = a == null ? void 0 : a(u)) == null || m.then((n) => {
|
|
29
|
+
var f, r;
|
|
30
|
+
if (n)
|
|
31
|
+
return (f = e == null ? void 0 : e.sizeState) != null && f.defaultValue ? S(n, (r = e == null ? void 0 : e.sizeState) == null ? void 0 : r.defaultValue) : n;
|
|
32
|
+
});
|
|
33
|
+
} catch (n) {
|
|
34
|
+
console.warn(n);
|
|
35
|
+
}
|
|
36
|
+
return e.size || ((l = e.sizeState) == null ? void 0 : l.value) || ((s = e.sizeState) == null ? void 0 : s.defaultValue) || q;
|
|
37
|
+
},
|
|
11
38
|
{
|
|
12
|
-
value: e.size,
|
|
13
|
-
onChange: e.onSizeChange
|
|
39
|
+
value: ((g = e.sizeState) == null ? void 0 : g.value) || e.size,
|
|
40
|
+
onChange: ((T = e.sizeState) == null ? void 0 : T.onChange) || e.onSizeChange
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
K(() => {
|
|
44
|
+
var a, c;
|
|
45
|
+
if (!((a = e.sizeState) != null && a.persistenceKey) || !((c = e.sizeState) != null && c.persistenceType) || typeof window > "u")
|
|
46
|
+
return;
|
|
47
|
+
const {
|
|
48
|
+
persistenceType: t,
|
|
49
|
+
persistenceKey: u
|
|
50
|
+
// onlineChange
|
|
51
|
+
} = e.sizeState;
|
|
52
|
+
if (t !== "online") {
|
|
53
|
+
const i = window[t];
|
|
54
|
+
try {
|
|
55
|
+
i == null || i.setItem(u, JSON.stringify(y));
|
|
56
|
+
} catch (m) {
|
|
57
|
+
console.warn(m), C();
|
|
58
|
+
}
|
|
14
59
|
}
|
|
15
|
-
|
|
16
|
-
|
|
60
|
+
}, [
|
|
61
|
+
(O = e.sizeState) == null ? void 0 : O.persistenceKey,
|
|
62
|
+
V,
|
|
63
|
+
(v = e.sizeState) == null ? void 0 : v.persistenceType
|
|
64
|
+
]);
|
|
65
|
+
const o = F(() => {
|
|
66
|
+
var u, a;
|
|
17
67
|
if ((u = e == null ? void 0 : e.columnsState) != null && u.defaultValue)
|
|
18
68
|
return e.columnsState.defaultValue;
|
|
19
69
|
const t = {};
|
|
20
|
-
return (
|
|
21
|
-
const
|
|
22
|
-
|
|
70
|
+
return (a = e.columns) == null || a.forEach(({ key: c, dataIndex: i, fixed: m, disable: l }, s) => {
|
|
71
|
+
const n = L(c ?? i, s);
|
|
72
|
+
n && (t[n] = {
|
|
23
73
|
show: !0,
|
|
24
|
-
fixed:
|
|
25
|
-
disable:
|
|
74
|
+
fixed: m,
|
|
75
|
+
disable: l
|
|
26
76
|
});
|
|
27
77
|
}), t;
|
|
28
|
-
}, [e.columns]), [
|
|
78
|
+
}, [e.columns]), [y, w] = k(
|
|
29
79
|
() => {
|
|
30
|
-
var i, m,
|
|
31
|
-
const { persistenceType: t, persistenceKey: u, onlineGet:
|
|
80
|
+
var c, i, m, l, s;
|
|
81
|
+
const { persistenceType: t, persistenceKey: u, onlineGet: a } = e.columnsState || {};
|
|
32
82
|
if (u && t && typeof window < "u")
|
|
33
83
|
if (t !== "online") {
|
|
34
|
-
const
|
|
84
|
+
const n = window[t];
|
|
35
85
|
try {
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
return (
|
|
39
|
-
JSON.parse(
|
|
40
|
-
(
|
|
41
|
-
) : JSON.parse(
|
|
42
|
-
} catch (
|
|
43
|
-
console.warn(
|
|
86
|
+
const f = n == null ? void 0 : n.getItem(u);
|
|
87
|
+
if (f)
|
|
88
|
+
return (c = e == null ? void 0 : e.columnsState) != null && c.defaultValue ? S(
|
|
89
|
+
JSON.parse(f),
|
|
90
|
+
(i = e == null ? void 0 : e.columnsState) == null ? void 0 : i.defaultValue
|
|
91
|
+
) : JSON.parse(f);
|
|
92
|
+
} catch (f) {
|
|
93
|
+
console.warn(f);
|
|
44
94
|
}
|
|
45
95
|
} else
|
|
46
96
|
try {
|
|
47
|
-
(
|
|
48
|
-
var
|
|
49
|
-
if (
|
|
50
|
-
return (
|
|
97
|
+
(m = a == null ? void 0 : a(u)) == null || m.then((n) => {
|
|
98
|
+
var f, r;
|
|
99
|
+
if (n)
|
|
100
|
+
return (f = e == null ? void 0 : e.columnsState) != null && f.defaultValue ? S(n, (r = e == null ? void 0 : e.columnsState) == null ? void 0 : r.defaultValue) : n;
|
|
51
101
|
});
|
|
52
|
-
} catch (
|
|
53
|
-
console.warn(
|
|
102
|
+
} catch (n) {
|
|
103
|
+
console.warn(n);
|
|
54
104
|
}
|
|
55
|
-
return e.columnsStateMap || ((
|
|
105
|
+
return e.columnsStateMap || ((l = e.columnsState) == null ? void 0 : l.value) || ((s = e.columnsState) == null ? void 0 : s.defaultValue) || o;
|
|
56
106
|
},
|
|
57
107
|
{
|
|
58
|
-
value: ((
|
|
59
|
-
onChange: ((
|
|
108
|
+
value: ((J = e.columnsState) == null ? void 0 : J.value) || e.columnsStateMap,
|
|
109
|
+
onChange: ((M = e.columnsState) == null ? void 0 : M.onChange) || e.onColumnsStateChange
|
|
60
110
|
}
|
|
61
111
|
);
|
|
62
|
-
|
|
63
|
-
var i, m
|
|
64
|
-
const { persistenceType: t, persistenceKey: u, onlineGet:
|
|
112
|
+
K(() => {
|
|
113
|
+
var c, i, m;
|
|
114
|
+
const { persistenceType: t, persistenceKey: u, onlineGet: a } = e.columnsState || {};
|
|
65
115
|
if (u && t && typeof window < "u")
|
|
66
116
|
if (t !== "online") {
|
|
67
|
-
const
|
|
117
|
+
const l = window[t];
|
|
68
118
|
try {
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
JSON.parse(
|
|
73
|
-
(
|
|
119
|
+
const s = l == null ? void 0 : l.getItem(u);
|
|
120
|
+
s ? (c = e == null ? void 0 : e.columnsState) != null && c.defaultValue ? w(
|
|
121
|
+
S(
|
|
122
|
+
JSON.parse(s),
|
|
123
|
+
(i = e == null ? void 0 : e.columnsState) == null ? void 0 : i.defaultValue
|
|
74
124
|
)
|
|
75
|
-
) :
|
|
76
|
-
} catch (
|
|
77
|
-
console.warn(
|
|
125
|
+
) : w(JSON.parse(s)) : w(o);
|
|
126
|
+
} catch (s) {
|
|
127
|
+
console.warn(s);
|
|
78
128
|
}
|
|
79
129
|
} else
|
|
80
130
|
try {
|
|
81
|
-
(
|
|
82
|
-
var
|
|
83
|
-
if (
|
|
84
|
-
return (
|
|
131
|
+
(m = a == null ? void 0 : a(u)) == null || m.then((l) => {
|
|
132
|
+
var s, n;
|
|
133
|
+
if (l)
|
|
134
|
+
return (s = e == null ? void 0 : e.columnsState) != null && s.defaultValue ? S(l, (n = e == null ? void 0 : e.columnsState) == null ? void 0 : n.defaultValue) : l;
|
|
85
135
|
});
|
|
86
|
-
} catch (
|
|
87
|
-
console.warn(
|
|
136
|
+
} catch (l) {
|
|
137
|
+
console.warn(l);
|
|
88
138
|
}
|
|
89
139
|
}, [
|
|
90
|
-
(
|
|
91
|
-
(
|
|
92
|
-
|
|
140
|
+
(N = e.columnsState) == null ? void 0 : N.persistenceKey,
|
|
141
|
+
(b = e.columnsState) == null ? void 0 : b.persistenceType,
|
|
142
|
+
o
|
|
93
143
|
]);
|
|
94
|
-
const
|
|
144
|
+
const C = H(() => {
|
|
95
145
|
const { persistenceType: t, persistenceKey: u } = e.columnsState || {};
|
|
96
146
|
if (!u || !t || typeof window > "u")
|
|
97
147
|
return;
|
|
98
|
-
const
|
|
148
|
+
const a = window[t];
|
|
99
149
|
try {
|
|
100
|
-
|
|
101
|
-
} catch (
|
|
102
|
-
console.warn(
|
|
150
|
+
a == null || a.removeItem(u);
|
|
151
|
+
} catch (c) {
|
|
152
|
+
console.warn(c);
|
|
103
153
|
}
|
|
104
154
|
}, [e.columnsState]);
|
|
105
|
-
|
|
106
|
-
var
|
|
107
|
-
if (!((
|
|
155
|
+
K(() => {
|
|
156
|
+
var a, c;
|
|
157
|
+
if (!((a = e.columnsState) != null && a.persistenceKey) || !((c = e.columnsState) != null && c.persistenceType) || typeof window > "u")
|
|
108
158
|
return;
|
|
109
159
|
const {
|
|
110
160
|
persistenceType: t,
|
|
@@ -112,46 +162,47 @@ function D(e = {}) {
|
|
|
112
162
|
// onlineChange
|
|
113
163
|
} = e.columnsState;
|
|
114
164
|
if (t !== "online") {
|
|
115
|
-
const
|
|
165
|
+
const i = window[t];
|
|
116
166
|
try {
|
|
117
|
-
|
|
118
|
-
} catch (
|
|
119
|
-
console.warn(
|
|
167
|
+
i == null || i.setItem(u, JSON.stringify(y));
|
|
168
|
+
} catch (m) {
|
|
169
|
+
console.warn(m), C();
|
|
120
170
|
}
|
|
121
171
|
}
|
|
122
172
|
}, [
|
|
123
|
-
(
|
|
124
|
-
|
|
125
|
-
(
|
|
173
|
+
(x = e.columnsState) == null ? void 0 : x.persistenceKey,
|
|
174
|
+
y,
|
|
175
|
+
(I = e.columnsState) == null ? void 0 : I.persistenceType
|
|
126
176
|
]);
|
|
127
|
-
const
|
|
128
|
-
uuid:
|
|
129
|
-
persistenceType: (
|
|
130
|
-
persistenceKey: (
|
|
131
|
-
onlineChange: (
|
|
132
|
-
sortKeyColumns:
|
|
177
|
+
const z = {
|
|
178
|
+
uuid: d.current,
|
|
179
|
+
persistenceType: (j = e.columnsState) == null ? void 0 : j.persistenceType,
|
|
180
|
+
persistenceKey: (P = e.columnsState) == null ? void 0 : P.persistenceKey,
|
|
181
|
+
onlineChange: (E = e.columnsState) == null ? void 0 : E.onlineChange,
|
|
182
|
+
sortKeyColumns: h.current,
|
|
133
183
|
setSortKeyColumns: (t) => {
|
|
134
|
-
|
|
184
|
+
h.current = t;
|
|
135
185
|
},
|
|
136
|
-
columnsMap:
|
|
137
|
-
setColumnsMap:
|
|
138
|
-
setTableSize:
|
|
139
|
-
tableSize:
|
|
186
|
+
columnsMap: y,
|
|
187
|
+
setColumnsMap: w,
|
|
188
|
+
setTableSize: A,
|
|
189
|
+
tableSize: V,
|
|
190
|
+
onlineSizeChange: (R = e.sizeState) == null ? void 0 : R.onlineChange,
|
|
140
191
|
columns: e.columns,
|
|
141
|
-
clearPersistenceStorage:
|
|
142
|
-
defaultColumnKeyMap:
|
|
192
|
+
clearPersistenceStorage: C,
|
|
193
|
+
defaultColumnKeyMap: o
|
|
143
194
|
};
|
|
144
|
-
return Object.defineProperty(
|
|
145
|
-
get: () =>
|
|
146
|
-
}), Object.defineProperty(
|
|
147
|
-
get: () =>
|
|
148
|
-
}),
|
|
195
|
+
return Object.defineProperty(z, "sortKeyColumns", {
|
|
196
|
+
get: () => h.current
|
|
197
|
+
}), Object.defineProperty(z, "uuid", {
|
|
198
|
+
get: () => d.current
|
|
199
|
+
}), z;
|
|
149
200
|
}
|
|
150
|
-
const
|
|
151
|
-
const
|
|
152
|
-
return /* @__PURE__ */
|
|
201
|
+
const X = D({}), ee = (e) => {
|
|
202
|
+
const d = W(e.initValue);
|
|
203
|
+
return /* @__PURE__ */ B.jsx(X.Provider, { value: d, children: e.children });
|
|
153
204
|
};
|
|
154
205
|
export {
|
|
155
|
-
|
|
156
|
-
|
|
206
|
+
X as TableContext,
|
|
207
|
+
ee as default
|
|
157
208
|
};
|