bitz-react-admin-ui 2.2.8 → 2.3.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 +5 -2
- package/dist/_virtual/dayjs.min2.mjs +4 -0
- package/dist/assets/iconfont/IconChenggong.mjs +10 -4
- package/dist/assets/iconfont/IconClose.mjs +7 -1
- package/dist/assets/iconfont/IconColumnCancelFixed.mjs +25 -4
- package/dist/assets/iconfont/IconColumnFixedLeft.mjs +29 -8
- package/dist/assets/iconfont/IconColumnFixedRight.mjs +28 -7
- package/dist/assets/iconfont/IconCuowu.mjs +8 -2
- package/dist/assets/iconfont/IconDragOrder.mjs +28 -7
- package/dist/assets/iconfont/IconDuigoux.mjs +8 -2
- package/dist/assets/iconfont/IconFabu.mjs +18 -3
- package/dist/assets/iconfont/IconFanhui.mjs +11 -5
- package/dist/assets/iconfont/IconGaojisousuo.mjs +10 -4
- package/dist/assets/iconfont/IconHangfengexian.mjs +27 -4
- package/dist/assets/iconfont/IconHangliefengexian.mjs +27 -4
- package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +11 -5
- package/dist/assets/iconfont/IconIcon21.mjs +8 -2
- package/dist/assets/iconfont/IconJincoude.mjs +9 -3
- package/dist/assets/iconfont/IconJinggao.mjs +8 -2
- package/dist/assets/iconfont/IconKuansongde.mjs +11 -5
- package/dist/assets/iconfont/IconLiefengexian.mjs +28 -5
- package/dist/assets/iconfont/IconMore.mjs +26 -4
- package/dist/assets/iconfont/IconShanchu.mjs +11 -5
- package/dist/assets/iconfont/IconShanchu1.mjs +18 -3
- package/dist/assets/iconfont/IconSousuo.mjs +10 -4
- package/dist/assets/iconfont/IconTejincou.mjs +7 -1
- package/dist/assets/iconfont/IconTekuansong.mjs +11 -5
- package/dist/assets/iconfont/IconTishi1.mjs +12 -6
- package/dist/assets/iconfont/IconTuodong.mjs +12 -6
- package/dist/assets/iconfont/IconWubanmawentianchong.mjs +22 -5
- package/dist/assets/iconfont/IconWufengexian.mjs +11 -4
- package/dist/assets/iconfont/IconXinxitishi.mjs +9 -3
- package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +23 -7
- package/dist/assets/iconfont/IconZhongdengde.mjs +10 -4
- package/dist/assets/iconfont/IconZhongzhi.mjs +11 -5
- package/dist/assets/iconfont/index.mjs +33 -33
- package/dist/components/BitzAddTag/index.mjs +41 -8
- package/dist/components/BitzAddressBook/index.mjs +122 -35
- package/dist/components/BitzAppPage/index.mjs +18 -4
- package/dist/components/BitzAppRefresh/index.mjs +27 -15
- package/dist/components/BitzBetterScroll/index.mjs +5 -5
- package/dist/components/BitzButton/index.mjs +23 -9
- package/dist/components/BitzCalendar/index.mjs +53 -20
- package/dist/components/BitzCascader/BitzCascaderMobile.mjs +68 -30
- package/dist/components/BitzCascader/index.mjs +6 -2
- package/dist/components/BitzCollapse/index.mjs +4 -4
- package/dist/components/BitzConfigProvider/context.mjs +3 -1
- package/dist/components/BitzConfigProvider/index.mjs +12 -8
- package/dist/components/BitzConfirmModal/index.mjs +24 -1
- package/dist/components/BitzConvert/DropdownToButton/index.mjs +14 -11
- package/dist/components/BitzConvert/index.mjs +1 -1
- package/dist/components/BitzDayJs/index.mjs +1 -1
- package/dist/components/BitzDescriptions/index.mjs +11 -1
- package/dist/components/BitzDrawer/index.mjs +17 -2
- package/dist/components/BitzEmpty/index.mjs +6 -2
- package/dist/components/BitzException/index.mjs +6 -1
- package/dist/components/BitzFloatLayout/index.mjs +10 -1
- package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +13 -16
- package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +27 -21
- package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +22 -4
- package/dist/components/BitzFuiCalendar/CalendarBody.mjs +28 -5
- package/dist/components/BitzFuiCalendar/CalendarHead.mjs +6 -3
- package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +13 -4
- package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +52 -20
- package/dist/components/BitzFuiCalendar/ColumnData.mjs +31 -15
- package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +47 -5
- package/dist/components/BitzFuiCalendar/index.mjs +7 -1
- package/dist/components/BitzFullScreen/index.mjs +9 -6
- package/dist/components/BitzHighlight/Child.mjs +23 -9
- package/dist/components/BitzHighlight/Highlight.mjs +26 -5
- package/dist/components/BitzHighlight/chunks.mjs +20 -17
- package/dist/components/BitzHighlight/style.mjs +4 -1
- package/dist/components/BitzImage/index.mjs +1 -1
- package/dist/components/BitzImage/previewImage.mjs +12 -5
- package/dist/components/BitzLanguageTabs/index.mjs +14 -3
- package/dist/components/BitzLazyLoad/index.mjs +7 -1
- package/dist/components/BitzList/List.mjs +17 -3
- package/dist/components/BitzList/LoadMore.mjs +29 -20
- package/dist/components/BitzLoadMore/index.mjs +34 -14
- package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +25 -12
- package/dist/components/BitzMeetingTime/index.mjs +11 -7
- package/dist/components/BitzMobileLoading/index.mjs +1 -1
- package/dist/components/BitzModal/index.mjs +24 -11
- package/dist/components/BitzNoData/index.mjs +4 -1
- package/dist/components/BitzNoMore/index.mjs +1 -1
- package/dist/components/BitzOrganizationSelection/index.mjs +43 -14
- package/dist/components/BitzPageContainer/index.mjs +107 -46
- package/dist/components/BitzPageHeader/index.mjs +89 -21
- package/dist/components/BitzPagination/index.mjs +71 -22
- package/dist/components/BitzPopover/index.mjs +4 -4
- package/dist/components/BitzPullRefresh/PullRefresh.mjs +47 -18
- package/dist/components/BitzQRCode/index.mjs +6 -1
- package/dist/components/BitzQueryFilter/QueryFilterContent.mjs +35 -17
- package/dist/components/BitzQueryFilter/QueryFilterDrawer.mjs +20 -13
- package/dist/components/BitzQueryFilter/QueryFilterMobile.mjs +4 -1
- package/dist/components/BitzQueryFilter/index.mjs +69 -20
- package/dist/components/BitzRefresh/index.mjs +5 -1
- package/dist/components/BitzRemark/index.mjs +4 -4
- package/dist/components/BitzScheduleCenter/index.mjs +24 -30
- package/dist/components/BitzSearch/index.mjs +1 -1
- package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +123 -48
- package/dist/components/BitzSelect/index.mjs +1 -1
- package/dist/components/BitzSkeleton/index.mjs +31 -1
- package/dist/components/BitzSwitch/index.mjs +7 -2
- package/dist/components/BitzTabbar/BitzTabbar.mjs +25 -8
- package/dist/components/BitzTabbar/BitzTabbarItem.mjs +4 -1
- package/dist/components/BitzTable/ActionBar/ActionBar.mjs +73 -12
- package/dist/components/BitzTable/ActionBar/Button.mjs +1 -1
- package/dist/components/BitzTable/ActionBar/style.mjs +12 -9
- package/dist/components/BitzTable/ActionCol/index.mjs +95 -21
- package/dist/components/BitzTable/ActionCol/style.mjs +15 -12
- package/dist/components/BitzTable/Dropdown/index.mjs +8 -1
- package/dist/components/BitzTable/Dropdown/style.mjs +9 -6
- package/dist/components/BitzTable/SelectionBar/Button.mjs +19 -6
- package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +8 -2
- package/dist/components/BitzTable/SelectionBar/style.mjs +18 -8
- package/dist/components/BitzTable/Store/index.d.ts +2 -2
- package/dist/components/BitzTable/Store/index.mjs +248 -212
- package/dist/components/BitzTable/Store/utils/index.mjs +25 -25
- package/dist/components/BitzTable/SubTable/index.mjs +121 -73
- package/dist/components/BitzTable/Table/ResizableTitle.mjs +23 -5
- package/dist/components/BitzTable/Table/SortTableContext.mjs +20 -7
- package/dist/components/BitzTable/Table/SortableRow.mjs +44 -20
- package/dist/components/BitzTable/Table/index.mjs +417 -207
- package/dist/components/BitzTable/Table/style.mjs +11 -1
- package/dist/components/BitzTable/Table/utils.mjs +11 -4
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +92 -28
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +97 -22
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +68 -29
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +253 -145
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +38 -12
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +42 -16
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +96 -20
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +9 -2
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +100 -46
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +30 -8
- package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +44 -14
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +44 -12
- package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +17 -4
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +49 -12
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +20 -9
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +48 -2
- package/dist/components/BitzTable/ToolBar/style.mjs +6 -1
- package/dist/components/BitzTableOperations/index.mjs +13 -3
- package/dist/components/BitzTableSelect/Picker/index.mjs +43 -10
- package/dist/components/BitzTableSelect/Select/index.mjs +87 -21
- package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +30 -20
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +239 -61
- package/dist/components/BitzTableSelect/TableCell/index.mjs +49 -8
- package/dist/components/BitzTableSelect/TextBlock/index.mjs +23 -5
- package/dist/components/BitzTableSelect/index.mjs +61 -13
- package/dist/components/BitzTag/index.mjs +1 -1
- package/dist/components/BitzTheme/index.mjs +6 -6
- package/dist/components/BitzTimeline/index.mjs +11 -1
- package/dist/components/BitzTimer/Form.mjs +32 -11
- package/dist/components/BitzTimer/Timer.mjs +76 -38
- package/dist/components/BitzTimer/index.mjs +66 -43
- package/dist/components/BitzToast/Toast/index.mjs +28 -10
- package/dist/components/BitzToast/index.mjs +1 -1
- package/dist/components/BitzTree/index.mjs +4 -1
- package/dist/components/BitzUeEditor/index.mjs +5 -5
- package/dist/components/BitzUpload/index.mjs +81 -43
- package/dist/components/BitzWebAppDrawer/index.mjs +35 -4
- package/dist/components/BitzWebAppModal/index.mjs +6 -3
- package/dist/hooks/use-event-listener.mjs +11 -2
- package/dist/hooks/use-lock-fn.mjs +13 -10
- package/dist/hooks/use-scroll-parent.mjs +16 -14
- package/dist/hooks/useEvent.mjs +7 -4
- package/dist/hooks/useMergedState.mjs +11 -11
- 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/WithFluent.mjs +27 -12
- package/dist/utils/create.mjs +7 -1
- package/dist/utils/time.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,160 +1,268 @@
|
|
|
1
1
|
import { j as r } 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
|
|
4
|
-
import { forwardRef as ye, useRef as ke, useMemo as k, useContext as
|
|
3
|
+
import { theme as pe, Flex as F, 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 we, memo as Le } from "react";
|
|
5
5
|
import { useImmer as Se } 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";
|
|
7
7
|
import "../../../index.mjs";
|
|
8
8
|
import { columnSort as Ke, genColumnKey as be, updateNestedObject as j } from "../../../Store/utils/index.mjs";
|
|
9
9
|
import J from "./DndList.mjs";
|
|
10
|
-
import { BitzTableContext as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
...ve(C, ["className"]),
|
|
42
|
-
selectable: !1,
|
|
43
|
-
disabled: f.disabled === !0,
|
|
44
|
-
disableCheckbox: typeof f.disabled == "boolean" ? f == null ? void 0 : f.disabled : (_ = f == null ? void 0 : f.disabled) == null ? void 0 : _.checkbox,
|
|
45
|
-
isLeaf: t ? !0 : void 0,
|
|
46
|
-
...f
|
|
47
|
-
};
|
|
48
|
-
}))(U ?? []).sort(Ke(i)), [i, U]);
|
|
49
|
-
G(() => {
|
|
50
|
-
var n, o;
|
|
51
|
-
const e = {}, s = {}, t = {};
|
|
52
|
-
for (const c in i)
|
|
53
|
-
((n = i[c]) == null ? void 0 : n.fixed) === "left" ? e[c] = i[c] : ((o = i[c]) == null ? void 0 : o.fixed) === "right" ? s[c] = i[c] : t[c] = i[c];
|
|
54
|
-
p(e), x(s), g(t);
|
|
55
|
-
}, [i]);
|
|
56
|
-
const [b, T] = m([]), [L, E] = m([]), [h, p] = m({}), [R, D] = m([]), [M, v] = m([]), [a, x] = m({}), [N, I] = m([]), [w, A] = m([]), [u, g] = m({});
|
|
57
|
-
G(() => {
|
|
58
|
-
const e = [], s = [], t = [], n = [], o = [], c = [];
|
|
59
|
-
W.forEach((l) => {
|
|
60
|
-
l.fixed === "left" ? (e.push(l), s.push(l.key)) : l.fixed === "right" ? (t.push(l), n.push(l.key)) : (o.push(l), c.push(l.key));
|
|
61
|
-
}), T(e), E(s), D(t), v(n), I(o), A(c);
|
|
62
|
-
}, [W]);
|
|
63
|
-
const ne = (e) => {
|
|
64
|
-
p(e);
|
|
65
|
-
}, ce = (e, s) => {
|
|
66
|
-
p(e), E(s);
|
|
67
|
-
}, re = (e) => {
|
|
68
|
-
x(e);
|
|
69
|
-
}, le = (e, s) => {
|
|
70
|
-
x(e), v(s);
|
|
71
|
-
}, ie = (e) => {
|
|
72
|
-
g(e);
|
|
73
|
-
}, he = (e, s) => {
|
|
74
|
-
g(e), A(s);
|
|
75
|
-
}, X = (e, s, t, n) => {
|
|
76
|
-
const o = { ...s[e] };
|
|
77
|
-
delete s[e], g({
|
|
78
|
-
...u,
|
|
79
|
-
[e]: { ...o, fixed: void 0, order: N.length }
|
|
80
|
-
});
|
|
81
|
-
const c = t.findIndex((y) => y.key === e), l = t.splice(c, 1)[0];
|
|
82
|
-
I([...N, { ...l, fixed: void 0 }]);
|
|
83
|
-
const C = n.splice(c, 1);
|
|
84
|
-
return A([...w, ...C]), { map: s, list: t, keys: n };
|
|
85
|
-
}, Y = (e, s, t, n) => {
|
|
86
|
-
const o = { ...s[e] };
|
|
87
|
-
delete s[e], p({
|
|
88
|
-
...h,
|
|
89
|
-
[e]: { ...o, fixed: "left", order: b.length, show: !0 }
|
|
90
|
-
});
|
|
91
|
-
const c = t.findIndex((y) => y.key === e), l = t.splice(c, 1)[0];
|
|
92
|
-
T([...b, { ...l, fixed: "left" }]);
|
|
93
|
-
const C = n.splice(c, 1);
|
|
94
|
-
return E([...L, ...C]), { map: s, list: t, keys: n };
|
|
95
|
-
}, Z = (e, s, t, n) => {
|
|
96
|
-
const o = { ...s[e] };
|
|
97
|
-
delete s[e], x({
|
|
98
|
-
...a,
|
|
99
|
-
[e]: {
|
|
100
|
-
...o,
|
|
101
|
-
fixed: "right",
|
|
102
|
-
order: R.length,
|
|
10
|
+
import { BitzTableContext as ve } from "../../../Store/index.mjs";
|
|
11
|
+
import Ne 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: I }, 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 I == "number" && I && (f != null && f.height) ? I - (f == null ? void 0 : f.height) - 16 : "auto", [I, f == null ? void 0 : f.height]),
|
|
29
|
+
overflow: "hidden auto",
|
|
30
|
+
gap: 6
|
|
31
|
+
}, { defaultColumnKeyMap: se, columns: U, columnsMap: oe } = Me(ve), [i, V] = Se({});
|
|
32
|
+
G(() => {
|
|
33
|
+
V({ ...oe });
|
|
34
|
+
}, []);
|
|
35
|
+
const W = k(() => ((s, t) => s.map((n) => {
|
|
36
|
+
var _;
|
|
37
|
+
const { key: o, dataIndex: c, children: l, ...C } = n, y = be(
|
|
38
|
+
n,
|
|
39
|
+
[t == null ? void 0 : t.columnKey, C.index].join("-")
|
|
40
|
+
), u = i[y || "null"] || {
|
|
103
41
|
show: !0
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
key: y,
|
|
45
|
+
...Ee(C, ["className"]),
|
|
46
|
+
selectable: !1,
|
|
47
|
+
disabled: u.disabled === !0,
|
|
48
|
+
disableCheckbox: typeof u.disabled == "boolean" ? u == null ? void 0 : u.disabled : (_ = u == null ? void 0 : u.disabled) == null ? void 0 : _.checkbox,
|
|
49
|
+
isLeaf: t ? !0 : void 0,
|
|
50
|
+
...u
|
|
51
|
+
};
|
|
52
|
+
}))(U ?? []).sort(Ke(i)), [i, U]);
|
|
53
|
+
G(() => {
|
|
54
|
+
var n, o;
|
|
55
|
+
const e = {}, s = {}, t = {};
|
|
56
|
+
for (const c in i)
|
|
57
|
+
((n = i[c]) == null ? void 0 : n.fixed) === "left" ? e[c] = i[c] : ((o = i[c]) == null ? void 0 : o.fixed) === "right" ? s[c] = i[c] : t[c] = i[c];
|
|
58
|
+
p(e), x(s), g(t);
|
|
59
|
+
}, [i]);
|
|
60
|
+
const [b, z] = m([]), [M, v] = m([]), [h, p] = m({}), [N, D] = m([]), [w, E] = m([]), [a, x] = m({}), [R, A] = m([]), [L, T] = m([]), [d, g] = m({});
|
|
61
|
+
G(() => {
|
|
62
|
+
const e = [], s = [], t = [], n = [], o = [], c = [];
|
|
63
|
+
W.forEach((l) => {
|
|
64
|
+
l.fixed === "left" ? (e.push(l), s.push(l.key)) : l.fixed === "right" ? (t.push(l), n.push(l.key)) : (o.push(l), c.push(l.key));
|
|
65
|
+
}), z(e), v(s), D(t), E(n), A(o), T(c);
|
|
66
|
+
}, [W]);
|
|
67
|
+
const ne = (e) => {
|
|
68
|
+
p(e);
|
|
69
|
+
}, ce = (e, s) => {
|
|
70
|
+
p(e), v(s);
|
|
71
|
+
}, re = (e) => {
|
|
72
|
+
x(e);
|
|
73
|
+
}, le = (e, s) => {
|
|
74
|
+
x(e), E(s);
|
|
75
|
+
}, ie = (e) => {
|
|
76
|
+
g(e);
|
|
77
|
+
}, he = (e, s) => {
|
|
78
|
+
g(e), T(s);
|
|
79
|
+
}, X = (e, s, t, n) => {
|
|
80
|
+
const o = { ...s[e] };
|
|
81
|
+
delete s[e], g({
|
|
82
|
+
...d,
|
|
83
|
+
[e]: { ...o, fixed: void 0, order: R.length }
|
|
84
|
+
});
|
|
85
|
+
const c = t.findIndex((y) => y.key === e), l = t.splice(c, 1)[0];
|
|
86
|
+
A([...R, { ...l, fixed: void 0 }]);
|
|
87
|
+
const C = n.splice(c, 1);
|
|
88
|
+
return T([...L, ...C]), { map: s, list: t, keys: n };
|
|
89
|
+
}, Y = (e, s, t, n) => {
|
|
90
|
+
const o = { ...s[e] };
|
|
91
|
+
delete s[e], p({
|
|
92
|
+
...h,
|
|
93
|
+
[e]: { ...o, fixed: "left", order: b.length, show: !0 }
|
|
94
|
+
});
|
|
95
|
+
const c = t.findIndex((y) => y.key === e), l = t.splice(c, 1)[0];
|
|
96
|
+
z([...b, { ...l, fixed: "left" }]);
|
|
97
|
+
const C = n.splice(c, 1);
|
|
98
|
+
return v([...M, ...C]), { map: s, list: t, keys: n };
|
|
99
|
+
}, Z = (e, s, t, n) => {
|
|
100
|
+
const o = { ...s[e] };
|
|
101
|
+
delete s[e], x({
|
|
102
|
+
...a,
|
|
103
|
+
[e]: {
|
|
104
|
+
...o,
|
|
105
|
+
fixed: "right",
|
|
106
|
+
order: N.length,
|
|
107
|
+
show: !0
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
const c = t.findIndex((y) => y.key === e), l = t.splice(c, 1)[0];
|
|
111
|
+
D([...N, { ...l, fixed: "right" }]);
|
|
112
|
+
const C = n.splice(c, 1);
|
|
113
|
+
return E([...w, ...C]), { map: s, list: t, keys: n };
|
|
114
|
+
}, $ = (e, s) => {
|
|
115
|
+
if (s === "left") {
|
|
116
|
+
const { map: t, list: n, keys: o } = X(
|
|
117
|
+
e,
|
|
118
|
+
h,
|
|
119
|
+
b,
|
|
120
|
+
M
|
|
121
|
+
);
|
|
122
|
+
p({ ...t }), z([...n]), v([...o]);
|
|
123
|
+
} else if (s === "center") {
|
|
124
|
+
const { map: t, list: n, keys: o } = Y(
|
|
125
|
+
e,
|
|
126
|
+
d,
|
|
127
|
+
R,
|
|
128
|
+
L
|
|
129
|
+
);
|
|
130
|
+
g({ ...t }), A([...n]), T([...o]);
|
|
131
|
+
} else {
|
|
132
|
+
const { map: t, list: n, keys: o } = Y(
|
|
133
|
+
e,
|
|
134
|
+
a,
|
|
135
|
+
N,
|
|
136
|
+
w
|
|
137
|
+
);
|
|
138
|
+
x({ ...t }), D([...n]), E([...o]);
|
|
104
139
|
}
|
|
105
|
-
})
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
(
|
|
139
|
-
|
|
140
|
-
(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
140
|
+
}, P = (e, s) => {
|
|
141
|
+
if (s === "left") {
|
|
142
|
+
const { map: t, list: n, keys: o } = Z(
|
|
143
|
+
e,
|
|
144
|
+
h,
|
|
145
|
+
b,
|
|
146
|
+
M
|
|
147
|
+
);
|
|
148
|
+
p({ ...t }), z([...n]), v([...o]);
|
|
149
|
+
} else if (s === "center") {
|
|
150
|
+
const { map: t, list: n, keys: o } = Z(
|
|
151
|
+
e,
|
|
152
|
+
d,
|
|
153
|
+
R,
|
|
154
|
+
L
|
|
155
|
+
);
|
|
156
|
+
g({ ...t }), A([...n]), T([...o]);
|
|
157
|
+
} else {
|
|
158
|
+
const { map: t, list: n, keys: o } = X(
|
|
159
|
+
e,
|
|
160
|
+
a,
|
|
161
|
+
N,
|
|
162
|
+
w
|
|
163
|
+
);
|
|
164
|
+
x({ ...t }), D([...n]), E([...o]);
|
|
165
|
+
}
|
|
166
|
+
}, ae = ({ target: e }) => {
|
|
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
|
+
}, B = k(() => [...M, ...L, ...w], [M, L, w]), S = k(() => {
|
|
169
|
+
var s, t, n;
|
|
170
|
+
const e = [];
|
|
171
|
+
for (const o in h)
|
|
172
|
+
(s = h[o]) != null && s.show && e.push(o);
|
|
173
|
+
for (const o in d)
|
|
174
|
+
(t = d[o]) != null && t.show && e.push(o);
|
|
175
|
+
for (const o in a)
|
|
176
|
+
(n = a[o]) != null && n.show && e.push(o);
|
|
177
|
+
return e;
|
|
178
|
+
}, [h, d, a]), de = k(() => B.length === S.length, [B, S]), fe = k(() => S.length > 0 && S.length < B.length, [S, B]), ue = () => {
|
|
179
|
+
V({ ...se });
|
|
180
|
+
};
|
|
181
|
+
return we(H, () => ({
|
|
182
|
+
getLeftSortColumns: () => h,
|
|
183
|
+
getCenterSortColumns: () => d,
|
|
184
|
+
getRightSortColumns: () => a,
|
|
185
|
+
getCheckedKeys: () => S
|
|
186
|
+
})), /* @__PURE__ */ r.jsxs(F, { vertical: !0, gap: 16, style: te, children: [
|
|
187
|
+
/* @__PURE__ */ r.jsxs("div", { className: "sortContent", children: [
|
|
188
|
+
/* @__PURE__ */ r.jsxs(F, { vertical: !0, className: "sortCard", style: O, children: [
|
|
189
|
+
/* @__PURE__ */ r.jsx(q.Title, { level: 5, className: "title", children: "固定在左侧" }),
|
|
190
|
+
/* @__PURE__ */ r.jsx(
|
|
191
|
+
J,
|
|
192
|
+
{
|
|
193
|
+
placement: "left",
|
|
194
|
+
dataList: b,
|
|
195
|
+
keys: M,
|
|
196
|
+
columnsMap: h,
|
|
197
|
+
onLeftClick: $,
|
|
198
|
+
onRightClick: P,
|
|
199
|
+
onChange: ne,
|
|
200
|
+
onMoveEnd: ce
|
|
201
|
+
}
|
|
202
|
+
)
|
|
203
|
+
] }),
|
|
204
|
+
/* @__PURE__ */ r.jsxs(F, { vertical: !0, className: "sortCard", style: O, children: [
|
|
205
|
+
/* @__PURE__ */ r.jsx(q.Title, { level: 5, className: "title", children: "不固定" }),
|
|
206
|
+
/* @__PURE__ */ r.jsx(
|
|
207
|
+
J,
|
|
208
|
+
{
|
|
209
|
+
placement: "center",
|
|
210
|
+
dataList: R,
|
|
211
|
+
keys: L,
|
|
212
|
+
columnsMap: d,
|
|
213
|
+
onLeftClick: $,
|
|
214
|
+
onRightClick: P,
|
|
215
|
+
onChange: ie,
|
|
216
|
+
onMoveEnd: he
|
|
217
|
+
}
|
|
218
|
+
)
|
|
219
|
+
] }),
|
|
220
|
+
/* @__PURE__ */ r.jsxs(F, { vertical: !0, className: "sortCard", style: O, children: [
|
|
221
|
+
/* @__PURE__ */ r.jsx(q.Title, { level: 5, className: "title", children: "固定在右侧" }),
|
|
222
|
+
/* @__PURE__ */ r.jsx(
|
|
223
|
+
J,
|
|
224
|
+
{
|
|
225
|
+
placement: "right",
|
|
226
|
+
dataList: N,
|
|
227
|
+
keys: w,
|
|
228
|
+
columnsMap: a,
|
|
229
|
+
onLeftClick: $,
|
|
230
|
+
onRightClick: P,
|
|
231
|
+
onChange: re,
|
|
232
|
+
onMoveEnd: le
|
|
233
|
+
}
|
|
234
|
+
)
|
|
235
|
+
] })
|
|
236
|
+
] }),
|
|
237
|
+
/* @__PURE__ */ r.jsxs(xe, { size: 16, className: "scope", ref: Q, children: [
|
|
238
|
+
/* @__PURE__ */ r.jsx(
|
|
239
|
+
ge,
|
|
240
|
+
{
|
|
241
|
+
indeterminate: fe,
|
|
242
|
+
checked: de,
|
|
243
|
+
onChange: ae,
|
|
244
|
+
children: /* @__PURE__ */ r.jsx("span", { style: { whiteSpace: "nowrap" }, children: "全选" })
|
|
245
|
+
}
|
|
246
|
+
),
|
|
247
|
+
/* @__PURE__ */ r.jsx(
|
|
248
|
+
Ce,
|
|
249
|
+
{
|
|
250
|
+
type: "link",
|
|
251
|
+
icon: /* @__PURE__ */ r.jsx(Ne, {}),
|
|
252
|
+
size: "small",
|
|
253
|
+
onClick: ue,
|
|
254
|
+
className: me`
|
|
153
255
|
&:hover {
|
|
154
256
|
color: ${ee.colorPrimary} !important;
|
|
155
257
|
}
|
|
156
|
-
`,
|
|
157
|
-
}
|
|
258
|
+
`,
|
|
259
|
+
children: /* @__PURE__ */ r.jsx("span", { style: { whiteSpace: "nowrap" }, children: "重置" })
|
|
260
|
+
}
|
|
261
|
+
)
|
|
262
|
+
] })
|
|
263
|
+
] });
|
|
264
|
+
}
|
|
265
|
+
), Ue = Le(Re);
|
|
158
266
|
export {
|
|
159
267
|
Ue as default
|
|
160
268
|
};
|
|
@@ -37,8 +37,19 @@ import "../../../../../assets/iconfont/IconFabu.mjs";
|
|
|
37
37
|
import "../../../../../assets/iconfont/IconShanchu1.mjs";
|
|
38
38
|
import "../../../../../assets/iconfont/IconShanchu.mjs";
|
|
39
39
|
import "../../../../../assets/iconfont/IconTuodong.mjs";
|
|
40
|
-
const
|
|
41
|
-
|
|
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({
|
|
42
53
|
id: r == null ? void 0 : r.field
|
|
43
54
|
// disabled: item?.disabled,
|
|
44
55
|
}), { token: m } = x.useToken(), f = {
|
|
@@ -48,21 +59,36 @@ const y = ({ item: r, onCheckboxChange: o, isDragOverlay: e }) => {
|
|
|
48
59
|
...i && {
|
|
49
60
|
opacity: 0.6
|
|
50
61
|
},
|
|
51
|
-
...
|
|
62
|
+
...s && {
|
|
52
63
|
backgroundColor: m.colorBgContainer
|
|
53
64
|
}
|
|
54
65
|
}, d = ({ target: g }) => {
|
|
55
66
|
o == null || o(r.field, g.checked);
|
|
56
67
|
};
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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);
|
|
66
92
|
export {
|
|
67
93
|
nr as default
|
|
68
94
|
};
|
|
@@ -1,27 +1,53 @@
|
|
|
1
1
|
import { j as o } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { DndContext as
|
|
3
|
-
import { SortableContext as
|
|
4
|
-
import { useState as
|
|
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
5
|
import m from "./DndItem.mjs";
|
|
6
|
-
const
|
|
7
|
-
const [s, c] =
|
|
6
|
+
const E = ({ dataList: r, keys: a, onChange: x, onMoveEnd: d }) => {
|
|
7
|
+
const [s, c] = C(-1), f = (t) => {
|
|
8
8
|
const { active: e } = t;
|
|
9
9
|
e && c(e.data.current.sortable.index);
|
|
10
|
-
},
|
|
10
|
+
}, D = (t) => {
|
|
11
11
|
const { over: e } = t;
|
|
12
12
|
if (e) {
|
|
13
|
-
const
|
|
14
|
-
s !==
|
|
13
|
+
const n = e.data.current.sortable.index;
|
|
14
|
+
s !== n && (g(s, n), c(-1));
|
|
15
15
|
}
|
|
16
|
-
},
|
|
17
|
-
const
|
|
18
|
-
d(i,
|
|
19
|
-
},
|
|
20
|
-
const
|
|
21
|
-
i[
|
|
16
|
+
}, g = (t, e) => {
|
|
17
|
+
const n = l(a, t, e), i = l(r, t, e);
|
|
18
|
+
d(i, n);
|
|
19
|
+
}, p = (t, e) => {
|
|
20
|
+
const n = r.findIndex((S) => S.field === t), i = JSON.parse(JSON.stringify(r));
|
|
21
|
+
i[n].show = e, x(i);
|
|
22
22
|
};
|
|
23
|
-
return
|
|
23
|
+
return /* @__PURE__ */ o.jsx(
|
|
24
|
+
j,
|
|
25
|
+
{
|
|
26
|
+
collisionDetection: u,
|
|
27
|
+
onDragStart: f,
|
|
28
|
+
onDragEnd: D,
|
|
29
|
+
onDragCancel: () => c(-1),
|
|
30
|
+
children: /* @__PURE__ */ o.jsx(v, { items: a, strategy: y, children: /* @__PURE__ */ o.jsxs("div", { className: "sortList", children: [
|
|
31
|
+
r.map((t) => /* @__PURE__ */ o.jsx(
|
|
32
|
+
m,
|
|
33
|
+
{
|
|
34
|
+
item: t,
|
|
35
|
+
onCheckboxChange: p
|
|
36
|
+
},
|
|
37
|
+
t.field
|
|
38
|
+
)),
|
|
39
|
+
/* @__PURE__ */ o.jsx(h, { children: s !== -1 && /* @__PURE__ */ o.jsx(
|
|
40
|
+
m,
|
|
41
|
+
{
|
|
42
|
+
item: r[s],
|
|
43
|
+
isDragOverlay: !0
|
|
44
|
+
},
|
|
45
|
+
r[s].field
|
|
46
|
+
) })
|
|
47
|
+
] }) })
|
|
48
|
+
}
|
|
49
|
+
);
|
|
24
50
|
};
|
|
25
51
|
export {
|
|
26
|
-
|
|
52
|
+
E as default
|
|
27
53
|
};
|