bitz-react-admin-ui 1.9.7 → 1.9.8
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/BitzDayJs/index.mjs +1 -1
- package/dist/components/BitzFluentInput/index.mjs +18 -18
- package/dist/components/BitzFluentSelect/index.mjs +13 -13
- 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.mjs +10 -8
- package/dist/components/BitzTable/Table/index.mjs +149 -139
- package/dist/components/BitzTable/Table/utils.mjs +12 -12
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.d.ts +2 -0
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.mjs +244 -236
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +32 -27
- package/dist/components/BitzTable/index.d.ts +4 -2
- 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
|
@@ -1,249 +1,257 @@
|
|
|
1
1
|
import { j as o } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { create as
|
|
3
|
-
import { Modal as
|
|
2
|
+
import { create as se, useModal as te, antdModalV5 as le } from "@ebay/nice-modal-react";
|
|
3
|
+
import { Modal as ne, Typography as re, Checkbox as ae, Button as ce } from "antd";
|
|
4
4
|
import r from "./index.module.less.mjs";
|
|
5
|
-
import { useState as N, useContext as
|
|
6
|
-
import { TableContext as
|
|
7
|
-
import { genColumnKey as F, columnSort as
|
|
5
|
+
import { useState as N, useContext as ie, useEffect as me, useCallback as V, useMemo as M } from "react";
|
|
6
|
+
import { TableContext as de } from "../../Store/index.mjs";
|
|
7
|
+
import { genColumnKey as F, columnSort as ue } from "../../Store/utils/index.mjs";
|
|
8
8
|
import p from "../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
9
|
-
import { DndContext as
|
|
10
|
-
import { SortableContext as
|
|
11
|
-
import
|
|
12
|
-
import { restrictToVerticalAxis as
|
|
9
|
+
import { DndContext as pe } from "../../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
|
|
10
|
+
import { SortableContext as he, verticalListSortingStrategy as xe, arrayMove as fe } from "../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
|
|
11
|
+
import be from "./DndItem.mjs";
|
|
12
|
+
import { restrictToVerticalAxis as ye, restrictToWindowEdges as Ce } from "../../../../node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
|
|
13
13
|
import P from "../../../BitzButton/index.mjs";
|
|
14
|
-
import { useImmer as
|
|
15
|
-
import { css as
|
|
16
|
-
import
|
|
14
|
+
import { useImmer as Me } from "../../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
|
|
15
|
+
import { css as je } from "../../../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
|
|
16
|
+
import ke from "../../../BitzTheme/index.mjs";
|
|
17
17
|
import "./index.less.mjs";
|
|
18
18
|
import W from "../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
e
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
e
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
u
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
() => j ? S(j) : -1,
|
|
69
|
-
[j, S]
|
|
70
|
-
), D = M(() => {
|
|
71
|
-
const e = [], s = /* @__PURE__ */ new Map();
|
|
72
|
-
return { list: ((u, t) => u.map(({ key: m, dataIndex: C, children: d, ...R }) => {
|
|
73
|
-
var O;
|
|
74
|
-
const v = F(
|
|
75
|
-
m || C,
|
|
76
|
-
[t == null ? void 0 : t.columnKey, R.index].filter(Boolean).join("-")
|
|
77
|
-
), c = a.columnsMap[v || "null"] || { show: !0 };
|
|
78
|
-
(c == null ? void 0 : c.show) !== !1 && !d && e.push(v);
|
|
79
|
-
const A = {
|
|
80
|
-
key: v,
|
|
81
|
-
...W(R, ["className"]),
|
|
82
|
-
selectable: !1,
|
|
83
|
-
disabled: c.disable === !0,
|
|
84
|
-
disableCheckbox: typeof c.disable == "boolean" ? c == null ? void 0 : c.disable : (O = c == null ? void 0 : c.disable) == null ? void 0 : O.checkbox,
|
|
85
|
-
isLeaf: t ? !0 : void 0
|
|
86
|
-
};
|
|
87
|
-
return s.set(m, A), A;
|
|
88
|
-
}))(l == null ? void 0 : l.columns), keys: e, map: s };
|
|
89
|
-
}, [a.columnsMap, l == null ? void 0 : l.columns]), Y = (e, s) => {
|
|
90
|
-
const n = { ...a.columnsMap };
|
|
91
|
-
((t) => {
|
|
92
|
-
const m = { ...n[t] };
|
|
93
|
-
m.show = !e, n[t] = m;
|
|
94
|
-
})(s.key), w(!0), y((t) => {
|
|
95
|
-
t.columnsMap = { ...n };
|
|
96
|
-
});
|
|
97
|
-
}, Z = (e, s) => {
|
|
98
|
-
const n = { ...a.columnsMap }, u = he(a.sortKeyColumns, e, s);
|
|
99
|
-
u.forEach((t, m) => {
|
|
100
|
-
n[t] = { ...n[t] || {}, order: m };
|
|
101
|
-
}), w(!0), y((t) => {
|
|
102
|
-
t.columnsMap = { ...n }, t.sortKeyColumns = u;
|
|
103
|
-
});
|
|
104
|
-
}, ee = () => {
|
|
105
|
-
var e;
|
|
106
|
-
L(a.columnsMap), U(a.sortKeyColumns), G === "online" && B && (g == null || g(B, a.columnsMap)), x ? (K(!0), (e = x == null ? void 0 : x(a.columnsMap)) == null || e.finally(() => {
|
|
107
|
-
K(!1), b.hide();
|
|
108
|
-
})) : b.hide();
|
|
109
|
-
}, I = () => {
|
|
110
|
-
b.hide();
|
|
111
|
-
}, h = M(() => i.mode === "dark", [i.mode]);
|
|
112
|
-
return /* @__PURE__ */ o.jsxs(
|
|
113
|
-
le,
|
|
114
|
-
{
|
|
115
|
-
className: "tableColumnSettingModal",
|
|
116
|
-
title: /* @__PURE__ */ o.jsx(ne.Title, { style: { fontSize: 16, margin: 0 }, children: "列设置" }),
|
|
117
|
-
getContainer: !1,
|
|
118
|
-
...te(b),
|
|
119
|
-
style: {
|
|
120
|
-
"--modalContent-bgColor": (_ = i.Modal) == null ? void 0 : _.contentBg,
|
|
121
|
-
"--header-bgColor": (E = i.Modal) == null ? void 0 : E.headerBg,
|
|
122
|
-
"--footer-bgColor": (z = i.Modal) == null ? void 0 : z.footerBg,
|
|
123
|
-
"--blockTitle-colorBg": h ? "#333" : "#fff",
|
|
124
|
-
"--leftBody-bgColor": h ? "#262626" : "#e0e0e0",
|
|
125
|
-
"--rightBody-bgColor": h ? "#262626" : "#fff",
|
|
126
|
-
"--checked": h ? "#303030" : "#eee",
|
|
127
|
-
"--block-bgColor": h ? "#222" : "#fff",
|
|
128
|
-
"--colorText": i.colorText,
|
|
129
|
-
"--colorText-desc": i.colorTextDescription,
|
|
130
|
-
"--colorBorder": i.colorBorder
|
|
19
|
+
import ge from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
|
|
20
|
+
import Se from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
|
|
21
|
+
const qe = se(
|
|
22
|
+
({ onChange: f, getContainer: $ }) => {
|
|
23
|
+
var _, E, z, H;
|
|
24
|
+
const { token: i } = ke.useToken(), b = te(), [j, k] = N(null), [q, K] = N(!1), [G, w] = N(!1), [a, y] = Me({
|
|
25
|
+
columnsMap: {},
|
|
26
|
+
sortKeyColumns: []
|
|
27
|
+
}), {
|
|
28
|
+
persistenceType: J,
|
|
29
|
+
persistenceKey: B,
|
|
30
|
+
onlineChange: g,
|
|
31
|
+
columnsMap: L,
|
|
32
|
+
setColumnsMap: Q,
|
|
33
|
+
sortKeyColumns: U,
|
|
34
|
+
setSortKeyColumns: X,
|
|
35
|
+
// clearPersistenceStorage,
|
|
36
|
+
...l
|
|
37
|
+
} = ie(de);
|
|
38
|
+
me(() => {
|
|
39
|
+
y((e) => {
|
|
40
|
+
e.columnsMap = { ...L }, e.sortKeyColumns = [...U];
|
|
41
|
+
});
|
|
42
|
+
}, []);
|
|
43
|
+
const Y = V(() => {
|
|
44
|
+
y((e) => {
|
|
45
|
+
e.columnsMap = { ...l.defaultColumnKeyMap };
|
|
46
|
+
});
|
|
47
|
+
}, []), h = M(() => {
|
|
48
|
+
var s, n;
|
|
49
|
+
const e = [];
|
|
50
|
+
return (s = l == null ? void 0 : l.columns) != null && s.length && ((n = l == null ? void 0 : l.columns) == null || n.map(
|
|
51
|
+
({ key: u, dataIndex: t, ...m }) => {
|
|
52
|
+
const C = F(
|
|
53
|
+
u || t,
|
|
54
|
+
[u || t].filter(Boolean).join("-")
|
|
55
|
+
), d = a.columnsMap[C || "null"];
|
|
56
|
+
return (d == null ? void 0 : d.show) !== !1 && e.push({
|
|
57
|
+
key: C,
|
|
58
|
+
...W(m, ["className"]),
|
|
59
|
+
selectable: !1,
|
|
60
|
+
disabled: (d == null ? void 0 : d.disable) === !0
|
|
61
|
+
}), d;
|
|
62
|
+
}
|
|
63
|
+
)), e.sort(ue(a.columnsMap));
|
|
64
|
+
}, [a.columnsMap, l == null ? void 0 : l.columns]), S = V(
|
|
65
|
+
(e) => {
|
|
66
|
+
var s;
|
|
67
|
+
return (s = a.sortKeyColumns) == null ? void 0 : s.findIndex((n) => n === e);
|
|
131
68
|
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
69
|
+
[a.sortKeyColumns]
|
|
70
|
+
), T = M(
|
|
71
|
+
() => j ? S(j) : -1,
|
|
72
|
+
[j, S]
|
|
73
|
+
), D = M(() => {
|
|
74
|
+
const e = [], s = /* @__PURE__ */ new Map();
|
|
75
|
+
return {
|
|
76
|
+
list: ((u, t) => u.map(({ key: m, dataIndex: C, children: d, ...R }) => {
|
|
77
|
+
var O;
|
|
78
|
+
const v = F(
|
|
79
|
+
m || C,
|
|
80
|
+
[t == null ? void 0 : t.columnKey, R.index].filter(Boolean).join("-")
|
|
81
|
+
), c = a.columnsMap[v || "null"] || { show: !0 };
|
|
82
|
+
(c == null ? void 0 : c.show) !== !1 && !d && e.push(v);
|
|
83
|
+
const A = {
|
|
84
|
+
key: v,
|
|
85
|
+
...W(R, ["className"]),
|
|
86
|
+
selectable: !1,
|
|
87
|
+
disabled: c.disable === !0,
|
|
88
|
+
disableCheckbox: typeof c.disable == "boolean" ? c == null ? void 0 : c.disable : (O = c == null ? void 0 : c.disable) == null ? void 0 : O.checkbox,
|
|
89
|
+
isLeaf: t ? !0 : void 0
|
|
90
|
+
};
|
|
91
|
+
return s.set(m, A), A;
|
|
92
|
+
}))((l == null ? void 0 : l.columns) ?? []),
|
|
93
|
+
keys: e,
|
|
94
|
+
map: s
|
|
95
|
+
};
|
|
96
|
+
}, [a.columnsMap, l == null ? void 0 : l.columns]), Z = (e, s) => {
|
|
97
|
+
const n = { ...a.columnsMap };
|
|
98
|
+
((t) => {
|
|
99
|
+
const m = { ...n[t] };
|
|
100
|
+
m.show = !e, n[t] = m;
|
|
101
|
+
})(s.key), w(!0), y((t) => {
|
|
102
|
+
t.columnsMap = { ...n };
|
|
103
|
+
});
|
|
104
|
+
}, ee = (e, s) => {
|
|
105
|
+
const n = { ...a.columnsMap }, u = fe(a.sortKeyColumns, e, s);
|
|
106
|
+
u.forEach((t, m) => {
|
|
107
|
+
n[t] = { ...n[t] || {}, order: m };
|
|
108
|
+
}), w(!0), y((t) => {
|
|
109
|
+
t.columnsMap = { ...n }, t.sortKeyColumns = u;
|
|
110
|
+
});
|
|
111
|
+
}, oe = () => {
|
|
112
|
+
var e;
|
|
113
|
+
Q(a.columnsMap), X(a.sortKeyColumns), J === "online" && B && (g == null || g(B, a.columnsMap)), f ? (K(!0), (e = f == null ? void 0 : f(a.columnsMap)) == null || e.finally(() => {
|
|
114
|
+
K(!1), b.hide();
|
|
115
|
+
})) : b.hide();
|
|
116
|
+
}, I = () => {
|
|
117
|
+
b.hide();
|
|
118
|
+
}, x = M(() => i.mode === "dark", [i.mode]);
|
|
119
|
+
return /* @__PURE__ */ o.jsxs(
|
|
120
|
+
ne,
|
|
121
|
+
{
|
|
122
|
+
className: "tableColumnSettingModal",
|
|
123
|
+
title: /* @__PURE__ */ o.jsx(re.Title, { style: { fontSize: 16, margin: 0 }, children: "列设置" }),
|
|
124
|
+
getContainer: $,
|
|
125
|
+
...le(b),
|
|
126
|
+
style: {
|
|
127
|
+
"--modalContent-bgColor": (_ = i.Modal) == null ? void 0 : _.contentBg,
|
|
128
|
+
"--header-bgColor": (E = i.Modal) == null ? void 0 : E.headerBg,
|
|
129
|
+
"--footer-bgColor": (z = i.Modal) == null ? void 0 : z.footerBg,
|
|
130
|
+
"--blockTitle-colorBg": x ? "#333" : "#fff",
|
|
131
|
+
"--leftBody-bgColor": x ? "#262626" : "#e0e0e0",
|
|
132
|
+
"--rightBody-bgColor": x ? "#262626" : "#fff",
|
|
133
|
+
"--checked": x ? "#303030" : "#eee",
|
|
134
|
+
"--block-bgColor": x ? "#222" : "#fff",
|
|
135
|
+
"--colorText": i.colorText,
|
|
136
|
+
"--colorText-desc": i.colorTextDescription,
|
|
137
|
+
"--colorBorder": i.colorBorder
|
|
138
|
+
},
|
|
139
|
+
styles: { body: { maxHeight: window.innerHeight - 300 } },
|
|
140
|
+
width: 600,
|
|
141
|
+
onCancel: I,
|
|
142
|
+
footer: /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
143
|
+
/* @__PURE__ */ o.jsx(
|
|
144
|
+
P,
|
|
145
|
+
{
|
|
146
|
+
type: "primary",
|
|
147
|
+
icon: /* @__PURE__ */ o.jsx(ge, {}),
|
|
148
|
+
onClick: oe,
|
|
149
|
+
disabled: !G,
|
|
150
|
+
loading: q,
|
|
151
|
+
children: "保存"
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
/* @__PURE__ */ o.jsx(P, { onClick: I, children: "取消" })
|
|
155
|
+
] }),
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ o.jsx("div", { className: p(r.introduce, "tableColumnSetting_introduce"), children: "选择要在表中显示的可用列。拖动选定的列以对其重新排序。" }),
|
|
158
|
+
/* @__PURE__ */ o.jsxs(
|
|
159
|
+
"div",
|
|
160
|
+
{
|
|
161
|
+
className: p(r.container, "tableColumnSetting_container"),
|
|
162
|
+
style: { maxHeight: window.innerHeight - 390, overflow: "auto" },
|
|
163
|
+
children: [
|
|
164
|
+
/* @__PURE__ */ o.jsxs("div", { className: r.block, children: [
|
|
165
|
+
/* @__PURE__ */ o.jsxs("div", { className: p(r.header, "tableColumnSetting_header"), children: [
|
|
166
|
+
/* @__PURE__ */ o.jsx("div", { className: p(r.title, "tableColumnSetting_title"), children: "可用列" }),
|
|
167
|
+
/* @__PURE__ */ o.jsx("div", {})
|
|
168
|
+
] }),
|
|
169
|
+
/* @__PURE__ */ o.jsx("div", { className: p(r.body, "tableColumnSetting_body"), children: /* @__PURE__ */ o.jsx("ul", { className: r.content, children: (H = D.list) == null ? void 0 : H.map((e) => {
|
|
170
|
+
const s = D.keys.includes(e.key);
|
|
171
|
+
return /* @__PURE__ */ o.jsxs(
|
|
172
|
+
"li",
|
|
173
|
+
{
|
|
174
|
+
className: p(r.item, {
|
|
175
|
+
[r.checked]: !s,
|
|
176
|
+
tableColumnSetting_checked: !s
|
|
177
|
+
}),
|
|
178
|
+
onClick: () => !e.disabled && Z(s, e),
|
|
179
|
+
children: [
|
|
180
|
+
/* @__PURE__ */ o.jsx(ae, { checked: s, disabled: e.disabled }),
|
|
181
|
+
/* @__PURE__ */ o.jsx(
|
|
182
|
+
"span",
|
|
183
|
+
{
|
|
184
|
+
className: p(
|
|
185
|
+
r["content-item-text"],
|
|
186
|
+
{
|
|
187
|
+
[r["content-item-text-disabled"]]: e.disabled
|
|
188
|
+
},
|
|
189
|
+
"tableColumnSetting_content-item-text"
|
|
190
|
+
),
|
|
191
|
+
children: e.title
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
e.key
|
|
197
|
+
);
|
|
198
|
+
}) }) })
|
|
211
199
|
] }),
|
|
212
|
-
/* @__PURE__ */ o.
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
const { active: s } = e;
|
|
218
|
-
s && k(s == null ? void 0 : s.id);
|
|
219
|
-
},
|
|
220
|
-
onDragCancel: () => k(null),
|
|
221
|
-
onDragEnd: (e) => {
|
|
222
|
-
k(null);
|
|
223
|
-
const { over: s } = e;
|
|
224
|
-
if (s) {
|
|
225
|
-
const n = S(s.id);
|
|
226
|
-
T !== n && Z(T, n);
|
|
227
|
-
}
|
|
228
|
-
},
|
|
229
|
-
children: /* @__PURE__ */ o.jsx(
|
|
230
|
-
pe,
|
|
200
|
+
/* @__PURE__ */ o.jsxs("div", { className: r.block, children: [
|
|
201
|
+
/* @__PURE__ */ o.jsxs("div", { className: r.header, children: [
|
|
202
|
+
/* @__PURE__ */ o.jsx("div", { className: r.title, children: "选定列" }),
|
|
203
|
+
/* @__PURE__ */ o.jsx(
|
|
204
|
+
ce,
|
|
231
205
|
{
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
206
|
+
type: "link",
|
|
207
|
+
icon: /* @__PURE__ */ o.jsx(Se, {}),
|
|
208
|
+
size: "small",
|
|
209
|
+
onClick: Y,
|
|
210
|
+
className: je`
|
|
211
|
+
&:hover {
|
|
212
|
+
color: ${i.colorPrimary} !important;
|
|
213
|
+
}
|
|
214
|
+
`,
|
|
215
|
+
children: "重置"
|
|
235
216
|
}
|
|
236
217
|
)
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
218
|
+
] }),
|
|
219
|
+
/* @__PURE__ */ o.jsx("div", { className: p(r.body, "tableColumnSetting_body-order"), children: /* @__PURE__ */ o.jsx(
|
|
220
|
+
pe,
|
|
221
|
+
{
|
|
222
|
+
modifiers: [ye, Ce],
|
|
223
|
+
onDragStart: (e) => {
|
|
224
|
+
const { active: s } = e;
|
|
225
|
+
s && k(s == null ? void 0 : s.id);
|
|
226
|
+
},
|
|
227
|
+
onDragCancel: () => k(null),
|
|
228
|
+
onDragEnd: (e) => {
|
|
229
|
+
k(null);
|
|
230
|
+
const { over: s } = e;
|
|
231
|
+
if (s) {
|
|
232
|
+
const n = S(s.id);
|
|
233
|
+
T !== n && ee(T, n);
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
children: /* @__PURE__ */ o.jsx(
|
|
237
|
+
he,
|
|
238
|
+
{
|
|
239
|
+
items: h == null ? void 0 : h.map((e) => e.key),
|
|
240
|
+
strategy: xe,
|
|
241
|
+
children: /* @__PURE__ */ o.jsx("ul", { className: r.content, children: h == null ? void 0 : h.map((e) => /* @__PURE__ */ o.jsx(be, { item: e }, e.key)) })
|
|
242
|
+
}
|
|
243
|
+
)
|
|
244
|
+
}
|
|
245
|
+
) })
|
|
246
|
+
] })
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
)
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
);
|
|
247
255
|
export {
|
|
248
|
-
|
|
256
|
+
qe as default
|
|
249
257
|
};
|
|
@@ -1,38 +1,43 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
import { show as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { TableContext as
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
const { order:
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import C, { 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 S from "./ColumnSettingModal.mjs";
|
|
6
|
+
import p from "../style.mjs";
|
|
7
|
+
import v from "../../../BitzButton/index.mjs";
|
|
8
|
+
import { TableContext as y } from "../../Store/index.mjs";
|
|
9
|
+
import B from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs";
|
|
10
|
+
const L = (n) => {
|
|
11
|
+
const { order: c, show: a = !0, icon: u = /* @__PURE__ */ e.jsx(B, {}) } = n, { toolbarItemClassName: f } = p(), { uuid: l } = g(y), [s, i] = x(!1), d = h(() => s ? !1 : void 0, [s]);
|
|
12
|
+
return j(() => (document == null || document.addEventListener("fullscreenchange", (o) => {
|
|
13
|
+
var t, r, m;
|
|
14
|
+
(t = o.target) != null && t.classList.contains("bitzTableBlock") && (i(!!document.fullscreenElement), (m = (r = document.fullscreenElement) == null ? void 0 : r.classList) != null && m.contains("bitzTableBlock") || i(!1));
|
|
15
|
+
}), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
|
|
16
|
+
})), []), a ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
17
|
+
/* @__PURE__ */ e.jsx(
|
|
18
|
+
S,
|
|
15
19
|
{
|
|
16
|
-
id: `ColumnSettingModal-${
|
|
17
|
-
onChange: async (
|
|
18
|
-
var
|
|
19
|
-
return (
|
|
20
|
-
}
|
|
20
|
+
id: `ColumnSettingModal-${l}`,
|
|
21
|
+
onChange: async (o) => {
|
|
22
|
+
var t;
|
|
23
|
+
return (t = n.onChange) == null ? void 0 : t.call(n, o);
|
|
24
|
+
},
|
|
25
|
+
getContainer: d
|
|
21
26
|
}
|
|
22
27
|
),
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
|
|
28
|
+
/* @__PURE__ */ e.jsx(b, { title: "列设置", open: !1, children: /* @__PURE__ */ e.jsx(
|
|
29
|
+
v,
|
|
25
30
|
{
|
|
26
31
|
type: "text",
|
|
27
|
-
className:
|
|
28
|
-
onClick: () =>
|
|
29
|
-
icon:
|
|
30
|
-
style: { order:
|
|
32
|
+
className: f,
|
|
33
|
+
onClick: () => E(`ColumnSettingModal-${l}`),
|
|
34
|
+
icon: u,
|
|
35
|
+
style: { order: c },
|
|
31
36
|
children: "列设置"
|
|
32
37
|
}
|
|
33
38
|
) })
|
|
34
39
|
] }) : null;
|
|
35
|
-
},
|
|
40
|
+
}, R = C.memo(L);
|
|
36
41
|
export {
|
|
37
|
-
|
|
42
|
+
R as default
|
|
38
43
|
};
|
|
@@ -47,8 +47,10 @@ interface BitzTableColumnType<RecordType = any> extends ColumnsConfigProps, Tabl
|
|
|
47
47
|
mobileHideLabel?: boolean;
|
|
48
48
|
/** 是否为操作列 */
|
|
49
49
|
isOperationCol?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
|
|
50
|
+
/** 是否为复选框列 */
|
|
51
|
+
isCheckboxCol?: boolean;
|
|
52
|
+
/** 是否为展开列 */
|
|
53
|
+
isExpandIconCol?: boolean;
|
|
52
54
|
/** 列宽根据内容宽度最大的设置(只应用在操作列上) */
|
|
53
55
|
useMaxWidth?: boolean;
|
|
54
56
|
}
|