bitz-react-admin-ui 2.5.6 → 2.5.7
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/Store/index.d.ts +14 -1
- package/dist/components/BitzTable/Store/index.mjs +64 -59
- package/dist/components/BitzTable/Table/index.d.ts +2 -5
- package/dist/components/BitzTable/Table/index.mjs +319 -319
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +55 -63
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +160 -162
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +1 -1
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +78 -79
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +47 -47
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +6 -4
- package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.d.ts +1 -1
- package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +40 -45
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +29 -34
- package/dist/components/BitzTable/ToolBar/Modal/index.d.ts +3 -2
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +38 -56
- package/dist/components/BitzTable/ToolBar/Modal/style.mjs +12 -8
- package/dist/components/BitzTable/ToolBar/index.d.ts +1 -1
- 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/package.json +1 -1
|
@@ -1,127 +1,126 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { BitzTableContext as
|
|
3
|
-
import
|
|
4
|
-
import { findParentFirstNodeByClass as
|
|
5
|
-
import P from "
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
parentHeight: p,
|
|
13
|
-
refInstance: N
|
|
1
|
+
import { j as t } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { BitzTableContext as S } from "../../../Store/index.mjs";
|
|
3
|
+
import D from "../../../../BitzTheme/index.mjs";
|
|
4
|
+
import { findParentFirstNodeByClass as L } from "../../../../../utils/findNode.mjs";
|
|
5
|
+
import { Form as y, Flex as v, Checkbox as O, Radio as f, InputNumber as P, Select as G } from "antd";
|
|
6
|
+
import { memo as H, useRef as $, useMemo as u, useContext as q, useState as p, useEffect as J, useImperativeHandle as Q } from "react";
|
|
7
|
+
import U from "./DndList.mjs";
|
|
8
|
+
function W({
|
|
9
|
+
display: k,
|
|
10
|
+
showSelectRadio: m = !1,
|
|
11
|
+
refInstance: z
|
|
14
12
|
}) {
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
width:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
D.useToken();
|
|
14
|
+
const A = $(null), F = u(() => ({
|
|
15
|
+
display: k ? "flex" : "none",
|
|
16
|
+
width: "100%"
|
|
17
|
+
}), [k]), d = q(S), s = d.exportConfig, g = d.selected, n = d.pagination, r = d.total, [a, b] = p([]), [i, h] = p([]), [C, w] = p("current"), [x, E] = p("page"), [j, N] = p(1);
|
|
18
|
+
J(() => {
|
|
19
|
+
var e, l, c, T;
|
|
20
|
+
h(s.fields), b(s.fields.map((M) => M.field)), w(
|
|
21
|
+
m && g ? "selectedRows" : s.config.key
|
|
22
|
+
), E(((l = (e = s.config) == null ? void 0 : e.info) == null ? void 0 : l.type) ?? "page"), N(((T = (c = s.config) == null ? void 0 : c.info) == null ? void 0 : T.value) ?? 1);
|
|
23
|
+
}, [s, m, g]);
|
|
24
|
+
const o = u(() => i.filter((e) => e.show).map((e) => e.field), [i]), I = u(() => a.length === o.length, [a, o]), R = u(() => o.length > 0 && o.length < a.length, [o, a]), B = ({ target: e }) => {
|
|
25
|
+
h(i.map((l) => ({ ...l, show: e.checked })));
|
|
26
|
+
}, V = (e, l) => {
|
|
27
|
+
h(e), b(l);
|
|
28
|
+
}, K = u(() => {
|
|
29
|
+
if (x === "page") {
|
|
30
|
+
if (r && (n != null && n.size)) {
|
|
31
|
+
let e = Math.floor(r / (n == null ? void 0 : n.size));
|
|
32
|
+
return r % (n == null ? void 0 : n.size) && e++, e;
|
|
33
|
+
}
|
|
34
|
+
return 1;
|
|
27
35
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
d(l.fields), w(l.fields.map((L) => L.field)), b(
|
|
32
|
-
g && x ? "selectedRows" : l.config.key
|
|
33
|
-
), E(((s = (e = l.config) == null ? void 0 : e.info) == null ? void 0 : s.type) ?? "page"), S(((A = (c = l.config) == null ? void 0 : c.info) == null ? void 0 : A.value) ?? 1);
|
|
34
|
-
}, [l, g, x]);
|
|
35
|
-
const o = f(() => a.filter((e) => e.show).map((e) => e.field), [a]), V = f(() => i.length === o.length, [i, o]), z = f(() => o.length > 0 && o.length < i.length, [o, i]), K = ({ target: e }) => {
|
|
36
|
-
d(a.map((s) => ({ ...s, show: e.checked })));
|
|
37
|
-
}, D = (e, s) => {
|
|
38
|
-
d(e), w(s);
|
|
39
|
-
};
|
|
40
|
-
return U(N, () => ({
|
|
36
|
+
return r;
|
|
37
|
+
}, [x, n, r]);
|
|
38
|
+
return Q(z, () => ({
|
|
41
39
|
getExportConfig: () => {
|
|
42
40
|
const e = {
|
|
43
41
|
fields: [],
|
|
44
42
|
config: {
|
|
45
|
-
key:
|
|
43
|
+
key: C,
|
|
46
44
|
info: void 0
|
|
47
45
|
}
|
|
48
46
|
};
|
|
49
|
-
return
|
|
47
|
+
return i.forEach((l) => {
|
|
50
48
|
let c = !1;
|
|
51
|
-
o.includes(
|
|
52
|
-
}),
|
|
53
|
-
type:
|
|
49
|
+
o.includes(l.field) && (c = !0), e.fields.push({ ...l, show: c });
|
|
50
|
+
}), C === "any" && (e.config.info = {
|
|
51
|
+
type: x,
|
|
54
52
|
value: (j || 0) < 1 ? 1 : j || 1
|
|
55
53
|
}), e;
|
|
56
54
|
},
|
|
57
55
|
hasOne: () => o.length > 0
|
|
58
|
-
})), /* @__PURE__ */
|
|
59
|
-
|
|
56
|
+
})), /* @__PURE__ */ t.jsxs(
|
|
57
|
+
y,
|
|
60
58
|
{
|
|
61
|
-
style:
|
|
59
|
+
style: F,
|
|
62
60
|
labelCol: { span: 3 },
|
|
63
61
|
labelAlign: "left",
|
|
64
62
|
colon: !1,
|
|
65
63
|
className: "exportConfigFormContent",
|
|
66
64
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
|
|
65
|
+
/* @__PURE__ */ t.jsx(y.Item, { label: "导出字段", className: "exportFields", children: /* @__PURE__ */ t.jsxs(v, { vertical: !0, style: { gap: 8 }, children: [
|
|
66
|
+
/* @__PURE__ */ t.jsx(
|
|
67
|
+
O,
|
|
70
68
|
{
|
|
71
|
-
checked:
|
|
72
|
-
indeterminate:
|
|
73
|
-
onChange:
|
|
69
|
+
checked: I,
|
|
70
|
+
indeterminate: R,
|
|
71
|
+
onChange: B,
|
|
74
72
|
style: { alignSelf: "flex-start" },
|
|
75
73
|
children: "全选"
|
|
76
74
|
}
|
|
77
75
|
),
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
|
|
76
|
+
/* @__PURE__ */ t.jsx(
|
|
77
|
+
U,
|
|
80
78
|
{
|
|
81
|
-
dataList:
|
|
82
|
-
keys:
|
|
83
|
-
onChange:
|
|
84
|
-
onMoveEnd:
|
|
79
|
+
dataList: i,
|
|
80
|
+
keys: a,
|
|
81
|
+
onChange: h,
|
|
82
|
+
onMoveEnd: V
|
|
85
83
|
}
|
|
86
84
|
)
|
|
87
85
|
] }) }),
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
|
|
86
|
+
/* @__PURE__ */ t.jsx(y.Item, { label: "导出设置", className: "exportTotal", children: /* @__PURE__ */ t.jsx(
|
|
87
|
+
f.Group,
|
|
90
88
|
{
|
|
91
|
-
ref:
|
|
92
|
-
value:
|
|
93
|
-
onChange: ({ target: e }) =>
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
-
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
|
|
89
|
+
ref: A,
|
|
90
|
+
value: C,
|
|
91
|
+
onChange: ({ target: e }) => w(e.value),
|
|
92
|
+
children: /* @__PURE__ */ t.jsxs(v, { vertical: !0, gap: 8, align: "flex-start", children: [
|
|
93
|
+
m && g && /* @__PURE__ */ t.jsx(f, { value: "selectedRows", children: "导出选中数据" }),
|
|
94
|
+
/* @__PURE__ */ t.jsx(f, { value: "current", children: "仅导出当前页" }),
|
|
95
|
+
/* @__PURE__ */ t.jsx(f, { value: "any", children: /* @__PURE__ */ t.jsxs(v, { align: "center", gap: 8, children: [
|
|
96
|
+
/* @__PURE__ */ t.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出" }),
|
|
97
|
+
/* @__PURE__ */ t.jsx(
|
|
98
|
+
P,
|
|
101
99
|
{
|
|
102
100
|
controls: !1,
|
|
103
101
|
min: 1,
|
|
102
|
+
max: K,
|
|
104
103
|
value: j,
|
|
105
|
-
onChange: (e) =>
|
|
104
|
+
onChange: (e) => N(e),
|
|
106
105
|
style: { width: 120 },
|
|
107
|
-
addonAfter: /* @__PURE__ */
|
|
108
|
-
|
|
106
|
+
addonAfter: /* @__PURE__ */ t.jsx(
|
|
107
|
+
G,
|
|
109
108
|
{
|
|
110
|
-
value:
|
|
109
|
+
value: x,
|
|
111
110
|
onChange: E,
|
|
112
111
|
options: [
|
|
113
112
|
{ label: "页", value: "page" },
|
|
114
113
|
{ label: "条", value: "pieces" }
|
|
115
114
|
],
|
|
116
115
|
onClick: (e) => e.preventDefault(),
|
|
117
|
-
getPopupContainer: (e) =>
|
|
116
|
+
getPopupContainer: (e) => L(e, "containerBody")
|
|
118
117
|
}
|
|
119
118
|
)
|
|
120
119
|
}
|
|
121
120
|
),
|
|
122
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ t.jsx("span", { style: { whiteSpace: "nowrap" }, children: "数据" })
|
|
123
122
|
] }) }),
|
|
124
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ t.jsx(f, { value: "all", children: "导出全部数据" })
|
|
125
124
|
] })
|
|
126
125
|
}
|
|
127
126
|
) })
|
|
@@ -129,7 +128,7 @@ function X({
|
|
|
129
128
|
}
|
|
130
129
|
);
|
|
131
130
|
}
|
|
132
|
-
const
|
|
131
|
+
const le = H(W);
|
|
133
132
|
export {
|
|
134
|
-
|
|
133
|
+
le as default
|
|
135
134
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as e } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import H from "../../../../../assets/iconfont/IconKuansongde.mjs";
|
|
3
3
|
import C from "../../../../../assets/iconfont/IconTekuansong.mjs";
|
|
4
4
|
import S from "../../../../../assets/iconfont/IconJincoude.mjs";
|
|
5
5
|
import k from "../../../../../assets/iconfont/IconZhongdengde.mjs";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import T from "../../../../../assets/iconfont/IconTejincou.mjs";
|
|
7
|
+
import R from "../../../../../assets/iconfont/IconWufengexian.mjs";
|
|
8
|
+
import w from "../../../../../assets/iconfont/IconHangliefengexian.mjs";
|
|
9
9
|
import B from "../../../../../assets/iconfont/IconHangfengexian.mjs";
|
|
10
10
|
import G from "../../../../../assets/iconfont/IconLiefengexian.mjs";
|
|
11
11
|
import F from "../../../../../assets/iconfont/IconYoubanmawentianchong.mjs";
|
|
@@ -13,27 +13,27 @@ import N from "../../../../../assets/iconfont/IconWubanmawentianchong.mjs";
|
|
|
13
13
|
import { BitzConfigContext as W } from "../../../../BitzConfigProvider/context.mjs";
|
|
14
14
|
import { BitzTableContext as E } from "../../../Store/index.mjs";
|
|
15
15
|
import $ from "../../../../BitzTheme/index.mjs";
|
|
16
|
-
import { Form as
|
|
16
|
+
import { Form as i, Radio as u, Checkbox as A } from "antd";
|
|
17
17
|
import D from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
18
18
|
import { forwardRef as J, useMemo as K, useContext as p, useEffect as L, useImperativeHandle as M, memo as V } from "react";
|
|
19
19
|
import { BitzToolBarContext as Y } from "../../Wrapper/context.mjs";
|
|
20
20
|
import l from "./RadioCard.mjs";
|
|
21
|
-
const Z = ({ defaultSize: n, items: c }) => c.map((
|
|
22
|
-
...
|
|
23
|
-
label: `${
|
|
24
|
-
} :
|
|
21
|
+
const Z = ({ defaultSize: n, items: c }) => c.map((o) => o.key === n ? {
|
|
22
|
+
...o,
|
|
23
|
+
label: `${o.label}(默认)`
|
|
24
|
+
} : o), q = J(({ display: n }, c) => {
|
|
25
25
|
var x, b, f;
|
|
26
|
-
const { token:
|
|
26
|
+
const { token: o } = $.useToken(), h = K(() => ({
|
|
27
27
|
width: "100%",
|
|
28
|
-
|
|
28
|
+
display: n ? "flex" : "none"
|
|
29
29
|
}), [n]), z = {
|
|
30
30
|
size: 26,
|
|
31
|
-
color:
|
|
32
|
-
}, [m] =
|
|
33
|
-
var y,
|
|
31
|
+
color: o.colorPrimary
|
|
32
|
+
}, [m] = i.useForm(), g = (x = p(W).Table) == null ? void 0 : x.stylesScope, { defaultTableSize: P, stylesConfig: I } = p(E), r = (b = p(Y).config) == null ? void 0 : b.stylesConfig, d = (s, a) => {
|
|
33
|
+
var y, j;
|
|
34
34
|
let t = a;
|
|
35
|
-
return (y = r == null ? void 0 : r[
|
|
36
|
-
disabled: (
|
|
35
|
+
return (y = r == null ? void 0 : r[s]) != null && y.disabled && (t = D(a, "disabledControl")), {
|
|
36
|
+
disabled: (j = r == null ? void 0 : r[s]) == null ? void 0 : j.disabled,
|
|
37
37
|
className: t
|
|
38
38
|
};
|
|
39
39
|
};
|
|
@@ -49,7 +49,7 @@ const Z = ({ defaultSize: n, items: c }) => c.map((e) => e.key === n ? {
|
|
|
49
49
|
{
|
|
50
50
|
key: "xs",
|
|
51
51
|
label: "特紧凑",
|
|
52
|
-
icon:
|
|
52
|
+
icon: T
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
key: "sm",
|
|
@@ -75,77 +75,77 @@ const Z = ({ defaultSize: n, items: c }) => c.map((e) => e.key === n ? {
|
|
|
75
75
|
});
|
|
76
76
|
return M(c, () => ({
|
|
77
77
|
getFormInstance: () => m
|
|
78
|
-
})), /* @__PURE__ */
|
|
79
|
-
|
|
78
|
+
})), /* @__PURE__ */ e.jsxs(
|
|
79
|
+
i,
|
|
80
80
|
{
|
|
81
81
|
form: m,
|
|
82
|
-
style:
|
|
82
|
+
style: h,
|
|
83
83
|
labelCol: { span: 3 },
|
|
84
84
|
labelAlign: "left",
|
|
85
85
|
colon: !1,
|
|
86
86
|
className: "stylesConfigFormContent",
|
|
87
87
|
children: [
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ e.jsx(i.Item, { label: "行高", name: "size", children: /* @__PURE__ */ e.jsx(u.Group, { ...d("size", "sizeRadioGroup"), children: v.map(({ key: s, label: a, icon: t }) => /* @__PURE__ */ e.jsx(l, { label: a, value: s, children: /* @__PURE__ */ e.jsx(t, { ...z }) }, s)) }) }),
|
|
89
|
+
/* @__PURE__ */ e.jsx(i.Item, { label: "分割线", name: "bordered", children: /* @__PURE__ */ e.jsxs(u.Group, { ...d("bordered", "splitBorderRadioGroup"), children: [
|
|
90
|
+
/* @__PURE__ */ e.jsx(l, { label: "无分割线", value: "hide", children: /* @__PURE__ */ e.jsx(R, { size: 26, color: o.colorPrimaryHover }) }),
|
|
91
|
+
/* @__PURE__ */ e.jsx(l, { label: "行分割线", value: "row", children: /* @__PURE__ */ e.jsx(
|
|
92
92
|
B,
|
|
93
93
|
{
|
|
94
94
|
size: 26,
|
|
95
95
|
color: [
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
o.colorPrimaryHover,
|
|
97
|
+
o.colorPrimary,
|
|
98
|
+
o.colorPrimary,
|
|
99
|
+
o.colorPrimaryHover
|
|
100
100
|
]
|
|
101
101
|
}
|
|
102
102
|
) }),
|
|
103
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ e.jsx(l, { label: "列分割线", value: "column", children: /* @__PURE__ */ e.jsx(
|
|
104
104
|
G,
|
|
105
105
|
{
|
|
106
106
|
size: 26,
|
|
107
107
|
color: [
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
o.colorPrimaryHover,
|
|
109
|
+
o.colorPrimary,
|
|
110
|
+
o.colorPrimary,
|
|
111
|
+
o.colorPrimaryHover
|
|
112
112
|
]
|
|
113
113
|
}
|
|
114
114
|
) }),
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
|
|
115
|
+
/* @__PURE__ */ e.jsx(l, { label: "行列分割线", value: "row-column", children: /* @__PURE__ */ e.jsx(
|
|
116
|
+
w,
|
|
117
117
|
{
|
|
118
118
|
size: 26,
|
|
119
119
|
color: [
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
o.colorPrimaryHover,
|
|
121
|
+
o.colorPrimary,
|
|
122
|
+
o.colorPrimary,
|
|
123
|
+
o.colorPrimaryHover
|
|
124
124
|
]
|
|
125
125
|
}
|
|
126
126
|
) })
|
|
127
127
|
] }) }),
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ e.jsx(i.Item, { label: "斑马纹", name: "zebra", children: /* @__PURE__ */ e.jsxs(u.Group, { ...d("zebra", "zebraRadioGroup"), children: [
|
|
129
|
+
/* @__PURE__ */ e.jsx(l, { label: "有斑马纹", value: !0, children: /* @__PURE__ */ e.jsx(
|
|
130
130
|
F,
|
|
131
131
|
{
|
|
132
132
|
size: 26,
|
|
133
|
-
color: [
|
|
133
|
+
color: [o.colorPrimaryHover, o.colorPrimary]
|
|
134
134
|
}
|
|
135
135
|
) }),
|
|
136
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ e.jsx(l, { label: "无斑马纹", value: !1, children: /* @__PURE__ */ e.jsx(
|
|
137
137
|
N,
|
|
138
138
|
{
|
|
139
139
|
size: 26,
|
|
140
|
-
color:
|
|
140
|
+
color: o.colorPrimaryHover
|
|
141
141
|
}
|
|
142
142
|
) })
|
|
143
143
|
] }) }),
|
|
144
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ e.jsx(i.Item, { name: "stylesScope", valuePropName: "checked", className: "scope", children: /* @__PURE__ */ e.jsx(A, { disabled: (f = r == null ? void 0 : r.stylesScope) == null ? void 0 : f.disabled, children: "应用到全局表格" }) })
|
|
145
145
|
]
|
|
146
146
|
}
|
|
147
147
|
);
|
|
148
|
-
}),
|
|
148
|
+
}), be = V(q);
|
|
149
149
|
export {
|
|
150
|
-
|
|
150
|
+
be as default
|
|
151
151
|
};
|
|
@@ -21,11 +21,11 @@ const m = (o) => i`
|
|
|
21
21
|
|
|
22
22
|
.sortCard {
|
|
23
23
|
width: 100%;
|
|
24
|
-
height: 100%;
|
|
25
24
|
background-color: var(--sortCard-bgColor);
|
|
26
25
|
border-radius: ${r(o.borderRadius)};
|
|
27
26
|
padding-inline: 6px;
|
|
28
27
|
padding-block-end: 10px;
|
|
28
|
+
overflow: hidden auto;
|
|
29
29
|
box-sizing: border-box;
|
|
30
30
|
|
|
31
31
|
.title {
|
|
@@ -62,9 +62,11 @@ const m = (o) => i`
|
|
|
62
62
|
border-radius: ${r(o.borderRadius)};
|
|
63
63
|
|
|
64
64
|
&.showSortItemOperat {
|
|
65
|
-
grid-template-columns:
|
|
65
|
+
grid-template-columns:
|
|
66
|
+
var(--dragIcon-width) calc(
|
|
66
67
|
100% - var(--dragIcon-width) - var(--operation-width)
|
|
67
|
-
)
|
|
68
|
+
)
|
|
69
|
+
var(--operation-width);
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
&:hover {
|
|
@@ -165,7 +167,7 @@ const m = (o) => i`
|
|
|
165
167
|
flex: 1;
|
|
166
168
|
display: flex;
|
|
167
169
|
align-items: flex-end;
|
|
168
|
-
margin-block:
|
|
170
|
+
margin-block-end: 0;
|
|
169
171
|
}
|
|
170
172
|
|
|
171
173
|
.ant-radio-wrapper {
|
|
@@ -5,7 +5,7 @@ export interface ExportModalProps {
|
|
|
5
5
|
open: boolean;
|
|
6
6
|
close: () => void;
|
|
7
7
|
title: string;
|
|
8
|
-
onExport?: (val: ExportConfigProps<'export'>) =>
|
|
8
|
+
onExport?: (val: ExportConfigProps<'export'>) => void;
|
|
9
9
|
getContainer: ModalProps['getContainer'];
|
|
10
10
|
}
|
|
11
11
|
declare const ExportModal: FC<ExportModalProps>;
|
|
@@ -1,69 +1,64 @@
|
|
|
1
1
|
import { j as e } from "../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { message as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { BitzTableContext as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
open:
|
|
12
|
-
title:
|
|
13
|
-
onExport:
|
|
2
|
+
import { message as C } from "antd";
|
|
3
|
+
import { useState as g, useContext as j, useRef as k, useMemo as y } from "react";
|
|
4
|
+
import { BitzTableContext as E } from "../../Store/index.mjs";
|
|
5
|
+
import f from "../../../BitzButton/index.mjs";
|
|
6
|
+
import b from "../../../BitzTheme/index.mjs";
|
|
7
|
+
import B from "../Modal/index.mjs";
|
|
8
|
+
import O from "../ColConfigIcon/ExportConfig/index.mjs";
|
|
9
|
+
import R from "../../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
|
|
10
|
+
const I = ({
|
|
11
|
+
open: m,
|
|
12
|
+
title: c,
|
|
13
|
+
onExport: n,
|
|
14
14
|
close: o,
|
|
15
|
-
getContainer:
|
|
15
|
+
getContainer: l
|
|
16
16
|
}) => {
|
|
17
|
-
const { token:
|
|
18
|
-
var
|
|
19
|
-
if (
|
|
17
|
+
const { token: s } = b.useToken(), [u, t] = g(!1), { defaultTableExportConfig: p } = j(E), r = k(null), x = async () => {
|
|
18
|
+
var i, a;
|
|
19
|
+
if (u)
|
|
20
20
|
return;
|
|
21
|
-
if (t(!0), !((
|
|
22
|
-
|
|
21
|
+
if (t(!0), !((i = r.current) == null ? void 0 : i.hasOne())) {
|
|
22
|
+
C.error("导出设置至少需要一个字段"), t(!1);
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
r(!1), o();
|
|
28
|
-
}));
|
|
25
|
+
const h = ((a = r.current) == null ? void 0 : a.getExportConfig()) ?? p;
|
|
26
|
+
n && (t(!1), n(h), o());
|
|
29
27
|
};
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
28
|
+
y(() => s.mode === "dark", [s.mode]);
|
|
29
|
+
const d = () => {
|
|
30
|
+
t(!1);
|
|
33
31
|
};
|
|
34
32
|
return /* @__PURE__ */ e.jsx(
|
|
35
|
-
|
|
33
|
+
B,
|
|
36
34
|
{
|
|
37
|
-
open:
|
|
38
|
-
title:
|
|
35
|
+
open: m,
|
|
36
|
+
title: c,
|
|
39
37
|
close: o,
|
|
40
|
-
closeAfter:
|
|
41
|
-
getContainer:
|
|
38
|
+
closeAfter: d,
|
|
39
|
+
getContainer: l,
|
|
40
|
+
styles: {
|
|
41
|
+
content: {
|
|
42
|
+
maxHeight: "calc(100vh - 200px)",
|
|
43
|
+
height: "auto"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
42
46
|
footer: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
43
47
|
/* @__PURE__ */ e.jsx(
|
|
44
|
-
|
|
48
|
+
f,
|
|
45
49
|
{
|
|
46
50
|
type: "primary",
|
|
47
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
48
|
-
onClick:
|
|
49
|
-
loading: x,
|
|
51
|
+
icon: /* @__PURE__ */ e.jsx(R, {}),
|
|
52
|
+
onClick: x,
|
|
50
53
|
children: "导出"
|
|
51
54
|
}
|
|
52
55
|
),
|
|
53
|
-
/* @__PURE__ */ e.jsx(
|
|
56
|
+
/* @__PURE__ */ e.jsx(f, { onClick: o, children: "取消" })
|
|
54
57
|
] }),
|
|
55
|
-
children:
|
|
56
|
-
z,
|
|
57
|
-
{
|
|
58
|
-
parentHeight: a,
|
|
59
|
-
refInstance: n,
|
|
60
|
-
display: !0,
|
|
61
|
-
showSelectRadio: !0
|
|
62
|
-
}
|
|
63
|
-
)
|
|
58
|
+
children: /* @__PURE__ */ e.jsx(O, { refInstance: r, display: !0, showSelectRadio: !0 })
|
|
64
59
|
}
|
|
65
60
|
);
|
|
66
61
|
};
|
|
67
62
|
export {
|
|
68
|
-
|
|
63
|
+
I as default
|
|
69
64
|
};
|
|
@@ -1,47 +1,42 @@
|
|
|
1
1
|
import { j as t } from "../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { BitzTableContext as
|
|
6
|
-
import { exportConfigTitle as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
show:
|
|
11
|
-
order:
|
|
2
|
+
import { memo as j, useState as y, useContext as l, useMemo as E } from "react";
|
|
3
|
+
import b from "../style.mjs";
|
|
4
|
+
import h from "../../../BitzButton/index.mjs";
|
|
5
|
+
import { BitzTableContext as i } from "../../Store/index.mjs";
|
|
6
|
+
import { exportConfigTitle as B } from "../ColConfigIcon/ColumnConfigModal.mjs";
|
|
7
|
+
import C from "./ExportModal.mjs";
|
|
8
|
+
import I from "../../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/DownloadOutlined.mjs";
|
|
9
|
+
const z = ({
|
|
10
|
+
show: p = !0,
|
|
11
|
+
order: a,
|
|
12
12
|
onClick: o,
|
|
13
|
-
icon:
|
|
13
|
+
icon: f = /* @__PURE__ */ t.jsx(I, {})
|
|
14
14
|
}) => {
|
|
15
|
-
const { toolbarItemClassName:
|
|
16
|
-
|
|
17
|
-
const { loading:
|
|
18
|
-
var
|
|
19
|
-
|
|
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));
|
|
15
|
+
const { toolbarItemClassName: x } = b(), [u, s] = y(!1);
|
|
16
|
+
l(i).exportConfig;
|
|
17
|
+
const { loading: c, fullscreen: n, dataSource: e } = l(i), d = E(() => n ? !1 : void 0, [n]), g = async (r) => {
|
|
18
|
+
var m;
|
|
19
|
+
o == null || o(r.config.key, r.fields, (m = r.config) == null ? void 0 : m.info);
|
|
25
20
|
};
|
|
26
|
-
return
|
|
21
|
+
return p ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
27
22
|
/* @__PURE__ */ t.jsx(
|
|
28
|
-
|
|
23
|
+
C,
|
|
29
24
|
{
|
|
30
|
-
open:
|
|
31
|
-
title:
|
|
32
|
-
getContainer:
|
|
33
|
-
onExport:
|
|
25
|
+
open: u,
|
|
26
|
+
title: B,
|
|
27
|
+
getContainer: d,
|
|
28
|
+
onExport: g,
|
|
34
29
|
close: () => s(!1)
|
|
35
30
|
}
|
|
36
31
|
),
|
|
37
32
|
/* @__PURE__ */ t.jsx(
|
|
38
|
-
|
|
33
|
+
h,
|
|
39
34
|
{
|
|
40
35
|
type: "text",
|
|
41
|
-
className:
|
|
42
|
-
icon:
|
|
43
|
-
style: { order:
|
|
44
|
-
disabled:
|
|
36
|
+
className: x,
|
|
37
|
+
icon: f,
|
|
38
|
+
style: { order: a },
|
|
39
|
+
disabled: c || !(e != null && e.length),
|
|
45
40
|
onClick: () => s(!0),
|
|
46
41
|
children: "导出"
|
|
47
42
|
}
|
|
@@ -73,7 +68,7 @@ const D = ({
|
|
|
73
68
|
// </Dropdown>
|
|
74
69
|
null
|
|
75
70
|
);
|
|
76
|
-
},
|
|
71
|
+
}, G = j(z);
|
|
77
72
|
export {
|
|
78
|
-
|
|
73
|
+
G as default
|
|
79
74
|
};
|
|
@@ -12,7 +12,8 @@ export interface ModalProps {
|
|
|
12
12
|
getContainer: AntModalProps['getContainer'];
|
|
13
13
|
footer: ReactNode;
|
|
14
14
|
extra?: ReactNode;
|
|
15
|
-
|
|
15
|
+
styles?: AntModalProps['styles'];
|
|
16
|
+
children: ReactNode;
|
|
16
17
|
}
|
|
17
|
-
declare function Modal({ open, title, close, closeAfter, getContainer, footer, extra, children, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function Modal({ open, title, close, closeAfter, getContainer, footer, extra, styles: modalStyles, children, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export default Modal;
|