@flozy/editor 5.2.5 → 5.2.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -22,6 +22,26 @@ const hideRowDragBtns = (hide, dragRowBtnCls) => {
|
|
22
22
|
rowDragBtns?.forEach(btn => btn.style.display = hide);
|
23
23
|
}
|
24
24
|
};
|
25
|
+
const ToolTableComponent = props => {
|
26
|
+
const {
|
27
|
+
handleAction,
|
28
|
+
editorTheme
|
29
|
+
} = props;
|
30
|
+
const {
|
31
|
+
updateTableSelection
|
32
|
+
} = useTable();
|
33
|
+
return /*#__PURE__*/_jsx("div", {
|
34
|
+
children: /*#__PURE__*/_jsx(TableTool, {
|
35
|
+
theme: editorTheme,
|
36
|
+
handleToolAction: (type, option) => {
|
37
|
+
handleAction(type, option);
|
38
|
+
if (type === "duplicate") {
|
39
|
+
updateTableSelection(getDefaultTableSelection());
|
40
|
+
}
|
41
|
+
}
|
42
|
+
})
|
43
|
+
});
|
44
|
+
};
|
25
45
|
const MoreTableSettings = props => {
|
26
46
|
const {
|
27
47
|
exandTools,
|
@@ -29,9 +49,6 @@ const MoreTableSettings = props => {
|
|
29
49
|
editorTheme,
|
30
50
|
setExpandTools
|
31
51
|
} = props;
|
32
|
-
const {
|
33
|
-
updateTableSelection
|
34
|
-
} = useTable();
|
35
52
|
const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
|
36
53
|
return isMobile ? /*#__PURE__*/_jsx(SwipeableDrawerComponent, {
|
37
54
|
open: Boolean(exandTools),
|
@@ -39,16 +56,9 @@ const MoreTableSettings = props => {
|
|
39
56
|
setExpandTools(false);
|
40
57
|
},
|
41
58
|
swipeableDrawer: false,
|
42
|
-
children: /*#__PURE__*/_jsx(
|
43
|
-
|
44
|
-
|
45
|
-
handleToolAction: (type, option) => {
|
46
|
-
handleAction(type, option);
|
47
|
-
if (type === "duplicate") {
|
48
|
-
updateTableSelection(getDefaultTableSelection());
|
49
|
-
}
|
50
|
-
}
|
51
|
-
})
|
59
|
+
children: /*#__PURE__*/_jsx(ToolTableComponent, {
|
60
|
+
handleAction: handleAction,
|
61
|
+
editorTheme: editorTheme
|
52
62
|
})
|
53
63
|
}) : /*#__PURE__*/_jsx(Popper, {
|
54
64
|
open: Boolean(exandTools),
|
@@ -60,16 +70,9 @@ const MoreTableSettings = props => {
|
|
60
70
|
placement: "bottom-start",
|
61
71
|
children: /*#__PURE__*/_jsx(ClickAwayListener, {
|
62
72
|
onClickAway: () => setExpandTools(false),
|
63
|
-
children: /*#__PURE__*/_jsx(
|
64
|
-
|
65
|
-
|
66
|
-
handleToolAction: (type, option) => {
|
67
|
-
handleAction(type, option);
|
68
|
-
if (type === "duplicate") {
|
69
|
-
updateTableSelection(getDefaultTableSelection());
|
70
|
-
}
|
71
|
-
}
|
72
|
-
})
|
73
|
+
children: /*#__PURE__*/_jsx(ToolTableComponent, {
|
74
|
+
handleAction: handleAction,
|
75
|
+
editorTheme: editorTheme
|
73
76
|
})
|
74
77
|
})
|
75
78
|
});
|