bitz-react-admin-ui 1.7.4 → 1.7.6
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/BitzConfigProvider/context.d.ts +1 -1
- package/dist/components/BitzConfigProvider/index.d.ts +3 -0
- package/dist/components/BitzConfirmModal/index.d.ts +6 -5
- package/dist/components/BitzConfirmModal/index.mjs +33 -65
- package/dist/components/BitzFullScreen/index.d.ts +6 -1
- package/dist/components/BitzFullScreen/index.mjs +22 -14
- package/dist/components/BitzTable/Store/index.d.ts +20 -29
- package/dist/components/BitzTable/Store/utils/index.d.ts +2 -2
- package/dist/components/BitzTable/Table/index.mjs +255 -238
- package/dist/components/BitzTable/TableSkeleton/index.mjs +20 -19
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.d.ts +3 -2
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +21 -21
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.module.less.mjs +29 -29
- package/dist/components/BitzTable/ToolBar/DensityIcon/index.d.ts +3 -2
- package/dist/components/BitzTable/ToolBar/DensityIcon/index.mjs +14 -14
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.d.ts +1 -1
- package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.d.ts +2 -1
- package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +37 -34
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.d.ts +3 -2
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +19 -13
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +67 -43
- package/dist/components/BitzTable/ToolBar/index.d.ts +1 -1
- package/dist/components/BitzTable/index.d.ts +12 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,48 +1,49 @@
|
|
|
1
1
|
import { j as i } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { theme as
|
|
2
|
+
import { theme as _, Skeleton as L, Table as f } from "antd";
|
|
3
3
|
import O from "../../../node_modules/.store/antd@5.15.3/node_modules/antd/es/table/ExpandIcon.mjs";
|
|
4
|
-
import { useContext as R, useMemo as a, useRef as T, useEffect as
|
|
4
|
+
import { useContext as R, useMemo as a, useRef as T, useEffect as w } from "react";
|
|
5
5
|
import "../../../node_modules/.store/antd@5.15.3/node_modules/antd/es/config-provider/index.mjs";
|
|
6
|
-
import
|
|
7
|
-
import { ConfigContext as
|
|
8
|
-
const
|
|
6
|
+
import N from "../../../node_modules/.store/antd@5.15.3/node_modules/antd/locale/en_US.mjs";
|
|
7
|
+
import { ConfigContext as S } from "../../../node_modules/.store/antd@5.15.3/node_modules/antd/es/config-provider/context.mjs";
|
|
8
|
+
const q = ({
|
|
9
9
|
columns: s,
|
|
10
10
|
dataLength: c,
|
|
11
11
|
rowSelection: l,
|
|
12
12
|
expandable: o,
|
|
13
13
|
loading: r,
|
|
14
|
+
showTableTool: y,
|
|
14
15
|
...u
|
|
15
16
|
}) => {
|
|
16
17
|
var x;
|
|
17
|
-
const { token: m } =
|
|
18
|
+
const { token: m } = _.useToken(), { table: p, locale: C = N } = R(S), b = { ...C.Table }, k = ((x = p == null ? void 0 : p.expandable) == null ? void 0 : x.expandIcon) || (o == null ? void 0 : o.expandIcon) || O(b), I = a(() => {
|
|
18
19
|
if (!r)
|
|
19
20
|
return [];
|
|
20
21
|
const t = c > 4 ? c >= 20 ? 20 : c : 4;
|
|
21
22
|
return Array.from({ length: t }).map((e, n) => ({ index: n }));
|
|
22
|
-
}, [r, c]),
|
|
23
|
+
}, [r, c]), E = a(() => {
|
|
23
24
|
var t;
|
|
24
25
|
return (t = s == null ? void 0 : s.filter((e) => Object.keys(e).length !== 0)) == null ? void 0 : t.map((e) => e != null && e.isOperationCol ? e : {
|
|
25
26
|
...e,
|
|
26
27
|
sorter: !1,
|
|
27
|
-
render: (n,
|
|
28
|
+
render: (n, B, j) => /* @__PURE__ */ i.jsx(
|
|
28
29
|
L,
|
|
29
30
|
{
|
|
30
31
|
active: !0,
|
|
31
32
|
title: !1,
|
|
32
33
|
paragraph: {
|
|
33
34
|
rows: 1,
|
|
34
|
-
width: (
|
|
35
|
+
width: (j + 1) % 2 === 0 ? "100%" : "60%"
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
)
|
|
38
39
|
});
|
|
39
|
-
}, [s]),
|
|
40
|
+
}, [s]), g = a(() => {
|
|
40
41
|
if (o)
|
|
41
42
|
return {
|
|
42
43
|
...o,
|
|
43
44
|
expandedRowRender: () => /* @__PURE__ */ i.jsx(i.Fragment, {}),
|
|
44
45
|
expandIcon: (t) => {
|
|
45
|
-
const e =
|
|
46
|
+
const e = k(t);
|
|
46
47
|
return {
|
|
47
48
|
...e,
|
|
48
49
|
props: {
|
|
@@ -56,7 +57,7 @@ const U = ({
|
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
59
|
};
|
|
59
|
-
}, [o]),
|
|
60
|
+
}, [o]), h = a(() => {
|
|
60
61
|
if (l)
|
|
61
62
|
return {
|
|
62
63
|
...l,
|
|
@@ -64,7 +65,7 @@ const U = ({
|
|
|
64
65
|
getCheckboxProps: () => ({ disabled: !0 })
|
|
65
66
|
};
|
|
66
67
|
}, [l]), d = T();
|
|
67
|
-
return
|
|
68
|
+
return w(() => {
|
|
68
69
|
var e, n;
|
|
69
70
|
const t = (n = (e = d.current) == null ? void 0 : e.nativeElement) == null ? void 0 : n.querySelector(".ant-table-body");
|
|
70
71
|
t && (t.scrollLeft = 0);
|
|
@@ -73,18 +74,18 @@ const U = ({
|
|
|
73
74
|
{
|
|
74
75
|
...u,
|
|
75
76
|
ref: d,
|
|
76
|
-
expandable:
|
|
77
|
-
rowSelection:
|
|
77
|
+
expandable: g,
|
|
78
|
+
rowSelection: h,
|
|
78
79
|
pagination: !1,
|
|
79
|
-
columns: [f.SELECTION_COLUMN, f.EXPAND_COLUMN, ...
|
|
80
|
+
columns: [f.SELECTION_COLUMN, f.EXPAND_COLUMN, ...E],
|
|
80
81
|
rowKey: "index",
|
|
81
|
-
dataSource:
|
|
82
|
+
dataSource: I,
|
|
82
83
|
loading: !1,
|
|
83
84
|
style: {
|
|
84
85
|
...u.style,
|
|
85
86
|
position: "absolute",
|
|
86
87
|
inset: 0,
|
|
87
|
-
top:
|
|
88
|
+
top: y ? "var(--toolbar-height)" : 0,
|
|
88
89
|
zIndex: r ? 100 : -1,
|
|
89
90
|
/** 保险起见,使用了zIndex也要用opacity控制显隐 */
|
|
90
91
|
opacity: r ? 1 : 0,
|
|
@@ -94,5 +95,5 @@ const U = ({
|
|
|
94
95
|
);
|
|
95
96
|
};
|
|
96
97
|
export {
|
|
97
|
-
|
|
98
|
+
q as default
|
|
98
99
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface ColumnSettingProps {
|
|
3
|
+
order?: number;
|
|
4
|
+
show?: boolean;
|
|
3
5
|
icon?: React.ReactNode;
|
|
4
6
|
onChange?: (columns: any) => void;
|
|
5
|
-
order: number;
|
|
6
7
|
}
|
|
7
|
-
declare const _default: React.MemoExoticComponent<(props: ColumnSettingProps) => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
declare const _default: React.MemoExoticComponent<(props: ColumnSettingProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
8
9
|
export default _default;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { j as t } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
import { show as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
2
|
+
import u, { useContext as c } from "react";
|
|
3
|
+
import { Tooltip as d } from "antd";
|
|
4
|
+
import { show as f } from "@ebay/nice-modal-react";
|
|
5
|
+
import C from "./ColumnSettingModal.mjs";
|
|
6
|
+
import x from "../style.mjs";
|
|
7
|
+
import h from "../../../BitzButton/index.mjs";
|
|
8
8
|
import { TableContext as g } from "../../Store/index.mjs";
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
const { order: m,
|
|
12
|
-
|
|
9
|
+
import j from "../../../../node_modules/.store/@ant-design_icons@5.3.3/node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs";
|
|
10
|
+
const S = (o) => {
|
|
11
|
+
const { order: m, show: i = !0, icon: l = /* @__PURE__ */ t.jsx(j, {}) } = o, { toolbarItemClassName: r } = x(), { uuid: e } = c(g), s = () => {
|
|
12
|
+
f(`ColumnSettingModal-${e}`).then((a) => {
|
|
13
13
|
var n;
|
|
14
|
-
(n = o.onChange) == null || n.call(o,
|
|
14
|
+
(n = o.onChange) == null || n.call(o, a);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
|
-
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
18
|
-
/* @__PURE__ */ t.jsx(
|
|
19
|
-
/* @__PURE__ */ t.jsx(
|
|
20
|
-
|
|
17
|
+
return i ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
18
|
+
/* @__PURE__ */ t.jsx(C, { id: `ColumnSettingModal-${e}` }),
|
|
19
|
+
/* @__PURE__ */ t.jsx(d, { title: "列设置", open: !1, children: /* @__PURE__ */ t.jsx(
|
|
20
|
+
h,
|
|
21
21
|
{
|
|
22
22
|
type: "text",
|
|
23
|
-
className:
|
|
24
|
-
onClick:
|
|
25
|
-
icon:
|
|
23
|
+
className: r,
|
|
24
|
+
onClick: s,
|
|
25
|
+
icon: l,
|
|
26
26
|
style: { order: m },
|
|
27
27
|
children: "列设置"
|
|
28
28
|
}
|
|
29
29
|
) })
|
|
30
|
-
] });
|
|
31
|
-
},
|
|
30
|
+
] }) : null;
|
|
31
|
+
}, N = u.memo(S);
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
N as default
|
|
34
34
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
const
|
|
2
|
-
introduce:
|
|
3
|
-
block:
|
|
4
|
-
body:
|
|
5
|
-
container:
|
|
6
|
-
header:
|
|
1
|
+
const e = "_introduce_e5ppq_1", t = "_block_e5ppq_8", _ = "_body_e5ppq_13", n = "_container_e5ppq_16", o = "_header_e5ppq_23", c = "_title_e5ppq_32", p = "_content_e5ppq_47", i = "_item_e5ppq_53", s = "_checked_e5ppq_62", d = "_moveItem_e5ppq_74", m = "_isDragging_e5ppq_88", a = "_disabled_e5ppq_91", q = "_moveItemShanchu_e5ppq_102", l = {
|
|
2
|
+
introduce: e,
|
|
3
|
+
block: t,
|
|
4
|
+
body: _,
|
|
5
|
+
container: n,
|
|
6
|
+
header: o,
|
|
7
7
|
title: c,
|
|
8
|
-
content:
|
|
9
|
-
item:
|
|
10
|
-
checked:
|
|
11
|
-
"content-item-text": "_content-item-
|
|
12
|
-
"content-item-text-disabled": "_content-item-text-
|
|
13
|
-
moveItem:
|
|
14
|
-
isDragging:
|
|
15
|
-
disabled:
|
|
16
|
-
"moveItem-text": "_moveItem-
|
|
17
|
-
moveItemShanchu:
|
|
8
|
+
content: p,
|
|
9
|
+
item: i,
|
|
10
|
+
checked: s,
|
|
11
|
+
"content-item-text": "_content-item-text_e5ppq_65",
|
|
12
|
+
"content-item-text-disabled": "_content-item-text-disabled_e5ppq_71",
|
|
13
|
+
moveItem: d,
|
|
14
|
+
isDragging: m,
|
|
15
|
+
disabled: a,
|
|
16
|
+
"moveItem-text": "_moveItem-text_e5ppq_95",
|
|
17
|
+
moveItemShanchu: q
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
t as block,
|
|
21
|
+
_ as body,
|
|
22
|
+
s as checked,
|
|
23
|
+
n as container,
|
|
24
|
+
p as content,
|
|
25
|
+
l as default,
|
|
26
|
+
a as disabled,
|
|
27
|
+
o as header,
|
|
28
|
+
e as introduce,
|
|
29
|
+
m as isDragging,
|
|
30
|
+
i as item,
|
|
31
|
+
d as moveItem,
|
|
32
|
+
q as moveItemShanchu,
|
|
33
33
|
c as title
|
|
34
34
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DensitySize } from '../../Store';
|
|
3
3
|
interface DensityIconProps {
|
|
4
|
-
order
|
|
4
|
+
order?: number;
|
|
5
|
+
show?: boolean;
|
|
5
6
|
icon?: ReactNode;
|
|
6
7
|
onChange?: (size: DensitySize) => void;
|
|
7
8
|
}
|
|
8
|
-
declare const _default: import("react").MemoExoticComponent<(props: DensityIconProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
|
+
declare const _default: import("react").MemoExoticComponent<(props: DensityIconProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
9
10
|
export default _default;
|
|
@@ -1,16 +1,16 @@
|
|
|
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 { Dropdown as
|
|
2
|
+
import { memo as d, useContext as y } from "react";
|
|
3
|
+
import { Dropdown as u, Tooltip as b } from "antd";
|
|
4
4
|
import { TableContext as f } from "../../Store/index.mjs";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import k from "../style.mjs";
|
|
6
|
+
import h from "../../../BitzButton/index.mjs";
|
|
7
7
|
import j from "../../../../node_modules/.store/@ant-design_icons@5.3.3/node_modules/@ant-design/icons/es/icons/ColumnHeightOutlined.mjs";
|
|
8
8
|
const C = (e) => {
|
|
9
|
-
const { order: m,
|
|
9
|
+
const { order: m, show: s = !0, icon: r = /* @__PURE__ */ o.jsx(j, {}) } = e, t = y(f), { toolbarItemClassName: a } = k(), c = {
|
|
10
10
|
selectedKeys: [t.tableSize],
|
|
11
|
-
onClick: ({ key:
|
|
11
|
+
onClick: ({ key: x }) => {
|
|
12
12
|
var n, i;
|
|
13
|
-
const l =
|
|
13
|
+
const l = x;
|
|
14
14
|
(n = t.setTableSize) == null || n.call(t, l), (i = e == null ? void 0 : e.onChange) == null || i.call(e, l);
|
|
15
15
|
},
|
|
16
16
|
items: [
|
|
@@ -36,17 +36,17 @@ const C = (e) => {
|
|
|
36
36
|
}
|
|
37
37
|
]
|
|
38
38
|
};
|
|
39
|
-
return /* @__PURE__ */ o.jsx(
|
|
40
|
-
|
|
39
|
+
return s ? /* @__PURE__ */ o.jsx(u, { menu: c, trigger: ["click"], children: /* @__PURE__ */ o.jsx(b, { title: "表格密度", open: !1, children: /* @__PURE__ */ o.jsx(
|
|
40
|
+
h,
|
|
41
41
|
{
|
|
42
42
|
style: { order: m },
|
|
43
43
|
type: "text",
|
|
44
|
-
className:
|
|
45
|
-
icon:
|
|
44
|
+
className: a,
|
|
45
|
+
icon: r,
|
|
46
46
|
children: "表格密度"
|
|
47
47
|
}
|
|
48
|
-
) }) });
|
|
49
|
-
},
|
|
48
|
+
) }) }) : null;
|
|
49
|
+
}, B = d(C);
|
|
50
50
|
export {
|
|
51
|
-
|
|
51
|
+
B as default
|
|
52
52
|
};
|
|
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { BitzDropdownToButtonProps } from '@/components/BitzConvert';
|
|
3
3
|
import { ExportEvent } from '..';
|
|
4
4
|
interface ExportIconProps extends Pick<BitzDropdownToButtonProps, 'menu' | 'tipText'> {
|
|
5
|
-
order
|
|
5
|
+
order?: number;
|
|
6
6
|
icon?: ReactNode;
|
|
7
7
|
loading?: boolean;
|
|
8
8
|
/** 是否显示导出icon */
|
|
@@ -1,53 +1,56 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { j as o } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { memo as p, useState as x, useMemo as b, useEffect as E } from "react";
|
|
3
|
+
import { Tooltip as B } from "antd";
|
|
4
|
+
import F from "../style.mjs";
|
|
5
|
+
import j from "../../../BitzButton/index.mjs";
|
|
6
6
|
import c from "../../../../node_modules/.store/screenfull@6.0.2/node_modules/screenfull/index.mjs";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
function
|
|
11
|
-
if (t.classList.contains(
|
|
7
|
+
import h from "../../../BitzToast/index.mjs";
|
|
8
|
+
import v from "../../../../node_modules/.store/@ant-design_icons@5.3.3/node_modules/@ant-design/icons/es/icons/FullscreenExitOutlined.mjs";
|
|
9
|
+
import z from "../../../../node_modules/.store/@ant-design_icons@5.3.3/node_modules/@ant-design/icons/es/icons/FullscreenOutlined.mjs";
|
|
10
|
+
function m(t, n) {
|
|
11
|
+
if (t.classList.contains(n))
|
|
12
12
|
return t;
|
|
13
|
-
var
|
|
14
|
-
if (
|
|
15
|
-
var
|
|
16
|
-
if (
|
|
17
|
-
return
|
|
13
|
+
var r = t.parentNode;
|
|
14
|
+
if (r) {
|
|
15
|
+
var e = m(r, n);
|
|
16
|
+
if (e)
|
|
17
|
+
return e;
|
|
18
18
|
}
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const L = ({
|
|
22
|
+
order: t,
|
|
23
|
+
show: n = !0
|
|
24
|
+
}) => {
|
|
25
|
+
const { toolbarItemClassName: r } = F(), [e, u] = x(!1), s = b(() => e ? {
|
|
23
26
|
title: "退出全屏",
|
|
24
|
-
icon: /* @__PURE__ */
|
|
27
|
+
icon: /* @__PURE__ */ o.jsx(v, {})
|
|
25
28
|
} : {
|
|
26
29
|
title: "全屏",
|
|
27
|
-
icon: /* @__PURE__ */
|
|
30
|
+
icon: /* @__PURE__ */ o.jsx(z, {})
|
|
28
31
|
}, [e]);
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
(
|
|
32
|
+
E(() => (document == null || document.addEventListener("fullscreenchange", (i) => {
|
|
33
|
+
var l, a, f;
|
|
34
|
+
(l = i.target) != null && l.classList.contains("bitzTableBlock") && (u(!!document.fullscreenElement), (f = (a = document.fullscreenElement) == null ? void 0 : a.classList) != null && f.contains("bitzTableBlock") || u(!1));
|
|
32
35
|
}), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
|
|
33
36
|
})), []);
|
|
34
|
-
const
|
|
35
|
-
c.isEnabled ||
|
|
36
|
-
const
|
|
37
|
-
e ? c.exit() : c.request(
|
|
37
|
+
const d = (i) => {
|
|
38
|
+
c.isEnabled || h.error("您的浏览器不支持全屏");
|
|
39
|
+
const l = m(i.target, "bitzTableBlock");
|
|
40
|
+
e ? c.exit() : c.request(l);
|
|
38
41
|
};
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
|
|
42
|
+
return n ? /* @__PURE__ */ o.jsx(B, { title: s.title, open: !1, children: /* @__PURE__ */ o.jsx(
|
|
43
|
+
j,
|
|
41
44
|
{
|
|
42
45
|
type: "text",
|
|
43
46
|
className: r,
|
|
44
|
-
onClick:
|
|
45
|
-
icon:
|
|
47
|
+
onClick: d,
|
|
48
|
+
icon: s.icon,
|
|
46
49
|
style: { order: t },
|
|
47
|
-
children:
|
|
50
|
+
children: s.title
|
|
48
51
|
}
|
|
49
|
-
) });
|
|
50
|
-
},
|
|
52
|
+
) }) : null;
|
|
53
|
+
}, q = p(L);
|
|
51
54
|
export {
|
|
52
|
-
|
|
55
|
+
q as default
|
|
53
56
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
interface RefreshIconProps {
|
|
3
|
-
order
|
|
3
|
+
order?: number;
|
|
4
|
+
show?: boolean;
|
|
4
5
|
icon?: ReactNode;
|
|
5
6
|
loading?: boolean;
|
|
6
7
|
onClick?: MouseEventHandler;
|
|
7
8
|
}
|
|
8
|
-
declare const _default: import("react").MemoExoticComponent<(props: RefreshIconProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
|
+
declare const _default: import("react").MemoExoticComponent<(props: RefreshIconProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
9
10
|
export default _default;
|
|
@@ -1,24 +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
|
-
const
|
|
8
|
-
const {
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { memo as i } from "react";
|
|
3
|
+
import { Tooltip as a } from "antd";
|
|
4
|
+
import c from "../style.mjs";
|
|
5
|
+
import p from "../../../BitzButton/index.mjs";
|
|
6
|
+
import f from "../../../../node_modules/.store/@ant-design_icons@5.3.3/node_modules/@ant-design/icons/es/icons/ReloadOutlined.mjs";
|
|
7
|
+
const d = (t) => {
|
|
8
|
+
const {
|
|
9
|
+
loading: e,
|
|
10
|
+
onClick: r,
|
|
11
|
+
order: s,
|
|
12
|
+
show: l = !0,
|
|
13
|
+
icon: m = /* @__PURE__ */ o.jsx(f, {})
|
|
14
|
+
} = t, { toolbarItemClassName: n } = c();
|
|
15
|
+
return l ? /* @__PURE__ */ o.jsx(a, { title: "刷新", open: !1, children: /* @__PURE__ */ o.jsx(
|
|
16
|
+
p,
|
|
11
17
|
{
|
|
12
18
|
type: "text",
|
|
13
|
-
className:
|
|
19
|
+
className: n,
|
|
14
20
|
disabled: e,
|
|
15
21
|
onClick: r,
|
|
16
22
|
icon: m,
|
|
17
23
|
style: { order: s },
|
|
18
24
|
children: "刷新"
|
|
19
25
|
}
|
|
20
|
-
) });
|
|
21
|
-
},
|
|
26
|
+
) }) : null;
|
|
27
|
+
}, I = i(d);
|
|
22
28
|
export {
|
|
23
|
-
|
|
29
|
+
I as default
|
|
24
30
|
};
|
|
@@ -1,59 +1,83 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { Space as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { BitzConfigContext as
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { memo as w, useContext as x, useMemo as l } from "react";
|
|
3
|
+
import { Space as a } from "antd";
|
|
4
|
+
import u from "../RefreshIcon/index.mjs";
|
|
5
|
+
import C from "../ColConfigIcon/index.mjs";
|
|
6
|
+
import g from "../DensityIcon/index.mjs";
|
|
7
|
+
import j from "../FullscreenIcon/index.mjs";
|
|
8
|
+
import z from "../ExportIcon/index.mjs";
|
|
9
|
+
import { BitzConfigContext as I } from "../../../BitzConfigProvider/context.mjs";
|
|
10
|
+
const B = [
|
|
11
|
+
"export",
|
|
12
|
+
"refresh",
|
|
13
|
+
"size",
|
|
14
|
+
"fullscreen",
|
|
15
|
+
"colConfig"
|
|
16
|
+
], E = ({
|
|
17
|
+
size: k,
|
|
18
|
+
tools: c,
|
|
19
|
+
loading: f,
|
|
20
|
+
onExport: i,
|
|
21
|
+
onRefresh: h,
|
|
22
|
+
onSizeChange: m,
|
|
23
|
+
onColumnChange: d
|
|
18
24
|
}) => {
|
|
19
|
-
const { Table:
|
|
20
|
-
const
|
|
21
|
-
export: 1,
|
|
22
|
-
refresh: 2,
|
|
23
|
-
size: 3,
|
|
24
|
-
fullscreen: 4,
|
|
25
|
-
colConfig: 5
|
|
25
|
+
const { Table: r } = x(I), s = l(() => c || (r == null ? void 0 : r.toolbar) || B, [r == null ? void 0 : r.toolbar]), o = l(() => {
|
|
26
|
+
const t = {
|
|
27
|
+
export: { order: 1, show: !1 },
|
|
28
|
+
refresh: { order: 2, show: !1 },
|
|
29
|
+
size: { order: 3, show: !1 },
|
|
30
|
+
fullscreen: { order: 4, show: !1 },
|
|
31
|
+
colConfig: { order: 5, show: !1 }
|
|
26
32
|
};
|
|
27
|
-
return s.forEach((
|
|
33
|
+
return s.forEach((n, p) => {
|
|
34
|
+
t[n].order = p + 1, t[n].show = s.includes(n);
|
|
35
|
+
}), t;
|
|
28
36
|
}, [s]);
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
|
|
37
|
+
return /* @__PURE__ */ e.jsxs(a.Compact, { style: { height: "100%" }, children: [
|
|
38
|
+
/* @__PURE__ */ e.jsx(
|
|
39
|
+
z,
|
|
32
40
|
{
|
|
33
|
-
order:
|
|
34
|
-
|
|
35
|
-
|
|
41
|
+
order: o.export.order,
|
|
42
|
+
show: o.export.show,
|
|
43
|
+
loading: f,
|
|
44
|
+
onClick: i
|
|
36
45
|
}
|
|
37
46
|
),
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
47
|
+
/* @__PURE__ */ e.jsx(
|
|
48
|
+
u,
|
|
40
49
|
{
|
|
41
|
-
order:
|
|
42
|
-
|
|
43
|
-
|
|
50
|
+
order: o.refresh.order,
|
|
51
|
+
show: o.refresh.show,
|
|
52
|
+
loading: f,
|
|
53
|
+
onClick: h
|
|
44
54
|
}
|
|
45
55
|
),
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */ r.jsx(z, { order: e.fullscreen }),
|
|
48
|
-
/* @__PURE__ */ r.jsx(
|
|
56
|
+
/* @__PURE__ */ e.jsx(
|
|
49
57
|
g,
|
|
50
58
|
{
|
|
51
|
-
order:
|
|
52
|
-
|
|
59
|
+
order: o.size.order,
|
|
60
|
+
show: o.size.show,
|
|
61
|
+
onChange: m
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ e.jsx(
|
|
65
|
+
j,
|
|
66
|
+
{
|
|
67
|
+
order: o.fullscreen.order,
|
|
68
|
+
show: o.fullscreen.show
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ e.jsx(
|
|
72
|
+
C,
|
|
73
|
+
{
|
|
74
|
+
order: o.colConfig.order,
|
|
75
|
+
show: o.colConfig.show,
|
|
76
|
+
onChange: d
|
|
53
77
|
}
|
|
54
78
|
)
|
|
55
79
|
] });
|
|
56
|
-
},
|
|
80
|
+
}, A = w(E);
|
|
57
81
|
export {
|
|
58
|
-
|
|
82
|
+
A as default
|
|
59
83
|
};
|
|
@@ -5,9 +5,9 @@ import ColConfigIcon from './ColConfigIcon';
|
|
|
5
5
|
import { DensitySize } from '../Store';
|
|
6
6
|
import { MouseEventHandler } from 'react';
|
|
7
7
|
import FullscreenIcon from './FullscreenIcon';
|
|
8
|
+
import { ToolEnum } from '@/components/BitzConfigProvider/context';
|
|
8
9
|
export type MenuKeysType = 'excel';
|
|
9
10
|
export type ExportEvent = (key: MenuKeysType) => void;
|
|
10
|
-
export type ToolEnum = 'export' | 'refresh' | 'size' | 'fullscreen' | 'colConfig';
|
|
11
11
|
export interface BitzTableToolBarProps {
|
|
12
12
|
size?: DensitySize;
|
|
13
13
|
/** 控制tool按钮的排序和显隐,根据索引排序,不在tools数组中的不显示 */
|