bitz-react-admin-ui 2.5.9 → 2.6.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/assets/iconfont/IconChenggong.mjs +25 -4
- package/dist/assets/iconfont/IconClose.mjs +24 -3
- package/dist/assets/iconfont/IconColumnCancelFixed.mjs +23 -2
- package/dist/assets/iconfont/IconColumnFixedLeft.mjs +27 -6
- package/dist/assets/iconfont/IconColumnFixedRight.mjs +27 -6
- package/dist/assets/iconfont/IconCuowu.mjs +23 -2
- package/dist/assets/iconfont/IconDragOrder.mjs +25 -4
- package/dist/assets/iconfont/IconDuigoux.mjs +25 -4
- package/dist/assets/iconfont/IconFabu.mjs +35 -5
- package/dist/assets/iconfont/IconFanhui.mjs +25 -4
- package/dist/assets/iconfont/IconGaojisousuo.mjs +26 -5
- package/dist/assets/iconfont/IconHangfengexian.mjs +41 -3
- package/dist/assets/iconfont/IconHangliefengexian.mjs +42 -4
- package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +26 -5
- package/dist/assets/iconfont/IconIcon21.mjs +25 -4
- package/dist/assets/iconfont/IconJincoude.mjs +25 -4
- package/dist/assets/iconfont/IconJinggao.mjs +25 -4
- package/dist/assets/iconfont/IconKuansongde.mjs +26 -5
- package/dist/assets/iconfont/IconLiefengexian.mjs +41 -3
- package/dist/assets/iconfont/IconMore.mjs +41 -4
- package/dist/assets/iconfont/IconShanchu.mjs +27 -6
- package/dist/assets/iconfont/IconShanchu1.mjs +35 -5
- package/dist/assets/iconfont/IconSousuo.mjs +27 -6
- package/dist/assets/iconfont/IconTejincou.mjs +25 -4
- package/dist/assets/iconfont/IconTekuansong.mjs +26 -5
- package/dist/assets/iconfont/IconTishi1.mjs +27 -6
- package/dist/assets/iconfont/IconTuodong.mjs +28 -7
- package/dist/assets/iconfont/IconWubanmawentianchong.mjs +35 -3
- package/dist/assets/iconfont/IconWufengexian.mjs +26 -4
- package/dist/assets/iconfont/IconXinxitishi.mjs +27 -6
- package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +34 -3
- package/dist/assets/iconfont/IconZhongdengde.mjs +24 -3
- package/dist/assets/iconfont/IconZhongzhi.mjs +24 -3
- 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 +52 -19
- 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/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/BitzFluentDatePicker/index.mjs +1 -1
- package/dist/components/BitzFluentRangePicker/index.mjs +1 -1
- package/dist/components/BitzFluentRangeTimePicker/index.mjs +1 -1
- package/dist/components/BitzFluentTimePicker/index.mjs +1 -1
- package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +13 -16
- package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +26 -20
- package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +21 -3
- package/dist/components/BitzFuiCalendar/CalendarBody.mjs +27 -4
- package/dist/components/BitzFuiCalendar/CalendarHead.mjs +5 -2
- package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +12 -3
- package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +47 -15
- package/dist/components/BitzFuiCalendar/ColumnData.mjs +25 -9
- package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +44 -8
- 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 +24 -11
- package/dist/components/BitzMeetingTime/index.mjs +10 -6
- 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 +80 -12
- package/dist/components/BitzTable/ActionBar/Button.mjs +20 -15
- package/dist/components/BitzTable/ActionBar/style.mjs +12 -9
- package/dist/components/BitzTable/ActionCol/index.mjs +129 -33
- 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 +11 -4
- package/dist/components/BitzTable/SelectionBar/style.mjs +18 -8
- package/dist/components/BitzTable/Store/index.mjs +170 -133
- package/dist/components/BitzTable/Store/utils/index.d.ts +1 -0
- package/dist/components/BitzTable/Store/utils/index.mjs +48 -38
- package/dist/components/BitzTable/SubTable/index.mjs +91 -43
- package/dist/components/BitzTable/Table/ResizableTitle copy.mjs +57 -40
- package/dist/components/BitzTable/Table/SortTableContext.mjs +39 -17
- package/dist/components/BitzTable/Table/SortableRow.mjs +44 -20
- package/dist/components/BitzTable/Table/index.mjs +476 -213
- package/dist/components/BitzTable/Table/style.mjs +10 -1
- package/dist/components/BitzTable/Table/utils.mjs +11 -4
- package/dist/components/BitzTable/TextOverflow/index.mjs +12 -3
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +83 -27
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +104 -23
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +68 -29
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +278 -150
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +50 -16
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +42 -16
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +129 -38
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +9 -2
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +97 -43
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +28 -6
- package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +38 -9
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +42 -14
- package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +17 -4
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +37 -8
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +20 -9
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +49 -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 +90 -21
- package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +23 -13
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +219 -69
- package/dist/components/BitzTableSelect/SingleSelect/index.mjs +87 -22
- package/dist/components/BitzTableSelect/TableCell/index.mjs +52 -11
- package/dist/components/BitzTableSelect/TextBlock/index.mjs +30 -12
- package/dist/components/BitzTableSelect/index.mjs +65 -14
- package/dist/components/BitzTableSelect/utils.mjs +3 -3
- package/dist/components/BitzTag/index.mjs +1 -1
- package/dist/components/BitzText/index.mjs +41 -14
- package/dist/components/BitzText/utils.mjs +3 -3
- 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/BitzTooltip/index.mjs +47 -17
- package/dist/components/BitzTooltip/style.mjs +9 -6
- package/dist/components/BitzTooltip/utils.mjs +2 -2
- 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/ahooks@3.7.11/node_modules/ahooks/es/useDebounceFn/index.mjs +29 -0
- package/dist/node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/utils/lodash-polyfill.mjs +7 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/debounce.mjs +37 -34
- package/dist/style.css +1 -1
- package/dist/utils/WithFluent.mjs +27 -5
- package/dist/utils/create.mjs +7 -1
- package/package.json +1 -1
|
@@ -1,159 +1,287 @@
|
|
|
1
1
|
import { j as l } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { findParentFirstNodeByClass as
|
|
3
|
-
import { css as
|
|
4
|
-
import { theme as
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
import { useImmer as
|
|
2
|
+
import { findParentFirstNodeByClass as Ce } from "../../../../../utils/findNode.mjs";
|
|
3
|
+
import { css as te } from "../../../../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
|
|
4
|
+
import { theme as ye, Flex as O, Typography as G, Space as ke, Checkbox as we, Button as se } from "antd";
|
|
5
|
+
import { forwardRef as Me, useRef as Se, useState as u, useEffect as P, useMemo as S, useContext as je, useImperativeHandle as Le, memo as be } from "react";
|
|
6
|
+
import { useImmer as Ke } from "../../../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
|
|
7
7
|
import "../../../index.mjs";
|
|
8
|
-
import { columnSort as
|
|
9
|
-
import
|
|
10
|
-
import { BitzTableContext as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
const {
|
|
21
|
-
|
|
8
|
+
import { columnSort as Re, genColumnKey as ve, updateNestedObject as j, removePropertiesWithoutMutation as Ne } from "../../../Store/utils/index.mjs";
|
|
9
|
+
import W from "./DndList.mjs";
|
|
10
|
+
import { BitzTableContext as Ee } from "../../../Store/index.mjs";
|
|
11
|
+
import oe from "../../../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
|
|
12
|
+
import Ie from "../../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
|
|
13
|
+
import He from "../../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
|
|
14
|
+
const Te = Me(
|
|
15
|
+
({ display: q }, ne) => {
|
|
16
|
+
const { token: J } = ye.useToken(), E = Se(null), [A, re] = u("auto");
|
|
17
|
+
P(() => {
|
|
18
|
+
const e = Ce(E.current, "ant-card-body");
|
|
19
|
+
if (e) {
|
|
20
|
+
const { paddingBlockStart: s, paddingBlockEnd: t } = window.getComputedStyle(e), n = parseInt(s) + parseInt(t), o = e.clientHeight - n, r = e.firstElementChild;
|
|
21
|
+
if (r) {
|
|
22
|
+
const { rowGap: c } = window.getComputedStyle(r), a = r == null ? void 0 : r.querySelector(".extraContent"), f = a == null ? void 0 : a.clientHeight, d = o - f - parseInt(c), { rowGap: ee } = window.getComputedStyle(E.current), z = d - parseInt(ee) - 36;
|
|
23
|
+
re(z);
|
|
24
|
+
}
|
|
22
25
|
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return {
|
|
39
|
-
key: p,
|
|
40
|
-
...Ne(i, ["className"]),
|
|
41
|
-
selectable: !1,
|
|
42
|
-
disabled: a.disabled === !0,
|
|
43
|
-
disableCheckbox: typeof a.disabled == "boolean" ? a == null ? void 0 : a.disabled : (H = a == null ? void 0 : a.disabled) == null ? void 0 : H.checkbox,
|
|
44
|
-
isLeaf: t ? !0 : void 0,
|
|
45
|
-
...a
|
|
46
|
-
};
|
|
47
|
-
}))(Q ?? []).sort(be(d)), [d, Q]);
|
|
48
|
-
D(() => {
|
|
49
|
-
var o, n;
|
|
50
|
-
const e = {}, s = {}, t = {};
|
|
51
|
-
for (const c in d)
|
|
52
|
-
((o = d[c]) == null ? void 0 : o.fixed) === "left" ? e[c] = d[c] : ((n = d[c]) == null ? void 0 : n.fixed) === "right" ? s[c] = d[c] : t[c] = d[c];
|
|
53
|
-
g(e), x(s), C(t);
|
|
54
|
-
}, [d]);
|
|
55
|
-
const [j, I] = m([]), [y, b] = m([]), [h, g] = m({}), [K, B] = m([]), [k, R] = m([]), [u, x] = m({}), [E, F] = m([]), [L, N] = m([]), [f, C] = m({});
|
|
56
|
-
D(() => {
|
|
57
|
-
const e = [], s = [], t = [], o = [], n = [], c = [];
|
|
58
|
-
W.forEach((r) => {
|
|
59
|
-
r.fixed === "left" ? (e.push(r), s.push(r.key)) : r.fixed === "right" ? (t.push(r), o.push(r.key)) : (n.push(r), c.push(r.key));
|
|
60
|
-
}), I(e), b(s), B(t), R(o), F(n), N(c);
|
|
61
|
-
}, [W]);
|
|
62
|
-
const oe = (e) => {
|
|
63
|
-
g(e);
|
|
64
|
-
}, ce = (e, s) => {
|
|
65
|
-
g(e), b(s);
|
|
66
|
-
}, re = (e) => {
|
|
67
|
-
x(e);
|
|
68
|
-
}, le = (e, s) => {
|
|
69
|
-
x(e), R(s);
|
|
70
|
-
}, ie = (e) => {
|
|
71
|
-
C(e);
|
|
72
|
-
}, ae = (e, s) => {
|
|
73
|
-
C(e), N(s);
|
|
74
|
-
}, X = (e, s, t, o) => {
|
|
75
|
-
const n = { ...s[e] };
|
|
76
|
-
delete s[e], C({
|
|
77
|
-
...f,
|
|
78
|
-
[e]: { ...n, fixed: void 0, order: E.length }
|
|
79
|
-
});
|
|
80
|
-
const c = t.findIndex((p) => p.key === e), r = t.splice(c, 1)[0];
|
|
81
|
-
F([...E, { ...r, fixed: void 0 }]);
|
|
82
|
-
const i = o.splice(c, 1);
|
|
83
|
-
return N([...L, ...i]), { map: s, list: t, keys: o };
|
|
84
|
-
}, Y = (e, s, t, o) => {
|
|
85
|
-
const n = { ...s[e] };
|
|
86
|
-
delete s[e], g({
|
|
87
|
-
...h,
|
|
88
|
-
[e]: { ...n, fixed: "left", order: j.length, show: !0 }
|
|
89
|
-
});
|
|
90
|
-
const c = t.findIndex((p) => p.key === e), r = t.splice(c, 1)[0];
|
|
91
|
-
I([...j, { ...r, fixed: "left" }]);
|
|
92
|
-
const i = o.splice(c, 1);
|
|
93
|
-
return b([...y, ...i]), { map: s, list: t, keys: o };
|
|
94
|
-
}, Z = (e, s, t, o) => {
|
|
95
|
-
const n = { ...s[e] };
|
|
96
|
-
delete s[e], x({
|
|
97
|
-
...u,
|
|
98
|
-
[e]: {
|
|
99
|
-
...n,
|
|
100
|
-
fixed: "right",
|
|
101
|
-
order: K.length,
|
|
26
|
+
}, [E.current]);
|
|
27
|
+
const ce = S(() => ({
|
|
28
|
+
display: q ? "flex" : "none",
|
|
29
|
+
width: "100%"
|
|
30
|
+
}), [q]), { defaultColumnKeyMap: Q, baseColumns: U, columnsMap: V } = je(Ee), [i, D] = Ke({});
|
|
31
|
+
P(() => {
|
|
32
|
+
const e = Object.keys(V).length ? V : Q;
|
|
33
|
+
D(e);
|
|
34
|
+
}, []);
|
|
35
|
+
const X = S(() => ((s, t) => s.map((n) => {
|
|
36
|
+
var z;
|
|
37
|
+
const { key: o, dataIndex: r, children: c, ...a } = n, f = ve(
|
|
38
|
+
n,
|
|
39
|
+
[t == null ? void 0 : t.columnKey, a.index].join("-")
|
|
40
|
+
), d = i[f || "null"] || {
|
|
102
41
|
show: !0
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
key: f,
|
|
45
|
+
...Ie(a, ["className"]),
|
|
46
|
+
selectable: !1,
|
|
47
|
+
disabled: d.disabled === !0,
|
|
48
|
+
disableCheckbox: typeof d.disabled == "boolean" ? d == null ? void 0 : d.disabled : (z = d == null ? void 0 : d.disabled) == null ? void 0 : z.checkbox,
|
|
49
|
+
isLeaf: t ? !0 : void 0,
|
|
50
|
+
...d
|
|
51
|
+
};
|
|
52
|
+
}))(U ?? []).sort(Re(i)), [i, U]);
|
|
53
|
+
P(() => {
|
|
54
|
+
var n, o;
|
|
55
|
+
const e = {}, s = {}, t = {};
|
|
56
|
+
for (const r in i)
|
|
57
|
+
((n = i[r]) == null ? void 0 : n.fixed) === "left" ? e[r] = i[r] : ((o = i[r]) == null ? void 0 : o.fixed) === "right" ? s[r] = i[r] : t[r] = i[r];
|
|
58
|
+
g(e), x(s), C(t);
|
|
59
|
+
}, [i]);
|
|
60
|
+
const [L, I] = u([]), [y, b] = u([]), [h, g] = u({}), [K, H] = u([]), [k, R] = u([]), [m, x] = u({}), [v, T] = u([]), [w, N] = u([]), [p, C] = u({});
|
|
61
|
+
P(() => {
|
|
62
|
+
const e = [], s = [], t = [], n = [], o = [], r = [];
|
|
63
|
+
X.forEach((c) => {
|
|
64
|
+
c.fixed === "left" ? (e.push(c), s.push(c.key)) : c.fixed === "right" ? (t.push(c), n.push(c.key)) : (o.push(c), r.push(c.key));
|
|
65
|
+
}), I(e), b(s), H(t), R(n), T(o), N(r);
|
|
66
|
+
}, [X]);
|
|
67
|
+
const le = (e) => {
|
|
68
|
+
g(e);
|
|
69
|
+
}, ie = (e, s) => {
|
|
70
|
+
g(e), b(s);
|
|
71
|
+
}, ae = (e) => {
|
|
72
|
+
x(e);
|
|
73
|
+
}, de = (e, s) => {
|
|
74
|
+
x(e), R(s);
|
|
75
|
+
}, he = (e) => {
|
|
76
|
+
C(e);
|
|
77
|
+
}, me = (e, s) => {
|
|
78
|
+
C(e), N(s);
|
|
79
|
+
}, Y = (e, s, t, n) => {
|
|
80
|
+
const o = { ...s[e] };
|
|
81
|
+
delete s[e], C({
|
|
82
|
+
...p,
|
|
83
|
+
[e]: { ...o, fixed: void 0, order: v.length }
|
|
84
|
+
});
|
|
85
|
+
const r = t.findIndex((f) => f.key === e), c = t.splice(r, 1)[0];
|
|
86
|
+
T([...v, { ...c, fixed: void 0 }]);
|
|
87
|
+
const a = n.splice(r, 1);
|
|
88
|
+
return N([...w, ...a]), { map: s, list: t, keys: n };
|
|
89
|
+
}, Z = (e, s, t, n) => {
|
|
90
|
+
const o = { ...s[e] };
|
|
91
|
+
delete s[e], g({
|
|
92
|
+
...h,
|
|
93
|
+
[e]: { ...o, fixed: "left", order: L.length, show: !0 }
|
|
94
|
+
});
|
|
95
|
+
const r = t.findIndex((f) => f.key === e), c = t.splice(r, 1)[0];
|
|
96
|
+
I([...L, { ...c, fixed: "left" }]);
|
|
97
|
+
const a = n.splice(r, 1);
|
|
98
|
+
return b([...y, ...a]), { map: s, list: t, keys: n };
|
|
99
|
+
}, _ = (e, s, t, n) => {
|
|
100
|
+
const o = { ...s[e] };
|
|
101
|
+
delete s[e], x({
|
|
102
|
+
...m,
|
|
103
|
+
[e]: {
|
|
104
|
+
...o,
|
|
105
|
+
fixed: "right",
|
|
106
|
+
order: K.length,
|
|
107
|
+
show: !0
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
const r = t.findIndex((f) => f.key === e), c = t.splice(r, 1)[0];
|
|
111
|
+
H([...K, { ...c, fixed: "right" }]);
|
|
112
|
+
const a = n.splice(r, 1);
|
|
113
|
+
return R([...k, ...a]), { map: s, list: t, keys: n };
|
|
114
|
+
}, $ = (e, s) => {
|
|
115
|
+
if (s === "left") {
|
|
116
|
+
const { map: t, list: n, keys: o } = Y(
|
|
117
|
+
e,
|
|
118
|
+
h,
|
|
119
|
+
L,
|
|
120
|
+
y
|
|
121
|
+
);
|
|
122
|
+
g({ ...t }), I([...n]), b([...o]);
|
|
123
|
+
} else if (s === "center") {
|
|
124
|
+
const { map: t, list: n, keys: o } = Z(
|
|
125
|
+
e,
|
|
126
|
+
p,
|
|
127
|
+
v,
|
|
128
|
+
w
|
|
129
|
+
);
|
|
130
|
+
C({ ...t }), T([...n]), N([...o]);
|
|
131
|
+
} else {
|
|
132
|
+
const { map: t, list: n, keys: o } = Z(
|
|
133
|
+
e,
|
|
134
|
+
m,
|
|
135
|
+
K,
|
|
136
|
+
k
|
|
137
|
+
);
|
|
138
|
+
x({ ...t }), H([...n]), R([...o]);
|
|
139
|
+
}
|
|
140
|
+
}, F = (e, s) => {
|
|
141
|
+
if (s === "left") {
|
|
142
|
+
const { map: t, list: n, keys: o } = _(
|
|
143
|
+
e,
|
|
144
|
+
h,
|
|
145
|
+
L,
|
|
146
|
+
y
|
|
147
|
+
);
|
|
148
|
+
g({ ...t }), I([...n]), b([...o]);
|
|
149
|
+
} else if (s === "center") {
|
|
150
|
+
const { map: t, list: n, keys: o } = _(
|
|
151
|
+
e,
|
|
152
|
+
p,
|
|
153
|
+
v,
|
|
154
|
+
w
|
|
155
|
+
);
|
|
156
|
+
C({ ...t }), T([...n]), N([...o]);
|
|
157
|
+
} else {
|
|
158
|
+
const { map: t, list: n, keys: o } = Y(
|
|
159
|
+
e,
|
|
160
|
+
m,
|
|
161
|
+
K,
|
|
162
|
+
k
|
|
163
|
+
);
|
|
164
|
+
x({ ...t }), H([...n]), R([...o]);
|
|
103
165
|
}
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
B([...
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
const
|
|
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
|
-
|
|
166
|
+
}, pe = ({ target: e }) => {
|
|
167
|
+
e.checked ? (g(j(h, "show", !0)), C(j(p, "show", !0)), x(j(m, "show", !0))) : (g(j(h, "show", !1)), C(j(p, "show", !1)), x(j(m, "show", !1)));
|
|
168
|
+
}, B = S(() => [...y, ...w, ...k], [y, w, k]), M = S(() => {
|
|
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 p)
|
|
174
|
+
(t = p[o]) != null && t.show && e.push(o);
|
|
175
|
+
for (const o in m)
|
|
176
|
+
(n = m[o]) != null && n.show && e.push(o);
|
|
177
|
+
return e;
|
|
178
|
+
}, [h, p, m]), fe = S(() => B.length === M.length, [B, M]), ue = S(() => M.length > 0 && M.length < B.length, [M, B]), ge = () => {
|
|
179
|
+
const e = He(i, Q);
|
|
180
|
+
D({ ...e });
|
|
181
|
+
}, xe = () => {
|
|
182
|
+
const e = Ne(i, ["width"]);
|
|
183
|
+
D(e);
|
|
184
|
+
};
|
|
185
|
+
return Le(ne, () => ({
|
|
186
|
+
getLeftSortColumns: () => h,
|
|
187
|
+
getCenterSortColumns: () => p,
|
|
188
|
+
getRightSortColumns: () => m,
|
|
189
|
+
getCheckedKeys: () => M
|
|
190
|
+
})), /* @__PURE__ */ l.jsxs(O, { vertical: !0, gap: 16, style: ce, ref: E, children: [
|
|
191
|
+
/* @__PURE__ */ l.jsxs("div", { className: "sortContent", children: [
|
|
192
|
+
/* @__PURE__ */ l.jsxs(O, { vertical: !0, className: "sortCard", gap: 6, style: { height: A }, children: [
|
|
193
|
+
/* @__PURE__ */ l.jsx(G.Title, { level: 5, className: "title", children: "固定在左侧" }),
|
|
194
|
+
/* @__PURE__ */ l.jsx(
|
|
195
|
+
W,
|
|
196
|
+
{
|
|
197
|
+
placement: "left",
|
|
198
|
+
dataList: L,
|
|
199
|
+
keys: y,
|
|
200
|
+
columnsMap: h,
|
|
201
|
+
onLeftClick: $,
|
|
202
|
+
onRightClick: F,
|
|
203
|
+
onChange: le,
|
|
204
|
+
onMoveEnd: ie
|
|
205
|
+
}
|
|
206
|
+
)
|
|
207
|
+
] }),
|
|
208
|
+
/* @__PURE__ */ l.jsxs(O, { vertical: !0, className: "sortCard", gap: 6, style: { height: A }, children: [
|
|
209
|
+
/* @__PURE__ */ l.jsx(G.Title, { level: 5, className: "title", children: "不固定" }),
|
|
210
|
+
/* @__PURE__ */ l.jsx(
|
|
211
|
+
W,
|
|
212
|
+
{
|
|
213
|
+
placement: "center",
|
|
214
|
+
dataList: v,
|
|
215
|
+
keys: w,
|
|
216
|
+
columnsMap: p,
|
|
217
|
+
onLeftClick: $,
|
|
218
|
+
onRightClick: F,
|
|
219
|
+
onChange: he,
|
|
220
|
+
onMoveEnd: me
|
|
221
|
+
}
|
|
222
|
+
)
|
|
223
|
+
] }),
|
|
224
|
+
/* @__PURE__ */ l.jsxs(O, { vertical: !0, className: "sortCard", gap: 6, style: { height: A }, children: [
|
|
225
|
+
/* @__PURE__ */ l.jsx(G.Title, { level: 5, className: "title", children: "固定在右侧" }),
|
|
226
|
+
/* @__PURE__ */ l.jsx(
|
|
227
|
+
W,
|
|
228
|
+
{
|
|
229
|
+
placement: "right",
|
|
230
|
+
dataList: K,
|
|
231
|
+
keys: k,
|
|
232
|
+
columnsMap: m,
|
|
233
|
+
onLeftClick: $,
|
|
234
|
+
onRightClick: F,
|
|
235
|
+
onChange: ae,
|
|
236
|
+
onMoveEnd: de
|
|
237
|
+
}
|
|
238
|
+
)
|
|
239
|
+
] })
|
|
240
|
+
] }),
|
|
241
|
+
/* @__PURE__ */ l.jsxs(ke, { size: 16, align: "end", style: { height: 36 }, children: [
|
|
242
|
+
/* @__PURE__ */ l.jsx(
|
|
243
|
+
we,
|
|
244
|
+
{
|
|
245
|
+
indeterminate: ue,
|
|
246
|
+
checked: fe,
|
|
247
|
+
onChange: pe,
|
|
248
|
+
children: "全选"
|
|
249
|
+
}
|
|
250
|
+
),
|
|
251
|
+
/* @__PURE__ */ l.jsx(
|
|
252
|
+
se,
|
|
253
|
+
{
|
|
254
|
+
type: "link",
|
|
255
|
+
icon: /* @__PURE__ */ l.jsx(oe, {}),
|
|
256
|
+
size: "small",
|
|
257
|
+
onClick: ge,
|
|
258
|
+
className: te`
|
|
259
|
+
&:hover {
|
|
260
|
+
color: ${J.colorPrimary} !important;
|
|
261
|
+
}
|
|
262
|
+
`,
|
|
263
|
+
children: "重置列排序和显隐"
|
|
264
|
+
}
|
|
265
|
+
),
|
|
266
|
+
/* @__PURE__ */ l.jsx(
|
|
267
|
+
se,
|
|
268
|
+
{
|
|
269
|
+
type: "link",
|
|
270
|
+
icon: /* @__PURE__ */ l.jsx(oe, {}),
|
|
271
|
+
size: "small",
|
|
272
|
+
onClick: xe,
|
|
273
|
+
className: te`
|
|
152
274
|
&:hover {
|
|
153
|
-
color: ${
|
|
275
|
+
color: ${J.colorPrimary} !important;
|
|
154
276
|
}
|
|
155
|
-
`,
|
|
156
|
-
|
|
277
|
+
`,
|
|
278
|
+
children: "重置列宽度"
|
|
279
|
+
}
|
|
280
|
+
)
|
|
281
|
+
] })
|
|
282
|
+
] });
|
|
283
|
+
}
|
|
284
|
+
), Ue = be(Te);
|
|
157
285
|
export {
|
|
158
|
-
|
|
286
|
+
Ue as default
|
|
159
287
|
};
|
|
@@ -1,35 +1,69 @@
|
|
|
1
1
|
import { j as e } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import j, { useState as I } from "react";
|
|
3
3
|
import { useSortable as x } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
|
|
4
|
-
import { CSS as
|
|
5
|
-
import { theme as
|
|
6
|
-
import
|
|
4
|
+
import { CSS as D } from "../../../../../node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
|
|
5
|
+
import { theme as y, Flex as a, Checkbox as N } from "antd";
|
|
6
|
+
import h from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
7
7
|
import w from "../../../../../assets/iconfont/IconDragOrder.mjs";
|
|
8
|
-
const R = ({
|
|
9
|
-
|
|
8
|
+
const R = ({
|
|
9
|
+
item: t,
|
|
10
|
+
onCheckboxChange: r,
|
|
11
|
+
isDragOverlay: l
|
|
12
|
+
}) => {
|
|
13
|
+
const {
|
|
14
|
+
attributes: i,
|
|
15
|
+
isDragging: o,
|
|
16
|
+
setNodeRef: c,
|
|
17
|
+
listeners: f,
|
|
18
|
+
transform: m,
|
|
19
|
+
transition: d
|
|
20
|
+
} = x({
|
|
10
21
|
id: t == null ? void 0 : t.field
|
|
11
22
|
// disabled: item?.disabled,
|
|
12
|
-
}), { token: s } =
|
|
23
|
+
}), { token: s } = y.useToken(), u = {
|
|
13
24
|
gap: 8,
|
|
14
25
|
transition: d,
|
|
15
|
-
transform:
|
|
26
|
+
transform: D.Transform.toString(m),
|
|
16
27
|
...o && {
|
|
17
28
|
opacity: 0.6
|
|
18
29
|
},
|
|
19
30
|
...l && {
|
|
20
31
|
backgroundColor: s.colorBgContainer
|
|
21
32
|
}
|
|
22
|
-
}, [
|
|
33
|
+
}, [p, n] = I(!1), g = ({ target: S }) => {
|
|
23
34
|
r == null || r(t.field, S.checked);
|
|
24
35
|
};
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
return /* @__PURE__ */ e.jsxs(
|
|
37
|
+
a,
|
|
38
|
+
{
|
|
39
|
+
align: "center",
|
|
40
|
+
className: h({ sortItemDragging: o }, "sortItem"),
|
|
41
|
+
style: u,
|
|
42
|
+
ref: c,
|
|
43
|
+
onMouseEnter: () => n(!0),
|
|
44
|
+
onMouseLeave: () => n(!1),
|
|
45
|
+
...i,
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ e.jsx(a, { align: "center", className: "dragIcon", ...f, children: /* @__PURE__ */ e.jsx(
|
|
48
|
+
w,
|
|
49
|
+
{
|
|
50
|
+
size: s.fontSize + 4,
|
|
51
|
+
style: { opacity: p ? 1 : 0.3 }
|
|
52
|
+
}
|
|
53
|
+
) }),
|
|
54
|
+
/* @__PURE__ */ e.jsx(
|
|
55
|
+
N,
|
|
56
|
+
{
|
|
57
|
+
value: t.field,
|
|
58
|
+
checked: t.show,
|
|
59
|
+
onChange: g,
|
|
60
|
+
title: t.title,
|
|
61
|
+
children: t.title
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
);
|
|
33
67
|
}, B = j.memo(R);
|
|
34
68
|
export {
|
|
35
69
|
B as default
|
|
@@ -1,27 +1,53 @@
|
|
|
1
1
|
import { j as o } from "../../../../../node_modules/.store/react@18.3.1/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
|
};
|