@flozy/editor 4.3.4 → 4.3.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.
- package/dist/Editor/Elements/Button/EditorButton.js +4 -3
- package/dist/Editor/Elements/Embed/Video.js +1 -1
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +2 -2
- package/dist/Editor/Elements/FreeGrid/styles.js +2 -2
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -4
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +1 -1
- package/dist/Editor/common/RnD/ElementSettings/styles.js +1 -1
- package/dist/Editor/common/RnD/OptionsPopup/index.js +3 -10
- package/dist/Editor/common/RnD/OptionsPopup/style.js +4 -4
- package/dist/Editor/common/RnD/index.js +2 -3
- package/dist/Editor/utils/embed.js +16 -2
- package/package.json +1 -1
|
@@ -80,7 +80,9 @@ const EditorButton = props => {
|
|
|
80
80
|
window.open(refUrl, "_blank").focus();
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
|
-
const buttonProps = handleLinkType(refURl, linkType,
|
|
83
|
+
const buttonProps = handleLinkType(refURl, linkType, true,
|
|
84
|
+
// button functionalities have to work on both edit mode and normal mode
|
|
85
|
+
openInNewTab, handleTrigger);
|
|
84
86
|
const onMenuClick = val => () => {
|
|
85
87
|
switch (val) {
|
|
86
88
|
case "edit":
|
|
@@ -99,7 +101,7 @@ const EditorButton = props => {
|
|
|
99
101
|
}
|
|
100
102
|
};
|
|
101
103
|
const Toolbar = () => {
|
|
102
|
-
const btnProps = handleLinkType(refURl, linkType, true,
|
|
104
|
+
const btnProps = handleLinkType(refURl, linkType, true, openInNewTab, handleTrigger);
|
|
103
105
|
const hideOpenLink = linkType === "page" || !linkType;
|
|
104
106
|
return !readOnly ? /*#__PURE__*/_jsxs("div", {
|
|
105
107
|
className: "element-toolbar hr",
|
|
@@ -138,7 +140,6 @@ const EditorButton = props => {
|
|
|
138
140
|
border: 'none !important'
|
|
139
141
|
},
|
|
140
142
|
...btnProps,
|
|
141
|
-
target: openInNewTab ? "_blank" : "_self",
|
|
142
143
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
143
144
|
icon: "openLinkIcon"
|
|
144
145
|
})
|
|
@@ -278,11 +278,11 @@ const useFreeGridStyles = ({
|
|
|
278
278
|
},
|
|
279
279
|
sectionSettingsPopper: {
|
|
280
280
|
"&.style-settings-wrpr": {
|
|
281
|
-
|
|
281
|
+
maxHeight: "650px",
|
|
282
282
|
overflowY: "auto",
|
|
283
283
|
overflowX: "hidden",
|
|
284
284
|
padding: "8px 8px 12px 12px",
|
|
285
|
-
|
|
285
|
+
marginBottom: "12px"
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
});
|
|
@@ -13,7 +13,7 @@ import PopperHeader from "../PopperHeader";
|
|
|
13
13
|
import MiniColorPicker from "./MiniColorPicker";
|
|
14
14
|
import SelectAlignment from "./SelectAlignment";
|
|
15
15
|
import SelectFontSize from "./SelectFontSize";
|
|
16
|
-
import InfinityAITool from "./InfinityAITool";
|
|
16
|
+
// import InfinityAITool from "./InfinityAITool";
|
|
17
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
const DEFAULT_COLOR = {
|
|
@@ -27,8 +27,8 @@ const MiniTextFormat = props => {
|
|
|
27
27
|
const {
|
|
28
28
|
classes,
|
|
29
29
|
editor,
|
|
30
|
-
closeMainPopup
|
|
31
|
-
customProps
|
|
30
|
+
closeMainPopup
|
|
31
|
+
// customProps
|
|
32
32
|
} = props;
|
|
33
33
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
34
34
|
const open = Boolean(anchorEl);
|
|
@@ -50,7 +50,7 @@ const MiniTextFormat = props => {
|
|
|
50
50
|
xs: 12,
|
|
51
51
|
children: /*#__PURE__*/_jsxs("div", {
|
|
52
52
|
className: "toolWrapper",
|
|
53
|
-
children: [
|
|
53
|
+
children: [/*#__PURE__*/_jsx(SelectTypography, {
|
|
54
54
|
classes: classes,
|
|
55
55
|
editor: editor,
|
|
56
56
|
closeMainPopup: closeMainPopup
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Box, Paper, Popper, Typography, Tooltip, IconButton } from "@mui/material";
|
|
3
3
|
import CloseIcon from "@mui/icons-material/Close";
|
|
4
|
-
import HelpIcon from "@mui/icons-material/Help";
|
|
5
4
|
import useOptionsPopupStyle from "./style";
|
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -31,22 +30,16 @@ const OptionsPopup = props => {
|
|
|
31
30
|
children: [/*#__PURE__*/_jsxs(Typography, {
|
|
32
31
|
variant: "div",
|
|
33
32
|
className: "item-wrapper title",
|
|
34
|
-
children: [title, /*#__PURE__*/
|
|
33
|
+
children: [title, /*#__PURE__*/_jsx(Box, {
|
|
35
34
|
component: "div",
|
|
36
|
-
children:
|
|
37
|
-
title: "Help",
|
|
38
|
-
arrow: true,
|
|
39
|
-
children: /*#__PURE__*/_jsx(IconButton, {
|
|
40
|
-
children: /*#__PURE__*/_jsx(HelpIcon, {})
|
|
41
|
-
})
|
|
42
|
-
}), /*#__PURE__*/_jsx(Tooltip, {
|
|
35
|
+
children: /*#__PURE__*/_jsx(Tooltip, {
|
|
43
36
|
title: "Close",
|
|
44
37
|
arrow: true,
|
|
45
38
|
children: /*#__PURE__*/_jsx(IconButton, {
|
|
46
39
|
onClick: handleClose,
|
|
47
40
|
children: /*#__PURE__*/_jsx(CloseIcon, {})
|
|
48
41
|
})
|
|
49
|
-
})
|
|
42
|
+
})
|
|
50
43
|
})]
|
|
51
44
|
}), children]
|
|
52
45
|
})
|
|
@@ -9,7 +9,7 @@ const useOptionsPopupStyle = ({
|
|
|
9
9
|
boxShadow: "1px 1px 3px rgba(0,0,0,0.3)",
|
|
10
10
|
marginRight: "4px !important",
|
|
11
11
|
"& .papper-root": {
|
|
12
|
-
width: "
|
|
12
|
+
width: "344px",
|
|
13
13
|
boxShadow: "none",
|
|
14
14
|
border: `1px solid ${theme?.palette?.editor?.borderColor}`,
|
|
15
15
|
borderRadius: "7px",
|
|
@@ -47,7 +47,7 @@ const useOptionsPopupStyle = ({
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"& .item-wrapper": {
|
|
50
|
-
padding: "
|
|
50
|
+
padding: "12px 12px",
|
|
51
51
|
fontFamily: "sans-serif",
|
|
52
52
|
"& .MuiListItemIcon-root": {
|
|
53
53
|
minWidth: "30px"
|
|
@@ -61,9 +61,9 @@ const useOptionsPopupStyle = ({
|
|
|
61
61
|
color: theme?.palette?.editor?.textColor,
|
|
62
62
|
"&:after": {
|
|
63
63
|
position: "absolute",
|
|
64
|
-
width: "100%",
|
|
64
|
+
width: "calc(100% - 24px)",
|
|
65
65
|
bottom: 0,
|
|
66
|
-
left:
|
|
66
|
+
left: 12,
|
|
67
67
|
content: '" "',
|
|
68
68
|
borderBottom: "1px solid #ccc"
|
|
69
69
|
},
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { ReactEditor } from "slate-react";
|
|
2
|
+
import { Node, Path } from "slate";
|
|
4
3
|
import { Box } from "@mui/material";
|
|
5
4
|
import { Rnd } from "react-rnd";
|
|
6
5
|
import Handles from "./TransformHandles";
|
|
@@ -163,7 +162,7 @@ const RnD = props => {
|
|
|
163
162
|
anchorEl: rndRef?.current
|
|
164
163
|
});
|
|
165
164
|
}
|
|
166
|
-
ReactEditor.focus(editor);
|
|
165
|
+
// ReactEditor.focus(editor);
|
|
167
166
|
break;
|
|
168
167
|
case 2:
|
|
169
168
|
focusSelection(editor, {
|
|
@@ -24,8 +24,22 @@ export const createEmbedNode = (type, {
|
|
|
24
24
|
text: " "
|
|
25
25
|
}],
|
|
26
26
|
size: {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
xs: {
|
|
28
|
+
widthInPercent: "100",
|
|
29
|
+
height: 300
|
|
30
|
+
},
|
|
31
|
+
sm: {
|
|
32
|
+
widthInPercent: "100",
|
|
33
|
+
height: 370
|
|
34
|
+
},
|
|
35
|
+
md: {
|
|
36
|
+
widthInPercent: "100",
|
|
37
|
+
height: 420
|
|
38
|
+
},
|
|
39
|
+
lg: {
|
|
40
|
+
widthInPercent: "100",
|
|
41
|
+
height: 520
|
|
42
|
+
}
|
|
29
43
|
},
|
|
30
44
|
alignment: {
|
|
31
45
|
horizantal: "center"
|