bitz-react-admin-ui 2.1.8 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/dayjs.min.mjs +2 -5
- package/dist/_virtual/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- package/dist/components/BitzCalendar/index.mjs +1 -1
- package/dist/components/BitzDayJs/index.mjs +1 -1
- package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +1 -1
- package/dist/components/BitzFuiCalendar/ColumnData.mjs +1 -1
- package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
- package/dist/components/BitzMeetingTime/index.mjs +1 -1
- package/dist/components/BitzTable/ActionBar/ActionBar.mjs +26 -22
- package/dist/components/BitzTable/ActionCol/index.d.ts +1 -1
- package/dist/components/BitzTable/ActionCol/index.mjs +61 -61
- package/dist/components/BitzTable/SelectionBar/Button.d.ts +2 -3
- package/dist/components/BitzTable/SelectionBar/Button.mjs +19 -25
- package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +24 -21
- package/dist/components/BitzTable/Store/index.d.ts +43 -22
- package/dist/components/BitzTable/Store/index.mjs +128 -125
- package/dist/components/BitzTable/Store/utils/index.d.ts +4 -5
- package/dist/components/BitzTable/Store/utils/index.mjs +31 -31
- package/dist/components/BitzTable/SubTable/index.d.ts +21 -0
- package/dist/components/BitzTable/SubTable/index.mjs +149 -0
- package/dist/components/BitzTable/Table/SortTableContext.d.ts +12 -0
- package/dist/components/BitzTable/Table/SortTableContext.mjs +25 -0
- package/dist/components/BitzTable/Table/SortableRow.d.ts +7 -0
- package/dist/components/BitzTable/Table/SortableRow.mjs +54 -0
- package/dist/components/BitzTable/Table/index.d.ts +5 -0
- package/dist/components/BitzTable/Table/index.mjs +277 -255
- package/dist/components/BitzTable/Table/utils.mjs +17 -16
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.d.ts +1 -0
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +84 -97
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.d.ts +5 -4
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +66 -60
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +78 -72
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.d.ts +1 -3
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +190 -189
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.d.ts +8 -0
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +94 -0
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.d.ts +10 -0
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +58 -0
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +13 -7
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +119 -80
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.d.ts +2 -2
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +26 -29
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.d.ts +3 -1
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +53 -77
- package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.d.ts +2 -2
- package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.d.ts +12 -0
- package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +61 -0
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +50 -59
- package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +27 -32
- package/dist/components/BitzTable/ToolBar/Modal/index.d.ts +18 -0
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +50 -0
- package/dist/components/BitzTable/ToolBar/Modal/style.d.ts +2 -0
- package/dist/components/BitzTable/ToolBar/Modal/style.mjs +58 -0
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +20 -20
- package/dist/components/BitzTable/ToolBar/index.d.ts +12 -11
- package/dist/components/BitzTable/index.d.ts +4 -0
- package/dist/components/BitzTable/index.mjs +13 -11
- package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/MenuOutlined.mjs +5 -0
- package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/MenuOutlined.mjs +15 -0
- package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +1098 -753
- package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
- package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
- package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
- package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/WithFluent.mjs +16 -12
- package/dist/utils/findNode.d.ts +2 -2
- package/dist/utils/time.mjs +1 -1
- package/package.json +1 -1
- package/dist/_virtual/dayjs.min2.mjs +0 -4
- package/dist/components/BitzTable/Select/index.mjs +0 -11
- package/dist/components/BitzTable/Select/style.mjs +0 -66
- package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.mjs +0 -78
- package/dist/components/BitzTable/ToolBar/ExportIcon/styles.mjs +0 -47
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
import { j as f } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { Skeleton as x, Table as
|
|
3
|
-
function a(
|
|
4
|
-
return
|
|
2
|
+
import { Skeleton as x, Table as d } from "antd";
|
|
3
|
+
function a(i, r) {
|
|
4
|
+
return i == null ? void 0 : i.map((e) => {
|
|
5
5
|
const n = { ...e };
|
|
6
|
-
return e != null && e.isOperationCol || e != null && e.isCheckboxCol || e != null && e.isExpandIconCol || r.includes(e) ? e : (n != null && n.children && (n.children = a(n == null ? void 0 : n.children, r)), {
|
|
6
|
+
return e != null && e.isOperationCol || e != null && e.isDragSortCol || e != null && e.isCheckboxCol || e != null && e.isExpandIconCol || r.includes(e) ? e : (n != null && n.children && (n.children = a(n == null ? void 0 : n.children, r)), {
|
|
7
7
|
...n,
|
|
8
8
|
sorter: !1,
|
|
9
|
-
render: (
|
|
9
|
+
render: (t, l, o) => /* @__PURE__ */ f.jsx(
|
|
10
10
|
x,
|
|
11
11
|
{
|
|
12
12
|
active: !0,
|
|
13
13
|
title: !1,
|
|
14
14
|
paragraph: {
|
|
15
15
|
rows: 1,
|
|
16
|
-
width: (
|
|
16
|
+
width: (o + 1) % 2 === 0 ? "100%" : "60%"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
)
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
const C = 0,
|
|
24
|
-
function
|
|
25
|
-
|
|
23
|
+
const C = 0, s = 1;
|
|
24
|
+
function h(i, r, e, n) {
|
|
25
|
+
const t = [...r];
|
|
26
|
+
let l = C;
|
|
26
27
|
if (e) {
|
|
27
|
-
const
|
|
28
|
-
|
|
28
|
+
const o = (i ?? []).indexOf(d.SELECTION_COLUMN);
|
|
29
|
+
o >= 0 && (l = o), t.splice(l, 0, d.SELECTION_COLUMN);
|
|
29
30
|
}
|
|
30
31
|
if (n) {
|
|
31
|
-
let
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
let o = 0;
|
|
33
|
+
const c = (i ?? []).indexOf(d.EXPAND_COLUMN);
|
|
34
|
+
c >= 0 && (o = c), e && l === 0 && c === -1 && (o = s), t.splice(o, 0, d.EXPAND_COLUMN);
|
|
34
35
|
}
|
|
35
|
-
return
|
|
36
|
+
return t;
|
|
36
37
|
}
|
|
37
38
|
export {
|
|
38
|
-
|
|
39
|
+
h as getColumnsWithTool,
|
|
39
40
|
a as loopBuildSkeleton
|
|
40
41
|
};
|
|
@@ -8,5 +8,6 @@ export interface ColumnConfigModalProps {
|
|
|
8
8
|
onChange?: BitzTableToolBarProps['onColumnChange'];
|
|
9
9
|
getContainer: ModalProps['getContainer'];
|
|
10
10
|
}
|
|
11
|
+
export declare const exportConfigTitle = "\u5BFC\u51FA\u8BBE\u7F6E";
|
|
11
12
|
declare const ColumnConfigModal: FC<ColumnConfigModalProps>;
|
|
12
13
|
export default ColumnConfigModal;
|
|
@@ -1,122 +1,109 @@
|
|
|
1
1
|
import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { useState as m, useContext as
|
|
4
|
-
import { BitzTableContext as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
close: n,
|
|
2
|
+
import { Segmented as _, message as w } from "antd";
|
|
3
|
+
import { useState as m, useContext as H, useRef as j, useMemo as $ } from "react";
|
|
4
|
+
import { BitzTableContext as ee } from "../../Store/index.mjs";
|
|
5
|
+
import L from "../../../BitzButton/index.mjs";
|
|
6
|
+
import te from "../../../BitzTheme/index.mjs";
|
|
7
|
+
import oe from "./StylesConfig/index.mjs";
|
|
8
|
+
import re from "./ColumnsSort/index.mjs";
|
|
9
|
+
import se from "./ExportConfig/index.mjs";
|
|
10
|
+
import { BitzConfigContext as ne } from "../../../BitzConfigProvider/context.mjs";
|
|
11
|
+
import le from "../Modal/index.mjs";
|
|
12
|
+
import ie from "../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
|
|
13
|
+
import ae from "../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
|
|
14
|
+
const fe = "导出设置", he = ({
|
|
15
|
+
open: A,
|
|
16
|
+
title: D,
|
|
17
|
+
onChange: n,
|
|
18
|
+
close: l,
|
|
20
19
|
getContainer: I
|
|
21
20
|
}) => {
|
|
22
|
-
const { token:
|
|
21
|
+
const { token: T } = te.useToken(), [i, a] = m(1), [q, c] = m(!1);
|
|
23
22
|
m(!1);
|
|
24
|
-
const [
|
|
25
|
-
persistenceType:
|
|
26
|
-
persistenceKey:
|
|
27
|
-
onlineChange:
|
|
28
|
-
setColumnsMap:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
exportStorageType:
|
|
35
|
-
exportStorageKey:
|
|
36
|
-
setTableExportConfig:
|
|
37
|
-
onlineExportConfigChange:
|
|
38
|
-
} =
|
|
39
|
-
var
|
|
40
|
-
if (
|
|
23
|
+
const [G, o] = m(!1), {
|
|
24
|
+
persistenceType: J,
|
|
25
|
+
persistenceKey: R,
|
|
26
|
+
onlineChange: u,
|
|
27
|
+
setColumnsMap: N,
|
|
28
|
+
stylesStorageType: P,
|
|
29
|
+
stylesStorageKey: b,
|
|
30
|
+
setTableStylesConfig: p,
|
|
31
|
+
onlineStylesConfigChange: d,
|
|
32
|
+
defaultTableExportConfig: Q,
|
|
33
|
+
exportStorageType: U,
|
|
34
|
+
exportStorageKey: h,
|
|
35
|
+
setTableExportConfig: W,
|
|
36
|
+
onlineExportConfigChange: g
|
|
37
|
+
} = H(ee), r = H(ne).Table, s = j(null), k = j(null), x = j(null), X = async () => {
|
|
38
|
+
var v, z, B, E, F, K, M, O, V;
|
|
39
|
+
if (G)
|
|
41
40
|
return;
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
if (!(
|
|
45
|
-
a(2),
|
|
41
|
+
o(!0);
|
|
42
|
+
const t = (v = s.current) == null ? void 0 : v.getCheckedKeys();
|
|
43
|
+
if (!(t != null && t.length)) {
|
|
44
|
+
a(2), w.error("表格至少需要显示一列"), o(!1);
|
|
46
45
|
return;
|
|
47
46
|
}
|
|
48
|
-
if (!((
|
|
49
|
-
a(3),
|
|
47
|
+
if (!((z = x.current) == null ? void 0 : z.hasOne())) {
|
|
48
|
+
a(3), w.error("导出设置至少需要一个字段"), o(!1);
|
|
50
49
|
return;
|
|
51
50
|
}
|
|
52
|
-
const
|
|
53
|
-
...(
|
|
54
|
-
...(
|
|
55
|
-
...(
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
return
|
|
66
|
-
|
|
67
|
-
}, [u]), /* @__PURE__ */ e.jsx(
|
|
68
|
-
re,
|
|
51
|
+
const y = (B = k.current) == null ? void 0 : B.getFormInstance(), f = await (y == null ? void 0 : y.getFieldsValue()), Z = ae(f, "stylesScope"), C = {
|
|
52
|
+
...(E = s.current) == null ? void 0 : E.getLeftSortColumns(),
|
|
53
|
+
...(F = s.current) == null ? void 0 : F.getCenterSortColumns(),
|
|
54
|
+
...(K = s.current) == null ? void 0 : K.getRightSortColumns()
|
|
55
|
+
}, S = ((M = x.current) == null ? void 0 : M.getExportConfig()) ?? Q;
|
|
56
|
+
p == null || p(Z), (O = r == null ? void 0 : r.setStylesScope) == null || O.call(r, f.stylesScope ? "global" : "current"), N(C), W(S), P === "online" && b && (d == null || d(b, f)), J === "online" && R && (u == null || u(R, C)), U === "online" && h && (g == null || g(h, S)), o(!1), n ? (c(!0), (V = n == null ? void 0 : n(f, C, S)) == null || V.finally(() => {
|
|
57
|
+
c(!1), l();
|
|
58
|
+
})) : l();
|
|
59
|
+
};
|
|
60
|
+
$(() => T.mode === "dark", [T.mode]);
|
|
61
|
+
const Y = () => {
|
|
62
|
+
a(1), c(!1), o(!1);
|
|
63
|
+
};
|
|
64
|
+
return /* @__PURE__ */ e.jsx(
|
|
65
|
+
le,
|
|
69
66
|
{
|
|
70
|
-
|
|
71
|
-
title:
|
|
72
|
-
|
|
67
|
+
open: A,
|
|
68
|
+
title: D,
|
|
69
|
+
close: l,
|
|
70
|
+
closeAfter: Y,
|
|
73
71
|
getContainer: I,
|
|
74
|
-
open: u,
|
|
75
|
-
onCancel: n,
|
|
76
|
-
style: {
|
|
77
|
-
"--sortCard-bgColor": c ? "#444" : "#f2f2f2",
|
|
78
|
-
"--sortCard-titleColor": c ? "#ccc" : "#777",
|
|
79
|
-
"--radioCard-bgColor": c ? "#444" : "#F2F2F2",
|
|
80
|
-
"--radioCard-bgHoverColor": c ? "#333" : l.colorBgContainer
|
|
81
|
-
},
|
|
82
|
-
styles: { body: { maxHeight: window.innerHeight - 300 } },
|
|
83
|
-
width: 700,
|
|
84
72
|
footer: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
85
73
|
/* @__PURE__ */ e.jsx(
|
|
86
|
-
|
|
74
|
+
L,
|
|
87
75
|
{
|
|
88
76
|
type: "primary",
|
|
89
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
90
|
-
onClick:
|
|
91
|
-
loading:
|
|
77
|
+
icon: /* @__PURE__ */ e.jsx(ie, {}),
|
|
78
|
+
onClick: X,
|
|
79
|
+
loading: q,
|
|
92
80
|
children: "保存"
|
|
93
81
|
}
|
|
94
82
|
),
|
|
95
|
-
/* @__PURE__ */ e.jsx(
|
|
83
|
+
/* @__PURE__ */ e.jsx(L, { onClick: l, children: "取消" })
|
|
96
84
|
] }),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
/* @__PURE__ */ e.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
/* @__PURE__ */ e.jsx(pe, { ref: x, display: i === 3 })
|
|
115
|
-
] })
|
|
85
|
+
extra: /* @__PURE__ */ e.jsx(
|
|
86
|
+
_,
|
|
87
|
+
{
|
|
88
|
+
size: "large",
|
|
89
|
+
options: [
|
|
90
|
+
{ label: "外观设置", value: 1 },
|
|
91
|
+
{ label: "列设置", value: 2 },
|
|
92
|
+
{ label: fe, value: 3 }
|
|
93
|
+
],
|
|
94
|
+
value: i,
|
|
95
|
+
onChange: a
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
children: (t) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
99
|
+
/* @__PURE__ */ e.jsx(oe, { ref: k, display: i === 1 }),
|
|
100
|
+
/* @__PURE__ */ e.jsx(re, { parentHeight: t, ref: s, display: i === 2 }),
|
|
101
|
+
/* @__PURE__ */ e.jsx(se, { parentHeight: t, refInstance: x, display: i === 3, showSelectRadio: !1 })
|
|
116
102
|
] })
|
|
117
103
|
}
|
|
118
104
|
);
|
|
119
105
|
};
|
|
120
106
|
export {
|
|
121
|
-
|
|
107
|
+
he as default,
|
|
108
|
+
fe as exportConfigTitle
|
|
122
109
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface DndItemProps {
|
|
3
|
-
placement
|
|
3
|
+
placement?: 'left' | 'center' | 'right';
|
|
4
4
|
item: any;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
isDragOverlay?: boolean;
|
|
6
|
+
onLeftClick?: (key: any, placement: 'left' | 'center' | 'right') => void;
|
|
7
|
+
onRightClick?: (key: any, placement: 'left' | 'center' | 'right') => void;
|
|
8
|
+
onCheckboxChange?: (key: any, checked: boolean) => void;
|
|
8
9
|
}
|
|
9
10
|
declare const _default: React.NamedExoticComponent<DndItemProps>;
|
|
10
11
|
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as o } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import
|
|
3
|
-
import { useSortable as
|
|
4
|
-
import { CSS as
|
|
5
|
-
import { Flex as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
2
|
+
import F, { useState as v, useMemo as M } from "react";
|
|
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 _ } from "../../../../../node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
|
|
5
|
+
import { theme as I, Flex as d, Checkbox as k, Tooltip as $ } from "antd";
|
|
6
|
+
import q from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
7
|
+
import A from "../../../../../assets/iconfont/IconDragOrder.mjs";
|
|
8
|
+
import x from "../../../../../assets/iconfont/IconColumnFixedLeft.mjs";
|
|
9
|
+
import g from "../../../../../assets/iconfont/IconColumnFixedRight.mjs";
|
|
10
|
+
import h from "../../../../../assets/iconfont/IconColumnCancelFixed.mjs";
|
|
11
11
|
import "../../../../../assets/iconfont/IconMore.mjs";
|
|
12
12
|
import "../../../../../assets/iconfont/IconIcFluentHomeRegular.mjs";
|
|
13
13
|
import "../../../../../assets/iconfont/IconKuansongde.mjs";
|
|
@@ -37,46 +37,53 @@ 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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
const j = ({ icon: t, className: n, open: r, title: e, onClick: i }) => {
|
|
41
|
+
const { token: s } = I.useToken();
|
|
42
|
+
return /* @__PURE__ */ o.jsx(
|
|
43
|
+
$,
|
|
44
|
+
{
|
|
45
|
+
getTooltipContainer: (p) => p.parentElement,
|
|
46
|
+
title: e,
|
|
47
|
+
open: r ? !1 : void 0,
|
|
48
|
+
children: /* @__PURE__ */ o.jsx(t, { size: s.fontSize + 4, className: n, onClick: i })
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}, B = ({
|
|
49
52
|
item: t,
|
|
53
|
+
isDragOverlay: n,
|
|
50
54
|
placement: r,
|
|
51
55
|
onLeftClick: e,
|
|
52
56
|
onRightClick: i,
|
|
53
|
-
onCheckboxChange:
|
|
57
|
+
onCheckboxChange: s
|
|
54
58
|
}) => {
|
|
55
59
|
const {
|
|
56
|
-
attributes:
|
|
60
|
+
attributes: p,
|
|
57
61
|
isDragging: m,
|
|
58
|
-
setNodeRef:
|
|
59
|
-
listeners:
|
|
60
|
-
transform:
|
|
61
|
-
transition:
|
|
62
|
-
} =
|
|
62
|
+
setNodeRef: S,
|
|
63
|
+
listeners: y,
|
|
64
|
+
transform: N,
|
|
65
|
+
transition: T
|
|
66
|
+
} = O({
|
|
63
67
|
id: t == null ? void 0 : t.key
|
|
64
68
|
// disabled: item?.disabled,
|
|
65
|
-
}),
|
|
66
|
-
transition:
|
|
67
|
-
transform:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
}), { token: w } = I.useToken(), z = {
|
|
70
|
+
transition: T,
|
|
71
|
+
transform: _.Transform.toString(N),
|
|
72
|
+
...m && {
|
|
73
|
+
opacity: 0.6
|
|
74
|
+
}
|
|
75
|
+
}, D = ({ target: l }) => {
|
|
76
|
+
s == null || s(t.key, l.checked);
|
|
77
|
+
}, [a, E] = v(!1), c = (l) => {
|
|
78
|
+
E(l);
|
|
79
|
+
}, { text: f, icon: u } = M(() => r === "left" ? {
|
|
73
80
|
text: {
|
|
74
81
|
left: "取消固定",
|
|
75
82
|
right: "固定在右侧"
|
|
76
83
|
},
|
|
77
84
|
icon: {
|
|
78
|
-
left:
|
|
79
|
-
right:
|
|
85
|
+
left: h,
|
|
86
|
+
right: g
|
|
80
87
|
}
|
|
81
88
|
} : r === "center" ? {
|
|
82
89
|
text: {
|
|
@@ -84,8 +91,8 @@ const d = ({ icon: t, className: r, open: e, title: i, onClick: n }) => /* @__PU
|
|
|
84
91
|
right: "固定在右侧"
|
|
85
92
|
},
|
|
86
93
|
icon: {
|
|
87
|
-
left:
|
|
88
|
-
right:
|
|
94
|
+
left: x,
|
|
95
|
+
right: g
|
|
89
96
|
}
|
|
90
97
|
} : {
|
|
91
98
|
text: {
|
|
@@ -93,59 +100,58 @@ const d = ({ icon: t, className: r, open: e, title: i, onClick: n }) => /* @__PU
|
|
|
93
100
|
right: "取消固定"
|
|
94
101
|
},
|
|
95
102
|
icon: {
|
|
96
|
-
left:
|
|
97
|
-
right:
|
|
103
|
+
left: x,
|
|
104
|
+
right: h
|
|
98
105
|
}
|
|
99
106
|
}, [r]);
|
|
100
107
|
return /* @__PURE__ */ o.jsxs(
|
|
101
|
-
|
|
108
|
+
"div",
|
|
102
109
|
{
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
ref: u,
|
|
110
|
+
className: q({ sortItemDragging: m }, "sortItem", { showSortItemOperat: a && !n }),
|
|
111
|
+
style: z,
|
|
112
|
+
ref: S,
|
|
107
113
|
onMouseEnter: () => c(!0),
|
|
108
114
|
onMouseLeave: () => c(!1),
|
|
109
|
-
...
|
|
115
|
+
...p,
|
|
110
116
|
children: [
|
|
111
|
-
/* @__PURE__ */ o.jsx(
|
|
117
|
+
/* @__PURE__ */ o.jsx(d, { align: "center", className: "dragIcon", ...y, children: /* @__PURE__ */ o.jsx(A, { size: w.fontSize + 4 }) }),
|
|
112
118
|
/* @__PURE__ */ o.jsx(
|
|
113
|
-
|
|
119
|
+
k,
|
|
114
120
|
{
|
|
115
121
|
checked: t.show,
|
|
116
|
-
onChange:
|
|
122
|
+
onChange: D,
|
|
117
123
|
title: t.title,
|
|
118
124
|
children: t.title
|
|
119
125
|
}
|
|
120
126
|
),
|
|
121
127
|
/* @__PURE__ */ o.jsxs(
|
|
122
|
-
|
|
128
|
+
d,
|
|
123
129
|
{
|
|
124
130
|
style: {
|
|
125
131
|
height: "100%",
|
|
126
|
-
display:
|
|
132
|
+
display: a && !n ? "flex" : "none"
|
|
127
133
|
},
|
|
128
134
|
align: "center",
|
|
129
135
|
className: "operation pointerCursor",
|
|
130
136
|
children: [
|
|
131
137
|
/* @__PURE__ */ o.jsx(
|
|
132
|
-
|
|
138
|
+
j,
|
|
133
139
|
{
|
|
134
140
|
className: "leftOperation",
|
|
135
|
-
title:
|
|
141
|
+
title: f.left,
|
|
136
142
|
open: m,
|
|
137
|
-
icon:
|
|
138
|
-
onClick: () => e(t.key, r)
|
|
143
|
+
icon: u.left,
|
|
144
|
+
onClick: () => e == null ? void 0 : e(t.key, r)
|
|
139
145
|
}
|
|
140
146
|
),
|
|
141
147
|
/* @__PURE__ */ o.jsx(
|
|
142
|
-
|
|
148
|
+
j,
|
|
143
149
|
{
|
|
144
150
|
className: "rightOperation",
|
|
145
|
-
title:
|
|
151
|
+
title: f.right,
|
|
146
152
|
open: m,
|
|
147
|
-
icon:
|
|
148
|
-
onClick: () => i(t.key, r)
|
|
153
|
+
icon: u.right,
|
|
154
|
+
onClick: () => i == null ? void 0 : i(t.key, r)
|
|
149
155
|
}
|
|
150
156
|
)
|
|
151
157
|
]
|
|
@@ -154,7 +160,7 @@ const d = ({ icon: t, className: r, open: e, title: i, onClick: n }) => /* @__PU
|
|
|
154
160
|
]
|
|
155
161
|
}
|
|
156
162
|
);
|
|
157
|
-
},
|
|
163
|
+
}, Tt = F.memo(B);
|
|
158
164
|
export {
|
|
159
|
-
|
|
165
|
+
Tt as default
|
|
160
166
|
};
|