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,4 +1,13 @@
|
|
|
1
|
-
const F = ({
|
|
1
|
+
const F = ({
|
|
2
|
+
height: w,
|
|
3
|
+
token: i,
|
|
4
|
+
evenRowBgColor: y,
|
|
5
|
+
table: o,
|
|
6
|
+
gap: I,
|
|
7
|
+
borderColor: R,
|
|
8
|
+
scrollbarWidth: e,
|
|
9
|
+
other: u
|
|
10
|
+
}) => {
|
|
2
11
|
var h, g, r, x, n, T, p, s, d, $, m, H, C, S, f, c, k, z, B, v;
|
|
3
12
|
return {
|
|
4
13
|
height: w,
|
|
@@ -7,10 +7,17 @@ function I(t) {
|
|
|
7
7
|
return e != null && e.isOperationCol || e != null && e.isCheckboxCol || e != null && e.isExpandIconCol || u.includes(e) ? e : (o != null && o.children && (o.children = I(o == null ? void 0 : o.children)), {
|
|
8
8
|
...o,
|
|
9
9
|
sorter: !1,
|
|
10
|
-
render: (r, i, l) => a.jsx(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
render: (r, i, l) => /* @__PURE__ */ a.jsx(
|
|
11
|
+
p,
|
|
12
|
+
{
|
|
13
|
+
active: !0,
|
|
14
|
+
title: !1,
|
|
15
|
+
paragraph: {
|
|
16
|
+
rows: 1,
|
|
17
|
+
width: (l + 1) % 2 === 0 ? "100%" : "60%"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
)
|
|
14
21
|
});
|
|
15
22
|
});
|
|
16
23
|
}
|
|
@@ -15,9 +15,18 @@ const c = "-", m = a`
|
|
|
15
15
|
}
|
|
16
16
|
`, f = ({ value: o, children: s }) => {
|
|
17
17
|
const t = e(() => o || c, [o]), i = e(() => r ? { open: !1 } : { title: t }, [r, t]);
|
|
18
|
-
return p.jsx(
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
return /* @__PURE__ */ p.jsx(
|
|
19
|
+
l.Text,
|
|
20
|
+
{
|
|
21
|
+
ellipsis: {
|
|
22
|
+
tooltip: i
|
|
23
|
+
},
|
|
24
|
+
style: { fontSize: "inherit", width: "100%" },
|
|
25
|
+
copyable: !!o,
|
|
26
|
+
className: m,
|
|
27
|
+
children: s || t
|
|
28
|
+
}
|
|
29
|
+
);
|
|
21
30
|
}, T = n(f);
|
|
22
31
|
export {
|
|
23
32
|
T as default
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as e } from "../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { Segmented as _, message as
|
|
3
|
-
import { useState as a, useContext as
|
|
2
|
+
import { Segmented as _, message as F } from "antd";
|
|
3
|
+
import { useState as a, useContext as L, useRef as j, useMemo as $ } from "react";
|
|
4
4
|
import { BitzTableContext as ee } from "../../Store/index.mjs";
|
|
5
5
|
import A from "../../../BitzButton/index.mjs";
|
|
6
6
|
import te from "../../../BitzTheme/index.mjs";
|
|
@@ -11,29 +11,49 @@ import { BitzConfigContext as ne } from "../../../BitzConfigProvider/context.mjs
|
|
|
11
11
|
import le from "../Modal/index.mjs";
|
|
12
12
|
import ie from "../../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
|
|
13
13
|
import fe from "../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
|
|
14
|
-
const ae = "导出设置", ke = ({
|
|
14
|
+
const ae = "导出设置", ke = ({
|
|
15
|
+
open: D,
|
|
16
|
+
title: I,
|
|
17
|
+
onChange: s,
|
|
18
|
+
close: n,
|
|
19
|
+
getContainer: q
|
|
20
|
+
}) => {
|
|
15
21
|
const { token: T } = te.useToken(), [l, i] = a(1), [G, m] = a(!1);
|
|
16
22
|
a(!1);
|
|
17
|
-
const [H, t] = a(!1), {
|
|
18
|
-
|
|
23
|
+
const [H, t] = a(!1), {
|
|
24
|
+
persistenceType: J,
|
|
25
|
+
persistenceKey: R,
|
|
26
|
+
onlineChange: c,
|
|
27
|
+
setColumnsMap: N,
|
|
28
|
+
stylesStorageType: P,
|
|
29
|
+
stylesStorageKey: b,
|
|
30
|
+
setTableStylesConfig: u,
|
|
31
|
+
onlineStylesConfigChange: p,
|
|
32
|
+
defaultTableExportConfig: Q,
|
|
33
|
+
exportStorageType: U,
|
|
34
|
+
exportStorageKey: k,
|
|
35
|
+
setTableExportConfig: W,
|
|
36
|
+
onlineExportConfigChange: d
|
|
37
|
+
} = L(ee), o = L(ne).Table, r = j(null), h = j(null), g = j(null), X = async () => {
|
|
38
|
+
var v, z, B, E, K, M, O, V, w;
|
|
19
39
|
if (H)
|
|
20
40
|
return;
|
|
21
41
|
t(!0);
|
|
22
|
-
const x = (
|
|
42
|
+
const x = (v = r.current) == null ? void 0 : v.getCheckedKeys();
|
|
23
43
|
if (!(x != null && x.length)) {
|
|
24
|
-
i(2),
|
|
44
|
+
i(2), F.error("表格至少需要显示一列"), t(!1);
|
|
25
45
|
return;
|
|
26
46
|
}
|
|
27
|
-
if (!((
|
|
28
|
-
i(3),
|
|
47
|
+
if (!((z = g.current) == null ? void 0 : z.hasOne())) {
|
|
48
|
+
i(3), F.error("导出设置至少需要一个字段"), t(!1);
|
|
29
49
|
return;
|
|
30
50
|
}
|
|
31
|
-
const y = (
|
|
32
|
-
...(
|
|
33
|
-
...(
|
|
34
|
-
...(
|
|
35
|
-
}, S = ((
|
|
36
|
-
|
|
51
|
+
const y = (B = h.current) == null ? void 0 : B.getFormInstance(), f = await (y == null ? void 0 : y.getFieldsValue()), Z = fe(f, "stylesScope"), C = {
|
|
52
|
+
...(E = r.current) == null ? void 0 : E.getLeftSortColumns(),
|
|
53
|
+
...(K = r.current) == null ? void 0 : K.getCenterSortColumns(),
|
|
54
|
+
...(M = r.current) == null ? void 0 : M.getRightSortColumns()
|
|
55
|
+
}, S = ((O = g.current) == null ? void 0 : O.getExportConfig()) ?? Q;
|
|
56
|
+
u == null || u(Z), (V = o == null ? void 0 : o.setStylesScope) == null || V.call(o, f.stylesScope ? "global" : "current"), N(C), W(S), P === "online" && b && (p == null || p(b, f)), J === "online" && R && (c == null || c(R, C)), U === "online" && k && (d == null || d(k, S)), t(!1), s ? (m(!0), (w = s == null ? void 0 : s(f, C, S)) == null || w.finally(() => {
|
|
37
57
|
m(!1), n();
|
|
38
58
|
})) : n();
|
|
39
59
|
};
|
|
@@ -41,18 +61,54 @@ const ae = "导出设置", ke = ({ open: L, title: I, onChange: s, close: n, get
|
|
|
41
61
|
const Y = () => {
|
|
42
62
|
i(1), m(!1), t(!1);
|
|
43
63
|
};
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
64
|
+
return /* @__PURE__ */ e.jsxs(
|
|
65
|
+
le,
|
|
66
|
+
{
|
|
67
|
+
open: D,
|
|
68
|
+
title: I,
|
|
69
|
+
close: n,
|
|
70
|
+
closeAfter: Y,
|
|
71
|
+
getContainer: q,
|
|
72
|
+
footer: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
73
|
+
/* @__PURE__ */ e.jsx(
|
|
74
|
+
A,
|
|
75
|
+
{
|
|
76
|
+
type: "primary",
|
|
77
|
+
icon: /* @__PURE__ */ e.jsx(ie, {}),
|
|
78
|
+
onClick: X,
|
|
79
|
+
loading: G,
|
|
80
|
+
children: "保存"
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ e.jsx(A, { onClick: n, children: "取消" })
|
|
84
|
+
] }),
|
|
85
|
+
extra: /* @__PURE__ */ e.jsx(
|
|
86
|
+
_,
|
|
87
|
+
{
|
|
88
|
+
size: "large",
|
|
89
|
+
options: [
|
|
90
|
+
{ label: "外观设置", value: 1 },
|
|
91
|
+
{ label: "列设置", value: 2 },
|
|
92
|
+
{ label: ae, value: 3 }
|
|
93
|
+
],
|
|
94
|
+
value: l,
|
|
95
|
+
onChange: i
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ e.jsx(oe, { ref: h, display: l === 1 }),
|
|
100
|
+
/* @__PURE__ */ e.jsx(re, { ref: r, display: l === 2 }),
|
|
101
|
+
/* @__PURE__ */ e.jsx(
|
|
102
|
+
se,
|
|
103
|
+
{
|
|
104
|
+
refInstance: g,
|
|
105
|
+
display: l === 3,
|
|
106
|
+
showSelectRadio: !1
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
);
|
|
56
112
|
};
|
|
57
113
|
export {
|
|
58
114
|
ke as default,
|
|
@@ -1,29 +1,58 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as e } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import F, { useState as E, useMemo as M } from "react";
|
|
3
3
|
import { useSortable as O } 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 j, Flex as
|
|
4
|
+
import { CSS as v } from "../../../../../node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
|
|
5
|
+
import { theme as j, Flex as d, Checkbox as _, Tooltip as k } from "antd";
|
|
6
6
|
import $ from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
7
7
|
import q from "../../../../../assets/iconfont/IconDragOrder.mjs";
|
|
8
8
|
import u from "../../../../../assets/iconfont/IconColumnFixedLeft.mjs";
|
|
9
9
|
import x from "../../../../../assets/iconfont/IconColumnFixedRight.mjs";
|
|
10
10
|
import g from "../../../../../assets/iconfont/IconColumnCancelFixed.mjs";
|
|
11
|
-
const h = ({ icon:
|
|
11
|
+
const h = ({ icon: t, className: i, open: o, title: r, onClick: s }) => {
|
|
12
12
|
const { token: n } = j.useToken();
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
return /* @__PURE__ */ e.jsx(
|
|
14
|
+
k,
|
|
15
|
+
{
|
|
16
|
+
getTooltipContainer: (a) => a.parentElement,
|
|
17
|
+
title: r,
|
|
18
|
+
open: o ? !1 : void 0,
|
|
19
|
+
children: /* @__PURE__ */ e.jsx(
|
|
20
|
+
t,
|
|
21
|
+
{
|
|
22
|
+
size: n.fontSize + 4,
|
|
23
|
+
className: i,
|
|
24
|
+
onClick: s
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}, A = ({
|
|
30
|
+
item: t,
|
|
31
|
+
isDragOverlay: i,
|
|
32
|
+
placement: o,
|
|
33
|
+
onLeftClick: r,
|
|
34
|
+
onRightClick: s,
|
|
35
|
+
onCheckboxChange: n
|
|
36
|
+
}) => {
|
|
37
|
+
const {
|
|
38
|
+
attributes: a,
|
|
39
|
+
isDragging: l,
|
|
40
|
+
setNodeRef: I,
|
|
41
|
+
listeners: y,
|
|
42
|
+
transform: S,
|
|
43
|
+
transition: N
|
|
44
|
+
} = O({
|
|
45
|
+
id: t == null ? void 0 : t.key
|
|
17
46
|
// disabled: item?.disabled,
|
|
18
47
|
}), { token: T } = j.useToken(), w = {
|
|
19
48
|
transition: N,
|
|
20
|
-
transform:
|
|
49
|
+
transform: v.Transform.toString(S),
|
|
21
50
|
...l && {
|
|
22
51
|
opacity: 0.6
|
|
23
52
|
}
|
|
24
53
|
}, z = ({ target: D }) => {
|
|
25
|
-
n == null || n(
|
|
26
|
-
}, [c, f] = E(!1), { text: m, icon:
|
|
54
|
+
n == null || n(t.key, D.checked);
|
|
55
|
+
}, [c, f] = E(!1), { text: m, icon: p } = M(() => o === "left" ? {
|
|
27
56
|
text: {
|
|
28
57
|
left: "取消固定",
|
|
29
58
|
right: "固定在右侧"
|
|
@@ -51,18 +80,70 @@ const h = ({ icon: e, className: i, open: o, title: r, onClick: s }) => {
|
|
|
51
80
|
right: g
|
|
52
81
|
}
|
|
53
82
|
}, [o]);
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
83
|
+
return /* @__PURE__ */ e.jsxs(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
className: $({ sortItemDragging: l }, "sortItem", {
|
|
87
|
+
showSortItemOperat: c && !i
|
|
88
|
+
}),
|
|
89
|
+
style: w,
|
|
90
|
+
ref: I,
|
|
91
|
+
onMouseEnter: () => f(!0),
|
|
92
|
+
onMouseLeave: () => f(!1),
|
|
93
|
+
...a,
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ e.jsx(d, { align: "center", className: "dragIcon", ...y, children: /* @__PURE__ */ e.jsx(
|
|
96
|
+
q,
|
|
97
|
+
{
|
|
98
|
+
size: T.fontSize + 4,
|
|
99
|
+
style: { opacity: c ? 1 : 0.3 }
|
|
100
|
+
}
|
|
101
|
+
) }),
|
|
102
|
+
/* @__PURE__ */ e.jsx(
|
|
103
|
+
_,
|
|
104
|
+
{
|
|
105
|
+
checked: t.show,
|
|
106
|
+
onChange: z,
|
|
107
|
+
title: t.title,
|
|
108
|
+
children: t.title
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ e.jsxs(
|
|
112
|
+
d,
|
|
113
|
+
{
|
|
114
|
+
style: {
|
|
115
|
+
height: "100%",
|
|
116
|
+
display: c && !i ? "flex" : "none"
|
|
117
|
+
},
|
|
118
|
+
align: "center",
|
|
119
|
+
className: "operation pointerCursor",
|
|
120
|
+
children: [
|
|
121
|
+
/* @__PURE__ */ e.jsx(
|
|
122
|
+
h,
|
|
123
|
+
{
|
|
124
|
+
className: "leftOperation",
|
|
125
|
+
title: m.left,
|
|
126
|
+
open: l,
|
|
127
|
+
icon: p.left,
|
|
128
|
+
onClick: () => r == null ? void 0 : r(t.key, o)
|
|
129
|
+
}
|
|
130
|
+
),
|
|
131
|
+
/* @__PURE__ */ e.jsx(
|
|
132
|
+
h,
|
|
133
|
+
{
|
|
134
|
+
className: "rightOperation",
|
|
135
|
+
title: m.right,
|
|
136
|
+
open: l,
|
|
137
|
+
icon: p.right,
|
|
138
|
+
onClick: () => s == null ? void 0 : s(t.key, o)
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
);
|
|
66
147
|
}, W = F.memo(A);
|
|
67
148
|
export {
|
|
68
149
|
W as default
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import { j as s } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { genColumnKey as
|
|
3
|
-
import { DndContext as
|
|
4
|
-
import { restrictToVerticalAxis as
|
|
5
|
-
import { SortableContext as N, verticalListSortingStrategy as O, arrayMove as
|
|
6
|
-
import { Flex as
|
|
7
|
-
import { useMemo as
|
|
8
|
-
import
|
|
2
|
+
import { genColumnKey as w, columnSort as S } from "../../../Store/utils/index.mjs";
|
|
3
|
+
import { DndContext as I, closestCenter as E, DragOverlay as K } from "../../../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
|
|
4
|
+
import { restrictToVerticalAxis as k, restrictToWindowEdges as A } from "../../../../../node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
|
|
5
|
+
import { SortableContext as N, verticalListSortingStrategy as O, arrayMove as T } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
|
|
6
|
+
import { Flex as F } from "antd";
|
|
7
|
+
import { useMemo as R, useState as V } from "react";
|
|
8
|
+
import u from "./DndItem.mjs";
|
|
9
9
|
import W from "../../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
|
|
10
|
-
const U = ({
|
|
11
|
-
|
|
10
|
+
const U = ({
|
|
11
|
+
placement: g,
|
|
12
|
+
dataList: t,
|
|
13
|
+
keys: d,
|
|
14
|
+
columnsMap: c,
|
|
15
|
+
onLeftClick: h,
|
|
16
|
+
onRightClick: p,
|
|
17
|
+
onChange: j,
|
|
18
|
+
onMoveEnd: v
|
|
19
|
+
}) => {
|
|
20
|
+
const x = R(() => {
|
|
12
21
|
const e = [];
|
|
13
|
-
return t != null && t.length && (t == null || t.map((
|
|
14
|
-
const { key:
|
|
22
|
+
return t != null && t.length && (t == null || t.map((r) => {
|
|
23
|
+
const { key: o, dataIndex: l, ...m } = r, a = w(r, [o || l].join("-")), n = c[a || "null"];
|
|
15
24
|
return e.push({
|
|
16
25
|
key: a,
|
|
17
26
|
...W(m, ["className"]),
|
|
@@ -19,29 +28,59 @@ const U = ({ placement: h, dataList: t, keys: d, columnsMap: c, onLeftClick: u,
|
|
|
19
28
|
disabled: (n == null ? void 0 : n.disabled) === !0,
|
|
20
29
|
show: n == null ? void 0 : n.show
|
|
21
30
|
}), n;
|
|
22
|
-
})), e.sort(
|
|
23
|
-
}, [c, t]), [i, f] = V(-1),
|
|
24
|
-
const { active:
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
const { over:
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
30
|
-
i !==
|
|
31
|
+
})), e.sort(S(c));
|
|
32
|
+
}, [c, t]), [i, f] = V(-1), y = (e) => {
|
|
33
|
+
const { active: r } = e;
|
|
34
|
+
r && f(r.data.current.sortable.index);
|
|
35
|
+
}, D = (e) => {
|
|
36
|
+
const { over: r } = e;
|
|
37
|
+
if (r) {
|
|
38
|
+
const o = r.data.current.sortable.index;
|
|
39
|
+
i !== o && (C(i, o), f(-1));
|
|
31
40
|
}
|
|
32
|
-
},
|
|
33
|
-
const
|
|
41
|
+
}, C = (e, r) => {
|
|
42
|
+
const o = {}, l = T(d, e, r);
|
|
34
43
|
l.forEach((m, a) => {
|
|
35
|
-
|
|
36
|
-
}),
|
|
37
|
-
}, b = (e,
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
o[m] = { ...c[m], order: a };
|
|
45
|
+
}), v(o, l);
|
|
46
|
+
}, b = (e, r) => {
|
|
47
|
+
const o = { ...c };
|
|
48
|
+
o[e] = { ...o[e], show: r }, j(
|
|
49
|
+
o
|
|
41
50
|
/*, newCheckedKeys*/
|
|
42
51
|
);
|
|
43
52
|
};
|
|
44
|
-
return
|
|
53
|
+
return /* @__PURE__ */ s.jsx(
|
|
54
|
+
I,
|
|
55
|
+
{
|
|
56
|
+
modifiers: [k, A],
|
|
57
|
+
collisionDetection: E,
|
|
58
|
+
onDragStart: y,
|
|
59
|
+
onDragEnd: D,
|
|
60
|
+
onDragCancel: () => f(-1),
|
|
61
|
+
children: /* @__PURE__ */ s.jsx(N, { items: d, strategy: O, children: /* @__PURE__ */ s.jsxs(F, { vertical: !0, className: "sortList", children: [
|
|
62
|
+
x.map((e) => /* @__PURE__ */ s.jsx(
|
|
63
|
+
u,
|
|
64
|
+
{
|
|
65
|
+
item: e,
|
|
66
|
+
placement: g,
|
|
67
|
+
onLeftClick: h,
|
|
68
|
+
onRightClick: p,
|
|
69
|
+
onCheckboxChange: b
|
|
70
|
+
},
|
|
71
|
+
e.key
|
|
72
|
+
)),
|
|
73
|
+
/* @__PURE__ */ s.jsx(K, { children: i !== -1 && /* @__PURE__ */ s.jsx(
|
|
74
|
+
u,
|
|
75
|
+
{
|
|
76
|
+
item: x[i],
|
|
77
|
+
isDragOverlay: !0
|
|
78
|
+
},
|
|
79
|
+
x[i].key
|
|
80
|
+
) })
|
|
81
|
+
] }) })
|
|
82
|
+
}
|
|
83
|
+
);
|
|
45
84
|
};
|
|
46
85
|
export {
|
|
47
86
|
U as default
|