@flozy/editor 5.2.2 → 5.2.4
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 +1 -0
- package/dist/Editor/Elements/Form/Form.js +1 -0
- package/dist/Editor/Elements/FreeGrid/styles.js +1 -0
- package/dist/Editor/Elements/List/CheckList.js +2 -1
- package/dist/Editor/Elements/Search/SearchAttachment.js +1 -0
- package/dist/Editor/Elements/Search/SearchButton.js +1 -0
- package/dist/Editor/Elements/SimpleText/style.js +2 -0
- package/dist/Editor/Elements/Table/Table.js +6 -3
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +5 -0
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +4 -4
- package/dist/Editor/common/MentionsPopup/Styles.js +1 -0
- package/dist/Editor/helper/index.js +1 -1
- package/dist/Editor/utils/SlateUtilityFunctions.js +8 -1
- package/dist/Editor/utils/brains.js +1 -1
- package/package.json +1 -1
@@ -49,6 +49,7 @@ const SearchAttachment = props => {
|
|
49
49
|
background: theme?.palette?.containers?.slashBrainCardBg,
|
50
50
|
cursor: 'pointer',
|
51
51
|
margin: '4px 0px',
|
52
|
+
lineHeight: 1.43,
|
52
53
|
"&.MuiPaper-root.MuiPaper-rounded": {
|
53
54
|
borderRadius: "7px !important",
|
54
55
|
paddingTop: '0px !important'
|
@@ -128,6 +128,8 @@ const Table = props => {
|
|
128
128
|
const tableRef = useRef(null);
|
129
129
|
const containerRef = useRef(null);
|
130
130
|
const path = ReactEditor.findPath(editor, element);
|
131
|
+
const isValidPath = path && Editor.hasPath(editor, path); // getting cannot find the descendant path error while deleting table from free grid on right click
|
132
|
+
|
131
133
|
const dragRowBtnCls = `table-${path?.toString()?.replaceAll(",", "-")}-row-drag-btn`;
|
132
134
|
const handleAction = type => {
|
133
135
|
Transforms.select(editor, editor.selection);
|
@@ -243,14 +245,15 @@ const Table = props => {
|
|
243
245
|
openSetttings,
|
244
246
|
exandTools
|
245
247
|
},
|
246
|
-
children: [/*#__PURE__*/_jsxs("div", {
|
248
|
+
children: [isValidPath ? /*#__PURE__*/_jsxs("div", {
|
247
249
|
style: {
|
248
250
|
minWidth: "100%",
|
249
251
|
maxWidth: "100%",
|
250
252
|
position: "relative",
|
251
253
|
overflowX: "auto",
|
252
254
|
display: "flex",
|
253
|
-
paddingTop: "10px"
|
255
|
+
paddingTop: "10px",
|
256
|
+
lineHeight: 1.43
|
254
257
|
},
|
255
258
|
ref: containerRef,
|
256
259
|
onScroll: handleScroll,
|
@@ -282,7 +285,7 @@ const Table = props => {
|
|
282
285
|
addType: "col",
|
283
286
|
onAdd: addCol
|
284
287
|
})]
|
285
|
-
}), /*#__PURE__*/_jsx(AddRowCol, {
|
288
|
+
}) : null, /*#__PURE__*/_jsx(AddRowCol, {
|
286
289
|
...commonAddBtnProps,
|
287
290
|
addType: "row",
|
288
291
|
onAdd: addRow
|
@@ -177,6 +177,11 @@ const usePopupStyle = theme => ({
|
|
177
177
|
justifyContent: "start",
|
178
178
|
borderRadius: "10px !important",
|
179
179
|
transition: "background-color 0.3s ease",
|
180
|
+
// "& .colorBoxElementIcon": {
|
181
|
+
// "& path": {
|
182
|
+
// fill: theme?.palette?.type === "dark" ? "none" : "",
|
183
|
+
// },
|
184
|
+
// },
|
180
185
|
"& .signatureElementIcon": {
|
181
186
|
"& path": {
|
182
187
|
fill: `${theme?.palette?.editor?.closeButtonSvgStroke}`
|
@@ -33,14 +33,14 @@ const TextFormat = props => {
|
|
33
33
|
const [anchorEl, setAnchorEl] = useState(null);
|
34
34
|
const [type, setType] = useState(null);
|
35
35
|
const open = Boolean(anchorEl);
|
36
|
-
const {
|
37
|
-
fontFamilies,
|
38
|
-
theme
|
39
|
-
} = useEditorContext();
|
40
36
|
const {
|
41
37
|
element: pageSt
|
42
38
|
} = getPageSettings(editor) || {};
|
43
39
|
const pageSettingLine = pageSt?.pageProps?.lineHeight;
|
40
|
+
const {
|
41
|
+
fontFamilies,
|
42
|
+
theme
|
43
|
+
} = useEditorContext();
|
44
44
|
const {
|
45
45
|
activeBreakPoint
|
46
46
|
} = useEditorContext();
|
@@ -352,7 +352,7 @@ export const clearBrainText = editor => {
|
|
352
352
|
} = editor;
|
353
353
|
if (selection) {
|
354
354
|
const [currentNode, currentPath] = Editor.node(editor, selection);
|
355
|
-
const cleanedText = Node.string(currentNode).replace(/\/b(?:rain|rai|ra|r)?/g, "").trim();
|
355
|
+
const cleanedText = Node.string(currentNode).replace(/\/(?:b(?:rain|rai|ra|r)?)?/g, "").trim();
|
356
356
|
Transforms.insertText(editor, cleanedText, {
|
357
357
|
at: currentPath
|
358
358
|
});
|
@@ -312,7 +312,8 @@ export const getBlock = props => {
|
|
312
312
|
borderRadius: `${element?.color ? "0px" : "12px"} 12px 12px ${element?.color ? "0px" : "12px"}`,
|
313
313
|
margin: `${element?.bgColor ? "16px" : "0px"} 0px`,
|
314
314
|
width: element?.bgColor ? "calc(100% - 16px)" : "100%",
|
315
|
-
borderWidth: element?.color ? "0px 0px 0px 3px" : "0px"
|
315
|
+
borderWidth: element?.color ? "0px 0px 0px 3px" : "0px",
|
316
|
+
lineHeight: 1.43
|
316
317
|
},
|
317
318
|
children: children
|
318
319
|
});
|
@@ -372,6 +373,9 @@ export const getBlock = props => {
|
|
372
373
|
});
|
373
374
|
case "orderedList":
|
374
375
|
return /*#__PURE__*/_jsx("ol", {
|
376
|
+
style: {
|
377
|
+
lineHeight: 1.43
|
378
|
+
},
|
375
379
|
className: "listItemMargin",
|
376
380
|
type: "1",
|
377
381
|
...attributes,
|
@@ -379,6 +383,9 @@ export const getBlock = props => {
|
|
379
383
|
});
|
380
384
|
case "unorderedList":
|
381
385
|
return /*#__PURE__*/_jsx("ul", {
|
386
|
+
style: {
|
387
|
+
lineHeight: 1.43
|
388
|
+
},
|
382
389
|
className: "listItemMargin",
|
383
390
|
...attributes,
|
384
391
|
children: children
|
@@ -18,7 +18,7 @@ export const insertBrain = (editor, data, position) => {
|
|
18
18
|
};
|
19
19
|
const [currentNode, currentPath] = Editor.node(editor, selection);
|
20
20
|
console.log('W1', Node.string(currentNode));
|
21
|
-
const cleanedText = Node.string(currentNode).replace(/\/b(?:rain|rai|ra|r)?/g, "").trim();
|
21
|
+
const cleanedText = Node.string(currentNode).replace(/\/(?:b(?:rain|rai|ra|r)?)?/g, "").trim();
|
22
22
|
if (cleanedText) {
|
23
23
|
Transforms.delete(editor, {
|
24
24
|
at: Editor.range(editor, currentPath)
|