@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.
@@ -269,6 +269,7 @@ const EditorButton = props => {
269
269
  display: "inline-flex",
270
270
  alignItems: "center",
271
271
  position: "relative",
272
+ lineHeight: 1.43,
272
273
  "& .element-toolbar": {
273
274
  display: "none"
274
275
  },
@@ -402,6 +402,7 @@ const Form = props => {
402
402
  borderStyle: borderStyle || "solid",
403
403
  background: bgColor || "transparent",
404
404
  position: "relative",
405
+ lineHeight: 1.43,
405
406
  ...formSX
406
407
  },
407
408
  ref: formEle,
@@ -171,6 +171,7 @@ const useFreeGridStyles = ({
171
171
  height: "100%",
172
172
  "& .signature-container": {
173
173
  height: "100%",
174
+ LineHeight: 1.43,
174
175
  "& .signature-btn-container": {
175
176
  height: "100%",
176
177
  display: "flex",
@@ -39,7 +39,8 @@ const CheckList = ({
39
39
  display: "flex",
40
40
  justifyContent: "center",
41
41
  alignItems: "center",
42
- ...(style || {})
42
+ ...(style || {}),
43
+ lineHeight: 1.43
43
44
  },
44
45
  children: [/*#__PURE__*/_jsxs("div", {
45
46
  contentEditable: false,
@@ -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'
@@ -91,6 +91,7 @@ const SearchButton = /*#__PURE__*/forwardRef((props, ref) => {
91
91
  const handleClose = () => {
92
92
  clearBrainText(editor);
93
93
  setAnchorEl(null);
94
+ setSearch("");
94
95
  };
95
96
  const handleClick = data => {
96
97
  insertBrain(editor, data, target || editor.selection);
@@ -35,6 +35,8 @@ const SimpleTextStyle = ({
35
35
  height: "24px",
36
36
  overflow: "hidden",
37
37
  fontSize: "14px",
38
+ display: 'inline-flex',
39
+ alignItems: 'center',
38
40
  "& .bg-pad-sl": {
39
41
  padding: "2px 4px 2px 4px",
40
42
  background: "transparent",
@@ -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();
@@ -3,6 +3,7 @@ const usePopupStyles = theme => ({
3
3
  position: "absolute",
4
4
  zIndex: 1300,
5
5
  borderRadius: "10px",
6
+ // padding: "0px",
6
7
  boxShadow: "0px 4px 10px 0px #00000029",
7
8
  overflow: "hidden",
8
9
  padding: "8px 0px !important",
@@ -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)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "5.2.2",
3
+ "version": "5.2.4",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"