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