bitz-react-admin-ui 2.2.6 → 2.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/Draggable.mjs +4 -0
- package/dist/_virtual/DraggableCore.mjs +4 -0
- package/dist/_virtual/Resizable.mjs +4 -0
- package/dist/_virtual/ResizableBox.mjs +4 -0
- package/dist/_virtual/_commonjsHelpers.mjs +26 -4
- package/dist/_virtual/cjs.mjs +4 -0
- package/dist/_virtual/clsx.m.mjs +6 -0
- package/dist/_virtual/domFns.mjs +4 -0
- package/dist/_virtual/getPrefix.mjs +4 -0
- package/dist/_virtual/index6.mjs +4 -0
- package/dist/_virtual/log.mjs +4 -0
- package/dist/_virtual/positionFns.mjs +4 -0
- package/dist/_virtual/propTypes.mjs +4 -0
- package/dist/_virtual/shims.mjs +4 -0
- package/dist/_virtual/utils.mjs +4 -0
- package/dist/assets/iconfont/IconChenggong.mjs +4 -10
- package/dist/assets/iconfont/IconClose.mjs +1 -7
- package/dist/assets/iconfont/IconColumnCancelFixed.mjs +4 -25
- package/dist/assets/iconfont/IconColumnFixedLeft.mjs +8 -29
- package/dist/assets/iconfont/IconColumnFixedRight.mjs +7 -28
- package/dist/assets/iconfont/IconCuowu.mjs +2 -8
- package/dist/assets/iconfont/IconDragOrder.mjs +7 -28
- package/dist/assets/iconfont/IconDuigoux.mjs +2 -8
- package/dist/assets/iconfont/IconFabu.mjs +3 -18
- package/dist/assets/iconfont/IconFanhui.mjs +5 -11
- package/dist/assets/iconfont/IconGaojisousuo.mjs +4 -10
- package/dist/assets/iconfont/IconHangfengexian.mjs +4 -27
- package/dist/assets/iconfont/IconHangliefengexian.mjs +4 -27
- package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +5 -11
- package/dist/assets/iconfont/IconIcon21.mjs +2 -8
- package/dist/assets/iconfont/IconJincoude.mjs +3 -9
- package/dist/assets/iconfont/IconJinggao.mjs +2 -8
- package/dist/assets/iconfont/IconKuansongde.mjs +5 -11
- package/dist/assets/iconfont/IconLiefengexian.mjs +5 -28
- package/dist/assets/iconfont/IconMore.mjs +4 -26
- package/dist/assets/iconfont/IconShanchu.mjs +5 -11
- package/dist/assets/iconfont/IconShanchu1.mjs +3 -18
- package/dist/assets/iconfont/IconSousuo.mjs +4 -10
- package/dist/assets/iconfont/IconTejincou.mjs +1 -7
- package/dist/assets/iconfont/IconTekuansong.mjs +5 -11
- package/dist/assets/iconfont/IconTishi1.mjs +6 -12
- package/dist/assets/iconfont/IconTuodong.mjs +6 -12
- package/dist/assets/iconfont/IconWubanmawentianchong.mjs +5 -22
- package/dist/assets/iconfont/IconWufengexian.mjs +4 -11
- package/dist/assets/iconfont/IconXinxitishi.mjs +3 -9
- package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +7 -23
- package/dist/assets/iconfont/IconZhongdengde.mjs +4 -10
- package/dist/assets/iconfont/IconZhongzhi.mjs +5 -11
- 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/BitzConvert/DropdownToButton/index.mjs +11 -14
- package/dist/components/BitzConvert/index.mjs +1 -1
- 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/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 +19 -51
- package/dist/components/BitzFuiCalendar/ColumnData.mjs +14 -30
- package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +5 -47
- 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.d.ts +21 -9
- package/dist/components/BitzTable/ActionBar/ActionBar.mjs +38 -66
- package/dist/components/BitzTable/ActionBar/Button.mjs +1 -1
- package/dist/components/BitzTable/ActionBar/style.mjs +9 -12
- package/dist/components/BitzTable/ActionCol/index.d.ts +1 -1
- package/dist/components/BitzTable/ActionCol/index.mjs +32 -98
- 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 +2 -8
- package/dist/components/BitzTable/SelectionBar/style.mjs +8 -18
- package/dist/components/BitzTable/Store/index.d.ts +5 -1
- package/dist/components/BitzTable/Store/index.mjs +189 -199
- package/dist/components/BitzTable/Store/utils/index.d.ts +1 -1
- package/dist/components/BitzTable/Store/utils/index.mjs +30 -30
- package/dist/components/BitzTable/SubTable/index.mjs +76 -119
- package/dist/components/BitzTable/Table/ResizableTitle.d.ts +8 -0
- package/dist/components/BitzTable/Table/ResizableTitle.mjs +14 -0
- package/dist/components/BitzTable/Table/SortTableContext.mjs +7 -20
- package/dist/components/BitzTable/Table/SortableRow.mjs +20 -44
- package/dist/components/BitzTable/Table/index.d.ts +1 -1
- package/dist/components/BitzTable/Table/index.mjs +257 -446
- package/dist/components/BitzTable/Table/style.mjs +1 -11
- package/dist/components/BitzTable/Table/utils.d.ts +2 -2
- package/dist/components/BitzTable/Table/utils.mjs +30 -31
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +28 -92
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +22 -97
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +29 -68
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +147 -255
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +12 -38
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +16 -42
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +20 -96
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +2 -9
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +46 -100
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +8 -30
- 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 +12 -49
- package/dist/components/BitzTable/ToolBar/Modal/style.mjs +4 -0
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +9 -20
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +2 -48
- package/dist/components/BitzTable/ToolBar/style.mjs +1 -6
- package/dist/components/BitzTable/index.d.ts +3 -2
- package/dist/components/BitzTable/index.mjs +17 -15
- 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 -87
- package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +20 -30
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +61 -239
- package/dist/components/BitzTableSelect/TableCell/index.mjs +8 -49
- package/dist/components/BitzTableSelect/TextBlock/index.mjs +5 -23
- package/dist/components/BitzTableSelect/index.mjs +13 -61
- package/dist/components/BitzTag/index.mjs +1 -1
- 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/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/node_modules/.store/clsx@1.2.1/node_modules/clsx/dist/clsx.m.mjs +22 -0
- package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +8 -7
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/Draggable.mjs +343 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/DraggableCore.mjs +324 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/cjs.mjs +14 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/domFns.mjs +174 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/getPrefix.mjs +35 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/log.mjs +7 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/positionFns.mjs +107 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/shims.mjs +30 -0
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/Resizable.mjs +201 -0
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/ResizableBox.mjs +162 -0
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/propTypes.mjs +118 -0
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/utils.mjs +54 -0
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/index.mjs +13 -0
- package/dist/node_modules/.store/use-sync-external-store@1.2.0/node_modules/use-sync-external-store/shim/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/WithFluent.mjs +12 -27
- package/dist/utils/create.mjs +1 -7
- package/package.json +1 -1
|
@@ -1,268 +1,160 @@
|
|
|
1
|
-
import { j as
|
|
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
|
|
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 we } from "react";
|
|
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
|
-
|
|
10
|
+
import { BitzTableContext as Ee } from "../../../Store/index.mjs";
|
|
11
|
+
import Re from "../../../../../node_modules/.store/@ant-design_icons@5.3.6/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: K, parentHeight: F }, H) => {
|
|
14
|
+
const { token: ee } = pe.useToken(), Q = ke(null), d = je(Q), te = k(() => ({
|
|
15
|
+
// display: display ? 'flex' : 'none'
|
|
16
|
+
width: K ? "100%" : 0,
|
|
17
|
+
height: "100%",
|
|
18
|
+
pointerEvents: K ? "auto" : "none",
|
|
19
|
+
opacity: K ? 1 : 0,
|
|
20
|
+
overflow: "hidden",
|
|
21
|
+
...K ? {} : {
|
|
22
|
+
position: "absolute",
|
|
23
|
+
left: 0,
|
|
24
|
+
right: 0
|
|
25
|
+
}
|
|
26
|
+
}), [K]), 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: se, columns: U, columnsMap: oe } = Le(Ee), [i, V] = Se({});
|
|
31
|
+
G(() => {
|
|
32
|
+
V({ ...oe });
|
|
33
|
+
}, []);
|
|
34
|
+
const W = k(() => ((s, t) => s.map((n) => {
|
|
35
|
+
var _;
|
|
36
|
+
const { key: o, dataIndex: c, children: l, ...C } = n, y = be(n, [t == null ? void 0 : t.columnKey, C.index].join("-")), f = i[y || "null"] || {
|
|
37
|
+
show: !0
|
|
38
|
+
};
|
|
39
|
+
return {
|
|
40
|
+
key: y,
|
|
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,
|
|
41
103
|
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
|
-
}).filter((s) => !(s != null && s.isDragSortCol)))(U ?? []).sort(Ke(i)), [i, U]);
|
|
53
|
-
G(() => {
|
|
54
|
-
var s, n;
|
|
55
|
-
const e = {}, o = {}, t = {};
|
|
56
|
-
for (const r in i)
|
|
57
|
-
((s = i[r]) == null ? void 0 : s.fixed) === "left" ? e[r] = i[r] : ((n = i[r]) == null ? void 0 : n.fixed) === "right" ? o[r] = i[r] : t[r] = i[r];
|
|
58
|
-
p(e), x(o), g(t);
|
|
59
|
-
}, [i]);
|
|
60
|
-
const [b, z] = m([]), [M, N] = m([]), [h, p] = m({}), [v, D] = m([]), [S, E] = m([]), [a, x] = m({}), [R, A] = m([]), [w, T] = m([]), [d, g] = m({});
|
|
61
|
-
G(() => {
|
|
62
|
-
const e = [], o = [], t = [], s = [], n = [], r = [];
|
|
63
|
-
W.forEach((l) => {
|
|
64
|
-
l.fixed === "left" ? (e.push(l), o.push(l.key)) : l.fixed === "right" ? (t.push(l), s.push(l.key)) : (n.push(l), r.push(l.key));
|
|
65
|
-
}), z(e), N(o), D(t), E(s), A(n), T(r);
|
|
66
|
-
}, [W]);
|
|
67
|
-
const ne = (e) => {
|
|
68
|
-
p(e);
|
|
69
|
-
}, re = (e, o) => {
|
|
70
|
-
p(e), N(o);
|
|
71
|
-
}, ce = (e) => {
|
|
72
|
-
x(e);
|
|
73
|
-
}, le = (e, o) => {
|
|
74
|
-
x(e), E(o);
|
|
75
|
-
}, ie = (e) => {
|
|
76
|
-
g(e);
|
|
77
|
-
}, he = (e, o) => {
|
|
78
|
-
g(e), T(o);
|
|
79
|
-
}, X = (e, o, t, s) => {
|
|
80
|
-
const n = { ...o[e] };
|
|
81
|
-
delete o[e], g({
|
|
82
|
-
...d,
|
|
83
|
-
[e]: { ...n, fixed: void 0, order: R.length }
|
|
84
|
-
});
|
|
85
|
-
const r = t.findIndex((y) => y.key === e), l = t.splice(r, 1)[0];
|
|
86
|
-
A([...R, { ...l, fixed: void 0 }]);
|
|
87
|
-
const C = s.splice(r, 1);
|
|
88
|
-
return T([...w, ...C]), { map: o, list: t, keys: s };
|
|
89
|
-
}, Y = (e, o, t, s) => {
|
|
90
|
-
const n = { ...o[e] };
|
|
91
|
-
delete o[e], p({
|
|
92
|
-
...h,
|
|
93
|
-
[e]: { ...n, fixed: "left", order: b.length, show: !0 }
|
|
94
|
-
});
|
|
95
|
-
const r = t.findIndex((y) => y.key === e), l = t.splice(r, 1)[0];
|
|
96
|
-
z([...b, { ...l, fixed: "left" }]);
|
|
97
|
-
const C = s.splice(r, 1);
|
|
98
|
-
return N([...M, ...C]), { map: o, list: t, keys: s };
|
|
99
|
-
}, Z = (e, o, t, s) => {
|
|
100
|
-
const n = { ...o[e] };
|
|
101
|
-
delete o[e], x({
|
|
102
|
-
...a,
|
|
103
|
-
[e]: {
|
|
104
|
-
...n,
|
|
105
|
-
fixed: "right",
|
|
106
|
-
order: v.length,
|
|
107
|
-
show: !0
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
const r = t.findIndex((y) => y.key === e), l = t.splice(r, 1)[0];
|
|
111
|
-
D([...v, { ...l, fixed: "right" }]);
|
|
112
|
-
const C = s.splice(r, 1);
|
|
113
|
-
return E([...S, ...C]), { map: o, list: t, keys: s };
|
|
114
|
-
}, $ = (e, o) => {
|
|
115
|
-
if (o === "left") {
|
|
116
|
-
const { map: t, list: s, keys: n } = X(
|
|
117
|
-
e,
|
|
118
|
-
h,
|
|
119
|
-
b,
|
|
120
|
-
M
|
|
121
|
-
);
|
|
122
|
-
p({ ...t }), z([...s]), N([...n]);
|
|
123
|
-
} else if (o === "center") {
|
|
124
|
-
const { map: t, list: s, keys: n } = Y(
|
|
125
|
-
e,
|
|
126
|
-
d,
|
|
127
|
-
R,
|
|
128
|
-
w
|
|
129
|
-
);
|
|
130
|
-
g({ ...t }), A([...s]), T([...n]);
|
|
131
|
-
} else {
|
|
132
|
-
const { map: t, list: s, keys: n } = Y(
|
|
133
|
-
e,
|
|
134
|
-
a,
|
|
135
|
-
v,
|
|
136
|
-
S
|
|
137
|
-
);
|
|
138
|
-
x({ ...t }), D([...s]), E([...n]);
|
|
139
104
|
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
/* @__PURE__ */ c.jsxs(F, { vertical: !0, className: "sortCard", style: O, children: [
|
|
189
|
-
/* @__PURE__ */ c.jsx(q.Title, { level: 5, className: "title", children: "固定在左侧" }),
|
|
190
|
-
/* @__PURE__ */ c.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: re
|
|
201
|
-
}
|
|
202
|
-
)
|
|
203
|
-
] }),
|
|
204
|
-
/* @__PURE__ */ c.jsxs(F, { vertical: !0, className: "sortCard", style: O, children: [
|
|
205
|
-
/* @__PURE__ */ c.jsx(q.Title, { level: 5, className: "title", children: "不固定" }),
|
|
206
|
-
/* @__PURE__ */ c.jsx(
|
|
207
|
-
J,
|
|
208
|
-
{
|
|
209
|
-
placement: "center",
|
|
210
|
-
dataList: R,
|
|
211
|
-
keys: w,
|
|
212
|
-
columnsMap: d,
|
|
213
|
-
onLeftClick: $,
|
|
214
|
-
onRightClick: P,
|
|
215
|
-
onChange: ie,
|
|
216
|
-
onMoveEnd: he
|
|
217
|
-
}
|
|
218
|
-
)
|
|
219
|
-
] }),
|
|
220
|
-
/* @__PURE__ */ c.jsxs(F, { vertical: !0, className: "sortCard", style: O, children: [
|
|
221
|
-
/* @__PURE__ */ c.jsx(q.Title, { level: 5, className: "title", children: "固定在右侧" }),
|
|
222
|
-
/* @__PURE__ */ c.jsx(
|
|
223
|
-
J,
|
|
224
|
-
{
|
|
225
|
-
placement: "right",
|
|
226
|
-
dataList: v,
|
|
227
|
-
keys: S,
|
|
228
|
-
columnsMap: a,
|
|
229
|
-
onLeftClick: $,
|
|
230
|
-
onRightClick: P,
|
|
231
|
-
onChange: ce,
|
|
232
|
-
onMoveEnd: le
|
|
233
|
-
}
|
|
234
|
-
)
|
|
235
|
-
] })
|
|
236
|
-
] }),
|
|
237
|
-
/* @__PURE__ */ c.jsxs(xe, { size: 16, className: "scope", ref: Q, children: [
|
|
238
|
-
/* @__PURE__ */ c.jsx(
|
|
239
|
-
ge,
|
|
240
|
-
{
|
|
241
|
-
indeterminate: fe,
|
|
242
|
-
checked: de,
|
|
243
|
-
onChange: ae,
|
|
244
|
-
children: /* @__PURE__ */ c.jsx("span", { style: { whiteSpace: "nowrap" }, children: "全选" })
|
|
245
|
-
}
|
|
246
|
-
),
|
|
247
|
-
/* @__PURE__ */ c.jsx(
|
|
248
|
-
Ce,
|
|
249
|
-
{
|
|
250
|
-
type: "link",
|
|
251
|
-
icon: /* @__PURE__ */ c.jsx(ve, {}),
|
|
252
|
-
size: "small",
|
|
253
|
-
onClick: ue,
|
|
254
|
-
className: me`
|
|
105
|
+
});
|
|
106
|
+
const c = t.findIndex((y) => y.key === e), l = t.splice(c, 1)[0];
|
|
107
|
+
D([...R, { ...l, fixed: "right" }]);
|
|
108
|
+
const C = n.splice(c, 1);
|
|
109
|
+
return v([...M, ...C]), { map: s, list: t, keys: n };
|
|
110
|
+
}, $ = (e, s) => {
|
|
111
|
+
if (s === "left") {
|
|
112
|
+
const { map: t, list: n, keys: o } = X(e, h, b, L);
|
|
113
|
+
p({ ...t }), T([...n]), E([...o]);
|
|
114
|
+
} else if (s === "center") {
|
|
115
|
+
const { map: t, list: n, keys: o } = Y(e, u, N, w);
|
|
116
|
+
g({ ...t }), I([...n]), A([...o]);
|
|
117
|
+
} else {
|
|
118
|
+
const { map: t, list: n, keys: o } = Y(e, a, R, M);
|
|
119
|
+
x({ ...t }), D([...n]), v([...o]);
|
|
120
|
+
}
|
|
121
|
+
}, P = (e, s) => {
|
|
122
|
+
if (s === "left") {
|
|
123
|
+
const { map: t, list: n, keys: o } = Z(e, h, b, L);
|
|
124
|
+
p({ ...t }), T([...n]), E([...o]);
|
|
125
|
+
} else if (s === "center") {
|
|
126
|
+
const { map: t, list: n, keys: o } = Z(e, u, N, w);
|
|
127
|
+
g({ ...t }), I([...n]), A([...o]);
|
|
128
|
+
} else {
|
|
129
|
+
const { map: t, list: n, keys: o } = X(e, a, R, M);
|
|
130
|
+
x({ ...t }), D([...n]), v([...o]);
|
|
131
|
+
}
|
|
132
|
+
}, ae = ({ target: e }) => {
|
|
133
|
+
e.checked ? (p(j(h, "show", !0)), g(j(u, "show", !0)), x(j(a, "show", !0))) : (p(j(h, "show", !1)), g(j(u, "show", !1)), x(j(a, "show", !1)));
|
|
134
|
+
}, B = k(() => [...L, ...w, ...M], [L, w, M]), S = k(() => {
|
|
135
|
+
var s, t, n;
|
|
136
|
+
const e = [];
|
|
137
|
+
for (const o in h)
|
|
138
|
+
(s = h[o]) != null && s.show && e.push(o);
|
|
139
|
+
for (const o in u)
|
|
140
|
+
(t = u[o]) != null && t.show && e.push(o);
|
|
141
|
+
for (const o in a)
|
|
142
|
+
(n = a[o]) != null && n.show && e.push(o);
|
|
143
|
+
return e;
|
|
144
|
+
}, [h, u, a]), ue = k(() => B.length === S.length, [B, S]), de = k(() => S.length > 0 && S.length < B.length, [S, B]), fe = () => {
|
|
145
|
+
V({ ...se });
|
|
146
|
+
};
|
|
147
|
+
return Me(H, () => ({
|
|
148
|
+
getLeftSortColumns: () => h,
|
|
149
|
+
getCenterSortColumns: () => u,
|
|
150
|
+
getRightSortColumns: () => a,
|
|
151
|
+
getCheckedKeys: () => S
|
|
152
|
+
})), r.jsxs(z, { vertical: !0, gap: 16, style: te, children: [r.jsxs("div", { className: "sortContent", children: [r.jsxs(z, { vertical: !0, className: "sortCard", style: O, children: [r.jsx(q.Title, { level: 5, className: "title", children: "固定在左侧" }), r.jsx(J, { placement: "left", dataList: b, keys: L, columnsMap: h, onLeftClick: $, onRightClick: P, onChange: ne, onMoveEnd: ce })] }), r.jsxs(z, { vertical: !0, className: "sortCard", style: O, children: [r.jsx(q.Title, { level: 5, className: "title", children: "不固定" }), r.jsx(J, { placement: "center", dataList: N, keys: w, columnsMap: u, onLeftClick: $, onRightClick: P, onChange: ie, onMoveEnd: he })] }), r.jsxs(z, { vertical: !0, className: "sortCard", style: O, children: [r.jsx(q.Title, { level: 5, className: "title", children: "固定在右侧" }), r.jsx(J, { placement: "right", dataList: R, keys: M, columnsMap: a, onLeftClick: $, onRightClick: P, onChange: re, onMoveEnd: le })] })] }), r.jsxs(xe, { size: 16, className: "scope", ref: Q, children: [r.jsx(ge, { indeterminate: de, checked: ue, onChange: ae, children: r.jsx("span", { style: { whiteSpace: "nowrap" }, children: "全选" }) }), r.jsx(Ce, { type: "link", icon: r.jsx(Re, {}), size: "small", onClick: fe, className: me`
|
|
255
153
|
&:hover {
|
|
256
154
|
color: ${ee.colorPrimary} !important;
|
|
257
155
|
}
|
|
258
|
-
`,
|
|
259
|
-
|
|
260
|
-
}
|
|
261
|
-
)
|
|
262
|
-
] })
|
|
263
|
-
] });
|
|
264
|
-
}
|
|
265
|
-
), Ue = we(Re);
|
|
156
|
+
`, children: r.jsx("span", { style: { whiteSpace: "nowrap" }, children: "重置" }) })] })] });
|
|
157
|
+
}), Ue = we(Ne);
|
|
266
158
|
export {
|
|
267
159
|
Ue as default
|
|
268
160
|
};
|
|
@@ -37,19 +37,8 @@ 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
|
-
|
|
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({
|
|
40
|
+
const y = ({ item: r, onCheckboxChange: o, isDragOverlay: e }) => {
|
|
41
|
+
const { attributes: s, isDragging: i, setNodeRef: n, listeners: a, transform: l, transition: c } = j({
|
|
53
42
|
id: r == null ? void 0 : r.field
|
|
54
43
|
// disabled: item?.disabled,
|
|
55
44
|
}), { token: m } = x.useToken(), f = {
|
|
@@ -59,36 +48,21 @@ const R = ({
|
|
|
59
48
|
...i && {
|
|
60
49
|
opacity: 0.6
|
|
61
50
|
},
|
|
62
|
-
...
|
|
51
|
+
...e && {
|
|
63
52
|
backgroundColor: m.colorBgContainer
|
|
64
53
|
}
|
|
65
54
|
}, d = ({ target: g }) => {
|
|
66
55
|
o == null || o(r.field, g.checked);
|
|
67
56
|
};
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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);
|
|
57
|
+
return t.jsxs(p, { align: "center", className: S({ sortItemDragging: i }, "sortItem"), style: f, ref: n, ...s, children: [t.jsx(p, { align: "center", className: "dragIcon", ...a, children: t.jsx(N, { size: m.fontSize + 4 }) }), t.jsx(D, {
|
|
58
|
+
value: r.field,
|
|
59
|
+
checked: r.show,
|
|
60
|
+
onChange: d,
|
|
61
|
+
// className={checkboxCls}
|
|
62
|
+
title: r.title,
|
|
63
|
+
children: r.title
|
|
64
|
+
})] });
|
|
65
|
+
}, nr = u.memo(y);
|
|
92
66
|
export {
|
|
93
67
|
nr as default
|
|
94
68
|
};
|
|
@@ -1,53 +1,27 @@
|
|
|
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 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
|
};
|