bitz-react-admin-ui 2.1.8 → 2.2.0
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/_virtual/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- 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/ActionBar/ActionBar.mjs +26 -22
- package/dist/components/BitzTable/ActionCol/index.d.ts +1 -1
- package/dist/components/BitzTable/ActionCol/index.mjs +61 -61
- package/dist/components/BitzTable/SelectionBar/Button.d.ts +2 -3
- package/dist/components/BitzTable/SelectionBar/Button.mjs +19 -25
- package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +24 -21
- package/dist/components/BitzTable/Store/index.d.ts +43 -22
- package/dist/components/BitzTable/Store/index.mjs +128 -125
- package/dist/components/BitzTable/Store/utils/index.d.ts +4 -5
- package/dist/components/BitzTable/Store/utils/index.mjs +31 -31
- package/dist/components/BitzTable/SubTable/index.d.ts +21 -0
- package/dist/components/BitzTable/SubTable/index.mjs +149 -0
- package/dist/components/BitzTable/Table/SortTableContext.d.ts +12 -0
- package/dist/components/BitzTable/Table/SortTableContext.mjs +25 -0
- package/dist/components/BitzTable/Table/SortableRow.d.ts +7 -0
- package/dist/components/BitzTable/Table/SortableRow.mjs +54 -0
- package/dist/components/BitzTable/Table/index.d.ts +5 -0
- package/dist/components/BitzTable/Table/index.mjs +277 -255
- package/dist/components/BitzTable/Table/utils.mjs +17 -16
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.d.ts +1 -0
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +84 -97
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.d.ts +5 -4
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +66 -60
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +78 -72
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.d.ts +1 -3
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +190 -189
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.d.ts +8 -0
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +94 -0
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.d.ts +10 -0
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +58 -0
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +13 -7
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +119 -80
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.d.ts +2 -2
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +26 -29
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.d.ts +3 -1
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +53 -77
- package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.d.ts +2 -2
- package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.d.ts +12 -0
- package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +61 -0
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +50 -59
- package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +27 -32
- package/dist/components/BitzTable/ToolBar/Modal/index.d.ts +18 -0
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +50 -0
- package/dist/components/BitzTable/ToolBar/Modal/style.d.ts +2 -0
- package/dist/components/BitzTable/ToolBar/Modal/style.mjs +58 -0
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +20 -20
- package/dist/components/BitzTable/ToolBar/index.d.ts +12 -11
- package/dist/components/BitzTable/index.d.ts +4 -0
- package/dist/components/BitzTable/index.mjs +13 -11
- package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/MenuOutlined.mjs +5 -0
- package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/MenuOutlined.mjs +15 -0
- package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +1098 -753
- package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
- 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/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/WithFluent.mjs +16 -12
- package/dist/utils/findNode.d.ts +2 -2
- package/dist/utils/time.mjs +1 -1
- package/package.json +1 -1
- package/dist/_virtual/dayjs.min2.mjs +0 -4
- package/dist/components/BitzTable/Select/index.mjs +0 -11
- package/dist/components/BitzTable/Select/style.mjs +0 -66
- package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.mjs +0 -78
- package/dist/components/BitzTable/ToolBar/ExportIcon/styles.mjs +0 -47
|
@@ -1,262 +1,263 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { css as
|
|
3
|
-
import { theme as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { useImmer as
|
|
1
|
+
import { j as c } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
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 B, Typography as q, Space as xe, Checkbox as ge, Button as Ce } from "antd";
|
|
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
|
+
import { useImmer as Le } from "../../../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
|
|
6
|
+
import je from "../../../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
|
|
6
7
|
import "../../../index.mjs";
|
|
7
|
-
import { columnSort as
|
|
8
|
-
import
|
|
9
|
-
import { BitzTableContext as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const
|
|
13
|
-
({ display:
|
|
14
|
-
const { token:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
import { columnSort as Ke, genColumnKey as be, updateNestedObject as j } from "../../../Store/utils/index.mjs";
|
|
9
|
+
import J from "./DndList.mjs";
|
|
10
|
+
import { BitzTableContext as Ne } from "../../../Store/index.mjs";
|
|
11
|
+
import ve from "../../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
|
|
12
|
+
import Ee from "../../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
|
|
13
|
+
const Re = ye(
|
|
14
|
+
({ display: K, parentHeight: F }, H) => {
|
|
15
|
+
const { token: ee } = pe.useToken(), Q = ke(null), f = je(Q), te = k(() => ({
|
|
16
|
+
// display: display ? 'flex' : 'none'
|
|
17
|
+
width: K ? "100%" : 0,
|
|
18
|
+
height: "100%",
|
|
19
|
+
pointerEvents: K ? "auto" : "none",
|
|
20
|
+
opacity: K ? 1 : 0,
|
|
21
|
+
overflow: "hidden",
|
|
22
|
+
...K ? {} : {
|
|
23
|
+
position: "absolute",
|
|
24
|
+
left: 0,
|
|
25
|
+
right: 0
|
|
26
|
+
}
|
|
27
|
+
}), [K]), O = {
|
|
28
|
+
height: k(() => typeof F == "number" && (f != null && f.height) ? F - (f == null ? void 0 : f.height) - 16 : "auto", [F, f == null ? void 0 : f.height]),
|
|
29
|
+
overflow: "hidden auto",
|
|
30
|
+
gap: 6
|
|
31
|
+
}, { defaultColumnKeyMap: se, columns: U, columnsMap: oe } = Me(Ne), [i, V] = Le({});
|
|
32
|
+
G(() => {
|
|
33
|
+
V({ ...oe });
|
|
25
34
|
}, []);
|
|
26
|
-
const
|
|
27
|
-
var
|
|
28
|
-
const
|
|
29
|
-
n || o,
|
|
30
|
-
[t == null ? void 0 : t.columnKey, l.index].join("-")
|
|
31
|
-
), r = a.columnsMap[g || "null"] || { show: !0 };
|
|
35
|
+
const W = k(() => ((o, t) => o.map((s) => {
|
|
36
|
+
var _;
|
|
37
|
+
const { key: n, dataIndex: r, children: l, ...C } = s, y = be(s, [t == null ? void 0 : t.columnKey, C.index].join("-")), u = i[y || "null"] || { show: !0 };
|
|
32
38
|
return {
|
|
33
|
-
key:
|
|
34
|
-
...
|
|
39
|
+
key: y,
|
|
40
|
+
...Ee(C, ["className"]),
|
|
35
41
|
selectable: !1,
|
|
36
|
-
disabled:
|
|
37
|
-
disableCheckbox: typeof
|
|
42
|
+
disabled: u.disabled === !0,
|
|
43
|
+
disableCheckbox: typeof u.disabled == "boolean" ? u == null ? void 0 : u.disabled : (_ = u == null ? void 0 : u.disabled) == null ? void 0 : _.checkbox,
|
|
38
44
|
isLeaf: t ? !0 : void 0,
|
|
39
|
-
...
|
|
45
|
+
...u
|
|
40
46
|
};
|
|
41
|
-
}))(
|
|
42
|
-
|
|
43
|
-
var
|
|
44
|
-
const e = {},
|
|
45
|
-
for (const
|
|
46
|
-
((
|
|
47
|
-
|
|
48
|
-
}, [
|
|
49
|
-
const [
|
|
50
|
-
|
|
51
|
-
const e = [],
|
|
52
|
-
|
|
53
|
-
l.fixed === "left" ? (e.push(l),
|
|
54
|
-
}),
|
|
55
|
-
}, [
|
|
56
|
-
const
|
|
57
|
-
f(e);
|
|
58
|
-
}, te = (e, s) => {
|
|
59
|
-
f(e), j(s);
|
|
60
|
-
}, se = (e) => {
|
|
47
|
+
}).filter((s) => !(s != null && s.isDragSortCol)))(U ?? []).sort(Ke(i)), [i, U]);
|
|
48
|
+
G(() => {
|
|
49
|
+
var s, n;
|
|
50
|
+
const e = {}, o = {}, t = {};
|
|
51
|
+
for (const r in i)
|
|
52
|
+
((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];
|
|
53
|
+
p(e), x(o), g(t);
|
|
54
|
+
}, [i]);
|
|
55
|
+
const [b, I] = m([]), [M, N] = m([]), [h, p] = m({}), [v, z] = m([]), [S, E] = m([]), [a, x] = m({}), [R, D] = m([]), [w, T] = m([]), [d, g] = m({});
|
|
56
|
+
G(() => {
|
|
57
|
+
const e = [], o = [], t = [], s = [], n = [], r = [];
|
|
58
|
+
W.forEach((l) => {
|
|
59
|
+
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));
|
|
60
|
+
}), I(e), N(o), z(t), E(s), D(n), T(r);
|
|
61
|
+
}, [W]);
|
|
62
|
+
const ne = (e) => {
|
|
61
63
|
p(e);
|
|
62
|
-
},
|
|
63
|
-
p(e),
|
|
64
|
-
},
|
|
64
|
+
}, re = (e, o) => {
|
|
65
|
+
p(e), N(o);
|
|
66
|
+
}, ce = (e) => {
|
|
65
67
|
x(e);
|
|
66
|
-
},
|
|
67
|
-
x(e),
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
}, le = (e, o) => {
|
|
69
|
+
x(e), E(o);
|
|
70
|
+
}, ie = (e) => {
|
|
71
|
+
g(e);
|
|
72
|
+
}, he = (e, o) => {
|
|
73
|
+
g(e), T(o);
|
|
74
|
+
}, X = (e, o, t, s) => {
|
|
75
|
+
const n = { ...o[e] };
|
|
76
|
+
delete o[e], g({
|
|
77
|
+
...d,
|
|
78
|
+
[e]: { ...n, fixed: void 0, order: R.length }
|
|
73
79
|
});
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
return
|
|
78
|
-
},
|
|
79
|
-
const
|
|
80
|
-
delete
|
|
80
|
+
const r = t.findIndex((y) => y.key === e), l = t.splice(r, 1)[0];
|
|
81
|
+
D([...R, { ...l, fixed: void 0 }]);
|
|
82
|
+
const C = s.splice(r, 1);
|
|
83
|
+
return T([...w, ...C]), { map: o, list: t, keys: s };
|
|
84
|
+
}, Y = (e, o, t, s) => {
|
|
85
|
+
const n = { ...o[e] };
|
|
86
|
+
delete o[e], p({
|
|
81
87
|
...h,
|
|
82
|
-
[e]: { ...
|
|
88
|
+
[e]: { ...n, fixed: "left", order: b.length, show: !0 }
|
|
83
89
|
});
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
return
|
|
88
|
-
},
|
|
89
|
-
const
|
|
90
|
-
delete
|
|
91
|
-
...
|
|
90
|
+
const r = t.findIndex((y) => y.key === e), l = t.splice(r, 1)[0];
|
|
91
|
+
I([...b, { ...l, fixed: "left" }]);
|
|
92
|
+
const C = s.splice(r, 1);
|
|
93
|
+
return N([...M, ...C]), { map: o, list: t, keys: s };
|
|
94
|
+
}, Z = (e, o, t, s) => {
|
|
95
|
+
const n = { ...o[e] };
|
|
96
|
+
delete o[e], x({
|
|
97
|
+
...a,
|
|
92
98
|
[e]: {
|
|
93
|
-
...
|
|
99
|
+
...n,
|
|
94
100
|
fixed: "right",
|
|
95
|
-
order:
|
|
101
|
+
order: v.length,
|
|
96
102
|
show: !0
|
|
97
103
|
}
|
|
98
104
|
});
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
return
|
|
103
|
-
},
|
|
104
|
-
if (
|
|
105
|
-
const { map: t, list:
|
|
105
|
+
const r = t.findIndex((y) => y.key === e), l = t.splice(r, 1)[0];
|
|
106
|
+
z([...v, { ...l, fixed: "right" }]);
|
|
107
|
+
const C = s.splice(r, 1);
|
|
108
|
+
return E([...S, ...C]), { map: o, list: t, keys: s };
|
|
109
|
+
}, $ = (e, o) => {
|
|
110
|
+
if (o === "left") {
|
|
111
|
+
const { map: t, list: s, keys: n } = X(
|
|
106
112
|
e,
|
|
107
113
|
h,
|
|
108
|
-
|
|
109
|
-
|
|
114
|
+
b,
|
|
115
|
+
M
|
|
110
116
|
);
|
|
111
|
-
|
|
112
|
-
} else if (
|
|
113
|
-
const { map: t, list:
|
|
117
|
+
p({ ...t }), I([...s]), N([...n]);
|
|
118
|
+
} else if (o === "center") {
|
|
119
|
+
const { map: t, list: s, keys: n } = Y(
|
|
114
120
|
e,
|
|
115
|
-
|
|
121
|
+
d,
|
|
116
122
|
R,
|
|
117
|
-
|
|
123
|
+
w
|
|
118
124
|
);
|
|
119
|
-
|
|
125
|
+
g({ ...t }), D([...s]), T([...n]);
|
|
120
126
|
} else {
|
|
121
|
-
const { map: t, list:
|
|
127
|
+
const { map: t, list: s, keys: n } = Y(
|
|
122
128
|
e,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
129
|
+
a,
|
|
130
|
+
v,
|
|
131
|
+
S
|
|
126
132
|
);
|
|
127
|
-
|
|
133
|
+
x({ ...t }), z([...s]), E([...n]);
|
|
128
134
|
}
|
|
129
|
-
},
|
|
130
|
-
if (
|
|
131
|
-
const { map: t, list:
|
|
135
|
+
}, P = (e, o) => {
|
|
136
|
+
if (o === "left") {
|
|
137
|
+
const { map: t, list: s, keys: n } = Z(
|
|
132
138
|
e,
|
|
133
139
|
h,
|
|
134
|
-
|
|
135
|
-
|
|
140
|
+
b,
|
|
141
|
+
M
|
|
136
142
|
);
|
|
137
|
-
|
|
138
|
-
} else if (
|
|
139
|
-
const { map: t, list:
|
|
143
|
+
p({ ...t }), I([...s]), N([...n]);
|
|
144
|
+
} else if (o === "center") {
|
|
145
|
+
const { map: t, list: s, keys: n } = Z(
|
|
140
146
|
e,
|
|
141
|
-
|
|
147
|
+
d,
|
|
142
148
|
R,
|
|
143
|
-
|
|
149
|
+
w
|
|
144
150
|
);
|
|
145
|
-
|
|
151
|
+
g({ ...t }), D([...s]), T([...n]);
|
|
146
152
|
} else {
|
|
147
|
-
const { map: t, list:
|
|
153
|
+
const { map: t, list: s, keys: n } = X(
|
|
148
154
|
e,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
155
|
+
a,
|
|
156
|
+
v,
|
|
157
|
+
S
|
|
152
158
|
);
|
|
153
|
-
|
|
159
|
+
x({ ...t }), z([...s]), E([...n]);
|
|
154
160
|
}
|
|
155
|
-
},
|
|
156
|
-
e.checked ? (
|
|
157
|
-
},
|
|
158
|
-
var
|
|
161
|
+
}, ae = ({ target: e }) => {
|
|
162
|
+
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)));
|
|
163
|
+
}, A = k(() => [...M, ...w, ...S], [M, w, S]), L = k(() => {
|
|
164
|
+
var o, t, s;
|
|
159
165
|
const e = [];
|
|
160
|
-
for (const
|
|
161
|
-
(
|
|
162
|
-
for (const
|
|
163
|
-
(t =
|
|
164
|
-
for (const
|
|
165
|
-
(
|
|
166
|
+
for (const n in h)
|
|
167
|
+
(o = h[n]) != null && o.show && e.push(n);
|
|
168
|
+
for (const n in d)
|
|
169
|
+
(t = d[n]) != null && t.show && e.push(n);
|
|
170
|
+
for (const n in a)
|
|
171
|
+
(s = a[n]) != null && s.show && e.push(n);
|
|
166
172
|
return e;
|
|
167
|
-
}, [h,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}, []);
|
|
172
|
-
return Ce(V, () => ({
|
|
173
|
+
}, [h, d, a]), de = k(() => A.length === L.length, [A, L]), fe = k(() => L.length > 0 && L.length < A.length, [L, A]), ue = () => {
|
|
174
|
+
V({ ...se });
|
|
175
|
+
};
|
|
176
|
+
return Se(H, () => ({
|
|
173
177
|
getLeftSortColumns: () => h,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
/* @__PURE__ */ i.jsx(B.Title, { level: 5, className: "title", children: "固定在左侧" }),
|
|
184
|
-
/* @__PURE__ */ i.jsx(
|
|
185
|
-
O,
|
|
178
|
+
getCenterSortColumns: () => d,
|
|
179
|
+
getRightSortColumns: () => a,
|
|
180
|
+
getCheckedKeys: () => L
|
|
181
|
+
})), /* @__PURE__ */ c.jsxs(B, { vertical: !0, gap: 16, style: te, children: [
|
|
182
|
+
/* @__PURE__ */ c.jsxs("div", { className: "sortContent", children: [
|
|
183
|
+
/* @__PURE__ */ c.jsxs(B, { vertical: !0, className: "sortCard", style: O, children: [
|
|
184
|
+
/* @__PURE__ */ c.jsx(q.Title, { level: 5, className: "title", children: "固定在左侧" }),
|
|
185
|
+
/* @__PURE__ */ c.jsx(
|
|
186
|
+
J,
|
|
186
187
|
{
|
|
187
188
|
placement: "left",
|
|
188
|
-
dataList:
|
|
189
|
-
keys:
|
|
189
|
+
dataList: b,
|
|
190
|
+
keys: M,
|
|
190
191
|
columnsMap: h,
|
|
191
|
-
onLeftClick:
|
|
192
|
-
onRightClick:
|
|
193
|
-
onChange:
|
|
194
|
-
onMoveEnd:
|
|
192
|
+
onLeftClick: $,
|
|
193
|
+
onRightClick: P,
|
|
194
|
+
onChange: ne,
|
|
195
|
+
onMoveEnd: re
|
|
195
196
|
}
|
|
196
197
|
)
|
|
197
198
|
] }),
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
|
|
199
|
+
/* @__PURE__ */ c.jsxs(B, { vertical: !0, className: "sortCard", style: O, children: [
|
|
200
|
+
/* @__PURE__ */ c.jsx(q.Title, { level: 5, className: "title", children: "不固定" }),
|
|
201
|
+
/* @__PURE__ */ c.jsx(
|
|
202
|
+
J,
|
|
202
203
|
{
|
|
203
204
|
placement: "center",
|
|
204
205
|
dataList: R,
|
|
205
|
-
keys:
|
|
206
|
-
columnsMap:
|
|
207
|
-
onLeftClick:
|
|
208
|
-
onRightClick:
|
|
209
|
-
onChange:
|
|
210
|
-
onMoveEnd:
|
|
206
|
+
keys: w,
|
|
207
|
+
columnsMap: d,
|
|
208
|
+
onLeftClick: $,
|
|
209
|
+
onRightClick: P,
|
|
210
|
+
onChange: ie,
|
|
211
|
+
onMoveEnd: he
|
|
211
212
|
}
|
|
212
213
|
)
|
|
213
214
|
] }),
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
|
|
215
|
+
/* @__PURE__ */ c.jsxs(B, { vertical: !0, className: "sortCard", style: O, children: [
|
|
216
|
+
/* @__PURE__ */ c.jsx(q.Title, { level: 5, className: "title", children: "固定在右侧" }),
|
|
217
|
+
/* @__PURE__ */ c.jsx(
|
|
218
|
+
J,
|
|
218
219
|
{
|
|
219
220
|
placement: "right",
|
|
220
|
-
dataList:
|
|
221
|
-
keys:
|
|
222
|
-
columnsMap:
|
|
223
|
-
onLeftClick:
|
|
224
|
-
onRightClick:
|
|
225
|
-
onChange:
|
|
226
|
-
onMoveEnd:
|
|
221
|
+
dataList: v,
|
|
222
|
+
keys: S,
|
|
223
|
+
columnsMap: a,
|
|
224
|
+
onLeftClick: $,
|
|
225
|
+
onRightClick: P,
|
|
226
|
+
onChange: ce,
|
|
227
|
+
onMoveEnd: le
|
|
227
228
|
}
|
|
228
229
|
)
|
|
229
230
|
] })
|
|
230
231
|
] }),
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
|
|
232
|
+
/* @__PURE__ */ c.jsxs(xe, { size: 16, className: "scope", ref: Q, children: [
|
|
233
|
+
/* @__PURE__ */ c.jsx(
|
|
234
|
+
ge,
|
|
234
235
|
{
|
|
235
|
-
indeterminate:
|
|
236
|
-
checked:
|
|
237
|
-
onChange:
|
|
238
|
-
children: "全选"
|
|
236
|
+
indeterminate: fe,
|
|
237
|
+
checked: de,
|
|
238
|
+
onChange: ae,
|
|
239
|
+
children: /* @__PURE__ */ c.jsx("span", { style: { whiteSpace: "nowrap" }, children: "全选" })
|
|
239
240
|
}
|
|
240
241
|
),
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
-
|
|
242
|
+
/* @__PURE__ */ c.jsx(
|
|
243
|
+
Ce,
|
|
243
244
|
{
|
|
244
245
|
type: "link",
|
|
245
|
-
icon: /* @__PURE__ */
|
|
246
|
+
icon: /* @__PURE__ */ c.jsx(ve, {}),
|
|
246
247
|
size: "small",
|
|
247
|
-
onClick:
|
|
248
|
-
className:
|
|
248
|
+
onClick: ue,
|
|
249
|
+
className: me`
|
|
249
250
|
&:hover {
|
|
250
|
-
color: ${
|
|
251
|
+
color: ${ee.colorPrimary} !important;
|
|
251
252
|
}
|
|
252
253
|
`,
|
|
253
|
-
children: "重置"
|
|
254
|
+
children: /* @__PURE__ */ c.jsx("span", { style: { whiteSpace: "nowrap" }, children: "重置" })
|
|
254
255
|
}
|
|
255
256
|
)
|
|
256
257
|
] })
|
|
257
258
|
] });
|
|
258
259
|
}
|
|
259
|
-
),
|
|
260
|
+
), Ue = we(Re);
|
|
260
261
|
export {
|
|
261
|
-
|
|
262
|
+
Ue as default
|
|
262
263
|
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { j as t } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import u from "react";
|
|
3
|
+
import { useSortable as j } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
|
|
4
|
+
import { CSS as I } from "../../../../../node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
|
|
5
|
+
import { theme as x, Flex as p, Checkbox as D } from "antd";
|
|
6
|
+
import S from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
7
|
+
import N from "../../../../../assets/iconfont/IconDragOrder.mjs";
|
|
8
|
+
import "../../../../../assets/iconfont/IconColumnFixedLeft.mjs";
|
|
9
|
+
import "../../../../../assets/iconfont/IconColumnFixedRight.mjs";
|
|
10
|
+
import "../../../../../assets/iconfont/IconColumnCancelFixed.mjs";
|
|
11
|
+
import "../../../../../assets/iconfont/IconMore.mjs";
|
|
12
|
+
import "../../../../../assets/iconfont/IconIcFluentHomeRegular.mjs";
|
|
13
|
+
import "../../../../../assets/iconfont/IconKuansongde.mjs";
|
|
14
|
+
import "../../../../../assets/iconfont/IconTekuansong.mjs";
|
|
15
|
+
import "../../../../../assets/iconfont/IconJincoude.mjs";
|
|
16
|
+
import "../../../../../assets/iconfont/IconZhongdengde.mjs";
|
|
17
|
+
import "../../../../../assets/iconfont/IconTejincou.mjs";
|
|
18
|
+
import "../../../../../assets/iconfont/IconWufengexian.mjs";
|
|
19
|
+
import "../../../../../assets/iconfont/IconHangliefengexian.mjs";
|
|
20
|
+
import "../../../../../assets/iconfont/IconHangfengexian.mjs";
|
|
21
|
+
import "../../../../../assets/iconfont/IconLiefengexian.mjs";
|
|
22
|
+
import "../../../../../assets/iconfont/IconYoubanmawentianchong.mjs";
|
|
23
|
+
import "../../../../../assets/iconfont/IconWubanmawentianchong.mjs";
|
|
24
|
+
import "../../../../../assets/iconfont/IconZhongzhi.mjs";
|
|
25
|
+
import "../../../../../assets/iconfont/IconGaojisousuo.mjs";
|
|
26
|
+
import "../../../../../assets/iconfont/IconSousuo.mjs";
|
|
27
|
+
import "../../../../../assets/iconfont/IconClose.mjs";
|
|
28
|
+
import "../../../../../assets/iconfont/IconFanhui.mjs";
|
|
29
|
+
import "../../../../../assets/iconfont/IconJinggao.mjs";
|
|
30
|
+
import "../../../../../assets/iconfont/IconIcon21.mjs";
|
|
31
|
+
import "../../../../../assets/iconfont/IconChenggong.mjs";
|
|
32
|
+
import "../../../../../assets/iconfont/IconTishi1.mjs";
|
|
33
|
+
import "../../../../../assets/iconfont/IconDuigoux.mjs";
|
|
34
|
+
import "../../../../../assets/iconfont/IconCuowu.mjs";
|
|
35
|
+
import "../../../../../assets/iconfont/IconXinxitishi.mjs";
|
|
36
|
+
import "../../../../../assets/iconfont/IconFabu.mjs";
|
|
37
|
+
import "../../../../../assets/iconfont/IconShanchu1.mjs";
|
|
38
|
+
import "../../../../../assets/iconfont/IconShanchu.mjs";
|
|
39
|
+
import "../../../../../assets/iconfont/IconTuodong.mjs";
|
|
40
|
+
const R = ({
|
|
41
|
+
item: r,
|
|
42
|
+
onCheckboxChange: o,
|
|
43
|
+
isDragOverlay: s
|
|
44
|
+
}) => {
|
|
45
|
+
const {
|
|
46
|
+
attributes: e,
|
|
47
|
+
isDragging: i,
|
|
48
|
+
setNodeRef: n,
|
|
49
|
+
listeners: a,
|
|
50
|
+
transform: l,
|
|
51
|
+
transition: c
|
|
52
|
+
} = j({
|
|
53
|
+
id: r == null ? void 0 : r.field
|
|
54
|
+
// disabled: item?.disabled,
|
|
55
|
+
}), { token: m } = x.useToken(), f = {
|
|
56
|
+
gap: 8,
|
|
57
|
+
transition: c,
|
|
58
|
+
transform: I.Transform.toString(l),
|
|
59
|
+
...i && {
|
|
60
|
+
opacity: 0.6
|
|
61
|
+
},
|
|
62
|
+
...s && {
|
|
63
|
+
backgroundColor: m.colorBgContainer
|
|
64
|
+
}
|
|
65
|
+
}, d = ({ target: g }) => {
|
|
66
|
+
o == null || o(r.field, g.checked);
|
|
67
|
+
};
|
|
68
|
+
return /* @__PURE__ */ t.jsxs(
|
|
69
|
+
p,
|
|
70
|
+
{
|
|
71
|
+
align: "center",
|
|
72
|
+
className: S({ sortItemDragging: i }, "sortItem"),
|
|
73
|
+
style: f,
|
|
74
|
+
ref: n,
|
|
75
|
+
...e,
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ t.jsx(p, { align: "center", className: "dragIcon", ...a, children: /* @__PURE__ */ t.jsx(N, { size: m.fontSize + 4 }) }),
|
|
78
|
+
/* @__PURE__ */ t.jsx(
|
|
79
|
+
D,
|
|
80
|
+
{
|
|
81
|
+
value: r.field,
|
|
82
|
+
checked: r.show,
|
|
83
|
+
onChange: d,
|
|
84
|
+
title: r.title,
|
|
85
|
+
children: r.title
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}, nr = u.memo(R);
|
|
92
|
+
export {
|
|
93
|
+
nr as default
|
|
94
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ExportFieldsConfigProps } from "@/components/BitzTable/Store";
|
|
2
|
+
import { FC } from "react";
|
|
3
|
+
interface DndListProps {
|
|
4
|
+
dataList: ExportFieldsConfigProps[];
|
|
5
|
+
keys: any[];
|
|
6
|
+
onChange: (newDataList: any[]) => void;
|
|
7
|
+
onMoveEnd: (options: ExportFieldsConfigProps[], keys: any[]) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const DndList: FC<DndListProps>;
|
|
10
|
+
export default DndList;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { j as o } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { DndContext as j, closestCenter as u, DragOverlay as h } from "../../../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
|
|
3
|
+
import { SortableContext as v, rectSortingStrategy as y, arrayMove as l } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
|
|
4
|
+
import { useState as C } from "react";
|
|
5
|
+
import m from "./DndItem.mjs";
|
|
6
|
+
const E = ({
|
|
7
|
+
dataList: r,
|
|
8
|
+
keys: a,
|
|
9
|
+
onChange: x,
|
|
10
|
+
onMoveEnd: d
|
|
11
|
+
}) => {
|
|
12
|
+
const [s, c] = C(-1), f = (t) => {
|
|
13
|
+
const { active: e } = t;
|
|
14
|
+
e && c(e.data.current.sortable.index);
|
|
15
|
+
}, D = (t) => {
|
|
16
|
+
const { over: e } = t;
|
|
17
|
+
if (e) {
|
|
18
|
+
const n = e.data.current.sortable.index;
|
|
19
|
+
s !== n && (g(s, n), c(-1));
|
|
20
|
+
}
|
|
21
|
+
}, g = (t, e) => {
|
|
22
|
+
const n = l(a, t, e), i = l(r, t, e);
|
|
23
|
+
d(i, n);
|
|
24
|
+
}, p = (t, e) => {
|
|
25
|
+
const n = r.findIndex((S) => S.field === t), i = JSON.parse(JSON.stringify(r));
|
|
26
|
+
i[n].show = e, x(i);
|
|
27
|
+
};
|
|
28
|
+
return /* @__PURE__ */ o.jsx(
|
|
29
|
+
j,
|
|
30
|
+
{
|
|
31
|
+
collisionDetection: u,
|
|
32
|
+
onDragStart: f,
|
|
33
|
+
onDragEnd: D,
|
|
34
|
+
onDragCancel: () => c(-1),
|
|
35
|
+
children: /* @__PURE__ */ o.jsx(
|
|
36
|
+
v,
|
|
37
|
+
{
|
|
38
|
+
items: a,
|
|
39
|
+
strategy: y,
|
|
40
|
+
children: /* @__PURE__ */ o.jsxs("div", { className: "sortList", children: [
|
|
41
|
+
r.map((t) => /* @__PURE__ */ o.jsx(m, { item: t, onCheckboxChange: p }, t.field)),
|
|
42
|
+
/* @__PURE__ */ o.jsx(h, { children: s !== -1 && /* @__PURE__ */ o.jsx(
|
|
43
|
+
m,
|
|
44
|
+
{
|
|
45
|
+
item: r[s],
|
|
46
|
+
isDragOverlay: !0
|
|
47
|
+
},
|
|
48
|
+
r[s].field
|
|
49
|
+
) })
|
|
50
|
+
] })
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
E as default
|
|
58
|
+
};
|