@flozy/editor 5.3.6 → 5.3.7

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.
Files changed (126) hide show
  1. package/dist/Editor/CommonEditor.js +14 -8
  2. package/dist/Editor/Editor.css +58 -22
  3. package/dist/Editor/Elements/Accordion/Accordion.js +8 -1
  4. package/dist/Editor/Elements/AppHeader/AppHeader.js +6 -6
  5. package/dist/Editor/Elements/Button/EditorButton.js +9 -2
  6. package/dist/Editor/Elements/Color Picker/ColorButtons.js +4 -2
  7. package/dist/Editor/Elements/DataView/DataView.js +124 -0
  8. package/dist/Editor/Elements/DataView/DataViewButton.js +23 -0
  9. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +67 -0
  10. package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +33 -0
  11. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +162 -0
  12. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +40 -0
  13. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +67 -0
  14. package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +35 -0
  15. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +39 -0
  16. package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +30 -0
  17. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +30 -0
  18. package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +35 -0
  19. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +36 -0
  20. package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +17 -0
  21. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +29 -0
  22. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +38 -0
  23. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +74 -0
  24. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +64 -0
  25. package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +106 -0
  26. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +174 -0
  27. package/dist/Editor/Elements/DataView/Layouts/Formula.js +29 -0
  28. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +113 -0
  29. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +37 -0
  30. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +111 -0
  31. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +60 -0
  32. package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +36 -0
  33. package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +101 -0
  34. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +160 -0
  35. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +190 -0
  36. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +42 -0
  37. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +30 -0
  38. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +110 -0
  39. package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +179 -0
  40. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +112 -0
  41. package/dist/Editor/Elements/DataView/Layouts/TableView.js +227 -0
  42. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +80 -0
  43. package/dist/Editor/Elements/DataView/Layouts/colStyles.js +10 -0
  44. package/dist/Editor/Elements/DataView/Layouts/index.js +25 -0
  45. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +281 -0
  46. package/dist/Editor/Elements/DataView/Utils/globalSearch.js +15 -0
  47. package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +74 -0
  48. package/dist/Editor/Elements/DataView/styles.js +154 -0
  49. package/dist/Editor/Elements/Divider/Divider.js +24 -9
  50. package/dist/Editor/Elements/Embed/Image.js +31 -12
  51. package/dist/Editor/Elements/Embed/Video.js +13 -2
  52. package/dist/Editor/Elements/Form/Form.js +1 -0
  53. package/dist/Editor/Elements/FreeGrid/breakpointConstants.js +4 -4
  54. package/dist/Editor/Elements/FreeGrid/styles.js +2 -1
  55. package/dist/Editor/Elements/Grid/GridItem.js +2 -0
  56. package/dist/Editor/Elements/Grid/Styles.js +44 -0
  57. package/dist/Editor/Elements/List/CheckList.js +2 -1
  58. package/dist/Editor/Elements/Search/SearchAttachment.js +1 -0
  59. package/dist/Editor/Elements/Signature/SignaturePopup.js +4 -4
  60. package/dist/Editor/Elements/SimpleText/index.js +8 -1
  61. package/dist/Editor/Elements/SimpleText/style.js +10 -1
  62. package/dist/Editor/Elements/Table/Table.js +2 -4
  63. package/dist/Editor/Elements/Table/TableCell.js +5 -10
  64. package/dist/Editor/Elements/TopBanner/TopBanner.js +2 -1
  65. package/dist/Editor/MiniEditor.js +15 -1
  66. package/dist/Editor/Styles/EditorStyles.js +5 -3
  67. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +17 -1
  68. package/dist/Editor/Toolbar/FormatTools/TextSize.js +5 -3
  69. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +210 -72
  70. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +56 -8
  71. package/dist/Editor/Toolbar/Toolbar.js +6 -0
  72. package/dist/Editor/Toolbar/toolbarGroups.js +4 -0
  73. package/dist/Editor/assets/svg/SettingsIcon.js +4 -4
  74. package/dist/Editor/common/ColorPickerButton.js +5 -3
  75. package/dist/Editor/common/DnD/Draggable.js +2 -1
  76. package/dist/Editor/common/FontLoader/FontLoader.js +4 -4
  77. package/dist/Editor/common/Icon.js +6 -0
  78. package/dist/Editor/common/ImageSelector/Options/Upload.js +2 -1
  79. package/dist/Editor/common/ImageSelector/Styles.js +47 -6
  80. package/dist/Editor/common/ImageSelector/UploadStyles.js +18 -6
  81. package/dist/Editor/common/MentionsPopup/Styles.js +109 -122
  82. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +1 -0
  83. package/dist/Editor/common/RnD/GuideLines/styles.js +3 -3
  84. package/dist/Editor/common/RnD/ShadowElement.js +1 -1
  85. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +14 -2
  86. package/dist/Editor/common/RnD/Utils/gridDropItem.js +9 -6
  87. package/dist/Editor/common/RnD/index.js +2 -1
  88. package/dist/Editor/common/Section/index.js +3 -3
  89. package/dist/Editor/common/Section/styles.js +5 -1
  90. package/dist/Editor/common/Shorthands/elements.js +13 -1
  91. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -1
  92. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +9 -3
  93. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +27 -3
  94. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +15 -2
  95. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +10 -2
  96. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +2 -1
  97. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +1 -1
  98. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +2 -0
  99. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +3 -1
  100. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +79 -0
  101. package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +4 -4
  102. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +22 -6
  103. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +21 -2
  104. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +15 -4
  105. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -0
  106. package/dist/Editor/common/StyleBuilder/index.js +17 -9
  107. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +4 -0
  108. package/dist/Editor/common/ToolbarIcon.js +1 -1
  109. package/dist/Editor/common/Uploader.js +46 -36
  110. package/dist/Editor/common/iconListV2.js +348 -130
  111. package/dist/Editor/common/iconslist.js +6 -3
  112. package/dist/Editor/commonStyle.js +290 -4
  113. package/dist/Editor/helper/deserialize/index.js +19 -23
  114. package/dist/Editor/helper/enforceDateFormat.js +41 -0
  115. package/dist/Editor/helper/index.js +16 -3
  116. package/dist/Editor/helper/theme.js +24 -1
  117. package/dist/Editor/hooks/useMouseMove.js +5 -2
  118. package/dist/Editor/hooks/useTable.js +22 -19
  119. package/dist/Editor/plugins/withCustomDeleteBackward.js +33 -2
  120. package/dist/Editor/plugins/withEmbeds.js +30 -26
  121. package/dist/Editor/utils/SlateUtilityFunctions.js +27 -4
  122. package/dist/Editor/utils/button.js +4 -4
  123. package/dist/Editor/utils/dataView.js +43 -0
  124. package/dist/Editor/utils/helper.js +50 -10
  125. package/dist/Editor/utils/pageSettings.js +14 -2
  126. package/package.json +2 -2
@@ -11,6 +11,8 @@ import { GridSettingsIcon } from "../../common/iconslist";
11
11
  import { gradientBorder } from "../../utils/helper";
12
12
  import { getEmbedURL } from "../../helper";
13
13
  import { getBreakPointsValue, getTRBLBreakPoints, groupByBreakpoint } from "../../helper/theme";
14
+ import { useEditorContext } from "../../hooks/useMouseMove";
15
+ import useCommonStyle from "../../commonStyle";
14
16
  import { jsx as _jsx } from "react/jsx-runtime";
15
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
16
18
  const VideoContent = props => {
@@ -68,12 +70,16 @@ const VideoPlaceholder = props => {
68
70
  const {
69
71
  url,
70
72
  readOnly,
71
- onSettings
73
+ onSettings,
74
+ classes
72
75
  } = props;
73
76
  return !url ? !readOnly ? /*#__PURE__*/_jsxs(Box, {
74
77
  component: "button",
75
78
  className: "element-empty-btn",
76
79
  onClick: onSettings,
80
+ sx: {
81
+ ...classes.emptyThumbBtn
82
+ },
77
83
  children: [/*#__PURE__*/_jsx(Icon, {
78
84
  icon: "video"
79
85
  }), "Embed Video or Other"]
@@ -121,6 +127,10 @@ const Video = ({
121
127
  } = alignment || {};
122
128
  const path = ReactEditor.findPath(editor, element);
123
129
  const hasAspect = url && aspectRatio !== "custom" && aspectRatio;
130
+ const {
131
+ theme: appTheme
132
+ } = useEditorContext();
133
+ const classes = useCommonStyle(appTheme);
124
134
  const getSize = () => {
125
135
  if (element?.size === undefined) {
126
136
  return {
@@ -267,7 +277,8 @@ const Video = ({
267
277
  videoSX: videoSX,
268
278
  url: url,
269
279
  readOnly: readOnly,
270
- resizing: resizing
280
+ resizing: resizing,
281
+ classes: classes
271
282
  }), !readOnly && url ? /*#__PURE__*/_jsx(IconButton, {
272
283
  onPointerDown: onMouseDown,
273
284
  style: {
@@ -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,
@@ -47,22 +47,22 @@ export function wrapThemeBreakpoints(sxProp, prop, theme) {
47
47
  const formatedSxProp = Object.keys(sxProp).reduce((a, b) => {
48
48
  switch (b) {
49
49
  case "md":
50
- a[theme.breakpoints.up("lg")] = {
50
+ a[theme?.breakpoints?.up("lg")] = {
51
51
  [prop]: sxProp["md"] || sxProp["lg"]
52
52
  };
53
53
  break;
54
54
  case "sm":
55
- a[theme.breakpoints.up("lg")] = {
55
+ a[theme?.breakpoints?.up("lg")] = {
56
56
  [prop]: sxProp["sm"] || sxProp["lg"]
57
57
  };
58
58
  break;
59
59
  case "xs":
60
- a[theme.breakpoints.between("xs", "md")] = {
60
+ a[theme?.breakpoints?.between("xs", "md")] = {
61
61
  [prop]: sxProp["xs"] || sxProp["lg"]
62
62
  };
63
63
  break;
64
64
  default:
65
- a[theme.breakpoints.up("lg")] = {
65
+ a[theme?.breakpoints?.up("lg")] = {
66
66
  [prop]: sxProp["lg"]
67
67
  };
68
68
  }
@@ -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",
@@ -318,7 +319,7 @@ const useFreeGridStyles = ({
318
319
  "& .element-toolbar": {
319
320
  display: "none"
320
321
  },
321
- [theme.breakpoints.between("xs", "md")]: {
322
+ [theme?.breakpoints?.between("xs", "md")]: {
322
323
  marginLeft: `calc((100% - 320px) * 0.5)`
323
324
  }
324
325
  },
@@ -61,6 +61,7 @@ const GridItemToolbar = props => {
61
61
  children: /*#__PURE__*/_jsx(IconButton, {
62
62
  size: "small",
63
63
  onClick: onSettings,
64
+ sx: classes.groupIcons,
64
65
  children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
65
66
  })
66
67
  }), /*#__PURE__*/_jsx(Tooltip, {
@@ -69,6 +70,7 @@ const GridItemToolbar = props => {
69
70
  children: /*#__PURE__*/_jsx(IconButton, {
70
71
  size: "small",
71
72
  onClick: onAddColumn,
73
+ sx: classes.groupIcons2,
72
74
  children: /*#__PURE__*/_jsx(AddIcon, {})
73
75
  })
74
76
  })]
@@ -112,6 +112,50 @@ const GridStyles = (theme, appTheme) => ({
112
112
  background: appTheme?.palette?.editor?.background,
113
113
  color: appTheme?.palette?.editor?.textColor
114
114
  }
115
+ },
116
+ groupIcons: {
117
+ background: appTheme?.palette?.editor?.aiInputBackground,
118
+ border: `1px solid ${appTheme?.palette?.editor?.buttonBorder1} !important`,
119
+ padding: '5px !important',
120
+ borderRadius: '50% !important',
121
+ '& svg': {
122
+ width: '18px',
123
+ height: '18px',
124
+ '& path': {
125
+ stroke: `${appTheme?.palette?.editor?.closeButtonSvgStroke} !important`
126
+ }
127
+ },
128
+ '&:hover': {
129
+ background: `${appTheme?.palette?.editor?.aiInputBackground} !important`,
130
+ border: `1px solid ${appTheme?.palette?.editor?.buttonBorder1} !important`,
131
+ '& svg': {
132
+ '& path': {
133
+ stroke: `${appTheme?.palette?.editor?.closeButtonSvgStroke} !important`
134
+ }
135
+ }
136
+ }
137
+ },
138
+ groupIcons2: {
139
+ background: appTheme?.palette?.editor?.aiInputBackground,
140
+ border: `1px solid ${appTheme?.palette?.editor?.buttonBorder1} !important`,
141
+ padding: '5px !important',
142
+ borderRadius: '50% !important',
143
+ '& svg': {
144
+ width: '18px',
145
+ height: '18px',
146
+ '& path': {
147
+ fill: `${appTheme?.palette?.editor?.closeButtonSvgStroke} !important`
148
+ }
149
+ },
150
+ '&:hover': {
151
+ background: `${appTheme?.palette?.editor?.aiInputBackground} !important`,
152
+ border: `1px solid ${appTheme?.palette?.editor?.buttonBorder1} !important`,
153
+ '& svg': {
154
+ '& path': {
155
+ fill: `${appTheme?.palette?.editor?.closeButtonSvgStroke} !important`
156
+ }
157
+ }
158
+ }
115
159
  }
116
160
  });
117
161
  export default GridStyles;
@@ -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'
@@ -147,7 +147,7 @@ const SignaturePopup = props => {
147
147
  style: {
148
148
  width: "fit-content"
149
149
  },
150
- children: "Sign Here"
150
+ children: "Sign here"
151
151
  })]
152
152
  }), /*#__PURE__*/_jsx(Dialog, {
153
153
  className: `${className} dialogComp`,
@@ -294,7 +294,7 @@ const SignaturePopup = props => {
294
294
  },
295
295
  children: [/*#__PURE__*/_jsx(Grid, {
296
296
  sx: {
297
- minWidth: "46px"
297
+ minWidth: "49px"
298
298
  },
299
299
  children: /*#__PURE__*/_jsx("label", {
300
300
  htmlFor: "signedBy",
@@ -420,7 +420,7 @@ const SignaturePopup = props => {
420
420
  xs: 12,
421
421
  children: [/*#__PURE__*/_jsx(Grid, {
422
422
  sx: {
423
- minWidth: "46px"
423
+ minWidth: "49px"
424
424
  },
425
425
  children: /*#__PURE__*/_jsx("label", {
426
426
  htmlFor: "signedByEmail",
@@ -492,7 +492,7 @@ const SignaturePopup = props => {
492
492
  return /*#__PURE__*/_jsx(IconButton, {
493
493
  onClick: onBrushSize(m),
494
494
  disableRipple: true,
495
- className: brush.size === m ? "activeBrush" : "",
495
+ className: `${brush.size === m ? "activeBrush" : ""} brushIcon`,
496
496
  children: /*#__PURE__*/_jsx("span", {
497
497
  style: {
498
498
  width: 17 + m,
@@ -5,6 +5,7 @@ import { getPageSettings } from "../../utils/pageSettings";
5
5
  import { isTextSelected } from "../../utils/helper";
6
6
  import { useEditorContext } from "../../hooks/useMouseMove";
7
7
  import SimpleTextStyle from "./style";
8
+ import { getBreakpointLineSpacing } from "../../helper/theme";
8
9
  import { jsx as _jsx } from "react/jsx-runtime";
9
10
  import { Fragment as _Fragment } from "react/jsx-runtime";
10
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -32,8 +33,14 @@ const SimpleText = props => {
32
33
  const {
33
34
  pageColor
34
35
  } = pageSt?.pageProps || {};
36
+ const {
37
+ activeBreakPoint
38
+ } = useEditorContext();
39
+ const lineHeight = element?.children[0]?.lineHeight;
40
+ const lineH = getBreakpointLineSpacing(lineHeight, activeBreakPoint);
35
41
  const classes = SimpleTextStyle({
36
- pageColor: pageColor || theme?.palette?.editor?.background || "#FFFFFF"
42
+ pageColor: pageColor || theme?.palette?.editor?.background || "#FFFFFF",
43
+ lineHeight: lineH
37
44
  });
38
45
  const selected = useSelected();
39
46
  const path = ReactEditor.findPath(editor, element);
@@ -1,10 +1,17 @@
1
1
  import { invertColor } from "../../helper";
2
2
  const SimpleTextStyle = ({
3
- pageColor
3
+ pageColor,
4
+ lineHeight
4
5
  }) => ({
5
6
  root: {
6
7
  position: "relative",
7
8
  padding: "0px",
9
+ lineHeight: lineHeight,
10
+ "&.dataView": {
11
+ "& .placeholder-simple-text": {
12
+ opacity: 0
13
+ }
14
+ },
8
15
  "&.signature": {
9
16
  "& .placeholder-simple-text": {
10
17
  opacity: 0
@@ -28,6 +35,8 @@ const SimpleTextStyle = ({
28
35
  height: "24px",
29
36
  overflow: "hidden",
30
37
  fontSize: "14px",
38
+ display: "inline-flex",
39
+ alignItems: "center",
31
40
  "& .bg-pad-sl": {
32
41
  padding: "2px 4px 2px 4px",
33
42
  background: "transparent",
@@ -150,8 +150,6 @@ const Table = props => {
150
150
  const tableRef = useRef(null);
151
151
  const containerRef = useRef(null);
152
152
  const path = ReactEditor.findPath(editor, element);
153
- const isValidPath = path && Editor.hasPath(editor, path); // getting cannot find the descendant path error while deleting table from free grid on right click
154
-
155
153
  const dragRowBtnCls = `table-${path?.toString()?.replaceAll(",", "-")}-row-drag-btn`;
156
154
  const handleAction = type => {
157
155
  Transforms.select(editor, editor.selection);
@@ -267,7 +265,7 @@ const Table = props => {
267
265
  openSetttings,
268
266
  exandTools
269
267
  },
270
- children: [isValidPath ? /*#__PURE__*/_jsxs("div", {
268
+ children: [/*#__PURE__*/_jsxs("div", {
271
269
  style: {
272
270
  minWidth: "100%",
273
271
  maxWidth: "100%",
@@ -307,7 +305,7 @@ const Table = props => {
307
305
  addType: "col",
308
306
  onAdd: addCol
309
307
  })]
310
- }) : null, /*#__PURE__*/_jsx(AddRowCol, {
308
+ }), /*#__PURE__*/_jsx(AddRowCol, {
311
309
  ...commonAddBtnProps,
312
310
  addType: "row",
313
311
  onAdd: addRow
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect, useMemo } from "react";
2
- import { Editor, Element, Path, Transforms } from "slate";
2
+ import { Editor, Path, Transforms } from "slate";
3
3
  import { Box } from "@mui/material";
4
4
  import { useSlateStatic, ReactEditor } from "slate-react";
5
5
  import useTableResize from "../../utils/customHooks/useTableResize";
@@ -11,6 +11,7 @@ import DragButton from "./DragButton";
11
11
  import TablePopup from "./TablePopup";
12
12
  import { Droppable } from "./Droppable";
13
13
  import { useDndContext } from "@dnd-kit/core";
14
+ import { getNodeWithType } from "../../utils/helper";
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
  import { Fragment as _Fragment } from "react/jsx-runtime";
16
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -97,14 +98,8 @@ const TableCell = props => {
97
98
  const [openSettings, setOpenSettings] = useState(false);
98
99
  const table = new TableUtil(editor);
99
100
  const tableProps = table.getTableProps();
100
- const [tableNode] = Editor.nodes(editor, {
101
- at: path,
102
- match: n => !Editor.isEditor(n) && Element.isElement(n) && n.type === "table"
103
- });
104
- const [rowNode] = Editor.nodes(editor, {
105
- at: path,
106
- match: n => !Editor.isEditor(n) && Element.isElement(n) && n.type === "table-row"
107
- });
101
+ const [tableNode] = getNodeWithType(editor, "table", path); // getting cannot find the descendant path error, while deleting table because of unknown re-render issue, so wrapping it with try catch
102
+ const [rowNode] = getNodeWithType(editor, "table-row", path);
108
103
  const currentPath = path.slice(-2) || []; // getting last 2 items from path, which gives row and column position of the cell
109
104
  const [row, column] = currentPath;
110
105
  const isFirstRow = row === 0;
@@ -424,7 +419,7 @@ const TableCell = props => {
424
419
  }), isHeader && !readOnly && tableSize?.height && !showTool ? /*#__PURE__*/_jsx(Resizer, {
425
420
  classes: classes,
426
421
  onMouseDown: onMouseDown,
427
- height: tableDOM.getBoundingClientRect()?.height
422
+ height: tableDOM?.getBoundingClientRect()?.height
428
423
  }) : null, hasSelected && !readOnly && !tableResizing ? /*#__PURE__*/_jsx("div", {
429
424
  className: "selection-area-tc",
430
425
  contentEditable: false
@@ -77,6 +77,7 @@ const TopBanner = props => {
77
77
  theme
78
78
  } = useEditorContext();
79
79
  const classes = TopBannerStyles(theme);
80
+ const renderHeaderAboveBanner = customProps?.metadata?.renderHeader ? customProps.metadata.renderHeader() : null;
80
81
  return /*#__PURE__*/_jsxs(Box, {
81
82
  component: "div",
82
83
  ...attributes,
@@ -87,7 +88,7 @@ const TopBanner = props => {
87
88
  },
88
89
  contentEditable: false,
89
90
  sx: classes.root,
90
- children: [/*#__PURE__*/_jsx("img", {
91
+ children: [renderHeaderAboveBanner, /*#__PURE__*/_jsx("img", {
91
92
  src: url,
92
93
  alt: "Top Banner",
93
94
  className: "top-banner-wrpr-ele",
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback, useRef, useState, useEffect } from "react";
2
- import { createEditor } from "slate";
2
+ import { createEditor, Range } from "slate";
3
3
  import { Slate, Editable } from "slate-react";
4
4
  import { useDebounce } from "use-debounce";
5
5
  import { getBlock, getMarked } from "./utils/SlateUtilityFunctions";
@@ -115,6 +115,20 @@ const MiniEditor = props => {
115
115
  event,
116
116
  editor
117
117
  });
118
+ } else if (event.key === "Backspace") {
119
+ const {
120
+ selection
121
+ } = editor;
122
+ event.preventDefault();
123
+ if (selection) {
124
+ if (!Range.isCollapsed(selection)) {
125
+ editor.deleteFragment();
126
+ } else {
127
+ editor.deleteBackward({
128
+ unit: "character"
129
+ });
130
+ }
131
+ }
118
132
  }
119
133
  }, [chars, editor, target, mentions, setMentions, search, type, mentionsRef]);
120
134
  const renderElement = useCallback(props => {
@@ -129,7 +129,8 @@ const editorStyles = ({
129
129
  }
130
130
  },
131
131
  "& .accordion-summary-collapse-btn": {
132
- padding: "4px"
132
+ padding: "4px",
133
+ width: '5px'
133
134
  },
134
135
  "& .workflow-icon-btn": {
135
136
  pointerEvents: "none",
@@ -238,6 +239,7 @@ const editorStyles = ({
238
239
  }
239
240
  },
240
241
  "& .section-tw": {
242
+ background: 'transparent !important',
241
243
  "& button": {
242
244
  padding: "2px",
243
245
  borderRadius: "0px",
@@ -286,8 +288,8 @@ const editorStyles = ({
286
288
  }
287
289
  },
288
290
  "& ::selection": {
289
- color: "inherit",
290
- background: "#EAEBFE"
291
+ background: 'rgba(35, 131, 226, 0.35)!important',
292
+ color: 'inherit'
291
293
  },
292
294
  "&.readOnlyContainer": {
293
295
  "& .max-content": {
@@ -42,7 +42,9 @@ const FontFamilyAutocomplete = ({
42
42
  },
43
43
  value: value || options?.[0],
44
44
  className: "editor-dd",
45
- sx: classes.autoCompleteaFontFamily,
45
+ sx: {
46
+ ...classes.autoCompleteaFontFamily
47
+ },
46
48
  onChange: (e, newValue) => changeMarkData(e, newValue, format),
47
49
  getOptionLabel: option => {
48
50
  return option;
@@ -58,6 +60,13 @@ const FontFamilyAutocomplete = ({
58
60
  children: option
59
61
  });
60
62
  },
63
+ slotProps: {
64
+ popper: {
65
+ sx: {
66
+ ...classes.fontFamilyListOptions
67
+ }
68
+ }
69
+ },
61
70
  popupIcon: /*#__PURE__*/_jsx(KeyboardArrowDownRoundedIcon, {}),
62
71
  renderInput: params => /*#__PURE__*/_jsx(TextField, {
63
72
  sx: {
@@ -67,6 +76,13 @@ const FontFamilyAutocomplete = ({
67
76
  },
68
77
  ...params
69
78
  })
79
+ // componentsProps={{
80
+ // clearIndicator: {
81
+ // style: { display: 'none' },
82
+ // },
83
+ // }}
84
+ ,
85
+ disableClearable: true
70
86
  });
71
87
  };
72
88
  export default FontFamilyAutocomplete;
@@ -2,10 +2,12 @@ import React, { useEffect, useRef, useState } from "react";
2
2
  import { TextField, IconButton } from "@mui/material";
3
3
  import { addMarkData, activeMark, isBlockActive } from "../../utils/SlateUtilityFunctions.js";
4
4
  import { headingMap, sizeMap } from "../../utils/font.js";
5
- import { TextMinusIcon, TextPlusIcon } from "../../common/iconslist.js";
5
+ import ExpandLessRoundedIcon from "@mui/icons-material/ExpandLessRounded";
6
+ import ExpandMoreRoundedIcon from "@mui/icons-material/ExpandMoreRounded";
6
7
  import { getBreakPointsValue } from "../../helper/theme.js";
7
8
  import useWindowResize from "../../hooks/useWindowResize.js";
8
9
  import { BREAKPOINTS_DEVICES } from "../../helper/theme.js";
10
+ import { TextSizeDownArrow, TextSizeUpArrow } from "../../common/iconListV2.js";
9
11
  import { jsx as _jsx } from "react/jsx-runtime";
10
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
13
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -106,11 +108,11 @@ const TextSize = ({
106
108
  children: [/*#__PURE__*/_jsx(IconButton, {
107
109
  onClick: onIncreaseSize,
108
110
  size: "small",
109
- children: /*#__PURE__*/_jsx(TextPlusIcon, {})
111
+ children: /*#__PURE__*/_jsx(TextSizeUpArrow, {})
110
112
  }), /*#__PURE__*/_jsx(IconButton, {
111
113
  onClick: onDecreaseSize,
112
114
  size: "small",
113
- children: /*#__PURE__*/_jsx(TextMinusIcon, {})
115
+ children: /*#__PURE__*/_jsx(TextSizeDownArrow, {})
114
116
  })]
115
117
  })
116
118
  }