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
package/dist/_virtual/index.mjs
CHANGED
package/dist/_virtual/index2.mjs
CHANGED
|
@@ -2,29 +2,29 @@ import { j as o } from "../../../node_modules/.store/react@18.2.0/node_modules/r
|
|
|
2
2
|
import { useMemo as b } from "react";
|
|
3
3
|
import { Space as u } from "antd";
|
|
4
4
|
import f from "../../BitzButton/index.mjs";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
5
|
+
import E from "./style.mjs";
|
|
6
|
+
import c from "../Dropdown/index.mjs";
|
|
7
|
+
import g from "../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/PlusCircleFilled.mjs";
|
|
8
|
+
import w from "../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CaretDownOutlined.mjs";
|
|
9
|
+
const F = ({
|
|
10
10
|
size: h,
|
|
11
11
|
add: i,
|
|
12
12
|
excel: t,
|
|
13
|
-
children:
|
|
13
|
+
children: C
|
|
14
14
|
}) => {
|
|
15
|
-
const { blockCls:
|
|
16
|
-
var
|
|
15
|
+
const { blockCls: d, addBtnClassName: j, btnClassName: k } = E(h), y = b(() => {
|
|
16
|
+
var n, r, s, m, a, e, l, p;
|
|
17
17
|
return [
|
|
18
18
|
{
|
|
19
|
-
key: ((r = (
|
|
20
|
-
label: ((m = (
|
|
19
|
+
key: ((r = (n = t.menu) == null ? void 0 : n[0]) == null ? void 0 : r.key) || "download",
|
|
20
|
+
label: ((m = (s = t.menu) == null ? void 0 : s[0]) == null ? void 0 : m.label) || "Excel模板下载"
|
|
21
21
|
// icon: excel.menu?.[0]?.icon || (
|
|
22
22
|
// <CloudDownloadOutlined style={{ fontSize: 14 }} />
|
|
23
23
|
// ),
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
key: ((
|
|
27
|
-
label: ((
|
|
26
|
+
key: ((e = (a = t.menu) == null ? void 0 : a[1]) == null ? void 0 : e.key) || "import",
|
|
27
|
+
label: ((p = (l = t.menu) == null ? void 0 : l[1]) == null ? void 0 : p.label) || "Excel数据导入"
|
|
28
28
|
// icon: excel.menu?.[1]?.icon || (
|
|
29
29
|
// <CloudUploadOutlined style={{ fontSize: 14 }} />
|
|
30
30
|
// ),
|
|
@@ -32,34 +32,38 @@ const G = ({
|
|
|
32
32
|
...(t == null ? void 0 : t.otherMenu) ?? []
|
|
33
33
|
];
|
|
34
34
|
}, [t]);
|
|
35
|
-
return /* @__PURE__ */ o.jsxs(u.Compact, { className:
|
|
35
|
+
return /* @__PURE__ */ o.jsxs(u.Compact, { className: d, style: { height: "100%" }, children: [
|
|
36
36
|
i.show !== !1 && /* @__PURE__ */ o.jsx(
|
|
37
37
|
f,
|
|
38
38
|
{
|
|
39
39
|
type: "primary",
|
|
40
|
-
icon: /* @__PURE__ */ o.jsx(
|
|
40
|
+
icon: /* @__PURE__ */ o.jsx(g, {}),
|
|
41
41
|
onClick: i.onClick,
|
|
42
|
-
className:
|
|
42
|
+
className: j,
|
|
43
43
|
children: i.text
|
|
44
44
|
}
|
|
45
45
|
),
|
|
46
|
-
|
|
46
|
+
C,
|
|
47
47
|
t.show !== !1 && /* @__PURE__ */ o.jsx(
|
|
48
|
-
|
|
48
|
+
c,
|
|
49
49
|
{
|
|
50
|
-
menu: { items: y, onClick: ({ key:
|
|
50
|
+
menu: { items: y, onClick: ({ key: n }) => {
|
|
51
51
|
var r;
|
|
52
|
-
return (r = t.onClick) == null ? void 0 : r.call(t,
|
|
52
|
+
return (r = t.onClick) == null ? void 0 : r.call(t, n);
|
|
53
53
|
} },
|
|
54
54
|
trigger: (t == null ? void 0 : t.trigger) || ["click"],
|
|
55
|
-
|
|
55
|
+
getPopupContainer: (n) => {
|
|
56
|
+
var r, s;
|
|
57
|
+
return (s = (r = n.parentElement) == null ? void 0 : r.parentElement) == null ? void 0 : s.parentElement;
|
|
58
|
+
},
|
|
59
|
+
children: /* @__PURE__ */ o.jsx(f, { className: k, type: "text", children: /* @__PURE__ */ o.jsxs(u, { size: 6, children: [
|
|
56
60
|
/* @__PURE__ */ o.jsx("span", { children: t.text ?? "Excel文档导入" }),
|
|
57
|
-
/* @__PURE__ */ o.jsx(
|
|
61
|
+
/* @__PURE__ */ o.jsx(w, {})
|
|
58
62
|
] }) })
|
|
59
63
|
}
|
|
60
64
|
)
|
|
61
65
|
] });
|
|
62
66
|
};
|
|
63
67
|
export {
|
|
64
|
-
|
|
68
|
+
F as default
|
|
65
69
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BitzTableActionProps, BitzTableColumnType, BitzTableActionColProps } from '..';
|
|
2
|
-
export declare function BitzTableAction<T>({
|
|
2
|
+
export declare function BitzTableAction<T>({ actionGroup, refInstance, }: BitzTableActionProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
/** 表格操作列 */
|
|
4
4
|
declare function BitzTableActionCol<T>(props: BitzTableActionColProps<T>): BitzTableColumnType<T>;
|
|
5
5
|
export default BitzTableActionCol;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { j as t } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import
|
|
3
|
-
import { Space as
|
|
4
|
-
import { useRef as
|
|
2
|
+
import B from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
|
|
3
|
+
import { Space as w, Skeleton as y } from "antd";
|
|
4
|
+
import { useRef as z, useMemo as C, useContext as S } from "react";
|
|
5
5
|
import p from "../../BitzButton/index.mjs";
|
|
6
|
-
import
|
|
6
|
+
import b from "./style.mjs";
|
|
7
|
+
import "../index.mjs";
|
|
7
8
|
import N from "../Dropdown/index.mjs";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
import { BitzTableContext as I } from "../Store/index.mjs";
|
|
10
|
+
const k = ({
|
|
11
|
+
skeletonCls: s,
|
|
12
|
+
...l
|
|
13
|
+
}) => /* @__PURE__ */ t.jsxs(p, { type: "text", ...l, children: [
|
|
14
|
+
/* @__PURE__ */ t.jsx("span", { children: l.children }),
|
|
13
15
|
/* @__PURE__ */ t.jsx(
|
|
14
|
-
|
|
16
|
+
y,
|
|
15
17
|
{
|
|
16
18
|
active: !0,
|
|
17
19
|
title: !1,
|
|
18
|
-
className:
|
|
20
|
+
className: s,
|
|
19
21
|
paragraph: {
|
|
20
22
|
rows: 1,
|
|
21
23
|
width: "100%"
|
|
@@ -23,74 +25,73 @@ const g = ({
|
|
|
23
25
|
}
|
|
24
26
|
)
|
|
25
27
|
] });
|
|
26
|
-
function
|
|
27
|
-
loading: n,
|
|
28
|
+
function R({
|
|
28
29
|
actionGroup: s,
|
|
29
|
-
refInstance:
|
|
30
|
+
refInstance: l
|
|
30
31
|
}) {
|
|
31
|
-
const {
|
|
32
|
-
gap:
|
|
33
|
-
primaryBtnClassName:
|
|
34
|
-
dangerBtnClassName:
|
|
35
|
-
dropdownBtnClassName:
|
|
36
|
-
maskClassName:
|
|
37
|
-
skeletonBtnClassName:
|
|
38
|
-
skeletonClassName:
|
|
39
|
-
} =
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
const { loading: r, fullscreen: h } = S(I), {
|
|
33
|
+
gap: a,
|
|
34
|
+
primaryBtnClassName: n,
|
|
35
|
+
dangerBtnClassName: i,
|
|
36
|
+
dropdownBtnClassName: j,
|
|
37
|
+
maskClassName: g,
|
|
38
|
+
skeletonBtnClassName: c,
|
|
39
|
+
skeletonClassName: m
|
|
40
|
+
} = b(), u = C(() => {
|
|
41
|
+
const o = s.length >= 4 ? 2 : s.length, d = s.slice(0, o), x = [];
|
|
42
|
+
if (d != null && d.length && d.forEach((e, f) => {
|
|
43
|
+
x.push(
|
|
44
|
+
r ? /* @__PURE__ */ t.jsx(
|
|
45
|
+
k,
|
|
45
46
|
{
|
|
46
|
-
className:
|
|
47
|
-
skeletonCls:
|
|
47
|
+
className: c,
|
|
48
|
+
skeletonCls: m,
|
|
48
49
|
children: e == null ? void 0 : e.label
|
|
49
50
|
},
|
|
50
|
-
|
|
51
|
+
f
|
|
51
52
|
) : e.children ? /* @__PURE__ */ t.jsx(N, { menu: { items: e.children }, children: /* @__PURE__ */ t.jsx(
|
|
52
53
|
p,
|
|
53
54
|
{
|
|
54
55
|
type: "text",
|
|
55
|
-
className: e.danger ?
|
|
56
|
+
className: e.danger ? i : n,
|
|
56
57
|
children: e == null ? void 0 : e.label
|
|
57
58
|
}
|
|
58
|
-
) },
|
|
59
|
+
) }, f) : /* @__PURE__ */ t.jsx(
|
|
59
60
|
p,
|
|
60
61
|
{
|
|
61
62
|
type: "text",
|
|
62
|
-
className: e.danger ?
|
|
63
|
+
className: e.danger ? i : n,
|
|
63
64
|
onClick: e == null ? void 0 : e.onClick,
|
|
64
65
|
children: e == null ? void 0 : e.label
|
|
65
66
|
},
|
|
66
|
-
|
|
67
|
+
f
|
|
67
68
|
)
|
|
68
69
|
);
|
|
69
|
-
}),
|
|
70
|
+
}), o === 2 && s.length >= 4) {
|
|
70
71
|
const e = s.slice(2, s.length);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
x.push(
|
|
73
|
+
r ? /* @__PURE__ */ t.jsx(
|
|
74
|
+
k,
|
|
74
75
|
{
|
|
75
|
-
className:
|
|
76
|
-
skeletonCls:
|
|
76
|
+
className: c,
|
|
77
|
+
skeletonCls: m,
|
|
77
78
|
children: "更多"
|
|
78
79
|
},
|
|
79
80
|
5
|
|
80
|
-
) : /* @__PURE__ */ t.jsx(N, { menu: { items: e }, children: /* @__PURE__ */ t.jsx(p, { type: "text", className:
|
|
81
|
+
) : /* @__PURE__ */ t.jsx(N, { menu: { items: e }, children: /* @__PURE__ */ t.jsx(p, { type: "text", className: j, children: "更多" }) }, 5)
|
|
81
82
|
);
|
|
82
83
|
}
|
|
83
|
-
return
|
|
84
|
-
}, [
|
|
85
|
-
return /* @__PURE__ */ t.jsxs("div", { onClick: (
|
|
86
|
-
/* @__PURE__ */ t.jsx(
|
|
87
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
84
|
+
return x;
|
|
85
|
+
}, [r, s]);
|
|
86
|
+
return /* @__PURE__ */ t.jsxs("div", { onClick: (o) => o.stopPropagation(), children: [
|
|
87
|
+
/* @__PURE__ */ t.jsx(w, { size: a, ref: l, className: "actionGroup", children: u }),
|
|
88
|
+
/* @__PURE__ */ t.jsx("div", { className: g })
|
|
88
89
|
] });
|
|
89
90
|
}
|
|
90
|
-
function
|
|
91
|
-
const { actionGroup:
|
|
91
|
+
function q(s) {
|
|
92
|
+
const { actionGroup: l, ...r } = s, { gap: h } = b(), a = z(null), n = B(a), i = C(() => n != null && n.width ? n.width + h * 2 + 1 : 181, [n, h]);
|
|
92
93
|
return C(() => ({
|
|
93
|
-
width: Math.floor(
|
|
94
|
+
width: Math.floor(i),
|
|
94
95
|
mobileHide: !0,
|
|
95
96
|
isOperationCol: !0,
|
|
96
97
|
title: "操作",
|
|
@@ -99,23 +100,22 @@ function D(n) {
|
|
|
99
100
|
dataIndex: "operationCol",
|
|
100
101
|
className: "operationCol",
|
|
101
102
|
disabled: !0,
|
|
102
|
-
render: (
|
|
103
|
-
const
|
|
104
|
-
(
|
|
103
|
+
render: (g, c, m) => {
|
|
104
|
+
const u = l(c, m).filter(
|
|
105
|
+
(o) => o.type != "detail"
|
|
105
106
|
);
|
|
106
107
|
return /* @__PURE__ */ t.jsx(
|
|
107
|
-
|
|
108
|
+
R,
|
|
108
109
|
{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
refInstance: o
|
|
110
|
+
actionGroup: u,
|
|
111
|
+
refInstance: a
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
114
|
},
|
|
115
|
-
...
|
|
116
|
-
}), [
|
|
115
|
+
...r
|
|
116
|
+
}), [i, a, l]);
|
|
117
117
|
}
|
|
118
118
|
export {
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
R as BitzTableAction,
|
|
120
|
+
q as default
|
|
121
121
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ButtonProps as AntButtonProps } from 'antd';
|
|
1
|
+
import { ButtonProps as AntButtonProps, DropdownProps } from 'antd';
|
|
3
2
|
import { FC } from 'react';
|
|
4
3
|
type BitzSelectionBarButtonProps = Omit<AntButtonProps, 'type' | 'className'>;
|
|
5
4
|
/** SelectionBar的普通按钮 */
|
|
6
5
|
declare const BitzSelectionBarButton: FC<BitzSelectionBarButtonProps>;
|
|
7
|
-
interface BitzSelectionBarDropdownButtonProps extends
|
|
6
|
+
interface BitzSelectionBarDropdownButtonProps extends DropdownProps {
|
|
8
7
|
}
|
|
9
8
|
/** SelectionBar的下拉菜单按钮,当items的长度为 1 时自动转为普通按钮 */
|
|
10
9
|
declare const BitzSelectionBarDropdownButton: FC<BitzSelectionBarDropdownButtonProps>;
|
|
@@ -1,40 +1,34 @@
|
|
|
1
1
|
import { j as s } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { useMemo as h } from "react";
|
|
2
|
+
import n from "../../BitzButton/index.mjs";
|
|
3
|
+
import { Dropdown as p, Space as l } from "antd";
|
|
4
|
+
import { useMemo as m } from "react";
|
|
6
5
|
import c from "./style.mjs";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
6
|
+
import d from "../Dropdown/style.mjs";
|
|
7
|
+
import x from "../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CaretDownOutlined.mjs";
|
|
8
|
+
const a = (t, o) => t == null ? void 0 : t.map((e) => {
|
|
10
9
|
const r = { ...e };
|
|
11
|
-
return r != null && r.children && (r.children =
|
|
12
|
-
}),
|
|
10
|
+
return r != null && r.children && (r.children = a(r == null ? void 0 : r.children, o), r.popupClassName = o), r;
|
|
11
|
+
}), y = ({
|
|
13
12
|
...t
|
|
14
13
|
}) => {
|
|
15
14
|
const { btnClassName: o } = c();
|
|
16
|
-
return /* @__PURE__ */ s.jsx(
|
|
17
|
-
},
|
|
18
|
-
const { btnClassName:
|
|
15
|
+
return /* @__PURE__ */ s.jsx(n, { className: o, type: "text", ...t });
|
|
16
|
+
}, S = ({ menu: t, children: o }) => {
|
|
17
|
+
const { btnClassName: e } = c(), { popupClassName: r } = d(), i = m(() => a(t == null ? void 0 : t.items, r), [t == null ? void 0 : t.items]);
|
|
19
18
|
return /* @__PURE__ */ s.jsx(
|
|
20
|
-
|
|
19
|
+
p,
|
|
21
20
|
{
|
|
22
|
-
menu: { ...t, items:
|
|
23
|
-
overlayClassName:
|
|
21
|
+
menu: { ...t, items: i },
|
|
22
|
+
overlayClassName: r,
|
|
24
23
|
trigger: ["click"],
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
(t == null ? void 0 : t.items) && t.items.length > 1 && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
29
|
-
/* @__PURE__ */ s.jsx("span", { children: o }),
|
|
30
|
-
/* @__PURE__ */ s.jsx(m, {})
|
|
31
|
-
] }),
|
|
32
|
-
(t == null ? void 0 : t.items) && t.items.length === 1 && /* @__PURE__ */ s.jsx("span", { children: t.items[0].label })
|
|
24
|
+
children: /* @__PURE__ */ s.jsx(n, { className: e, type: "text", children: /* @__PURE__ */ s.jsxs(l, { size: 2, children: [
|
|
25
|
+
/* @__PURE__ */ s.jsx("span", { children: o }),
|
|
26
|
+
/* @__PURE__ */ s.jsx(x, {})
|
|
33
27
|
] }) })
|
|
34
28
|
}
|
|
35
29
|
);
|
|
36
30
|
};
|
|
37
31
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
y as BitzSelectionBarButton,
|
|
33
|
+
S as BitzSelectionBarDropdownButton
|
|
40
34
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
1
|
+
import { j as e } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import j from "../../BitzButton/index.mjs";
|
|
3
3
|
import { Space as t, Flex as l } from "antd";
|
|
4
|
-
import
|
|
5
|
-
import { useMemo as h } from "react";
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import f from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
5
|
+
import { useContext as C, useMemo as h, useEffect as u } from "react";
|
|
6
|
+
import { BitzTableContext as N } from "../Store/index.mjs";
|
|
7
|
+
import g from "./style.mjs";
|
|
8
|
+
const E = ({
|
|
9
|
+
show: s,
|
|
9
10
|
num: a,
|
|
10
11
|
onClear: r,
|
|
11
12
|
children: n
|
|
@@ -16,21 +17,23 @@ const B = ({
|
|
|
16
17
|
btnClassName: c,
|
|
17
18
|
batchOperationClassName: m,
|
|
18
19
|
alertContentClassName: p
|
|
19
|
-
} =
|
|
20
|
-
[`${o}`]:
|
|
21
|
-
}), [
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
} = g(), { setSelected: x } = C(N), d = h(() => f(i, {
|
|
21
|
+
[`${o}`]: s
|
|
22
|
+
}), [s]);
|
|
23
|
+
return u(() => {
|
|
24
|
+
x(s ?? !1);
|
|
25
|
+
}, [s]), /* @__PURE__ */ e.jsxs("div", { className: d, children: [
|
|
26
|
+
/* @__PURE__ */ e.jsx(t.Compact, { className: m, children: n || /* @__PURE__ */ e.jsx("div", {}) }),
|
|
27
|
+
/* @__PURE__ */ e.jsxs(l, { gap: 7, className: p, children: [
|
|
28
|
+
/* @__PURE__ */ e.jsxs(l, { gap: 20, align: "center", children: [
|
|
29
|
+
/* @__PURE__ */ e.jsxs(t, { size: 10, children: [
|
|
30
|
+
/* @__PURE__ */ e.jsx("span", { children: "已选中" }),
|
|
31
|
+
/* @__PURE__ */ e.jsx("strong", { children: a ?? 0 })
|
|
29
32
|
] }),
|
|
30
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ e.jsx("span", { style: { verticalAlign: "-0.14em" }, children: "/" })
|
|
31
34
|
] }),
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
|
|
35
|
+
/* @__PURE__ */ e.jsx(
|
|
36
|
+
j,
|
|
34
37
|
{
|
|
35
38
|
type: "text",
|
|
36
39
|
className: c,
|
|
@@ -43,5 +46,5 @@ const B = ({
|
|
|
43
46
|
] });
|
|
44
47
|
};
|
|
45
48
|
export {
|
|
46
|
-
|
|
49
|
+
E as default
|
|
47
50
|
};
|
|
@@ -39,21 +39,36 @@ export interface StylesStateType<TableKey = any> {
|
|
|
39
39
|
onlineChange?: (key: TableKey, state: StylesConfigOnChangeValue) => void;
|
|
40
40
|
onlineGet?: (key: TableKey) => Promise<StylesConfigProps | null | undefined>;
|
|
41
41
|
}
|
|
42
|
-
export interface
|
|
42
|
+
export interface ExportFieldsConfigProps extends Omit<ColumnsConfigProps, 'fixed' | 'order'> {
|
|
43
43
|
field: string;
|
|
44
44
|
title: string;
|
|
45
|
-
|
|
45
|
+
}
|
|
46
|
+
export type ExportResultConfigKeyType = 'current' | 'any' | 'all';
|
|
47
|
+
export type ExportResultExprotKeyType = ExportResultConfigKeyType | 'selectedRows';
|
|
48
|
+
export type ExportResultConfigType = 'config' | 'export';
|
|
49
|
+
export type ExportResultKeyType<T extends ExportResultConfigType> = T extends 'config' ? ExportResultConfigKeyType : ExportResultExprotKeyType;
|
|
50
|
+
export interface ExportResultConfigProps<T extends ExportResultConfigType> {
|
|
51
|
+
key: ExportResultKeyType<T>;
|
|
52
|
+
info?: {
|
|
53
|
+
type: 'page' | 'pieces';
|
|
54
|
+
value: number;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export interface ExportConfigProps<T extends ExportResultConfigType = 'config'> {
|
|
58
|
+
fields: ExportFieldsConfigProps[];
|
|
59
|
+
config: ExportResultConfigProps<T>;
|
|
46
60
|
}
|
|
47
61
|
export interface ExportColumnStateType<TableKey = any> {
|
|
48
62
|
persistenceType?: 'localStorage' | 'sessionStorage' | 'online';
|
|
49
63
|
persistenceKey?: TableKey;
|
|
50
|
-
defaultValue?: ExportConfigProps
|
|
51
|
-
value?: ExportConfigProps
|
|
52
|
-
onChange?: (val: ExportConfigProps
|
|
53
|
-
onlineChange?: (key: TableKey, state: ExportConfigProps
|
|
54
|
-
onlineGet?: (key: TableKey) => Promise<ExportConfigProps
|
|
64
|
+
defaultValue?: ExportConfigProps;
|
|
65
|
+
value?: ExportConfigProps;
|
|
66
|
+
onChange?: (val: ExportConfigProps) => void;
|
|
67
|
+
onlineChange?: (key: TableKey, state: ExportConfigProps) => void;
|
|
68
|
+
onlineGet?: (key: TableKey) => Promise<ExportConfigProps | null | undefined>;
|
|
55
69
|
}
|
|
56
70
|
export type UseContainerProps<T = any> = {
|
|
71
|
+
loading?: boolean;
|
|
57
72
|
/** 列配置 */
|
|
58
73
|
columnsStateMap?: Record<string, ColumnsConfigProps>;
|
|
59
74
|
onColumnsStateChange?: (map: Record<string, ColumnsConfigProps>) => void;
|
|
@@ -72,19 +87,22 @@ export type UseContainerProps<T = any> = {
|
|
|
72
87
|
defaultBordered?: BitzTableBorderedType;
|
|
73
88
|
/** 导出配置 */
|
|
74
89
|
exportConfigState?: ExportColumnStateType;
|
|
75
|
-
defaultExportConfig?: ExportConfigProps
|
|
76
|
-
exportConfig?: ExportConfigProps
|
|
77
|
-
onExportConfigChange?: (value: ExportConfigProps
|
|
90
|
+
defaultExportConfig?: ExportConfigProps;
|
|
91
|
+
exportConfig?: ExportConfigProps;
|
|
92
|
+
onExportConfigChange?: (value: ExportConfigProps) => void;
|
|
78
93
|
rowHoverable?: boolean;
|
|
79
94
|
};
|
|
80
95
|
declare function useContainer(props: UseContainerProps): {
|
|
96
|
+
loading: boolean;
|
|
81
97
|
uuid: string;
|
|
98
|
+
fullscreen: boolean;
|
|
99
|
+
setFullscreen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
100
|
+
selected: boolean;
|
|
101
|
+
setSelected: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
82
102
|
columns: BitzTableColumnsType<any> | undefined;
|
|
83
103
|
persistenceType: "online" | "localStorage" | "sessionStorage" | undefined;
|
|
84
104
|
persistenceKey: any;
|
|
85
105
|
onlineChange: ((key: any, ColumnsState: Record<string, ColumnsConfigProps>) => void) | undefined;
|
|
86
|
-
sortKeyColumns: string[];
|
|
87
|
-
setSortKeyColumns: (keys: string[]) => void;
|
|
88
106
|
columnsMap: Record<string, ColumnsConfigProps>;
|
|
89
107
|
setColumnsMap: (updater: Record<string, ColumnsConfigProps> | ((origin: Record<string, ColumnsConfigProps>) => Record<string, ColumnsConfigProps>), ignoreDestroy?: boolean | undefined) => void;
|
|
90
108
|
defaultColumnKeyMap: Record<string, ColumnsConfigProps>;
|
|
@@ -98,12 +116,12 @@ declare function useContainer(props: UseContainerProps): {
|
|
|
98
116
|
onlineStylesConfigChange: ((key: any, state: StylesConfigOnChangeValue) => void) | undefined;
|
|
99
117
|
clearStylesConfigCache: () => void;
|
|
100
118
|
defaultTableStylesConfig: StylesConfigProps;
|
|
101
|
-
exportConfig: ExportConfigProps
|
|
102
|
-
setTableExportConfig: (updater: ExportConfigProps
|
|
103
|
-
defaultTableExportConfig: ExportConfigProps
|
|
119
|
+
exportConfig: ExportConfigProps<"config">;
|
|
120
|
+
setTableExportConfig: (updater: ExportConfigProps<"config"> | ((origin: ExportConfigProps<"config">) => ExportConfigProps<"config">), ignoreDestroy?: boolean | undefined) => void;
|
|
121
|
+
defaultTableExportConfig: ExportConfigProps<"config">;
|
|
104
122
|
exportStorageType: "online" | "localStorage" | "sessionStorage" | undefined;
|
|
105
123
|
exportStorageKey: any;
|
|
106
|
-
onlineExportConfigChange: ((key: any, state: ExportConfigProps
|
|
124
|
+
onlineExportConfigChange: ((key: any, state: ExportConfigProps<"config">) => void) | undefined;
|
|
107
125
|
clearExportConfigCache: () => void;
|
|
108
126
|
zebra: boolean | undefined;
|
|
109
127
|
rowHoverable: boolean;
|
|
@@ -111,13 +129,16 @@ declare function useContainer(props: UseContainerProps): {
|
|
|
111
129
|
hideRowBorder: boolean;
|
|
112
130
|
};
|
|
113
131
|
declare const BitzTableContext: import("react").Context<{
|
|
132
|
+
loading: boolean;
|
|
114
133
|
uuid: string;
|
|
134
|
+
fullscreen: boolean;
|
|
135
|
+
setFullscreen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
136
|
+
selected: boolean;
|
|
137
|
+
setSelected: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
115
138
|
columns: BitzTableColumnsType<any> | undefined;
|
|
116
139
|
persistenceType: "online" | "localStorage" | "sessionStorage" | undefined;
|
|
117
140
|
persistenceKey: any;
|
|
118
141
|
onlineChange: ((key: any, ColumnsState: Record<string, ColumnsConfigProps>) => void) | undefined;
|
|
119
|
-
sortKeyColumns: string[];
|
|
120
|
-
setSortKeyColumns: (keys: string[]) => void;
|
|
121
142
|
columnsMap: Record<string, ColumnsConfigProps>;
|
|
122
143
|
setColumnsMap: (updater: Record<string, ColumnsConfigProps> | ((origin: Record<string, ColumnsConfigProps>) => Record<string, ColumnsConfigProps>), ignoreDestroy?: boolean | undefined) => void;
|
|
123
144
|
defaultColumnKeyMap: Record<string, ColumnsConfigProps>;
|
|
@@ -131,12 +152,12 @@ declare const BitzTableContext: import("react").Context<{
|
|
|
131
152
|
onlineStylesConfigChange: ((key: any, state: StylesConfigOnChangeValue) => void) | undefined;
|
|
132
153
|
clearStylesConfigCache: () => void;
|
|
133
154
|
defaultTableStylesConfig: StylesConfigProps;
|
|
134
|
-
exportConfig: ExportConfigProps
|
|
135
|
-
setTableExportConfig: (updater: ExportConfigProps
|
|
136
|
-
defaultTableExportConfig: ExportConfigProps
|
|
155
|
+
exportConfig: ExportConfigProps<"config">;
|
|
156
|
+
setTableExportConfig: (updater: ExportConfigProps<"config"> | ((origin: ExportConfigProps<"config">) => ExportConfigProps<"config">), ignoreDestroy?: boolean | undefined) => void;
|
|
157
|
+
defaultTableExportConfig: ExportConfigProps<"config">;
|
|
137
158
|
exportStorageType: "online" | "localStorage" | "sessionStorage" | undefined;
|
|
138
159
|
exportStorageKey: any;
|
|
139
|
-
onlineExportConfigChange: ((key: any, state: ExportConfigProps
|
|
160
|
+
onlineExportConfigChange: ((key: any, state: ExportConfigProps) => void) | undefined;
|
|
140
161
|
clearExportConfigCache: () => void;
|
|
141
162
|
zebra: boolean | undefined;
|
|
142
163
|
rowHoverable: boolean;
|