@flozy/editor 9.6.9 → 9.7.1

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 (257) hide show
  1. package/dist/Editor/ChatEditor.js +49 -41
  2. package/dist/Editor/CommonEditor.js +25 -139
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +9 -13
  5. package/dist/Editor/Elements/AI/AIInput.js +3 -5
  6. package/dist/Editor/Elements/AI/CustomSelect.js +5 -9
  7. package/dist/Editor/Elements/AI/PopoverAIInput.js +2 -4
  8. package/dist/Editor/Elements/Accordion/Accordion.js +3 -4
  9. package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +1 -4
  10. package/dist/Editor/Elements/Accordion/AccordionButton.js +2 -6
  11. package/dist/Editor/Elements/Accordion/AccordionTitlePopup.js +1 -4
  12. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  13. package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +2 -6
  14. package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +1 -4
  15. package/dist/Editor/Elements/Attachments/AttachmentsButton.js +1 -4
  16. package/dist/Editor/Elements/Button/ButtonPopup.js +1 -4
  17. package/dist/Editor/Elements/Button/ButtonToolIcon.js +2 -6
  18. package/dist/Editor/Elements/Button/EditorButton.js +30 -43
  19. package/dist/Editor/Elements/Carousel/Carousel.js +4 -5
  20. package/dist/Editor/Elements/Carousel/CarouselButton.js +2 -6
  21. package/dist/Editor/Elements/Carousel/CarouselItem.js +2 -3
  22. package/dist/Editor/Elements/ChipText/ChipTextPopup.js +1 -4
  23. package/dist/Editor/Elements/CodeToText/CodeToText.js +4 -5
  24. package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +2 -6
  25. package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -60
  26. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  27. package/dist/Editor/Elements/Color Picker/ColorPicker.js +7 -10
  28. package/dist/Editor/Elements/Color Picker/Styles.js +13 -15
  29. package/dist/Editor/Elements/Colorbox/ColorboxButton.js +2 -6
  30. package/dist/Editor/Elements/DataView/DataView.js +2 -5
  31. package/dist/Editor/Elements/DataView/DataViewButton.js +2 -6
  32. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +2 -4
  33. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +6 -21
  34. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +12 -13
  35. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +4 -7
  36. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +5 -7
  37. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +7 -9
  38. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +3 -8
  39. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +3 -5
  40. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +5 -6
  41. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +3 -5
  42. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +7 -9
  43. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +12 -15
  44. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +2 -3
  45. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +2 -3
  46. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +6 -23
  47. package/dist/Editor/Elements/DataView/Layouts/TableView.js +4 -6
  48. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +4 -8
  49. package/dist/Editor/Elements/DataView/Layouts/index.js +1 -3
  50. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +2 -5
  51. package/dist/Editor/Elements/Divider/Divider.js +3 -5
  52. package/dist/Editor/Elements/Divider/DividerButton.js +2 -6
  53. package/dist/Editor/Elements/Divider/DividerPopup.js +2 -3
  54. package/dist/Editor/Elements/Embed/Embed.js +1 -4
  55. package/dist/Editor/Elements/Embed/EmbedPopup.js +1 -4
  56. package/dist/Editor/Elements/Embed/Image.js +9 -14
  57. package/dist/Editor/Elements/Embed/Video.js +6 -9
  58. package/dist/Editor/Elements/EmbedScript/Code.js +4 -7
  59. package/dist/Editor/Elements/EmbedScript/EmbedScript.js +2 -6
  60. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +5 -8
  61. package/dist/Editor/Elements/Emoji/EmojiButton.js +2 -6
  62. package/dist/Editor/Elements/Form/FieldPopup.js +1 -4
  63. package/dist/Editor/Elements/Form/Form.js +9 -12
  64. package/dist/Editor/Elements/Form/FormButton.js +2 -6
  65. package/dist/Editor/Elements/Form/FormPopup.js +2 -3
  66. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +12 -18
  67. package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +8 -13
  68. package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +2 -3
  69. package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
  70. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +2 -4
  71. package/dist/Editor/Elements/Form/Workflow/index.js +9 -15
  72. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +23 -67
  73. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +6 -31
  74. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +2 -6
  75. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +5 -38
  76. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +2 -3
  77. package/dist/Editor/Elements/FreeGrid/Options/More.js +4 -10
  78. package/dist/Editor/Elements/FreeGrid/styles.js +0 -3
  79. package/dist/Editor/Elements/Grid/Grid.js +10 -13
  80. package/dist/Editor/Elements/Grid/GridButton.js +5 -9
  81. package/dist/Editor/Elements/Grid/GridItem.js +8 -14
  82. package/dist/Editor/Elements/Grid/GridItemPopup.js +1 -4
  83. package/dist/Editor/Elements/Grid/GridPopup.js +1 -4
  84. package/dist/Editor/Elements/Grid/SectionPopup.js +1 -4
  85. package/dist/Editor/Elements/Link/Link.js +5 -8
  86. package/dist/Editor/Elements/Link/LinkButton.js +1 -4
  87. package/dist/Editor/Elements/List/CheckList.js +9 -14
  88. package/dist/Editor/Elements/NewLine/NewLineButton.js +2 -6
  89. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +1 -4
  90. package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +1 -4
  91. package/dist/Editor/Elements/Search/SearchButton.js +4 -7
  92. package/dist/Editor/Elements/Search/SearchList.js +3 -7
  93. package/dist/Editor/Elements/Signature/SignatureButton.js +2 -6
  94. package/dist/Editor/Elements/Signature/SignatureOptions/DrawSignature.js +8 -2
  95. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -6
  96. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +1 -4
  97. package/dist/Editor/Elements/Signature/SignaturePopup.js +16 -17
  98. package/dist/Editor/Elements/SimpleText/index.js +4 -5
  99. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  100. package/dist/Editor/Elements/Table/DragButton.js +2 -4
  101. package/dist/Editor/Elements/Table/Table.js +12 -24
  102. package/dist/Editor/Elements/Table/TablePopup.js +1 -4
  103. package/dist/Editor/Elements/Table/TableSelector.js +6 -10
  104. package/dist/Editor/Elements/Table/TableTool.js +4 -8
  105. package/dist/Editor/Elements/Title/title.js +10 -14
  106. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +1 -4
  107. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  108. package/dist/Editor/MiniEditor.js +3 -10
  109. package/dist/Editor/Styles/EditorStyles.js +5 -5
  110. package/dist/Editor/Toolbar/Basic/index.js +1 -2
  111. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +2 -6
  112. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  113. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  114. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +4 -8
  115. package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
  116. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +5 -17
  117. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +5 -10
  118. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +4 -10
  119. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +4 -10
  120. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +3 -9
  121. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +35 -42
  122. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
  123. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +51 -58
  124. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +22 -29
  125. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +87 -226
  126. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +10 -20
  127. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +5 -10
  128. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +11 -71
  129. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +5 -11
  130. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +45 -128
  131. package/dist/Editor/Toolbar/PopupTool/index.js +10 -20
  132. package/dist/Editor/Toolbar/Toolbar.js +10 -20
  133. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  134. package/dist/Editor/common/ColorPickerButton.js +14 -39
  135. package/dist/Editor/common/CustomDialog/index.js +10 -8
  136. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  137. package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
  138. package/dist/Editor/common/Icon.js +0 -28
  139. package/dist/Editor/common/ImageSelector/ImageSelector.js +8 -10
  140. package/dist/Editor/common/ImageSelector/Options/AddLink.js +4 -6
  141. package/dist/Editor/common/ImageSelector/Options/Upload.js +1 -1
  142. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  143. package/dist/Editor/common/ImageSelector/UploadStyles.js +9 -9
  144. package/dist/Editor/common/LinkSettings/NavComponents.js +10 -14
  145. package/dist/Editor/common/LinkSettings/index.js +14 -20
  146. package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
  147. package/dist/Editor/common/MUIIcon/index.js +3 -0
  148. package/dist/Editor/common/MentionsPopup/index.js +2 -6
  149. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -22
  150. package/dist/Editor/common/RnD/ContextMenu/index.js +2 -3
  151. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -7
  152. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +3 -8
  153. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +3 -7
  154. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  155. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  156. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  157. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  158. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +4 -7
  159. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  160. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  161. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +2 -6
  162. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  163. package/dist/Editor/common/RnD/ElementSettings/styles.js +1 -0
  164. package/dist/Editor/common/RnD/OptionsPopup/index.js +3 -4
  165. package/dist/Editor/common/RnD/ShadowElement.js +1 -2
  166. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +4 -11
  167. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  168. package/dist/Editor/common/RnD/Utils/gridDropItem.js +8 -55
  169. package/dist/Editor/common/RnD/Utils/index.js +0 -3
  170. package/dist/Editor/common/RnD/VirtualElement/index.js +103 -187
  171. package/dist/Editor/common/RnD/VirtualElement/styles.js +7 -151
  172. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +3 -5
  173. package/dist/Editor/common/RnD/index.js +13 -64
  174. package/dist/Editor/common/Section/index.js +4 -7
  175. package/dist/Editor/common/Shorthands/elements.js +3 -74
  176. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
  177. package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
  178. package/dist/Editor/common/StyleBuilder/buttonStyle.js +4 -6
  179. package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
  180. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
  181. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
  182. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +9 -13
  183. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -11
  184. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +5 -19
  185. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +10 -22
  186. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +3 -6
  187. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +13 -27
  188. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +14 -43
  189. package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +6 -10
  190. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +6 -19
  191. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +2 -6
  192. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +2 -5
  193. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -9
  194. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +2 -8
  195. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +11 -12
  196. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +2 -6
  197. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -8
  198. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +2 -6
  199. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +12 -21
  200. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  201. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  202. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  203. package/dist/Editor/common/StyleBuilder/index.js +5 -8
  204. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  205. package/dist/Editor/common/Uploader.js +5 -16
  206. package/dist/Editor/commonStyle.js +12 -23
  207. package/dist/Editor/helper/index.js +3 -27
  208. package/dist/Editor/helper/theme.js +2 -202
  209. package/dist/Editor/hooks/useDrag.js +1 -1
  210. package/dist/Editor/hooks/useEditorScroll.js +1 -0
  211. package/dist/Editor/hooks/useMouseMove.js +3 -9
  212. package/dist/Editor/plugins/withEmbeds.js +1 -1
  213. package/dist/Editor/plugins/withHTML.js +9 -11
  214. package/dist/Editor/plugins/withLayout.js +2 -3
  215. package/dist/Editor/plugins/withTable.js +1 -1
  216. package/dist/Editor/theme/ThemeList.js +173 -50
  217. package/dist/Editor/utils/SlateUtilityFunctions.js +60 -201
  218. package/dist/Editor/utils/draftToSlate.js +2 -3
  219. package/dist/Editor/utils/font.js +37 -40
  220. package/dist/Editor/utils/freegrid.js +3 -3
  221. package/dist/Editor/utils/helper.js +21 -92
  222. package/package.json +3 -3
  223. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -425
  224. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -436
  225. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  226. package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
  227. package/dist/Editor/common/CustomColorPicker/index.js +0 -131
  228. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  229. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  230. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  231. package/dist/Editor/common/CustomSelect.js +0 -43
  232. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  233. package/dist/Editor/common/RnD/VirtualElement/BoxHeaderAutoAlignment.js +0 -43
  234. package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +0 -44
  235. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +0 -134
  236. package/dist/Editor/common/RnD/VirtualElement/helper.js +0 -375
  237. package/dist/Editor/common/SnackBar/index.js +0 -43
  238. package/dist/Editor/helper/textIndeces.js +0 -58
  239. package/dist/Editor/hooks/useAutoScroll.js +0 -38
  240. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  241. package/dist/Editor/hooks/useThemeValues.js +0 -63
  242. package/dist/Editor/theme/index.js +0 -149
  243. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  244. package/dist/Editor/themeSettings/buttons/index.js +0 -290
  245. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  246. package/dist/Editor/themeSettings/colorTheme/index.js +0 -310
  247. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  248. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  249. package/dist/Editor/themeSettings/fonts/index.js +0 -240
  250. package/dist/Editor/themeSettings/fonts/style.js +0 -61
  251. package/dist/Editor/themeSettings/icons.js +0 -60
  252. package/dist/Editor/themeSettings/index.js +0 -351
  253. package/dist/Editor/themeSettings/style.js +0 -220
  254. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  255. package/dist/Editor/themeSettingsAI/index.js +0 -355
  256. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -205
  257. package/dist/Editor/themeSettingsAI/style.js +0 -259
@@ -1,6 +1,6 @@
1
1
  import React, { useCallback, useMemo, useRef, useImperativeHandle, forwardRef, useState } from "react";
2
- import { Editable, Slate, ReactEditor } from "slate-react";
3
- import { createEditor, Transforms, Editor } from "slate";
2
+ import { Editable, Slate, ReactEditor } from 'slate-react';
3
+ import { createEditor, Transforms, Editor } from 'slate';
4
4
  import withCommon from "./hooks/withCommon";
5
5
  import { getBlock, getMarked, serializeMentions } from "./utils/chatEditor/SlateUtilityFunctions";
6
6
  import MiniTextFormat from "./Toolbar/PopupTool/MiniTextFormat";
@@ -32,16 +32,15 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
32
32
  onBlur = () => {},
33
33
  isMobile = false,
34
34
  debounceTimeOut = 10,
35
- translation,
36
35
  isMarkDown = false,
37
- markDownContent = ""
36
+ markDownContent = ''
38
37
  } = props;
39
38
  const classes = usePopupStyle(theme);
40
39
  const convertedContent = draftToSlate({
41
40
  data: content && content?.length > 0 ? content : [{
42
- type: "paragraph",
41
+ type: 'paragraph',
43
42
  children: [{
44
- text: ""
43
+ text: ''
45
44
  }]
46
45
  }]
47
46
  });
@@ -148,11 +147,17 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
148
147
  };
149
148
  const {
150
149
  CHARACTERS = [],
151
- hideTools,
152
- translationMock
150
+ hideTools
153
151
  // needLayout = true,
154
152
  } = otherProps || {};
155
153
  const mentionsRef = useRef();
154
+ const customProps = {
155
+ ...(otherProps || {}),
156
+ hideTools: ["settings", "add_column", "drag", "resize"],
157
+ readOnly: isReadOnly,
158
+ editorPlaceholder: "Write Something",
159
+ page_id: 1
160
+ };
156
161
  const [mentions, setMentions] = useMentions({
157
162
  editor,
158
163
  selection: editor?.selection
@@ -184,8 +189,16 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
184
189
  children: children
185
190
  });
186
191
  };
192
+ const isEmpty = node => {
193
+ if (node.text && node.text.trim()) return false;
194
+ if (node.url && node.url.trim()) return false;
195
+ if (node.children) {
196
+ return node.children.every(isEmpty);
197
+ }
198
+ return true;
199
+ };
187
200
  const handleEditorChange = newValue => {
188
- console.log("🚀 ~ handleEditorChange ~ newValue:", newValue);
201
+ const isSlateEmpty = newValue.every(isEmpty);
189
202
  if (editor.children.length === 0) {
190
203
  Transforms.insertNodes(editor, {
191
204
  type: "paragraph",
@@ -194,34 +207,32 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
194
207
  }]
195
208
  });
196
209
  } else {
197
- newValue.forEach((val, index) => {
198
- if (val?.type === "table") {
199
- const nextNode = newValue[index + 1];
200
- if (!nextNode || nextNode.type !== "paragraph") {
201
- Transforms.insertNodes(editor, {
202
- type: "paragraph",
203
- children: [{
204
- text: ""
205
- }]
206
- }, {
207
- at: [index + 1]
208
- });
210
+ const lastNode = newValue?.[newValue.length - 1] || null;
211
+ if (isSlateEmpty && lastNode?.type !== "paragraph") {
212
+ Transforms.removeNodes(editor, {
213
+ at: [0]
214
+ });
215
+ } else {
216
+ newValue.forEach((val, index) => {
217
+ if (val?.type === "table") {
218
+ const nextNode = newValue[index + 1];
219
+ if (!nextNode || nextNode.type !== "paragraph") {
220
+ Transforms.insertNodes(editor, {
221
+ type: "paragraph",
222
+ children: [{
223
+ text: ""
224
+ }]
225
+ }, {
226
+ at: [index + 1]
227
+ });
228
+ }
209
229
  }
210
- }
211
- });
230
+ });
231
+ }
212
232
  }
213
233
  debounced(newValue);
214
234
  debouncedValue.current = newValue;
215
235
  };
216
- const dummyTranslation = () => {};
217
- const customProps = {
218
- ...(otherProps || {}),
219
- hideTools: ["settings", "add_column", "drag", "resize"],
220
- readOnly: isReadOnly,
221
- editorPlaceholder: "Write Something",
222
- page_id: 1,
223
- translation: translation || translationMock || dummyTranslation
224
- };
225
236
  const Element = props => {
226
237
  return getBlock(props);
227
238
  };
@@ -257,7 +268,7 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
257
268
  editor
258
269
  });
259
270
  } else if (event.key === "Enter" && !isMobile) {
260
- const isEmpty = debouncedValue?.current.length === 1 && debouncedValue?.current[0].type === "paragraph" && debouncedValue?.current[0].children.length === 1 && debouncedValue?.current[0].children[0].text === "";
271
+ const isEmpty = debouncedValue?.current.length === 1 && debouncedValue?.current[0].type === 'paragraph' && debouncedValue?.current[0].children.length === 1 && debouncedValue?.current[0].children[0].text === '';
261
272
  if (isEmpty) {
262
273
  event.preventDefault();
263
274
  return;
@@ -297,10 +308,10 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
297
308
  }
298
309
  };
299
310
 
300
- const html = isMarkDown ? convertMDToHTML(markDownContent) : null;
301
311
  const handleFocus = () => {
302
312
  setIsFocused(true);
303
313
  };
314
+ const html = isMarkDown ? convertMDToHTML(markDownContent) : null;
304
315
  return !isMarkDown ? /*#__PURE__*/_jsx(EditorProvider, {
305
316
  theme: theme,
306
317
  editor: editor,
@@ -311,20 +322,18 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
311
322
  children: [toolBar && /*#__PURE__*/_jsx(MiniTextFormat, {
312
323
  classes: classes,
313
324
  editor: editor,
314
- closeMainPopup: handleClose,
315
- customProps: customProps
325
+ closeMainPopup: handleClose
316
326
  }), /*#__PURE__*/_jsx(Editable, {
327
+ onFocus: handleFocus,
317
328
  className: "chatEditorRoot",
318
329
  renderElement: renderElement,
319
330
  renderLeaf: renderLeaf,
320
331
  decorate: decorators,
321
332
  placeholder: "Start typing ...",
322
333
  spellCheck: true,
323
- onFocus: handleFocus,
324
334
  onBlur: handleBlur,
325
335
  onKeyDown: onKeyDown,
326
- onPaste: handlePaste,
327
- customProps: customProps
336
+ onPaste: handlePaste
328
337
  }), !readOnly && isFocused ? /*#__PURE__*/_jsx(MentionsPopup, {
329
338
  ref: mentionsRef,
330
339
  mentions: mentions,
@@ -334,8 +343,7 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
334
343
  index: index,
335
344
  chars: chars,
336
345
  type: type,
337
- theme: theme,
338
- customProps: customProps
346
+ theme: theme
339
347
  }) : null]
340
348
  }, id)
341
349
  }) : /*#__PURE__*/_jsx("div", {
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable no-unused-vars */
2
- import React, { useRef, useCallback, useEffect, useMemo, useState, forwardRef, useImperativeHandle, createContext } from "react";
2
+ import React, { useRef, useCallback, useEffect, useMemo, useState, forwardRef, useImperativeHandle } from "react";
3
3
  import PropTypes from "prop-types";
4
- import { createEditor, Editor, Range, Transforms } from "slate";
4
+ import { createEditor, Range, Transforms } from "slate";
5
5
  import { Slate, Editable, ReactEditor } from "slate-react";
6
6
  import { useDebouncedCallback } from "use-debounce";
7
7
  import { getMarked, getBlock } from "./utils/SlateUtilityFunctions";
@@ -15,9 +15,9 @@ import withCommon from "./hooks/withCommon";
15
15
  import DialogWrapper from "./DialogWrapper";
16
16
  import { serializeToText } from "./utils/serializeToText";
17
17
  import { getPageSettings } from "./utils/pageSettings";
18
- import { getThumbnailImage, invertColor, pageTextStyle } from "./helper";
18
+ import { getThumbnailImage, invertColor } from "./helper";
19
19
  import PopupTool from "./Toolbar/PopupTool";
20
- import { Box, Typography, useTheme, IconButton } from "@mui/material";
20
+ import { Box, Typography, useTheme } from "@mui/material";
21
21
  import Shorthands from "./common/Shorthands";
22
22
  import MiniToolbar from "./Toolbar/Mini/MiniToolbar";
23
23
  import { EditorProvider } from "./hooks/useMouseMove";
@@ -26,12 +26,9 @@ import editorStyles from "./Styles/EditorStyles";
26
26
  import DragAndDrop from "./common/DnD";
27
27
  import Section from "./common/Section";
28
28
  import decorators from "./utils/Decorators";
29
- import { getTRBLBreakPoints, getVariableValue, getBreakpointLineSpacing } from "./helper/theme";
29
+ import { getBreakpointLineSpacing, getTRBLBreakPoints } from "./helper/theme";
30
30
  import { getInitialValue, handleInsertLastElement, isEverythingSelected, isFreeGrid, isFreeGridFragment, isRestrictedNode, outsideEditorClickLabel } from "./utils/helper";
31
31
  import useWindowResize from "./hooks/useWindowResize";
32
- import { getTheme } from "./theme";
33
- import ThemeSettings from "./themeSettings";
34
- import ThemeSettingsAI from "./themeSettingsAI";
35
32
  import PopoverAIInput from "./Elements/AI/PopoverAIInput";
36
33
  import RnDCopy from "./common/RnD/RnDCopy";
37
34
  import SwitchViewport from "./common/RnD/SwitchViewport/SwitchViewport";
@@ -40,12 +37,9 @@ import "./font.css";
40
37
  import "./Editor.css";
41
38
  import "animate.css";
42
39
  import FontLoader from "./common/FontLoader/FontLoader";
43
- import { ThemeAIIcon, ThemePaintIcon } from "./assets/svg/ThemeIcons";
44
40
  import { CustomDialogComponent } from "./common/CustomDialog";
45
- import { extractTextWithPath, replaceTextPath } from "./helper/textIndeces.js";
46
41
  import { jsx as _jsx } from "react/jsx-runtime";
47
42
  import { jsxs as _jsxs } from "react/jsx-runtime";
48
- export const ThemeContext = /*#__PURE__*/createContext(null);
49
43
  const Item = /*#__PURE__*/forwardRef(({
50
44
  children,
51
45
  ...props
@@ -87,7 +81,6 @@ const updateTopBanner = (content = [], setTopBanner) => {
87
81
  return firstNode?.type === "topbanner" ? firstNode : null;
88
82
  });
89
83
  };
90
- const dummyTranslation = () => {};
91
84
  const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
92
85
  const {
93
86
  id,
@@ -101,16 +94,13 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
101
94
  otherProps,
102
95
  isIframe,
103
96
  theme,
104
- showThemeButtons,
105
97
  showViewport = false,
106
- overrideWrapperStyles = {},
107
- translation
98
+ overrideWrapperStyles = {}
108
99
  } = props;
109
100
  const editorWrapper = useRef();
110
101
  const mentionsRef = useRef();
111
102
  const convertedContent = draftToSlate({
112
- data: content,
113
- needLayout: otherProps?.needLayout
103
+ data: content
114
104
  });
115
105
  const [value, setValue] = useState(convertedContent);
116
106
  const [isInteracted, setIsInteracted] = useState(false);
@@ -135,15 +125,12 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
135
125
  editorClass,
136
126
  fixedWidth = "60%",
137
127
  fullWidth = "80%",
138
- hideTools = [],
139
- translationMock
128
+ hideTools = []
140
129
  } = otherProps || {};
141
- const translationFn = translation || translationMock || dummyTranslation;
142
130
  const editor = useMemo(() => {
143
131
  if (collaborativeEditor) return collaborativeEditor;
144
132
  const editor = createEditor();
145
133
  editor.needLayout = needLayout;
146
- editor.translation = translationFn;
147
134
  return withCommon(editor, {
148
135
  needLayout
149
136
  });
@@ -154,11 +141,10 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
154
141
  const {
155
142
  bannerSpacing,
156
143
  pageBgImage,
157
- pageColor = "",
144
+ pageColor,
158
145
  color: pageTextColor,
159
146
  pageWidth,
160
147
  maxWidth: pageMaxWidth,
161
- theme: selectedTheme,
162
148
  lineHeight
163
149
  } = pageSt?.pageProps || {
164
150
  bannerSpacing: {
@@ -170,17 +156,10 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
170
156
  };
171
157
  const classes = editorStyles({
172
158
  padHeight: !fullScreen ? otherProps?.padHeight : 20,
173
- placeHolderColor: invertColor(pageColor.startsWith("var") ? getVariableValue(pageColor) : pageColor || "#FFF"),
159
+ placeHolderColor: invertColor(pageColor || "#FFF"),
174
160
  theme,
175
161
  overrideWrapperStyles
176
162
  });
177
- const [openTheme, setOpenTheme] = useState(false);
178
- const [openAITheme, setOpenAITheme] = useState(false);
179
- const [, setThemeUpdated] = useState(0);
180
- const triggerRender = () => {
181
- setThemeUpdated(prev => prev + 1); // Incrementing forces a re-render while updating theme
182
- };
183
-
184
163
  const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
185
164
  useEffect(() => {
186
165
  setValue(draftToSlate({
@@ -194,11 +173,11 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
194
173
  const debounced = useDebouncedCallback(
195
174
  // function
196
175
  value => {
197
- debouncedValue.current = value;
198
176
  const {
199
177
  value: strVal,
200
178
  ...restVal
201
179
  } = getOnSaveData(value);
180
+ debouncedValue.current = value;
202
181
  onSave(strVal, restVal);
203
182
  },
204
183
  // delay in ms
@@ -209,7 +188,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
209
188
  return {
210
189
  value: JSON.stringify(val),
211
190
  text: text,
212
- title: serializeToText(title?.children) || ""
191
+ title: serializeToText(title?.children) || "Untitled"
213
192
  };
214
193
  };
215
194
  const getTitleSaveData = title => {
@@ -241,9 +220,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
241
220
 
242
221
  const onSwitchBreakpoint = b => {
243
222
  setBreakpoint(b);
244
- setTimeout(() => {
245
- reRenderAllNodes();
246
- }, 0);
223
+ reRenderAllNodes();
247
224
  };
248
225
  useImperativeHandle(ref, () => ({
249
226
  async getThumbnail(needBackground = false, options = {}) {
@@ -298,6 +275,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
298
275
  },
299
276
  toggleFullscreen() {
300
277
  setFullScreen(!fullScreen);
278
+ Transforms.deselect(editor);
301
279
  },
302
280
  toggleToolbarShow() {
303
281
  setToolbarShow(!toolbarShow);
@@ -321,12 +299,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
321
299
  redo() {
322
300
  editor?.redo();
323
301
  },
324
- toggleTheme() {
325
- setOpenTheme(!openTheme);
326
- },
327
- toggleAITheme() {
328
- setOpenAITheme(!openAITheme);
329
- },
330
302
  getPageSettings: {
331
303
  background: pageBgImage && pageBgImage !== "none" ? `url(${pageBgImage})` : pageColor || ""
332
304
  }
@@ -352,7 +324,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
352
324
  ...mentions,
353
325
  CHARACTERS,
354
326
  hideTools: updatedHideTools || [],
355
- translation: translation || translationFn,
356
327
  editor
357
328
  }) : [];
358
329
  const handleEditorChange = newValue => {
@@ -380,10 +351,9 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
380
351
  isIframe: isIframe,
381
352
  onDrawerOpen: onDrawerOpen,
382
353
  ICON_API: "https://assets.agenciflow.com",
383
- translation: translationFn,
384
354
  getTitleSaveData
385
355
  };
386
- const lineH = getBreakpointLineSpacing(lineHeight, breakpoint || (isMobile ? "xs" : ""));
356
+ const lineH = getBreakpointLineSpacing(lineHeight, breakpoint);
387
357
  const renderElement = useCallback(props => {
388
358
  return /*#__PURE__*/_jsx(Element, {
389
359
  ...props,
@@ -516,7 +486,9 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
516
486
  window.open("https://www.flozy.com", "_blank");
517
487
  };
518
488
  const editorWrapperStyle = useMemo(() => {
519
- const style = {};
489
+ const style = {
490
+ color: pageTextColor || ""
491
+ };
520
492
  if (pageBgImage && pageBgImage !== "none") {
521
493
  style.backgroundImage = `url(${pageBgImage})`;
522
494
  style.backgroundSize = `cover`;
@@ -526,7 +498,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
526
498
  }
527
499
  return style;
528
500
  }, [pageBgImage, pageColor, pageTextColor]);
529
- const themeProps = getTheme(selectedTheme);
530
501
 
531
502
  // const handleContextMenu = (e) => {
532
503
  // if (!readOnly) {
@@ -535,7 +506,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
535
506
  // }
536
507
  // };
537
508
 
538
- const gradientColor = pageTextStyle(pageTextColor);
539
509
  const handleCursorScroll = container => {
540
510
  try {
541
511
  if (!customProps?.isMobile) {
@@ -557,74 +527,14 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
557
527
  console.log("handleCursorScroll", err);
558
528
  }
559
529
  };
560
- window.getTextIndeces = () => {
561
- try {
562
- const textWithPaths = extractTextWithPath(editor.children, []);
563
- return textWithPaths;
564
- } catch (err) {
565
- console.log(err);
566
- }
567
- };
568
- window.replaceTextIndeces = (path_data = []) => {
569
- try {
570
- const replacedJson = replaceTextPath(JSON.parse(JSON.stringify(editor.children)), path_data);
571
-
572
- // loop delete all
573
- editor.children.forEach(() => {
574
- Transforms.delete(editor, {
575
- at: [0]
576
- });
577
- });
578
-
579
- // Insert new nodes
580
- Transforms.insertNodes(editor, replacedJson, {
581
- at: [0]
582
- });
583
- } catch (err) {
584
- console.log(err);
585
- }
586
- };
587
- window.replaceEditorContent = (fragments = []) => {
588
- try {
589
- // loop delete all
590
- editor.children.forEach(() => {
591
- Transforms.delete(editor, {
592
- at: [0]
593
- });
594
- });
595
-
596
- // Insert new nodes
597
- Transforms.insertNodes(editor, fragments, {
598
- at: [0]
599
- });
600
- } catch (err) {
601
- console.log(err);
602
- }
603
- };
604
530
  return /*#__PURE__*/_jsxs(EditorProvider, {
605
531
  theme: theme,
606
532
  editor: editor,
607
- openTheme: openTheme,
608
- setOpenTheme: setOpenTheme,
609
- triggerRender: triggerRender,
610
- children: [showThemeButtons ? /*#__PURE__*/_jsxs("div", {
611
- className: "theme-buttons",
612
- children: [/*#__PURE__*/_jsx(IconButton, {
613
- onClick: () => setOpenTheme(true),
614
- children: /*#__PURE__*/_jsx(ThemePaintIcon, {})
615
- }), /*#__PURE__*/_jsx(IconButton, {
616
- onClick: () => setOpenAITheme(true),
617
- style: {
618
- marginTop: "4px"
619
- },
620
- children: /*#__PURE__*/_jsx(ThemeAIIcon, {})
621
- })]
622
- }) : null, /*#__PURE__*/_jsx(DialogWrapper, {
533
+ children: [/*#__PURE__*/_jsx(DialogWrapper, {
623
534
  classes: classes,
624
535
  ...props,
625
536
  fullScreen: fullScreen,
626
537
  footer: footer || "",
627
- selectedTheme: selectedTheme,
628
538
  children: /*#__PURE__*/_jsxs(Box, {
629
539
  component: "div",
630
540
  className: `et-wrpr stimulate-${breakpoint} ${editorClass || ""} ${isIframe ? "iframe-editor" : ""}`,
@@ -643,12 +553,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
643
553
  children: /*#__PURE__*/_jsxs(Overlay, {
644
554
  children: [/*#__PURE__*/_jsx(Box, {
645
555
  className: `pc-${editorClass || ""} ${hasTopBanner() ? "has-topbanner" : ""} ${!pageColor ? "no-color" : ""} scrollable-content scrollSmooth ${readOnly ? "readOnlyContainer" : ""}`,
646
- sx: {
647
- ...classes.slateWrapper,
648
- '& span[data-slate-string="true"]': {
649
- ...gradientColor
650
- }
651
- },
556
+ sx: classes.slateWrapper,
652
557
  id: "slate-wrapper-scroll-container",
653
558
  ref: editorWrapper,
654
559
  onClick: e => {
@@ -659,7 +564,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
659
564
  children: /*#__PURE__*/_jsxs(Box, {
660
565
  component: "div",
661
566
  className: "max-content",
662
- sx: themeProps?.sxProps || {},
663
567
  "data-info": outsideEditorClickLabel,
664
568
  children: [renderTopBanner(), /*#__PURE__*/_jsx("div", {
665
569
  className: "scroll-area",
@@ -704,7 +608,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
704
608
  chars: chars,
705
609
  type: type,
706
610
  theme: theme,
707
- customProps: customProps,
708
611
  otherProps: customProps
709
612
  }) : null, /*#__PURE__*/_jsx(RnDCopy, {
710
613
  readOnly: readOnly
@@ -715,8 +618,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
715
618
  theme: theme
716
619
  }) : null, /*#__PURE__*/_jsx(PopoverAIInput, {
717
620
  otherProps: otherProps || {},
718
- editorWrapper: editorWrapper,
719
- translation: translation || translationMock
621
+ editorWrapper: editorWrapper
720
622
  }), footer && (fullScreen || readOnly) && /*#__PURE__*/_jsx(Typography, {
721
623
  sx: {
722
624
  color: "rgb(100, 116, 139)",
@@ -728,18 +630,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
728
630
  "data-info": outsideEditorClickLabel,
729
631
  onClick: handleFooterClick,
730
632
  children: footer
731
- }), openTheme ? /*#__PURE__*/_jsx(ThemeSettings, {
732
- open: openTheme,
733
- setOpen: setOpenTheme,
734
- editor: editor,
735
- services: otherProps?.services,
736
- appTheme: theme,
737
- customProps: customProps
738
- }) : null, /*#__PURE__*/_jsx(ThemeSettingsAI, {
739
- openAITheme: openAITheme,
740
- setOpenAITheme: setOpenAITheme,
741
- onSaveTheme: otherProps?.onSaveTheme,
742
- theme: theme
743
633
  })]
744
634
  })
745
635
  }), !readOnly ? /*#__PURE__*/_jsx(PopupTool, {
@@ -748,17 +638,14 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
748
638
  setIsTextSelected: setIsTextSelected,
749
639
  customProps: customProps,
750
640
  editorWrapper: editorWrapper
751
- }) : null, !readOnly ? /*#__PURE__*/_jsx(SwitchViewport, {
641
+ }) : null, !readOnly && showViewport ? /*#__PURE__*/_jsx(SwitchViewport, {
752
642
  breakpoint: breakpoint,
753
- show: showViewport,
754
- onChange: b => onSwitchBreakpoint(b),
755
- translation: translation || translationMock
643
+ onChange: b => onSwitchBreakpoint(b)
756
644
  }) : null]
757
645
  })
758
646
  }), htmlAction.showInput && /*#__PURE__*/_jsx(CodeToText, {
759
647
  ...htmlAction,
760
- handleCodeToText: handleCodeToText,
761
- translation: translation || translationMock
648
+ handleCodeToText: handleCodeToText
762
649
  })]
763
650
  }, id), /*#__PURE__*/_jsx(FontLoader, {
764
651
  otherProps: {
@@ -774,8 +661,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
774
661
  cancelText: "Cancel",
775
662
  onConfirm: () => {
776
663
  handleDeleteAll();
777
- },
778
- translation: translation || translationMock
664
+ }
779
665
  })]
780
666
  });
781
667
  });
@@ -2,7 +2,6 @@ import React from "react";
2
2
  import { Dialog, DialogTitle, DialogContent, IconButton, Grid } from "@mui/material";
3
3
  import CloseIcon from "@mui/icons-material/Close";
4
4
  import ViewportStimulator from "./common/RnD/Theme/ViewportStimulator";
5
- import MainThemeProvider from "./common/RnD/Theme/MainThemeProvider";
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
7
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
7
  const DialogWrapper = props => {
@@ -10,45 +9,40 @@ const DialogWrapper = props => {
10
9
  fullScreen,
11
10
  onClose,
12
11
  children,
13
- classes,
14
- selectedTheme
12
+ classes
15
13
  } = props;
16
- return fullScreen ? /*#__PURE__*/_jsx(MainThemeProvider, {
17
- userSelectedTheme: selectedTheme,
18
- children: /*#__PURE__*/_jsxs(Dialog, {
19
- className: `dialogComp`,
20
- open: fullScreen,
21
- fullScreen: fullScreen,
22
- onClose: onClose,
14
+ return fullScreen ? /*#__PURE__*/_jsxs(Dialog, {
15
+ className: `dialogComp`,
16
+ open: fullScreen,
17
+ fullScreen: fullScreen,
18
+ onClose: onClose,
19
+ style: {
20
+ zIndex: 1000
21
+ },
22
+ sx: classes.fullScreenWrapper,
23
+ children: [/*#__PURE__*/_jsx(DialogTitle, {
23
24
  style: {
24
- zIndex: 1000
25
+ padding: "6px 8px"
25
26
  },
26
- sx: classes.fullScreenWrapper,
27
- children: [/*#__PURE__*/_jsx(DialogTitle, {
28
- style: {
29
- padding: "6px 8px"
30
- },
27
+ children: /*#__PURE__*/_jsx(Grid, {
31
28
  children: /*#__PURE__*/_jsx(Grid, {
32
- children: /*#__PURE__*/_jsx(Grid, {
29
+ style: {
30
+ display: "flex",
31
+ justifyContent: "end"
32
+ },
33
+ children: /*#__PURE__*/_jsx(IconButton, {
34
+ onClick: onClose,
33
35
  style: {
34
- display: "flex",
35
- justifyContent: "end"
36
+ background: "rgba(255,255,255,0.5)"
36
37
  },
37
- children: /*#__PURE__*/_jsx(IconButton, {
38
- onClick: onClose,
39
- style: {
40
- background: "rgba(255,255,255,0.5)"
41
- },
42
- children: /*#__PURE__*/_jsx(CloseIcon, {})
43
- })
38
+ children: /*#__PURE__*/_jsx(CloseIcon, {})
44
39
  })
45
40
  })
46
- }), /*#__PURE__*/_jsx(DialogContent, {
47
- children: children
48
- })]
49
- })
41
+ })
42
+ }), /*#__PURE__*/_jsx(DialogContent, {
43
+ children: children
44
+ })]
50
45
  }) : /*#__PURE__*/_jsx(ViewportStimulator, {
51
- selectedTheme: selectedTheme,
52
46
  children: children
53
47
  });
54
48
  };
@@ -1282,8 +1282,8 @@ blockquote {
1282
1282
  }
1283
1283
  @media (max-width: 899px) {
1284
1284
  /* Qa validation required */
1285
- /* .MuiPopover-root {
1286
- z-index: 1302 !important;
1285
+ /* .MuiPopover-root {
1286
+ z-index: 1302 !important;
1287
1287
  } */
1288
1288
 
1289
1289
  canvas {
@@ -1342,23 +1342,19 @@ code.markcode {
1342
1342
  background-color: #f3f3f3;
1343
1343
  font-family: 'Source Code Pro' !important;
1344
1344
  }
1345
-
1346
1345
  /* Hide the popper when the reference is hidden */
1347
1346
  .hide-popper-on-overlap[data-popper-escaped],
1348
1347
  .hide-popper-on-overlap[data-popper-reference-hidden] {
1349
1348
  visibility: hidden;
1350
1349
  pointer-events: none;
1351
1350
  }
1352
-
1353
- .theme-buttons {
1354
- display: flex;
1355
- justify-content: end;
1356
- align-items: center;
1357
- margin: auto;
1358
- position: absolute;
1359
- top: 60px;
1360
- right: 20px;
1361
- z-index: 1000;
1351
+ code.markcode {
1352
+ border-radius: 4px;
1353
+ padding: 6px 8px;
1354
+ margin: 8px 0px;
1355
+ display: block;
1356
+ background-color: #f3f3f3;
1357
+ font-family: 'Source Code Pro' !important;
1362
1358
  }
1363
1359
 
1364
1360
  .hyperLink {