@flozy/editor 4.9.0 → 4.9.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/CommonEditor.js +2 -1
- package/dist/Editor/Elements/Grid/GridItem.js +4 -3
- package/dist/Editor/Elements/Grid/Styles.js +10 -0
- package/dist/Editor/Elements/Grid/templates/default_grid.js +4 -4
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +11 -2
- package/dist/Editor/utils/gridItem.js +8 -4
- package/package.json +1 -1
@@ -579,8 +579,9 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
579
579
|
setIsTextSelected: setIsTextSelected,
|
580
580
|
customProps: customProps,
|
581
581
|
editorWrapper: editorWrapper
|
582
|
-
}) : null, !readOnly
|
582
|
+
}) : null, !readOnly ? /*#__PURE__*/_jsx(SwitchViewport, {
|
583
583
|
breakpoint: breakpoint,
|
584
|
+
show: showViewport,
|
584
585
|
onChange: b => onSwitchBreakpoint(b)
|
585
586
|
}) : null]
|
586
587
|
})
|
@@ -315,7 +315,8 @@ const GridItem = props => {
|
|
315
315
|
...giInProps,
|
316
316
|
width: "100%",
|
317
317
|
height: "100%",
|
318
|
-
color
|
318
|
+
// dark theme default color effect - FS-6961
|
319
|
+
color: textColor || "inherit",
|
319
320
|
"&:hover": {
|
320
321
|
borderColor: borderColorHover || borderColor || "transparent"
|
321
322
|
}
|
@@ -328,12 +329,12 @@ const GridItem = props => {
|
|
328
329
|
onClose: onClose,
|
329
330
|
onDelete: onDelete,
|
330
331
|
customProps: customProps
|
331
|
-
}) : null, /*#__PURE__*/_jsx(Resizer, {
|
332
|
+
}) : null, !readOnly ? /*#__PURE__*/_jsx(Resizer, {
|
332
333
|
classes: classes,
|
333
334
|
className: resizing ? "resizing" : "",
|
334
335
|
onMouseDown: onMouseDown,
|
335
336
|
height: "auto"
|
336
|
-
})]
|
337
|
+
}) : null]
|
337
338
|
});
|
338
339
|
};
|
339
340
|
export default GridItem;
|
@@ -38,14 +38,24 @@ const GridStyles = theme => ({
|
|
38
38
|
}
|
39
39
|
},
|
40
40
|
flex: "1 1 0",
|
41
|
+
height: "100%",
|
41
42
|
[theme?.breakpoints?.between("xs", "md")]: {
|
42
43
|
flex: "1 1 100%",
|
44
|
+
height: "auto",
|
43
45
|
padding: "0px !important",
|
44
46
|
minWidth: "100% !important",
|
45
47
|
maxWidth: "100% !important",
|
46
48
|
"& .col-width-resizer": {
|
47
49
|
display: "none !important"
|
48
50
|
}
|
51
|
+
},
|
52
|
+
"& .gi-inner-cw": {
|
53
|
+
overflowX: "auto",
|
54
|
+
"& .tableToolBar": {
|
55
|
+
display: "flex",
|
56
|
+
maxWidth: "100%",
|
57
|
+
overflowX: "auto"
|
58
|
+
}
|
49
59
|
}
|
50
60
|
},
|
51
61
|
"& .col-width-resizer": {
|
@@ -14,10 +14,10 @@ const default_grid = [{
|
|
14
14
|
bgColor: "rgba(255, 255, 255, 0)",
|
15
15
|
lockSpacing: true,
|
16
16
|
bannerSpacing: {
|
17
|
-
top: "
|
17
|
+
top: "8",
|
18
18
|
left: "0",
|
19
19
|
right: "0",
|
20
|
-
bottom: "
|
20
|
+
bottom: "16"
|
21
21
|
},
|
22
22
|
alignment: {
|
23
23
|
horizantal: "center"
|
@@ -36,10 +36,10 @@ const default_grid = [{
|
|
36
36
|
bgColor: "rgba(255, 255, 255, 0)",
|
37
37
|
lockSpacing: true,
|
38
38
|
bannerSpacing: {
|
39
|
-
top: "
|
39
|
+
top: "8",
|
40
40
|
left: "0",
|
41
41
|
right: "0",
|
42
|
-
bottom: "
|
42
|
+
bottom: "16"
|
43
43
|
},
|
44
44
|
forceFullWidth: true,
|
45
45
|
borderWidth: "0px"
|
@@ -3,19 +3,28 @@ import PersonalVideoIcon from "@mui/icons-material/PersonalVideo";
|
|
3
3
|
import PhoneIphoneIcon from "@mui/icons-material/PhoneIphone";
|
4
4
|
import useSwitchViewport from "./styles";
|
5
5
|
import { useEffect } from "react";
|
6
|
+
import { useEditorContext } from "../../../hooks/useMouseMove";
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
9
|
const SwitchViewport = props => {
|
9
10
|
const {
|
10
11
|
breakpoint,
|
11
|
-
onChange
|
12
|
+
onChange,
|
13
|
+
show
|
12
14
|
} = props;
|
13
15
|
const classes = useSwitchViewport();
|
16
|
+
const {
|
17
|
+
setSelectedElement
|
18
|
+
} = useEditorContext();
|
14
19
|
useEffect(() => {
|
15
|
-
|
20
|
+
// to reset selection on viewport changes - FS-6589
|
21
|
+
setSelectedElement({});
|
16
22
|
}, [breakpoint]);
|
17
23
|
return /*#__PURE__*/_jsxs(Box, {
|
18
24
|
sx: classes.root,
|
25
|
+
style: {
|
26
|
+
display: show ? "block" : "none"
|
27
|
+
},
|
19
28
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
20
29
|
title: "Desktop View",
|
21
30
|
children: /*#__PURE__*/_jsx(IconButton, {
|
@@ -45,15 +45,19 @@ export const onAddGridItem = ({
|
|
45
45
|
if (insertPath) {
|
46
46
|
insertPath[insertPath.length - 1] = element.children.length;
|
47
47
|
const lp = ReactEditor.findPath(editor, element);
|
48
|
-
const lastElement = {
|
49
|
-
...element.children[element.children.length - 1]
|
50
|
-
};
|
48
|
+
// const lastElement = { ...element.children[element.children.length - 1] };
|
51
49
|
if (isColumn && children?.length - 1 > 0) {
|
52
50
|
updateLastSiblingWidths(editor, [...lp, children.length - 1]);
|
53
51
|
}
|
54
52
|
Transforms.insertNodes(editor, gridItem({
|
55
|
-
...(lastElement || {}),
|
53
|
+
// ...(lastElement || {}),
|
56
54
|
minWidth: null,
|
55
|
+
bannerSpacing: {
|
56
|
+
top: "8",
|
57
|
+
left: "0",
|
58
|
+
right: "0",
|
59
|
+
bottom: "16"
|
60
|
+
},
|
57
61
|
children: [{
|
58
62
|
type: "paragraph",
|
59
63
|
children: [{
|