bitz-react-admin-ui 2.2.2 → 2.2.4
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/dayjs.min.mjs +2 -5
- package/dist/components/BitzCalendar/index.mjs +1 -1
- package/dist/components/BitzDayJs/index.mjs +1 -1
- package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +1 -1
- package/dist/components/BitzFuiCalendar/ColumnData.mjs +1 -1
- package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
- package/dist/components/BitzMeetingTime/index.mjs +1 -1
- package/dist/components/BitzTable/Table/index.mjs +124 -124
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +20 -20
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +19 -19
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +35 -35
- package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
- package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
- package/dist/style.css +1 -1
- package/dist/utils/time.mjs +1 -1
- package/package.json +1 -1
- package/dist/_virtual/dayjs.min2.mjs +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as c } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import { css as me } from "../../../../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
|
|
3
|
-
import { theme as pe, Flex as
|
|
3
|
+
import { theme as pe, Flex as F, Typography as q, Space as xe, Checkbox as ge, Button as Ce } from "antd";
|
|
4
4
|
import { forwardRef as ye, useRef as ke, useMemo as k, useContext as Me, useEffect as G, useState as m, useImperativeHandle as Se, memo as we } from "react";
|
|
5
5
|
import { useImmer as Le } from "../../../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
|
|
6
6
|
import je from "../../../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
|
|
@@ -11,7 +11,7 @@ import { BitzTableContext as Ne } from "../../../Store/index.mjs";
|
|
|
11
11
|
import ve from "../../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
|
|
12
12
|
import Ee from "../../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
|
|
13
13
|
const Re = ye(
|
|
14
|
-
({ display: K, parentHeight:
|
|
14
|
+
({ display: K, parentHeight: I }, H) => {
|
|
15
15
|
const { token: ee } = pe.useToken(), Q = ke(null), f = je(Q), te = k(() => ({
|
|
16
16
|
// display: display ? 'flex' : 'none'
|
|
17
17
|
width: K ? "100%" : 0,
|
|
@@ -25,7 +25,7 @@ const Re = ye(
|
|
|
25
25
|
right: 0
|
|
26
26
|
}
|
|
27
27
|
}), [K]), O = {
|
|
28
|
-
height: k(() => typeof
|
|
28
|
+
height: k(() => typeof I == "number" && I && (f != null && f.height) ? I - (f == null ? void 0 : f.height) - 16 : "auto", [I, f == null ? void 0 : f.height]),
|
|
29
29
|
overflow: "hidden auto",
|
|
30
30
|
gap: 6
|
|
31
31
|
}, { defaultColumnKeyMap: se, columns: U, columnsMap: oe } = Me(Ne), [i, V] = Le({});
|
|
@@ -57,12 +57,12 @@ const Re = ye(
|
|
|
57
57
|
((s = i[r]) == null ? void 0 : s.fixed) === "left" ? e[r] = i[r] : ((n = i[r]) == null ? void 0 : n.fixed) === "right" ? o[r] = i[r] : t[r] = i[r];
|
|
58
58
|
p(e), x(o), g(t);
|
|
59
59
|
}, [i]);
|
|
60
|
-
const [b,
|
|
60
|
+
const [b, z] = m([]), [M, N] = m([]), [h, p] = m({}), [v, D] = m([]), [S, E] = m([]), [a, x] = m({}), [R, A] = m([]), [w, T] = m([]), [d, g] = m({});
|
|
61
61
|
G(() => {
|
|
62
62
|
const e = [], o = [], t = [], s = [], n = [], r = [];
|
|
63
63
|
W.forEach((l) => {
|
|
64
64
|
l.fixed === "left" ? (e.push(l), o.push(l.key)) : l.fixed === "right" ? (t.push(l), s.push(l.key)) : (n.push(l), r.push(l.key));
|
|
65
|
-
}),
|
|
65
|
+
}), z(e), N(o), D(t), E(s), A(n), T(r);
|
|
66
66
|
}, [W]);
|
|
67
67
|
const ne = (e) => {
|
|
68
68
|
p(e);
|
|
@@ -83,7 +83,7 @@ const Re = ye(
|
|
|
83
83
|
[e]: { ...n, fixed: void 0, order: R.length }
|
|
84
84
|
});
|
|
85
85
|
const r = t.findIndex((y) => y.key === e), l = t.splice(r, 1)[0];
|
|
86
|
-
|
|
86
|
+
A([...R, { ...l, fixed: void 0 }]);
|
|
87
87
|
const C = s.splice(r, 1);
|
|
88
88
|
return T([...w, ...C]), { map: o, list: t, keys: s };
|
|
89
89
|
}, Y = (e, o, t, s) => {
|
|
@@ -93,7 +93,7 @@ const Re = ye(
|
|
|
93
93
|
[e]: { ...n, fixed: "left", order: b.length, show: !0 }
|
|
94
94
|
});
|
|
95
95
|
const r = t.findIndex((y) => y.key === e), l = t.splice(r, 1)[0];
|
|
96
|
-
|
|
96
|
+
z([...b, { ...l, fixed: "left" }]);
|
|
97
97
|
const C = s.splice(r, 1);
|
|
98
98
|
return N([...M, ...C]), { map: o, list: t, keys: s };
|
|
99
99
|
}, Z = (e, o, t, s) => {
|
|
@@ -108,7 +108,7 @@ const Re = ye(
|
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
const r = t.findIndex((y) => y.key === e), l = t.splice(r, 1)[0];
|
|
111
|
-
|
|
111
|
+
D([...v, { ...l, fixed: "right" }]);
|
|
112
112
|
const C = s.splice(r, 1);
|
|
113
113
|
return E([...S, ...C]), { map: o, list: t, keys: s };
|
|
114
114
|
}, $ = (e, o) => {
|
|
@@ -119,7 +119,7 @@ const Re = ye(
|
|
|
119
119
|
b,
|
|
120
120
|
M
|
|
121
121
|
);
|
|
122
|
-
p({ ...t }),
|
|
122
|
+
p({ ...t }), z([...s]), N([...n]);
|
|
123
123
|
} else if (o === "center") {
|
|
124
124
|
const { map: t, list: s, keys: n } = Y(
|
|
125
125
|
e,
|
|
@@ -127,7 +127,7 @@ const Re = ye(
|
|
|
127
127
|
R,
|
|
128
128
|
w
|
|
129
129
|
);
|
|
130
|
-
g({ ...t }),
|
|
130
|
+
g({ ...t }), A([...s]), T([...n]);
|
|
131
131
|
} else {
|
|
132
132
|
const { map: t, list: s, keys: n } = Y(
|
|
133
133
|
e,
|
|
@@ -135,7 +135,7 @@ const Re = ye(
|
|
|
135
135
|
v,
|
|
136
136
|
S
|
|
137
137
|
);
|
|
138
|
-
x({ ...t }),
|
|
138
|
+
x({ ...t }), D([...s]), E([...n]);
|
|
139
139
|
}
|
|
140
140
|
}, P = (e, o) => {
|
|
141
141
|
if (o === "left") {
|
|
@@ -145,7 +145,7 @@ const Re = ye(
|
|
|
145
145
|
b,
|
|
146
146
|
M
|
|
147
147
|
);
|
|
148
|
-
p({ ...t }),
|
|
148
|
+
p({ ...t }), z([...s]), N([...n]);
|
|
149
149
|
} else if (o === "center") {
|
|
150
150
|
const { map: t, list: s, keys: n } = Z(
|
|
151
151
|
e,
|
|
@@ -153,7 +153,7 @@ const Re = ye(
|
|
|
153
153
|
R,
|
|
154
154
|
w
|
|
155
155
|
);
|
|
156
|
-
g({ ...t }),
|
|
156
|
+
g({ ...t }), A([...s]), T([...n]);
|
|
157
157
|
} else {
|
|
158
158
|
const { map: t, list: s, keys: n } = X(
|
|
159
159
|
e,
|
|
@@ -161,11 +161,11 @@ const Re = ye(
|
|
|
161
161
|
v,
|
|
162
162
|
S
|
|
163
163
|
);
|
|
164
|
-
x({ ...t }),
|
|
164
|
+
x({ ...t }), D([...s]), E([...n]);
|
|
165
165
|
}
|
|
166
166
|
}, ae = ({ target: e }) => {
|
|
167
167
|
e.checked ? (p(j(h, "show", !0)), g(j(d, "show", !0)), x(j(a, "show", !0))) : (p(j(h, "show", !1)), g(j(d, "show", !1)), x(j(a, "show", !1)));
|
|
168
|
-
},
|
|
168
|
+
}, B = k(() => [...M, ...w, ...S], [M, w, S]), L = k(() => {
|
|
169
169
|
var o, t, s;
|
|
170
170
|
const e = [];
|
|
171
171
|
for (const n in h)
|
|
@@ -175,7 +175,7 @@ const Re = ye(
|
|
|
175
175
|
for (const n in a)
|
|
176
176
|
(s = a[n]) != null && s.show && e.push(n);
|
|
177
177
|
return e;
|
|
178
|
-
}, [h, d, a]), de = k(() =>
|
|
178
|
+
}, [h, d, a]), de = k(() => B.length === L.length, [B, L]), fe = k(() => L.length > 0 && L.length < B.length, [L, B]), ue = () => {
|
|
179
179
|
V({ ...se });
|
|
180
180
|
};
|
|
181
181
|
return Se(H, () => ({
|
|
@@ -183,9 +183,9 @@ const Re = ye(
|
|
|
183
183
|
getCenterSortColumns: () => d,
|
|
184
184
|
getRightSortColumns: () => a,
|
|
185
185
|
getCheckedKeys: () => L
|
|
186
|
-
})), /* @__PURE__ */ c.jsxs(
|
|
186
|
+
})), /* @__PURE__ */ c.jsxs(F, { vertical: !0, gap: 16, style: te, children: [
|
|
187
187
|
/* @__PURE__ */ c.jsxs("div", { className: "sortContent", children: [
|
|
188
|
-
/* @__PURE__ */ c.jsxs(
|
|
188
|
+
/* @__PURE__ */ c.jsxs(F, { vertical: !0, className: "sortCard", style: O, children: [
|
|
189
189
|
/* @__PURE__ */ c.jsx(q.Title, { level: 5, className: "title", children: "固定在左侧" }),
|
|
190
190
|
/* @__PURE__ */ c.jsx(
|
|
191
191
|
J,
|
|
@@ -201,7 +201,7 @@ const Re = ye(
|
|
|
201
201
|
}
|
|
202
202
|
)
|
|
203
203
|
] }),
|
|
204
|
-
/* @__PURE__ */ c.jsxs(
|
|
204
|
+
/* @__PURE__ */ c.jsxs(F, { vertical: !0, className: "sortCard", style: O, children: [
|
|
205
205
|
/* @__PURE__ */ c.jsx(q.Title, { level: 5, className: "title", children: "不固定" }),
|
|
206
206
|
/* @__PURE__ */ c.jsx(
|
|
207
207
|
J,
|
|
@@ -217,7 +217,7 @@ const Re = ye(
|
|
|
217
217
|
}
|
|
218
218
|
)
|
|
219
219
|
] }),
|
|
220
|
-
/* @__PURE__ */ c.jsxs(
|
|
220
|
+
/* @__PURE__ */ c.jsxs(F, { vertical: !0, className: "sortCard", style: O, children: [
|
|
221
221
|
/* @__PURE__ */ c.jsx(q.Title, { level: 5, className: "title", children: "固定在右侧" }),
|
|
222
222
|
/* @__PURE__ */ c.jsx(
|
|
223
223
|
J,
|
|
@@ -4,12 +4,12 @@ import D from "../../../../BitzTheme/index.mjs";
|
|
|
4
4
|
import { findParentFirstNodeByClass as L } from "../../../../../utils/findNode.mjs";
|
|
5
5
|
import M from "../../../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
|
|
6
6
|
import { Form as C, Flex as y, Checkbox as O, Radio as c, InputNumber as P, Select as G } from "antd";
|
|
7
|
-
import { memo as $, useRef as q, useMemo as h, useContext as F, useState as f, useEffect as
|
|
8
|
-
import
|
|
9
|
-
function
|
|
7
|
+
import { memo as $, useRef as q, useMemo as h, useContext as F, useState as f, useEffect as J, useImperativeHandle as Q } from "react";
|
|
8
|
+
import R from "./DndList.mjs";
|
|
9
|
+
function U({
|
|
10
10
|
display: r,
|
|
11
|
-
showSelectRadio:
|
|
12
|
-
parentHeight:
|
|
11
|
+
showSelectRadio: g = !1,
|
|
12
|
+
parentHeight: u,
|
|
13
13
|
refInstance: I
|
|
14
14
|
}) {
|
|
15
15
|
D.useToken();
|
|
@@ -25,19 +25,19 @@ function R({
|
|
|
25
25
|
left: 0,
|
|
26
26
|
right: 0
|
|
27
27
|
}
|
|
28
|
-
}), [r]), T = h(() => typeof
|
|
29
|
-
|
|
28
|
+
}), [r]), T = h(() => typeof u == "number" && u && (t != null && t.height) ? u - (t == null ? void 0 : t.height) - 20 : "auto", [u, t == null ? void 0 : t.height]), l = F(A).exportConfig, x = F(A).selected, [i, w] = f([]), [a, p] = f([]), [m, b] = f("current"), [k, E] = f("page"), [j, S] = f(1);
|
|
29
|
+
J(() => {
|
|
30
30
|
var e, s;
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
p(l.fields), w(l.fields.map((d) => d.field)), b(
|
|
32
|
+
g && x ? "selectedRows" : l.config.key
|
|
33
33
|
), E(((e = l.config.info) == null ? void 0 : e.type) ?? "page"), S(((s = l.config.info) == null ? void 0 : s.value) ?? 1);
|
|
34
|
-
}, [l,
|
|
34
|
+
}, [l, g, x]);
|
|
35
35
|
const o = h(() => a.filter((e) => e.show).map((e) => e.field), [a]), B = h(() => i.length === o.length, [i, o]), V = h(() => o.length > 0 && o.length < i.length, [o, i]), z = ({ target: e }) => {
|
|
36
|
-
|
|
36
|
+
p(a.map((s) => ({ ...s, show: e.checked })));
|
|
37
37
|
}, K = (e, s) => {
|
|
38
|
-
|
|
38
|
+
p(e), w(s);
|
|
39
39
|
};
|
|
40
|
-
return
|
|
40
|
+
return Q(I, () => ({
|
|
41
41
|
getExportConfig: () => {
|
|
42
42
|
const e = {
|
|
43
43
|
fields: [],
|
|
@@ -47,8 +47,8 @@ function R({
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
return a.forEach((s) => {
|
|
50
|
-
let
|
|
51
|
-
o.includes(s.field) && (
|
|
50
|
+
let d = !1;
|
|
51
|
+
o.includes(s.field) && (d = !0), e.fields.push({ ...s, show: d });
|
|
52
52
|
}), m === "any" && (e.config.info = {
|
|
53
53
|
type: k,
|
|
54
54
|
value: (j || 0) < 1 ? 1 : j || 1
|
|
@@ -76,11 +76,11 @@ function R({
|
|
|
76
76
|
}
|
|
77
77
|
),
|
|
78
78
|
/* @__PURE__ */ n.jsx(
|
|
79
|
-
|
|
79
|
+
R,
|
|
80
80
|
{
|
|
81
81
|
dataList: a,
|
|
82
82
|
keys: i,
|
|
83
|
-
onChange:
|
|
83
|
+
onChange: p,
|
|
84
84
|
onMoveEnd: K
|
|
85
85
|
}
|
|
86
86
|
)
|
|
@@ -92,7 +92,7 @@ function R({
|
|
|
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
|
-
|
|
95
|
+
g && x && /* @__PURE__ */ n.jsx(c, { value: "selectedRows", children: /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出选中数据" }) }),
|
|
96
96
|
/* @__PURE__ */ n.jsx(c, { value: "current", children: /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "仅导出当前页" }) }),
|
|
97
97
|
/* @__PURE__ */ n.jsx(c, { value: "any", children: /* @__PURE__ */ n.jsxs(y, { align: "center", gap: 8, children: [
|
|
98
98
|
/* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出" }),
|
|
@@ -129,7 +129,7 @@ function R({
|
|
|
129
129
|
}
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
|
-
const te = $(
|
|
132
|
+
const te = $(U);
|
|
133
133
|
export {
|
|
134
134
|
te as default
|
|
135
135
|
};
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { Modal as
|
|
3
|
-
import { useMemo as m, useState as
|
|
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 u } from "antd";
|
|
3
|
+
import { useMemo as m, useState as F, useRef as f } 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:
|
|
9
|
-
title:
|
|
10
|
-
close:
|
|
11
|
-
closeAfter:
|
|
12
|
-
getContainer:
|
|
8
|
+
open: h,
|
|
9
|
+
title: C,
|
|
10
|
+
close: g,
|
|
11
|
+
closeAfter: p,
|
|
12
|
+
getContainer: x,
|
|
13
13
|
footer: y,
|
|
14
|
-
extra:
|
|
15
|
-
children:
|
|
14
|
+
extra: t,
|
|
15
|
+
children: j
|
|
16
16
|
}) {
|
|
17
|
-
const { token:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return /* @__PURE__ */ e.jsx(
|
|
26
|
-
F,
|
|
17
|
+
const { token: o } = H.useToken(), n = m(() => o.mode === "dark", [o.mode]), [l, b] = F(0), M = () => {
|
|
18
|
+
p(), b(l + 1);
|
|
19
|
+
}, e = f(null), s = f(null), i = m(() => {
|
|
20
|
+
var c, a, d;
|
|
21
|
+
return e.current && s.current ? ((c = e.current) == null ? void 0 : c.clientHeight) - ((a = s.current) == null ? void 0 : a.clientHeight) - 24 : e.current && !t ? (d = e.current) == null ? void 0 : d.clientHeight : "100%";
|
|
22
|
+
}, [e.current, s.current, t]);
|
|
23
|
+
return /* @__PURE__ */ r.jsx(
|
|
24
|
+
N,
|
|
27
25
|
{
|
|
28
|
-
className: R(T(
|
|
29
|
-
title: /* @__PURE__ */
|
|
30
|
-
getContainer:
|
|
31
|
-
open:
|
|
32
|
-
onCancel:
|
|
26
|
+
className: R(T(o), "tableConfigModal"),
|
|
27
|
+
title: /* @__PURE__ */ r.jsx(k.Title, { style: { fontSize: 16, margin: 0 }, children: C }),
|
|
28
|
+
getContainer: x,
|
|
29
|
+
open: h,
|
|
30
|
+
onCancel: g,
|
|
31
|
+
afterClose: M,
|
|
33
32
|
style: {
|
|
34
|
-
"--sortCard-bgColor":
|
|
35
|
-
"--sortCard-titleColor":
|
|
36
|
-
"--radioCard-bgColor":
|
|
37
|
-
"--radioCard-bgHoverColor":
|
|
33
|
+
"--sortCard-bgColor": n ? "#444" : "#f2f2f2",
|
|
34
|
+
"--sortCard-titleColor": n ? "#ccc" : "#777",
|
|
35
|
+
"--radioCard-bgColor": n ? "#444" : "#F2F2F2",
|
|
36
|
+
"--radioCard-bgHoverColor": n ? "#333" : o.colorBgContainer
|
|
38
37
|
},
|
|
39
38
|
width: 700,
|
|
40
39
|
footer: y,
|
|
41
|
-
children: /* @__PURE__ */
|
|
42
|
-
|
|
40
|
+
children: /* @__PURE__ */ r.jsx(B, { className: "container", bordered: !1, children: /* @__PURE__ */ r.jsxs(
|
|
41
|
+
u,
|
|
43
42
|
{
|
|
44
|
-
ref:
|
|
43
|
+
ref: e,
|
|
45
44
|
vertical: !0,
|
|
46
45
|
align: "center",
|
|
47
46
|
gap: 24,
|
|
48
47
|
style: { height: "100%" },
|
|
49
48
|
children: [
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
t && /* @__PURE__ */ r.jsx("div", { className: "extraContent", ref: s, children: t }),
|
|
50
|
+
/* @__PURE__ */ r.jsx(u, { className: "containerBody", style: { height: i || "100%" }, children: j(i) })
|
|
52
51
|
]
|
|
53
|
-
}
|
|
52
|
+
},
|
|
53
|
+
l
|
|
54
54
|
) })
|
|
55
55
|
}
|
|
56
56
|
);
|