@flozy/editor 3.8.7 → 3.8.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. package/dist/Editor/ChatEditor.js +2 -2
  2. package/dist/Editor/CommonEditor.js +170 -166
  3. package/dist/Editor/DialogWrapper.js +4 -3
  4. package/dist/Editor/Editor.css +4 -7
  5. package/dist/Editor/Elements/AI/AIInput.js +5 -16
  6. package/dist/Editor/Elements/AI/PopoverAIInput.js +64 -67
  7. package/dist/Editor/Elements/AI/Styles.js +1 -2
  8. package/dist/Editor/Elements/AppHeader/AppHeader.js +40 -49
  9. package/dist/Editor/Elements/Button/EditorButton.js +33 -38
  10. package/dist/Editor/Elements/Color Picker/ColorButtons.js +17 -60
  11. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  12. package/dist/Editor/Elements/Color Picker/ColorPicker.js +4 -4
  13. package/dist/Editor/Elements/Color Picker/Styles.js +1 -2
  14. package/dist/Editor/Elements/Embed/Image.js +15 -14
  15. package/dist/Editor/Elements/Embed/Video.js +12 -8
  16. package/dist/Editor/Elements/Emoji/EmojiButton.js +11 -7
  17. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +3 -12
  18. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +1 -2
  19. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +391 -0
  20. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +193 -0
  21. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +23 -0
  22. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +184 -0
  23. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +36 -0
  24. package/dist/Editor/Elements/FreeGrid/Options/More.js +24 -0
  25. package/dist/Editor/Elements/FreeGrid/Options/SectionSettings.js +47 -0
  26. package/dist/Editor/Elements/FreeGrid/Options/sectionItemOptions.js +11 -0
  27. package/dist/Editor/Elements/FreeGrid/breakpointConstants.js +75 -0
  28. package/dist/Editor/Elements/FreeGrid/styles.js +159 -0
  29. package/dist/Editor/Elements/Grid/Grid.js +14 -34
  30. package/dist/Editor/Elements/Grid/GridItem.js +31 -23
  31. package/dist/Editor/Elements/Link/Link.js +1 -6
  32. package/dist/Editor/Elements/Link/LinkButton.js +2 -4
  33. package/dist/Editor/Elements/Link/LinkPopup.js +3 -10
  34. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +3 -3
  35. package/dist/Editor/Elements/Signature/SignaturePopup.js +3 -14
  36. package/dist/Editor/Elements/SimpleText/index.js +9 -8
  37. package/dist/Editor/Elements/SimpleText/style.js +37 -0
  38. package/dist/Editor/Elements/Table/Styles.js +1 -23
  39. package/dist/Editor/Elements/Table/Table.js +1 -2
  40. package/dist/Editor/Elements/Table/TableCell.js +7 -69
  41. package/dist/Editor/Elements/TableContextMenu/TableContextMenu.js +0 -1
  42. package/dist/Editor/ErrorBoundary.js +30 -0
  43. package/dist/Editor/MiniEditor.js +1 -3
  44. package/dist/Editor/Styles/EditorStyles.js +23 -0
  45. package/dist/Editor/Toolbar/Basic/index.js +2 -4
  46. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +2 -26
  47. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  48. package/dist/Editor/Toolbar/FormatTools/TextSize.js +18 -29
  49. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +2 -4
  50. package/dist/Editor/Toolbar/Mini/Options/Options.js +0 -10
  51. package/dist/Editor/Toolbar/Mini/Styles.js +0 -7
  52. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +11 -4
  53. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +86 -213
  54. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +1 -2
  55. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +13 -20
  56. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +8 -52
  57. package/dist/Editor/Toolbar/PopupTool/index.js +13 -6
  58. package/dist/Editor/Toolbar/Toolbar.js +7 -0
  59. package/dist/Editor/Toolbar/toolbarGroups.js +11 -48
  60. package/dist/Editor/assets/svg/AIIcons.js +1 -153
  61. package/dist/Editor/assets/svg/AddTemplateIcon.js +10 -13
  62. package/dist/Editor/assets/svg/TextIcon.js +5 -8
  63. package/dist/Editor/common/ColorPickerButton.js +9 -25
  64. package/dist/Editor/common/DnD/DragHandleButton.js +47 -56
  65. package/dist/Editor/common/Icon.js +8 -41
  66. package/dist/Editor/common/LinkSettings/NavComponents.js +2 -5
  67. package/dist/Editor/common/LinkSettings/index.js +2 -4
  68. package/dist/Editor/common/LinkSettings/navOptions.js +2 -7
  69. package/dist/Editor/common/LinkSettings/style.js +8 -11
  70. package/dist/Editor/common/MentionsPopup/index.js +12 -8
  71. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +105 -0
  72. package/dist/Editor/common/RnD/ContextMenu/index.js +38 -0
  73. package/dist/Editor/common/RnD/ContextMenu/styles.js +21 -0
  74. package/dist/Editor/common/RnD/DragInfo/index.js +31 -0
  75. package/dist/Editor/common/RnD/DragInfo/styles.js +15 -0
  76. package/dist/Editor/common/RnD/DragOver/index.js +46 -0
  77. package/dist/Editor/common/RnD/DragOver/styles.js +23 -0
  78. package/dist/Editor/common/RnD/ElementOptions/Actions.js +82 -0
  79. package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +26 -0
  80. package/dist/Editor/common/RnD/ElementOptions/index.js +93 -0
  81. package/dist/Editor/common/RnD/ElementOptions/styles.js +41 -0
  82. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Link.js +153 -0
  83. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +58 -0
  84. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/index.js +7 -0
  85. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +46 -0
  86. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +46 -0
  87. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +46 -0
  88. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +30 -0
  89. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +46 -0
  90. package/dist/Editor/common/RnD/ElementSettings/Settings/index.js +13 -0
  91. package/dist/Editor/common/RnD/ElementSettings/index.js +17 -0
  92. package/dist/Editor/common/RnD/ElementSettings/settingsConstants.js +14 -0
  93. package/dist/Editor/common/RnD/ElementSettings/styles.js +76 -0
  94. package/dist/Editor/common/RnD/GuideLines/BoundaryLine.js +52 -0
  95. package/dist/Editor/common/RnD/GuideLines/index.js +33 -0
  96. package/dist/Editor/common/RnD/GuideLines/styles.js +60 -0
  97. package/dist/Editor/common/RnD/OptionsPopup/index.js +50 -0
  98. package/dist/Editor/common/RnD/OptionsPopup/style.js +36 -0
  99. package/dist/Editor/common/RnD/RnDCopy.js +23 -0
  100. package/dist/Editor/common/RnD/ShadowElement.js +34 -0
  101. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +40 -0
  102. package/dist/Editor/common/RnD/SwitchViewport/styles.js +24 -0
  103. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +63 -0
  104. package/dist/Editor/common/RnD/TransformHandles/CornerHandle.js +19 -0
  105. package/dist/Editor/common/RnD/TransformHandles/Icons/BottomRightIcon.js +13 -0
  106. package/dist/Editor/common/RnD/TransformHandles/SizeHandle.js +18 -0
  107. package/dist/Editor/common/RnD/TransformHandles/index.js +62 -0
  108. package/dist/Editor/common/RnD/Utils/alignmentDetection.js +26 -0
  109. package/dist/Editor/common/RnD/Utils/calculateDropItem.js +98 -0
  110. package/dist/Editor/common/RnD/Utils/collisionDetection.js +52 -0
  111. package/dist/Editor/common/RnD/Utils/gridDropItem.js +148 -0
  112. package/dist/Editor/common/RnD/Utils/index.js +251 -0
  113. package/dist/Editor/common/RnD/VirtualElement/index.js +76 -0
  114. package/dist/Editor/common/RnD/VirtualElement/styles.js +27 -0
  115. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +28 -0
  116. package/dist/Editor/common/RnD/index.js +503 -0
  117. package/dist/Editor/common/RnD/styles.js +4 -0
  118. package/dist/Editor/common/Section/index.js +28 -69
  119. package/dist/Editor/common/Section/styles.js +6 -12
  120. package/dist/Editor/common/Shorthands/elements.js +12 -54
  121. package/dist/Editor/common/StyleBuilder/boxStyle.js +30 -0
  122. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  123. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +16 -19
  124. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
  125. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +1 -1
  126. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +7 -31
  127. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +4 -13
  128. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -2
  129. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +4 -14
  130. package/dist/Editor/common/StyleBuilder/index.js +1 -1
  131. package/dist/Editor/common/StyleBuilder/sectionStyle.js +13 -2
  132. package/dist/Editor/common/iconslist.js +31 -0
  133. package/dist/Editor/helper/RnD/focusOnNewItem.js +39 -0
  134. package/dist/Editor/helper/RnD/scrollToNewSection.js +24 -0
  135. package/dist/Editor/helper/breakpoint.js +5 -0
  136. package/dist/Editor/helper/index.js +139 -0
  137. package/dist/Editor/helper/theme.js +48 -185
  138. package/dist/Editor/hooks/useBreakpoints.js +34 -0
  139. package/dist/Editor/hooks/useMouseMove.js +37 -12
  140. package/dist/Editor/hooks/useWindowMessage.js +7 -10
  141. package/dist/Editor/hooks/withCommon.js +2 -1
  142. package/dist/Editor/hooks/withErrorHandling.js +14 -0
  143. package/dist/Editor/plugins/withEmbeds.js +1 -1
  144. package/dist/Editor/plugins/withHTML.js +1 -1
  145. package/dist/Editor/plugins/withTable.js +1 -1
  146. package/dist/Editor/theme/ThemeList.js +173 -50
  147. package/dist/Editor/utils/RnD/RnDCtrlCmds.js +168 -0
  148. package/dist/Editor/utils/SlateUtilityFunctions.js +47 -163
  149. package/dist/Editor/utils/button.js +17 -1
  150. package/dist/Editor/utils/events.js +7 -54
  151. package/dist/Editor/utils/font.js +37 -40
  152. package/dist/Editor/utils/freegrid.js +49 -0
  153. package/dist/Editor/utils/helper.js +31 -31
  154. package/dist/Editor/utils/table.js +43 -51
  155. package/package.json +6 -4
  156. package/dist/Editor/Elements/AI/VoiceToText/AudioWave.js +0 -73
  157. package/dist/Editor/Elements/AI/VoiceToText/index.js +0 -167
  158. package/dist/Editor/Elements/AI/VoiceToText/style.js +0 -40
  159. package/dist/Editor/Elements/Link/LinkPopupStyles.js +0 -28
  160. package/dist/Editor/Elements/Redo/RedoButton.js +0 -14
  161. package/dist/Editor/Elements/Undo/UndoButton.js +0 -14
  162. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -438
  163. package/dist/Editor/assets/svg/RedoIcon.js +0 -27
  164. package/dist/Editor/assets/svg/SettingsIcon.js +0 -28
  165. package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
  166. package/dist/Editor/assets/svg/UndoIcon.js +0 -27
  167. package/dist/Editor/common/CustomColorPicker/index.js +0 -106
  168. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  169. package/dist/Editor/common/CustomDialog/index.js +0 -94
  170. package/dist/Editor/common/CustomDialog/style.js +0 -67
  171. package/dist/Editor/common/CustomSelect.js +0 -33
  172. package/dist/Editor/hooks/useEditorTheme.js +0 -139
  173. package/dist/Editor/theme/index.js +0 -144
  174. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  175. package/dist/Editor/themeSettings/buttons/index.js +0 -290
  176. package/dist/Editor/themeSettings/buttons/style.js +0 -21
  177. package/dist/Editor/themeSettings/colorTheme/index.js +0 -290
  178. package/dist/Editor/themeSettings/colorTheme/style.js +0 -77
  179. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -123
  180. package/dist/Editor/themeSettings/fonts/index.js +0 -213
  181. package/dist/Editor/themeSettings/fonts/style.js +0 -44
  182. package/dist/Editor/themeSettings/icons.js +0 -60
  183. package/dist/Editor/themeSettings/index.js +0 -320
  184. package/dist/Editor/themeSettings/style.js +0 -152
  185. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  186. package/dist/Editor/themeSettingsAI/index.js +0 -356
  187. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -190
  188. package/dist/Editor/themeSettingsAI/style.js +0 -247
@@ -0,0 +1,159 @@
1
+ const useFreeGridStyles = ({
2
+ theme,
3
+ MAX_DEVICE_WIDTH
4
+ }) => ({
5
+ root: {
6
+ "&.freegrid-container": {
7
+ display: "grid",
8
+ gridTemplateColumns: "var(--cols)",
9
+ gridTemplateRows: "var(--rows)",
10
+ gridGap: "0px",
11
+ backgroundColor: "#FFF",
12
+ padding: "0px",
13
+ height: "100%",
14
+ position: "static",
15
+ overflow: "hidden",
16
+ "& .freegrid-item, & .freegrid-box-item": {
17
+ gridArea: "var(--gridArea)",
18
+ left: "var(--left)",
19
+ marginTop: "var(--marginTop)",
20
+ marginLeft: `calc((100% - ${MAX_DEVICE_WIDTH}px) * 0.5)`,
21
+ zIndex: "var(--zIndex) !important",
22
+ "&.active-drag": {},
23
+ "&.inactive-drag": {},
24
+ "& .editor-blocker": {
25
+ position: "absolute",
26
+ left: 0,
27
+ top: 0,
28
+ width: "100%",
29
+ height: "100%",
30
+ background: "rgba(0,0,0,0)",
31
+ border: 0,
32
+ outline: 0
33
+ },
34
+ "&.enable-1, &.enable-2": {
35
+ "&.type_text": {
36
+ // height: "fit-content !important",
37
+ }
38
+ },
39
+ "&.enable-1:before, &.enable-2:before": {
40
+ position: "absolute",
41
+ content: "attr(placeholder)",
42
+ top: "-22px",
43
+ left: "-2px",
44
+ padding: "2px 4px",
45
+ backgroundColor: "#2563EB",
46
+ color: "#FFF",
47
+ fontSize: "12px",
48
+ borderTopLeftRadius: "2px",
49
+ borderTopRightRadius: "2px",
50
+ width: "auto",
51
+ height: "16px"
52
+ },
53
+ "&:hover": {
54
+ "& .debug-info": {
55
+ opacity: 1
56
+ }
57
+ },
58
+ "& .debug-info": {
59
+ position: "absolute",
60
+ top: "calc(100% + 8px)",
61
+ pointerEvents: "none",
62
+ left: 0,
63
+ background: "rgba(0,0,0,0.2)",
64
+ color: "red",
65
+ width: "100%",
66
+ padding: "6px",
67
+ opacity: 0
68
+ },
69
+ "&.enable-1": {
70
+ "&.type_text": {
71
+ "*": {
72
+ "::selection": {
73
+ backgroundColor: "transparent !important",
74
+ color: "inherit !important"
75
+ }
76
+ }
77
+ }
78
+ },
79
+ /** for element items */
80
+ "& .fgi_type_image, & .fgi_type_video": {
81
+ height: "100%",
82
+ "& .embed": {
83
+ height: "100%",
84
+ "& .embed-image-wrpr, & .embed-video-wrpr-in, & .element-empty-btn": {
85
+ height: "100%"
86
+ }
87
+ }
88
+ },
89
+ "& .fgi_type_button": {
90
+ height: "100%",
91
+ "& .editor-btn-wrapper": {
92
+ height: "100%",
93
+ "& .editor-btn-wrapper-inner": {
94
+ width: "100%",
95
+ height: "100%",
96
+ "& span": {
97
+ width: "100%",
98
+ height: "100%"
99
+ },
100
+ "& .btn": {
101
+ width: "100%",
102
+ height: "100%",
103
+ "&.textAlign-left": {
104
+ justifyContent: "start"
105
+ },
106
+ "&.textAlign-right": {
107
+ justifyContent: "end"
108
+ },
109
+ "&.textAlign-center": {
110
+ justifyContent: "center"
111
+ }
112
+ }
113
+ }
114
+ }
115
+ },
116
+ "& .fgi_type_box": {
117
+ width: "100%",
118
+ height: "100%"
119
+ },
120
+ /** element toolbar hide */
121
+ "& .element-toolbar": {
122
+ display: "none"
123
+ },
124
+ [theme.breakpoints.between("xs", "md")]: {
125
+ marginLeft: `calc((100% - 320px) * 0.5)`
126
+ }
127
+ }
128
+ }
129
+ },
130
+ sectionPopper: {
131
+ zIndex: 1200,
132
+ width: "40px",
133
+ left: "-40px !important",
134
+ "& .papper-root": {
135
+ fontFamily: "sans-serif",
136
+ background: "#FFF",
137
+ "& .MuiIconButton-root": {
138
+ padding: "10px",
139
+ color: "#000",
140
+ background: "#FFF",
141
+ "& svg": {
142
+ width: "20px",
143
+ height: "20px"
144
+ },
145
+ "&.active,&:hover ": {}
146
+ }
147
+ }
148
+ },
149
+ sectionSettingsPopper: {
150
+ "&.style-settings-wrpr": {
151
+ height: "300px",
152
+ overflowY: "auto",
153
+ overflowX: "hidden",
154
+ padding: "8px 8px 12px 12px",
155
+ marginBotton: "12px"
156
+ }
157
+ }
158
+ });
159
+ export default useFreeGridStyles;
@@ -1,8 +1,8 @@
1
1
  /* eslint-disable no-unused-vars */
2
2
  import React, { useState } from "react";
3
- import { Transforms, Path, Node } from "slate";
3
+ import { Transforms, Path } from "slate";
4
4
  import { useSlateStatic, ReactEditor } from "slate-react";
5
- import { IconButton, Tooltip, Grid as GridContainer } from "@mui/material";
5
+ import { IconButton, Tooltip, Grid as GridContainer, useTheme } from "@mui/material";
6
6
  import ArrowUpwardIcon from "@mui/icons-material/ArrowUpward";
7
7
  import ArrowDownwardIcon from "@mui/icons-material/ArrowDownward";
8
8
  import KeyboardReturnIcon from "@mui/icons-material/KeyboardReturn";
@@ -13,9 +13,8 @@ import GridPopup from "./GridPopup";
13
13
  import SectionPopup from "./SectionPopup";
14
14
  import { gridItem } from "../../utils/gridItem";
15
15
  import { useEditorContext, useEditorSelection } from "../../hooks/useMouseMove";
16
- import { getTRBLBreakPoints, getBreakPointsValue } from "../../helper/theme";
16
+ import { getTRBLBreakPoints, getBreakPointsValue, groupByBreakpoint } from "../../helper/theme";
17
17
  import useWindowResize from "../../hooks/useWindowResize";
18
- import { useTheme } from "@emotion/react";
19
18
  import { jsx as _jsx } from "react/jsx-runtime";
20
19
  import { Fragment as _Fragment } from "react/jsx-runtime";
21
20
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -30,16 +29,11 @@ const GridToolBar = ({
30
29
  onAddGridItem,
31
30
  onAddSection,
32
31
  onMoveSection,
33
- path,
34
- isSectionFullWidth
32
+ path
35
33
  }) => {
36
34
  return selected && !showTool ? /*#__PURE__*/_jsxs("div", {
37
35
  className: "grid-container-toolbar",
38
36
  contentEditable: false,
39
- style: isSectionFullWidth ? {
40
- right: "4px",
41
- top: "4px"
42
- } : {},
43
37
  children: [/*#__PURE__*/_jsx(Tooltip, {
44
38
  title: "Grid Settings",
45
39
  arrow: true,
@@ -80,17 +74,6 @@ const GridToolBar = ({
80
74
  }) : null]
81
75
  }) : null;
82
76
  };
83
- const getParentEl = (editor, path) => {
84
- try {
85
- if (path?.length) {
86
- return Node.parent(editor, path);
87
- } else {
88
- return null;
89
- }
90
- } catch (err) {
91
- return null;
92
- }
93
- };
94
77
  const Grid = props => {
95
78
  const theme = useTheme();
96
79
  const {
@@ -131,11 +114,6 @@ const Grid = props => {
131
114
  const selected = hoverPath === path.join(",");
132
115
  const [showTool] = useEditorSelection(editor);
133
116
  const [size] = useWindowResize();
134
- const parentElement = getParentEl(editor, path);
135
- const {
136
- sectionGridSize
137
- } = parentElement || {};
138
- const isSectionFullWidth = sectionGridSize && sectionGridSize[size?.device] >= 12;
139
117
  const onAddGridItem = () => {
140
118
  const currentPath = editor.selection?.anchor?.path;
141
119
  const ancestorsPath = Path.ancestors(currentPath, {
@@ -298,6 +276,14 @@ const Grid = props => {
298
276
  bottomLeft,
299
277
  bottomRight
300
278
  } = getBreakPointsValue(borderRadius, size?.device) || {};
279
+ const gridcwrprProps = groupByBreakpoint({
280
+ padding: {
281
+ ...getTRBLBreakPoints(bannerSpacing)
282
+ },
283
+ flexWrap: {
284
+ ...getBreakPointsValue(flexWrap || "wrap")
285
+ }
286
+ }, theme);
301
287
  return /*#__PURE__*/_jsxs(GridContainer, {
302
288
  container: true,
303
289
  className: `grid-container ${grid} has-hover element-root dpath`,
@@ -350,8 +336,7 @@ const Grid = props => {
350
336
  onAddGridItem: onAddGridItem,
351
337
  onAddSection: onAddSection,
352
338
  onMoveSection: onMoveSection,
353
- path: path,
354
- isSectionFullWidth: isSectionFullWidth
339
+ path: path
355
340
  })]
356
341
  }), openSetttings ? /*#__PURE__*/_jsx(PoupComp, {
357
342
  element: element,
@@ -364,16 +349,11 @@ const Grid = props => {
364
349
  className: "grid-c-wrpr",
365
350
  sx: {
366
351
  display: "flex",
367
- padding: {
368
- ...getTRBLBreakPoints(bannerSpacing)
369
- },
352
+ ...gridcwrprProps,
370
353
  alignItems: vertical || "start",
371
354
  justifyContent: horizantal || "start",
372
355
  flexDirection: flexDirection || "row",
373
356
  width: "100%",
374
- flexWrap: {
375
- ...getBreakPointsValue(flexWrap || "wrap")
376
- },
377
357
  height: "auto"
378
358
  },
379
359
  "data-path": path.join(","),
@@ -1,14 +1,15 @@
1
1
  /* eslint-disable no-unused-vars */
2
2
  import React, { useState } from "react";
3
- import { Transforms, Node } from "slate";
3
+ import { useTheme } from "@mui/material";
4
+ import { Transforms } from "slate";
4
5
  import { useSlateStatic, ReactEditor } from "slate-react";
5
6
  import GridItemPopup from "./GridItemPopup";
6
7
  import { IconButton, Tooltip, Box, Grid as Item } from "@mui/material";
7
8
  import { GridSettingsIcon } from "../../common/iconslist";
8
9
  import { useEditorContext, useEditorSelection } from "../../hooks/useMouseMove";
9
- import { getBreakPointsValue, getTRBLBreakPoints } from "../../helper/theme";
10
+ import { groupByBreakpoint, getBreakPointsValue, getBRValue, getTRBLBreakPoints } from "../../helper/theme";
10
11
  import { isEmptyNode } from "../../utils/helper";
11
- import { useTheme } from "@emotion/react";
12
+ import { wrapThemeBreakpoints } from "../FreeGrid/breakpointConstants";
12
13
  import { jsx as _jsx } from "react/jsx-runtime";
13
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
15
  const GridItemToolbar = ({
@@ -104,35 +105,44 @@ const GridItem = props => {
104
105
  const getBorderColor = () => {
105
106
  return borderColor || "transparent";
106
107
  };
108
+ const getBRProps = groupByBreakpoint({
109
+ display: {
110
+ xs: xsHidden ? "none" : "inline-block",
111
+ lg: "inline-block"
112
+ },
113
+ width: {
114
+ ...getBreakPointsValue(grid, null, "overrideGridSize", true)
115
+ },
116
+ height: {
117
+ ...getBreakPointsValue(cellGHeight || "auto")
118
+ },
119
+ borderRadius: {
120
+ ...getBreakPointsValue(borderRadius || {}, null, "overrideBorderRadius", true)
121
+ },
122
+ margin: {
123
+ ...getTRBLBreakPoints(margin)
124
+ }
125
+ }, theme);
126
+ const giInProps = groupByBreakpoint({
127
+ padding: {
128
+ ...getTRBLBreakPoints(bannerSpacing)
129
+ }
130
+ }, theme);
107
131
  return /*#__PURE__*/_jsxs(Item, {
108
132
  item: true,
109
133
  component: "div",
110
134
  className: `grid-item element-root gi-top-wrpr dpath`,
111
135
  ...attributes,
112
136
  sx: {
113
- width: {
114
- ...getBreakPointsValue(grid, null, "overrideGridSize", true)
115
- },
116
- height: {
117
- ...getBreakPointsValue(cellGHeight || "auto")
118
- },
119
- display: {
120
- lg: "flex",
121
- xs: xsHidden ? "none" : "flex"
122
- },
137
+ ...getBRProps,
138
+ display: "flex",
123
139
  flexDirection: flexDirection || "column",
124
- background: bgColor,
140
+ background: bgColor || "transparent",
125
141
  borderColor: getBorderColor(),
126
142
  borderWidth: borderWidth || "1px",
127
- borderRadius: {
128
- ...getBreakPointsValue(borderRadius || {}, null, "overrideBorderRadius", true)
129
- },
130
143
  borderStyle: borderStyle || "solid",
131
144
  alignItems: horizantal,
132
145
  justifyContent: vertical,
133
- margin: {
134
- ...getTRBLBreakPoints(margin)
135
- },
136
146
  "&:hover": {
137
147
  background: `${bgColorHover || bgColor || "transparent"}`
138
148
  }
@@ -171,9 +181,7 @@ const GridItem = props => {
171
181
  sx: {
172
182
  display: "flex",
173
183
  flexDirection: flexDirection || "column",
174
- padding: {
175
- ...getTRBLBreakPoints(bannerSpacing)
176
- },
184
+ ...giInProps,
177
185
  width: "100%",
178
186
  height: "100%",
179
187
  color: textColor || "#000",
@@ -9,7 +9,6 @@ import { removeLink } from "../../utils/link";
9
9
  import LinkPopup from "./LinkPopup";
10
10
  import "./styles.css";
11
11
  import { absoluteLink } from "../../utils/helper";
12
- import { useEditorContext } from "../../hooks/useMouseMove";
13
12
  import { jsx as _jsx } from "react/jsx-runtime";
14
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
15
14
  const Link = props => {
@@ -30,9 +29,6 @@ const Link = props => {
30
29
  const path = ReactEditor.findPath(editor, element);
31
30
  const urlPath = element.url || element.href;
32
31
  const absLink = absoluteLink(urlPath);
33
- const {
34
- theme
35
- } = useEditorContext();
36
32
  const updateLink = () => {
37
33
  Transforms.setNodes(editor, {
38
34
  href: linkData?.url,
@@ -111,8 +107,7 @@ const Link = props => {
111
107
  linkData: linkData,
112
108
  handleClose: handleClose,
113
109
  handleInputChange: handleInputChange,
114
- handleInsertLink: updateLink,
115
- theme: theme
110
+ handleInsertLink: updateLink
116
111
  })]
117
112
  });
118
113
  };
@@ -9,8 +9,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
10
  const LinkButton = props => {
11
11
  const {
12
- editor,
13
- theme
12
+ editor
14
13
  } = props;
15
14
  const linkInputRef = useRef(null);
16
15
  const [showInput, setShowInput] = useState(false);
@@ -78,8 +77,7 @@ const LinkButton = props => {
78
77
  linkData: linkData,
79
78
  handleClose: handleClose,
80
79
  handleInputChange: handleInputChange,
81
- handleInsertLink: handleInsertLink,
82
- theme: theme
80
+ handleInsertLink: handleInsertLink
83
81
  })]
84
82
  });
85
83
  };
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
2
  import { Dialog, DialogActions, DialogContent, DialogTitle, FormControl, FormControlLabel, Grid, TextField, Button, IconButton, Typography, Checkbox } from "@mui/material";
3
3
  import CloseIcon from "@mui/icons-material/Close";
4
- import LinkPopupStyles from "./LinkPopupStyles";
5
4
  import { jsx as _jsx } from "react/jsx-runtime";
6
5
  import { jsxs as _jsxs } from "react/jsx-runtime";
7
6
  const LinkPopup = props => {
@@ -10,11 +9,8 @@ const LinkPopup = props => {
10
9
  handleClose,
11
10
  linkData,
12
11
  handleInputChange,
13
- handleInsertLink,
14
- theme
12
+ handleInsertLink
15
13
  } = props;
16
- const themeType = localStorage.getItem("themeType");
17
- const classes = LinkPopupStyles(themeType);
18
14
  return /*#__PURE__*/_jsxs(Dialog, {
19
15
  fullWidth: true,
20
16
  open: open,
@@ -48,15 +44,13 @@ const LinkPopup = props => {
48
44
  style: {
49
45
  paddingTop: "12px"
50
46
  },
51
- className: classes.titleTypo,
52
47
  children: /*#__PURE__*/_jsx(TextField, {
53
48
  size: "small",
54
49
  fullWidth: true,
55
50
  value: linkData?.name,
56
51
  name: "name",
57
52
  placeholder: "Link Title",
58
- onChange: handleInputChange,
59
- sx: classes.addLinkField
53
+ onChange: handleInputChange
60
54
  })
61
55
  }), /*#__PURE__*/_jsx(Grid, {
62
56
  item: true,
@@ -70,8 +64,7 @@ const LinkPopup = props => {
70
64
  name: "url",
71
65
  value: linkData?.url,
72
66
  placeholder: "https://google.com",
73
- onChange: handleInputChange,
74
- sx: classes.addLinkField
67
+ onChange: handleInputChange
75
68
  })
76
69
  }), /*#__PURE__*/_jsx(Grid, {
77
70
  item: true,
@@ -1,9 +1,9 @@
1
1
  import React, { useState } from "react";
2
2
  import { useSlateStatic } from "slate-react";
3
3
  import PageSettingsPopup from "./PageSettingsPopup";
4
+ import { PageSettings } from "../../common/iconslist";
4
5
  import ToolbarIcon from "../../common/ToolbarIcon";
5
6
  import { getPageSettings, updatePageSettings } from "../../utils/pageSettings";
6
- import SettingsIcon from "../../assets/svg/SettingsIcon";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  import { Fragment as _Fragment } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -41,13 +41,13 @@ const PageSettingsButton = props => {
41
41
  setOpenSettings(false);
42
42
  };
43
43
  return /*#__PURE__*/_jsxs(_Fragment, {
44
- children: [from === "miniToolBar" ? /*#__PURE__*/_jsx(SettingsIcon, {
44
+ children: [from === "miniToolBar" ? /*#__PURE__*/_jsx(PageSettings, {
45
45
  onClick: onSettings,
46
46
  className: "removeDefaultSvgCls"
47
47
  }) : /*#__PURE__*/_jsx(ToolbarIcon, {
48
48
  title: "Page Settings",
49
49
  onClick: onSettings,
50
- icon: /*#__PURE__*/_jsx(SettingsIcon, {}),
50
+ icon: /*#__PURE__*/_jsx(PageSettings, {}),
51
51
  icoBtnType: icoBtnType
52
52
  }), openSetttings !== false ? /*#__PURE__*/_jsx(PageSettingsPopup, {
53
53
  element: openSetttings?.element || {},
@@ -263,12 +263,7 @@ const SignaturePopup = props => {
263
263
  name: "signedBy",
264
264
  placeholder: "Enter Name",
265
265
  size: "small",
266
- onChange: onChange,
267
- sx: {
268
- '& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline': {
269
- borderColor: '#ccc'
270
- }
271
- }
266
+ onChange: onChange
272
267
  })
273
268
  })]
274
269
  }), /*#__PURE__*/_jsxs(Grid, {
@@ -316,8 +311,7 @@ const SignaturePopup = props => {
316
311
  },
317
312
  children: [/*#__PURE__*/_jsx(Grid, {
318
313
  style: {
319
- marginRight: "8px",
320
- minWidth: '44px'
314
+ marginRight: "8px"
321
315
  },
322
316
  children: /*#__PURE__*/_jsx("label", {
323
317
  htmlFor: "signedByEmail",
@@ -332,12 +326,7 @@ const SignaturePopup = props => {
332
326
  name: "signedByEmail",
333
327
  placeholder: "Enter Email",
334
328
  size: "small",
335
- onChange: onChange,
336
- sx: {
337
- '& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline': {
338
- borderColor: '#ccc'
339
- }
340
- }
329
+ onChange: onChange
341
330
  })
342
331
  })]
343
332
  })]
@@ -6,7 +6,7 @@ import { isTextSelected } from "../../utils/helper";
6
6
  import { useEditorContext } from "../../hooks/useMouseMove";
7
7
  import SimpleTextStyle from "./style";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
- import { jsxs as _jsxs } from "react/jsx-runtime";
9
+ import { createElement as _createElement } from "react";
10
10
  const SimpleText = props => {
11
11
  const {
12
12
  theme,
@@ -38,15 +38,16 @@ const SimpleText = props => {
38
38
  const showPlaceHolder = !readOnly && path.length === 1 && isEmpty;
39
39
  const isEmptyEditor = !readOnly && isEmpty && editor.children.length === 1 && !selected;
40
40
  const opacity = !isTextSelected(editor?.selection);
41
- return /*#__PURE__*/_jsxs(Box, {
41
+ const nextType = element?.children[0]?.type;
42
+ return /*#__PURE__*/_createElement(Box, {
42
43
  ...element.attr,
43
44
  ...attributes,
44
- className: `simple-text`,
45
+ className: `simple-text ${nextType}`,
45
46
  sx: classes.root,
46
- children: [children, openAI ? null : /*#__PURE__*/_jsx("span", {
47
- className: "placeholder-simple-text",
48
- children: isEmptyEditor ? editorPlaceholder || "Write Something..." : showPlaceHolder ? opacity && selected ? "Type / to browse elements" : "" : ""
49
- })]
50
- });
47
+ key: `para_${path.join("|")}`
48
+ }, children, openAI ? null : /*#__PURE__*/_jsx("span", {
49
+ className: "placeholder-simple-text",
50
+ children: isEmptyEditor ? editorPlaceholder || "Write Something..." : showPlaceHolder ? opacity && selected ? "Type / to browse elements" : "" : ""
51
+ }));
51
52
  };
52
53
  export default SimpleText;
@@ -23,6 +23,43 @@ const SimpleTextStyle = ({
23
23
  background: "transparent",
24
24
  color: invertColor(pageColor)
25
25
  }
26
+ },
27
+ "& .freegrid-section": {
28
+ "&.enable-1:before": {
29
+ content: "' '",
30
+ pointerEvents: "none",
31
+ position: "absolute",
32
+ left: "2px",
33
+ top: "2px",
34
+ width: "calc(100% - 4px)",
35
+ height: "calc(100% - 4px)",
36
+ outline: "2px solid #2563EB",
37
+ zIndex: 1
38
+ },
39
+ "&:hover, &.enable-1": {
40
+ "& .freegrid-section-infos": {
41
+ pointerEvents: "none",
42
+ position: "absolute",
43
+ top: 0,
44
+ left: 0,
45
+ width: "100%",
46
+ zIndex: 1,
47
+ ":before": {
48
+ position: "absolute",
49
+ content: "attr(placeholder)",
50
+ left: "0px",
51
+ top: "0px",
52
+ width: "auto",
53
+ height: "auto",
54
+ backgroundColor: "#8360FD",
55
+ padding: "4px 6px",
56
+ fontSize: "12px",
57
+ fontWeight: "500",
58
+ color: "#FFF",
59
+ lineHeight: "12px"
60
+ }
61
+ }
62
+ }
26
63
  }
27
64
  },
28
65
  section: {
@@ -1,4 +1,4 @@
1
- const TableStyles = themeType => ({
1
+ const TableStyles = () => ({
2
2
  tableToolBar: {
3
3
  position: "absolute",
4
4
  top: "-34px",
@@ -61,28 +61,6 @@ const TableStyles = themeType => ({
61
61
  "&:hover": {
62
62
  background: "#ccc"
63
63
  }
64
- },
65
- deleteCellsPopUp: {
66
- backgroundColor: themeType === "dark" ? "#292C32" : "#FFFFFF",
67
- borderRadius: "7px !important",
68
- border: themeType === "dark" ? "1px solid #5B5E64" : "1px solid #E4E8EB",
69
- zIndex: 100,
70
- minWidth: "186px !important"
71
- },
72
- menuItemPopUp: {
73
- padding: "5px 7px !important",
74
- margin: "6px !important",
75
- borderRadius: 1,
76
- userSelect: "none",
77
- color: themeType === "dark" ? "#2563EB" : "#0F172A",
78
- "&:hover": {
79
- // backgroundColor: "rgba(0, 123, 255, 0.1)",
80
- backgroundColor: themeType === "dark" ? "#2563EB" : "#E9F3FE"
81
- },
82
- "&.Mui-selected": {
83
- backgroundColor: themeType === "dark" ? "#2563EB" : "#E9F3FE",
84
- color: themeType === "dark" ? "#F6F6F6" : "#0F172A"
85
- }
86
64
  }
87
65
  });
88
66
  export default TableStyles;
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from "react";
2
2
  import { Transforms } from "slate";
3
3
  import { useSelected, useSlateStatic } from "slate-react";
4
- import { Box, IconButton, Tooltip, Table as TableComp, TableBody, Popper, Typography } from "@mui/material";
4
+ import { Box, IconButton, Tooltip, Table as TableComp, TableBody } from "@mui/material";
5
5
  import AlignHorizontalLeftIcon from "@mui/icons-material/AlignHorizontalLeft";
6
6
  import AlignHorizontalRightIcon from "@mui/icons-material/AlignHorizontalRight";
7
7
  import AlignVerticalTopIcon from "@mui/icons-material/AlignVerticalTop";
@@ -15,7 +15,6 @@ import { TableUtil } from "../../utils/table";
15
15
  import TablePopup from "./TablePopup";
16
16
  import { useEditorSelection } from "../../hooks/useMouseMove";
17
17
  import TableStyles from "./Styles";
18
- import useClickOutside from "../../hooks/useClickOutside";
19
18
  import "./table.css";
20
19
  import { jsx as _jsx } from "react/jsx-runtime";
21
20
  import { jsxs as _jsxs } from "react/jsx-runtime";