bitz-react-admin-ui 2.3.1 → 2.3.3
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/_commonjsHelpers.mjs +4 -26
- package/dist/components/BitzConfigProvider/context.d.ts +1 -0
- package/dist/components/BitzConfigProvider/context.mjs +4 -3
- package/dist/components/BitzHighlight/style.mjs +12 -12
- package/dist/components/BitzTable/ActionBar/style.mjs +21 -21
- package/dist/components/BitzTable/ActionCol/index.mjs +59 -58
- package/dist/components/BitzTable/ActionCol/style.d.ts +1 -1
- package/dist/components/BitzTable/ActionCol/style.mjs +28 -28
- package/dist/components/BitzTable/Dropdown/style.mjs +25 -25
- package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +26 -15
- package/dist/components/BitzTable/SelectionBar/style.mjs +24 -24
- package/dist/components/BitzTable/Store/index.d.ts +4 -0
- package/dist/components/BitzTable/Store/index.mjs +90 -88
- package/dist/components/BitzTable/SubTable/index.mjs +94 -94
- package/dist/components/BitzTable/Table/SortTableContext.d.ts +3 -5
- package/dist/components/BitzTable/Table/SortTableContext.mjs +42 -19
- package/dist/components/BitzTable/Table/index.d.ts +1 -2
- package/dist/components/BitzTable/Table/index.mjs +247 -245
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +51 -47
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +61 -60
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +46 -38
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +44 -44
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +19 -12
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +46 -43
- package/dist/components/BitzTable/ToolBar/style.mjs +21 -21
- package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +15 -16
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +13 -14
- package/dist/components/BitzTableSelect/TableCell/index.mjs +34 -33
- package/dist/components/BitzTableSelect/TextBlock/index.mjs +20 -18
- package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +7 -8
- package/dist/node_modules/.store/use-sync-external-store@1.2.0/node_modules/use-sync-external-store/shim/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/_virtual/Draggable.mjs +0 -4
- package/dist/_virtual/DraggableCore.mjs +0 -4
- package/dist/_virtual/Resizable.mjs +0 -4
- package/dist/_virtual/ResizableBox.mjs +0 -4
- package/dist/_virtual/cjs.mjs +0 -4
- package/dist/_virtual/clsx.m.mjs +0 -6
- package/dist/_virtual/domFns.mjs +0 -4
- package/dist/_virtual/getPrefix.mjs +0 -4
- package/dist/_virtual/index6.mjs +0 -4
- package/dist/_virtual/log.mjs +0 -4
- package/dist/_virtual/positionFns.mjs +0 -4
- package/dist/_virtual/propTypes.mjs +0 -4
- package/dist/_virtual/shims.mjs +0 -4
- package/dist/_virtual/utils.mjs +0 -4
- package/dist/components/BitzTable/Table/ResizableTitle.mjs +0 -32
- package/dist/node_modules/.store/clsx@1.2.1/node_modules/clsx/dist/clsx.m.mjs +0 -22
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/Draggable.mjs +0 -343
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/DraggableCore.mjs +0 -324
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/cjs.mjs +0 -14
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/domFns.mjs +0 -174
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/getPrefix.mjs +0 -35
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/log.mjs +0 -7
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/positionFns.mjs +0 -107
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/shims.mjs +0 -30
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/Resizable.mjs +0 -201
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/ResizableBox.mjs +0 -162
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/propTypes.mjs +0 -118
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/utils.mjs +0 -54
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/index.mjs +0 -13
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { j as n } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { BitzTableContext as
|
|
3
|
-
import
|
|
4
|
-
import { findParentFirstNodeByClass as
|
|
5
|
-
import
|
|
6
|
-
import { Form as C, Flex as y, Checkbox as
|
|
7
|
-
import { memo as
|
|
8
|
-
import
|
|
9
|
-
function
|
|
2
|
+
import { BitzTableContext as N } from "../../../Store/index.mjs";
|
|
3
|
+
import P from "../../../../BitzTheme/index.mjs";
|
|
4
|
+
import { findParentFirstNodeByClass as G } from "../../../../../utils/findNode.mjs";
|
|
5
|
+
import $ from "../../../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
|
|
6
|
+
import { Form as C, Flex as y, Checkbox as q, Radio as h, InputNumber as J, Select as Q } from "antd";
|
|
7
|
+
import { memo as R, useRef as U, useMemo as f, useContext as T, useState as u, useEffect as W, useImperativeHandle as X } from "react";
|
|
8
|
+
import Y from "./DndList.mjs";
|
|
9
|
+
function Z({
|
|
10
10
|
display: r,
|
|
11
11
|
showSelectRadio: g = !1,
|
|
12
|
-
parentHeight:
|
|
13
|
-
refInstance:
|
|
12
|
+
parentHeight: p,
|
|
13
|
+
refInstance: B
|
|
14
14
|
}) {
|
|
15
|
-
|
|
16
|
-
const v =
|
|
15
|
+
P.useToken();
|
|
16
|
+
const v = U(null), t = $(v), V = f(() => ({
|
|
17
17
|
// display: display ? 'flex' : 'none'
|
|
18
18
|
width: r ? "100%" : 0,
|
|
19
19
|
height: "100%",
|
|
@@ -25,19 +25,19 @@ function U({
|
|
|
25
25
|
left: 0,
|
|
26
26
|
right: 0
|
|
27
27
|
}
|
|
28
|
-
}), [r]),
|
|
29
|
-
|
|
30
|
-
var e, s;
|
|
31
|
-
|
|
32
|
-
g && x ? "selectedRows" : l.config.key
|
|
33
|
-
), E(((
|
|
28
|
+
}), [r]), z = f(() => typeof p == "number" && p && (t != null && t.height) ? p - (t == null ? void 0 : t.height) - 20 : "auto", [p, t == null ? void 0 : t.height]), l = T(N).exportConfig, x = T(N).selected, [i, w] = u([]), [a, d] = u([]), [m, b] = u("current"), [k, E] = u("page"), [j, S] = u(1);
|
|
29
|
+
W(() => {
|
|
30
|
+
var e, s, c, A, F, I;
|
|
31
|
+
d(l.fields ?? []), w(((e = l.fields) == null ? void 0 : e.map((O) => O.field)) ?? []), b(
|
|
32
|
+
g && x ? "selectedRows" : ((s = l.config) == null ? void 0 : s.key) ?? "current"
|
|
33
|
+
), E(((A = (c = l.config) == null ? void 0 : c.info) == null ? void 0 : A.type) ?? "page"), S(((I = (F = l.config) == null ? void 0 : F.info) == null ? void 0 : I.value) ?? 1);
|
|
34
34
|
}, [l, g, x]);
|
|
35
|
-
const o =
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
35
|
+
const o = f(() => a.filter((e) => e.show).map((e) => e.field), [a]), K = f(() => i.length === o.length, [i, o]), D = f(() => o.length > 0 && o.length < i.length, [o, i]), L = ({ target: e }) => {
|
|
36
|
+
d(a.map((s) => ({ ...s, show: e.checked })));
|
|
37
|
+
}, M = (e, s) => {
|
|
38
|
+
d(e), w(s);
|
|
39
39
|
};
|
|
40
|
-
return
|
|
40
|
+
return X(B, () => ({
|
|
41
41
|
getExportConfig: () => {
|
|
42
42
|
const e = {
|
|
43
43
|
fields: [],
|
|
@@ -47,8 +47,8 @@ function U({
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
return a.forEach((s) => {
|
|
50
|
-
let
|
|
51
|
-
o.includes(s.field) && (
|
|
50
|
+
let c = !1;
|
|
51
|
+
o.includes(s.field) && (c = !0), e.fields.push({ ...s, show: c });
|
|
52
52
|
}), m === "any" && (e.config.info = {
|
|
53
53
|
type: k,
|
|
54
54
|
value: (j || 0) < 1 ? 1 : j || 1
|
|
@@ -58,46 +58,46 @@ function U({
|
|
|
58
58
|
})), /* @__PURE__ */ n.jsxs(
|
|
59
59
|
C,
|
|
60
60
|
{
|
|
61
|
-
style:
|
|
61
|
+
style: V,
|
|
62
62
|
labelCol: { span: 3 },
|
|
63
63
|
labelAlign: "left",
|
|
64
64
|
colon: !1,
|
|
65
65
|
className: "exportConfigFormContent",
|
|
66
66
|
children: [
|
|
67
|
-
/* @__PURE__ */ n.jsx(C.Item, { label: "导出字段", className: "exportFields", children: /* @__PURE__ */ n.jsxs(y, { vertical: !0, style: { gap: 8, maxHeight:
|
|
67
|
+
/* @__PURE__ */ n.jsx(C.Item, { label: "导出字段", className: "exportFields", children: /* @__PURE__ */ n.jsxs(y, { vertical: !0, style: { gap: 8, maxHeight: z }, children: [
|
|
68
68
|
/* @__PURE__ */ n.jsx(
|
|
69
|
-
|
|
69
|
+
q,
|
|
70
70
|
{
|
|
71
|
-
checked:
|
|
72
|
-
indeterminate:
|
|
73
|
-
onChange:
|
|
71
|
+
checked: K,
|
|
72
|
+
indeterminate: D,
|
|
73
|
+
onChange: L,
|
|
74
74
|
style: { alignSelf: "flex-start" },
|
|
75
75
|
children: "全选"
|
|
76
76
|
}
|
|
77
77
|
),
|
|
78
78
|
/* @__PURE__ */ n.jsx(
|
|
79
|
-
|
|
79
|
+
Y,
|
|
80
80
|
{
|
|
81
81
|
dataList: a,
|
|
82
82
|
keys: i,
|
|
83
|
-
onChange:
|
|
84
|
-
onMoveEnd:
|
|
83
|
+
onChange: d,
|
|
84
|
+
onMoveEnd: M
|
|
85
85
|
}
|
|
86
86
|
)
|
|
87
87
|
] }) }),
|
|
88
88
|
/* @__PURE__ */ n.jsx(C.Item, { label: "导出设置", className: "exportTotal", children: /* @__PURE__ */ n.jsx(
|
|
89
|
-
|
|
89
|
+
h.Group,
|
|
90
90
|
{
|
|
91
91
|
ref: v,
|
|
92
92
|
value: m,
|
|
93
93
|
onChange: ({ target: e }) => b(e.value),
|
|
94
94
|
children: /* @__PURE__ */ n.jsxs(y, { vertical: !0, gap: 8, align: "flex-start", children: [
|
|
95
|
-
g && x && /* @__PURE__ */ n.jsx(
|
|
96
|
-
/* @__PURE__ */ n.jsx(
|
|
97
|
-
/* @__PURE__ */ n.jsx(
|
|
95
|
+
g && x && /* @__PURE__ */ n.jsx(h, { value: "selectedRows", children: /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出选中数据" }) }),
|
|
96
|
+
/* @__PURE__ */ n.jsx(h, { value: "current", children: /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "仅导出当前页" }) }),
|
|
97
|
+
/* @__PURE__ */ n.jsx(h, { value: "any", children: /* @__PURE__ */ n.jsxs(y, { align: "center", gap: 8, children: [
|
|
98
98
|
/* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出" }),
|
|
99
99
|
/* @__PURE__ */ n.jsx(
|
|
100
|
-
|
|
100
|
+
J,
|
|
101
101
|
{
|
|
102
102
|
controls: !1,
|
|
103
103
|
min: 1,
|
|
@@ -105,7 +105,7 @@ function U({
|
|
|
105
105
|
onChange: (e) => S(e),
|
|
106
106
|
style: { width: 120 },
|
|
107
107
|
addonAfter: /* @__PURE__ */ n.jsx(
|
|
108
|
-
|
|
108
|
+
Q,
|
|
109
109
|
{
|
|
110
110
|
value: k,
|
|
111
111
|
onChange: E,
|
|
@@ -114,14 +114,14 @@ function U({
|
|
|
114
114
|
{ label: "条", value: "pieces" }
|
|
115
115
|
],
|
|
116
116
|
onClick: (e) => e.preventDefault(),
|
|
117
|
-
getPopupContainer: (e) =>
|
|
117
|
+
getPopupContainer: (e) => G(e, "containerBody")
|
|
118
118
|
}
|
|
119
119
|
)
|
|
120
120
|
}
|
|
121
121
|
),
|
|
122
122
|
/* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "数据" })
|
|
123
123
|
] }) }),
|
|
124
|
-
/* @__PURE__ */ n.jsx(
|
|
124
|
+
/* @__PURE__ */ n.jsx(h, { value: "all", children: /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出全部数据" }) })
|
|
125
125
|
] })
|
|
126
126
|
}
|
|
127
127
|
) })
|
|
@@ -129,7 +129,7 @@ function U({
|
|
|
129
129
|
}
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
|
-
const
|
|
132
|
+
const re = R(Z);
|
|
133
133
|
export {
|
|
134
|
-
|
|
134
|
+
re as default
|
|
135
135
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as r } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { Modal as N, Typography as k, Card as B, Flex as
|
|
3
|
-
import { useMemo as
|
|
2
|
+
import { Modal as N, Typography as k, Card as B, Flex as m } from "antd";
|
|
3
|
+
import { useMemo as f, useState as F, useRef as h } from "react";
|
|
4
4
|
import H from "../../../BitzTheme/index.mjs";
|
|
5
5
|
import R from "../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
6
6
|
import { styles as T } from "./style.mjs";
|
|
7
7
|
function $({
|
|
8
|
-
open:
|
|
8
|
+
open: l,
|
|
9
9
|
title: C,
|
|
10
10
|
close: g,
|
|
11
11
|
closeAfter: p,
|
|
@@ -14,11 +14,11 @@ function $({
|
|
|
14
14
|
extra: t,
|
|
15
15
|
children: j
|
|
16
16
|
}) {
|
|
17
|
-
const { token: o } = H.useToken(), n =
|
|
18
|
-
p(), b(
|
|
19
|
-
}, e =
|
|
20
|
-
var
|
|
21
|
-
return e.current && s.current ? ((
|
|
17
|
+
const { token: o } = H.useToken(), n = f(() => o.mode === "dark", [o.mode]), [i, b] = F(0), M = () => {
|
|
18
|
+
p(), b(i + 1);
|
|
19
|
+
}, e = h(null), s = h(null), c = f(() => {
|
|
20
|
+
var a, d, u;
|
|
21
|
+
return e.current && s.current ? ((a = e.current) == null ? void 0 : a.clientHeight) - ((d = s.current) == null ? void 0 : d.clientHeight) - 24 : e.current && !t ? (u = e.current) == null ? void 0 : u.clientHeight : "100%";
|
|
22
22
|
}, [e.current, s.current, t]);
|
|
23
23
|
return /* @__PURE__ */ r.jsx(
|
|
24
24
|
N,
|
|
@@ -26,7 +26,7 @@ function $({
|
|
|
26
26
|
className: R(T(o), "tableConfigModal"),
|
|
27
27
|
title: /* @__PURE__ */ r.jsx(k.Title, { style: { fontSize: 16, margin: 0 }, children: C }),
|
|
28
28
|
getContainer: x,
|
|
29
|
-
open:
|
|
29
|
+
open: l,
|
|
30
30
|
onCancel: g,
|
|
31
31
|
afterClose: M,
|
|
32
32
|
style: {
|
|
@@ -38,7 +38,7 @@ function $({
|
|
|
38
38
|
width: 700,
|
|
39
39
|
footer: y,
|
|
40
40
|
children: /* @__PURE__ */ r.jsx(B, { className: "container", bordered: !1, children: /* @__PURE__ */ r.jsxs(
|
|
41
|
-
|
|
41
|
+
m,
|
|
42
42
|
{
|
|
43
43
|
ref: e,
|
|
44
44
|
vertical: !0,
|
|
@@ -47,10 +47,17 @@ function $({
|
|
|
47
47
|
style: { height: "100%" },
|
|
48
48
|
children: [
|
|
49
49
|
t && /* @__PURE__ */ r.jsx("div", { className: "extraContent", ref: s, children: t }),
|
|
50
|
-
/* @__PURE__ */ r.jsx(
|
|
50
|
+
l && /* @__PURE__ */ r.jsx(
|
|
51
|
+
m,
|
|
52
|
+
{
|
|
53
|
+
className: "containerBody",
|
|
54
|
+
style: { height: c || "100%" },
|
|
55
|
+
children: j(c)
|
|
56
|
+
}
|
|
57
|
+
)
|
|
51
58
|
]
|
|
52
59
|
},
|
|
53
|
-
|
|
60
|
+
i
|
|
54
61
|
) })
|
|
55
62
|
}
|
|
56
63
|
);
|
|
@@ -1,76 +1,79 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { Space as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { BitzConfigContext as
|
|
9
|
-
import { BitzToolBarContext as
|
|
10
|
-
import { BitzTableContext as
|
|
11
|
-
const
|
|
12
|
-
size:
|
|
13
|
-
tools:
|
|
14
|
-
toolsConfig:
|
|
1
|
+
import { j as r } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { useContext as c, useMemo as h, useRef as g, useEffect as C } from "react";
|
|
3
|
+
import { Flex as j, Space as z } from "antd";
|
|
4
|
+
import B from "../RefreshIcon/index.mjs";
|
|
5
|
+
import T from "../ColConfigIcon/index.mjs";
|
|
6
|
+
import E from "../FullscreenIcon/index.mjs";
|
|
7
|
+
import I from "../ExportIcon/index.mjs";
|
|
8
|
+
import { BitzConfigContext as R } from "../../../BitzConfigProvider/context.mjs";
|
|
9
|
+
import { BitzToolBarContext as b } from "./context.mjs";
|
|
10
|
+
import { BitzTableContext as k } from "../../Store/index.mjs";
|
|
11
|
+
const F = ["export", "refresh", "fullscreen", "config"], J = ({
|
|
12
|
+
size: W,
|
|
13
|
+
tools: l,
|
|
14
|
+
toolsConfig: m,
|
|
15
15
|
exclude: t,
|
|
16
|
-
onExport:
|
|
17
|
-
onRefresh:
|
|
18
|
-
onColumnChange:
|
|
16
|
+
onExport: p,
|
|
17
|
+
onRefresh: d,
|
|
18
|
+
onColumnChange: a
|
|
19
19
|
}) => {
|
|
20
|
-
const { Table:
|
|
21
|
-
const
|
|
22
|
-
return t != null && t.length ?
|
|
23
|
-
}, [
|
|
24
|
-
const
|
|
20
|
+
const { Table: e } = c(R), { selected: u, setToolbarWidth: x } = c(k), i = h(() => {
|
|
21
|
+
const s = l || (e == null ? void 0 : e.toolbar) || F;
|
|
22
|
+
return t != null && t.length ? s.filter((n) => !t.includes(n)) : s;
|
|
23
|
+
}, [e == null ? void 0 : e.toolbar, t, l]), o = h(() => {
|
|
24
|
+
const s = {
|
|
25
25
|
export: { order: 1, show: !1 },
|
|
26
26
|
refresh: { order: 2, show: !1 },
|
|
27
27
|
fullscreen: { order: 3, show: !1 },
|
|
28
28
|
config: { order: 4, show: !1 }
|
|
29
29
|
};
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
}),
|
|
33
|
-
}, [
|
|
34
|
-
return
|
|
35
|
-
x.
|
|
30
|
+
return i.forEach((n, w) => {
|
|
31
|
+
s[n].order = w + 1, s[n].show = i.includes(n);
|
|
32
|
+
}), s;
|
|
33
|
+
}, [i]), f = g(null);
|
|
34
|
+
return C(() => {
|
|
35
|
+
f.current && x(f.current.clientWidth);
|
|
36
|
+
}, [f.current]), /* @__PURE__ */ r.jsx(b.Provider, { value: m ?? {}, children: /* @__PURE__ */ r.jsx(
|
|
37
|
+
j,
|
|
36
38
|
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
ref: f,
|
|
40
|
+
style: { height: "100%", ...u && { zIndex: 10 } },
|
|
41
|
+
children: /* @__PURE__ */ r.jsxs(z.Compact, { children: [
|
|
42
|
+
/* @__PURE__ */ r.jsx(
|
|
43
|
+
I,
|
|
41
44
|
{
|
|
42
45
|
order: o.export.order,
|
|
43
46
|
show: o.export.show,
|
|
44
|
-
onClick:
|
|
47
|
+
onClick: p
|
|
45
48
|
}
|
|
46
49
|
),
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
50
|
+
/* @__PURE__ */ r.jsx(
|
|
51
|
+
B,
|
|
49
52
|
{
|
|
50
53
|
order: o.refresh.order,
|
|
51
54
|
show: o.refresh.show,
|
|
52
|
-
onClick:
|
|
55
|
+
onClick: d
|
|
53
56
|
}
|
|
54
57
|
),
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
|
|
58
|
+
/* @__PURE__ */ r.jsx(
|
|
59
|
+
E,
|
|
57
60
|
{
|
|
58
61
|
order: o.fullscreen.order,
|
|
59
62
|
show: o.fullscreen.show
|
|
60
63
|
}
|
|
61
64
|
),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
|
|
65
|
+
/* @__PURE__ */ r.jsx(
|
|
66
|
+
T,
|
|
64
67
|
{
|
|
65
68
|
order: o.config.order,
|
|
66
69
|
show: o.config.show,
|
|
67
|
-
onChange:
|
|
70
|
+
onChange: a
|
|
68
71
|
}
|
|
69
72
|
)
|
|
70
|
-
]
|
|
73
|
+
] })
|
|
71
74
|
}
|
|
72
75
|
) });
|
|
73
76
|
};
|
|
74
77
|
export {
|
|
75
|
-
|
|
78
|
+
J as default
|
|
76
79
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BitzTableContext as
|
|
1
|
+
import { BitzTableContext as N } from "../Store/index.mjs";
|
|
2
2
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/extractStyle.mjs";
|
|
3
3
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.mjs";
|
|
4
|
-
import { useContext as
|
|
4
|
+
import { useContext as R, useMemo as v } from "react";
|
|
5
5
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/StyleContext.mjs";
|
|
6
6
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/theme/createTheme.mjs";
|
|
7
7
|
import "../../../node_modules/.store/rc-util@5.39.1/node_modules/rc-util/es/warning.mjs";
|
|
@@ -9,13 +9,13 @@ import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@an
|
|
|
9
9
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.mjs";
|
|
10
10
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.mjs";
|
|
11
11
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useHMR.mjs";
|
|
12
|
-
import
|
|
12
|
+
import w from "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.mjs";
|
|
13
13
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/transformers/legacyLogicalProperties.mjs";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
const
|
|
17
|
-
const { theme:
|
|
18
|
-
var s, c, p, b, d;
|
|
14
|
+
import D from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
15
|
+
import E from "../../BitzTheme/index.mjs";
|
|
16
|
+
const W = () => {
|
|
17
|
+
const { theme: g, token: i, hashId: n } = E.useToken(), { tableSize: a, selected: h } = R(N), u = v(() => a ?? "lg", [a]), r = "toolbarItem", l = "rowSelecting", m = "ToolbarItemBtn", x = (e, B, t, o) => {
|
|
18
|
+
var s, c, p, b, d, S, T, $, f, z;
|
|
19
19
|
return [
|
|
20
20
|
{
|
|
21
21
|
[`.${e}`]: {
|
|
@@ -36,48 +36,48 @@ const O = () => {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
[`.${e}.${
|
|
39
|
+
[`.${e}.${B}`]: {
|
|
40
40
|
color: "#fff !important"
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
[`.${e}.xl${t}`]: {
|
|
45
|
-
fontSize: (s = o.Table.xlTable) == null ? void 0 :
|
|
45
|
+
fontSize: (c = (s = o.Table) == null ? void 0 : s.xlTable) == null ? void 0 : c.fontSize
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
[`.${e}.lg${t}`]: {
|
|
50
|
-
fontSize: (
|
|
50
|
+
fontSize: (b = (p = o.Table) == null ? void 0 : p.lgTable) == null ? void 0 : b.fontSize
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
[`.${e}.md${t}`]: {
|
|
55
|
-
fontSize: (
|
|
55
|
+
fontSize: (S = (d = o.Table) == null ? void 0 : d.mdTable) == null ? void 0 : S.fontSize
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
[`.${e}.sm${t}`]: {
|
|
60
|
-
fontSize: (
|
|
60
|
+
fontSize: ($ = (T = o.Table) == null ? void 0 : T.smTable) == null ? void 0 : $.fontSize
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
[`.${e}.xs${t}`]: {
|
|
65
|
-
fontSize: (
|
|
65
|
+
fontSize: (z = (f = o.Table) == null ? void 0 : f.xsTable) == null ? void 0 : z.fontSize
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
];
|
|
69
69
|
};
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
w({ theme: g, token: i, hashId: n, path: [r] }, () => [
|
|
71
|
+
x(r, l, m, i)
|
|
72
72
|
]);
|
|
73
|
-
const
|
|
74
|
-
return { toolbarItemClassName:
|
|
73
|
+
const y = `${u}${m}`;
|
|
74
|
+
return { toolbarItemClassName: D(
|
|
75
75
|
r,
|
|
76
|
-
{ [`${l}`]:
|
|
77
|
-
|
|
76
|
+
{ [`${l}`]: h },
|
|
77
|
+
y,
|
|
78
78
|
n
|
|
79
79
|
) };
|
|
80
80
|
};
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
W as default
|
|
83
83
|
};
|
|
@@ -3,12 +3,11 @@ import p from "../../BitzDescriptions/index.mjs";
|
|
|
3
3
|
import m from "../TableCell/index.mjs";
|
|
4
4
|
import u from "../TextBlock/index.mjs";
|
|
5
5
|
import { defaultValue as a } from "../index.mjs";
|
|
6
|
-
const
|
|
7
|
-
const l =
|
|
6
|
+
const R = (o, n, e) => {
|
|
7
|
+
const l = o.map((r) => (typeof r.title == "string" && (r.title = /* @__PURE__ */ i.jsx(u, { value: r.title, bold: 600 })), {
|
|
8
8
|
...r,
|
|
9
|
-
width: "auto",
|
|
10
9
|
render: (t, c, g) => {
|
|
11
|
-
const f = (
|
|
10
|
+
const f = (n == null ? void 0 : n.length) === 1 ? !1 : g + 1 > ((n == null ? void 0 : n.length) || 0) / 2;
|
|
12
11
|
if (r != null && r.render) {
|
|
13
12
|
const s = r.render(t, c, g);
|
|
14
13
|
if (typeof s == "object")
|
|
@@ -24,22 +23,22 @@ const w = (n, o, e) => {
|
|
|
24
23
|
return [
|
|
25
24
|
{
|
|
26
25
|
title: "序号",
|
|
27
|
-
rowScope:
|
|
26
|
+
// rowScope: 'row',
|
|
28
27
|
className: "numRow",
|
|
29
|
-
width:
|
|
28
|
+
width: 60,
|
|
30
29
|
render: (r, t, c) => c + 1 + (e.page - 1) * e.size
|
|
31
30
|
},
|
|
32
31
|
...l
|
|
33
32
|
];
|
|
34
|
-
},
|
|
33
|
+
}, w = (o, n) => o ? {
|
|
35
34
|
expandable: {
|
|
36
35
|
rowExpandable: (e) => {
|
|
37
36
|
var l;
|
|
38
|
-
return
|
|
37
|
+
return n ? !0 : (l = e[o]) == null ? void 0 : l.length;
|
|
39
38
|
},
|
|
40
39
|
expandedRowRender: (e) => {
|
|
41
40
|
var r;
|
|
42
|
-
const l = (r = e[
|
|
41
|
+
const l = (r = e[o]) == null ? void 0 : r.map((t) => (typeof t.label == "string" && (t.label = /* @__PURE__ */ i.jsx(u, { minRows: 1, maxRows: 5, value: t.label })), typeof t.children == "string" && (t.children = /* @__PURE__ */ i.jsx(u, { minRows: 1, maxRows: 5, value: t.children })), t));
|
|
43
42
|
return /* @__PURE__ */ i.jsx(
|
|
44
43
|
p,
|
|
45
44
|
{
|
|
@@ -51,8 +50,8 @@ const w = (n, o, e) => {
|
|
|
51
50
|
);
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
|
-
} : null,
|
|
55
|
-
if (
|
|
53
|
+
} : null, y = (o, n) => {
|
|
54
|
+
if (o) {
|
|
56
55
|
const e = {
|
|
57
56
|
gutter: 20,
|
|
58
57
|
left: {
|
|
@@ -67,7 +66,7 @@ const w = (n, o, e) => {
|
|
|
67
66
|
button: 4
|
|
68
67
|
}
|
|
69
68
|
};
|
|
70
|
-
return
|
|
69
|
+
return n || (e.right.search = 11, e.right.operation = 13, e.right.toolTagSelect = 0, e.right.totalSelect = 11, e.right.button = void 0), e;
|
|
71
70
|
} else {
|
|
72
71
|
const e = {
|
|
73
72
|
gutter: 0,
|
|
@@ -83,11 +82,11 @@ const w = (n, o, e) => {
|
|
|
83
82
|
button: void 0
|
|
84
83
|
}
|
|
85
84
|
};
|
|
86
|
-
return
|
|
85
|
+
return n || (e.right.search = 11, e.right.operation = 13, e.right.toolTagSelect = 0, e.right.totalSelect = 11), e;
|
|
87
86
|
}
|
|
88
87
|
};
|
|
89
88
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
R as getColumns,
|
|
90
|
+
w as getExpandable,
|
|
91
|
+
y as getLayoutConfig
|
|
93
92
|
};
|
|
@@ -3,7 +3,7 @@ import { useRef as se, useContext as ce, useState as v, useMemo as B, useCallbac
|
|
|
3
3
|
import { Row as b, Col as a, Space as F, Form as h, Select as G, Spin as ae, Typography as pe, Flex as ue, Empty as H } from "antd";
|
|
4
4
|
import de from "../../BitzPagination/index.mjs";
|
|
5
5
|
import xe from "../../BitzTable/index.mjs";
|
|
6
|
-
import
|
|
6
|
+
import O from "../../BitzButton/index.mjs";
|
|
7
7
|
import { getColumns as me, getExpandable as he, getLayoutConfig as je } from "./getData.mjs";
|
|
8
8
|
import Se from "../TextBlock/index.mjs";
|
|
9
9
|
import fe from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
|
|
@@ -16,15 +16,15 @@ import ge from "../../../node_modules/.store/@ant-design_icons@5.3.6/node_module
|
|
|
16
16
|
function He({
|
|
17
17
|
columns: P,
|
|
18
18
|
tableData: y,
|
|
19
|
-
total:
|
|
19
|
+
total: W,
|
|
20
20
|
loading: p,
|
|
21
21
|
loadingFailed: j,
|
|
22
|
-
loadAgain:
|
|
22
|
+
loadAgain: $,
|
|
23
23
|
page: z,
|
|
24
|
-
onPageChange:
|
|
25
|
-
searchInput:
|
|
24
|
+
onPageChange: q,
|
|
25
|
+
searchInput: J,
|
|
26
26
|
showToolTagSelect: E,
|
|
27
|
-
toolTags:
|
|
27
|
+
toolTags: L,
|
|
28
28
|
onToolTagChange: w,
|
|
29
29
|
lrLayout: T,
|
|
30
30
|
parentRender: I,
|
|
@@ -139,7 +139,7 @@ function He({
|
|
|
139
139
|
/* @__PURE__ */ e.jsx(a, { span: n.left.span, children: T && I && I(M, g == null ? void 0 : g.height) }),
|
|
140
140
|
/* @__PURE__ */ e.jsx(a, { span: n.right.span, children: /* @__PURE__ */ e.jsxs(F, { direction: "vertical", size: M, style: { width: "100%" }, children: [
|
|
141
141
|
/* @__PURE__ */ e.jsx(h, { className: "tableSelectPopupSearchForm", children: /* @__PURE__ */ e.jsx(b, { gutter: [16, 16], children: /* @__PURE__ */ e.jsx(a, { span: 24, children: /* @__PURE__ */ e.jsxs(b, { justify: "space-between", gutter: [16, 16], children: [
|
|
142
|
-
/* @__PURE__ */ e.jsx(a, { span: n.right.search, children: /* @__PURE__ */ e.jsx(h.Item, { children:
|
|
142
|
+
/* @__PURE__ */ e.jsx(a, { span: n.right.search, children: /* @__PURE__ */ e.jsx(h.Item, { children: J }) }),
|
|
143
143
|
/* @__PURE__ */ e.jsx(a, { span: n.right.operation, children: /* @__PURE__ */ e.jsxs(b, { justify: "end", gutter: 8, children: [
|
|
144
144
|
/* @__PURE__ */ e.jsx(a, { span: n.right.toolTagSelect, children: /* @__PURE__ */ e.jsx(h.Item, { children: /* @__PURE__ */ e.jsx(
|
|
145
145
|
G,
|
|
@@ -153,7 +153,7 @@ function He({
|
|
|
153
153
|
placeholder: "常用标签",
|
|
154
154
|
showSearch: !1,
|
|
155
155
|
disabled: p,
|
|
156
|
-
options:
|
|
156
|
+
options: L,
|
|
157
157
|
value: Y,
|
|
158
158
|
onChange: D,
|
|
159
159
|
onDropdownVisibleChange: S
|
|
@@ -182,7 +182,7 @@ function He({
|
|
|
182
182
|
) })
|
|
183
183
|
] }) }) }),
|
|
184
184
|
/* @__PURE__ */ e.jsx(a, { span: n.right.button, children: /* @__PURE__ */ e.jsx(
|
|
185
|
-
|
|
185
|
+
O,
|
|
186
186
|
{
|
|
187
187
|
type: "primary",
|
|
188
188
|
danger: !0,
|
|
@@ -191,7 +191,7 @@ function He({
|
|
|
191
191
|
}
|
|
192
192
|
) }),
|
|
193
193
|
/* @__PURE__ */ e.jsx(a, { span: n.right.button, children: /* @__PURE__ */ e.jsx(
|
|
194
|
-
|
|
194
|
+
O,
|
|
195
195
|
{
|
|
196
196
|
type: "primary",
|
|
197
197
|
onClick: () => x([], [], "confirm"),
|
|
@@ -206,7 +206,7 @@ function He({
|
|
|
206
206
|
ref: k,
|
|
207
207
|
...j && {
|
|
208
208
|
className: "pointerMouse",
|
|
209
|
-
onClick: () =>
|
|
209
|
+
onClick: () => $()
|
|
210
210
|
},
|
|
211
211
|
children: /* @__PURE__ */ e.jsx(
|
|
212
212
|
ae,
|
|
@@ -221,7 +221,6 @@ function He({
|
|
|
221
221
|
rowKey: t.value,
|
|
222
222
|
loading: p,
|
|
223
223
|
bordered: "row-column",
|
|
224
|
-
tableLayout: "fixed",
|
|
225
224
|
scroll: { x: 1, y: 400 },
|
|
226
225
|
showPagination: !1,
|
|
227
226
|
showTableTool: !1,
|
|
@@ -247,9 +246,9 @@ function He({
|
|
|
247
246
|
size: "small",
|
|
248
247
|
enableControl: !0,
|
|
249
248
|
pagination: z,
|
|
250
|
-
total:
|
|
249
|
+
total: W,
|
|
251
250
|
dataSource: y,
|
|
252
|
-
paginationEmit:
|
|
251
|
+
paginationEmit: q
|
|
253
252
|
}
|
|
254
253
|
) }) })
|
|
255
254
|
] }) })
|