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