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