bitz-react-admin-ui 2.0.1 → 2.0.2
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 +5 -2
- package/dist/_virtual/dayjs.min2.mjs +4 -0
- package/dist/components/BitzCalendar/index.mjs +1 -1
- package/dist/components/BitzConfigProvider/context.d.ts +0 -2
- 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/Store/index.d.ts +5 -3
- package/dist/components/BitzTable/Store/index.mjs +127 -147
- package/dist/components/BitzTable/Table/index.d.ts +1 -1
- package/dist/components/BitzTable/Table/index.mjs +30 -24
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +41 -39
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +41 -41
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.d.ts +4 -3
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +17 -17
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +2 -2
- package/dist/components/BitzTable/ToolBar/index.mjs +4 -4
- 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
|
@@ -45,7 +45,7 @@ function Lt({
|
|
|
45
45
|
mobileRefreshEmit: ne,
|
|
46
46
|
operationFilter: A,
|
|
47
47
|
enableControlPage: Se,
|
|
48
|
-
pagination:
|
|
48
|
+
pagination: m,
|
|
49
49
|
paginationEmit: R = () => {
|
|
50
50
|
},
|
|
51
51
|
mobilePageHeight: Mt = 500,
|
|
@@ -58,7 +58,7 @@ function Lt({
|
|
|
58
58
|
tableAction: De,
|
|
59
59
|
tableToolbar: Pe,
|
|
60
60
|
selectionBar: Ee,
|
|
61
|
-
scroll:
|
|
61
|
+
scroll: u,
|
|
62
62
|
components: K,
|
|
63
63
|
expandable: b,
|
|
64
64
|
rowSelection: z,
|
|
@@ -66,12 +66,12 @@ function Lt({
|
|
|
66
66
|
...i
|
|
67
67
|
}) {
|
|
68
68
|
var Be, ze;
|
|
69
|
-
const { token: x } = Bt.useToken(), { Table: c } = x, { tableSpaceBetweenPage: le = 10 } = c, { gap: Ae } = wt(), { stylesConfig: w, ...M } = J(Ct), ce = (Be = J(zt).Table) == null ? void 0 : Be.rowHoverable, [k, ie] = P(!1), $ = T(void 0), V = T(0), O = T(0), [Ke, I] = P(!1), [
|
|
69
|
+
const { token: x } = Bt.useToken(), { Table: c } = x, { tableSpaceBetweenPage: le = 10 } = c, { gap: Ae } = wt(), { stylesConfig: w, ...M } = J(Ct), ce = (Be = J(zt).Table) == null ? void 0 : Be.rowHoverable, [k, ie] = P(!1), $ = T(void 0), V = T(0), O = T(0), [Ke, I] = P(!1), [f, $e] = P([]);
|
|
70
70
|
Q(() => {
|
|
71
71
|
let e = [...d];
|
|
72
|
-
(
|
|
72
|
+
(m == null ? void 0 : m.page) !== 1 && (e = [...f, ...e]), $e(e);
|
|
73
73
|
}, [d]);
|
|
74
|
-
const Ve = l(() => !!(
|
|
74
|
+
const Ve = l(() => !!(f != null && f.length) && (f == null ? void 0 : f.length) >= E, [f, E]), [Oe, Ie] = P([]), _e = (e, t) => {
|
|
75
75
|
var n;
|
|
76
76
|
const r = (n = A == null ? void 0 : A(e, t)) == null ? void 0 : n.filter(
|
|
77
77
|
(s) => s.type !== "divider"
|
|
@@ -101,24 +101,27 @@ function Lt({
|
|
|
101
101
|
}), t.length)
|
|
102
102
|
return Math.ceil(Math.max(...t)) + Ae * 2;
|
|
103
103
|
}, he = () => {
|
|
104
|
-
var
|
|
105
|
-
const e = (
|
|
104
|
+
var h, C, j;
|
|
105
|
+
const e = (h = g.current) == null ? void 0 : h.querySelector(
|
|
106
106
|
".ant-table-body"
|
|
107
107
|
), t = e == null ? void 0 : e.clientWidth, n = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, s = (j = (C = g.current) == null ? void 0 : C.querySelector(
|
|
108
108
|
".ant-table-cell-scrollbar"
|
|
109
109
|
)) == null ? void 0 : j.offsetWidth;
|
|
110
110
|
return { tbodyWidth: t, scrollbarSize: s, hasScrollBar: n };
|
|
111
111
|
}, { y: F, hasScrollBar: fe, scrollbarSize: G } = l(() => {
|
|
112
|
-
if (typeof L > "u")
|
|
113
|
-
return {};
|
|
114
112
|
const { hasScrollBar: e, scrollbarSize: t } = he();
|
|
113
|
+
if (typeof L > "u")
|
|
114
|
+
return {
|
|
115
|
+
hasScrollBar: e,
|
|
116
|
+
scrollbarSize: t
|
|
117
|
+
};
|
|
115
118
|
let r = 40, n = 40;
|
|
116
119
|
if (g.current) {
|
|
117
120
|
const D = window.getComputedStyle(g.current);
|
|
118
121
|
r = parseInt(D.getPropertyValue("--cell-height")), n = parseInt(D.getPropertyValue("--toolbar-height"));
|
|
119
122
|
}
|
|
120
|
-
const s = (p == null ? void 0 : p.height) || 0,
|
|
121
|
-
return { y: (k ? window.innerHeight : L) - s -
|
|
123
|
+
const s = (p == null ? void 0 : p.height) || 0, h = s ? le : 0;
|
|
124
|
+
return { y: (k ? window.innerHeight : L) - s - h - n - r, hasScrollBar: e, scrollbarSize: t };
|
|
122
125
|
}, [
|
|
123
126
|
k,
|
|
124
127
|
L,
|
|
@@ -126,19 +129,19 @@ function Lt({
|
|
|
126
129
|
_ == null ? void 0 : _.height,
|
|
127
130
|
q == null ? void 0 : q.height
|
|
128
131
|
]), me = l(() => {
|
|
129
|
-
let e =
|
|
130
|
-
return V.current && (e -= V.current), O.current && (e -= O.current * ($.current || 0)),
|
|
131
|
-
}, [
|
|
132
|
+
let e = (u == null ? void 0 : u.x) ?? 1e3;
|
|
133
|
+
return V.current && (e -= V.current), O.current && (e -= O.current * ($.current || 0)), u != null && u.x ? { x: e, y: u.y || F } : u != null && u.y ? { x: e, y: u.y } : { x: e, y: F };
|
|
134
|
+
}, [u, F, $.current]), Ge = (e) => {
|
|
132
135
|
const t = e.length, r = e.filter((B) => B.width), s = r.map((B) => B.width).reduce((B, X) => B + X, 0);
|
|
133
|
-
let
|
|
136
|
+
let h = 0;
|
|
134
137
|
if (g.current) {
|
|
135
138
|
const B = window.getComputedStyle(g.current), X = parseInt(
|
|
136
139
|
B.getPropertyValue("--toolCell-paddingInline")
|
|
137
140
|
);
|
|
138
|
-
|
|
141
|
+
h = parseInt(B.getPropertyValue("--fontSize")) + 4 + 2 * X;
|
|
139
142
|
}
|
|
140
143
|
let C = 0;
|
|
141
|
-
z && (C +=
|
|
144
|
+
z && (C += h), b && (C += h);
|
|
142
145
|
const { tbodyWidth: j } = he(), y = parseInt(`${me.x}`) || 0, D = Math.max(y, j), ve = (parseInt(`${D}`) || 0) - s - C;
|
|
143
146
|
return ve >= 0 ? ve / (t - r.length) : void 0;
|
|
144
147
|
}, v = l(() => {
|
|
@@ -147,12 +150,12 @@ function Lt({
|
|
|
147
150
|
M.columnsMap
|
|
148
151
|
);
|
|
149
152
|
V.current = Math.ceil(n), O.current = s;
|
|
150
|
-
const
|
|
153
|
+
const h = r.sort(xt(M.columnsMap));
|
|
151
154
|
if (Y)
|
|
152
|
-
return
|
|
153
|
-
const C = Ge(
|
|
155
|
+
return h;
|
|
156
|
+
const C = Ge(h);
|
|
154
157
|
$.current = Math.ceil(C ?? 0);
|
|
155
|
-
const j =
|
|
158
|
+
const j = h.map((y) => ({
|
|
156
159
|
...y,
|
|
157
160
|
...y.width ? {
|
|
158
161
|
width: y.useMaxWidth ? Fe() ?? y.width : y.width
|
|
@@ -261,7 +264,10 @@ function Lt({
|
|
|
261
264
|
ft,
|
|
262
265
|
{
|
|
263
266
|
finished: Ve,
|
|
264
|
-
onLoad: async () =>
|
|
267
|
+
onLoad: async () => (
|
|
268
|
+
// @ts-ignore
|
|
269
|
+
!a && (R == null ? void 0 : R((m == null ? void 0 : m.page) + 1, m == null ? void 0 : m.size))
|
|
270
|
+
),
|
|
265
271
|
loadingText: "加载中...",
|
|
266
272
|
finishedText: "没有更多了",
|
|
267
273
|
errorText: "加载失败",
|
|
@@ -271,7 +277,7 @@ function Lt({
|
|
|
271
277
|
className: "mobileList",
|
|
272
278
|
style: { backgroundColor: c == null ? void 0 : c.mobileListBgColor },
|
|
273
279
|
children: [
|
|
274
|
-
|
|
280
|
+
f == null ? void 0 : f.map((e, t) => /* @__PURE__ */ o.jsx(
|
|
275
281
|
"div",
|
|
276
282
|
{
|
|
277
283
|
className: "listItem",
|
|
@@ -378,7 +384,7 @@ function Lt({
|
|
|
378
384
|
size: "small",
|
|
379
385
|
elRefInstance: ue,
|
|
380
386
|
enableControl: Se,
|
|
381
|
-
pagination:
|
|
387
|
+
pagination: m,
|
|
382
388
|
total: E,
|
|
383
389
|
dataSource: d,
|
|
384
390
|
resetPage: He,
|
|
@@ -1,53 +1,55 @@
|
|
|
1
1
|
import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { create as
|
|
3
|
-
import { Modal as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { BitzTableContext as
|
|
2
|
+
import { create as W, useModal as q, antdModalV5 as A } from "@ebay/nice-modal-react";
|
|
3
|
+
import { Modal as G, Typography as I, Card as J, Segmented as P, Flex as Q } from "antd";
|
|
4
|
+
import { useState as u, useContext as U, useRef as K, useMemo as X } from "react";
|
|
5
|
+
import { BitzTableContext as Y } from "../../Store/index.mjs";
|
|
6
6
|
import M from "../../../BitzButton/index.mjs";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { styles as
|
|
13
|
-
import
|
|
14
|
-
|
|
7
|
+
import Z from "../../../BitzTheme/index.mjs";
|
|
8
|
+
import _ from "../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
9
|
+
import $ from "./StylesConfig/index.mjs";
|
|
10
|
+
import ee from "./ColumnsSort/index.mjs";
|
|
11
|
+
import te from "./ExportConfig/index.mjs";
|
|
12
|
+
import { styles as oe } from "./style.mjs";
|
|
13
|
+
import re from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
|
|
14
|
+
import se from "../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
|
|
15
|
+
const Se = W(
|
|
15
16
|
({ title: B, onChange: o, getContainer: R }) => {
|
|
16
|
-
const { token: r } =
|
|
17
|
-
|
|
17
|
+
const { token: r } = Z.useToken(), s = q(), [l, T] = u(1), [z, p] = u(!1);
|
|
18
|
+
u(!1);
|
|
18
19
|
const {
|
|
19
20
|
persistenceType: N,
|
|
20
|
-
persistenceKey:
|
|
21
|
+
persistenceKey: g,
|
|
21
22
|
onlineChange: i,
|
|
22
23
|
setColumnsMap: V,
|
|
23
24
|
setSortKeyColumns: w,
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
setScope: H,
|
|
26
|
+
stylesStorageType: L,
|
|
27
|
+
stylesStorageKey: y,
|
|
26
28
|
setTableStylesConfig: a,
|
|
27
29
|
onlineStylesConfigChange: m
|
|
28
30
|
// clearPersistenceStorage,
|
|
29
|
-
} =
|
|
30
|
-
var x,
|
|
31
|
-
const c = (x =
|
|
32
|
-
...(
|
|
33
|
-
...(
|
|
31
|
+
} = U(Y), t = K(null), C = K(null), E = async () => {
|
|
32
|
+
var x, S, j, h, b, k, v, F;
|
|
33
|
+
const c = (x = C.current) == null ? void 0 : x.getFormInstance(), d = await (c == null ? void 0 : c.getFieldsValue()), D = se(d, "scope"), f = {
|
|
34
|
+
...(S = t.current) == null ? void 0 : S.getLeftSortColumns(),
|
|
35
|
+
...(j = t.current) == null ? void 0 : j.getCenterSortColumns(),
|
|
34
36
|
...(h = t.current) == null ? void 0 : h.getRightSortColumns()
|
|
35
|
-
},
|
|
37
|
+
}, O = [
|
|
36
38
|
...(b = t.current) == null ? void 0 : b.getLeftSortKeys(),
|
|
37
39
|
...(k = t.current) == null ? void 0 : k.getCenterSortKeys(),
|
|
38
40
|
...(v = t.current) == null ? void 0 : v.getRightSortKeys()
|
|
39
41
|
];
|
|
40
|
-
a == null || a(
|
|
41
|
-
|
|
42
|
+
a == null || a(D), H(d.scope ? "global" : "current"), V(f), w(O), L === "online" && y && (m == null || m(y, d)), N === "online" && g && (i == null || i(g, f)), o ? (p(!0), (F = o == null ? void 0 : o(f)) == null || F.finally(() => {
|
|
43
|
+
p(!1), s.hide();
|
|
42
44
|
})) : s.hide();
|
|
43
|
-
}, n =
|
|
45
|
+
}, n = X(() => r.mode === "dark", [r.mode]);
|
|
44
46
|
return /* @__PURE__ */ e.jsx(
|
|
45
|
-
|
|
47
|
+
G,
|
|
46
48
|
{
|
|
47
|
-
className:
|
|
48
|
-
title: /* @__PURE__ */ e.jsx(
|
|
49
|
+
className: _(oe(r), "tableConfigModal"),
|
|
50
|
+
title: /* @__PURE__ */ e.jsx(I.Title, { style: { fontSize: 16, margin: 0 }, children: B }),
|
|
49
51
|
getContainer: R,
|
|
50
|
-
...
|
|
52
|
+
...A(s),
|
|
51
53
|
style: {
|
|
52
54
|
"--sortCard-bgColor": n ? "#444" : "#f2f2f2",
|
|
53
55
|
"--sortCard-titleColor": n ? "#ccc" : "#777",
|
|
@@ -61,17 +63,17 @@ const ge = D(
|
|
|
61
63
|
M,
|
|
62
64
|
{
|
|
63
65
|
type: "primary",
|
|
64
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
65
|
-
onClick:
|
|
66
|
+
icon: /* @__PURE__ */ e.jsx(re, {}),
|
|
67
|
+
onClick: E,
|
|
66
68
|
loading: z,
|
|
67
69
|
children: "保存"
|
|
68
70
|
}
|
|
69
71
|
),
|
|
70
72
|
/* @__PURE__ */ e.jsx(M, { onClick: () => s.hide(), children: "取消" })
|
|
71
73
|
] }),
|
|
72
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
74
|
+
children: /* @__PURE__ */ e.jsxs(J, { className: "container", bordered: !1, children: [
|
|
73
75
|
/* @__PURE__ */ e.jsx("div", { className: "segmentedWrapper", children: /* @__PURE__ */ e.jsx(
|
|
74
|
-
|
|
76
|
+
P,
|
|
75
77
|
{
|
|
76
78
|
size: "large",
|
|
77
79
|
options: [
|
|
@@ -83,10 +85,10 @@ const ge = D(
|
|
|
83
85
|
onChange: T
|
|
84
86
|
}
|
|
85
87
|
) }),
|
|
86
|
-
/* @__PURE__ */ e.jsxs(
|
|
87
|
-
/* @__PURE__ */ e.jsx(
|
|
88
|
-
/* @__PURE__ */ e.jsx(
|
|
89
|
-
/* @__PURE__ */ e.jsx(
|
|
88
|
+
/* @__PURE__ */ e.jsxs(Q, { className: "containerBody", children: [
|
|
89
|
+
/* @__PURE__ */ e.jsx($, { ref: C, display: l === 1 }),
|
|
90
|
+
/* @__PURE__ */ e.jsx(ee, { ref: t, display: l === 2 }),
|
|
91
|
+
/* @__PURE__ */ e.jsx(te, { display: l === 3 })
|
|
90
92
|
] })
|
|
91
93
|
] })
|
|
92
94
|
}
|
|
@@ -94,5 +96,5 @@ const ge = D(
|
|
|
94
96
|
}
|
|
95
97
|
);
|
|
96
98
|
export {
|
|
97
|
-
|
|
99
|
+
Se as default
|
|
98
100
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { j as o } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import "../../../../../assets/iconfont/IconMore.mjs";
|
|
3
3
|
import "../../../../../assets/iconfont/IconIcFluentHomeRegular.mjs";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
4
|
+
import j from "../../../../../assets/iconfont/IconKuansongde.mjs";
|
|
5
|
+
import g from "../../../../../assets/iconfont/IconTekuansong.mjs";
|
|
6
|
+
import I from "../../../../../assets/iconfont/IconJincoude.mjs";
|
|
7
|
+
import P from "../../../../../assets/iconfont/IconZhongdengde.mjs";
|
|
8
|
+
import z from "../../../../../assets/iconfont/IconTejincou.mjs";
|
|
9
|
+
import v from "../../../../../assets/iconfont/IconWufengexian.mjs";
|
|
10
|
+
import H from "../../../../../assets/iconfont/IconHangliefengexian.mjs";
|
|
11
|
+
import k from "../../../../../assets/iconfont/IconHangfengexian.mjs";
|
|
12
|
+
import w from "../../../../../assets/iconfont/IconLiefengexian.mjs";
|
|
13
13
|
import C from "../../../../../assets/iconfont/IconYoubanmawentianchong.mjs";
|
|
14
|
-
import
|
|
14
|
+
import R from "../../../../../assets/iconfont/IconWubanmawentianchong.mjs";
|
|
15
15
|
import "../../../../../assets/iconfont/IconZhongzhi.mjs";
|
|
16
16
|
import "../../../../../assets/iconfont/IconGaojisousuo.mjs";
|
|
17
17
|
import "../../../../../assets/iconfont/IconSousuo.mjs";
|
|
@@ -28,62 +28,62 @@ import "../../../../../assets/iconfont/IconFabu.mjs";
|
|
|
28
28
|
import "../../../../../assets/iconfont/IconShanchu1.mjs";
|
|
29
29
|
import "../../../../../assets/iconfont/IconShanchu.mjs";
|
|
30
30
|
import "../../../../../assets/iconfont/IconTuodong.mjs";
|
|
31
|
-
import { BitzTableContext as
|
|
32
|
-
import
|
|
33
|
-
import { Form as i, Radio as
|
|
34
|
-
import { forwardRef as
|
|
31
|
+
import { BitzTableContext as t } from "../../../Store/index.mjs";
|
|
32
|
+
import G from "../../../../BitzTheme/index.mjs";
|
|
33
|
+
import { Form as i, Radio as s, Checkbox as N } from "antd";
|
|
34
|
+
import { forwardRef as T, useMemo as F, useContext as c, useEffect as S, useImperativeHandle as B } from "react";
|
|
35
35
|
import e from "./RadioCard.mjs";
|
|
36
|
-
const
|
|
36
|
+
const W = ({ defaultSize: l, items: a }) => a.map((r) => r.key === l ? {
|
|
37
37
|
...r,
|
|
38
38
|
label: `${r.label}(默认)`
|
|
39
|
-
} : r),
|
|
40
|
-
({ display: l },
|
|
41
|
-
const { token: r } =
|
|
39
|
+
} : r), jo = T(
|
|
40
|
+
({ display: l }, a) => {
|
|
41
|
+
const { token: r } = G.useToken(), p = F(() => ({
|
|
42
42
|
width: "100%",
|
|
43
43
|
...{ display: l ? "flex" : "none" }
|
|
44
44
|
}), [l]), u = {
|
|
45
45
|
size: 26,
|
|
46
46
|
color: r.colorPrimary
|
|
47
|
-
}, [
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
}, [m] = i.useForm(), { stylesConfig: d, scope: f } = c(t);
|
|
48
|
+
S(() => {
|
|
49
|
+
m.setFieldsValue({ ...d, scope: f === "global" });
|
|
50
50
|
}, []);
|
|
51
|
-
const { defaultTableSize:
|
|
52
|
-
defaultSize:
|
|
51
|
+
const { defaultTableSize: x } = c(t), b = W({
|
|
52
|
+
defaultSize: x,
|
|
53
53
|
items: [
|
|
54
54
|
{
|
|
55
55
|
key: "xs",
|
|
56
56
|
label: "特紧凑",
|
|
57
|
-
icon:
|
|
57
|
+
icon: z
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
key: "sm",
|
|
61
61
|
label: "紧凑",
|
|
62
|
-
icon:
|
|
62
|
+
icon: I
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
key: "md",
|
|
66
66
|
label: "中等",
|
|
67
|
-
icon:
|
|
67
|
+
icon: P
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
key: "lg",
|
|
71
71
|
label: "宽松",
|
|
72
|
-
icon:
|
|
72
|
+
icon: j
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
key: "xl",
|
|
76
76
|
label: "特宽松",
|
|
77
|
-
icon:
|
|
77
|
+
icon: g
|
|
78
78
|
}
|
|
79
79
|
]
|
|
80
80
|
});
|
|
81
|
-
return
|
|
82
|
-
getFormInstance: () =>
|
|
81
|
+
return B(a, () => ({
|
|
82
|
+
getFormInstance: () => m
|
|
83
83
|
})), /* @__PURE__ */ o.jsxs(
|
|
84
84
|
i,
|
|
85
85
|
{
|
|
86
|
-
form:
|
|
86
|
+
form: m,
|
|
87
87
|
style: p,
|
|
88
88
|
labelCol: { span: 3 },
|
|
89
89
|
labelAlign: "left",
|
|
@@ -91,11 +91,11 @@ const B = ({ defaultSize: l, items: m }) => m.map((r) => r.key === l ? {
|
|
|
91
91
|
className: "appearanceFormContent",
|
|
92
92
|
layout: "inline",
|
|
93
93
|
children: [
|
|
94
|
-
/* @__PURE__ */ o.jsx(i.Item, { label: "行高", name: "size", children: /* @__PURE__ */ o.jsx(
|
|
95
|
-
/* @__PURE__ */ o.jsx(i.Item, { label: "分割线", name: "bordered", children: /* @__PURE__ */ o.jsxs(
|
|
96
|
-
/* @__PURE__ */ o.jsx(e, { label: "无分割线", value: "hide", children: /* @__PURE__ */ o.jsx(
|
|
94
|
+
/* @__PURE__ */ o.jsx(i.Item, { label: "行高", name: "size", children: /* @__PURE__ */ o.jsx(s.Group, { className: "sizeRadioGroup", children: b.map(({ key: n, label: h, icon: y }) => /* @__PURE__ */ o.jsx(e, { label: h, value: n, children: /* @__PURE__ */ o.jsx(y, { ...u }) }, n)) }) }),
|
|
95
|
+
/* @__PURE__ */ o.jsx(i.Item, { label: "分割线", name: "bordered", children: /* @__PURE__ */ o.jsxs(s.Group, { className: "splitBorderRadioGroup", children: [
|
|
96
|
+
/* @__PURE__ */ o.jsx(e, { label: "无分割线", value: "hide", children: /* @__PURE__ */ o.jsx(v, { size: 26, color: r.colorPrimaryHover }) }),
|
|
97
97
|
/* @__PURE__ */ o.jsx(e, { label: "行分割线", value: "row", children: /* @__PURE__ */ o.jsx(
|
|
98
|
-
|
|
98
|
+
k,
|
|
99
99
|
{
|
|
100
100
|
size: 26,
|
|
101
101
|
color: [
|
|
@@ -107,7 +107,7 @@ const B = ({ defaultSize: l, items: m }) => m.map((r) => r.key === l ? {
|
|
|
107
107
|
}
|
|
108
108
|
) }),
|
|
109
109
|
/* @__PURE__ */ o.jsx(e, { label: "列分割线", value: "column", children: /* @__PURE__ */ o.jsx(
|
|
110
|
-
|
|
110
|
+
w,
|
|
111
111
|
{
|
|
112
112
|
size: 26,
|
|
113
113
|
color: [
|
|
@@ -119,7 +119,7 @@ const B = ({ defaultSize: l, items: m }) => m.map((r) => r.key === l ? {
|
|
|
119
119
|
}
|
|
120
120
|
) }),
|
|
121
121
|
/* @__PURE__ */ o.jsx(e, { label: "行列分割线", value: "row-column", children: /* @__PURE__ */ o.jsx(
|
|
122
|
-
|
|
122
|
+
H,
|
|
123
123
|
{
|
|
124
124
|
size: 26,
|
|
125
125
|
color: [
|
|
@@ -131,7 +131,7 @@ const B = ({ defaultSize: l, items: m }) => m.map((r) => r.key === l ? {
|
|
|
131
131
|
}
|
|
132
132
|
) })
|
|
133
133
|
] }) }),
|
|
134
|
-
/* @__PURE__ */ o.jsx(i.Item, { label: "斑马纹", name: "zebra", children: /* @__PURE__ */ o.jsxs(
|
|
134
|
+
/* @__PURE__ */ o.jsx(i.Item, { label: "斑马纹", name: "zebra", children: /* @__PURE__ */ o.jsxs(s.Group, { className: "zebraRadioGroup", children: [
|
|
135
135
|
/* @__PURE__ */ o.jsx(e, { label: "有斑马纹", value: !0, children: /* @__PURE__ */ o.jsx(
|
|
136
136
|
C,
|
|
137
137
|
{
|
|
@@ -140,19 +140,19 @@ const B = ({ defaultSize: l, items: m }) => m.map((r) => r.key === l ? {
|
|
|
140
140
|
}
|
|
141
141
|
) }),
|
|
142
142
|
/* @__PURE__ */ o.jsx(e, { label: "无斑马纹", value: !1, children: /* @__PURE__ */ o.jsx(
|
|
143
|
-
|
|
143
|
+
R,
|
|
144
144
|
{
|
|
145
145
|
size: 26,
|
|
146
146
|
color: r.colorPrimaryHover
|
|
147
147
|
}
|
|
148
148
|
) })
|
|
149
149
|
] }) }),
|
|
150
|
-
/* @__PURE__ */ o.jsx(i.Item, { name: "scope", valuePropName: "checked", className: "scope", children: /* @__PURE__ */ o.jsx(
|
|
150
|
+
/* @__PURE__ */ o.jsx(i.Item, { name: "scope", valuePropName: "checked", className: "scope", children: /* @__PURE__ */ o.jsx(N, { children: "应用到全局表格" }) })
|
|
151
151
|
]
|
|
152
152
|
}
|
|
153
153
|
);
|
|
154
154
|
}
|
|
155
155
|
);
|
|
156
156
|
export {
|
|
157
|
-
|
|
157
|
+
jo as default
|
|
158
158
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BitzTableToolBarProps } from '..';
|
|
3
|
-
interface
|
|
3
|
+
interface ColumnsConfigProps {
|
|
4
4
|
order?: number;
|
|
5
5
|
show?: boolean;
|
|
6
6
|
icon?: React.ReactNode;
|
|
7
7
|
onChange?: BitzTableToolBarProps['onColumnChange'];
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
/** 表格头部右侧列配置icon按钮 */
|
|
10
|
+
declare const ColumnsConfig: (props: ColumnsConfigProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export default ColumnsConfig;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
import { show as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { BitzTableContext as
|
|
9
|
-
import
|
|
10
|
-
const s = "表格设置",
|
|
11
|
-
const { order: a, show: u = !0, icon: f = /* @__PURE__ */ e.jsx(
|
|
12
|
-
return
|
|
2
|
+
import { useContext as g, useState as x, useMemo as h, useEffect as j } from "react";
|
|
3
|
+
import { Tooltip as b } from "antd";
|
|
4
|
+
import { show as E } from "@ebay/nice-modal-react";
|
|
5
|
+
import B from "./ColumnConfigModal.mjs";
|
|
6
|
+
import p from "../style.mjs";
|
|
7
|
+
import v from "../../../BitzButton/index.mjs";
|
|
8
|
+
import { BitzTableContext as y } from "../../Store/index.mjs";
|
|
9
|
+
import z from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs";
|
|
10
|
+
const s = "表格设置", N = (n) => {
|
|
11
|
+
const { order: a, show: u = !0, icon: f = /* @__PURE__ */ e.jsx(z, {}) } = n, { toolbarItemClassName: d } = p(), { uuid: l } = g(y), [i, r] = x(!1), C = h(() => i ? !1 : void 0, [i]);
|
|
12
|
+
return j(() => (document == null || document.addEventListener("fullscreenchange", (o) => {
|
|
13
13
|
var t, m, c;
|
|
14
14
|
(t = o.target) != null && t.classList.contains("bitzTableBlock") && (r(!!document.fullscreenElement), (c = (m = document.fullscreenElement) == null ? void 0 : m.classList) != null && c.contains("bitzTableBlock") || r(!1));
|
|
15
15
|
}), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
|
|
16
16
|
})), []), u ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
17
17
|
/* @__PURE__ */ e.jsx(
|
|
18
|
-
|
|
18
|
+
B,
|
|
19
19
|
{
|
|
20
20
|
id: `ColumnConfigModal-${l}`,
|
|
21
21
|
title: s,
|
|
@@ -26,19 +26,19 @@ const s = "表格设置", M = (n) => {
|
|
|
26
26
|
getContainer: C
|
|
27
27
|
}
|
|
28
28
|
),
|
|
29
|
-
/* @__PURE__ */ e.jsx(
|
|
30
|
-
|
|
29
|
+
/* @__PURE__ */ e.jsx(b, { title: s, open: !1, children: /* @__PURE__ */ e.jsx(
|
|
30
|
+
v,
|
|
31
31
|
{
|
|
32
32
|
type: "text",
|
|
33
33
|
className: d,
|
|
34
|
-
onClick: () =>
|
|
34
|
+
onClick: () => E(`ColumnConfigModal-${l}`),
|
|
35
35
|
icon: f,
|
|
36
36
|
style: { order: a },
|
|
37
37
|
children: s
|
|
38
38
|
}
|
|
39
39
|
) })
|
|
40
40
|
] }) : null;
|
|
41
|
-
}
|
|
41
|
+
};
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
N as default
|
|
44
44
|
};
|
|
@@ -12,13 +12,13 @@ const z = [
|
|
|
12
12
|
"fullscreen",
|
|
13
13
|
"stylesConfig"
|
|
14
14
|
], B = ({
|
|
15
|
-
size:
|
|
15
|
+
size: E,
|
|
16
16
|
tools: h,
|
|
17
17
|
exclude: e,
|
|
18
18
|
loading: l,
|
|
19
19
|
onExport: m,
|
|
20
20
|
onRefresh: c,
|
|
21
|
-
onSizeChange:
|
|
21
|
+
onSizeChange: I,
|
|
22
22
|
onColumnChange: p
|
|
23
23
|
}) => {
|
|
24
24
|
const { Table: r } = d(y), f = i(() => {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import r from "./Wrapper/index.mjs";
|
|
2
2
|
import e from "./ExportIcon/index.mjs";
|
|
3
3
|
import n from "./RefreshIcon/index.mjs";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import l from "./ColConfigIcon/index.mjs";
|
|
5
|
+
import t from "./FullscreenIcon/index.mjs";
|
|
6
6
|
const o = r;
|
|
7
7
|
process.env.NODE_ENV !== "production" && (o.displayName = "BitzTableToolBar");
|
|
8
8
|
o.ExportIcon = e;
|
|
9
9
|
o.RefreshIcon = n;
|
|
10
|
-
o.FullscreenIcon =
|
|
11
|
-
o.ColConfigIcon =
|
|
10
|
+
o.FullscreenIcon = t;
|
|
11
|
+
o.ColConfigIcon = l;
|
|
12
12
|
export {
|
|
13
13
|
o as default
|
|
14
14
|
};
|