@flozy/editor 9.8.4 → 9.8.5

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 (139) hide show
  1. package/dist/Editor/ChatEditor.js +18 -18
  2. package/dist/Editor/CommonEditor.js +18 -118
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +7 -11
  5. package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -11
  6. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  7. package/dist/Editor/Elements/Button/EditorButton.js +25 -37
  8. package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -60
  9. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  10. package/dist/Editor/Elements/Color Picker/ColorPicker.js +7 -10
  11. package/dist/Editor/Elements/Color Picker/Styles.js +13 -15
  12. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +2 -4
  13. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +6 -21
  14. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +1 -5
  15. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +2 -3
  16. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -11
  17. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +4 -8
  18. package/dist/Editor/Elements/Embed/Image.js +2 -2
  19. package/dist/Editor/Elements/Embed/Video.js +1 -1
  20. package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
  21. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +21 -48
  22. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +4 -25
  23. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +3 -46
  24. package/dist/Editor/Elements/FreeGrid/Options/More.js +2 -7
  25. package/dist/Editor/Elements/FreeGrid/styles.js +0 -3
  26. package/dist/Editor/Elements/Grid/GridItem.js +1 -1
  27. package/dist/Editor/Elements/List/CheckList.js +1 -4
  28. package/dist/Editor/Elements/Search/SearchButton.js +1 -1
  29. package/dist/Editor/Elements/Search/SearchList.js +2 -3
  30. package/dist/Editor/Elements/Signature/SignatureOptions/DrawSignature.js +8 -2
  31. package/dist/Editor/Elements/SimpleText/index.js +1 -9
  32. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  33. package/dist/Editor/Elements/Table/Table.js +3 -3
  34. package/dist/Editor/Elements/Title/title.js +8 -9
  35. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  36. package/dist/Editor/MiniEditor.js +1 -2
  37. package/dist/Editor/Styles/EditorStyles.js +5 -5
  38. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  39. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  40. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  41. package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
  42. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +2 -4
  43. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
  44. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +42 -167
  45. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -7
  46. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -2
  47. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +11 -71
  48. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +23 -95
  49. package/dist/Editor/Toolbar/PopupTool/index.js +1 -1
  50. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  51. package/dist/Editor/common/ColorPickerButton.js +14 -39
  52. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  53. package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
  54. package/dist/Editor/common/Icon.js +1 -31
  55. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  56. package/dist/Editor/common/MUIIcon/index.js +3 -0
  57. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +0 -24
  58. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +1 -2
  59. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  60. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  61. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  62. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  63. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +2 -4
  64. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  65. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  66. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +1 -3
  67. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  68. package/dist/Editor/common/RnD/ShadowElement.js +1 -2
  69. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +2 -8
  70. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  71. package/dist/Editor/common/RnD/Utils/gridDropItem.js +9 -73
  72. package/dist/Editor/common/RnD/Utils/index.js +0 -3
  73. package/dist/Editor/common/RnD/VirtualElement/index.js +103 -187
  74. package/dist/Editor/common/RnD/VirtualElement/styles.js +7 -155
  75. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +3 -5
  76. package/dist/Editor/common/RnD/index.js +10 -59
  77. package/dist/Editor/common/Shorthands/elements.js +0 -54
  78. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  79. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
  80. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +2 -12
  81. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
  82. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +8 -16
  83. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +10 -35
  84. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +7 -16
  85. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +6 -7
  86. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +3 -3
  87. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
  88. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  89. package/dist/Editor/common/SwipeableDrawer/index.js +1 -1
  90. package/dist/Editor/common/Uploader.js +0 -8
  91. package/dist/Editor/commonStyle.js +57 -68
  92. package/dist/Editor/helper/theme.js +2 -202
  93. package/dist/Editor/hooks/useMouseMove.js +3 -9
  94. package/dist/Editor/plugins/withEmbeds.js +1 -1
  95. package/dist/Editor/plugins/withHTML.js +9 -11
  96. package/dist/Editor/plugins/withTable.js +1 -1
  97. package/dist/Editor/theme/ThemeList.js +173 -50
  98. package/dist/Editor/utils/SlateUtilityFunctions.js +45 -171
  99. package/dist/Editor/utils/draftToSlate.js +2 -3
  100. package/dist/Editor/utils/font.js +37 -40
  101. package/dist/Editor/utils/freegrid.js +2 -2
  102. package/dist/Editor/utils/helper.js +19 -90
  103. package/package.json +4 -4
  104. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -448
  105. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -436
  106. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  107. package/dist/Editor/assets/svg/ResetIconNew.js +0 -23
  108. package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
  109. package/dist/Editor/common/CustomColorPicker/index.js +0 -131
  110. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  111. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  112. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  113. package/dist/Editor/common/CustomSelect.js +0 -43
  114. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  115. package/dist/Editor/common/RnD/VirtualElement/BoxHeaderAutoAlignment.js +0 -43
  116. package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +0 -44
  117. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +0 -134
  118. package/dist/Editor/common/RnD/VirtualElement/helper.js +0 -382
  119. package/dist/Editor/common/SnackBar/index.js +0 -43
  120. package/dist/Editor/helper/textIndeces.js +0 -58
  121. package/dist/Editor/hooks/useAutoScroll.js +0 -38
  122. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  123. package/dist/Editor/hooks/useThemeValues.js +0 -63
  124. package/dist/Editor/theme/index.js +0 -149
  125. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  126. package/dist/Editor/themeSettings/buttons/index.js +0 -290
  127. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  128. package/dist/Editor/themeSettings/colorTheme/index.js +0 -310
  129. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  130. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  131. package/dist/Editor/themeSettings/fonts/index.js +0 -240
  132. package/dist/Editor/themeSettings/fonts/style.js +0 -61
  133. package/dist/Editor/themeSettings/icons.js +0 -60
  134. package/dist/Editor/themeSettings/index.js +0 -351
  135. package/dist/Editor/themeSettings/style.js +0 -220
  136. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  137. package/dist/Editor/themeSettingsAI/index.js +0 -355
  138. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -205
  139. package/dist/Editor/themeSettingsAI/style.js +0 -259
@@ -9,20 +9,20 @@ const FormStyles = theme => ({
9
9
  color: "#94A3B8"
10
10
  },
11
11
  bodyTextArea: {
12
- "& .mini-editor-cls": {
13
- padding: "12px",
14
- "&:focus-visible": {
15
- outline: "none",
16
- border: "none"
12
+ '& .mini-editor-cls': {
13
+ padding: '12px',
14
+ '&:focus-visible': {
15
+ outline: 'none',
16
+ border: 'none'
17
17
  }
18
18
  },
19
19
  "& .editorWorkflow": {
20
- minHeight: "130px",
21
- padding: "12px",
20
+ minHeight: '130px',
21
+ padding: '12px',
22
22
  paddingBottom: 0,
23
- "&:focus-visible": {
24
- outline: "none",
25
- border: "none"
23
+ '&:focus-visible': {
24
+ outline: 'none',
25
+ border: 'none'
26
26
  }
27
27
  }
28
28
  },
@@ -105,7 +105,7 @@ const FormStyles = theme => ({
105
105
  padding: "4px 22px",
106
106
  textTransform: "none",
107
107
  border: "1px solid #D8DDE1",
108
- minWidth: "126px",
108
+ minWidth: '126px',
109
109
  "& svg": {
110
110
  "& path": {
111
111
  stroke: "#64748B"
@@ -169,19 +169,17 @@ const FormStyles = theme => ({
169
169
  }
170
170
  },
171
171
  colorButtonSingle: {
172
- border: "1.5px solid #DCE4EC !important",
173
172
  "&.active": {
174
- // "&:before": {
175
- // content: '" "',
176
- // position: "absolute",
177
- // top: "-5px",
178
- // left: "-5px",
179
- // width: "calc(100% + 4px)",
180
- // height: "calc(100% + 4px)",
181
- // border: "3px solid blue",
182
- // borderRadius: "50%",
183
- // },
184
- outline: "2px solid #2563EB"
173
+ "&:before": {
174
+ content: '" "',
175
+ position: "absolute",
176
+ top: "-5px",
177
+ left: "-5px",
178
+ width: "calc(100% + 4px)",
179
+ height: "calc(100% + 4px)",
180
+ border: "3px solid blue",
181
+ borderRadius: "50%"
182
+ }
185
183
  }
186
184
  },
187
185
  colorButtonsInner: {
@@ -251,7 +249,7 @@ const FormStyles = theme => ({
251
249
  }
252
250
  },
253
251
  root: {
254
- padding: "10px"
252
+ padding: '10px'
255
253
  }
256
254
  });
257
255
  export default FormStyles;
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useRef, useState } from "react";
1
+ import React from "react";
2
2
  import { Path, Transforms, Node } from "slate";
3
3
  import { ReactEditor, useSlateStatic } from "slate-react";
4
4
  import { Box, useTheme } from "@mui/material";
@@ -43,8 +43,7 @@ const FreeGrid = props => {
43
43
  } = props;
44
44
  const {
45
45
  sectionName,
46
- sectionBorderRadius,
47
- height_xs
46
+ sectionBorderRadius
48
47
  } = element;
49
48
  const {
50
49
  readOnly,
@@ -65,14 +64,11 @@ const FreeGrid = props => {
65
64
  const {
66
65
  setSelectedElement
67
66
  } = useEditorContext();
68
- const [autoAlign, setAutoAlign] = useState(false);
69
- const count = useRef(2);
70
- const childrenCountRef = useRef(element?.children?.length);
71
67
  const onChange = data => {
72
68
  const append = breakpoint === "lg" ? "" : `_${breakpoint}`;
73
69
  const updateData = {
74
70
  ...data,
75
- [`height${append}`]: data.height
71
+ [`height${append}`]: height + data.height
76
72
  };
77
73
  if (append !== "") {
78
74
  delete updateData.height;
@@ -134,10 +130,6 @@ const FreeGrid = props => {
134
130
  setSelectedElement
135
131
  });
136
132
  break;
137
- case "forceAutoAlignment":
138
- setAutoAlign(true);
139
- setSelectedElement({});
140
- break;
141
133
  case "deleteSection":
142
134
  if (Node.has(editor, cur_root_path)) {
143
135
  Transforms.removeNodes(editor, {
@@ -159,12 +151,9 @@ const FreeGrid = props => {
159
151
  console.log(err);
160
152
  }
161
153
  };
162
- useEffect(() => {
163
- childrenCountRef.current = element?.children?.length;
164
- }, [element?.children?.length]);
165
154
  const handleAddElementClick = type => () => {
166
155
  const isEmpty = isEmptySection();
167
- const insertAt = isEmpty ? [...path, 0] : [...path, childrenCountRef.current];
156
+ const insertAt = isEmpty ? [...path, 0] : [...path, element?.children?.length];
168
157
  switch (type) {
169
158
  case "addText":
170
159
  Transforms.insertNodes(editor, [{
@@ -199,6 +188,20 @@ const FreeGrid = props => {
199
188
  linkType: "webAddress"
200
189
  },
201
190
  iconPosition: "start",
191
+ bgColor: "#2563EB",
192
+ textColor: "#FFF",
193
+ borderRadius: {
194
+ topLeft: 30,
195
+ topRight: 30,
196
+ bottomLeft: 30,
197
+ bottomRight: 30
198
+ },
199
+ bannerSpacing: {
200
+ left: 12,
201
+ top: 12,
202
+ right: 12,
203
+ bottom: 12
204
+ },
202
205
  textAlign: "center",
203
206
  label: "Get Started"
204
207
  }],
@@ -371,19 +374,6 @@ const FreeGrid = props => {
371
374
  break;
372
375
  default:
373
376
  }
374
- if (breakpoint === "lg") {
375
- setSelectedElement({});
376
-
377
- // auto align in mobile
378
- Transforms.setNodes(editor, {
379
- xs_updatedOn: null,
380
- updated_at: new Date().getTime()
381
- }, {
382
- at: path
383
- });
384
- }
385
- count.current = count.current + 1;
386
-
387
377
  // focus on newly added element
388
378
  focusOnNewItem(editor, insertAt, {
389
379
  setSelectedElement
@@ -455,17 +445,6 @@ const FreeGrid = props => {
455
445
  }
456
446
  }, theme);
457
447
  const sectionTypeOptions = (itemOptions?.section || []).filter(f => (hideTools || []).indexOf(f) === -1);
458
-
459
- // const id = useMemo(() => {
460
- // let eleId = `freegrid_container_${path.join("|")}_${breakpoint}`;
461
-
462
- // if (autoAlign) {
463
- // eleId += `_${updated_at}`; // re-render component on force auto align
464
- // }
465
-
466
- // return eleId;
467
- // }, [autoAlign, updated_at, breakpoint, path]);
468
-
469
448
  return /*#__PURE__*/_jsx(RnD, {
470
449
  id: `freegrid_container_${path.join("|")}_${updated_at}_${breakpoint}`,
471
450
  className: `
@@ -479,9 +458,6 @@ const FreeGrid = props => {
479
458
  position: "relative",
480
459
  "--height": `${height}px`
481
460
  },
482
- dataSets: {
483
- "data-height-xs": height_xs
484
- },
485
461
  defaultStyle: {
486
462
  width: "100%",
487
463
  height: height ? `${height}px` : "auto"
@@ -538,8 +514,7 @@ const FreeGrid = props => {
538
514
  },
539
515
  customProps: {
540
516
  customProps
541
- },
542
- breakpoint
517
+ }
543
518
  }
544
519
  },
545
520
  settings: {
@@ -551,7 +526,8 @@ const FreeGrid = props => {
551
526
  path,
552
527
  classes,
553
528
  customProps,
554
- translation
529
+ translation,
530
+ customProps
555
531
  }
556
532
  }
557
533
  },
@@ -561,9 +537,6 @@ const FreeGrid = props => {
561
537
  handleContextMenuClick: handleContextMenuClick,
562
538
  translation: translation,
563
539
  customProps: customProps,
564
- sectionElement: element,
565
- autoAlign: autoAlign,
566
- setAutoAlign: setAutoAlign,
567
540
  children: /*#__PURE__*/_jsxs(Box, {
568
541
  ...attributes,
569
542
  id: sectionName,
@@ -1,4 +1,4 @@
1
- import React, { useMemo } from "react";
1
+ import React from "react";
2
2
  import { Transforms, Node, Path } from "slate";
3
3
  import { useSlateStatic } from "slate-react";
4
4
  import { ReactEditor } from "slate-react";
@@ -37,12 +37,7 @@ const FreeGridBox = props => {
37
37
  sectionBorderRadius,
38
38
  borderWidth,
39
39
  borderColor,
40
- borderStyle,
41
- height_xs,
42
- marginTop_xs,
43
- gridArea_xs,
44
- width_xs,
45
- left_xs
40
+ borderStyle
46
41
  } = element;
47
42
  // get values based on breakpoint size
48
43
  const {
@@ -157,12 +152,9 @@ const FreeGridBox = props => {
157
152
  };
158
153
  const repeatTimes = Math.floor(height / ROW_HEIGHT);
159
154
  const sectionTypeOptions = (itemOptions?.box || []).filter(f => (hideTools || []).indexOf(f) === -1);
160
- const isBoxHeader = useMemo(() => {
161
- return element?.children?.some(c => c.childType === "appHeader" && !c.xs_updatedOn);
162
- }, [element]);
163
155
  return /*#__PURE__*/_jsx(RnD, {
164
156
  id: `freegrid_box_item_${path.join("|")}_${updated_at}_${breakpoint}`,
165
- className: `freegrid-item path-${path.length} breakpoint-${breakpoint} freegrid-box_${path.join("_")}`,
157
+ className: `freegrid-item path-${path.length} breakpoint-${breakpoint}`,
166
158
  editor: editor,
167
159
  path: path,
168
160
  actions: sectionTypeOptions,
@@ -177,23 +169,12 @@ const FreeGridBox = props => {
177
169
  "--gridArea": `${gridArea}`,
178
170
  "--width": `${width}px`,
179
171
  "--height": `${height}px`,
180
- "--zIndex": 100 + arrangeIndex,
181
- "--height_xs": height_xs ? `${height_xs}px` : "auto",
182
- "--marginTop_xs": marginTop_xs ? `${marginTop_xs}px` : "24px"
183
- // "--gridArea_xs": gridArea_xs ? gridArea_xs : "unset",
172
+ "--zIndex": 100 + arrangeIndex
184
173
  },
185
-
186
174
  defaultStyle: {
187
175
  height: `${height}px`,
188
176
  width: `${width}px`
189
177
  },
190
- dataSets: {
191
- "data-grid-area-xs": gridArea_xs,
192
- "data-margin-top-xs": marginTop_xs,
193
- "data-height-xs": height_xs,
194
- "data-width-xs": width_xs,
195
- "data-left-xs": left_xs
196
- },
197
178
  gridArea: gridArea,
198
179
  onChange: onChange,
199
180
  delta: {
@@ -211,8 +192,6 @@ const FreeGridBox = props => {
211
192
  type: "parent-container",
212
193
  customProps: customProps,
213
194
  translation: translation,
214
- breakpoint: breakpoint,
215
- isBoxHeader: isBoxHeader,
216
195
  children: /*#__PURE__*/_jsx(Box, {
217
196
  component: "div",
218
197
  ...attributes,
@@ -1,4 +1,4 @@
1
- import React, { useMemo, useState } from "react";
1
+ import React, { useState } from "react";
2
2
  import { Transforms, Node, Path } from "slate";
3
3
  import { useSlateStatic } from "slate-react";
4
4
  import { ReactEditor } from "slate-react";
@@ -35,12 +35,7 @@ const FreeGridItem = props => {
35
35
  const {
36
36
  updated_at,
37
37
  childType,
38
- zIndex,
39
- height_xs,
40
- width_xs,
41
- marginTop_xs,
42
- gridArea_xs,
43
- left_xs
38
+ zIndex
44
39
  } = element;
45
40
  // get values based on breakpoint size
46
41
  const {
@@ -59,9 +54,6 @@ const FreeGridItem = props => {
59
54
  arrangeIndex = Math.max(1, arrangeIndex);
60
55
  const [popup, setPopup] = useState(null);
61
56
  const onChangeSettings = () => {};
62
- // const refInput = useRef();
63
- // const [virtualHeight, setVirtualHeight] = useState(height || 0);
64
-
65
57
  const onChange = data => {
66
58
  let updateData = {
67
59
  ...data
@@ -117,13 +109,6 @@ const FreeGridItem = props => {
117
109
  Transforms.removeNodes(editor, {
118
110
  at: path
119
111
  });
120
- const parentPath = Path.parent(path);
121
- Transforms.setNodes(editor, {
122
- xs_updatedOn: null,
123
- updated_at: new Date().getTime()
124
- }, {
125
- at: parentPath
126
- });
127
112
  } catch (err) {
128
113
  console.log(err);
129
114
  }
@@ -250,22 +235,6 @@ const FreeGridItem = props => {
250
235
  }
251
236
  };
252
237
  const itemTypeOptions = (itemOptions[childType] || itemOptions?.default).filter(f => (hideTools || []).indexOf(f) === -1);
253
- const variableStyle = useMemo(() => {
254
- const {
255
- width,
256
- height
257
- } = element || {};
258
- let widthVar = width_xs;
259
- let heightVar = height_xs;
260
- if (element?.childType === "image") {
261
- widthVar = width_xs || width;
262
- heightVar = height_xs || height;
263
- }
264
- return {
265
- "--width_xs": widthVar ? `${widthVar}px` : "auto",
266
- "--height_xs": heightVar ? `${heightVar}px` : "auto"
267
- };
268
- }, [element]);
269
238
  return /*#__PURE__*/_jsx(RnD, {
270
239
  id: `freegrid_item_${path.join("|")}_${updated_at}_${breakpoint}`,
271
240
  className: `freegrid-item path-${path.length} breakpoint-${breakpoint}`,
@@ -285,18 +254,7 @@ const FreeGridItem = props => {
285
254
  "--gridArea": `${gridArea}`,
286
255
  "--width": `${width}px`,
287
256
  "--height": `${height}px`,
288
- "--zIndex": 100 + arrangeIndex,
289
- "--marginTop_xs": marginTop_xs ? `${marginTop_xs}px` : "0px",
290
- ...variableStyle
291
- // "--gridArea_xs": gridArea_xs ? gridArea_xs : "unset",
292
- },
293
-
294
- dataSets: {
295
- "data-grid-area-xs": gridArea_xs,
296
- "data-margin-top-xs": marginTop_xs,
297
- "data-height-xs": height_xs,
298
- "data-width-xs": width_xs,
299
- "data-left-xs": left_xs
257
+ "--zIndex": 100 + arrangeIndex
300
258
  },
301
259
  defaultStyle: {
302
260
  height: `${height}px`,
@@ -319,7 +277,6 @@ const FreeGridItem = props => {
319
277
  },
320
278
  customProps: customProps,
321
279
  translation: translation,
322
- breakpoint: breakpoint,
323
280
  children: /*#__PURE__*/_jsxs(Box, {
324
281
  component: "div",
325
282
  ...attributes,
@@ -5,8 +5,7 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
5
5
  const More = props => {
6
6
  const {
7
7
  handleClick,
8
- translation,
9
- breakpoint
8
+ translation
10
9
  } = props;
11
10
  return /*#__PURE__*/_jsx(Box, {
12
11
  children: /*#__PURE__*/_jsxs(List, {
@@ -19,11 +18,7 @@ const More = props => {
19
18
  className: "item-wrapper",
20
19
  onClick: handleClick("duplicateSection"),
21
20
  children: translation?.translation("Duplicate Section")
22
- }), breakpoint === "xs" ? /*#__PURE__*/_jsx(ListItemButton, {
23
- className: "item-wrapper",
24
- onClick: handleClick("forceAutoAlignment"),
25
- children: "Force Auto Alignment"
26
- }) : null, /*#__PURE__*/_jsx(ListItemButton, {
21
+ }), /*#__PURE__*/_jsx(ListItemButton, {
27
22
  className: "item-wrapper",
28
23
  onClick: handleClick("deleteSection"),
29
24
  children: "Delete Section"
@@ -316,9 +316,6 @@ const useFreeGridStyles = ({
316
316
  "& .fgi_type_text": {
317
317
  "& .edt-headings": {
318
318
  margin: "0px"
319
- },
320
- "& .edt-paragraphs": {
321
- margin: "0px"
322
319
  }
323
320
  },
324
321
  /** element toolbar hide */
@@ -292,7 +292,7 @@ const GridItem = props => {
292
292
  ...getBRProps,
293
293
  display: "flex",
294
294
  flexDirection: flexDirection || "column",
295
- background: bgColor,
295
+ background: bgColor || "transparent",
296
296
  borderColor: getBorderColor(),
297
297
  borderWidth: borderWidth || "1px",
298
298
  borderStyle: borderStyle || "solid",
@@ -27,9 +27,6 @@ const CheckList = props => {
27
27
  checked
28
28
  } = element;
29
29
  const path = ReactEditor.findPath(editor, element);
30
- const {
31
- customLineHeight
32
- } = customProps || {};
33
30
  const handleCheck = e => {
34
31
  Transforms.setNodes(editor, {
35
32
  checked: e.target.checked
@@ -48,7 +45,7 @@ const CheckList = props => {
48
45
  justifyContent: "center",
49
46
  alignItems: "center",
50
47
  ...(style || {}),
51
- lineHeight: `${customLineHeight} !important`
48
+ lineHeight: 1.43
52
49
  },
53
50
  children: [/*#__PURE__*/_jsxs("div", {
54
51
  contentEditable: false,
@@ -113,7 +113,7 @@ const SearchButton = /*#__PURE__*/forwardRef((props, ref) => {
113
113
  open: open,
114
114
  onClose: handleClose,
115
115
  customClass: "emojiDrawer",
116
- swipeableDrawer: false,
116
+ swipeableDrawer: true,
117
117
  children: /*#__PURE__*/_jsx(Paper, {
118
118
  sx: {
119
119
  width: '100%',
@@ -35,7 +35,7 @@ const SearchAndDocList = ({
35
35
  children: translation("Brains")
36
36
  }), !isMobile ? /*#__PURE__*/_jsx(IconButton, {
37
37
  onClick: e => {
38
- e.stopPropagation();
38
+ e?.stopPropagation();
39
39
  handleClose();
40
40
  },
41
41
  sx: {
@@ -138,8 +138,7 @@ const SearchAndDocList = ({
138
138
  position: 'relative',
139
139
  maxHeight: '400px',
140
140
  minWidth: "275px",
141
- overflowY: 'auto',
142
- overflowX: 'hidden',
141
+ overflow: 'auto',
143
142
  padding: '0px 16px 8px',
144
143
  marginBottom: '20px',
145
144
  scrollbarWidth: "thin",
@@ -1,6 +1,6 @@
1
1
  import React, { useRef, useState } from "react";
2
2
  import SignatureCanvas from "react-signature-canvas";
3
- import { Grid } from "@mui/material";
3
+ import { Grid, useMediaQuery } from "@mui/material";
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
5
  import { jsxs as _jsxs } from "react/jsx-runtime";
6
6
  const DrawSignature = props => {
@@ -24,6 +24,11 @@ const DrawSignature = props => {
24
24
  signature: result?.imageURL || strImage
25
25
  });
26
26
  };
27
+ const isMobile = useMediaQuery("(max-width:599px)");
28
+ const signatureCanvasStyle = isMobile ? {
29
+ width: "260px",
30
+ height: "200px"
31
+ } : {};
27
32
  return /*#__PURE__*/_jsxs(Grid, {
28
33
  container: true,
29
34
  children: [uploading ? "Uploading..." : "", /*#__PURE__*/_jsx(Grid, {
@@ -35,7 +40,8 @@ const DrawSignature = props => {
35
40
  },
36
41
  children: /*#__PURE__*/_jsx(SignatureCanvas, {
37
42
  canvasProps: {
38
- className: "signature-canvas"
43
+ className: "signature-canvas",
44
+ ...signatureCanvasStyle
39
45
  },
40
46
  onEnd: onSigned,
41
47
  ref: ref => canvasRef = ref,
@@ -5,7 +5,6 @@ import { Box } from "@mui/material";
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";
9
8
  import { jsx as _jsx } from "react/jsx-runtime";
10
9
  import { Fragment as _Fragment } from "react/jsx-runtime";
11
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -28,17 +27,10 @@ const SimpleText = props => {
28
27
  editorPlaceholder,
29
28
  translation
30
29
  } = customProps;
31
- const {
32
- activeBreakPoint
33
- } = useEditorContext();
34
30
  // const { element: pageSt } = getPageSettings(editor) || {};
35
31
  // const { pageColor } = pageSt?.pageProps || {};
36
- const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
37
- const lineH = element?.children[0]?.lineHeight;
38
- const lineHeight = getBreakpointLineSpacing(lineH, activeBreakPoint || (isMobile ? "xs" : "lg"));
39
32
  const classes = SimpleTextStyle({
40
- pageColor: "#FFFFFF",
41
- lineHeight
33
+ pageColor: "#FFFFFF"
42
34
  });
43
35
  const selected = useSelected();
44
36
  const path = ReactEditor.findPath(editor, element);
@@ -35,8 +35,8 @@ const SimpleTextStyle = ({
35
35
  height: "24px",
36
36
  overflow: "hidden",
37
37
  fontSize: "14px",
38
- display: "inline-flex",
39
- alignItems: "center",
38
+ display: 'inline-flex',
39
+ alignItems: 'center',
40
40
  "& .bg-pad-sl": {
41
41
  padding: "2px 4px 2px 4px",
42
42
  background: "transparent",
@@ -307,7 +307,7 @@ const Table = props => {
307
307
  onScroll: handleScroll,
308
308
  onMouseOver: onMouseOver,
309
309
  onMouseLeave: onMouseLeave,
310
- className: "custom-scroll",
310
+ className: !hideTools.includes("add_column") ? "custom-scroll" : '',
311
311
  children: [/*#__PURE__*/_jsx(TableComp, {
312
312
  className: readOnly ? "readOnly" : "",
313
313
  sx: {
@@ -345,8 +345,8 @@ const Table = props => {
345
345
  handleAction: handleAction,
346
346
  exandTools: exandTools,
347
347
  openSetttings: openSetttings,
348
- hideTools: hideTools,
349
- translation: translation
348
+ translation: translation,
349
+ hideTools: hideTools
350
350
  }), /*#__PURE__*/_jsx(MoreTableSettings, {
351
351
  exandTools: exandTools,
352
352
  handleAction: handleAction,
@@ -1,16 +1,9 @@
1
1
  import React, { useEffect, useState } from "react";
2
- import { Editor } from "slate";
2
+ import { Editor, Text } from "slate";
3
3
  import { useSlate } from "slate-react";
4
4
  import { getNodeText } from "../../utils/helper";
5
- import { Text } from "slate";
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
7
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
- const isEmptyTextNode = node => {
9
- if (Text.isText(node)) {
10
- return !node.text.trim();
11
- }
12
- return false;
13
- };
14
7
  const Title = props => {
15
8
  const {
16
9
  attributes,
@@ -18,8 +11,8 @@ const Title = props => {
18
11
  element,
19
12
  customProps
20
13
  } = props;
21
- useDetectExitFromTitle(element, customProps?.getTitleSaveData);
22
14
  const isEmpty = !customProps?.readOnly && isEmptyTextNode(element?.children[0]) ? "empty" : "";
15
+ useDetectExitFromTitle(element, customProps?.getTitleSaveData);
23
16
  return /*#__PURE__*/_jsxs("div", {
24
17
  ...attributes,
25
18
  placeholder: "Title",
@@ -57,4 +50,10 @@ const useDetectExitFromTitle = (titleNode, onSaveTitle) => {
57
50
  }
58
51
  }, [editor.selection]);
59
52
  return null;
53
+ };
54
+ const isEmptyTextNode = node => {
55
+ if (Text.isText(node)) {
56
+ return !node.text.trim();
57
+ }
58
+ return false;
60
59
  };
@@ -34,8 +34,7 @@ const VariableButton = props => {
34
34
  PaperProps: {
35
35
  style: {
36
36
  maxHeight: 300,
37
- overflowY: "auto",
38
- transformOrigin: 'top left'
37
+ overflowY: "auto"
39
38
  },
40
39
  sx: {
41
40
  "&::-webkit-scrollbar-track": {
@@ -45,14 +44,6 @@ const VariableButton = props => {
45
44
  borderRadius: "16px"
46
45
  }
47
46
  }
48
- },
49
- anchorOrigin: {
50
- vertical: 'bottom',
51
- horizontal: 'right'
52
- },
53
- transformOrigin: {
54
- vertical: 'top',
55
- horizontal: 'right'
56
47
  }
57
48
  },
58
49
  children: [/*#__PURE__*/_jsx(MenuItem, {
@@ -45,13 +45,12 @@ const MiniEditor = props => {
45
45
  const {
46
46
  translationMock
47
47
  } = otherProps;
48
- const dummyTranslation = () => {};
49
48
  const customProps = {
50
49
  ...(otherProps || {}),
51
50
  readOnly: isReadOnly,
52
51
  editorPlaceholder: miniEditorPlaceholder,
53
52
  page_id: id,
54
- translation: translation || translationMock || dummyTranslation
53
+ translation: translation || translationMock
55
54
  };
56
55
  const [mentions, setMentions] = useMentions({
57
56
  editor,