bitz-react-admin-ui 2.2.7 → 2.2.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/Draggable.mjs +4 -0
- package/dist/_virtual/DraggableCore.mjs +4 -0
- package/dist/_virtual/Resizable.mjs +4 -0
- package/dist/_virtual/ResizableBox.mjs +4 -0
- package/dist/_virtual/_commonjsHelpers.mjs +26 -4
- package/dist/_virtual/cjs.mjs +4 -0
- package/dist/_virtual/clsx.m.mjs +6 -0
- package/dist/_virtual/domFns.mjs +4 -0
- package/dist/_virtual/getPrefix.mjs +4 -0
- package/dist/_virtual/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- package/dist/_virtual/index6.mjs +4 -0
- package/dist/_virtual/log.mjs +4 -0
- package/dist/_virtual/positionFns.mjs +4 -0
- package/dist/_virtual/propTypes.mjs +4 -0
- package/dist/_virtual/shims.mjs +4 -0
- package/dist/_virtual/utils.mjs +4 -0
- package/dist/assets/iconfont/IconChenggong.mjs +4 -10
- package/dist/assets/iconfont/IconClose.mjs +1 -7
- package/dist/assets/iconfont/IconColumnCancelFixed.mjs +4 -25
- package/dist/assets/iconfont/IconColumnFixedLeft.mjs +8 -29
- package/dist/assets/iconfont/IconColumnFixedRight.mjs +7 -28
- package/dist/assets/iconfont/IconCuowu.mjs +2 -8
- package/dist/assets/iconfont/IconDragOrder.mjs +7 -28
- package/dist/assets/iconfont/IconDuigoux.mjs +2 -8
- package/dist/assets/iconfont/IconFabu.mjs +3 -18
- package/dist/assets/iconfont/IconFanhui.mjs +5 -11
- package/dist/assets/iconfont/IconGaojisousuo.mjs +4 -10
- package/dist/assets/iconfont/IconHangfengexian.mjs +4 -27
- package/dist/assets/iconfont/IconHangliefengexian.mjs +4 -27
- package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +5 -11
- package/dist/assets/iconfont/IconIcon21.mjs +2 -8
- package/dist/assets/iconfont/IconJincoude.mjs +3 -9
- package/dist/assets/iconfont/IconJinggao.mjs +2 -8
- package/dist/assets/iconfont/IconKuansongde.mjs +5 -11
- package/dist/assets/iconfont/IconLiefengexian.mjs +5 -28
- package/dist/assets/iconfont/IconMore.mjs +4 -26
- package/dist/assets/iconfont/IconShanchu.mjs +5 -11
- package/dist/assets/iconfont/IconShanchu1.mjs +3 -18
- package/dist/assets/iconfont/IconSousuo.mjs +4 -10
- package/dist/assets/iconfont/IconTejincou.mjs +1 -7
- package/dist/assets/iconfont/IconTekuansong.mjs +5 -11
- package/dist/assets/iconfont/IconTishi1.mjs +6 -12
- package/dist/assets/iconfont/IconTuodong.mjs +6 -12
- package/dist/assets/iconfont/IconWubanmawentianchong.mjs +5 -22
- package/dist/assets/iconfont/IconWufengexian.mjs +4 -11
- package/dist/assets/iconfont/IconXinxitishi.mjs +3 -9
- package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +7 -23
- package/dist/assets/iconfont/IconZhongdengde.mjs +4 -10
- package/dist/assets/iconfont/IconZhongzhi.mjs +5 -11
- 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/BitzConvert/DropdownToButton/index.mjs +11 -14
- package/dist/components/BitzConvert/index.mjs +1 -1
- 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/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 +19 -51
- package/dist/components/BitzFuiCalendar/ColumnData.mjs +14 -30
- package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +5 -47
- 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.d.ts +21 -9
- package/dist/components/BitzTable/ActionBar/ActionBar.mjs +38 -66
- package/dist/components/BitzTable/ActionBar/Button.mjs +1 -1
- package/dist/components/BitzTable/ActionBar/style.mjs +9 -12
- package/dist/components/BitzTable/ActionCol/index.d.ts +1 -1
- package/dist/components/BitzTable/ActionCol/index.mjs +32 -98
- 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 +2 -8
- package/dist/components/BitzTable/SelectionBar/style.mjs +8 -18
- package/dist/components/BitzTable/Store/index.mjs +89 -121
- package/dist/components/BitzTable/Store/utils/index.d.ts +1 -1
- package/dist/components/BitzTable/Store/utils/index.mjs +30 -30
- package/dist/components/BitzTable/SubTable/index.mjs +52 -94
- package/dist/components/BitzTable/Table/ResizableTitle.d.ts +8 -0
- package/dist/components/BitzTable/Table/ResizableTitle.mjs +14 -0
- package/dist/components/BitzTable/Table/SortTableContext.mjs +7 -20
- package/dist/components/BitzTable/Table/SortableRow.mjs +20 -44
- package/dist/components/BitzTable/Table/index.d.ts +1 -1
- package/dist/components/BitzTable/Table/index.mjs +248 -436
- package/dist/components/BitzTable/Table/style.mjs +1 -11
- package/dist/components/BitzTable/Table/utils.mjs +4 -11
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +28 -92
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +22 -97
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +29 -68
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +145 -253
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +12 -38
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +16 -42
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +20 -96
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +2 -9
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +46 -100
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +8 -30
- package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +14 -44
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +12 -44
- package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +4 -17
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +12 -49
- package/dist/components/BitzTable/ToolBar/Modal/style.mjs +4 -0
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +9 -20
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +2 -48
- 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 -87
- package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +20 -30
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +61 -239
- package/dist/components/BitzTableSelect/TableCell/index.mjs +8 -49
- package/dist/components/BitzTableSelect/TextBlock/index.mjs +5 -23
- package/dist/components/BitzTableSelect/index.mjs +13 -61
- package/dist/components/BitzTag/index.mjs +1 -1
- 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/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/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
- package/dist/node_modules/.store/clsx@1.2.1/node_modules/clsx/dist/clsx.m.mjs +22 -0
- package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +9 -8
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/Draggable.mjs +343 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/DraggableCore.mjs +324 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/cjs.mjs +14 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/domFns.mjs +174 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/getPrefix.mjs +35 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/log.mjs +7 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/positionFns.mjs +107 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/shims.mjs +30 -0
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/Resizable.mjs +201 -0
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/ResizableBox.mjs +162 -0
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/propTypes.mjs +118 -0
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/utils.mjs +54 -0
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/index.mjs +13 -0
- package/dist/node_modules/.store/use-sync-external-store@1.2.0/node_modules/use-sync-external-store/shim/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/WithFluent.mjs +12 -27
- package/dist/utils/create.mjs +1 -7
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as ve } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { Table as
|
|
2
|
+
import { Table as oe } from "antd";
|
|
3
3
|
import N from "../../../hooks/useMergedState.mjs";
|
|
4
4
|
import { createContext as Ve, useRef as Oe, useState as fe, useContext as Ne, useEffect as S, useMemo as g, useCallback as z } from "react";
|
|
5
5
|
import { genColumnKey as re } from "./utils/index.mjs";
|
|
@@ -18,8 +18,8 @@ const Je = {
|
|
|
18
18
|
})
|
|
19
19
|
}, Ie = [
|
|
20
20
|
Je,
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
oe.SELECTION_COLUMN,
|
|
22
|
+
oe.EXPAND_COLUMN
|
|
23
23
|
];
|
|
24
24
|
function Me(e) {
|
|
25
25
|
var H, k, R, L, P, U, D, _, G, Z, A, F, X, q, Q, W, Y, $, p, ee, te, ne, ie, ae, ce;
|
|
@@ -27,30 +27,24 @@ function Me(e) {
|
|
|
27
27
|
size: E,
|
|
28
28
|
zebra: ge,
|
|
29
29
|
bordered: Ce
|
|
30
|
-
}, [y, J] = N(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
(o = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : o.defaultValue
|
|
42
|
-
) : JSON.parse(r);
|
|
43
|
-
} catch (r) {
|
|
44
|
-
console.warn(r);
|
|
45
|
-
}
|
|
30
|
+
}, [y, J] = N(() => {
|
|
31
|
+
var n, l, c, o;
|
|
32
|
+
const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.stylesConfigState || {};
|
|
33
|
+
if (i && t && typeof window < "u" && t !== "online") {
|
|
34
|
+
const f = window[t];
|
|
35
|
+
try {
|
|
36
|
+
const r = f == null ? void 0 : f.getItem(i);
|
|
37
|
+
if (r)
|
|
38
|
+
return (n = e == null ? void 0 : e.stylesConfigState) != null && n.defaultValue ? C(JSON.parse(r), (l = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : l.defaultValue) : JSON.parse(r);
|
|
39
|
+
} catch (r) {
|
|
40
|
+
console.warn(r);
|
|
46
41
|
}
|
|
47
|
-
return e.stylesConfig || ((c = e.stylesConfigState) == null ? void 0 : c.value) || ((l = e.stylesConfigState) == null ? void 0 : l.defaultValue) || v;
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
value: ((H = e.stylesConfigState) == null ? void 0 : H.value) || e.stylesConfig,
|
|
51
|
-
onChange: ((k = e.stylesConfigState) == null ? void 0 : k.onChange) || e.onStylesConfigChange
|
|
52
42
|
}
|
|
53
|
-
|
|
43
|
+
return e.stylesConfig || ((c = e.stylesConfigState) == null ? void 0 : c.value) || ((o = e.stylesConfigState) == null ? void 0 : o.defaultValue) || v;
|
|
44
|
+
}, {
|
|
45
|
+
value: ((H = e.stylesConfigState) == null ? void 0 : H.value) || e.stylesConfig,
|
|
46
|
+
onChange: ((k = e.stylesConfigState) == null ? void 0 : k.onChange) || e.onStylesConfigChange
|
|
47
|
+
});
|
|
54
48
|
S(() => {
|
|
55
49
|
var a, n;
|
|
56
50
|
if (!((a = e.stylesConfigState) != null && a.persistenceKey) || !((n = e.stylesConfigState) != null && n.persistenceType) || typeof window > "u")
|
|
@@ -61,9 +55,9 @@ function Me(e) {
|
|
|
61
55
|
// onlineChange
|
|
62
56
|
} = e.stylesConfigState;
|
|
63
57
|
if (t !== "online") {
|
|
64
|
-
const
|
|
58
|
+
const l = window[t];
|
|
65
59
|
try {
|
|
66
|
-
|
|
60
|
+
l == null || l.setItem(i, JSON.stringify(y));
|
|
67
61
|
} catch (c) {
|
|
68
62
|
console.warn(c), M();
|
|
69
63
|
}
|
|
@@ -75,14 +69,12 @@ function Me(e) {
|
|
|
75
69
|
]), S(() => {
|
|
76
70
|
var t, i, a;
|
|
77
71
|
if ((t = e.stylesConfigState) != null && t.persistenceKey && ((i = e.stylesConfigState) == null ? void 0 : i.persistenceType) === "online") {
|
|
78
|
-
const { onlineGet: n, persistenceKey:
|
|
72
|
+
const { onlineGet: n, persistenceKey: l } = e.stylesConfigState;
|
|
79
73
|
try {
|
|
80
|
-
(a = n == null ? void 0 : n(
|
|
74
|
+
(a = n == null ? void 0 : n(l)) == null || a.then((c) => {
|
|
81
75
|
var f;
|
|
82
|
-
const
|
|
83
|
-
J(
|
|
84
|
-
Object.keys(l).length ? l : v
|
|
85
|
-
);
|
|
76
|
+
const o = C(c ?? {}, (f = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : f.value);
|
|
77
|
+
J(Object.keys(o).length ? o : v);
|
|
86
78
|
});
|
|
87
79
|
} catch (c) {
|
|
88
80
|
console.warn(c);
|
|
@@ -104,52 +96,41 @@ function Me(e) {
|
|
|
104
96
|
}
|
|
105
97
|
};
|
|
106
98
|
return s == null || s.forEach((a, n) => {
|
|
107
|
-
const { title:
|
|
108
|
-
|
|
109
|
-
field:
|
|
110
|
-
title:
|
|
99
|
+
const { title: l, isOperationCol: c } = a, o = re(a, n);
|
|
100
|
+
o && !c && t.fields.push({
|
|
101
|
+
field: o,
|
|
102
|
+
title: l,
|
|
111
103
|
show: !0
|
|
112
104
|
});
|
|
113
105
|
}), t;
|
|
114
|
-
}, [s]), [V, x] = N(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
(o = e == null ? void 0 : e.exportConfigState) == null ? void 0 : o.defaultValue
|
|
126
|
-
) : JSON.parse(r);
|
|
127
|
-
} catch (r) {
|
|
128
|
-
console.warn(r);
|
|
129
|
-
}
|
|
106
|
+
}, [s]), [V, x] = N(() => {
|
|
107
|
+
var n, l, c, o;
|
|
108
|
+
const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.exportConfigState || {};
|
|
109
|
+
if (i && t && typeof window < "u" && t !== "online") {
|
|
110
|
+
const f = window[t];
|
|
111
|
+
try {
|
|
112
|
+
const r = f == null ? void 0 : f.getItem(i);
|
|
113
|
+
if (r)
|
|
114
|
+
return (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? C(JSON.parse(r), (l = e == null ? void 0 : e.exportConfigState) == null ? void 0 : l.defaultValue) : JSON.parse(r);
|
|
115
|
+
} catch (r) {
|
|
116
|
+
console.warn(r);
|
|
130
117
|
}
|
|
131
|
-
return e.exportConfig || ((c = e.exportConfigState) == null ? void 0 : c.value) || ((l = e.exportConfigState) == null ? void 0 : l.defaultValue) || w;
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
value: ((P = e.exportConfigState) == null ? void 0 : P.value) || e.exportConfig,
|
|
135
|
-
onChange: ((U = e.exportConfigState) == null ? void 0 : U.onChange) || e.onExportConfigChange
|
|
136
118
|
}
|
|
137
|
-
|
|
119
|
+
return e.exportConfig || ((c = e.exportConfigState) == null ? void 0 : c.value) || ((o = e.exportConfigState) == null ? void 0 : o.defaultValue) || w;
|
|
120
|
+
}, {
|
|
121
|
+
value: ((P = e.exportConfigState) == null ? void 0 : P.value) || e.exportConfig,
|
|
122
|
+
onChange: ((U = e.exportConfigState) == null ? void 0 : U.onChange) || e.onExportConfigChange
|
|
123
|
+
});
|
|
138
124
|
S(() => {
|
|
139
|
-
var n,
|
|
125
|
+
var n, l;
|
|
140
126
|
const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.exportConfigState || {};
|
|
141
127
|
if (i && t && typeof window < "u" && t !== "online") {
|
|
142
128
|
const c = window[t];
|
|
143
129
|
try {
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
(o = e == null ? void 0 : e.exportConfigState) == null ? void 0 : o.defaultValue
|
|
149
|
-
)
|
|
150
|
-
) : x(JSON.parse(l)) : x(w);
|
|
151
|
-
} catch (l) {
|
|
152
|
-
console.warn(l);
|
|
130
|
+
const o = c == null ? void 0 : c.getItem(i);
|
|
131
|
+
o ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? x(C(JSON.parse(o), (l = e == null ? void 0 : e.exportConfigState) == null ? void 0 : l.defaultValue)) : x(JSON.parse(o)) : x(w);
|
|
132
|
+
} catch (o) {
|
|
133
|
+
console.warn(o);
|
|
153
134
|
}
|
|
154
135
|
}
|
|
155
136
|
}, [
|
|
@@ -166,9 +147,9 @@ function Me(e) {
|
|
|
166
147
|
// onlineChange
|
|
167
148
|
} = e.exportConfigState;
|
|
168
149
|
if (t !== "online") {
|
|
169
|
-
const
|
|
150
|
+
const l = window[t];
|
|
170
151
|
try {
|
|
171
|
-
|
|
152
|
+
l == null || l.setItem(i, JSON.stringify(V));
|
|
172
153
|
} catch (c) {
|
|
173
154
|
console.warn(c), B();
|
|
174
155
|
}
|
|
@@ -180,14 +161,12 @@ function Me(e) {
|
|
|
180
161
|
]), S(() => {
|
|
181
162
|
var t, i, a;
|
|
182
163
|
if ((t = e.exportConfigState) != null && t.persistenceKey && ((i = e.exportConfigState) == null ? void 0 : i.persistenceType) === "online") {
|
|
183
|
-
const { onlineGet: n, persistenceKey:
|
|
164
|
+
const { onlineGet: n, persistenceKey: l } = e.exportConfigState;
|
|
184
165
|
try {
|
|
185
|
-
(a = n == null ? void 0 : n(
|
|
166
|
+
(a = n == null ? void 0 : n(l)) == null || a.then((c) => {
|
|
186
167
|
var f;
|
|
187
|
-
const
|
|
188
|
-
x(
|
|
189
|
-
Object.keys(l).length ? l : w
|
|
190
|
-
);
|
|
168
|
+
const o = C(c ?? {}, (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
|
|
169
|
+
x(Object.keys(o).length ? o : w);
|
|
191
170
|
});
|
|
192
171
|
} catch (c) {
|
|
193
172
|
console.warn(c);
|
|
@@ -195,58 +174,47 @@ function Me(e) {
|
|
|
195
174
|
}
|
|
196
175
|
}, []);
|
|
197
176
|
const h = g(() => {
|
|
198
|
-
var c,
|
|
177
|
+
var c, o, f, r;
|
|
199
178
|
if ((c = e == null ? void 0 : e.columnsState) != null && c.defaultValue)
|
|
200
179
|
return e.columnsState.defaultValue;
|
|
201
|
-
const t = ((
|
|
180
|
+
const t = ((o = s == null ? void 0 : s.filter((d) => d.fixed === "left")) == null ? void 0 : o.map((d, m) => ({ ...d, order: m }))) ?? [], i = ((f = s == null ? void 0 : s.filter((d) => d.fixed === "right")) == null ? void 0 : f.map((d, m) => ({ ...d, order: m }))) ?? [], a = ((r = s == null ? void 0 : s.filter((d) => !["left", "right"].includes(d.fixed))) == null ? void 0 : r.map((d, m) => ({ ...d, order: m }))) ?? [], n = [...t, ...a, ...i], l = {};
|
|
202
181
|
return n == null || n.forEach((d, m) => {
|
|
203
|
-
const { order: Te, fixed: Ke, disabled: be } = d,
|
|
204
|
-
|
|
182
|
+
const { order: Te, fixed: Ke, disabled: be } = d, le = re(d, m);
|
|
183
|
+
le && (l[le] = {
|
|
205
184
|
show: !0,
|
|
206
185
|
order: Te,
|
|
207
186
|
fixed: Ke,
|
|
208
187
|
disabled: be
|
|
209
188
|
});
|
|
210
|
-
}),
|
|
211
|
-
}, [s]), [O, T] = N(
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
(o = e == null ? void 0 : e.columnsState) == null ? void 0 : o.defaultValue
|
|
223
|
-
) : JSON.parse(r);
|
|
224
|
-
} catch (r) {
|
|
225
|
-
console.warn(r);
|
|
226
|
-
}
|
|
189
|
+
}), l;
|
|
190
|
+
}, [s]), [O, T] = N(() => {
|
|
191
|
+
var n, l, c, o;
|
|
192
|
+
const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.columnsState || {};
|
|
193
|
+
if (i && t && typeof window < "u" && t !== "online") {
|
|
194
|
+
const f = window[t];
|
|
195
|
+
try {
|
|
196
|
+
const r = f == null ? void 0 : f.getItem(i);
|
|
197
|
+
if (r)
|
|
198
|
+
return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? C(JSON.parse(r), (l = e == null ? void 0 : e.columnsState) == null ? void 0 : l.defaultValue) : JSON.parse(r);
|
|
199
|
+
} catch (r) {
|
|
200
|
+
console.warn(r);
|
|
227
201
|
}
|
|
228
|
-
return e.columnsStateMap || ((c = e.columnsState) == null ? void 0 : c.value) || ((l = e.columnsState) == null ? void 0 : l.defaultValue) || h;
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
value: ((A = e.columnsState) == null ? void 0 : A.value) || e.columnsStateMap,
|
|
232
|
-
onChange: ((F = e.columnsState) == null ? void 0 : F.onChange) || e.onColumnsStateChange
|
|
233
202
|
}
|
|
234
|
-
|
|
203
|
+
return e.columnsStateMap || ((c = e.columnsState) == null ? void 0 : c.value) || ((o = e.columnsState) == null ? void 0 : o.defaultValue) || h;
|
|
204
|
+
}, {
|
|
205
|
+
value: ((A = e.columnsState) == null ? void 0 : A.value) || e.columnsStateMap,
|
|
206
|
+
onChange: ((F = e.columnsState) == null ? void 0 : F.onChange) || e.onColumnsStateChange
|
|
207
|
+
});
|
|
235
208
|
S(() => {
|
|
236
|
-
var n,
|
|
209
|
+
var n, l;
|
|
237
210
|
const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.columnsState || {};
|
|
238
211
|
if (i && t && typeof window < "u" && t !== "online") {
|
|
239
212
|
const c = window[t];
|
|
240
213
|
try {
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
(o = e == null ? void 0 : e.columnsState) == null ? void 0 : o.defaultValue
|
|
246
|
-
)
|
|
247
|
-
) : T(JSON.parse(l)) : T(h);
|
|
248
|
-
} catch (l) {
|
|
249
|
-
console.warn(l);
|
|
214
|
+
const o = c == null ? void 0 : c.getItem(i);
|
|
215
|
+
o ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? T(C(JSON.parse(o), (l = e == null ? void 0 : e.columnsState) == null ? void 0 : l.defaultValue)) : T(JSON.parse(o)) : T(h);
|
|
216
|
+
} catch (o) {
|
|
217
|
+
console.warn(o);
|
|
250
218
|
}
|
|
251
219
|
}
|
|
252
220
|
}, [
|
|
@@ -295,9 +263,9 @@ function Me(e) {
|
|
|
295
263
|
// onlineChange
|
|
296
264
|
} = e.columnsState;
|
|
297
265
|
if (t !== "online") {
|
|
298
|
-
const
|
|
266
|
+
const l = window[t];
|
|
299
267
|
try {
|
|
300
|
-
|
|
268
|
+
l == null || l.setItem(i, JSON.stringify(O));
|
|
301
269
|
} catch (c) {
|
|
302
270
|
console.warn(c), I();
|
|
303
271
|
}
|
|
@@ -309,12 +277,12 @@ function Me(e) {
|
|
|
309
277
|
]), S(() => {
|
|
310
278
|
var t, i, a;
|
|
311
279
|
if ((t = e.columnsState) != null && t.persistenceKey && ((i = e.columnsState) == null ? void 0 : i.persistenceType) === "online") {
|
|
312
|
-
const { onlineGet: n, persistenceKey:
|
|
280
|
+
const { onlineGet: n, persistenceKey: l } = e.columnsState;
|
|
313
281
|
try {
|
|
314
|
-
(a = n == null ? void 0 : n(
|
|
282
|
+
(a = n == null ? void 0 : n(l)) == null || a.then((c) => {
|
|
315
283
|
var f;
|
|
316
|
-
const
|
|
317
|
-
T(Object.keys(
|
|
284
|
+
const o = C(c ?? {}, (f = e == null ? void 0 : e.columnsState) == null ? void 0 : f.value);
|
|
285
|
+
T(Object.keys(o).length ? o : h);
|
|
318
286
|
});
|
|
319
287
|
} catch (c) {
|
|
320
288
|
console.warn(c);
|
|
@@ -367,7 +335,7 @@ function Me(e) {
|
|
|
367
335
|
}
|
|
368
336
|
const Be = Ve({}), _e = (e) => {
|
|
369
337
|
const K = Me(e.initValue);
|
|
370
|
-
return
|
|
338
|
+
return ve.jsx(Be.Provider, { value: K, children: e.children });
|
|
371
339
|
};
|
|
372
340
|
export {
|
|
373
341
|
Be as BitzTableContext,
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
const
|
|
2
|
-
let o = 0,
|
|
1
|
+
const h = (e, i) => {
|
|
2
|
+
let o = 0, n = 0;
|
|
3
3
|
return {
|
|
4
|
-
filterColumns: ((
|
|
5
|
-
const t =
|
|
6
|
-
return
|
|
7
|
-
}))(e,
|
|
8
|
-
|
|
9
|
-
autoWidthColLength:
|
|
4
|
+
filterColumns: ((d, l) => d.map((r) => {
|
|
5
|
+
const t = y(r, r.index), s = l[t];
|
|
6
|
+
return s && s.show === !1 ? (typeof r.width == "number" ? o += r.width : n += 1, !1) : { ...r, ...s };
|
|
7
|
+
}))(e, i).filter(Boolean),
|
|
8
|
+
hiddenTotalWidth: Math.floor(o),
|
|
9
|
+
autoWidthColLength: n
|
|
10
10
|
};
|
|
11
|
-
},
|
|
12
|
-
var t,
|
|
13
|
-
const { fixed:
|
|
14
|
-
if (
|
|
11
|
+
}, y = (e, i) => "key" in e && e.key !== void 0 && e.key !== null ? e.key : e.dataIndex ? Array.isArray(e.dataIndex) ? e.dataIndex.join("-") : e.dataIndex : `${i}`, c = (e) => (i, o) => {
|
|
12
|
+
var t, s, u, x;
|
|
13
|
+
const { fixed: n, index: a } = i, { fixed: f, index: d } = o;
|
|
14
|
+
if (n === "left" && f !== "left" || f === "right" && n !== "right")
|
|
15
15
|
return -2;
|
|
16
|
-
if (f === "left" &&
|
|
16
|
+
if (f === "left" && n !== "left" || n === "right" && f !== "right")
|
|
17
17
|
return 2;
|
|
18
|
-
const
|
|
19
|
-
return (t = e[
|
|
18
|
+
const l = i.key || `${a}`, r = o.key || `${d}`;
|
|
19
|
+
return (t = e[l]) != null && t.order || (s = e[r]) != null && s.order ? (((u = e[l]) == null ? void 0 : u.order) || 0) - (((x = e[r]) == null ? void 0 : x.order) || 0) : (i.index || 0) - (o.index || 0);
|
|
20
20
|
};
|
|
21
|
-
function k(e,
|
|
22
|
-
const
|
|
23
|
-
let
|
|
24
|
-
const f = (
|
|
25
|
-
for (const t in
|
|
26
|
-
if (
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
...
|
|
30
|
-
[
|
|
21
|
+
function k(e, i, o) {
|
|
22
|
+
const n = {};
|
|
23
|
+
let a = "";
|
|
24
|
+
const f = (d, l, r) => {
|
|
25
|
+
for (const t in d)
|
|
26
|
+
if (d.hasOwnProperty(t) && (typeof d[t] == "object" && d[t] !== null && (a = t, n[t] = { ...d[t] }, f(d[t], l, r)), t === l)) {
|
|
27
|
+
const s = n[a];
|
|
28
|
+
n[a] = {
|
|
29
|
+
...s,
|
|
30
|
+
[l]: r
|
|
31
31
|
// [prop]: current.disabled || current.fixed ? true : val,
|
|
32
|
-
},
|
|
32
|
+
}, a = "";
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
return f(e,
|
|
35
|
+
return f(e, i, o), n;
|
|
36
36
|
}
|
|
37
37
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
c as columnSort,
|
|
39
|
+
y as genColumnKey,
|
|
40
|
+
h as loopFilter,
|
|
41
41
|
k as updateNestedObject
|
|
42
42
|
};
|
|
@@ -1,72 +1,55 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useContext as
|
|
1
|
+
import { j as w } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { useContext as I, useRef as Z, useMemo as r, useCallback as L } from "react";
|
|
3
3
|
import { Table as ee } from "antd";
|
|
4
4
|
import te from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
5
|
-
import { BitzTableContext as
|
|
6
|
-
import
|
|
5
|
+
import { BitzTableContext as ne, toolCols as oe } from "../Store/index.mjs";
|
|
6
|
+
import re from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
|
|
7
7
|
import se from "../ActionCol/style.mjs";
|
|
8
8
|
import ae from "../../BitzTheme/index.mjs";
|
|
9
9
|
import le from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/table/ExpandIcon.mjs";
|
|
10
10
|
import "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/index.mjs";
|
|
11
|
-
import
|
|
12
|
-
import { getColumnsWithTool as
|
|
11
|
+
import ie from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/locale/en_US.mjs";
|
|
12
|
+
import { getColumnsWithTool as ce, loopBuildSkeleton as ue } from "../Table/utils.mjs";
|
|
13
13
|
import { ConfigContext as me } from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/context.mjs";
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
loading: l = !1,
|
|
18
|
-
scroll: s,
|
|
19
|
-
components: f,
|
|
20
|
-
expandable: c,
|
|
21
|
-
rowSelection: m,
|
|
22
|
-
...a
|
|
23
|
-
}) {
|
|
24
|
-
var T, p;
|
|
25
|
-
const { token: L } = ae.useToken(), { gap: j } = se(), { showColumnBorder: K, rowHoverable: M } = D(re), h = Z(null), C = oe((T = h.current) == null ? void 0 : T.nativeElement), q = o(() => {
|
|
14
|
+
function We({ dataSource: u = [], columns: g, loading: l = !1, scroll: s, components: f, expandable: i, rowSelection: m, ...a }) {
|
|
15
|
+
var z, B;
|
|
16
|
+
const { token: j } = ae.useToken(), { gap: K } = se(), { showColumnBorder: M, rowHoverable: q } = I(ne), h = Z(null), y = re((z = h.current) == null ? void 0 : z.nativeElement), v = r(() => {
|
|
26
17
|
let e = (s == null ? void 0 : s.x) ?? 1e3;
|
|
27
18
|
return s != null && s.x ? { x: e, y: s.y || 400 } : s != null && s.y ? { x: e, y: s.y } : { x: e, y: 400 };
|
|
28
19
|
}, [s]), P = () => {
|
|
29
|
-
var
|
|
30
|
-
const e = (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var b;
|
|
35
|
-
t.push(
|
|
36
|
-
((b = i.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : b.clientWidth) || 0
|
|
37
|
-
);
|
|
20
|
+
var o, n;
|
|
21
|
+
const e = (n = (o = h.current) == null ? void 0 : o.nativeElement) == null ? void 0 : n.querySelectorAll("& > .bitzTableContainerBody > .ant-table-wrapper.bitzTable > .ant-spin-nested-loading > .ant-spin-container > .ant-table > .ant-table-container > .ant-table-body > table > .ant-table-tbody > tr:not(.ant-table-measure-row, .ant-table-expanded-row)"), t = [];
|
|
22
|
+
if (e == null || e.forEach((c) => {
|
|
23
|
+
var d;
|
|
24
|
+
t.push(((d = c.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : d.clientWidth) || 0);
|
|
38
25
|
}), t.length)
|
|
39
|
-
return Math.ceil(Math.max(...t)) +
|
|
26
|
+
return Math.ceil(Math.max(...t)) + K * 2;
|
|
40
27
|
}, A = () => {
|
|
41
|
-
var
|
|
42
|
-
const e = (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
".ant-table-cell-scrollbar"
|
|
46
|
-
)) == null ? void 0 : N.offsetWidth;
|
|
47
|
-
return { tbodyWidth: t, scrollbarSize: i, hasScrollBar: r };
|
|
48
|
-
}, { hasScrollBar: x, scrollbarSize: R } = o(() => {
|
|
28
|
+
var d, E, S, N, D;
|
|
29
|
+
const e = (E = (d = h.current) == null ? void 0 : d.nativeElement) == null ? void 0 : E.querySelector(".ant-table-body"), t = e == null ? void 0 : e.clientWidth, n = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, c = (D = (N = (S = h.current) == null ? void 0 : S.nativeElement) == null ? void 0 : N.querySelector(".ant-table-cell-scrollbar")) == null ? void 0 : D.offsetWidth;
|
|
30
|
+
return { tbodyWidth: t, scrollbarSize: c, hasScrollBar: n };
|
|
31
|
+
}, { hasScrollBar: x, scrollbarSize: R } = r(() => {
|
|
49
32
|
const { hasScrollBar: e, scrollbarSize: t } = A();
|
|
50
33
|
return {
|
|
51
34
|
hasScrollBar: e,
|
|
52
35
|
scrollbarSize: t
|
|
53
36
|
};
|
|
54
|
-
}, [
|
|
55
|
-
const e = g ?? [],
|
|
56
|
-
...
|
|
57
|
-
width:
|
|
37
|
+
}, [y == null ? void 0 : y.height]), b = r(() => {
|
|
38
|
+
const e = g ?? [], o = e.filter((n) => !oe.includes(n)).map((n) => ({
|
|
39
|
+
...n,
|
|
40
|
+
width: n.useMaxWidth ? P() ?? n.width : n.width
|
|
58
41
|
}));
|
|
59
|
-
return
|
|
60
|
-
}, [g]), k =
|
|
42
|
+
return ce(e, o, !1, !!m, !!i);
|
|
43
|
+
}, [g]), k = r(() => ue(b), [b]), G = r(() => l ? k : b, [l, b, k]), T = r(() => {
|
|
61
44
|
const e = u == null ? void 0 : u.length, t = e > 4 ? e >= 8 ? 8 : e : 4;
|
|
62
|
-
return Array.from({ length: t }).map((
|
|
63
|
-
key: `${Date.now()}${
|
|
45
|
+
return Array.from({ length: t }).map((n, c) => ({
|
|
46
|
+
key: `${Date.now()}${c}`
|
|
64
47
|
}));
|
|
65
|
-
}, [u]),
|
|
66
|
-
if (
|
|
48
|
+
}, [u]), H = r(() => l ? T : u, [l, u, T]), { table: C, locale: $ = ie } = I(me), F = { ...$.Table }, _ = ((B = C == null ? void 0 : C.expandable) == null ? void 0 : B.expandIcon) || (i == null ? void 0 : i.expandIcon) || le(F), p = r(() => {
|
|
49
|
+
if (i)
|
|
67
50
|
return {
|
|
68
|
-
...
|
|
69
|
-
expandedRowRender: () =>
|
|
51
|
+
...i,
|
|
52
|
+
expandedRowRender: () => w.jsx(w.Fragment, {}),
|
|
70
53
|
expandIcon: (e) => {
|
|
71
54
|
const t = _(e);
|
|
72
55
|
return {
|
|
@@ -76,73 +59,48 @@ function Be({
|
|
|
76
59
|
disabled: !0,
|
|
77
60
|
style: {
|
|
78
61
|
...t.props.style,
|
|
79
|
-
backgroundColor:
|
|
62
|
+
backgroundColor: j.colorBgContainerDisabled
|
|
80
63
|
}
|
|
81
64
|
}
|
|
82
65
|
};
|
|
83
66
|
}
|
|
84
67
|
};
|
|
85
|
-
}, [
|
|
68
|
+
}, [i]), J = r(() => l ? p : i, [l, i, p]), W = r(() => {
|
|
86
69
|
if (m)
|
|
87
70
|
return {
|
|
88
71
|
...m,
|
|
89
72
|
selectedRowKeys: [],
|
|
90
73
|
getCheckboxProps: () => ({ disabled: !0 })
|
|
91
74
|
};
|
|
92
|
-
}, [m]), O =
|
|
93
|
-
(e, t) => {
|
|
94
|
-
var r;
|
|
95
|
-
if (!a.onRow)
|
|
96
|
-
return {};
|
|
97
|
-
const n = (r = a.onRow) == null ? void 0 : r.call(a, e, t);
|
|
98
|
-
return n.onClick && (n.className = "rowPointerCursor"), n;
|
|
99
|
-
},
|
|
100
|
-
[a.onRow]
|
|
101
|
-
), V = I(
|
|
102
|
-
(e, t, n) => {
|
|
103
|
-
const r = t % 2 === 0 ? "oddRow" : "evenRow";
|
|
104
|
-
if (a.rowClassName) {
|
|
105
|
-
const i = a.rowClassName(e, t, n);
|
|
106
|
-
return te(r, i);
|
|
107
|
-
}
|
|
108
|
-
return r;
|
|
109
|
-
},
|
|
110
|
-
[a.rowClassName]
|
|
111
|
-
), X = (e) => {
|
|
75
|
+
}, [m]), O = r(() => l ? W : m, [l, m, W]), Q = r(() => l ? void 0 : a.rowKey, [l, a.rowKey]), U = L((e, t) => {
|
|
112
76
|
var n;
|
|
77
|
+
if (!a.onRow)
|
|
78
|
+
return {};
|
|
79
|
+
const o = (n = a.onRow) == null ? void 0 : n.call(a, e, t);
|
|
80
|
+
return o.onClick && (o.className = "rowPointerCursor"), o;
|
|
81
|
+
}, [a.onRow]), V = L((e, t, o) => {
|
|
82
|
+
const n = t % 2 === 0 ? "oddRow" : "evenRow";
|
|
83
|
+
if (a.rowClassName) {
|
|
84
|
+
const c = a.rowClassName(e, t, o);
|
|
85
|
+
return te(n, c);
|
|
86
|
+
}
|
|
87
|
+
return n;
|
|
88
|
+
}, [a.rowClassName]), X = (e) => {
|
|
89
|
+
var o;
|
|
113
90
|
const t = { ...e };
|
|
114
|
-
return t.className.includes("ant-table-cell-fix-right") && !x && ((
|
|
91
|
+
return t.className.includes("ant-table-cell-fix-right") && !x && ((o = t.style) != null && o.right) && (t.style = {
|
|
115
92
|
...t.style,
|
|
116
93
|
right: t.style.right - (R || 0)
|
|
117
|
-
}),
|
|
118
|
-
}, Y =
|
|
94
|
+
}), w.jsx("th", { ...t });
|
|
95
|
+
}, Y = r(() => ({
|
|
119
96
|
...f,
|
|
120
97
|
header: {
|
|
121
98
|
...f == null ? void 0 : f.header,
|
|
122
99
|
cell: X
|
|
123
100
|
}
|
|
124
101
|
}), [f, x, R]);
|
|
125
|
-
return
|
|
126
|
-
ee,
|
|
127
|
-
{
|
|
128
|
-
...a,
|
|
129
|
-
bordered: K,
|
|
130
|
-
columns: G,
|
|
131
|
-
dataSource: $,
|
|
132
|
-
loading: !1,
|
|
133
|
-
pagination: !1,
|
|
134
|
-
scroll: q,
|
|
135
|
-
expandable: J,
|
|
136
|
-
rowSelection: O,
|
|
137
|
-
onRow: U,
|
|
138
|
-
rowClassName: V,
|
|
139
|
-
components: Y,
|
|
140
|
-
rowKey: Q,
|
|
141
|
-
rowHoverable: M,
|
|
142
|
-
ref: h
|
|
143
|
-
}
|
|
144
|
-
);
|
|
102
|
+
return w.jsx(ee, { ...a, bordered: M, columns: G, dataSource: H, loading: !1, pagination: !1, scroll: v, expandable: J, rowSelection: O, onRow: U, rowClassName: V, components: Y, rowKey: Q, rowHoverable: q, ref: h });
|
|
145
103
|
}
|
|
146
104
|
export {
|
|
147
|
-
|
|
105
|
+
We as default
|
|
148
106
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ResizeCallbackData } from 'react-resizable';
|
|
2
|
+
declare const ResizableTitle: (props: React.HTMLAttributes<any> & {
|
|
3
|
+
hasScrollBar?: boolean;
|
|
4
|
+
scrollbarSize?: number;
|
|
5
|
+
onResize: (e: React.SyntheticEvent<Element>, data: ResizeCallbackData) => void;
|
|
6
|
+
width: number;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ResizableTitle;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { j as s } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { Resizable as m } from "../../../node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/index.mjs";
|
|
3
|
+
import { useMemo as d } from "react";
|
|
4
|
+
const f = (t) => {
|
|
5
|
+
const { hasScrollBar: o, scrollbarSize: n, onResize: c, width: r, ...h } = t, i = d(() => {
|
|
6
|
+
var l, a;
|
|
7
|
+
const e = { ...h };
|
|
8
|
+
return ((l = e.className) == null ? void 0 : l.includes("ant-table-cell-fix-right")) && !o && ((a = e.style) != null && a.right) && (e.style = { ...e.style ?? {} }, e.style.right = Number(e.style.right ?? 0) - (n || 0)), e;
|
|
9
|
+
}, [t]);
|
|
10
|
+
return r ? s.jsx(m, { width: r, height: 0, handle: s.jsx("span", { className: "react-resizable-handle", onClick: (e) => e.stopPropagation() }), onResize: c, draggableOpts: { enableUserSelectHack: !1 }, children: s.jsx("th", { ...i }) }) : s.jsx("th", { ...i });
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
f as default
|
|
14
|
+
};
|