bitz-react-admin-ui 2.1.9 → 2.2.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/components/BitzPagination/index.d.ts +4 -0
- package/dist/components/BitzPagination/index.mjs +22 -21
- 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 +19 -38
- 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.mjs +90 -106
- 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 +14 -1
- package/dist/components/BitzTable/Table/index.mjs +319 -273
- package/dist/components/BitzTable/Table/style.d.ts +2 -1
- package/dist/components/BitzTable/Table/style.mjs +17 -15
- 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 +22 -23
- 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 +21 -21
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +20 -22
- package/dist/components/BitzTable/ToolBar/index.d.ts +12 -11
- package/dist/components/BitzTable/ToolBar/style.mjs +41 -46
- package/dist/components/BitzTable/index.d.ts +4 -2
- 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/style.css +1 -1
- package/dist/utils/findNode.d.ts +2 -2
- package/package.json +1 -1
- 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,62 +1,53 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
onClick: e,
|
|
15
|
-
icon: l = /* @__PURE__ */ o.jsx(O, {})
|
|
1
|
+
import { j as t } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { memo as b, useState as i, useContext as a, useMemo as g } from "react";
|
|
3
|
+
import E from "../style.mjs";
|
|
4
|
+
import B from "../../../BitzButton/index.mjs";
|
|
5
|
+
import { BitzTableContext as m } from "../../Store/index.mjs";
|
|
6
|
+
import { exportConfigTitle as I } from "../ColConfigIcon/ColumnConfigModal.mjs";
|
|
7
|
+
import h from "./ExportModal.mjs";
|
|
8
|
+
import z from "../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/DownloadOutlined.mjs";
|
|
9
|
+
const D = ({
|
|
10
|
+
show: f = !0,
|
|
11
|
+
order: p,
|
|
12
|
+
onClick: o,
|
|
13
|
+
icon: c = /* @__PURE__ */ t.jsx(z, {})
|
|
16
14
|
}) => {
|
|
17
|
-
const { toolbarItemClassName:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
style: { order: s },
|
|
54
|
-
children: "下载"
|
|
55
|
-
}
|
|
56
|
-
)
|
|
57
|
-
}
|
|
58
|
-
) : null;
|
|
59
|
-
}, P = x(h);
|
|
15
|
+
const { toolbarItemClassName: u } = E(), [x, s] = i(!1), [d, r] = i(!1);
|
|
16
|
+
a(m).exportConfig;
|
|
17
|
+
const { loading: j, fullscreen: n } = a(m), y = g(() => n ? !1 : void 0, [n]), C = async (e) => {
|
|
18
|
+
var l;
|
|
19
|
+
if (o)
|
|
20
|
+
return r(!0), o(
|
|
21
|
+
e.config.key,
|
|
22
|
+
e.fields,
|
|
23
|
+
(l = e.config) == null ? void 0 : l.info
|
|
24
|
+
).finally(() => r(!1));
|
|
25
|
+
};
|
|
26
|
+
return f ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
27
|
+
/* @__PURE__ */ t.jsx(
|
|
28
|
+
h,
|
|
29
|
+
{
|
|
30
|
+
open: x,
|
|
31
|
+
title: I,
|
|
32
|
+
getContainer: y,
|
|
33
|
+
onExport: C,
|
|
34
|
+
close: () => s(!1)
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ t.jsx(
|
|
38
|
+
B,
|
|
39
|
+
{
|
|
40
|
+
type: "text",
|
|
41
|
+
className: u,
|
|
42
|
+
icon: c,
|
|
43
|
+
style: { order: p },
|
|
44
|
+
disabled: j || d,
|
|
45
|
+
onClick: () => s(!0),
|
|
46
|
+
children: "导出"
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] }) : null;
|
|
50
|
+
}, F = b(D);
|
|
60
51
|
export {
|
|
61
|
-
|
|
52
|
+
F as default
|
|
62
53
|
};
|
|
@@ -1,46 +1,45 @@
|
|
|
1
1
|
import { j as t } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { memo as d,
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
import
|
|
2
|
+
import { memo as d, useContext as p, useMemo as x, useEffect as b } from "react";
|
|
3
|
+
import { Tooltip as B } from "antd";
|
|
4
|
+
import E from "../style.mjs";
|
|
5
5
|
import F from "../../../BitzButton/index.mjs";
|
|
6
6
|
import r from "../../../../node_modules/.store/screenfull@6.0.2/node_modules/screenfull/index.mjs";
|
|
7
7
|
import j from "../../../BitzToast/index.mjs";
|
|
8
|
-
import { findParentFirstNodeByClass as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
8
|
+
import { findParentFirstNodeByClass as z } from "../../../../utils/findNode.mjs";
|
|
9
|
+
import { BitzTableContext as T } from "../../Store/index.mjs";
|
|
10
|
+
import h from "../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/FullscreenExitOutlined.mjs";
|
|
11
|
+
import C from "../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/FullscreenOutlined.mjs";
|
|
11
12
|
const g = ({
|
|
12
13
|
order: m,
|
|
13
14
|
show: u = !0
|
|
14
15
|
}) => {
|
|
15
|
-
const { toolbarItemClassName: a } =
|
|
16
|
+
const { toolbarItemClassName: a } = E(), { fullscreen: n, setFullscreen: s } = p(T), o = x(() => n ? {
|
|
16
17
|
title: "退出全屏",
|
|
17
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
18
|
+
icon: /* @__PURE__ */ t.jsx(h, {})
|
|
18
19
|
} : {
|
|
19
20
|
title: "全屏",
|
|
20
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
21
|
-
}, [
|
|
22
|
-
b(() => (document == null || document.addEventListener("fullscreenchange", (o) => {
|
|
23
|
-
var e, i, c;
|
|
24
|
-
(e = o.target) != null && e.classList.contains("bitzTableBlock") && (s(!!document.fullscreenElement), (c = (i = document.fullscreenElement) == null ? void 0 : i.classList) != null && c.contains("bitzTableBlock") || s(!1));
|
|
25
|
-
}), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
|
|
26
|
-
})), []);
|
|
27
|
-
const f = (o) => {
|
|
21
|
+
icon: /* @__PURE__ */ t.jsx(C, {})
|
|
22
|
+
}, [n]), f = (l) => {
|
|
28
23
|
r.isEnabled || j.error("您的浏览器不支持全屏");
|
|
29
|
-
const e =
|
|
30
|
-
|
|
24
|
+
const e = z(l.target, "bitzTableBlock");
|
|
25
|
+
n ? r.exit() : r.request(e);
|
|
31
26
|
};
|
|
32
|
-
return
|
|
27
|
+
return b(() => (document == null || document.addEventListener("fullscreenchange", (l) => {
|
|
28
|
+
var e, i, c;
|
|
29
|
+
(e = l.target) != null && e.classList.contains("bitzTableBlock") && (s(!!document.fullscreenElement), (c = (i = document.fullscreenElement) == null ? void 0 : i.classList) != null && c.contains("bitzTableBlock") || s(!1));
|
|
30
|
+
}), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
|
|
31
|
+
})), []), u ? /* @__PURE__ */ t.jsx(B, { title: o.title, open: !1, children: /* @__PURE__ */ t.jsx(
|
|
33
32
|
F,
|
|
34
33
|
{
|
|
35
34
|
type: "text",
|
|
36
35
|
className: a,
|
|
37
36
|
onClick: f,
|
|
38
|
-
icon:
|
|
37
|
+
icon: o.icon,
|
|
39
38
|
style: { order: m },
|
|
40
|
-
children:
|
|
39
|
+
children: o.title
|
|
41
40
|
}
|
|
42
41
|
) }) : null;
|
|
43
|
-
},
|
|
42
|
+
}, P = d(g);
|
|
44
43
|
export {
|
|
45
|
-
|
|
44
|
+
P as default
|
|
46
45
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ModalProps as AntModalProps } from 'antd';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { ExportConfigProps } from '../../Store';
|
|
4
|
+
import { BitzTableToolBarProps } from '..';
|
|
5
|
+
export interface ModalProps {
|
|
6
|
+
open: boolean;
|
|
7
|
+
close: () => void;
|
|
8
|
+
closeAfter: () => void;
|
|
9
|
+
title: string;
|
|
10
|
+
onChange?: BitzTableToolBarProps['onColumnChange'];
|
|
11
|
+
onExport?: (val: ExportConfigProps<'export'>) => Promise<void>;
|
|
12
|
+
getContainer: AntModalProps['getContainer'];
|
|
13
|
+
footer: ReactNode;
|
|
14
|
+
extra?: ReactNode;
|
|
15
|
+
children: (height: any) => ReactNode;
|
|
16
|
+
}
|
|
17
|
+
declare function Modal({ open, title, close, closeAfter, getContainer, footer, extra, children, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default Modal;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { Modal as F, Typography as M, Card as N, Flex as f } from "antd";
|
|
3
|
+
import { useMemo as m, useState as k, useEffect as B, useRef as h } from "react";
|
|
4
|
+
import H from "../../../BitzTheme/index.mjs";
|
|
5
|
+
import R from "../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
6
|
+
import { styles as T } from "./style.mjs";
|
|
7
|
+
function $({
|
|
8
|
+
open: t,
|
|
9
|
+
title: g,
|
|
10
|
+
close: C,
|
|
11
|
+
closeAfter: x,
|
|
12
|
+
getContainer: j,
|
|
13
|
+
footer: y,
|
|
14
|
+
extra: o,
|
|
15
|
+
children: p
|
|
16
|
+
}) {
|
|
17
|
+
const { token: n } = H.useToken(), s = m(() => n.mode === "dark", [n.mode]), [l, b] = k(0);
|
|
18
|
+
B(() => {
|
|
19
|
+
t || (x(), b(l + 1));
|
|
20
|
+
}, [t]);
|
|
21
|
+
const r = h(null), i = h(null), c = m(() => {
|
|
22
|
+
var a, d, u;
|
|
23
|
+
return r.current && i.current ? ((a = r.current) == null ? void 0 : a.clientHeight) - ((d = i.current) == null ? void 0 : d.clientHeight) - 24 : r.current && !o ? (u = r.current) == null ? void 0 : u.clientHeight : "100%";
|
|
24
|
+
}, [r.current, i.current, o]);
|
|
25
|
+
return /* @__PURE__ */ e.jsx(
|
|
26
|
+
F,
|
|
27
|
+
{
|
|
28
|
+
className: R(T(n), "tableConfigModal"),
|
|
29
|
+
title: /* @__PURE__ */ e.jsx(M.Title, { style: { fontSize: 16, margin: 0 }, children: g }),
|
|
30
|
+
getContainer: j,
|
|
31
|
+
open: t,
|
|
32
|
+
onCancel: C,
|
|
33
|
+
style: {
|
|
34
|
+
"--sortCard-bgColor": s ? "#444" : "#f2f2f2",
|
|
35
|
+
"--sortCard-titleColor": s ? "#ccc" : "#777",
|
|
36
|
+
"--radioCard-bgColor": s ? "#444" : "#F2F2F2",
|
|
37
|
+
"--radioCard-bgHoverColor": s ? "#333" : n.colorBgContainer
|
|
38
|
+
},
|
|
39
|
+
width: 700,
|
|
40
|
+
footer: y,
|
|
41
|
+
children: /* @__PURE__ */ e.jsx(N, { className: "container", bordered: !1, children: /* @__PURE__ */ e.jsxs(f, { ref: r, vertical: !0, align: "center", gap: 24, style: { height: "100%" }, children: [
|
|
42
|
+
o && /* @__PURE__ */ e.jsx("div", { className: "extraContent", ref: i, children: o }),
|
|
43
|
+
t ? /* @__PURE__ */ e.jsx(f, { className: "containerBody", style: { height: c }, children: p(c) }, l) : /* @__PURE__ */ e.jsx(e.Fragment, {})
|
|
44
|
+
] }) })
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
$ as default
|
|
50
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { css as l } from "../../../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
|
|
2
|
+
import { columnsSortStyles as n, appearanceConfigStyles as r, exportConfigStyles as d } from "../ColConfigIcon/style.mjs";
|
|
3
|
+
const i = (o) => {
|
|
4
|
+
var t, a, e;
|
|
5
|
+
return l`
|
|
6
|
+
.ant-modal-content {
|
|
7
|
+
max-height: calc(100vh - 200px);
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
background-color: ${(t = o.Modal) == null ? void 0 : t.contentBg};
|
|
11
|
+
|
|
12
|
+
.ant-modal-header {
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
font-weight: 700;
|
|
15
|
+
background-color: ${(a = o.Modal) == null ? void 0 : a.headerBg};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ant-modal-body {
|
|
19
|
+
flex: 1;
|
|
20
|
+
overflow: hidden auto;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ant-modal-footer {
|
|
24
|
+
width: 100%;
|
|
25
|
+
align-self: flex-end;
|
|
26
|
+
text-align: left;
|
|
27
|
+
margin: 0;
|
|
28
|
+
padding: 20px;
|
|
29
|
+
background-color: ${(e = o.Modal) == null ? void 0 : e.footerBg};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
}, f = (o) => l`
|
|
34
|
+
&.tableConfigModal {
|
|
35
|
+
${i(o)}
|
|
36
|
+
|
|
37
|
+
.pointerCursor {
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.container {
|
|
42
|
+
|
|
43
|
+
.containerBody {
|
|
44
|
+
width: 100%;
|
|
45
|
+
position: relative;
|
|
46
|
+
|
|
47
|
+
${n(o)}
|
|
48
|
+
|
|
49
|
+
${r(o)}
|
|
50
|
+
|
|
51
|
+
${d(o)}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
56
|
+
export {
|
|
57
|
+
f as styles
|
|
58
|
+
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { j as o } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { memo as
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
2
|
+
import { memo as a, useContext as c } from "react";
|
|
3
|
+
import { Tooltip as p } from "antd";
|
|
4
|
+
import f from "../style.mjs";
|
|
5
|
+
import d from "../../../BitzButton/index.mjs";
|
|
6
|
+
import { BitzTableContext as u } from "../../Store/index.mjs";
|
|
7
|
+
import x from "../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/ReloadOutlined.mjs";
|
|
8
|
+
const h = (t) => {
|
|
8
9
|
const {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
p,
|
|
10
|
+
onClick: e,
|
|
11
|
+
order: r,
|
|
12
|
+
show: s = !0,
|
|
13
|
+
icon: n = /* @__PURE__ */ o.jsx(x, {})
|
|
14
|
+
} = t, { loading: l, selected: m } = c(u), { toolbarItemClassName: i } = f();
|
|
15
|
+
return s ? /* @__PURE__ */ o.jsx(p, { title: "刷新", open: !1, children: /* @__PURE__ */ o.jsx(
|
|
16
|
+
d,
|
|
17
17
|
{
|
|
18
18
|
type: "text",
|
|
19
|
-
className:
|
|
20
|
-
disabled:
|
|
21
|
-
onClick:
|
|
22
|
-
icon:
|
|
23
|
-
style: { order:
|
|
19
|
+
className: i,
|
|
20
|
+
disabled: l || m,
|
|
21
|
+
onClick: e,
|
|
22
|
+
icon: n,
|
|
23
|
+
style: { order: r },
|
|
24
24
|
children: "刷新"
|
|
25
25
|
}
|
|
26
26
|
) }) : null;
|
|
27
|
-
},
|
|
27
|
+
}, z = a(h);
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
z as default
|
|
30
30
|
};
|
|
@@ -1,52 +1,50 @@
|
|
|
1
1
|
import { j as s } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { Space as
|
|
4
|
-
import
|
|
2
|
+
import { useContext as i, useMemo as l } from "react";
|
|
3
|
+
import { Space as x } from "antd";
|
|
4
|
+
import u from "../RefreshIcon/index.mjs";
|
|
5
5
|
import g from "../ColConfigIcon/index.mjs";
|
|
6
6
|
import C from "../FullscreenIcon/index.mjs";
|
|
7
7
|
import j from "../ExportIcon/index.mjs";
|
|
8
|
-
import { BitzConfigContext as
|
|
9
|
-
import { BitzToolBarContext as
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
import { BitzConfigContext as z } from "../../../BitzConfigProvider/context.mjs";
|
|
9
|
+
import { BitzToolBarContext as B } from "./context.mjs";
|
|
10
|
+
import { BitzTableContext as I } from "../../Store/index.mjs";
|
|
11
|
+
const T = ["export", "refresh", "fullscreen", "config"], A = ({
|
|
12
|
+
size: E,
|
|
13
|
+
tools: m,
|
|
14
|
+
toolsConfig: c,
|
|
14
15
|
exclude: t,
|
|
15
|
-
|
|
16
|
-
onExport: c,
|
|
16
|
+
onExport: h,
|
|
17
17
|
onRefresh: p,
|
|
18
18
|
onColumnChange: d
|
|
19
19
|
}) => {
|
|
20
|
-
const { Table: r } =
|
|
21
|
-
const e =
|
|
20
|
+
const { Table: r } = i(z), { selected: a } = i(I), f = l(() => {
|
|
21
|
+
const e = m || (r == null ? void 0 : r.toolbar) || T;
|
|
22
22
|
return t != null && t.length ? e.filter((n) => !t.includes(n)) : e;
|
|
23
|
-
}, [r == null ? void 0 : r.toolbar, t]), o =
|
|
23
|
+
}, [r == null ? void 0 : r.toolbar, t]), o = l(() => {
|
|
24
24
|
const e = {
|
|
25
25
|
export: { order: 1, show: !1 },
|
|
26
26
|
refresh: { order: 2, show: !1 },
|
|
27
27
|
fullscreen: { order: 3, show: !1 },
|
|
28
28
|
config: { order: 4, show: !1 }
|
|
29
29
|
};
|
|
30
|
-
return f.forEach((n,
|
|
31
|
-
e[n].order =
|
|
30
|
+
return f.forEach((n, w) => {
|
|
31
|
+
e[n].order = w + 1, e[n].show = f.includes(n);
|
|
32
32
|
}), e;
|
|
33
33
|
}, [f]);
|
|
34
|
-
return /* @__PURE__ */ s.jsx(
|
|
34
|
+
return /* @__PURE__ */ s.jsx(B.Provider, { value: c ?? {}, children: /* @__PURE__ */ s.jsxs(x.Compact, { style: { height: "100%", ...a && { zIndex: 10 } }, children: [
|
|
35
35
|
/* @__PURE__ */ s.jsx(
|
|
36
36
|
j,
|
|
37
37
|
{
|
|
38
38
|
order: o.export.order,
|
|
39
39
|
show: o.export.show,
|
|
40
|
-
|
|
41
|
-
onClick: c
|
|
40
|
+
onClick: h
|
|
42
41
|
}
|
|
43
42
|
),
|
|
44
43
|
/* @__PURE__ */ s.jsx(
|
|
45
|
-
|
|
44
|
+
u,
|
|
46
45
|
{
|
|
47
46
|
order: o.refresh.order,
|
|
48
47
|
show: o.refresh.show,
|
|
49
|
-
loading: i,
|
|
50
48
|
onClick: p
|
|
51
49
|
}
|
|
52
50
|
),
|
|
@@ -68,5 +66,5 @@ const E = ["export", "refresh", "fullscreen", "config"], q = ({
|
|
|
68
66
|
] }) });
|
|
69
67
|
};
|
|
70
68
|
export {
|
|
71
|
-
|
|
69
|
+
A as default
|
|
72
70
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { DensitySize, ExportConfigProps, StylesConfigOnChangeValue } from '../Store';
|
|
1
|
+
import { DensitySize, ExportFieldsConfigProps, ExportConfigProps, StylesConfigOnChangeValue, ExportResultExprotKeyType } from '../Store';
|
|
2
2
|
import { MouseEventHandler } from 'react';
|
|
3
3
|
import { ToolEnum } from '../../../components/BitzConfigProvider/context';
|
|
4
4
|
import { ColumnsConfigProps } from '..';
|
|
5
|
-
export type
|
|
6
|
-
export type ExportEvent = (key: MenuKeysType, exportConfig: ExportConfigProps[], info?: {
|
|
7
|
-
value: number;
|
|
5
|
+
export type ExportEvent = (key: ExportResultExprotKeyType, exportColumns: ExportFieldsConfigProps[], info?: {
|
|
8
6
|
type: 'page' | 'pieces';
|
|
9
|
-
|
|
7
|
+
value: number;
|
|
8
|
+
}) => Promise<void>;
|
|
10
9
|
export type ToolsConfigType = {
|
|
11
10
|
/** 表格设置按钮 */
|
|
12
11
|
config?: ConfigType;
|
|
@@ -40,15 +39,17 @@ export interface BitzTableToolBarProps {
|
|
|
40
39
|
exclude?: ToolEnum[];
|
|
41
40
|
loading?: boolean;
|
|
42
41
|
/**
|
|
43
|
-
*
|
|
44
|
-
* @
|
|
45
|
-
* @
|
|
46
|
-
* @
|
|
47
|
-
* @
|
|
42
|
+
* 导出按钮的点击事件,通过key值判断导出类型
|
|
43
|
+
* @param1_Key1 导出选中数据:selectedRows
|
|
44
|
+
* @param1_Key2 仅导出当前页数据:current
|
|
45
|
+
* @param1_Key3 导出所有数据: all
|
|
46
|
+
* @param1_Key4 导出xx页/条数据: any
|
|
47
|
+
* @param2 导出的列,根据数组索引排序
|
|
48
|
+
* @param3 key为any时,会返回第三个参数,info: {value: number, type: 'page' | 'pieces'}
|
|
48
49
|
*/
|
|
49
50
|
onExport?: ExportEvent;
|
|
50
51
|
/** 表格刷新 */
|
|
51
52
|
onRefresh?: MouseEventHandler;
|
|
52
53
|
/** 列配置更改 */
|
|
53
|
-
onColumnChange?: (styles: StylesConfigOnChangeValue, columns: Record<string, ColumnsConfigProps>,
|
|
54
|
+
onColumnChange?: (styles: StylesConfigOnChangeValue, columns: Record<string, ColumnsConfigProps>, exportConfig: ExportConfigProps) => Promise<void>;
|
|
54
55
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BitzTableContext as
|
|
1
|
+
import { BitzTableContext as h } from "../Store/index.mjs";
|
|
2
2
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/extractStyle.mjs";
|
|
3
3
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.mjs";
|
|
4
|
-
import { useContext as
|
|
4
|
+
import { useContext as u, useMemo as x } from "react";
|
|
5
5
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/StyleContext.mjs";
|
|
6
6
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/theme/createTheme.mjs";
|
|
7
7
|
import "../../../node_modules/.store/rc-util@5.39.1/node_modules/rc-util/es/warning.mjs";
|
|
@@ -9,75 +9,70 @@ import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@an
|
|
|
9
9
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.mjs";
|
|
10
10
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.mjs";
|
|
11
11
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useHMR.mjs";
|
|
12
|
-
import
|
|
12
|
+
import y from "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.mjs";
|
|
13
13
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/transformers/legacyLogicalProperties.mjs";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
const
|
|
17
|
-
const { theme:
|
|
18
|
-
var
|
|
14
|
+
import B from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
15
|
+
import N from "../../BitzTheme/index.mjs";
|
|
16
|
+
const O = () => {
|
|
17
|
+
const { theme: S, token: i, hashId: n } = N.useToken(), { tableSize: a, selected: T } = u(h), $ = x(() => a ?? "lg", [a]), r = "toolbarItem", l = "rowSelecting", m = "ToolbarItemBtn", f = (e, g, t, o) => {
|
|
18
|
+
var s, c, p, b, d;
|
|
19
19
|
return [
|
|
20
20
|
{
|
|
21
|
-
[`.${
|
|
21
|
+
[`.${e}`]: {
|
|
22
22
|
height: "100%",
|
|
23
23
|
paddingBlock: 0,
|
|
24
24
|
borderRadius: 0,
|
|
25
25
|
borderColor: "transparent",
|
|
26
26
|
display: "block",
|
|
27
27
|
"&:not(&:disabled):hover": {
|
|
28
|
-
color:
|
|
28
|
+
color: o.colorText
|
|
29
29
|
},
|
|
30
30
|
"&:not(&:disabled):focus": {
|
|
31
|
-
color:
|
|
31
|
+
color: o.colorText
|
|
32
32
|
},
|
|
33
33
|
".ant-btn-icon": {
|
|
34
34
|
marginInlineEnd: "6px !important"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
-
|
|
39
|
-
{
|
|
40
|
-
|
|
41
|
-
fontSize: (l = e.Table.xlTable) == null ? void 0 : l.fontSize
|
|
42
|
-
}
|
|
38
|
+
{
|
|
39
|
+
[`.${e}.${g}`]: {
|
|
40
|
+
color: "#fff !important"
|
|
43
41
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
{
|
|
47
|
-
|
|
48
|
-
fontSize: (s = e.Table.lgTable) == null ? void 0 : s.fontSize
|
|
49
|
-
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
[`.${e}.xl${t}`]: {
|
|
45
|
+
fontSize: (s = o.Table.xlTable) == null ? void 0 : s.fontSize
|
|
50
46
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
{
|
|
54
|
-
|
|
55
|
-
fontSize: (p = e.Table.mdTable) == null ? void 0 : p.fontSize
|
|
56
|
-
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
[`.${e}.lg${t}`]: {
|
|
50
|
+
fontSize: (c = o.Table.lgTable) == null ? void 0 : c.fontSize
|
|
57
51
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
{
|
|
61
|
-
|
|
62
|
-
fontSize: (b = e.Table.smTable) == null ? void 0 : b.fontSize
|
|
63
|
-
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
[`.${e}.md${t}`]: {
|
|
55
|
+
fontSize: (p = o.Table.mdTable) == null ? void 0 : p.fontSize
|
|
64
56
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
[`.${e}.sm${t}`]: {
|
|
60
|
+
fontSize: (b = o.Table.smTable) == null ? void 0 : b.fontSize
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
[`.${e}.xs${t}`]: {
|
|
65
|
+
fontSize: (d = o.Table.xsTable) == null ? void 0 : d.fontSize
|
|
71
66
|
}
|
|
72
|
-
|
|
67
|
+
}
|
|
73
68
|
];
|
|
74
69
|
};
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
y({ theme: S, token: i, hashId: n, path: [r] }, () => [
|
|
71
|
+
f(r, l, m, i)
|
|
77
72
|
]);
|
|
78
|
-
const
|
|
79
|
-
return { toolbarItemClassName:
|
|
73
|
+
const z = `${$}${m}`;
|
|
74
|
+
return { toolbarItemClassName: B(r, { [`${l}`]: T }, z, n) };
|
|
80
75
|
};
|
|
81
76
|
export {
|
|
82
|
-
|
|
77
|
+
O as default
|
|
83
78
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BitzTableProps } from './Table';
|
|
1
|
+
import { BitzTableProps, BitzTableRowSelectionProps } from './Table';
|
|
2
2
|
import BitzTableProvider, { BitzTableContext, DensitySize as BitzTableSizeType, StylesStateType, ColumnStateType, ExportColumnStateType } from './Store';
|
|
3
3
|
import SubTable from './SubTable';
|
|
4
4
|
import ActionBar from './ActionBar';
|
|
@@ -52,6 +52,8 @@ interface BitzTableColumnType<RecordType = any> extends ColumnsConfigProps, Tabl
|
|
|
52
52
|
isCheckboxCol?: boolean;
|
|
53
53
|
/** 是否为展开列 */
|
|
54
54
|
isExpandIconCol?: boolean;
|
|
55
|
+
/** 是否为拖拽列 */
|
|
56
|
+
isDragSortCol?: boolean;
|
|
55
57
|
/** 列宽根据内容宽度最大的设置(只应用在操作列上) */
|
|
56
58
|
useMaxWidth?: boolean;
|
|
57
59
|
}
|
|
@@ -68,6 +70,6 @@ type CompoundedComponent = React.ForwardRefExoticComponent<BitzTableProps> & {
|
|
|
68
70
|
ActionCol: typeof ActionCol;
|
|
69
71
|
};
|
|
70
72
|
declare const BitzTable: CompoundedComponent;
|
|
71
|
-
export type { BitzTableProps, BitzTableSizeType, ColumnsConfigProps, StylesStateType, ColumnStateType, ExportColumnStateType, BitzTableColumnType, BitzTableColumnGroupType, BitzTableColumnsType, ActionsFunType, Action, BitzTableActionProps, BitzTableActionColProps, };
|
|
73
|
+
export type { BitzTableProps, BitzTableRowSelectionProps, BitzTableSizeType, ColumnsConfigProps, StylesStateType, ColumnStateType, ExportColumnStateType, BitzTableColumnType, BitzTableColumnGroupType, BitzTableColumnsType, ActionsFunType, Action, BitzTableActionProps, BitzTableActionColProps, };
|
|
72
74
|
export { BitzTableProvider, BitzTableContext };
|
|
73
75
|
export default BitzTable;
|