bitz-react-admin-ui 2.5.7 → 2.5.9
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/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- package/dist/assets/iconfont/IconChenggong.mjs +4 -25
- package/dist/assets/iconfont/IconClose.mjs +3 -24
- package/dist/assets/iconfont/IconColumnCancelFixed.mjs +2 -23
- package/dist/assets/iconfont/IconColumnFixedLeft.mjs +6 -27
- package/dist/assets/iconfont/IconColumnFixedRight.mjs +6 -27
- package/dist/assets/iconfont/IconCuowu.mjs +2 -23
- package/dist/assets/iconfont/IconDragOrder.mjs +4 -25
- package/dist/assets/iconfont/IconDuigoux.mjs +4 -25
- package/dist/assets/iconfont/IconFabu.mjs +5 -35
- package/dist/assets/iconfont/IconFanhui.mjs +4 -25
- package/dist/assets/iconfont/IconGaojisousuo.mjs +5 -26
- package/dist/assets/iconfont/IconHangfengexian.mjs +3 -41
- package/dist/assets/iconfont/IconHangliefengexian.mjs +4 -42
- package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +5 -26
- package/dist/assets/iconfont/IconIcon21.mjs +4 -25
- package/dist/assets/iconfont/IconJincoude.mjs +4 -25
- package/dist/assets/iconfont/IconJinggao.mjs +4 -25
- package/dist/assets/iconfont/IconKuansongde.mjs +5 -26
- package/dist/assets/iconfont/IconLiefengexian.mjs +3 -41
- package/dist/assets/iconfont/IconMore.mjs +4 -41
- package/dist/assets/iconfont/IconShanchu.mjs +6 -27
- package/dist/assets/iconfont/IconShanchu1.mjs +5 -35
- package/dist/assets/iconfont/IconSousuo.mjs +6 -27
- package/dist/assets/iconfont/IconTejincou.mjs +4 -25
- package/dist/assets/iconfont/IconTekuansong.mjs +5 -26
- package/dist/assets/iconfont/IconTishi1.mjs +6 -27
- package/dist/assets/iconfont/IconTuodong.mjs +7 -28
- package/dist/assets/iconfont/IconWubanmawentianchong.mjs +3 -35
- package/dist/assets/iconfont/IconWufengexian.mjs +4 -26
- package/dist/assets/iconfont/IconXinxitishi.mjs +6 -27
- package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +3 -34
- package/dist/assets/iconfont/IconZhongdengde.mjs +3 -24
- package/dist/assets/iconfont/IconZhongzhi.mjs +3 -24
- package/dist/assets/iconfont/index.mjs +33 -33
- package/dist/components/BitzAddTag/index.mjs +8 -41
- package/dist/components/BitzAddressBook/index.mjs +35 -122
- package/dist/components/BitzAppPage/index.mjs +4 -18
- package/dist/components/BitzAppRefresh/index.mjs +15 -27
- package/dist/components/BitzBetterScroll/index.mjs +5 -5
- package/dist/components/BitzButton/index.mjs +9 -23
- package/dist/components/BitzCalendar/index.mjs +19 -52
- package/dist/components/BitzCascader/BitzCascaderMobile.mjs +30 -68
- package/dist/components/BitzCascader/index.mjs +2 -6
- package/dist/components/BitzCollapse/index.mjs +4 -4
- package/dist/components/BitzConfigProvider/context.mjs +1 -3
- package/dist/components/BitzConfigProvider/index.mjs +8 -12
- package/dist/components/BitzConfirmModal/index.mjs +1 -24
- package/dist/components/BitzDescriptions/index.mjs +1 -11
- package/dist/components/BitzDrawer/index.mjs +2 -17
- package/dist/components/BitzEmpty/index.mjs +2 -6
- package/dist/components/BitzException/index.mjs +1 -6
- package/dist/components/BitzFloatLayout/index.mjs +1 -10
- package/dist/components/BitzFluentDatePicker/index.mjs +1 -1
- package/dist/components/BitzFluentRangePicker/index.mjs +1 -1
- package/dist/components/BitzFluentRangeTimePicker/index.d.ts +5 -0
- package/dist/components/BitzFluentRangeTimePicker/index.mjs +10 -0
- package/dist/components/BitzFluentTimePicker/index.mjs +1 -1
- package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +16 -13
- package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +20 -26
- package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +3 -21
- package/dist/components/BitzFuiCalendar/CalendarBody.mjs +4 -27
- package/dist/components/BitzFuiCalendar/CalendarHead.mjs +2 -5
- package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +3 -12
- package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +15 -47
- package/dist/components/BitzFuiCalendar/ColumnData.mjs +9 -25
- package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +8 -44
- package/dist/components/BitzFuiCalendar/index.mjs +1 -7
- package/dist/components/BitzFullScreen/index.mjs +6 -9
- package/dist/components/BitzHighlight/Child.mjs +9 -23
- package/dist/components/BitzHighlight/Highlight.mjs +5 -26
- package/dist/components/BitzHighlight/chunks.mjs +17 -20
- package/dist/components/BitzHighlight/style.mjs +1 -4
- package/dist/components/BitzImage/index.mjs +1 -1
- package/dist/components/BitzImage/previewImage.mjs +5 -12
- package/dist/components/BitzLanguageTabs/index.mjs +3 -14
- package/dist/components/BitzLazyLoad/index.mjs +1 -7
- package/dist/components/BitzList/List.mjs +3 -17
- package/dist/components/BitzList/LoadMore.mjs +20 -29
- package/dist/components/BitzLoadMore/index.mjs +14 -34
- package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +11 -24
- package/dist/components/BitzMeetingTime/index.mjs +6 -10
- package/dist/components/BitzMobileLoading/index.mjs +1 -1
- package/dist/components/BitzModal/index.mjs +11 -24
- package/dist/components/BitzNoData/index.mjs +1 -4
- package/dist/components/BitzNoMore/index.mjs +1 -1
- package/dist/components/BitzOrganizationSelection/index.mjs +14 -43
- package/dist/components/BitzPageContainer/index.mjs +46 -107
- package/dist/components/BitzPageHeader/index.mjs +21 -89
- package/dist/components/BitzPagination/index.mjs +22 -71
- package/dist/components/BitzPopover/index.mjs +4 -4
- package/dist/components/BitzPullRefresh/PullRefresh.mjs +18 -47
- package/dist/components/BitzQRCode/index.mjs +1 -6
- package/dist/components/BitzQueryFilter/QueryFilterContent.mjs +17 -35
- package/dist/components/BitzQueryFilter/QueryFilterDrawer.mjs +13 -20
- package/dist/components/BitzQueryFilter/QueryFilterMobile.mjs +1 -4
- package/dist/components/BitzQueryFilter/index.mjs +20 -69
- package/dist/components/BitzRefresh/index.mjs +1 -5
- package/dist/components/BitzRemark/index.mjs +4 -4
- package/dist/components/BitzScheduleCenter/index.mjs +30 -24
- package/dist/components/BitzSearch/index.mjs +1 -1
- package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +48 -123
- package/dist/components/BitzSelect/index.mjs +1 -1
- package/dist/components/BitzSkeleton/index.mjs +1 -31
- package/dist/components/BitzSwitch/index.mjs +2 -7
- package/dist/components/BitzTabbar/BitzTabbar.mjs +8 -25
- package/dist/components/BitzTabbar/BitzTabbarItem.mjs +1 -4
- package/dist/components/BitzTable/ActionBar/ActionBar.mjs +12 -80
- package/dist/components/BitzTable/ActionBar/Button.mjs +15 -20
- package/dist/components/BitzTable/ActionBar/style.mjs +9 -12
- package/dist/components/BitzTable/ActionCol/index.mjs +33 -129
- package/dist/components/BitzTable/ActionCol/style.mjs +12 -15
- package/dist/components/BitzTable/Dropdown/index.mjs +1 -8
- package/dist/components/BitzTable/Dropdown/style.mjs +6 -9
- package/dist/components/BitzTable/SelectionBar/Button.mjs +6 -19
- package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +4 -11
- package/dist/components/BitzTable/SelectionBar/style.mjs +8 -18
- package/dist/components/BitzTable/Store/index.d.ts +11 -2
- package/dist/components/BitzTable/Store/index.mjs +200 -224
- package/dist/components/BitzTable/Store/utils/index.d.ts +1 -0
- package/dist/components/BitzTable/Store/utils/index.mjs +41 -30
- package/dist/components/BitzTable/SubTable/index.mjs +43 -91
- package/dist/components/BitzTable/Table/ResizableTitle copy.mjs +21 -43
- package/dist/components/BitzTable/Table/SortTableContext.mjs +17 -39
- package/dist/components/BitzTable/Table/SortableRow.mjs +20 -44
- package/dist/components/BitzTable/Table/index.mjs +230 -475
- package/dist/components/BitzTable/Table/style.mjs +1 -10
- package/dist/components/BitzTable/Table/utils.mjs +4 -11
- package/dist/components/BitzTable/TextOverflow/index.mjs +3 -12
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +27 -83
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +23 -104
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +29 -68
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +143 -251
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +16 -50
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +16 -42
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +2 -1
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +63 -116
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +2 -9
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +43 -97
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +6 -28
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +10 -1
- package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +13 -42
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +14 -42
- package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +4 -17
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +8 -37
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +9 -20
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +2 -49
- package/dist/components/BitzTable/ToolBar/style.mjs +1 -6
- package/dist/components/BitzTableOperations/index.mjs +3 -13
- package/dist/components/BitzTableSelect/Picker/index.mjs +10 -43
- package/dist/components/BitzTableSelect/Select/index.mjs +21 -90
- package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +13 -23
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +69 -219
- package/dist/components/BitzTableSelect/SingleSelect/index.mjs +22 -87
- package/dist/components/BitzTableSelect/TableCell/index.mjs +11 -52
- package/dist/components/BitzTableSelect/TextBlock/index.mjs +12 -30
- package/dist/components/BitzTableSelect/index.mjs +14 -65
- package/dist/components/BitzTableSelect/utils.mjs +3 -3
- package/dist/components/BitzTag/index.mjs +1 -1
- package/dist/components/BitzText/index.mjs +14 -41
- package/dist/components/BitzText/utils.mjs +3 -3
- package/dist/components/BitzTheme/index.mjs +6 -6
- package/dist/components/BitzTimeline/index.mjs +1 -11
- package/dist/components/BitzTimer/Form.mjs +11 -32
- package/dist/components/BitzTimer/Timer.mjs +38 -76
- package/dist/components/BitzTimer/index.mjs +43 -66
- package/dist/components/BitzToast/Toast/index.mjs +10 -28
- package/dist/components/BitzToast/index.mjs +1 -1
- package/dist/components/BitzTooltip/index.mjs +17 -47
- package/dist/components/BitzTooltip/style.mjs +6 -9
- package/dist/components/BitzTooltip/utils.mjs +2 -2
- package/dist/components/BitzTree/index.mjs +1 -4
- package/dist/components/BitzUeEditor/index.mjs +5 -5
- package/dist/components/BitzUpload/index.mjs +43 -81
- package/dist/components/BitzWebAppDrawer/index.mjs +4 -35
- package/dist/components/BitzWebAppModal/index.mjs +3 -6
- package/dist/hooks/use-event-listener.mjs +2 -11
- package/dist/hooks/use-lock-fn.mjs +10 -13
- package/dist/hooks/use-scroll-parent.mjs +14 -16
- package/dist/hooks/useEvent.mjs +4 -7
- package/dist/hooks/useMergedState.mjs +11 -11
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +108 -106
- package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
- 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.mjs +5 -27
- package/dist/utils/create.mjs +1 -7
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as ze } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import { Table as fe } from "antd";
|
|
3
|
-
import
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { genColumnKey as E } from "./utils/index.mjs";
|
|
6
|
-
import { getUuid as
|
|
7
|
-
import { BitzConfigContext as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
3
|
+
import N from "../../../hooks/useMergedState.mjs";
|
|
4
|
+
import { createContext as Ne, useRef as ve, useState as K, useContext as Ee, useMemo as d, useEffect as y, useCallback as v } from "react";
|
|
5
|
+
import { flattenColumns as Ie, genColumnKey as E } from "./utils/index.mjs";
|
|
6
|
+
import { getUuid as Je } from "../../../utils/uuid.mjs";
|
|
7
|
+
import { BitzConfigContext as Be } from "../../BitzConfigProvider/context.mjs";
|
|
8
|
+
import u from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
|
|
9
|
+
const je = {
|
|
10
10
|
fixed: "left",
|
|
11
11
|
className: "sorterCol",
|
|
12
12
|
isDragSorterCol: !0,
|
|
@@ -16,234 +16,210 @@ const Be = {
|
|
|
16
16
|
onCell: () => ({
|
|
17
17
|
"data-column-name": "dragSorterCell"
|
|
18
18
|
})
|
|
19
|
-
},
|
|
20
|
-
|
|
19
|
+
}, Me = [
|
|
20
|
+
je,
|
|
21
21
|
fe.SELECTION_COLUMN,
|
|
22
22
|
fe.EXPAND_COLUMN
|
|
23
23
|
];
|
|
24
|
-
function
|
|
25
|
-
var H, R, L, P, U, D, _, F,
|
|
26
|
-
const T =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
console.warn(r);
|
|
45
|
-
}
|
|
24
|
+
function ke(e) {
|
|
25
|
+
var H, R, L, P, U, D, G, _, F, W, Z, A, X, q, Q, Y, $, p, ee, te, ne, ie, ae, oe, le;
|
|
26
|
+
const T = ve(Je()), [re, se] = K(!1), [ue, de] = K(!1), [ye, Se] = K(0), r = Ee(Be).Table, Ce = r == null ? void 0 : r.defaultSize, I = e.defaultSize ?? Ce ?? "lg", ge = e.defaultZebra ?? (r == null ? void 0 : r.zebra) ?? !0, me = e.defaultBordered ?? (r == null ? void 0 : r.bordered) ?? "row-column", O = d(() => {
|
|
27
|
+
var t;
|
|
28
|
+
return u({
|
|
29
|
+
size: e.size ?? I,
|
|
30
|
+
zebra: e.zebra ?? ge,
|
|
31
|
+
bordered: e.bordered ?? me
|
|
32
|
+
}, (t = e.stylesConfigState) == null ? void 0 : t.defaultValue);
|
|
33
|
+
}, [e.size, e.zebra, e.bordered, e.defaultStylesConfig]), [S, J] = N(() => {
|
|
34
|
+
var n, i, l;
|
|
35
|
+
const { persistenceType: t, persistenceKey: o, onlineGet: c } = e.stylesConfigState || {};
|
|
36
|
+
if (o && t && typeof window < "u" && t !== "online") {
|
|
37
|
+
const a = window[t];
|
|
38
|
+
try {
|
|
39
|
+
const f = a == null ? void 0 : a.getItem(o);
|
|
40
|
+
if (f)
|
|
41
|
+
return (n = e == null ? void 0 : e.stylesConfigState) != null && n.defaultValue ? u(JSON.parse(f), (i = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : i.defaultValue) : JSON.parse(f);
|
|
42
|
+
} catch (f) {
|
|
43
|
+
console.warn(f);
|
|
46
44
|
}
|
|
47
|
-
return e.stylesConfig || ((c = e.stylesConfigState) == null ? void 0 : c.value) || ((a = e.stylesConfigState) == null ? void 0 : a.defaultValue) || O;
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
value: ((H = e.stylesConfigState) == null ? void 0 : H.value) || e.stylesConfig,
|
|
51
|
-
onChange: ((R = e.stylesConfigState) == null ? void 0 : R.onChange) || e.onStylesConfigChange
|
|
52
45
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
46
|
+
return e.stylesConfig || ((l = e.stylesConfigState) == null ? void 0 : l.value) || O;
|
|
47
|
+
}, {
|
|
48
|
+
value: ((H = e.stylesConfigState) == null ? void 0 : H.value) || e.stylesConfig,
|
|
49
|
+
onChange: ((R = e.stylesConfigState) == null ? void 0 : R.onChange) || e.onStylesConfigChange
|
|
50
|
+
});
|
|
51
|
+
y(() => {
|
|
52
|
+
var c, n;
|
|
53
|
+
if (!((c = e.stylesConfigState) != null && c.persistenceKey) || !((n = e.stylesConfigState) != null && n.persistenceType) || typeof window > "u")
|
|
57
54
|
return;
|
|
58
55
|
const {
|
|
59
56
|
persistenceType: t,
|
|
60
|
-
persistenceKey:
|
|
57
|
+
persistenceKey: o
|
|
61
58
|
// onlineChange
|
|
62
59
|
} = e.stylesConfigState;
|
|
63
60
|
if (t !== "online") {
|
|
64
|
-
const
|
|
61
|
+
const i = window[t];
|
|
65
62
|
try {
|
|
66
|
-
|
|
67
|
-
} catch (
|
|
68
|
-
console.warn(
|
|
63
|
+
i == null || i.setItem(o, JSON.stringify(S));
|
|
64
|
+
} catch (l) {
|
|
65
|
+
console.warn(l), j();
|
|
69
66
|
}
|
|
70
67
|
}
|
|
71
68
|
}, [
|
|
72
69
|
(L = e.stylesConfigState) == null ? void 0 : L.persistenceKey,
|
|
73
|
-
|
|
70
|
+
S,
|
|
74
71
|
(P = e.stylesConfigState) == null ? void 0 : P.persistenceType
|
|
75
|
-
]),
|
|
76
|
-
var t,
|
|
77
|
-
if ((t = e.stylesConfigState) != null && t.persistenceKey && ((
|
|
78
|
-
const { onlineGet: n, persistenceKey:
|
|
72
|
+
]), y(() => {
|
|
73
|
+
var t, o, c;
|
|
74
|
+
if ((t = e.stylesConfigState) != null && t.persistenceKey && ((o = e.stylesConfigState) == null ? void 0 : o.persistenceType) === "online") {
|
|
75
|
+
const { onlineGet: n, persistenceKey: i } = e.stylesConfigState;
|
|
79
76
|
try {
|
|
80
|
-
(
|
|
77
|
+
(c = n == null ? void 0 : n(i)) == null || c.then((l) => {
|
|
81
78
|
var f;
|
|
82
|
-
const a =
|
|
83
|
-
J(
|
|
84
|
-
Object.keys(a).length ? a : O
|
|
85
|
-
);
|
|
79
|
+
const a = u(l ?? {}, (f = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : f.value);
|
|
80
|
+
J(Object.keys(a).length ? a : O);
|
|
86
81
|
});
|
|
87
|
-
} catch (
|
|
88
|
-
console.warn(
|
|
82
|
+
} catch (l) {
|
|
83
|
+
console.warn(l);
|
|
89
84
|
}
|
|
90
85
|
}
|
|
91
86
|
}, []);
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
), [e.columns]), h = g(() => {
|
|
95
|
-
var i;
|
|
96
|
-
if ((i = e == null ? void 0 : e.exportConfigState) != null && i.defaultValue)
|
|
97
|
-
return e.exportConfigState.defaultValue;
|
|
87
|
+
const s = d(() => (e.columns ?? []).filter((t) => !Me.includes(t) && t.title), [e.columns]), h = d(() => {
|
|
88
|
+
var n;
|
|
98
89
|
const t = {
|
|
99
90
|
fields: [],
|
|
100
91
|
config: {
|
|
101
92
|
key: "current",
|
|
102
93
|
info: void 0
|
|
103
94
|
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
95
|
+
}, o = s.find((i) => {
|
|
96
|
+
var l;
|
|
97
|
+
return (l = i == null ? void 0 : i.children) == null ? void 0 : l.length;
|
|
98
|
+
}), c = s.filter((i) => !i.isOperationCol);
|
|
99
|
+
if (o)
|
|
100
|
+
t.fields = Ie(c);
|
|
101
|
+
else {
|
|
102
|
+
const i = [];
|
|
103
|
+
c.forEach((l, a) => {
|
|
104
|
+
const f = E(l, a);
|
|
105
|
+
f && i.push({
|
|
106
|
+
field: f,
|
|
107
|
+
title: l.title,
|
|
108
|
+
show: !0
|
|
109
|
+
});
|
|
110
|
+
}), t.fields = i;
|
|
111
|
+
}
|
|
112
|
+
return (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? u(t, e.exportConfigState.defaultValue) : t;
|
|
113
|
+
}, [s]), [V, x] = N(() => {
|
|
114
|
+
var n, i, l;
|
|
115
|
+
const { persistenceType: t, persistenceKey: o, onlineGet: c } = e.exportConfigState || {};
|
|
116
|
+
if (o && t && typeof window < "u" && t !== "online") {
|
|
117
|
+
const a = window[t];
|
|
118
|
+
try {
|
|
119
|
+
const f = a == null ? void 0 : a.getItem(o);
|
|
120
|
+
if (f)
|
|
121
|
+
return (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? u(JSON.parse(f), (i = e == null ? void 0 : e.exportConfigState) == null ? void 0 : i.defaultValue) : JSON.parse(f);
|
|
122
|
+
} catch (f) {
|
|
123
|
+
console.warn(f);
|
|
129
124
|
}
|
|
130
|
-
return e.exportConfig || ((c = e.exportConfigState) == null ? void 0 : c.value) || ((a = e.exportConfigState) == null ? void 0 : a.defaultValue) || h;
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
value: ((U = e.exportConfigState) == null ? void 0 : U.value) || e.exportConfig,
|
|
134
|
-
onChange: ((D = e.exportConfigState) == null ? void 0 : D.onChange) || e.onExportConfigChange
|
|
135
125
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
126
|
+
return e.exportConfig || ((l = e.exportConfigState) == null ? void 0 : l.value) || h;
|
|
127
|
+
}, {
|
|
128
|
+
value: ((U = e.exportConfigState) == null ? void 0 : U.value) || e.exportConfig,
|
|
129
|
+
onChange: ((D = e.exportConfigState) == null ? void 0 : D.onChange) || e.onExportConfigChange
|
|
130
|
+
});
|
|
131
|
+
y(() => {
|
|
132
|
+
var n, i;
|
|
133
|
+
const { persistenceType: t, persistenceKey: o, onlineGet: c } = e.exportConfigState || {};
|
|
134
|
+
if (o && t && typeof window < "u" && t !== "online") {
|
|
135
|
+
const l = window[t];
|
|
142
136
|
try {
|
|
143
|
-
const a =
|
|
144
|
-
a ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? x(
|
|
145
|
-
m(
|
|
146
|
-
JSON.parse(a),
|
|
147
|
-
(l = e == null ? void 0 : e.exportConfigState) == null ? void 0 : l.defaultValue
|
|
148
|
-
)
|
|
149
|
-
) : x(JSON.parse(a)) : x(h);
|
|
137
|
+
const a = l == null ? void 0 : l.getItem(o);
|
|
138
|
+
a ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? x(u(JSON.parse(a), (i = e == null ? void 0 : e.exportConfigState) == null ? void 0 : i.defaultValue)) : x(JSON.parse(a)) : x(h);
|
|
150
139
|
} catch (a) {
|
|
151
140
|
console.warn(a);
|
|
152
141
|
}
|
|
153
142
|
}
|
|
154
143
|
}, [
|
|
155
|
-
(
|
|
156
|
-
(
|
|
144
|
+
(G = e.exportConfigState) == null ? void 0 : G.persistenceKey,
|
|
145
|
+
(_ = e.exportConfigState) == null ? void 0 : _.persistenceType,
|
|
157
146
|
h
|
|
158
|
-
]),
|
|
159
|
-
var
|
|
160
|
-
if (!((
|
|
147
|
+
]), y(() => {
|
|
148
|
+
var c, n;
|
|
149
|
+
if (!((c = e.exportConfigState) != null && c.persistenceKey) || !((n = e.exportConfigState) != null && n.persistenceType) || typeof window > "u")
|
|
161
150
|
return;
|
|
162
151
|
const {
|
|
163
152
|
persistenceType: t,
|
|
164
|
-
persistenceKey:
|
|
153
|
+
persistenceKey: o
|
|
165
154
|
// onlineChange
|
|
166
155
|
} = e.exportConfigState;
|
|
167
156
|
if (t !== "online") {
|
|
168
|
-
const
|
|
157
|
+
const i = window[t];
|
|
169
158
|
try {
|
|
170
|
-
|
|
171
|
-
} catch (
|
|
172
|
-
console.warn(
|
|
159
|
+
i == null || i.setItem(o, JSON.stringify(V));
|
|
160
|
+
} catch (l) {
|
|
161
|
+
console.warn(l), M();
|
|
173
162
|
}
|
|
174
163
|
}
|
|
175
164
|
}, [
|
|
176
|
-
(
|
|
165
|
+
(F = e.exportConfigState) == null ? void 0 : F.persistenceKey,
|
|
177
166
|
V,
|
|
178
167
|
(W = e.exportConfigState) == null ? void 0 : W.persistenceType
|
|
179
|
-
]),
|
|
180
|
-
var t,
|
|
181
|
-
if ((t = e.exportConfigState) != null && t.persistenceKey && ((
|
|
182
|
-
const { onlineGet: n, persistenceKey:
|
|
168
|
+
]), y(() => {
|
|
169
|
+
var t, o, c;
|
|
170
|
+
if ((t = e.exportConfigState) != null && t.persistenceKey && ((o = e.exportConfigState) == null ? void 0 : o.persistenceType) === "online") {
|
|
171
|
+
const { onlineGet: n, persistenceKey: i } = e.exportConfigState;
|
|
183
172
|
try {
|
|
184
|
-
(
|
|
173
|
+
(c = n == null ? void 0 : n(i)) == null || c.then((l) => {
|
|
185
174
|
var f;
|
|
186
|
-
const a =
|
|
187
|
-
x(
|
|
188
|
-
Object.keys(a).length ? a : h
|
|
189
|
-
);
|
|
175
|
+
const a = u(l ?? {}, (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
|
|
176
|
+
x(Object.keys(a).length ? a : h);
|
|
190
177
|
});
|
|
191
|
-
} catch (
|
|
192
|
-
console.warn(
|
|
178
|
+
} catch (l) {
|
|
179
|
+
console.warn(l);
|
|
193
180
|
}
|
|
194
181
|
}
|
|
195
182
|
}, []);
|
|
196
|
-
const
|
|
197
|
-
var
|
|
198
|
-
if ((
|
|
183
|
+
const C = d(() => {
|
|
184
|
+
var l;
|
|
185
|
+
if ((l = e == null ? void 0 : e.columnsState) != null && l.defaultValue)
|
|
199
186
|
return e.columnsState.defaultValue;
|
|
200
|
-
const t =
|
|
187
|
+
const t = s.filter((a) => a.fixed === "left").map((a, f) => ({ ...a, order: f })), o = s.filter((a) => a.fixed === "right").map((a, f) => ({ ...a, order: f })), c = s.filter((a) => !["left", "right"].includes(a.fixed)).map((a, f) => ({ ...a, order: f })), n = [...t, ...c, ...o], i = {};
|
|
201
188
|
return n.forEach((a, f) => {
|
|
202
|
-
const { order:
|
|
203
|
-
|
|
189
|
+
const { order: m, width: ce, fixed: Oe, disabled: Ve } = a, z = E(a, f);
|
|
190
|
+
z && (i[z] = {
|
|
204
191
|
show: !0,
|
|
205
|
-
order:
|
|
192
|
+
order: m,
|
|
206
193
|
fixed: Oe,
|
|
207
194
|
disabled: Ve
|
|
208
|
-
}, typeof ce == "number" && (
|
|
209
|
-
}),
|
|
210
|
-
}, [
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
(l = e == null ? void 0 : e.columnsState) == null ? void 0 : l.defaultValue
|
|
222
|
-
) : JSON.parse(r);
|
|
223
|
-
} catch (r) {
|
|
224
|
-
console.warn(r);
|
|
225
|
-
}
|
|
195
|
+
}, typeof ce == "number" && e.resizableColumns && (i[z].width = ce));
|
|
196
|
+
}), i;
|
|
197
|
+
}, [s]), [we, he] = K(!1), [g, w] = N(() => {
|
|
198
|
+
var n, i, l, a;
|
|
199
|
+
const { persistenceType: t, persistenceKey: o, onlineGet: c } = e.columnsState || {};
|
|
200
|
+
if (o && t && typeof window < "u" && t !== "online") {
|
|
201
|
+
const f = window[t];
|
|
202
|
+
try {
|
|
203
|
+
const m = f == null ? void 0 : f.getItem(o);
|
|
204
|
+
if (m)
|
|
205
|
+
return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? u(JSON.parse(m), (i = e == null ? void 0 : e.columnsState) == null ? void 0 : i.defaultValue) : JSON.parse(m);
|
|
206
|
+
} catch (m) {
|
|
207
|
+
console.warn(m);
|
|
226
208
|
}
|
|
227
|
-
return e.columnsStateMap || ((c = e.columnsState) == null ? void 0 : c.value) || ((a = e.columnsState) == null ? void 0 : a.defaultValue) || {};
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
value: ((Z = e.columnsState) == null ? void 0 : Z.value) || e.columnsStateMap,
|
|
231
|
-
onChange: ((A = e.columnsState) == null ? void 0 : A.onChange) || e.onColumnsStateChange
|
|
232
209
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
210
|
+
return e.columnsStateMap || ((l = e.columnsState) == null ? void 0 : l.value) || ((a = e.columnsState) == null ? void 0 : a.defaultValue) || {};
|
|
211
|
+
}, {
|
|
212
|
+
value: ((Z = e.columnsState) == null ? void 0 : Z.value) || e.columnsStateMap,
|
|
213
|
+
onChange: ((A = e.columnsState) == null ? void 0 : A.onChange) || e.onColumnsStateChange
|
|
214
|
+
});
|
|
215
|
+
y(() => {
|
|
216
|
+
var n, i;
|
|
217
|
+
const { persistenceType: t, persistenceKey: o, onlineGet: c } = e.columnsState || {};
|
|
218
|
+
if (o && t && typeof window < "u" && t !== "online") {
|
|
219
|
+
const l = window[t];
|
|
239
220
|
try {
|
|
240
|
-
const a =
|
|
241
|
-
a ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? w(
|
|
242
|
-
m(
|
|
243
|
-
JSON.parse(a),
|
|
244
|
-
(l = e == null ? void 0 : e.columnsState) == null ? void 0 : l.defaultValue
|
|
245
|
-
)
|
|
246
|
-
) : w(JSON.parse(a)) : w(S);
|
|
221
|
+
const a = l == null ? void 0 : l.getItem(o);
|
|
222
|
+
a ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? w(u(JSON.parse(a), (i = e == null ? void 0 : e.columnsState) == null ? void 0 : i.defaultValue)) : w(JSON.parse(a)) : w(C);
|
|
247
223
|
} catch (a) {
|
|
248
224
|
console.warn(a);
|
|
249
225
|
}
|
|
@@ -251,83 +227,83 @@ function Me(e) {
|
|
|
251
227
|
}, [
|
|
252
228
|
(X = e.columnsState) == null ? void 0 : X.persistenceKey,
|
|
253
229
|
(q = e.columnsState) == null ? void 0 : q.persistenceType,
|
|
254
|
-
|
|
230
|
+
C
|
|
255
231
|
]);
|
|
256
|
-
const B =
|
|
257
|
-
const { persistenceType: t, persistenceKey:
|
|
258
|
-
if (!
|
|
232
|
+
const B = v(() => {
|
|
233
|
+
const { persistenceType: t, persistenceKey: o } = e.columnsState || {};
|
|
234
|
+
if (!o || !t || typeof window > "u")
|
|
259
235
|
return;
|
|
260
|
-
const
|
|
236
|
+
const c = window[t];
|
|
261
237
|
try {
|
|
262
|
-
|
|
238
|
+
c == null || c.removeItem(o);
|
|
263
239
|
} catch (n) {
|
|
264
240
|
console.warn(n);
|
|
265
241
|
}
|
|
266
|
-
}, [e.columnsState]), j =
|
|
267
|
-
const { persistenceType: t, persistenceKey:
|
|
268
|
-
if (!
|
|
242
|
+
}, [e.columnsState]), j = v(() => {
|
|
243
|
+
const { persistenceType: t, persistenceKey: o } = e.stylesConfigState || {};
|
|
244
|
+
if (!o || !t || typeof window > "u")
|
|
269
245
|
return;
|
|
270
|
-
const
|
|
246
|
+
const c = window[t];
|
|
271
247
|
try {
|
|
272
|
-
|
|
248
|
+
c == null || c.removeItem(o);
|
|
273
249
|
} catch (n) {
|
|
274
250
|
console.warn(n);
|
|
275
251
|
}
|
|
276
|
-
}, [e.stylesConfigState]), M =
|
|
277
|
-
const { persistenceType: t, persistenceKey:
|
|
278
|
-
if (!
|
|
252
|
+
}, [e.stylesConfigState]), M = v(() => {
|
|
253
|
+
const { persistenceType: t, persistenceKey: o } = e.exportConfigState || {};
|
|
254
|
+
if (!o || !t || typeof window > "u")
|
|
279
255
|
return;
|
|
280
|
-
const
|
|
256
|
+
const c = window[t];
|
|
281
257
|
try {
|
|
282
|
-
|
|
258
|
+
c == null || c.removeItem(o);
|
|
283
259
|
} catch (n) {
|
|
284
260
|
console.warn(n);
|
|
285
261
|
}
|
|
286
262
|
}, [e.exportConfigState]);
|
|
287
|
-
|
|
288
|
-
var
|
|
289
|
-
if (!((
|
|
263
|
+
y(() => {
|
|
264
|
+
var c, n;
|
|
265
|
+
if (!((c = e.columnsState) != null && c.persistenceKey) || !((n = e.columnsState) != null && n.persistenceType) || typeof window > "u")
|
|
290
266
|
return;
|
|
291
267
|
const {
|
|
292
268
|
persistenceType: t,
|
|
293
|
-
persistenceKey:
|
|
269
|
+
persistenceKey: o
|
|
294
270
|
// onlineChange
|
|
295
271
|
} = e.columnsState;
|
|
296
272
|
if (t !== "online") {
|
|
297
|
-
const
|
|
273
|
+
const i = window[t];
|
|
298
274
|
try {
|
|
299
|
-
|
|
300
|
-
} catch (
|
|
301
|
-
console.warn(
|
|
275
|
+
i == null || i.setItem(o, JSON.stringify(g));
|
|
276
|
+
} catch (l) {
|
|
277
|
+
console.warn(l), B();
|
|
302
278
|
}
|
|
303
279
|
}
|
|
304
280
|
}, [
|
|
305
281
|
(Q = e.columnsState) == null ? void 0 : Q.persistenceKey,
|
|
306
|
-
|
|
282
|
+
g,
|
|
307
283
|
(Y = e.columnsState) == null ? void 0 : Y.persistenceType
|
|
308
|
-
]),
|
|
309
|
-
var t,
|
|
310
|
-
if ((t = e.columnsState) != null && t.persistenceKey && ((
|
|
311
|
-
const { onlineGet: n, persistenceKey:
|
|
284
|
+
]), y(() => {
|
|
285
|
+
var t, o, c;
|
|
286
|
+
if ((t = e.columnsState) != null && t.persistenceKey && ((o = e.columnsState) == null ? void 0 : o.persistenceType) === "online") {
|
|
287
|
+
const { onlineGet: n, persistenceKey: i } = e.columnsState;
|
|
312
288
|
try {
|
|
313
|
-
(
|
|
289
|
+
(c = n == null ? void 0 : n(i)) == null || c.then((l) => {
|
|
314
290
|
var f;
|
|
315
|
-
const a =
|
|
291
|
+
const a = u(l ?? {}, (f = e == null ? void 0 : e.columnsState) == null ? void 0 : f.value);
|
|
316
292
|
w(a), he(!0);
|
|
317
293
|
});
|
|
318
|
-
} catch (
|
|
319
|
-
console.warn(
|
|
294
|
+
} catch (l) {
|
|
295
|
+
console.warn(l);
|
|
320
296
|
}
|
|
321
297
|
}
|
|
322
|
-
}, []),
|
|
323
|
-
var
|
|
324
|
-
const t =
|
|
298
|
+
}, []), y(() => {
|
|
299
|
+
var o, c;
|
|
300
|
+
const t = s.findIndex((n) => n == null ? void 0 : n.isOperationCol);
|
|
325
301
|
if (t >= 0) {
|
|
326
|
-
const n =
|
|
327
|
-
!(((
|
|
302
|
+
const n = s[t], i = E(n, t);
|
|
303
|
+
!(((o = g == null ? void 0 : g[i]) == null ? void 0 : o.fixed) === ((c = C == null ? void 0 : C[i]) == null ? void 0 : c.fixed)) && Object.keys(g ?? {}).length === 0 && w(C);
|
|
328
304
|
}
|
|
329
|
-
}, [
|
|
330
|
-
const xe =
|
|
305
|
+
}, [C, g]);
|
|
306
|
+
const xe = d(() => (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]), Te = d(() => e.zebra ?? S.zebra, [e.zebra, S.zebra]), b = d(() => e.bordered ?? S.bordered, [e.bordered, S.bordered]), be = d(() => ["column", "row-column"].includes(b), [b]), Ke = d(() => {
|
|
331
307
|
let t = !1;
|
|
332
308
|
return ["hide", "column"].includes(b) && (t = !0), t;
|
|
333
309
|
}, [b]), k = {
|
|
@@ -343,19 +319,19 @@ function Me(e) {
|
|
|
343
319
|
toolbarWidth: ye,
|
|
344
320
|
setToolbarWidth: Se,
|
|
345
321
|
columns: e.columns,
|
|
346
|
-
baseColumns:
|
|
322
|
+
baseColumns: s,
|
|
347
323
|
persistenceType: ($ = e.columnsState) == null ? void 0 : $.persistenceType,
|
|
348
324
|
persistenceKey: (p = e.columnsState) == null ? void 0 : p.persistenceKey,
|
|
349
325
|
onlineChange: (ee = e.columnsState) == null ? void 0 : ee.onlineChange,
|
|
350
326
|
finish: we,
|
|
351
|
-
columnsMap:
|
|
327
|
+
columnsMap: g,
|
|
352
328
|
setColumnsMap: w,
|
|
353
|
-
defaultColumnKeyMap:
|
|
329
|
+
defaultColumnKeyMap: C,
|
|
354
330
|
clearPersistenceStorage: B,
|
|
355
|
-
stylesConfig:
|
|
331
|
+
stylesConfig: S,
|
|
356
332
|
setTableStylesConfig: J,
|
|
357
333
|
defaultTableSize: I,
|
|
358
|
-
tableSize:
|
|
334
|
+
tableSize: S.size,
|
|
359
335
|
stylesStorageType: (te = e.stylesConfigState) == null ? void 0 : te.persistenceType,
|
|
360
336
|
stylesStorageKey: (ne = e.stylesConfigState) == null ? void 0 : ne.persistenceKey,
|
|
361
337
|
onlineStylesConfigChange: (ie = e.stylesConfigState) == null ? void 0 : ie.onlineChange,
|
|
@@ -377,13 +353,13 @@ function Me(e) {
|
|
|
377
353
|
get: () => T.current
|
|
378
354
|
}), k;
|
|
379
355
|
}
|
|
380
|
-
const
|
|
381
|
-
const T =
|
|
382
|
-
return
|
|
356
|
+
const He = Ne({}), We = (e) => {
|
|
357
|
+
const T = ke(e.initValue);
|
|
358
|
+
return ze.jsx(He.Provider, { value: T, children: e.children });
|
|
383
359
|
};
|
|
384
360
|
export {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
361
|
+
He as BitzTableContext,
|
|
362
|
+
je as SORTER_COLUMN,
|
|
363
|
+
We as default,
|
|
364
|
+
Me as toolCols
|
|
389
365
|
};
|
|
@@ -8,5 +8,6 @@ export declare const loopFilter: (columns: any[], columnsMap: any, finish: boole
|
|
|
8
8
|
* @param defaultKey 序列号,理论上唯一
|
|
9
9
|
*/
|
|
10
10
|
export declare const genColumnKey: (column: any, defaultKey?: any) => any;
|
|
11
|
+
export declare const flattenColumns: (columns: any) => any[];
|
|
11
12
|
export declare const columnSort: (columnsMap: Record<string, ColumnsConfigProps>) => (a: any, b: any) => number;
|
|
12
13
|
export declare function updateNestedObject(obj: any, prop: any, val: any): {};
|