@flozy/editor 5.2.5 → 5.2.6

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.
@@ -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("div", {
43
- children: /*#__PURE__*/_jsx(TableTool, {
44
- theme: editorTheme,
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("div", {
64
- children: /*#__PURE__*/_jsx(TableTool, {
65
- theme: editorTheme,
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
  });
@@ -190,8 +190,8 @@ const withHtml = editor => {
190
190
  }], {
191
191
  at: [0]
192
192
  });
193
- insertData(data);
194
193
  }
194
+ insertData(data);
195
195
  }, decoded);
196
196
  }
197
197
  } else if (html) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "5.2.5",
3
+ "version": "5.2.6",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"