bitz-react-admin-ui 2.7.10 → 2.8.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 +4 -25
- package/dist/assets/iconfont/IconClose.mjs +3 -24
- package/dist/assets/iconfont/IconColumnCancelFixed.mjs +2 -23
- package/dist/assets/iconfont/IconColumnFixedLeft.mjs +6 -27
- package/dist/assets/iconfont/IconColumnFixedRight.mjs +6 -27
- package/dist/assets/iconfont/IconCuowu.mjs +2 -23
- package/dist/assets/iconfont/IconDragOrder.mjs +4 -25
- package/dist/assets/iconfont/IconDuigoux.mjs +4 -25
- package/dist/assets/iconfont/IconFabu.mjs +5 -35
- package/dist/assets/iconfont/IconFanhui.mjs +4 -25
- package/dist/assets/iconfont/IconGaojisousuo.mjs +5 -26
- package/dist/assets/iconfont/IconHangfengexian.mjs +3 -41
- package/dist/assets/iconfont/IconHangliefengexian.mjs +4 -42
- package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +5 -26
- package/dist/assets/iconfont/IconIcon21.mjs +4 -25
- package/dist/assets/iconfont/IconJincoude.mjs +4 -25
- package/dist/assets/iconfont/IconJinggao.mjs +4 -25
- package/dist/assets/iconfont/IconKuansongde.mjs +5 -26
- package/dist/assets/iconfont/IconLiefengexian.mjs +3 -41
- package/dist/assets/iconfont/IconMore.mjs +4 -41
- package/dist/assets/iconfont/IconShanchu.mjs +6 -27
- package/dist/assets/iconfont/IconShanchu1.mjs +5 -35
- package/dist/assets/iconfont/IconSousuo.mjs +6 -27
- package/dist/assets/iconfont/IconTejincou.mjs +4 -25
- package/dist/assets/iconfont/IconTekuansong.mjs +5 -26
- package/dist/assets/iconfont/IconTishi1.mjs +6 -27
- package/dist/assets/iconfont/IconTuodong.mjs +7 -28
- package/dist/assets/iconfont/IconWubanmawentianchong.mjs +3 -35
- package/dist/assets/iconfont/IconWufengexian.mjs +4 -26
- package/dist/assets/iconfont/IconXinxitishi.mjs +6 -27
- package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +3 -34
- package/dist/assets/iconfont/IconZhongdengde.mjs +3 -24
- package/dist/assets/iconfont/IconZhongzhi.mjs +3 -24
- package/dist/assets/iconfont/index.mjs +33 -33
- package/dist/components/BitzAddTag/index.mjs +8 -41
- package/dist/components/BitzAddressBook/index.mjs +35 -122
- package/dist/components/BitzAppPage/index.mjs +4 -18
- package/dist/components/BitzAppRefresh/index.mjs +15 -27
- package/dist/components/BitzBetterScroll/index.mjs +5 -5
- package/dist/components/BitzButton/index.mjs +9 -23
- package/dist/components/BitzCalendar/index.mjs +19 -52
- package/dist/components/BitzCascader/BitzCascaderMobile.mjs +30 -68
- package/dist/components/BitzCascader/index.mjs +2 -6
- package/dist/components/BitzCollapse/index.mjs +4 -4
- package/dist/components/BitzConfigProvider/context.mjs +1 -3
- package/dist/components/BitzConfigProvider/index.mjs +8 -12
- package/dist/components/BitzConfirmModal/index.mjs +1 -24
- package/dist/components/BitzDescriptions/index.mjs +1 -11
- package/dist/components/BitzDrawer/index.mjs +2 -17
- package/dist/components/BitzEmpty/index.mjs +2 -6
- package/dist/components/BitzException/index.mjs +1 -6
- package/dist/components/BitzFloatLayout/index.mjs +1 -10
- package/dist/components/BitzFluentDatePicker/index.mjs +1 -1
- package/dist/components/BitzFluentRangePicker/index.mjs +1 -1
- package/dist/components/BitzFluentRangeTimePicker/index.mjs +1 -1
- package/dist/components/BitzFluentTimePicker/index.mjs +6 -6
- package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +16 -13
- package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +20 -26
- package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +3 -21
- package/dist/components/BitzFuiCalendar/CalendarBody.mjs +4 -27
- package/dist/components/BitzFuiCalendar/CalendarHead.mjs +2 -5
- package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +3 -12
- package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +15 -47
- package/dist/components/BitzFuiCalendar/ColumnData.mjs +9 -25
- package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +8 -44
- package/dist/components/BitzFuiCalendar/index.mjs +1 -7
- package/dist/components/BitzFullScreen/index.mjs +6 -9
- package/dist/components/BitzHighlight/Child.mjs +9 -23
- package/dist/components/BitzHighlight/Highlight.mjs +5 -26
- package/dist/components/BitzHighlight/chunks.mjs +17 -20
- package/dist/components/BitzHighlight/style.mjs +1 -4
- package/dist/components/BitzImage/index.mjs +1 -1
- package/dist/components/BitzImage/previewImage.mjs +5 -12
- package/dist/components/BitzLanguageTabs/index.mjs +3 -14
- package/dist/components/BitzLazyLoad/index.mjs +1 -7
- package/dist/components/BitzList/List.mjs +3 -17
- package/dist/components/BitzList/LoadMore.mjs +20 -29
- package/dist/components/BitzLoadMore/index.mjs +14 -34
- package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +11 -24
- package/dist/components/BitzMeetingTime/index.mjs +6 -10
- package/dist/components/BitzMobileLoading/index.mjs +1 -1
- package/dist/components/BitzModal/index.mjs +11 -24
- package/dist/components/BitzNoData/index.mjs +1 -4
- package/dist/components/BitzNoMore/index.mjs +1 -1
- package/dist/components/BitzOrganizationSelection/index.mjs +14 -43
- package/dist/components/BitzPageContainer/index.mjs +46 -107
- package/dist/components/BitzPageHeader/index.mjs +21 -89
- package/dist/components/BitzPagination/index.mjs +22 -71
- package/dist/components/BitzPopover/index.mjs +4 -4
- package/dist/components/BitzPullRefresh/PullRefresh.mjs +18 -47
- package/dist/components/BitzQRCode/index.mjs +1 -6
- package/dist/components/BitzQueryFilter/QueryFilterContent.mjs +17 -35
- package/dist/components/BitzQueryFilter/QueryFilterDrawer.mjs +13 -20
- package/dist/components/BitzQueryFilter/QueryFilterMobile.mjs +1 -4
- package/dist/components/BitzQueryFilter/index.mjs +20 -69
- package/dist/components/BitzRefresh/index.mjs +1 -5
- package/dist/components/BitzRemark/index.mjs +4 -4
- package/dist/components/BitzScheduleCenter/index.mjs +30 -24
- package/dist/components/BitzSearch/index.mjs +1 -1
- package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +48 -123
- package/dist/components/BitzSelect/index.mjs +1 -1
- package/dist/components/BitzSkeleton/index.mjs +1 -31
- package/dist/components/BitzSwitch/index.mjs +2 -7
- package/dist/components/BitzTabbar/BitzTabbar.mjs +8 -25
- package/dist/components/BitzTabbar/BitzTabbarItem.mjs +1 -4
- package/dist/components/BitzTable/ActionBar/ActionBar.mjs +12 -80
- package/dist/components/BitzTable/ActionBar/Button.mjs +15 -20
- package/dist/components/BitzTable/ActionBar/style.mjs +9 -12
- package/dist/components/BitzTable/ActionCol/index.mjs +44 -182
- package/dist/components/BitzTable/ActionCol/style.mjs +12 -15
- package/dist/components/BitzTable/Dropdown/index.mjs +1 -8
- package/dist/components/BitzTable/Dropdown/style.mjs +6 -9
- package/dist/components/BitzTable/SelectionBar/Button.mjs +6 -19
- package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +4 -11
- package/dist/components/BitzTable/SelectionBar/style.mjs +8 -18
- package/dist/components/BitzTable/Store/index.mjs +62 -103
- package/dist/components/BitzTable/Store/utils/index.mjs +5 -5
- package/dist/components/BitzTable/SubTable/index.mjs +73 -122
- package/dist/components/BitzTable/Table/ResizableTitle copy.mjs +21 -43
- package/dist/components/BitzTable/Table/SortTableContext.mjs +17 -39
- package/dist/components/BitzTable/Table/SortableRow.mjs +20 -44
- package/dist/components/BitzTable/Table/TdCell.d.ts +1 -0
- package/dist/components/BitzTable/Table/TdCell.mjs +9 -0
- package/dist/components/BitzTable/Table/index.d.ts +6 -0
- package/dist/components/BitzTable/Table/index.mjs +331 -577
- package/dist/components/BitzTable/Table/style.mjs +1 -10
- package/dist/components/BitzTable/Table/utils.mjs +4 -11
- package/dist/components/BitzTable/TextOverflow/index.mjs +3 -12
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +31 -105
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +23 -104
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +29 -68
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +159 -346
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +16 -50
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +16 -42
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +38 -135
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +2 -9
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/ScopeSwitch.mjs +5 -18
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +49 -121
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +18 -62
- package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +16 -59
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +14 -42
- package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +5 -20
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +14 -46
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +9 -20
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +2 -49
- package/dist/components/BitzTable/ToolBar/style.mjs +1 -6
- package/dist/components/BitzTableOperations/index.mjs +3 -13
- package/dist/components/BitzTableSelect/Picker/index.mjs +10 -43
- package/dist/components/BitzTableSelect/Select/index.mjs +21 -90
- package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +13 -23
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +69 -219
- package/dist/components/BitzTableSelect/SingleSelect/index.mjs +22 -87
- package/dist/components/BitzTableSelect/TableCell/index.mjs +11 -52
- package/dist/components/BitzTableSelect/TextBlock/index.mjs +12 -30
- package/dist/components/BitzTableSelect/index.mjs +14 -65
- package/dist/components/BitzTableSelect/utils.mjs +3 -3
- package/dist/components/BitzTag/index.mjs +1 -1
- package/dist/components/BitzText/index.mjs +14 -41
- package/dist/components/BitzText/utils.mjs +3 -3
- package/dist/components/BitzTheme/index.mjs +6 -6
- package/dist/components/BitzTimeline/index.mjs +1 -11
- package/dist/components/BitzTimer/Form.mjs +11 -32
- package/dist/components/BitzTimer/Timer.mjs +38 -76
- package/dist/components/BitzTimer/index.mjs +43 -66
- package/dist/components/BitzToast/Toast/index.mjs +10 -28
- package/dist/components/BitzToast/index.mjs +1 -1
- package/dist/components/BitzTooltip/index.mjs +20 -59
- package/dist/components/BitzTooltip/style.mjs +6 -9
- package/dist/components/BitzTooltip/utils.mjs +2 -2
- package/dist/components/BitzTree/index.mjs +1 -4
- package/dist/components/BitzUeEditor/index.mjs +5 -5
- package/dist/components/BitzUpload/index.mjs +43 -81
- package/dist/components/BitzWebAppDrawer/index.mjs +4 -35
- package/dist/components/BitzWebAppModal/index.mjs +3 -6
- package/dist/hooks/use-event-listener.mjs +2 -11
- package/dist/hooks/use-lock-fn.mjs +10 -13
- package/dist/hooks/use-scroll-parent.mjs +14 -16
- package/dist/hooks/useEvent.mjs +4 -7
- package/dist/hooks/useMergedState.mjs +11 -11
- package/dist/node_modules/react-intersection-observer/dist/index.mjs +123 -0
- package/dist/style.css +1 -1
- package/dist/utils/WithFluent.mjs +3 -9
- package/dist/utils/create.mjs +1 -7
- package/package.json +2 -1
|
@@ -1,346 +1,312 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { j as r } from "../../../node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { useRef as p, useContext as Ee, useState as _, useEffect as ye, useMemo as a, useLayoutEffect as Ge, useCallback as ce } from "react";
|
|
3
3
|
import { isMobile as j } from "../../../node_modules/react-device-detect/dist/lib.mjs";
|
|
4
|
-
import { Typography as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
4
|
+
import { Typography as Ce, Skeleton as Ot, Alert as Vt, Table as _t, Spin as It } from "antd";
|
|
5
|
+
import ie from "../../../node_modules/classnames/index.mjs";
|
|
6
|
+
import Et from "../../BitzDrawer/index.mjs";
|
|
7
|
+
import Gt from "../../BitzPagination/index.mjs";
|
|
8
|
+
import Yt from "../../BitzNoData/index.mjs";
|
|
9
9
|
import "../../BitzList/index.less.mjs";
|
|
10
|
-
import
|
|
10
|
+
import Jt from "../../BitzList/List.mjs";
|
|
11
11
|
import "../../BitzPullRefresh/style/index.less.mjs";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { loopFilter as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import ss from "../../../node_modules/antd/es/table/ExpandIcon.mjs";
|
|
12
|
+
import Qt from "../../BitzPullRefresh/PullRefresh.mjs";
|
|
13
|
+
import Ut, { BitzTableContext as Xt, toolCols as Zt } from "../Store/index.mjs";
|
|
14
|
+
import { loopFilter as vt, columnSort as At, genColumnKey as we } from "../Store/utils/index.mjs";
|
|
15
|
+
import Ft from "../../BitzTheme/index.mjs";
|
|
16
|
+
import { tablePaddingInline as en } from "../../BitzConfigProvider/context.mjs";
|
|
17
|
+
import Ye from "../../BitzHighlight/index.mjs";
|
|
18
|
+
import tn from "../../../node_modules/antd/es/table/ExpandIcon.mjs";
|
|
20
19
|
import "../../../node_modules/antd/es/config-provider/index.mjs";
|
|
21
|
-
import
|
|
22
|
-
import { getColumnsWithTool as
|
|
23
|
-
import { getCssVar as
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
20
|
+
import nn from "../../../node_modules/antd/locale/en_US.mjs";
|
|
21
|
+
import { getColumnsWithTool as sn, loopBuildSkeleton as rn, resetScroll as Je } from "./utils.mjs";
|
|
22
|
+
import { getCssVar as on } from "./style.mjs";
|
|
23
|
+
import ln from "./SortableRow.mjs";
|
|
24
|
+
import cn from "./SortTableContext.mjs";
|
|
25
|
+
import an from "./ResizableTitle copy.mjs";
|
|
26
|
+
import un from "../TextOverflow/index.mjs";
|
|
28
27
|
import "./index.less.mjs";
|
|
29
|
-
import { querySelectorAll as
|
|
30
|
-
import {
|
|
31
|
-
import
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
import { querySelectorAll as dn, querySelector as fn } from "../../../utils/select-query.mjs";
|
|
29
|
+
import { TdCell as hn } from "./TdCell.mjs";
|
|
30
|
+
import { ConfigContext as mn } from "../../../node_modules/antd/es/config-provider/context.mjs";
|
|
31
|
+
import bn from "../../../node_modules/lodash-es/at.mjs";
|
|
32
|
+
function yn({
|
|
33
|
+
showPagination: J = !0,
|
|
34
|
+
height: H,
|
|
35
|
+
minHeight: Z,
|
|
36
36
|
dataSource: g,
|
|
37
|
-
total:
|
|
38
|
-
columns:
|
|
39
|
-
loading:
|
|
40
|
-
loadingType:
|
|
41
|
-
dataProps:
|
|
42
|
-
skeletonNum:
|
|
37
|
+
total: L = 0,
|
|
38
|
+
columns: ae,
|
|
39
|
+
loading: u,
|
|
40
|
+
loadingType: Qe,
|
|
41
|
+
dataProps: Ue = {},
|
|
42
|
+
skeletonNum: v = {
|
|
43
43
|
pc: 10,
|
|
44
44
|
mobile: 10
|
|
45
45
|
},
|
|
46
|
-
skeletonRender:
|
|
47
|
-
skeletonRowNum:
|
|
48
|
-
skeletonRowsWidth:
|
|
46
|
+
skeletonRender: ue,
|
|
47
|
+
skeletonRowNum: Xe = 4,
|
|
48
|
+
skeletonRowsWidth: Ze = ["35%", "100%", "100%", "60%"],
|
|
49
49
|
// mobileLoadEmit,
|
|
50
|
-
mobileRefreshEmit:
|
|
50
|
+
mobileRefreshEmit: xe,
|
|
51
51
|
operationFilter: d,
|
|
52
|
-
enableControlPage:
|
|
53
|
-
pagination:
|
|
54
|
-
paginationEmit:
|
|
52
|
+
enableControlPage: ve,
|
|
53
|
+
pagination: z,
|
|
54
|
+
paginationEmit: I = () => {
|
|
55
55
|
},
|
|
56
|
-
onChange:
|
|
57
|
-
enabledRowDragSort:
|
|
58
|
-
onRowDragEnd:
|
|
59
|
-
resizableColumns:
|
|
60
|
-
mobilePageHeight
|
|
61
|
-
mobileCancelText:
|
|
62
|
-
noDataTitle:
|
|
63
|
-
noDataImg:
|
|
64
|
-
color
|
|
65
|
-
size:
|
|
66
|
-
showTableTool:
|
|
67
|
-
tableAction:
|
|
68
|
-
tableToolbar:
|
|
69
|
-
selectionBar:
|
|
70
|
-
scroll:
|
|
71
|
-
components:
|
|
56
|
+
onChange: de,
|
|
57
|
+
enabledRowDragSort: E,
|
|
58
|
+
onRowDragEnd: fe,
|
|
59
|
+
resizableColumns: A,
|
|
60
|
+
// mobilePageHeight = 500,
|
|
61
|
+
mobileCancelText: Ae = "取消",
|
|
62
|
+
noDataTitle: Fe,
|
|
63
|
+
noDataImg: et,
|
|
64
|
+
// color,
|
|
65
|
+
size: ge,
|
|
66
|
+
showTableTool: tt = !0,
|
|
67
|
+
tableAction: nt,
|
|
68
|
+
tableToolbar: st,
|
|
69
|
+
selectionBar: rt,
|
|
70
|
+
scroll: f,
|
|
71
|
+
components: D,
|
|
72
72
|
expandable: B,
|
|
73
|
-
rowSelection:
|
|
74
|
-
selectionAlert:
|
|
75
|
-
resetPage:
|
|
76
|
-
|
|
73
|
+
rowSelection: O,
|
|
74
|
+
selectionAlert: b,
|
|
75
|
+
resetPage: ot,
|
|
76
|
+
inview: Te = !0,
|
|
77
|
+
...i
|
|
77
78
|
}) {
|
|
78
|
-
var
|
|
79
|
-
const { token: S } =
|
|
80
|
-
|
|
79
|
+
var _e;
|
|
80
|
+
const { token: S } = Ft.useToken(), je = p([]), { Table: h } = S, lt = h.tableSpaceBetweenPage ?? 10, ct = h.cellPaddingInline ?? en, F = h.minHeight ?? 500, { showColumnBorder: ee, hideRowBorder: ke, rowHoverable: it, ...c } = Ee(Xt), [at, te] = _(!1), [k, ut] = _([]);
|
|
81
|
+
ye(() => {
|
|
81
82
|
let e = [...g ?? []];
|
|
82
|
-
(
|
|
83
|
+
(z == null ? void 0 : z.page) !== 1 && (e = [...k, ...e]), ut(e);
|
|
83
84
|
}, [j ? g : 0]);
|
|
84
|
-
const
|
|
85
|
+
const Ne = a(() => !!(k != null && k.length) && (k == null ? void 0 : k.length) >= L, [k, L]), [ne, dt] = _([]), [ft, ze] = _(!1), ht = async (e, t) => {
|
|
85
86
|
var o, l, w;
|
|
86
|
-
let
|
|
87
|
+
let n, s = !1;
|
|
87
88
|
if (typeof d == "function")
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
);
|
|
91
|
-
else if (s = (l = d == null ? void 0 : d.custom) == null ? void 0 : l.call(d, e, t), d != null && d.request) {
|
|
92
|
-
Se(!0), re(!0), r = !0;
|
|
89
|
+
n = (o = d == null ? void 0 : d(e, t)) == null ? void 0 : o.filter((m) => m.type !== "divider");
|
|
90
|
+
else if (n = (l = d == null ? void 0 : d.custom) == null ? void 0 : l.call(d, e, t), d != null && d.request) {
|
|
91
|
+
ze(!0), te(!0), s = !0;
|
|
93
92
|
try {
|
|
94
|
-
const
|
|
95
|
-
(w = d.fieldsName) != null && w.label ?
|
|
96
|
-
var
|
|
93
|
+
const m = await (d == null ? void 0 : d.request(e, t));
|
|
94
|
+
(w = d.fieldsName) != null && w.label ? n = m == null ? void 0 : m.map((y) => {
|
|
95
|
+
var N;
|
|
97
96
|
return {
|
|
98
97
|
...y,
|
|
99
|
-
label: y == null ? void 0 : y[((
|
|
98
|
+
label: y == null ? void 0 : y[((N = d.fieldsName) == null ? void 0 : N.label) ?? "label"]
|
|
100
99
|
};
|
|
101
|
-
}) :
|
|
100
|
+
}) : n = m ?? [];
|
|
102
101
|
} finally {
|
|
103
|
-
|
|
102
|
+
ze(!1);
|
|
104
103
|
}
|
|
105
104
|
}
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
var
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
var
|
|
118
|
-
const e =
|
|
119
|
-
|
|
120
|
-
(s = P.current) == null ? void 0 : s.querySelectorAll
|
|
121
|
-
), t = [];
|
|
122
|
-
if (e == null || e.forEach((r) => {
|
|
105
|
+
n != null && n.length && (dt(n), s || te(!0));
|
|
106
|
+
}, We = () => {
|
|
107
|
+
te(!1);
|
|
108
|
+
}, mt = (e, t) => {
|
|
109
|
+
var n, s;
|
|
110
|
+
te(!1), (n = e.onClick) == null || n.call(e), !(e != null && e.onClick) && typeof d != "function" && (d != null && d.onClick) && d.onClick((s = ne == null ? void 0 : ne[t]) == null ? void 0 : s.key);
|
|
111
|
+
}, he = p(null), Be = p(null), P = p(null), $ = p(null), Se = p(null), bt = (...e) => {
|
|
112
|
+
Je(he), de == null || de(...e);
|
|
113
|
+
}, yt = (...e) => {
|
|
114
|
+
Je(he), I == null || I(...e);
|
|
115
|
+
}, G = a(() => !(f != null && f.auto) && A, [f == null ? void 0 : f.auto, A]), Ct = () => {
|
|
116
|
+
var n;
|
|
117
|
+
const e = dn("& > .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)", (n = P.current) == null ? void 0 : n.querySelectorAll), t = [];
|
|
118
|
+
if (e == null || e.forEach((s) => {
|
|
123
119
|
var o;
|
|
124
|
-
t.push(
|
|
125
|
-
((o = fs("& > .operationCol .actionGroup", r.querySelector)) == null ? void 0 : o.clientWidth) || 0
|
|
126
|
-
);
|
|
120
|
+
t.push(((o = fn("& > .operationCol .actionGroup", s.querySelector)) == null ? void 0 : o.clientWidth) || 0);
|
|
127
121
|
}), t.length)
|
|
128
122
|
return Math.ceil(Math.max(...t));
|
|
129
|
-
},
|
|
130
|
-
var o, l, w,
|
|
131
|
-
let e = (o = P.current) == null ? void 0 : o.querySelector(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
e
|
|
135
|
-
|
|
136
|
-
));
|
|
137
|
-
|
|
138
|
-
return e && (t = e.clientWidth - (se ? 1 : 0), s = e.offsetWidth - e.clientWidth > 0, r = (h = (w = P.current) == null ? void 0 : w.querySelector(
|
|
139
|
-
".ant-table-cell-scrollbar"
|
|
140
|
-
)) == null ? void 0 : h.offsetWidth), { hasScrollBar: s, scrollbarSize: r, tbodyWidth: t };
|
|
141
|
-
}, Pe = a(() => {
|
|
142
|
-
const e = (g ?? []).length, t = e > (F.pc ?? 10) ? e >= 15 ? 15 : e : F.pc ?? 10;
|
|
143
|
-
return Array.from({ length: t }).map((r, o) => ({
|
|
123
|
+
}, wt = () => {
|
|
124
|
+
var o, l, w, m;
|
|
125
|
+
let e = (o = P.current) == null ? void 0 : o.querySelector(".ant-table-content");
|
|
126
|
+
e || (e = (l = P.current) == null ? void 0 : l.querySelector(".ant-table-body"));
|
|
127
|
+
let t = 0, n = !1, s = 0;
|
|
128
|
+
return e && (t = e.clientWidth - (ee ? 1 : 0), n = e.offsetWidth - e.clientWidth > 0, s = (m = (w = P.current) == null ? void 0 : w.querySelector(".ant-table-cell-scrollbar")) == null ? void 0 : m.offsetWidth), { hasScrollBar: n, scrollbarSize: s, tbodyWidth: t };
|
|
129
|
+
}, Me = a(() => {
|
|
130
|
+
const e = (g ?? []).length, t = e > (v.pc ?? 10) ? e >= 15 ? 15 : e : v.pc ?? 10;
|
|
131
|
+
return Array.from({ length: t }).map((s, o) => ({
|
|
144
132
|
key: `${Date.now()}${o}`
|
|
145
133
|
}));
|
|
146
|
-
}, [g]),
|
|
147
|
-
if (typeof
|
|
134
|
+
}, [g]), se = a(() => Qe === "normal" ? u ? je.current : (je.current = g, g) : u ? Me : g ?? [], [u, g, Me]), { hasScrollBar: M, scrollbarSize: W, tbodyWidth: Q } = a(() => wt(), [se, c.fullscreen]), me = a(() => {
|
|
135
|
+
if (typeof H > "u")
|
|
148
136
|
return;
|
|
149
137
|
let e = 40, t = 40;
|
|
150
138
|
if (P.current) {
|
|
151
|
-
const
|
|
152
|
-
e = parseInt(
|
|
139
|
+
const N = window.getComputedStyle(P.current);
|
|
140
|
+
e = parseInt(N.getPropertyValue("--cell-height")), t = parseInt(N.getPropertyValue("--toolbar-height"));
|
|
153
141
|
}
|
|
154
|
-
const
|
|
155
|
-
return (
|
|
142
|
+
const n = 0, s = 0, o = Z ?? F, l = H >= o ? H : o;
|
|
143
|
+
return (c.fullscreen ? window.innerHeight : l) - n - s - t - e;
|
|
156
144
|
}, [
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
]),
|
|
145
|
+
c.fullscreen,
|
|
146
|
+
H,
|
|
147
|
+
Z,
|
|
148
|
+
F,
|
|
149
|
+
// paginationRect?.height,
|
|
150
|
+
se,
|
|
151
|
+
// containerBodyRect?.height,
|
|
152
|
+
c.tableSize
|
|
153
|
+
]), xt = () => {
|
|
166
154
|
let e = 0;
|
|
167
155
|
if (P.current) {
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
);
|
|
171
|
-
e = parseInt(s.getPropertyValue("--fontSize")) + 4 + 2 * r;
|
|
156
|
+
const n = window.getComputedStyle(P.current), s = parseInt(n.getPropertyValue("--toolCell-paddingInline"));
|
|
157
|
+
e = parseInt(n.getPropertyValue("--fontSize")) + 4 + 2 * s;
|
|
172
158
|
}
|
|
173
159
|
let t = 0;
|
|
174
|
-
return
|
|
175
|
-
}, [T,
|
|
176
|
-
|
|
177
|
-
var
|
|
178
|
-
const e =
|
|
160
|
+
return O && (t += e), B && (t += e), E && (t += e), t;
|
|
161
|
+
}, [T, gt] = _([]), [U, Tt] = _(0);
|
|
162
|
+
Ge(() => {
|
|
163
|
+
var m;
|
|
164
|
+
const e = ae ?? [], t = (m = e.find((y) => y.isOperationCol)) == null ? void 0 : m.width, n = e.filter((y) => !Zt.includes(y)), o = vt(n, c.columnsMap).sort(At(c.columnsMap)), l = o.findIndex((y) => y.isOperationCol);
|
|
179
165
|
l >= 0 && (o[l].width = t);
|
|
180
166
|
let w = 0;
|
|
181
|
-
j || (w =
|
|
182
|
-
}, [
|
|
183
|
-
const [C,
|
|
184
|
-
|
|
185
|
-
if (
|
|
186
|
-
const e = T.map((t,
|
|
187
|
-
let
|
|
167
|
+
j || (w = xt()), gt(o), Tt(w);
|
|
168
|
+
}, [c.columnsMap, ae]);
|
|
169
|
+
const [C, jt] = _([]);
|
|
170
|
+
ye(() => {
|
|
171
|
+
if (G) {
|
|
172
|
+
const e = T.map((t, n) => {
|
|
173
|
+
let s = t.width;
|
|
188
174
|
if (t != null && t.isOperationCol && (t != null && t.useMaxWidth)) {
|
|
189
|
-
const l =
|
|
190
|
-
l && (
|
|
175
|
+
const l = Ct();
|
|
176
|
+
l && (s = l + ct * 2);
|
|
191
177
|
}
|
|
192
178
|
return {
|
|
193
|
-
key:
|
|
194
|
-
width:
|
|
179
|
+
key: we(t, n),
|
|
180
|
+
width: s ?? 0
|
|
195
181
|
};
|
|
196
182
|
});
|
|
197
|
-
|
|
183
|
+
jt(e);
|
|
198
184
|
}
|
|
199
|
-
}, [T,
|
|
200
|
-
const
|
|
185
|
+
}, [T, G]);
|
|
186
|
+
const Re = p(!1), Pe = p(!1), re = a(() => {
|
|
201
187
|
let e;
|
|
202
|
-
if (typeof
|
|
188
|
+
if (typeof me == "number" && (e = me - 1), typeof (f == null ? void 0 : f.y) == "number" && (e = f.y - 2), f != null && f.auto)
|
|
203
189
|
return {
|
|
204
190
|
x: void 0,
|
|
205
191
|
y: e
|
|
206
192
|
};
|
|
207
|
-
let t =
|
|
208
|
-
return
|
|
193
|
+
let t = f == null ? void 0 : f.x;
|
|
194
|
+
return A && C.length && (t = C.reduce((o, l) => o + l.width, 0) + U, Q && t < Q - (M ? W : 0) && (Re.current = !0, t = Q)), f != null && f.y ? { x: t, y: f.y } : { x: t, y: e };
|
|
209
195
|
}, [
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
196
|
+
f,
|
|
197
|
+
me,
|
|
198
|
+
A,
|
|
213
199
|
C,
|
|
214
|
-
|
|
215
|
-
|
|
200
|
+
U,
|
|
201
|
+
ee,
|
|
216
202
|
M,
|
|
217
203
|
W
|
|
218
204
|
]);
|
|
219
|
-
|
|
220
|
-
if (
|
|
221
|
-
const t = C.reduce((o, l) => o + l.width, 0) +
|
|
222
|
-
if (t <
|
|
223
|
-
const o = /* @__PURE__ */ new Map(), l = T.findIndex(
|
|
224
|
-
(x) => x == null ? void 0 : x.isOperationCol
|
|
225
|
-
);
|
|
205
|
+
ye(() => {
|
|
206
|
+
if (G && C.length) {
|
|
207
|
+
const t = C.reduce((o, l) => o + l.width, 0) + U, s = Q - (M ? W : 0);
|
|
208
|
+
if (t < s || Re.current && t > s && !Pe.current) {
|
|
209
|
+
const o = /* @__PURE__ */ new Map(), l = T.findIndex((x) => x == null ? void 0 : x.isOperationCol);
|
|
226
210
|
let w = "";
|
|
227
|
-
l >= 0 && (w =
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
o.forEach((ie, ce) => {
|
|
235
|
-
o.set(ce, ie + (w === ce ? 0 : x));
|
|
236
|
-
}), h = h - x * y;
|
|
211
|
+
l >= 0 && (w = we(T[l], l)), C.forEach((x) => o.set(x.key, x.width));
|
|
212
|
+
let m = s - t, y = T.length;
|
|
213
|
+
if (l >= 0 && y--, m >= y) {
|
|
214
|
+
const x = Math.floor(m / y);
|
|
215
|
+
o.forEach((oe, le) => {
|
|
216
|
+
o.set(le, oe + (w === le ? 0 : x));
|
|
217
|
+
}), m = m - x * y;
|
|
237
218
|
}
|
|
238
|
-
let
|
|
239
|
-
l === 0 && T.length > 1 &&
|
|
240
|
-
const
|
|
241
|
-
o.set(
|
|
242
|
-
const
|
|
243
|
-
for (const x in
|
|
244
|
-
|
|
245
|
-
|
|
219
|
+
let N = 0;
|
|
220
|
+
l === 0 && T.length > 1 && N++;
|
|
221
|
+
const V = we(T[N]);
|
|
222
|
+
o.set(V, o.get(V) + m);
|
|
223
|
+
const R = { ...c.columnsMap };
|
|
224
|
+
for (const x in R)
|
|
225
|
+
R[x].show && (R[x].width = o.get(x));
|
|
226
|
+
c.setColumnsMap(R);
|
|
246
227
|
}
|
|
247
228
|
}
|
|
248
229
|
}, [
|
|
249
|
-
|
|
230
|
+
G,
|
|
250
231
|
C,
|
|
251
|
-
|
|
252
|
-
|
|
232
|
+
U,
|
|
233
|
+
ee,
|
|
253
234
|
M,
|
|
254
235
|
W
|
|
255
236
|
]);
|
|
256
|
-
const
|
|
237
|
+
const kt = a(() => {
|
|
257
238
|
var e;
|
|
258
|
-
if (
|
|
259
|
-
const t = document.body.clientHeight,
|
|
260
|
-
|
|
261
|
-
) ? 50 : 0;
|
|
262
|
-
return { y: t - 80 - s };
|
|
239
|
+
if (c.fullscreen) {
|
|
240
|
+
const t = document.body.clientHeight, n = (e = document.fullscreenElement) != null && e.classList.contains("bz-fullscreen") ? 50 : 0;
|
|
241
|
+
return { y: t - 80 - n };
|
|
263
242
|
}
|
|
264
243
|
return {};
|
|
265
|
-
}, [
|
|
244
|
+
}, [c.fullscreen]), K = a(() => {
|
|
266
245
|
if (j)
|
|
267
246
|
return T;
|
|
268
|
-
const e = T.length - 1, t = T.map((
|
|
247
|
+
const e = T.length - 1, t = T.map((n, s) => {
|
|
269
248
|
var o;
|
|
270
249
|
return {
|
|
271
|
-
...
|
|
272
|
-
...typeof
|
|
273
|
-
title:
|
|
274
|
-
ge.Paragraph,
|
|
275
|
-
{
|
|
276
|
-
className: "bitzTableTitle",
|
|
277
|
-
ellipsis: { rows: 2 },
|
|
278
|
-
children: s.title
|
|
279
|
-
}
|
|
280
|
-
)
|
|
250
|
+
...n,
|
|
251
|
+
...typeof n.title == "string" && {
|
|
252
|
+
title: r.jsx(Ce.Paragraph, { className: "bitzTableTitle", ellipsis: { rows: 2 }, children: n.title })
|
|
281
253
|
},
|
|
282
|
-
...e ===
|
|
283
|
-
className:
|
|
254
|
+
...e === s && {
|
|
255
|
+
className: ie(n.className, "lastColumn")
|
|
284
256
|
},
|
|
285
|
-
width: C.length ? (o = C[
|
|
286
|
-
...
|
|
257
|
+
width: C.length ? (o = C[s]) == null ? void 0 : o.width : (n == null ? void 0 : n.width) || void 0,
|
|
258
|
+
...re.x !== void 0 ? {
|
|
287
259
|
onHeaderCell: (l) => {
|
|
288
260
|
var w;
|
|
289
261
|
return {
|
|
290
|
-
...(w =
|
|
262
|
+
...(w = n.onHeaderCell) == null ? void 0 : w.call(n),
|
|
291
263
|
width: l.width,
|
|
292
|
-
stretchref:
|
|
293
|
-
datagridref:
|
|
294
|
-
onResize:
|
|
264
|
+
stretchref: Be,
|
|
265
|
+
datagridref: $,
|
|
266
|
+
onResize: Nt(s)
|
|
295
267
|
};
|
|
296
268
|
}
|
|
297
269
|
} : {},
|
|
298
|
-
...!(
|
|
299
|
-
render: (l) => ["number", "bigint"].includes(typeof l) ? l :
|
|
270
|
+
...!(n != null && n.render) && n.copyable ? {
|
|
271
|
+
render: (l) => ["number", "bigint"].includes(typeof l) ? l : r.jsx(un, { value: l })
|
|
300
272
|
} : {}
|
|
301
273
|
};
|
|
302
274
|
});
|
|
303
|
-
return
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
G,
|
|
307
|
-
!!V,
|
|
308
|
-
!!B
|
|
309
|
-
);
|
|
310
|
-
}, [T, C]), Wt = (e) => (t, { size: s, minWidth: r }) => {
|
|
311
|
-
const l = (s.width > r ? s.width : r) - C[e].width;
|
|
275
|
+
return sn(ae, t, E, !!O, !!B);
|
|
276
|
+
}, [T, C]), Nt = (e) => (t, { size: n, minWidth: s }) => {
|
|
277
|
+
const l = (n.width > s ? n.width : s) - C[e].width;
|
|
312
278
|
if (l === 0)
|
|
313
279
|
return;
|
|
314
|
-
const
|
|
315
|
-
let
|
|
316
|
-
if (l < 0 &&
|
|
317
|
-
|
|
318
|
-
const
|
|
319
|
-
(e ===
|
|
320
|
-
let
|
|
321
|
-
|
|
280
|
+
const m = C.reduce((X, q) => X + q.width, 0) + l + U, N = Q - (M ? W : 0);
|
|
281
|
+
let V = "", R = -1, x = 0;
|
|
282
|
+
if (l < 0 && m < N) {
|
|
283
|
+
R = e + 1;
|
|
284
|
+
const X = T.length - 1, q = T[X];
|
|
285
|
+
(e === X - 1 && (q != null && q.isOperationCol) || e === X && !(q != null && q.isOperationCol)) && (R = e - 1);
|
|
286
|
+
let Ie = 0;
|
|
287
|
+
re.x > N && (Ie = re.x - N), V = `${C[R].key}`, x = C[R].width - l - Ie;
|
|
322
288
|
}
|
|
323
|
-
const
|
|
324
|
-
...
|
|
325
|
-
[
|
|
326
|
-
...
|
|
289
|
+
const oe = `${C[e].key}`, le = {
|
|
290
|
+
...c.columnsMap,
|
|
291
|
+
[oe]: {
|
|
292
|
+
...c.columnsMap[oe],
|
|
327
293
|
width: C[e].width + l
|
|
328
294
|
},
|
|
329
|
-
...
|
|
330
|
-
[
|
|
331
|
-
...
|
|
295
|
+
...V && R >= 0 && {
|
|
296
|
+
[V]: {
|
|
297
|
+
...c.columnsMap[V],
|
|
332
298
|
width: x
|
|
333
299
|
}
|
|
334
300
|
}
|
|
335
301
|
};
|
|
336
|
-
|
|
337
|
-
},
|
|
302
|
+
c.setColumnsMap(le), Pe.current = !0, c.persistenceType === "online" && c.persistenceKey && c.startAutoSaveCountdown();
|
|
303
|
+
}, He = a(() => rn(K), [K]), Y = a(() => u ? He : K, [u, K, He]), { table: be, locale: zt = nn } = Ee(mn), Wt = { ...zt.Table }, Bt = ((_e = be == null ? void 0 : be.expandable) == null ? void 0 : _e.expandIcon) || (B == null ? void 0 : B.expandIcon) || tn(Wt), Le = a(() => {
|
|
338
304
|
if (B)
|
|
339
305
|
return {
|
|
340
306
|
...B,
|
|
341
|
-
expandedRowRender: () =>
|
|
307
|
+
expandedRowRender: () => r.jsx(r.Fragment, {}),
|
|
342
308
|
expandIcon: (e) => {
|
|
343
|
-
const t =
|
|
309
|
+
const t = Bt(e);
|
|
344
310
|
return {
|
|
345
311
|
...t,
|
|
346
312
|
props: {
|
|
@@ -354,358 +320,146 @@ function bs({
|
|
|
354
320
|
};
|
|
355
321
|
}
|
|
356
322
|
};
|
|
357
|
-
}, [B]),
|
|
358
|
-
if (
|
|
323
|
+
}, [B]), St = a(() => u ? Le : B, [u, B, Le]), De = a(() => {
|
|
324
|
+
if (O)
|
|
359
325
|
return {
|
|
360
|
-
...
|
|
326
|
+
...O,
|
|
361
327
|
selectedRowKeys: [],
|
|
362
328
|
getCheckboxProps: () => ({ disabled: !0 })
|
|
363
329
|
};
|
|
364
|
-
}, [
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
), Lt = a(() => de(
|
|
374
|
-
"bitzTableContainer",
|
|
375
|
-
{ hideBorder: We },
|
|
376
|
-
{ hasScrollBar: M },
|
|
377
|
-
{ stickyTable: !!(b != null && b.sticky) },
|
|
378
|
-
Oe,
|
|
379
|
-
b.className
|
|
380
|
-
), [
|
|
381
|
-
b.className,
|
|
382
|
-
Oe,
|
|
330
|
+
}, [O]), Mt = a(() => u ? De : O, [u, O, De]), $e = a(() => u ? "key" : i.rowKey, [u, i.rowKey]), Ke = a(() => `${ge ?? c.stylesConfig.size}BitzTable`, [ge, c.stylesConfig.size]), Rt = ce((e, t) => {
|
|
331
|
+
var s;
|
|
332
|
+
if (!i.onRow || u)
|
|
333
|
+
return {};
|
|
334
|
+
const n = (s = i.onRow) == null ? void 0 : s.call(i, e, t);
|
|
335
|
+
return n.onClick && (n.className = "rowPointerCursor"), n;
|
|
336
|
+
}, [i.onRow, u]), Pt = a(() => ie("bitzTableContainer", { hideBorder: ke }, { hasScrollBar: M }, { stickyTable: !!(i != null && i.sticky) }, Ke, i.className), [
|
|
337
|
+
i.className,
|
|
338
|
+
Ke,
|
|
383
339
|
M,
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
]),
|
|
340
|
+
c.fullscreen,
|
|
341
|
+
ke,
|
|
342
|
+
i.sticky
|
|
343
|
+
]), Ht = a(() => ({
|
|
388
344
|
"--container-bgColor": S.colorBgContainer
|
|
389
|
-
}), [S.colorBgContainer]),
|
|
390
|
-
const e =
|
|
345
|
+
}), [S.colorBgContainer]), Lt = a(() => {
|
|
346
|
+
const e = Z ?? F;
|
|
391
347
|
let t;
|
|
392
|
-
|
|
393
|
-
const
|
|
394
|
-
let
|
|
395
|
-
return (W ?? 0) > 0 && (
|
|
396
|
-
height:
|
|
348
|
+
H && (t = H >= e ? H : e);
|
|
349
|
+
const n = c.fullscreen ? "100%" : t;
|
|
350
|
+
let s;
|
|
351
|
+
return (W ?? 0) > 0 && (s = W), on({
|
|
352
|
+
height: n ?? "auto",
|
|
397
353
|
token: S,
|
|
398
|
-
evenRowBgColor:
|
|
399
|
-
table:
|
|
400
|
-
gap:
|
|
401
|
-
borderColor: (
|
|
402
|
-
scrollbarWidth:
|
|
403
|
-
other:
|
|
354
|
+
evenRowBgColor: c.zebra ? h == null ? void 0 : h.evenRowBgColor : S.colorBgContainer,
|
|
355
|
+
table: h,
|
|
356
|
+
gap: lt,
|
|
357
|
+
borderColor: (h == null ? void 0 : h.borderColor) || S.colorBorderSecondary,
|
|
358
|
+
scrollbarWidth: s,
|
|
359
|
+
other: i.style
|
|
404
360
|
});
|
|
405
361
|
}, [
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
362
|
+
i.style,
|
|
363
|
+
c.fullscreen,
|
|
364
|
+
H,
|
|
365
|
+
Z,
|
|
366
|
+
F,
|
|
367
|
+
h,
|
|
368
|
+
c == null ? void 0 : c.zebra,
|
|
413
369
|
W
|
|
414
|
-
]),
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
return de(r, o);
|
|
420
|
-
}
|
|
421
|
-
return r;
|
|
422
|
-
},
|
|
423
|
-
[b.rowClassName]
|
|
424
|
-
), Ve = a(() => /* @__PURE__ */ n.jsx(
|
|
425
|
-
Qt,
|
|
426
|
-
{
|
|
427
|
-
finished: Be,
|
|
428
|
-
onLoad: async () => (
|
|
429
|
-
// @ts-ignore
|
|
430
|
-
!c && (D == null ? void 0 : D((N == null ? void 0 : N.page) + 1, N == null ? void 0 : N.size))
|
|
431
|
-
),
|
|
432
|
-
loadingText: "加载中...",
|
|
433
|
-
finishedText: "没有更多了",
|
|
434
|
-
errorText: "加载失败",
|
|
435
|
-
children: /* @__PURE__ */ n.jsxs(
|
|
436
|
-
"div",
|
|
437
|
-
{
|
|
438
|
-
className: "mobileList",
|
|
439
|
-
style: { backgroundColor: f == null ? void 0 : f.mobileListBgColor },
|
|
440
|
-
children: [
|
|
441
|
-
k == null ? void 0 : k.map((e, t) => /* @__PURE__ */ n.jsx(
|
|
442
|
-
"div",
|
|
443
|
-
{
|
|
444
|
-
className: "listItem",
|
|
445
|
-
style: { backgroundColor: f == null ? void 0 : f.listItemBgColor },
|
|
446
|
-
onClick: () => bt(e, t),
|
|
447
|
-
children: q == null ? void 0 : q.map((s, r) => {
|
|
448
|
-
var o;
|
|
449
|
-
return !(s != null && s.mobileHide) && /* @__PURE__ */ n.jsxs(
|
|
450
|
-
"div",
|
|
451
|
-
{
|
|
452
|
-
className: "row",
|
|
453
|
-
style: { color: S.colorText },
|
|
454
|
-
children: [
|
|
455
|
-
!s.mobileHideLabel && /* @__PURE__ */ n.jsxs("div", { className: "label", children: [
|
|
456
|
-
`${s.title}`,
|
|
457
|
-
":"
|
|
458
|
-
] }),
|
|
459
|
-
/* @__PURE__ */ n.jsx("div", { className: "value", children: ((o = s == null ? void 0 : s.render) == null ? void 0 : o.call(
|
|
460
|
-
s,
|
|
461
|
-
ms(e, (s == null ? void 0 : s.dataIndex) || ""),
|
|
462
|
-
e,
|
|
463
|
-
t
|
|
464
|
-
)) || (e == null ? void 0 : e[s.dataIndex]) })
|
|
465
|
-
]
|
|
466
|
-
},
|
|
467
|
-
r
|
|
468
|
-
);
|
|
469
|
-
})
|
|
470
|
-
},
|
|
471
|
-
t
|
|
472
|
-
)),
|
|
473
|
-
Array.from({ length: F.mobile ?? 2 }).map((e, t) => /* @__PURE__ */ n.jsx(
|
|
474
|
-
"div",
|
|
475
|
-
{
|
|
476
|
-
className: "listItem",
|
|
477
|
-
style: {
|
|
478
|
-
display: c ? "block" : "none",
|
|
479
|
-
backgroundColor: f == null ? void 0 : f.listItemBgColor
|
|
480
|
-
},
|
|
481
|
-
children: /* @__PURE__ */ n.jsx("div", { className: "row", children: fe ? fe() : /* @__PURE__ */ n.jsx(
|
|
482
|
-
_t,
|
|
483
|
-
{
|
|
484
|
-
title: !1,
|
|
485
|
-
paragraph: {
|
|
486
|
-
rows: Ae,
|
|
487
|
-
width: Fe
|
|
488
|
-
},
|
|
489
|
-
active: !0
|
|
490
|
-
}
|
|
491
|
-
) })
|
|
492
|
-
},
|
|
493
|
-
`${Date.now()}${t}`
|
|
494
|
-
))
|
|
495
|
-
]
|
|
496
|
-
}
|
|
497
|
-
)
|
|
370
|
+
]), Dt = ce((e, t, n) => {
|
|
371
|
+
const s = t % 2 === 0 ? "oddRow" : "evenRow";
|
|
372
|
+
if (i.rowClassName) {
|
|
373
|
+
const o = i.rowClassName(e, t, n);
|
|
374
|
+
return ie(s, o);
|
|
498
375
|
}
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
376
|
+
return s;
|
|
377
|
+
}, [i.rowClassName]), qe = a(() => r.jsx(Jt, { finished: Ne, onLoad: async () => (
|
|
378
|
+
// @ts-ignore
|
|
379
|
+
!u && (I == null ? void 0 : I((z == null ? void 0 : z.page) + 1, z == null ? void 0 : z.size))
|
|
380
|
+
), loadingText: "加载中...", finishedText: "没有更多了", errorText: "加载失败", children: r.jsxs("div", { className: "mobileList", style: { backgroundColor: h == null ? void 0 : h.mobileListBgColor }, children: [k == null ? void 0 : k.map((e, t) => r.jsx("div", { className: "listItem", style: { backgroundColor: h == null ? void 0 : h.listItemBgColor }, onClick: () => ht(e, t), children: K == null ? void 0 : K.map((n, s) => {
|
|
381
|
+
var o;
|
|
382
|
+
return !(n != null && n.mobileHide) && r.jsxs("div", { className: "row", style: { color: S.colorText }, children: [!n.mobileHideLabel && r.jsxs("div", { className: "label", children: [`${n.title}`, ":"] }), r.jsx("div", { className: "value", children: ((o = n == null ? void 0 : n.render) == null ? void 0 : o.call(n, bn(e, (n == null ? void 0 : n.dataIndex) || ""), e, t)) || (e == null ? void 0 : e[n.dataIndex]) })] }, s);
|
|
383
|
+
}) }, t)), Array.from({ length: v.mobile ?? 2 }).map((e, t) => r.jsx("div", { className: "listItem", style: {
|
|
384
|
+
display: u ? "block" : "none",
|
|
385
|
+
backgroundColor: h == null ? void 0 : h.listItemBgColor
|
|
386
|
+
}, children: r.jsx("div", { className: "row", children: ue ? ue() : r.jsx(Ot, { title: !1, paragraph: {
|
|
387
|
+
rows: Xe,
|
|
388
|
+
width: Ze
|
|
389
|
+
}, active: !0 }) }) }, `${Date.now()}${t}`))] }) }), [
|
|
390
|
+
j ? Ne : 0,
|
|
391
|
+
j ? u : 0,
|
|
392
|
+
j ? z : 0,
|
|
393
|
+
j ? h : 0,
|
|
504
394
|
j ? k : 0,
|
|
505
|
-
j ?
|
|
506
|
-
j ?
|
|
507
|
-
j ?
|
|
395
|
+
j ? K : 0,
|
|
396
|
+
j ? v : 0,
|
|
397
|
+
j ? ue : 0
|
|
508
398
|
]);
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
}, [
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
),
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
/* @__PURE__ */ n.jsx(
|
|
525
|
-
Ue,
|
|
526
|
-
{
|
|
527
|
-
highlightTag: "strong",
|
|
528
|
-
keywords: `${(m == null ? void 0 : m.num) ?? 0}`,
|
|
529
|
-
sourceString: `已选中 ${(m == null ? void 0 : m.num) ?? 0} 条`
|
|
530
|
-
}
|
|
531
|
-
),
|
|
532
|
-
!!(m != null && m.num) && /* @__PURE__ */ n.jsx(
|
|
533
|
-
ge.Link,
|
|
534
|
-
{
|
|
535
|
-
className: "cleanSelected",
|
|
536
|
-
onClick: m == null ? void 0 : m.onClear,
|
|
537
|
-
children: "取消选中"
|
|
538
|
-
}
|
|
539
|
-
)
|
|
540
|
-
] })
|
|
541
|
-
] }), [$, m]), Kt = (e) => {
|
|
542
|
-
c || me == null || me(e);
|
|
543
|
-
}, Ie = ae(() => G ? {
|
|
544
|
-
row: (e) => is({ ...e, loading: c == null ? void 0 : c.toString() })
|
|
545
|
-
} : {}, [G, G ? c : !1]), De = ae(
|
|
546
|
-
(e) => {
|
|
547
|
-
var r, o;
|
|
548
|
-
if (J)
|
|
549
|
-
return as({ ...e, hasScrollBar: M, scrollbarSize: W });
|
|
550
|
-
const t = { ...e };
|
|
551
|
-
return ((r = t.className) == null ? void 0 : r.includes(
|
|
552
|
-
"ant-table-cell-fix-right"
|
|
553
|
-
)) && !M && ((o = t.style) != null && o.right) && (t.style = { ...t.style ?? {} }, t.style.right = Number(t.style.right ?? 0) - (W || 0)), /* @__PURE__ */ n.jsx("th", { ...t });
|
|
554
|
-
},
|
|
555
|
-
[M, W, J]
|
|
556
|
-
), Ot = a(() => ({
|
|
557
|
-
...R,
|
|
399
|
+
Ge(() => {
|
|
400
|
+
c.setSelected(!!(b != null && b.num));
|
|
401
|
+
}, [b]);
|
|
402
|
+
const pe = a(() => r.jsxs("div", { className: "alert", children: [r.jsx(Ye, { highlightTag: "strong", keywords: `${L}`, sourceString: `共 ${L} 条`, tagClass: "totalText" }), !!b && r.jsxs(r.Fragment, { children: [r.jsx(Ce.Text, { className: "splitBorder", children: "/" }), r.jsx(Ye, { highlightTag: "strong", keywords: `${(b == null ? void 0 : b.num) ?? 0}`, sourceString: `已选中 ${(b == null ? void 0 : b.num) ?? 0} 条` }), !!(b != null && b.num) && r.jsx(Ce.Link, { className: "cleanSelected", onClick: b == null ? void 0 : b.onClear, children: "取消选中" })] })] }), [L, b]), $t = (e) => {
|
|
403
|
+
u || fe == null || fe(e);
|
|
404
|
+
}, Oe = ce(() => E ? {
|
|
405
|
+
row: (e) => ln({ ...e, loading: u == null ? void 0 : u.toString() })
|
|
406
|
+
} : {}, [E, E ? u : !1]), Ve = ce((e) => {
|
|
407
|
+
var s, o;
|
|
408
|
+
if (G)
|
|
409
|
+
return an({ ...e, hasScrollBar: M, scrollbarSize: W });
|
|
410
|
+
const t = { ...e };
|
|
411
|
+
return ((s = t.className) == null ? void 0 : s.includes("ant-table-cell-fix-right")) && !M && ((o = t.style) != null && o.right) && (t.style = { ...t.style ?? {} }, t.style.right = Number(t.style.right ?? 0) - (W || 0)), r.jsx("th", { ...t });
|
|
412
|
+
}, [M, W, G]), Kt = a(() => i != null && i.virtual ? {} : Te ? { cell: hn } : {}, [Te, i == null ? void 0 : i.virtual]), qt = a(() => ({
|
|
413
|
+
...D,
|
|
558
414
|
header: {
|
|
559
|
-
...
|
|
560
|
-
cell:
|
|
415
|
+
...D == null ? void 0 : D.header,
|
|
416
|
+
cell: Ve
|
|
561
417
|
},
|
|
562
418
|
body: {
|
|
563
|
-
...
|
|
564
|
-
...
|
|
419
|
+
...Kt,
|
|
420
|
+
...D == null ? void 0 : D.body,
|
|
421
|
+
...Oe()
|
|
565
422
|
}
|
|
566
|
-
}), [
|
|
423
|
+
}), [D, Ve, Oe]), pt = a(() => {
|
|
567
424
|
var e;
|
|
568
|
-
if ((
|
|
569
|
-
const t =
|
|
570
|
-
|
|
571
|
-
0
|
|
572
|
-
), s = (e = H == null ? void 0 : H.current) == null ? void 0 : e.clientWidth;
|
|
573
|
-
return t > s - 200;
|
|
574
|
-
}
|
|
575
|
-
}, [Q]);
|
|
576
|
-
return /* @__PURE__ */ n.jsxs(
|
|
577
|
-
"div",
|
|
578
|
-
{
|
|
579
|
-
className: de("bitzTableBlock", {
|
|
580
|
-
fullscreen: i.fullscreen
|
|
581
|
-
}),
|
|
582
|
-
style: $t,
|
|
583
|
-
...ve,
|
|
584
|
-
children: [
|
|
585
|
-
!j && /* @__PURE__ */ n.jsxs("div", { ref: P, className: Lt, style: Rt, children: [
|
|
586
|
-
/* @__PURE__ */ n.jsxs("div", { className: "bitzTableContainerBody", ref: H, children: [
|
|
587
|
-
nt && /* @__PURE__ */ n.jsxs("div", { className: "bitzTableToolbarBlock", children: [
|
|
588
|
-
ot || /* @__PURE__ */ n.jsx("div", {}),
|
|
589
|
-
lt,
|
|
590
|
-
it
|
|
591
|
-
] }),
|
|
592
|
-
/* @__PURE__ */ n.jsx(
|
|
593
|
-
"div",
|
|
594
|
-
{
|
|
595
|
-
className: "stretchLine",
|
|
596
|
-
ref: pe,
|
|
597
|
-
style: {
|
|
598
|
-
background: S.colorPrimary,
|
|
599
|
-
// bottom: hasScrollBar ? 'var(--scrollbar-width)' : 0,
|
|
600
|
-
bottom: 0
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
),
|
|
604
|
-
/* @__PURE__ */ n.jsxs(
|
|
605
|
-
cs,
|
|
606
|
-
{
|
|
607
|
-
enabledRowDragSort: G,
|
|
608
|
-
dataSource: oe,
|
|
609
|
-
mergeRowKey: Ke,
|
|
610
|
-
onDragEnd: Kt,
|
|
611
|
-
children: [
|
|
612
|
-
Vt && /* @__PURE__ */ n.jsx(
|
|
613
|
-
It,
|
|
614
|
-
{
|
|
615
|
-
closable: !0,
|
|
616
|
-
type: "error",
|
|
617
|
-
message: "表格固定列的宽度超过表格宽度,影响表格显示效果;请重新拖拽列宽度或点击表格设置调整固定列配置。"
|
|
618
|
-
}
|
|
619
|
-
),
|
|
620
|
-
/* @__PURE__ */ n.jsx(
|
|
621
|
-
Dt,
|
|
622
|
-
{
|
|
623
|
-
...b,
|
|
624
|
-
bordered: se,
|
|
625
|
-
columns: Q,
|
|
626
|
-
dataSource: oe,
|
|
627
|
-
loading: !1,
|
|
628
|
-
pagination: !1,
|
|
629
|
-
scroll: { ...le, ...Nt },
|
|
630
|
-
expandable: pt,
|
|
631
|
-
rowSelection: Pt,
|
|
632
|
-
onRow: Ht,
|
|
633
|
-
rowHoverable: dt,
|
|
634
|
-
rowClassName: qt,
|
|
635
|
-
className: "bitzTable",
|
|
636
|
-
components: Ot,
|
|
637
|
-
rowKey: Ke,
|
|
638
|
-
onChange: Ct,
|
|
639
|
-
ref: be
|
|
640
|
-
}
|
|
641
|
-
)
|
|
642
|
-
]
|
|
643
|
-
}
|
|
644
|
-
)
|
|
645
|
-
] }),
|
|
646
|
-
U && !!$ && /* @__PURE__ */ n.jsxs("div", { className: "bitzTablePagination", ref: ye, children: [
|
|
647
|
-
_e,
|
|
648
|
-
/* @__PURE__ */ n.jsx(
|
|
649
|
-
Et,
|
|
650
|
-
{
|
|
651
|
-
size: "small",
|
|
652
|
-
enableControl: et,
|
|
653
|
-
pagination: N,
|
|
654
|
-
total: $,
|
|
655
|
-
dataSource: g,
|
|
656
|
-
resetPage: ct,
|
|
657
|
-
hideTotalText: !0,
|
|
658
|
-
paginationEmit: wt
|
|
659
|
-
}
|
|
660
|
-
)
|
|
661
|
-
] }),
|
|
662
|
-
!U && !!m && !!$ && /* @__PURE__ */ n.jsx("div", { className: "bitzTablePagination", ref: ye, children: _e })
|
|
663
|
-
] }),
|
|
664
|
-
j && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
665
|
-
(c || !!(g != null && g.length)) && /* @__PURE__ */ n.jsx(n.Fragment, { children: je ? (
|
|
666
|
-
// @ts-ignore
|
|
667
|
-
/* @__PURE__ */ n.jsx(
|
|
668
|
-
Ut,
|
|
669
|
-
{
|
|
670
|
-
onRefresh: async () => !c && je(),
|
|
671
|
-
children: Ve
|
|
672
|
-
}
|
|
673
|
-
)
|
|
674
|
-
) : Ve }),
|
|
675
|
-
!c && /* @__PURE__ */ n.jsx(Jt, { data: g, title: st, img: rt }),
|
|
676
|
-
/* @__PURE__ */ n.jsx(
|
|
677
|
-
Yt,
|
|
678
|
-
{
|
|
679
|
-
className: "tableMobileDrawer",
|
|
680
|
-
open: ut,
|
|
681
|
-
placement: "bottom",
|
|
682
|
-
height: "auto",
|
|
683
|
-
closable: !1,
|
|
684
|
-
onClose: Me,
|
|
685
|
-
children: /* @__PURE__ */ n.jsxs("div", { className: "drawerBox", children: [
|
|
686
|
-
/* @__PURE__ */ n.jsx("div", { className: "boxBody", children: mt ? /* @__PURE__ */ n.jsx("div", { className: "operaList", children: /* @__PURE__ */ n.jsx(Gt, {}) }) : ne.map((e, t) => /* @__PURE__ */ n.jsx(
|
|
687
|
-
"div",
|
|
688
|
-
{
|
|
689
|
-
className: "operaList",
|
|
690
|
-
onClick: () => yt(e, t),
|
|
691
|
-
...e.danger && {
|
|
692
|
-
style: { color: S.colorError }
|
|
693
|
-
},
|
|
694
|
-
children: e.label
|
|
695
|
-
},
|
|
696
|
-
t
|
|
697
|
-
)) }),
|
|
698
|
-
/* @__PURE__ */ n.jsx("div", { className: "boxLine" }),
|
|
699
|
-
/* @__PURE__ */ n.jsx("div", { className: "boxFooter", onClick: Me, children: tt })
|
|
700
|
-
] })
|
|
701
|
-
}
|
|
702
|
-
)
|
|
703
|
-
] })
|
|
704
|
-
]
|
|
425
|
+
if ((Y == null ? void 0 : Y.length) > 5 && ($ != null && $.current)) {
|
|
426
|
+
const t = Y.reduce((s, o) => (o.fixed && (s += o.width), s), 0), n = (e = $ == null ? void 0 : $.current) == null ? void 0 : e.clientWidth;
|
|
427
|
+
return t > n - 300;
|
|
705
428
|
}
|
|
706
|
-
|
|
429
|
+
return !1;
|
|
430
|
+
}, [Y]);
|
|
431
|
+
return r.jsxs("div", { className: ie("bitzTableBlock", {
|
|
432
|
+
fullscreen: c.fullscreen
|
|
433
|
+
}), style: Ht, ...Ue, children: [!j && r.jsxs("div", { ref: P, className: Pt, style: Lt, children: [r.jsxs("div", { className: "bitzTableContainerBody", ref: $, children: [tt && r.jsxs("div", { className: "bitzTableToolbarBlock", children: [nt || r.jsx("div", {}), st, rt] }), r.jsx("div", { className: "stretchLine", ref: Be, style: {
|
|
434
|
+
background: S.colorPrimary,
|
|
435
|
+
bottom: 0
|
|
436
|
+
} }), r.jsxs(cn, { enabledRowDragSort: E, dataSource: se, mergeRowKey: $e, onDragEnd: $t, children: [pt && r.jsx(Vt, { closable: !0, type: "error", message: "表格固定列的宽度超过表格宽度,影响表格显示效果;请重新拖拽列宽度或点击表格设置调整固定列配置。" }), r.jsx(_t, {
|
|
437
|
+
...i,
|
|
438
|
+
bordered: ee,
|
|
439
|
+
columns: Y,
|
|
440
|
+
dataSource: se,
|
|
441
|
+
loading: !1,
|
|
442
|
+
pagination: !1,
|
|
443
|
+
scroll: { ...re, ...kt },
|
|
444
|
+
expandable: St,
|
|
445
|
+
rowSelection: Mt,
|
|
446
|
+
// style={tableStyle}
|
|
447
|
+
onRow: Rt,
|
|
448
|
+
rowHoverable: it,
|
|
449
|
+
rowClassName: Dt,
|
|
450
|
+
className: "bitzTable",
|
|
451
|
+
components: qt,
|
|
452
|
+
rowKey: $e,
|
|
453
|
+
onChange: bt,
|
|
454
|
+
ref: he
|
|
455
|
+
})] })] }), J && !!L && r.jsxs("div", { className: "bitzTablePagination", ref: Se, children: [pe, r.jsx(Gt, { size: "small", enableControl: ve, pagination: z, total: L, dataSource: g, resetPage: ot, hideTotalText: !0, paginationEmit: yt })] }), !J && !!b && !!L && r.jsx("div", { className: "bitzTablePagination", ref: Se, children: pe })] }), j && r.jsxs(r.Fragment, { children: [(u || !!(g != null && g.length)) && r.jsx(r.Fragment, { children: xe ? (
|
|
456
|
+
// @ts-ignore
|
|
457
|
+
r.jsx(Qt, { onRefresh: async () => !u && xe(), children: qe })
|
|
458
|
+
) : qe }), !u && r.jsx(Yt, { data: g, title: Fe, img: et }), r.jsx(Et, { className: "tableMobileDrawer", open: at, placement: "bottom", height: "auto", closable: !1, onClose: We, children: r.jsxs("div", { className: "drawerBox", children: [r.jsx("div", { className: "boxBody", children: ft ? r.jsx("div", { className: "operaList", children: r.jsx(It, {}) }) : ne.map((e, t) => r.jsx("div", { className: "operaList", onClick: () => mt(e, t), ...e.danger && {
|
|
459
|
+
style: { color: S.colorError }
|
|
460
|
+
}, children: e.label }, t)) }), r.jsx("div", { className: "boxLine" }), r.jsx("div", { className: "boxFooter", onClick: We, children: Ae })] }) })] })] });
|
|
707
461
|
}
|
|
708
|
-
const
|
|
462
|
+
const Un = (J) => r.jsx(Ut, { initValue: J, children: r.jsx(yn, { ...J }) });
|
|
709
463
|
export {
|
|
710
|
-
|
|
464
|
+
Un as default
|
|
711
465
|
};
|