bitz-react-admin-ui 2.1.9 → 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/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- 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.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 +5 -0
- package/dist/components/BitzTable/Table/index.mjs +265 -244
- 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 +2 -0
- 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/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
- 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,41 @@
|
|
|
1
1
|
import { j as t } 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
|
|
2
|
+
import { memo as u, useContext as f, useMemo as a } from "react";
|
|
3
|
+
import { Tooltip as p } from "antd";
|
|
4
|
+
import x from "../style.mjs";
|
|
5
|
+
import d from "../../../BitzButton/index.mjs";
|
|
6
6
|
import r from "../../../../node_modules/.store/screenfull@6.0.2/node_modules/screenfull/index.mjs";
|
|
7
|
-
import
|
|
8
|
-
import { findParentFirstNodeByClass as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
import b from "../../../BitzToast/index.mjs";
|
|
8
|
+
import { findParentFirstNodeByClass as j } from "../../../../utils/findNode.mjs";
|
|
9
|
+
import { BitzTableContext as B } from "../../Store/index.mjs";
|
|
10
|
+
import F 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";
|
|
12
|
+
const y = ({
|
|
13
|
+
order: l,
|
|
14
|
+
show: n = !0
|
|
14
15
|
}) => {
|
|
15
|
-
const { toolbarItemClassName:
|
|
16
|
+
const { toolbarItemClassName: i } = x(), { fullscreen: e } = f(B), o = a(() => e ? {
|
|
16
17
|
title: "退出全屏",
|
|
17
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
18
|
+
icon: /* @__PURE__ */ t.jsx(F, {})
|
|
18
19
|
} : {
|
|
19
20
|
title: "全屏",
|
|
20
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
21
|
-
}, [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
|
|
26
|
-
})), []);
|
|
27
|
-
const f = (o) => {
|
|
28
|
-
r.isEnabled || j.error("您的浏览器不支持全屏");
|
|
29
|
-
const e = h(o.target, "bitzTableBlock");
|
|
30
|
-
l ? r.exit() : r.request(e);
|
|
21
|
+
icon: /* @__PURE__ */ t.jsx(C, {})
|
|
22
|
+
}, [e]), s = (m) => {
|
|
23
|
+
r.isEnabled || b.error("您的浏览器不支持全屏");
|
|
24
|
+
const c = j(m.target, "bitzTableBlock");
|
|
25
|
+
e ? r.exit() : r.request(c);
|
|
31
26
|
};
|
|
32
|
-
return
|
|
33
|
-
|
|
27
|
+
return n ? /* @__PURE__ */ t.jsx(p, { title: o.title, open: !1, children: /* @__PURE__ */ t.jsx(
|
|
28
|
+
d,
|
|
34
29
|
{
|
|
35
30
|
type: "text",
|
|
36
|
-
className:
|
|
37
|
-
onClick:
|
|
38
|
-
icon:
|
|
39
|
-
style: { order:
|
|
40
|
-
children:
|
|
31
|
+
className: i,
|
|
32
|
+
onClick: s,
|
|
33
|
+
icon: o.icon,
|
|
34
|
+
style: { order: l },
|
|
35
|
+
children: o.title
|
|
41
36
|
}
|
|
42
37
|
) }) : null;
|
|
43
|
-
}, G =
|
|
38
|
+
}, G = u(y);
|
|
44
39
|
export {
|
|
45
40
|
G as default
|
|
46
41
|
};
|
|
@@ -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 l, useContext as a } from "react";
|
|
3
|
+
import { Tooltip as c } from "antd";
|
|
4
|
+
import p from "../style.mjs";
|
|
5
|
+
import f from "../../../BitzButton/index.mjs";
|
|
6
|
+
import { BitzTableContext as d } from "../../Store/index.mjs";
|
|
7
|
+
import u from "../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/ReloadOutlined.mjs";
|
|
8
|
+
const x = (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(u, {})
|
|
14
|
+
} = t, { loading: m } = a(d), { toolbarItemClassName: i } = p();
|
|
15
|
+
return s ? /* @__PURE__ */ o.jsx(c, { title: "刷新", open: !1, children: /* @__PURE__ */ o.jsx(
|
|
16
|
+
f,
|
|
17
17
|
{
|
|
18
18
|
type: "text",
|
|
19
|
-
className:
|
|
20
|
-
disabled:
|
|
21
|
-
onClick:
|
|
22
|
-
icon:
|
|
23
|
-
style: { order:
|
|
19
|
+
className: i,
|
|
20
|
+
disabled: m,
|
|
21
|
+
onClick: e,
|
|
22
|
+
icon: n,
|
|
23
|
+
style: { order: r },
|
|
24
24
|
children: "刷新"
|
|
25
25
|
}
|
|
26
26
|
) }) : null;
|
|
27
|
-
}, I =
|
|
27
|
+
}, I = l(x);
|
|
28
28
|
export {
|
|
29
29
|
I as default
|
|
30
30
|
};
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var c = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z" } }] }, name: "menu", theme: "outlined" };
|
|
2
|
+
const e = c;
|
|
3
|
+
export {
|
|
4
|
+
e as default
|
|
5
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import o from "../../../../../../@babel_runtime@7.24.4/node_modules/@babel/runtime/helpers/esm/extends.mjs";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
import i from "../../../../../../@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/MenuOutlined.mjs";
|
|
4
|
+
import u from "../components/AntdIcon.mjs";
|
|
5
|
+
var d = function(t, r) {
|
|
6
|
+
return /* @__PURE__ */ e.createElement(u, o({}, t, {
|
|
7
|
+
ref: r,
|
|
8
|
+
icon: i
|
|
9
|
+
}));
|
|
10
|
+
}, n = /* @__PURE__ */ e.forwardRef(d);
|
|
11
|
+
process.env.NODE_ENV !== "production" && (n.displayName = "MenuOutlined");
|
|
12
|
+
const l = n;
|
|
13
|
+
export {
|
|
14
|
+
l as default
|
|
15
|
+
};
|