bitz-react-admin-ui 2.1.0 → 2.1.1
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 +10 -4
- package/dist/assets/iconfont/IconClose.mjs +7 -1
- package/dist/assets/iconfont/IconCuowu.mjs +8 -2
- package/dist/assets/iconfont/IconDuigoux.mjs +8 -2
- package/dist/assets/iconfont/IconFabu.mjs +18 -3
- package/dist/assets/iconfont/IconFanhui.mjs +11 -5
- package/dist/assets/iconfont/IconGaojisousuo.mjs +10 -4
- package/dist/assets/iconfont/IconHangfengexian.mjs +27 -4
- package/dist/assets/iconfont/IconHangliefengexian.mjs +27 -4
- package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +11 -5
- package/dist/assets/iconfont/IconIcon21.mjs +8 -2
- package/dist/assets/iconfont/IconJincoude.mjs +9 -3
- package/dist/assets/iconfont/IconJinggao.mjs +8 -2
- package/dist/assets/iconfont/IconKuansongde.mjs +11 -5
- package/dist/assets/iconfont/IconLiefengexian.mjs +28 -5
- package/dist/assets/iconfont/IconMore.mjs +26 -4
- package/dist/assets/iconfont/IconShanchu.mjs +11 -5
- package/dist/assets/iconfont/IconShanchu1.mjs +18 -3
- package/dist/assets/iconfont/IconSousuo.mjs +10 -4
- package/dist/assets/iconfont/IconTejincou.mjs +7 -1
- package/dist/assets/iconfont/IconTekuansong.mjs +11 -5
- package/dist/assets/iconfont/IconTishi1.mjs +12 -6
- package/dist/assets/iconfont/IconTuodong.mjs +12 -6
- package/dist/assets/iconfont/IconWubanmawentianchong.mjs +22 -5
- package/dist/assets/iconfont/IconWufengexian.mjs +11 -4
- package/dist/assets/iconfont/IconXinxitishi.mjs +9 -3
- package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +23 -7
- package/dist/assets/iconfont/IconZhongdengde.mjs +10 -4
- package/dist/assets/iconfont/IconZhongzhi.mjs +11 -5
- package/dist/assets/iconfont/index.mjs +29 -29
- 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 +9 -18
- package/dist/components/BitzConfirmModal/index.mjs +24 -1
- package/dist/components/BitzConvert/DropdownToButton/index.mjs +14 -11
- package/dist/components/BitzConvert/index.mjs +1 -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/BitzFluentInput/index.mjs +23 -4
- package/dist/components/BitzFluentSelect/index.mjs +24 -5
- 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 +29 -6
- package/dist/components/BitzFuiCalendar/CalendarHead.mjs +5 -2
- package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +12 -3
- package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +50 -18
- package/dist/components/BitzFuiCalendar/ColumnData.mjs +31 -15
- package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +47 -5
- 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 +62 -14
- 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 +33 -5
- package/dist/components/BitzTable/ActionBar/Button.mjs +1 -1
- package/dist/components/BitzTable/ActionBar/style.mjs +12 -9
- package/dist/components/BitzTable/ActionCol/index.mjs +90 -16
- 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 +32 -14
- package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +40 -8
- package/dist/components/BitzTable/SelectionBar/style.mjs +18 -8
- package/dist/components/BitzTable/Store/index.mjs +68 -45
- package/dist/components/BitzTable/Table/index.mjs +305 -145
- package/dist/components/BitzTable/Table/style.mjs +10 -1
- package/dist/components/BitzTable/Table/utils.mjs +11 -4
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +82 -47
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +95 -21
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +68 -28
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +246 -138
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +6 -4
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +9 -2
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +142 -85
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +29 -8
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +33 -6
- package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +17 -4
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +27 -10
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +52 -9
- package/dist/components/BitzTableOperations/index.mjs +13 -3
- package/dist/components/BitzTableSelect/Picker/index.mjs +43 -10
- package/dist/components/BitzTableSelect/Select/index.mjs +87 -21
- package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +21 -11
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +210 -40
- package/dist/components/BitzTableSelect/TableCell/index.mjs +49 -8
- package/dist/components/BitzTableSelect/TextBlock/index.mjs +27 -9
- package/dist/components/BitzTableSelect/index.mjs +61 -13
- package/dist/components/BitzTag/index.mjs +1 -1
- 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/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/style.css +1 -1
- package/dist/utils/create.mjs +7 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useContext as J, useState as
|
|
1
|
+
import { j as o } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { useContext as J, useState as P, useRef as T, useEffect as Q, useMemo as l, useCallback as je } from "react";
|
|
3
3
|
import { isMobile as Y } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
|
|
4
4
|
import { Table as te, Skeleton as at } from "antd";
|
|
5
5
|
import Z from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import dt from "../../BitzDrawer/index.mjs";
|
|
7
|
+
import ut from "../../BitzPagination/index.mjs";
|
|
8
8
|
import ht from "../../BitzNoData/index.mjs";
|
|
9
9
|
import "../../BitzList/index.less.mjs";
|
|
10
10
|
import ft from "../../BitzList/List.mjs";
|
|
@@ -16,160 +16,177 @@ import ee from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/e
|
|
|
16
16
|
import wt from "../ActionCol/style.mjs";
|
|
17
17
|
import Bt from "../../BitzTheme/index.mjs";
|
|
18
18
|
import { BitzConfigContext as zt } from "../../BitzConfigProvider/context.mjs";
|
|
19
|
-
import
|
|
19
|
+
import vt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/table/ExpandIcon.mjs";
|
|
20
20
|
import "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/index.mjs";
|
|
21
|
-
import
|
|
21
|
+
import jt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/locale/en_US.mjs";
|
|
22
22
|
import { getColumnsWithTool as Nt, loopBuildSkeleton as kt } from "./utils.mjs";
|
|
23
|
-
import { getCssVar as
|
|
23
|
+
import { getCssVar as pt } from "./style.mjs";
|
|
24
24
|
import "./index.less.mjs";
|
|
25
|
-
import { ConfigContext as
|
|
26
|
-
import
|
|
25
|
+
import { ConfigContext as Tt } from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/context.mjs";
|
|
26
|
+
import St from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
|
|
27
27
|
const Ne = [te.SELECTION_COLUMN, te.EXPAND_COLUMN];
|
|
28
|
-
function
|
|
29
|
-
rowHoverable:
|
|
30
|
-
zebra:
|
|
28
|
+
function Lt({
|
|
29
|
+
rowHoverable: S,
|
|
30
|
+
zebra: re,
|
|
31
31
|
showPagination: ke = !0,
|
|
32
|
-
height:
|
|
33
|
-
dataSource:
|
|
34
|
-
total:
|
|
32
|
+
height: L,
|
|
33
|
+
dataSource: d = [],
|
|
34
|
+
total: E = 0,
|
|
35
35
|
columns: N,
|
|
36
36
|
loading: a = !1,
|
|
37
|
-
skeletonNum:
|
|
37
|
+
skeletonNum: H = {
|
|
38
38
|
pc: 10,
|
|
39
39
|
mobile: 10
|
|
40
40
|
},
|
|
41
|
-
skeletonRender:
|
|
42
|
-
skeletonRowNum:
|
|
43
|
-
skeletonRowsWidth:
|
|
41
|
+
skeletonRender: oe,
|
|
42
|
+
skeletonRowNum: pe = 4,
|
|
43
|
+
skeletonRowsWidth: Te = ["35%", "100%", "100%", "60%"],
|
|
44
44
|
// mobileLoadEmit,
|
|
45
45
|
mobileRefreshEmit: ne,
|
|
46
|
-
operationFilter:
|
|
47
|
-
enableControlPage:
|
|
46
|
+
operationFilter: A,
|
|
47
|
+
enableControlPage: Se,
|
|
48
48
|
pagination: m,
|
|
49
|
-
paginationEmit:
|
|
49
|
+
paginationEmit: R = () => {
|
|
50
50
|
},
|
|
51
|
-
mobilePageHeight:
|
|
52
|
-
mobileCancelText:
|
|
53
|
-
noDataTitle:
|
|
54
|
-
noDataImg:
|
|
55
|
-
color:
|
|
51
|
+
mobilePageHeight: Mt = 500,
|
|
52
|
+
mobileCancelText: Le = "取消",
|
|
53
|
+
noDataTitle: Me,
|
|
54
|
+
noDataImg: We,
|
|
55
|
+
color: Wt,
|
|
56
56
|
size: se,
|
|
57
|
-
showTableTool:
|
|
57
|
+
showTableTool: Re = !0,
|
|
58
58
|
tableAction: De,
|
|
59
|
-
tableToolbar:
|
|
60
|
-
selectionBar:
|
|
61
|
-
scroll:
|
|
59
|
+
tableToolbar: Pe,
|
|
60
|
+
selectionBar: Ee,
|
|
61
|
+
scroll: u,
|
|
62
62
|
components: K,
|
|
63
63
|
expandable: b,
|
|
64
64
|
rowSelection: z,
|
|
65
|
-
resetPage:
|
|
65
|
+
resetPage: He,
|
|
66
66
|
...i
|
|
67
67
|
}) {
|
|
68
68
|
var Be, ze;
|
|
69
|
-
const { token: x } = Bt.useToken(), { Table: c } = x, { tableSpaceBetweenPage: le = 10 } = c, { gap:
|
|
69
|
+
const { token: x } = Bt.useToken(), { Table: c } = x, { tableSpaceBetweenPage: le = 10 } = c, { gap: Ae } = wt(), { stylesConfig: w, ...M } = J(Ct), ce = (Be = J(zt).Table) == null ? void 0 : Be.rowHoverable, [k, ie] = P(!1), $ = T(void 0), V = T(0), O = T(0), [Ke, I] = P(!1), [f, $e] = P([]);
|
|
70
70
|
Q(() => {
|
|
71
|
-
let e = [...
|
|
71
|
+
let e = [...d];
|
|
72
72
|
(m == null ? void 0 : m.page) !== 1 && (e = [...f, ...e]), $e(e);
|
|
73
|
-
}, [
|
|
74
|
-
const
|
|
73
|
+
}, [d]);
|
|
74
|
+
const Ve = l(() => !!(f != null && f.length) && (f == null ? void 0 : f.length) >= E, [f, E]), [Oe, Ie] = P([]), _e = (e, t) => {
|
|
75
75
|
var n;
|
|
76
|
-
const
|
|
77
|
-
|
|
76
|
+
const r = (n = A == null ? void 0 : A(e, t)) == null ? void 0 : n.filter(
|
|
77
|
+
(s) => s.type !== "divider"
|
|
78
|
+
);
|
|
79
|
+
r != null && r.length && (Ie(r), I(!0));
|
|
78
80
|
}, ae = () => {
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
+
I(!1);
|
|
82
|
+
}, qe = (e) => {
|
|
81
83
|
var t;
|
|
82
|
-
|
|
84
|
+
I(!1), (t = e.onClick) == null || t.call(e);
|
|
83
85
|
};
|
|
84
86
|
Q(() => (document == null || document.addEventListener("fullscreenchange", (e) => {
|
|
85
|
-
var t,
|
|
86
|
-
(t = e.target) != null && t.classList.contains("bitzTableBlock") && (ie(!!document.fullscreenElement), (n = (
|
|
87
|
+
var t, r, n;
|
|
88
|
+
(t = e.target) != null && t.classList.contains("bitzTableBlock") && (ie(!!document.fullscreenElement), (n = (r = document.fullscreenElement) == null ? void 0 : r.classList) != null && n.contains("bitzTableBlock") || ie(!1));
|
|
87
89
|
}), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
|
|
88
90
|
})), []);
|
|
89
|
-
const g =
|
|
90
|
-
var
|
|
91
|
-
const e = (
|
|
91
|
+
const g = T(null), _ = ee(g), de = T(null), q = ee(de), ue = T(null), p = ee(ue), Fe = () => {
|
|
92
|
+
var r;
|
|
93
|
+
const e = (r = g.current) == null ? void 0 : r.querySelectorAll(
|
|
94
|
+
"& > .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)"
|
|
95
|
+
), t = [];
|
|
92
96
|
if (e == null || e.forEach((n) => {
|
|
93
97
|
var s;
|
|
94
|
-
t.push(
|
|
98
|
+
t.push(
|
|
99
|
+
((s = n.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : s.clientWidth) || 0
|
|
100
|
+
);
|
|
95
101
|
}), t.length)
|
|
96
|
-
return Math.ceil(Math.max(...t)) +
|
|
102
|
+
return Math.ceil(Math.max(...t)) + Ae * 2;
|
|
97
103
|
}, he = () => {
|
|
98
|
-
var h, C,
|
|
99
|
-
const e = (h = g.current) == null ? void 0 : h.querySelector(
|
|
104
|
+
var h, C, j;
|
|
105
|
+
const e = (h = g.current) == null ? void 0 : h.querySelector(
|
|
106
|
+
".ant-table-body"
|
|
107
|
+
), t = e == null ? void 0 : e.clientWidth, n = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, s = (j = (C = g.current) == null ? void 0 : C.querySelector(
|
|
108
|
+
".ant-table-cell-scrollbar"
|
|
109
|
+
)) == null ? void 0 : j.offsetWidth;
|
|
100
110
|
return { tbodyWidth: t, scrollbarSize: s, hasScrollBar: n };
|
|
101
|
-
}, { y:
|
|
111
|
+
}, { y: F, hasScrollBar: fe, scrollbarSize: G } = l(() => {
|
|
102
112
|
const { hasScrollBar: e, scrollbarSize: t } = he();
|
|
103
|
-
if (typeof
|
|
113
|
+
if (typeof L > "u")
|
|
104
114
|
return {
|
|
105
115
|
hasScrollBar: e,
|
|
106
116
|
scrollbarSize: t
|
|
107
117
|
};
|
|
108
|
-
let
|
|
118
|
+
let r = 40, n = 40;
|
|
109
119
|
if (g.current) {
|
|
110
120
|
const D = window.getComputedStyle(g.current);
|
|
111
|
-
|
|
121
|
+
r = parseInt(D.getPropertyValue("--cell-height")), n = parseInt(D.getPropertyValue("--toolbar-height"));
|
|
112
122
|
}
|
|
113
|
-
const s = (
|
|
114
|
-
return { y: (k ? window.innerHeight :
|
|
123
|
+
const s = (p == null ? void 0 : p.height) || 0, h = s ? le : 0;
|
|
124
|
+
return { y: (k ? window.innerHeight : L) - s - h - n - r, hasScrollBar: e, scrollbarSize: t };
|
|
115
125
|
}, [
|
|
116
126
|
k,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
127
|
+
L,
|
|
128
|
+
p == null ? void 0 : p.height,
|
|
129
|
+
_ == null ? void 0 : _.height,
|
|
130
|
+
q == null ? void 0 : q.height
|
|
121
131
|
]), me = l(() => {
|
|
122
|
-
let e = (
|
|
123
|
-
return
|
|
124
|
-
}, [
|
|
125
|
-
const t = e.length,
|
|
132
|
+
let e = (u == null ? void 0 : u.x) ?? 1e3;
|
|
133
|
+
return V.current && (e -= V.current), O.current && (e -= O.current * ($.current || 0)), u != null && u.x ? { x: e, y: u.y || F } : u != null && u.y ? { x: e, y: u.y } : { x: e, y: F };
|
|
134
|
+
}, [u, F, $.current]), Ge = (e) => {
|
|
135
|
+
const t = e.length, r = e.filter((B) => B.width), s = r.map((B) => B.width).reduce((B, X) => B + X, 0);
|
|
126
136
|
let h = 0;
|
|
127
137
|
if (g.current) {
|
|
128
|
-
const B = window.getComputedStyle(g.current), X = parseInt(
|
|
138
|
+
const B = window.getComputedStyle(g.current), X = parseInt(
|
|
139
|
+
B.getPropertyValue("--toolCell-paddingInline")
|
|
140
|
+
);
|
|
129
141
|
h = parseInt(B.getPropertyValue("--fontSize")) + 4 + 2 * X;
|
|
130
142
|
}
|
|
131
143
|
let C = 0;
|
|
132
144
|
z && (C += h), b && (C += h);
|
|
133
|
-
const { tbodyWidth:
|
|
134
|
-
return
|
|
135
|
-
},
|
|
136
|
-
const e = N ?? [], t = e.filter((y) => !Ne.includes(y)), { filterColumns:
|
|
137
|
-
|
|
138
|
-
|
|
145
|
+
const { tbodyWidth: j } = he(), y = parseInt(`${me.x}`) || 0, D = Math.max(y, j), ve = (parseInt(`${D}`) || 0) - s - C;
|
|
146
|
+
return ve >= 0 ? ve / (t - r.length) : void 0;
|
|
147
|
+
}, v = l(() => {
|
|
148
|
+
const e = N ?? [], t = e.filter((y) => !Ne.includes(y)), { filterColumns: r, width: n, autoWidthColLength: s } = yt(
|
|
149
|
+
t,
|
|
150
|
+
M.columnsMap
|
|
151
|
+
);
|
|
152
|
+
V.current = Math.ceil(n), O.current = s;
|
|
153
|
+
const h = r.sort(xt(M.columnsMap));
|
|
139
154
|
if (Y)
|
|
140
155
|
return h;
|
|
141
156
|
const C = Ge(h);
|
|
142
157
|
$.current = Math.ceil(C ?? 0);
|
|
143
|
-
const
|
|
158
|
+
const j = h.map((y) => ({
|
|
144
159
|
...y,
|
|
145
160
|
...y.width ? {
|
|
146
|
-
width: y.useMaxWidth ?
|
|
161
|
+
width: y.useMaxWidth ? Fe() ?? y.width : y.width
|
|
147
162
|
} : {
|
|
148
163
|
// 给未设置width的列设置平均数
|
|
149
164
|
width: C
|
|
150
165
|
}
|
|
151
166
|
}));
|
|
152
|
-
return Nt(e,
|
|
153
|
-
}, [N,
|
|
167
|
+
return Nt(e, j, z, b);
|
|
168
|
+
}, [N, M.columnsMap, M.sortKeyColumns]);
|
|
154
169
|
Q(() => {
|
|
155
170
|
if (N && N.length > 0) {
|
|
156
|
-
const e = N.map(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
171
|
+
const e = N.map(
|
|
172
|
+
(t) => (
|
|
173
|
+
// @ts-ignore
|
|
174
|
+
gt((t == null ? void 0 : t.key) ?? (t == null ? void 0 : t.dataIndex), t == null ? void 0 : t.dataIndex)
|
|
175
|
+
)
|
|
176
|
+
);
|
|
177
|
+
M.setSortKeyColumns(e);
|
|
161
178
|
}
|
|
162
179
|
}, [N]);
|
|
163
|
-
const be = l(() => kt(
|
|
164
|
-
const e =
|
|
180
|
+
const be = l(() => kt(v, Ne), [v]), Ue = l(() => a ? be : v, [a, v, be]), Ce = l(() => {
|
|
181
|
+
const e = d == null ? void 0 : d.length, t = e > (H.pc ?? 10) ? e >= 20 ? 20 : e : H.pc ?? 10;
|
|
165
182
|
return Array.from({ length: t }).map((n, s) => ({
|
|
166
183
|
key: `${Date.now()}${s}`
|
|
167
184
|
}));
|
|
168
|
-
}, [
|
|
185
|
+
}, [d]), Xe = l(() => a ? Ce : d, [a, d, Ce]), { table: U, locale: Je = jt } = J(Tt), Qe = { ...Je.Table }, Ye = ((ze = U == null ? void 0 : U.expandable) == null ? void 0 : ze.expandIcon) || (b == null ? void 0 : b.expandIcon) || vt(Qe), ye = l(() => {
|
|
169
186
|
if (b)
|
|
170
187
|
return {
|
|
171
188
|
...b,
|
|
172
|
-
expandedRowRender: () =>
|
|
189
|
+
expandedRowRender: () => /* @__PURE__ */ o.jsx(o.Fragment, {}),
|
|
173
190
|
expandIcon: (e) => {
|
|
174
191
|
const t = Ye(e);
|
|
175
192
|
return {
|
|
@@ -192,91 +209,234 @@ function Mt({
|
|
|
192
209
|
selectedRowKeys: [],
|
|
193
210
|
getCheckboxProps: () => ({ disabled: !0 })
|
|
194
211
|
};
|
|
195
|
-
}, [z]), et = l(() => a ? xe : z, [a, z, xe]), tt = l(() => a ? void 0 : i.rowKey, [a, i.rowKey]), ge = l(() => `${se ?? w.size}BitzTable`, [se, w.size]),
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
212
|
+
}, [z]), et = l(() => a ? xe : z, [a, z, xe]), tt = l(() => a ? void 0 : i.rowKey, [a, i.rowKey]), ge = l(() => `${se ?? w.size}BitzTable`, [se, w.size]), W = l(() => i.bordered ?? w.bordered, [i.bordered, w.bordered]), rt = l(() => !!["column", "row-column"].includes(W), [W]), ot = je(
|
|
213
|
+
(e, t) => {
|
|
214
|
+
var n;
|
|
215
|
+
if (!i.onRow)
|
|
216
|
+
return {};
|
|
217
|
+
const r = (n = i.onRow) == null ? void 0 : n.call(i, e, t);
|
|
218
|
+
return r.onClick && (r.className = "rowPointerCursor"), r;
|
|
219
|
+
},
|
|
220
|
+
[i.onRow]
|
|
221
|
+
), nt = l(() => {
|
|
202
222
|
let e = !1;
|
|
203
|
-
return (
|
|
204
|
-
|
|
223
|
+
return (W === "hide" || W === "column") && (e = !0), Z(
|
|
224
|
+
"bitzTableContainer",
|
|
225
|
+
{ hideBorder: e },
|
|
226
|
+
{ hasScrollBar: fe },
|
|
227
|
+
ge,
|
|
228
|
+
i.className
|
|
229
|
+
);
|
|
230
|
+
}, [i.className, ge, fe, k, W]), st = l(() => ({
|
|
205
231
|
"--container-bgColor": x.colorBgContainer
|
|
206
232
|
}), [x.colorBgContainer]), lt = l(() => {
|
|
207
|
-
const e =
|
|
208
|
-
let
|
|
209
|
-
return (G ?? 0) > 0 && (
|
|
233
|
+
const e = re ?? w.zebra, t = k ? "100%" : L;
|
|
234
|
+
let r;
|
|
235
|
+
return (G ?? 0) > 0 && (r = G), pt({
|
|
210
236
|
height: t,
|
|
211
237
|
evenRowBgColor: e ? c == null ? void 0 : c.evenRowBgColor : x.colorBgContainer,
|
|
212
238
|
colorBgContainer: x.colorBgContainer,
|
|
213
239
|
table: c,
|
|
214
240
|
gap: le,
|
|
215
241
|
borderColor: (c == null ? void 0 : c.borderColor) || x.colorBorderSecondary,
|
|
216
|
-
scrollbarWidth:
|
|
242
|
+
scrollbarWidth: r,
|
|
217
243
|
other: i.style
|
|
218
244
|
});
|
|
219
245
|
}, [
|
|
220
246
|
i.style,
|
|
221
247
|
k,
|
|
222
|
-
|
|
248
|
+
L,
|
|
223
249
|
c,
|
|
224
|
-
|
|
250
|
+
re,
|
|
225
251
|
w == null ? void 0 : w.zebra,
|
|
226
252
|
G
|
|
227
|
-
]), ct =
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
253
|
+
]), ct = je(
|
|
254
|
+
(e, t, r) => {
|
|
255
|
+
const n = t % 2 === 0 ? "oddRow" : "evenRow";
|
|
256
|
+
if (i.rowClassName) {
|
|
257
|
+
const s = i.rowClassName(e, t, r);
|
|
258
|
+
return Z(n, s);
|
|
259
|
+
}
|
|
260
|
+
return n;
|
|
261
|
+
},
|
|
262
|
+
[i.rowClassName]
|
|
263
|
+
), we = /* @__PURE__ */ o.jsx(
|
|
264
|
+
ft,
|
|
265
|
+
{
|
|
266
|
+
finished: Ve,
|
|
267
|
+
onLoad: async () => (
|
|
268
|
+
// @ts-ignore
|
|
269
|
+
!a && (R == null ? void 0 : R((m == null ? void 0 : m.page) + 1, m == null ? void 0 : m.size))
|
|
270
|
+
),
|
|
271
|
+
loadingText: "加载中...",
|
|
272
|
+
finishedText: "没有更多了",
|
|
273
|
+
errorText: "加载失败",
|
|
274
|
+
children: /* @__PURE__ */ o.jsxs(
|
|
275
|
+
"div",
|
|
276
|
+
{
|
|
277
|
+
className: "mobileList",
|
|
278
|
+
style: { backgroundColor: c == null ? void 0 : c.mobileListBgColor },
|
|
279
|
+
children: [
|
|
280
|
+
f == null ? void 0 : f.map((e, t) => /* @__PURE__ */ o.jsx(
|
|
281
|
+
"div",
|
|
282
|
+
{
|
|
283
|
+
className: "listItem",
|
|
284
|
+
style: { backgroundColor: c == null ? void 0 : c.listItemBgColor },
|
|
285
|
+
onClick: () => _e(e, t),
|
|
286
|
+
children: v == null ? void 0 : v.map((r, n) => {
|
|
287
|
+
var s;
|
|
288
|
+
return !(r != null && r.mobileHide) && /* @__PURE__ */ o.jsxs(
|
|
289
|
+
"div",
|
|
290
|
+
{
|
|
291
|
+
className: "row",
|
|
292
|
+
style: { color: x.colorText },
|
|
293
|
+
children: [
|
|
294
|
+
!r.mobileHideLabel && /* @__PURE__ */ o.jsxs("div", { className: "label", children: [
|
|
295
|
+
`${r.title}`,
|
|
296
|
+
":"
|
|
297
|
+
] }),
|
|
298
|
+
/* @__PURE__ */ o.jsx("div", { className: "value", children: ((s = r == null ? void 0 : r.render) == null ? void 0 : s.call(
|
|
299
|
+
r,
|
|
300
|
+
St(e, (r == null ? void 0 : r.dataIndex) || ""),
|
|
301
|
+
e,
|
|
302
|
+
t
|
|
303
|
+
)) || (e == null ? void 0 : e[r.dataIndex]) })
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
n
|
|
307
|
+
);
|
|
308
|
+
})
|
|
309
|
+
},
|
|
310
|
+
t
|
|
311
|
+
)),
|
|
312
|
+
Array.from({ length: H.mobile ?? 2 }).map((e, t) => /* @__PURE__ */ o.jsx(
|
|
313
|
+
"div",
|
|
314
|
+
{
|
|
315
|
+
className: "listItem",
|
|
316
|
+
style: {
|
|
317
|
+
display: a ? "block" : "none",
|
|
318
|
+
backgroundColor: c == null ? void 0 : c.listItemBgColor
|
|
319
|
+
},
|
|
320
|
+
children: /* @__PURE__ */ o.jsx("div", { className: "row", children: oe ? oe() : /* @__PURE__ */ o.jsx(
|
|
321
|
+
at,
|
|
322
|
+
{
|
|
323
|
+
title: !1,
|
|
324
|
+
paragraph: {
|
|
325
|
+
rows: pe,
|
|
326
|
+
width: Te
|
|
327
|
+
},
|
|
328
|
+
active: !0
|
|
329
|
+
}
|
|
330
|
+
) })
|
|
331
|
+
},
|
|
332
|
+
`${Date.now()}${t}`
|
|
333
|
+
))
|
|
334
|
+
]
|
|
335
|
+
}
|
|
336
|
+
)
|
|
232
337
|
}
|
|
233
|
-
|
|
234
|
-
}, [i.rowClassName]), we = r.jsx(ft, { finished: Fe, onLoad: async () => (
|
|
235
|
-
// @ts-ignore
|
|
236
|
-
!a && (S == null ? void 0 : S((m == null ? void 0 : m.page) + 1, m == null ? void 0 : m.size))
|
|
237
|
-
), loadingText: "加载中...", finishedText: "没有更多了", errorText: "加载失败", children: r.jsxs("div", { className: "mobileList", style: { backgroundColor: c == null ? void 0 : c.mobileListBgColor }, children: [f == null ? void 0 : f.map((e, t) => r.jsx("div", { className: "listItem", style: { backgroundColor: c == null ? void 0 : c.listItemBgColor }, onClick: () => Ie(e, t), children: j == null ? void 0 : j.map((o, n) => {
|
|
238
|
-
var s;
|
|
239
|
-
return !(o != null && o.mobileHide) && r.jsxs("div", { className: "row", style: { color: x.colorText }, children: [!o.mobileHideLabel && r.jsxs("div", { className: "label", children: [`${o.title}`, ":"] }), r.jsx("div", { className: "value", children: ((s = o == null ? void 0 : o.render) == null ? void 0 : s.call(o, Lt(e, (o == null ? void 0 : o.dataIndex) || ""), e, t)) || (e == null ? void 0 : e[o.dataIndex]) })] }, n);
|
|
240
|
-
}) }, t)), Array.from({ length: P.mobile ?? 2 }).map((e, t) => r.jsx("div", { className: "listItem", style: {
|
|
241
|
-
display: a ? "block" : "none",
|
|
242
|
-
backgroundColor: c == null ? void 0 : c.listItemBgColor
|
|
243
|
-
}, children: r.jsx("div", { className: "row", children: re ? re() : r.jsx(at, { title: !1, paragraph: {
|
|
244
|
-
rows: Te,
|
|
245
|
-
width: ve
|
|
246
|
-
}, active: !0 }) }) }, `${Date.now()}${t}`))] }) }), it = l(() => {
|
|
338
|
+
), it = l(() => {
|
|
247
339
|
if (K)
|
|
248
340
|
return K;
|
|
249
|
-
if (!(
|
|
341
|
+
if (!(S ?? ce ?? !0))
|
|
250
342
|
return {
|
|
251
343
|
body: {
|
|
252
|
-
cell: ({ onMouseEnter: t, onMouseLeave:
|
|
344
|
+
cell: ({ onMouseEnter: t, onMouseLeave: r, ...n }) => /* @__PURE__ */ o.jsx("td", { ...n })
|
|
253
345
|
}
|
|
254
346
|
};
|
|
255
|
-
}, [K,
|
|
256
|
-
return
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
347
|
+
}, [K, S, ce]);
|
|
348
|
+
return /* @__PURE__ */ o.jsxs(
|
|
349
|
+
"div",
|
|
350
|
+
{
|
|
351
|
+
className: Z("bitzTableBlock", { fullscreen: k }),
|
|
352
|
+
style: st,
|
|
353
|
+
children: [
|
|
354
|
+
!Y && /* @__PURE__ */ o.jsxs("div", { ref: g, className: nt, style: lt, children: [
|
|
355
|
+
/* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref: de, children: [
|
|
356
|
+
Re && /* @__PURE__ */ o.jsxs("div", { className: "bitzTableToolbarBlock", children: [
|
|
357
|
+
De || /* @__PURE__ */ o.jsx("div", {}),
|
|
358
|
+
Pe,
|
|
359
|
+
Ee
|
|
360
|
+
] }),
|
|
361
|
+
/* @__PURE__ */ o.jsx(
|
|
362
|
+
te,
|
|
363
|
+
{
|
|
364
|
+
...i,
|
|
365
|
+
bordered: rt,
|
|
366
|
+
columns: Ue,
|
|
367
|
+
dataSource: Xe,
|
|
368
|
+
loading: !1,
|
|
369
|
+
pagination: !1,
|
|
370
|
+
scroll: me,
|
|
371
|
+
expandable: Ze,
|
|
372
|
+
rowSelection: et,
|
|
373
|
+
onRow: ot,
|
|
374
|
+
rowClassName: ct,
|
|
375
|
+
className: "bitzTable",
|
|
376
|
+
components: it,
|
|
377
|
+
rowKey: tt
|
|
378
|
+
}
|
|
379
|
+
)
|
|
380
|
+
] }),
|
|
381
|
+
ke && /* @__PURE__ */ o.jsx(
|
|
382
|
+
ut,
|
|
383
|
+
{
|
|
384
|
+
size: "small",
|
|
385
|
+
elRefInstance: ue,
|
|
386
|
+
enableControl: Se,
|
|
387
|
+
pagination: m,
|
|
388
|
+
total: E,
|
|
389
|
+
dataSource: d,
|
|
390
|
+
resetPage: He,
|
|
391
|
+
paginationEmit: R
|
|
392
|
+
}
|
|
393
|
+
)
|
|
394
|
+
] }),
|
|
395
|
+
Y && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
396
|
+
(a || (d == null ? void 0 : d.length) > 0) && /* @__PURE__ */ o.jsx(o.Fragment, { children: ne ? (
|
|
397
|
+
// @ts-ignore
|
|
398
|
+
/* @__PURE__ */ o.jsx(
|
|
399
|
+
mt,
|
|
400
|
+
{
|
|
401
|
+
onRefresh: async () => !a && ne(),
|
|
402
|
+
children: we
|
|
403
|
+
}
|
|
404
|
+
)
|
|
405
|
+
) : we }),
|
|
406
|
+
!a && /* @__PURE__ */ o.jsx(ht, { data: d, title: Me, img: We }),
|
|
407
|
+
/* @__PURE__ */ o.jsx(
|
|
408
|
+
dt,
|
|
409
|
+
{
|
|
410
|
+
className: "tableMobileDrawer",
|
|
411
|
+
open: Ke,
|
|
412
|
+
placement: "bottom",
|
|
413
|
+
height: "auto",
|
|
414
|
+
closable: !1,
|
|
415
|
+
onClose: ae,
|
|
416
|
+
children: /* @__PURE__ */ o.jsxs("div", { className: "drawerBox", children: [
|
|
417
|
+
/* @__PURE__ */ o.jsx("div", { className: "boxBody", children: Oe.map((e, t) => /* @__PURE__ */ o.jsx(
|
|
418
|
+
"div",
|
|
419
|
+
{
|
|
420
|
+
className: "operaList",
|
|
421
|
+
onClick: () => qe(e),
|
|
422
|
+
...e.danger && {
|
|
423
|
+
style: { color: x.colorError }
|
|
424
|
+
},
|
|
425
|
+
children: e.label
|
|
426
|
+
},
|
|
427
|
+
t
|
|
428
|
+
)) }),
|
|
429
|
+
/* @__PURE__ */ o.jsx("div", { className: "boxLine" }),
|
|
430
|
+
/* @__PURE__ */ o.jsx("div", { className: "boxFooter", onClick: ae, children: Le })
|
|
431
|
+
] })
|
|
432
|
+
}
|
|
433
|
+
)
|
|
434
|
+
] })
|
|
435
|
+
]
|
|
436
|
+
}
|
|
437
|
+
);
|
|
278
438
|
}
|
|
279
|
-
const
|
|
439
|
+
const lr = (S) => /* @__PURE__ */ o.jsx(bt, { initValue: S, children: /* @__PURE__ */ o.jsx(Lt, { ...S }) });
|
|
280
440
|
export {
|
|
281
|
-
|
|
441
|
+
lr as default
|
|
282
442
|
};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
const j = ({
|
|
1
|
+
const j = ({
|
|
2
|
+
height: v,
|
|
3
|
+
evenRowBgColor: w,
|
|
4
|
+
colorBgContainer: e,
|
|
5
|
+
table: o,
|
|
6
|
+
gap: I,
|
|
7
|
+
borderColor: R,
|
|
8
|
+
scrollbarWidth: u,
|
|
9
|
+
other: V
|
|
10
|
+
}) => {
|
|
2
11
|
var h, i, g, x, r, n, T, p, s, d, $, H, m, S, C, k, f, z, B, c;
|
|
3
12
|
return {
|
|
4
13
|
height: v,
|
|
@@ -6,10 +6,17 @@ function a(o, r) {
|
|
|
6
6
|
return e != null && e.isOperationCol || e != null && e.isCheckboxCol || e != null && e.isExpandIconCol || r.includes(e) ? e : (n != null && n.children && (n.children = a(n == null ? void 0 : n.children, r)), {
|
|
7
7
|
...n,
|
|
8
8
|
sorter: !1,
|
|
9
|
-
render: (d, i, t) => f.jsx(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
render: (d, i, t) => /* @__PURE__ */ f.jsx(
|
|
10
|
+
x,
|
|
11
|
+
{
|
|
12
|
+
active: !0,
|
|
13
|
+
title: !1,
|
|
14
|
+
paragraph: {
|
|
15
|
+
rows: 1,
|
|
16
|
+
width: (t + 1) % 2 === 0 ? "100%" : "60%"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
)
|
|
13
20
|
});
|
|
14
21
|
});
|
|
15
22
|
}
|