@flozy/editor 5.1.1 → 5.1.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/Elements/Button/EditorButton.js +4 -1
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +1 -1
- package/dist/Editor/Elements/Grid/GridItem.js +2 -3
- package/dist/Editor/Elements/Grid/Styles.js +3 -0
- package/dist/Editor/Elements/SimpleText/style.js +5 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +1 -4
- package/dist/Editor/plugins/withCustomDeleteBackward.js +3 -2
- package/package.json +1 -1
@@ -199,7 +199,9 @@ const EditorButton = props => {
|
|
199
199
|
lg: "inline-block"
|
200
200
|
}
|
201
201
|
}, theme);
|
202
|
-
const handleMoreBtn =
|
202
|
+
const handleMoreBtn = e => {
|
203
|
+
e.preventDefault();
|
204
|
+
e.stopPropagation();
|
203
205
|
setOpenMoreOptions(!openMoreOptions);
|
204
206
|
};
|
205
207
|
return /*#__PURE__*/_jsxs("div", {
|
@@ -297,6 +299,7 @@ const EditorButton = props => {
|
|
297
299
|
children: /*#__PURE__*/_jsx(IconButton, {
|
298
300
|
className: `moreBtnShow ${isMobile || openMoreOptions ? "activeBtnShow" : ""}`,
|
299
301
|
sx: {
|
302
|
+
color: "#64748B",
|
300
303
|
"& path": {
|
301
304
|
fill: openMoreOptions ? appTheme.palette.text.blueText : ""
|
302
305
|
}
|
@@ -115,7 +115,7 @@ const ColorButtons = props => {
|
|
115
115
|
const [row1, ...restRows] = ColorChunks([]);
|
116
116
|
const [anchorEl, setAnchorEl] = useState(null);
|
117
117
|
const open = Boolean(anchorEl);
|
118
|
-
const firstRow = defaultColors
|
118
|
+
const firstRow = defaultColors?.length ? defaultColors : row1;
|
119
119
|
const handleMore = e => {
|
120
120
|
setAnchorEl(e.currentTarget);
|
121
121
|
};
|
@@ -271,12 +271,11 @@ const GridItem = props => {
|
|
271
271
|
return /*#__PURE__*/_jsxs(Item, {
|
272
272
|
item: true,
|
273
273
|
component: "div",
|
274
|
-
className: `grid-item element-root gi-top-wrpr dpath`,
|
274
|
+
className: `grid-item element-root gi-top-wrpr dpath ${lastChild ? "lastChild" : ""}`,
|
275
275
|
...attributes,
|
276
276
|
style: {
|
277
277
|
textAlign: element.alignment || "left",
|
278
|
-
"--minWidth": lastChild ? "auto" : minWidthInPercent
|
279
|
-
flexGrow: lastChild ? 1 : "auto"
|
278
|
+
"--minWidth": lastChild ? "auto" : minWidthInPercent
|
280
279
|
},
|
281
280
|
sx: {
|
282
281
|
...getBRProps,
|
@@ -7,6 +7,11 @@ const SimpleTextStyle = ({
|
|
7
7
|
position: "relative",
|
8
8
|
padding: "0px",
|
9
9
|
lineHeight: lineHeight,
|
10
|
+
"&.signature": {
|
11
|
+
"& .placeholder-simple-text": {
|
12
|
+
opacity: 0
|
13
|
+
}
|
14
|
+
},
|
10
15
|
"& .placeholder-simple-text": {
|
11
16
|
color: "#94A3B8",
|
12
17
|
background: "transparent",
|
@@ -25,9 +25,6 @@ const BannerSpacing = props => {
|
|
25
25
|
const [size] = useWindowResize();
|
26
26
|
const pro_value = getBreakPointsValue(val, size?.device);
|
27
27
|
const [value, setValue] = useState(pro_value);
|
28
|
-
useState(() => {
|
29
|
-
setValue(pro_value);
|
30
|
-
}, [pro_value]);
|
31
28
|
const handleChange = e => {
|
32
29
|
let changeAll = {};
|
33
30
|
if (lockSpacing) {
|
@@ -40,7 +37,7 @@ const BannerSpacing = props => {
|
|
40
37
|
...changeAll,
|
41
38
|
[e.target.name]: e.target.value
|
42
39
|
};
|
43
|
-
|
40
|
+
setValue(up_value);
|
44
41
|
onChange({
|
45
42
|
[key]: {
|
46
43
|
...getBreakPointsValue(val, null),
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Editor, Node, Path, Point, Transforms } from "slate";
|
2
2
|
import { getNextNode } from "../utils/helper";
|
3
|
+
const BACKWARD_BLOCKS = ["list-item", "signature"];
|
3
4
|
const isNodeTextEmpty = node => {
|
4
5
|
const nodeText = Node.string(node);
|
5
6
|
return nodeText.trim() === "";
|
@@ -29,9 +30,9 @@ const withCustomDeleteBackward = editor => {
|
|
29
30
|
}
|
30
31
|
}
|
31
32
|
|
32
|
-
// Check if current node is a list item and is the last one
|
33
|
+
// Check if current node is a list item and is the last one, signature node
|
33
34
|
const [node] = Editor.nodes(editor, {
|
34
|
-
match: n => n.type
|
35
|
+
match: n => BACKWARD_BLOCKS.includes(n.type) // Adjust based on your list item type
|
35
36
|
});
|
36
37
|
|
37
38
|
if (node) {
|