@flozy/editor 9.1.5 → 9.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/dist/Editor/ChatEditor.js +9 -33
  2. package/dist/Editor/CommonEditor.js +43 -121
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +1 -19
  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 +14 -31
  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 +12 -57
  26. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  27. package/dist/Editor/Elements/Color Picker/ColorPicker.js +5 -5
  28. package/dist/Editor/Elements/Color Picker/Styles.js +1 -1
  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 +1 -4
  33. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +4 -3
  34. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +1 -6
  35. package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +9 -19
  36. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +12 -13
  37. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +4 -7
  38. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +5 -7
  39. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +7 -9
  40. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +2 -3
  41. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +3 -5
  42. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +5 -6
  43. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +3 -5
  44. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +6 -7
  45. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +12 -15
  46. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +2 -3
  47. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +2 -3
  48. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +6 -12
  49. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +2 -32
  50. package/dist/Editor/Elements/DataView/Layouts/TableView.js +33 -132
  51. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +3 -3
  52. package/dist/Editor/Elements/DataView/Layouts/index.js +1 -3
  53. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +3 -6
  54. package/dist/Editor/Elements/DataView/styles.js +8 -8
  55. package/dist/Editor/Elements/Divider/Divider.js +3 -5
  56. package/dist/Editor/Elements/Divider/DividerButton.js +2 -6
  57. package/dist/Editor/Elements/Divider/DividerPopup.js +2 -3
  58. package/dist/Editor/Elements/Embed/Embed.js +1 -4
  59. package/dist/Editor/Elements/Embed/EmbedPopup.js +1 -4
  60. package/dist/Editor/Elements/Embed/Image.js +11 -16
  61. package/dist/Editor/Elements/Embed/Video.js +7 -10
  62. package/dist/Editor/Elements/EmbedScript/Code.js +4 -7
  63. package/dist/Editor/Elements/EmbedScript/EmbedScript.js +2 -6
  64. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +5 -8
  65. package/dist/Editor/Elements/Emoji/EmojiButton.js +2 -6
  66. package/dist/Editor/Elements/Form/FieldPopup.js +1 -4
  67. package/dist/Editor/Elements/Form/Form.js +9 -12
  68. package/dist/Editor/Elements/Form/FormButton.js +2 -6
  69. package/dist/Editor/Elements/Form/FormPopup.js +2 -3
  70. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +12 -18
  71. package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +8 -13
  72. package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +2 -3
  73. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +2 -4
  74. package/dist/Editor/Elements/Form/Workflow/index.js +9 -15
  75. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +18 -21
  76. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +2 -6
  77. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +2 -6
  78. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +3 -8
  79. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +2 -3
  80. package/dist/Editor/Elements/FreeGrid/Options/More.js +3 -4
  81. package/dist/Editor/Elements/FreeGrid/styles.js +0 -3
  82. package/dist/Editor/Elements/Grid/Grid.js +10 -13
  83. package/dist/Editor/Elements/Grid/GridButton.js +5 -9
  84. package/dist/Editor/Elements/Grid/GridItem.js +10 -15
  85. package/dist/Editor/Elements/Grid/GridItemPopup.js +1 -4
  86. package/dist/Editor/Elements/Grid/GridPopup.js +1 -4
  87. package/dist/Editor/Elements/Grid/SectionPopup.js +1 -4
  88. package/dist/Editor/Elements/Link/Link.js +44 -74
  89. package/dist/Editor/Elements/Link/LinkButton.js +1 -4
  90. package/dist/Editor/Elements/List/CheckList.js +9 -14
  91. package/dist/Editor/Elements/NewLine/NewLineButton.js +2 -6
  92. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +1 -4
  93. package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +1 -4
  94. package/dist/Editor/Elements/Search/SearchButton.js +3 -6
  95. package/dist/Editor/Elements/Search/SearchList.js +3 -7
  96. package/dist/Editor/Elements/Signature/SignatureButton.js +2 -6
  97. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -6
  98. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +1 -4
  99. package/dist/Editor/Elements/Signature/SignaturePopup.js +16 -17
  100. package/dist/Editor/Elements/SimpleText/index.js +5 -5
  101. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  102. package/dist/Editor/Elements/Table/DragButton.js +2 -4
  103. package/dist/Editor/Elements/Table/Table.js +32 -56
  104. package/dist/Editor/Elements/Table/TableCell.js +3 -4
  105. package/dist/Editor/Elements/Table/TablePopup.js +1 -4
  106. package/dist/Editor/Elements/Table/TableSelector.js +6 -10
  107. package/dist/Editor/Elements/Table/TableTool.js +4 -8
  108. package/dist/Editor/Elements/Title/title.js +31 -13
  109. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +1 -4
  110. package/dist/Editor/Elements/Variables/Style.js +2 -28
  111. package/dist/Editor/Elements/Variables/VariableButton.js +4 -17
  112. package/dist/Editor/MiniEditor.js +3 -9
  113. package/dist/Editor/Styles/EditorStyles.js +5 -5
  114. package/dist/Editor/Toolbar/Basic/index.js +1 -2
  115. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +2 -6
  116. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  117. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  118. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +4 -8
  119. package/dist/Editor/Toolbar/FormatTools/TextSize.js +15 -7
  120. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +3 -6
  121. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +13 -19
  122. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +4 -10
  123. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +4 -10
  124. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +2 -6
  125. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +35 -42
  126. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
  127. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +51 -58
  128. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +22 -29
  129. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +87 -226
  130. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +7 -15
  131. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +4 -8
  132. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +12 -16
  133. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +5 -11
  134. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +32 -84
  135. package/dist/Editor/Toolbar/PopupTool/index.js +1 -2
  136. package/dist/Editor/Toolbar/Toolbar.js +10 -20
  137. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  138. package/dist/Editor/common/ColorPickerButton.js +9 -35
  139. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  140. package/dist/Editor/common/DnD/Draggable.js +1 -0
  141. package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
  142. package/dist/Editor/common/Icon.js +0 -28
  143. package/dist/Editor/common/ImageSelector/ImageSelector.js +8 -10
  144. package/dist/Editor/common/ImageSelector/Options/AddLink.js +4 -6
  145. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  146. package/dist/Editor/common/ImageSelector/UploadStyles.js +1 -0
  147. package/dist/Editor/common/LinkSettings/NavComponents.js +10 -14
  148. package/dist/Editor/common/LinkSettings/index.js +14 -20
  149. package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
  150. package/dist/Editor/common/MentionsPopup/Styles.js +12 -6
  151. package/dist/Editor/common/MentionsPopup/index.js +2 -6
  152. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -22
  153. package/dist/Editor/common/RnD/ContextMenu/index.js +2 -3
  154. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -7
  155. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +3 -8
  156. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +3 -7
  157. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  158. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  159. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  160. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  161. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +4 -7
  162. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  163. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  164. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +2 -4
  165. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  166. package/dist/Editor/common/RnD/OptionsPopup/index.js +3 -4
  167. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +4 -11
  168. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +10 -31
  169. package/dist/Editor/common/RnD/Utils/gridDropItem.js +4 -5
  170. package/dist/Editor/common/RnD/Utils/index.js +0 -45
  171. package/dist/Editor/common/RnD/index.js +7 -34
  172. package/dist/Editor/common/Section/index.js +4 -7
  173. package/dist/Editor/common/Shorthands/elements.js +4 -75
  174. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
  175. package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
  176. package/dist/Editor/common/StyleBuilder/buttonStyle.js +4 -6
  177. package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
  178. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
  179. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
  180. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +9 -13
  181. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -11
  182. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +5 -19
  183. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +10 -22
  184. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +3 -6
  185. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +13 -27
  186. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +14 -41
  187. package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +6 -10
  188. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +6 -19
  189. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +2 -6
  190. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +2 -5
  191. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -9
  192. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +2 -4
  193. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +11 -12
  194. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +2 -6
  195. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -8
  196. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +2 -6
  197. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +12 -21
  198. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  199. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  200. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  201. package/dist/Editor/common/StyleBuilder/index.js +3 -4
  202. package/dist/Editor/common/Uploader.js +5 -16
  203. package/dist/Editor/commonStyle.js +69 -114
  204. package/dist/Editor/helper/index.js +2 -2
  205. package/dist/Editor/helper/theme.js +2 -200
  206. package/dist/Editor/hooks/useMouseMove.js +3 -9
  207. package/dist/Editor/plugins/withEmbeds.js +1 -1
  208. package/dist/Editor/plugins/withHTML.js +14 -19
  209. package/dist/Editor/plugins/withLayout.js +2 -3
  210. package/dist/Editor/plugins/withTable.js +1 -1
  211. package/dist/Editor/theme/ThemeList.js +173 -50
  212. package/dist/Editor/utils/SlateUtilityFunctions.js +45 -162
  213. package/dist/Editor/utils/button.js +14 -0
  214. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +0 -23
  215. package/dist/Editor/utils/draftToSlate.js +2 -3
  216. package/dist/Editor/utils/font.js +37 -40
  217. package/dist/Editor/utils/helper.js +27 -59
  218. package/dist/Editor/utils/link.js +1 -1
  219. package/dist/Editor/utils/table.js +0 -8
  220. package/package.json +2 -5
  221. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -438
  222. package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
  223. package/dist/Editor/common/CustomColorPicker/index.js +0 -106
  224. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  225. package/dist/Editor/common/CustomDialog/index.js +0 -88
  226. package/dist/Editor/common/CustomDialog/styles.js +0 -80
  227. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  228. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  229. package/dist/Editor/common/CustomSelect.js +0 -33
  230. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  231. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  232. package/dist/Editor/theme/index.js +0 -144
  233. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  234. package/dist/Editor/themeSettings/buttons/index.js +0 -283
  235. package/dist/Editor/themeSettings/buttons/style.js +0 -21
  236. package/dist/Editor/themeSettings/colorTheme/index.js +0 -292
  237. package/dist/Editor/themeSettings/colorTheme/style.js +0 -77
  238. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  239. package/dist/Editor/themeSettings/fonts/index.js +0 -220
  240. package/dist/Editor/themeSettings/fonts/style.js +0 -44
  241. package/dist/Editor/themeSettings/icons.js +0 -60
  242. package/dist/Editor/themeSettings/index.js +0 -320
  243. package/dist/Editor/themeSettings/style.js +0 -152
  244. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  245. package/dist/Editor/themeSettingsAI/index.js +0 -356
  246. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -197
  247. package/dist/Editor/themeSettingsAI/style.js +0 -250
@@ -8,8 +8,7 @@ const AppHeaderSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
@@ -28,7 +27,7 @@ const AppHeaderSettings = props => {
28
27
  });
29
28
  };
30
29
  const handleClose = () => {
31
- onClose();
30
+ console.log("close");
32
31
  };
33
32
  return /*#__PURE__*/_jsx(Box, {
34
33
  component: "div",
@@ -8,8 +8,7 @@ const BoxSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path];
@@ -28,7 +27,7 @@ const BoxSettings = props => {
28
27
  });
29
28
  };
30
29
  const handleClose = () => {
31
- onClose();
30
+ console.log("close");
32
31
  };
33
32
  return /*#__PURE__*/_jsx(Box, {
34
33
  component: "div",
@@ -8,8 +8,7 @@ const ButtonSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
@@ -29,7 +28,7 @@ const ButtonSettings = props => {
29
28
  });
30
29
  };
31
30
  const handleClose = () => {
32
- onClose();
31
+ console.log("close");
33
32
  };
34
33
  return /*#__PURE__*/_jsx(Box, {
35
34
  component: "div",
@@ -8,8 +8,7 @@ const CodeSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
@@ -28,7 +27,7 @@ const CodeSettings = props => {
28
27
  });
29
28
  };
30
29
  const handleClose = () => {
31
- onClose();
30
+ console.log("close");
32
31
  };
33
32
  return /*#__PURE__*/_jsx(Box, {
34
33
  component: "div",
@@ -12,16 +12,14 @@ const FormSettings = props => {
12
12
  const {
13
13
  editor,
14
14
  path,
15
- customProps,
16
- onClose
15
+ customProps
17
16
  } = props;
18
17
  const item_path = path?.split("|").map(m => parseInt(m));
19
18
  const element_path = [...item_path];
20
19
  const element = Node.get(editor, element_path);
21
20
  const styleMaps = formStyle;
22
21
  const {
23
- hideTools,
24
- translation
22
+ hideTools
25
23
  } = customProps || {};
26
24
  const {
27
25
  theme
@@ -57,14 +55,13 @@ const FormSettings = props => {
57
55
  }
58
56
  };
59
57
  const handleClose = () => {
60
- onClose();
58
+ console.log("close");
61
59
  };
62
60
  const muiTheme = createTheme({
63
61
  components: {
64
62
  MuiAccordion: {
65
63
  styleOverrides: {
66
64
  root: {
67
- background: theme?.palette?.editor?.miniToolBarBackground,
68
65
  "& .MuiAccordionSummary-root": {
69
66
  flexDirection: "row-reverse",
70
67
  "& .MuiSvgIcon-root": {
@@ -110,7 +107,7 @@ const FormSettings = props => {
110
107
  fontSize: "14px !important",
111
108
  fontWeight: "400"
112
109
  },
113
- children: translation(m?.tab)
110
+ children: m?.tab
114
111
  })
115
112
  }), /*#__PURE__*/_jsx(AccordionDetails, {
116
113
  sx: {
@@ -8,8 +8,7 @@ const ImageSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
@@ -28,7 +27,7 @@ const ImageSettings = props => {
28
27
  });
29
28
  };
30
29
  const handleClose = () => {
31
- onClose();
30
+ console.log("close");
32
31
  };
33
32
  return /*#__PURE__*/_jsx(Box, {
34
33
  component: "div",
@@ -9,8 +9,7 @@ const TableSettings = props => {
9
9
  const {
10
10
  editor,
11
11
  path,
12
- customProps,
13
- onClose
12
+ customProps
14
13
  } = props;
15
14
  const item_path = path?.split("|").map(m => parseInt(m));
16
15
  const element_path = [...item_path, 0];
@@ -58,7 +57,7 @@ const TableSettings = props => {
58
57
  }
59
58
  };
60
59
  const handleClose = () => {
61
- onClose();
60
+ console.log("close");
62
61
  };
63
62
  return /*#__PURE__*/_jsx(Box, {
64
63
  component: "div",
@@ -8,8 +8,7 @@ const TextSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- theme,
12
- customProps
11
+ theme
13
12
  } = props;
14
13
  const item_path = path.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
@@ -26,8 +25,7 @@ const TextSettings = props => {
26
25
  }, []);
27
26
  return /*#__PURE__*/_jsx(TextFormat, {
28
27
  classes: classes,
29
- editor: editor,
30
- customProps: customProps
28
+ editor: editor
31
29
  });
32
30
  };
33
31
  export default TextSettings;
@@ -8,8 +8,7 @@ const VideoSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
@@ -29,7 +28,7 @@ const VideoSettings = props => {
29
28
  });
30
29
  };
31
30
  const handleClose = () => {
32
- onClose();
31
+ console.log("close");
33
32
  };
34
33
  return /*#__PURE__*/_jsx(Box, {
35
34
  component: "div",
@@ -17,8 +17,7 @@ const OptionsPopup = props => {
17
17
  open,
18
18
  anchorEl,
19
19
  placement,
20
- handleClose,
21
- translation
20
+ handleClose
22
21
  } = props;
23
22
  return anchorEl ? /*#__PURE__*/_jsx(Popper, {
24
23
  sx: classes.root,
@@ -31,10 +30,10 @@ const OptionsPopup = props => {
31
30
  children: [/*#__PURE__*/_jsxs(Typography, {
32
31
  variant: "div",
33
32
  className: "item-wrapper title",
34
- children: [translation(title), /*#__PURE__*/_jsx(Box, {
33
+ children: [title, /*#__PURE__*/_jsx(Box, {
35
34
  component: "div",
36
35
  children: /*#__PURE__*/_jsx(Tooltip, {
37
- title: translation("Close"),
36
+ title: "Close",
38
37
  arrow: true,
39
38
  children: /*#__PURE__*/_jsx(IconButton, {
40
39
  onClick: handleClose,
@@ -9,26 +9,19 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
9
9
  const SwitchViewport = props => {
10
10
  const {
11
11
  breakpoint,
12
- onChange,
13
- translation,
14
- show
12
+ onChange
15
13
  } = props;
16
14
  const classes = useSwitchViewport();
17
15
  const {
18
- setSelectedElement,
19
16
  setActiveBreakPoint
20
17
  } = useEditorContext();
21
18
  useEffect(() => {
22
- // to reset selection on viewport changes - FS-6589
23
- setSelectedElement({});
19
+ console.log(breakpoint);
24
20
  }, [breakpoint]);
25
21
  return /*#__PURE__*/_jsxs(Box, {
26
22
  sx: classes.root,
27
- style: {
28
- display: show ? "block" : "none"
29
- },
30
23
  children: [/*#__PURE__*/_jsx(Tooltip, {
31
- title: translation("Desktop View"),
24
+ title: "Desktop View",
32
25
  children: /*#__PURE__*/_jsx(IconButton, {
33
26
  className: `${!breakpoint || breakpoint === "lg" ? "active" : ""}`,
34
27
  onClick: () => {
@@ -38,7 +31,7 @@ const SwitchViewport = props => {
38
31
  children: /*#__PURE__*/_jsx(PersonalVideoIcon, {})
39
32
  })
40
33
  }), /*#__PURE__*/_jsx(Tooltip, {
41
- title: translation("Mobile View"),
34
+ title: "Mobile View",
42
35
  children: /*#__PURE__*/_jsx(IconButton, {
43
36
  className: `${breakpoint === "xs" ? "active" : ""}`,
44
37
  onClick: () => {
@@ -1,20 +1,9 @@
1
1
  import React from "react";
2
- import { useTheme, createTheme } from "@mui/material";
2
+ import { useTheme, ThemeProvider, createTheme } from "@mui/material";
3
3
  import { isStimulator, STIMULATOR_MOCK } from "../../../hooks/useBreakpoints";
4
- import MainThemeProvider from "./MainThemeProvider";
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- const isPdf = () => {
7
- try {
8
- const hash = window.location.hash;
9
- const queryString = hash.split("?")[1]; // Get part after "?"
10
- const params = new URLSearchParams(queryString);
11
- return params.get("isPdf");
12
- } catch (err) {
13
- console.log(err);
14
- }
15
- };
16
4
 
17
5
  // Custom breakpoints functions
6
+ import { jsx as _jsx } from "react/jsx-runtime";
18
7
  const customUp = (key, breakpoints) => {
19
8
  const MOCK_BREAKPOINT = isStimulator();
20
9
  if (key === "xs") {
@@ -49,35 +38,25 @@ const customOnly = (key, breakpoints) => {
49
38
  }
50
39
  return `@media (min-width: ${breakpoints[key]}px) and (max-width: ${breakpoints[key + 1]}px)`;
51
40
  };
52
- const getBreakPoints = prevTheme => {
53
- return {
41
+
42
+ // Extend the existing theme with custom breakpoint functions
43
+ const extendedTheme = prevTheme => createTheme({
44
+ ...prevTheme,
45
+ breakpoints: {
54
46
  ...prevTheme.breakpoints,
55
47
  up: key => customUp(key, prevTheme.breakpoints.values),
56
48
  down: key => customDown(key, prevTheme.breakpoints.values),
57
49
  between: (start, end) => customBetween(start, end, prevTheme.breakpoints.values),
58
50
  only: key => customOnly(key, prevTheme.breakpoints.values)
59
- };
60
- };
61
-
62
- // Extend the existing theme with custom breakpoint functions
63
- const extendedTheme = prevTheme => createTheme({
64
- ...prevTheme,
65
- breakpoints: isPdf() ? {
66
- values: {
67
- ...prevTheme.breakpoints.values,
68
- md: 400 // To resolve, while taking pdf on A4 size, it is getting mobile view because of breakpoint
69
- }
70
- } : getBreakPoints(prevTheme)
51
+ }
71
52
  });
72
53
  const ViewportStimulator = ({
73
- children,
74
- selectedTheme
54
+ children
75
55
  }) => {
76
56
  const theme = useTheme();
77
57
  const viewportTheme = extendedTheme(theme);
78
- return /*#__PURE__*/_jsx(MainThemeProvider, {
58
+ return /*#__PURE__*/_jsx(ThemeProvider, {
79
59
  theme: viewportTheme,
80
- userSelectedTheme: selectedTheme,
81
60
  children: children
82
61
  });
83
62
  };
@@ -2,11 +2,10 @@ import { Transforms, Node, Path } from "slate";
2
2
  import { ReactEditor } from "slate-react";
3
3
  import { handleNegativeInteger } from "../../../utils/helper";
4
4
  export const ROW_HEIGHT = 50;
5
-
6
- // const MARGIN_OF = {
7
- // xs: 160,
8
- // lg: 490,
9
- // };
5
+ const MARGIN_OF = {
6
+ xs: 160,
7
+ lg: 490
8
+ };
10
9
 
11
10
  /**
12
11
  * This method will update the grid template rows of parent section based on height
@@ -1,9 +1,6 @@
1
1
  import { Transforms, Node } from "slate";
2
2
  import { ReactEditor } from "slate-react";
3
3
  import { getNearestItem } from "./calculateDropItem";
4
- import { ROW_HEIGHT, getBorderWidth } from "./gridDropItem";
5
- import { handleNegativeInteger } from "../../../utils/helper";
6
- import { getDevice } from "../../../helper/theme";
7
4
  const GUIDE_LINE_THRESHOLD = 5;
8
5
  const GUIDE_LINE_OVERLAP_THRESHOLD = 5;
9
6
  const handleMoveNode = (editor, path, newPath, {
@@ -251,46 +248,4 @@ export function getParentSectionPath(props, closestClass) {
251
248
  } catch (err) {
252
249
  console.log(err);
253
250
  }
254
- }
255
- export function getAbsolutePositionX(currentEle) {
256
- const isMobile = getDevice(window.innerWidth) === "xs";
257
- const {
258
- left: currElementLeft
259
- } = currentEle?.getBoundingClientRect() || {};
260
- let parentBoxDom = currentEle?.closest(".fgi_type_box");
261
- if (isMobile && !parentBoxDom) {
262
- parentBoxDom = currentEle?.closest(".freegrid-section");
263
- }
264
- const relativeElementX = parentBoxDom || document.querySelector(".rnd-guideline-lv");
265
- const {
266
- left
267
- } = relativeElementX?.getBoundingClientRect() || {};
268
- const borderLeftWidth = getBorderWidth(relativeElementX, "borderLeftWidth");
269
- const absolutePositionX = parseInt(currElementLeft - left - borderLeftWidth);
270
- return {
271
- absolutePositionX
272
- };
273
- }
274
- export function getAbsolutePositionY(currentEle) {
275
- const {
276
- top: currElementTop
277
- } = currentEle?.getBoundingClientRect() || {};
278
- const relativeElementY = currentEle?.closest(".freegrid-container-parent");
279
- const borderTopWidth = getBorderWidth(relativeElementY, "borderTopWidth");
280
- const rect = relativeElementY.getBoundingClientRect();
281
- const absolutePositionY = handleNegativeInteger(currElementTop - rect.top - borderTopWidth);
282
-
283
- // Calculate grid position
284
- const row = Math.floor(absolutePositionY / ROW_HEIGHT) + 1;
285
-
286
- // Update grid area
287
- const gridArea = `${row} / 1 / ${row + 1} / 2`;
288
-
289
- // to calculate difference inside the grid
290
- const marginTop = Math.abs((row - 1) * ROW_HEIGHT - absolutePositionY);
291
- return {
292
- absolutePositionY,
293
- gridArea,
294
- marginTop
295
- };
296
251
  }
@@ -6,7 +6,7 @@ import Handles from "./TransformHandles";
6
6
  import { useEditorContext } from "../../hooks/useMouseMove";
7
7
  import ElementOptions from "./ElementOptions";
8
8
  import ElementSettings from "./ElementSettings";
9
- import { getAbsolutePositionX, getAbsolutePositionY, getClosestDraggable, getParentSectionPath } from "./Utils";
9
+ import { getClosestDraggable, getParentSectionPath } from "./Utils";
10
10
  import DragInfo from "./DragInfo";
11
11
  import GuideLines from "./GuideLines";
12
12
  import ShadowElement from "./ShadowElement";
@@ -64,8 +64,7 @@ const RnD = props => {
64
64
  editor,
65
65
  breakpoint = "",
66
66
  handleContextMenuClick = () => {},
67
- itemData = {},
68
- customProps
67
+ itemData = {}
69
68
  } = props;
70
69
  const {
71
70
  isSelectedElement,
@@ -107,9 +106,6 @@ const RnD = props => {
107
106
  y: 0
108
107
  });
109
108
  const parentSectionPath = str_path?.split("|").slice(0, 2).join("_");
110
- const {
111
- translation
112
- } = customProps;
113
109
  useEffect(() => {
114
110
  if (ITEM_TYPES.includes(type)) {
115
111
  if (enable === 1) {
@@ -429,26 +425,9 @@ const RnD = props => {
429
425
  };
430
426
  const onResizeStop = (e, direction, ref, d, position) => {
431
427
  e.preventDefault();
432
- let updatedPosition = {};
433
- if (type !== "parent") {
434
- // update element position while resizing, (for free grid box and item)
435
- const {
436
- absolutePositionX
437
- } = getAbsolutePositionX(ref);
438
- const {
439
- gridArea,
440
- marginTop
441
- } = getAbsolutePositionY(ref);
442
- updatedPosition = {
443
- left: absolutePositionX,
444
- gridArea: gridArea,
445
- marginTop: marginTop
446
- };
447
- }
448
428
  const updatedSize = {
449
429
  width: delta?.width + d.width,
450
- height: delta?.height + d.height,
451
- ...updatedPosition
430
+ height: delta?.height + d.height
452
431
  };
453
432
  onChange({
454
433
  ...updatedSize
@@ -521,15 +500,12 @@ const RnD = props => {
521
500
  return /*#__PURE__*/_jsxs(_Fragment, {
522
501
  children: [/*#__PURE__*/_jsxs(Box, {
523
502
  component: Rnd,
524
- placeholder: translation(ItemTypes[childType]) || translation("Item"),
503
+ placeholder: ItemTypes[childType] || "Item",
525
504
  id: eId || "",
526
505
  ref: c => {
527
506
  positionRef.current = c;
528
507
  },
529
- className: `${className || ""} ${dragInfoOpen ? "active-drag" : "inactive-drag"} enable-${enable} type_${childType} section_type_${type || "parent"} ${Object.keys(absPosition)?.length ? "" : "remove-resize-styles"
530
- // Fix rerender issue (remove-resize-styles): After resizing, click close button on a free grid-selected element
531
- // doesn't remove the default `transform` style from react-rnd. Removing it manually.
532
- }`,
508
+ className: `${className || ""} ${dragInfoOpen ? "active-drag" : "inactive-drag"} enable-${enable} type_${childType} section_type_${type || "parent"}`,
533
509
  "data-path": str_path,
534
510
  style: {
535
511
  position: "relative",
@@ -588,9 +564,7 @@ const RnD = props => {
588
564
  optionsProps: optionsProps,
589
565
  selectedAction: currentAction,
590
566
  path: str_path,
591
- theme: theme,
592
- translation: translation,
593
- customProps: customProps
567
+ theme: theme
594
568
  }) : null, /*#__PURE__*/_jsx(ElementSettings, {
595
569
  open: Boolean(currentAction),
596
570
  currentAction: currentAction,
@@ -624,8 +598,7 @@ const RnD = props => {
624
598
  open: openContextMenu,
625
599
  contextMenu: contextMenu,
626
600
  handleClose: handleClose,
627
- theme: theme,
628
- translation: translation
601
+ theme: theme
629
602
  }), type === "parent" && breakpoint === "lg" && !readOnly ? /*#__PURE__*/_jsx(VirtualElement, {
630
603
  parentEle: positionRef?.current?.resizableElement?.current,
631
604
  updated_at: updated_at,
@@ -18,8 +18,7 @@ const Toolbar = ({
18
18
  readOnly,
19
19
  showTool,
20
20
  onSettings,
21
- isSectionFullWidth,
22
- translation
21
+ isSectionFullWidth
23
22
  }) => {
24
23
  return !readOnly && !showTool ? /*#__PURE__*/_jsx(Box, {
25
24
  component: "div",
@@ -33,7 +32,7 @@ const Toolbar = ({
33
32
  }
34
33
  },
35
34
  children: /*#__PURE__*/_jsx(Tooltip, {
36
- title: translation("Section Settings"),
35
+ title: "Section Settings",
37
36
  children: /*#__PURE__*/_jsx(IconButton, {
38
37
  onClick: onSettings,
39
38
  children: /*#__PURE__*/_jsx(SectionSettingIcon, {})
@@ -51,8 +50,7 @@ const Section = props => {
51
50
  customProps
52
51
  } = props;
53
52
  const {
54
- readOnly,
55
- translation
53
+ readOnly
56
54
  } = customProps;
57
55
  const editor = useSlateStatic();
58
56
  // const [isHovering, setIsHovering] = useState(false);
@@ -162,8 +160,7 @@ const Section = props => {
162
160
  isSectionFullWidth: isSectionFullWidth,
163
161
  readOnly: readOnly,
164
162
  showTool: false,
165
- onSettings: onSettings,
166
- translation: translation
163
+ onSettings: onSettings
167
164
  }), children]
168
165
  }), openSetttings ? /*#__PURE__*/_jsx(SectionPopup, {
169
166
  element: {
@@ -43,60 +43,6 @@ const ELEMENTS_LIST = [{
43
43
  icon: "headingThree"
44
44
  }),
45
45
  onInsert: editor => toggleBlock(editor, "headingThree", false)
46
- }, {
47
- name: "Heading 4",
48
- desc: "",
49
- group: "Text",
50
- type: "headingFour",
51
- icon: /*#__PURE__*/_jsx(Icon, {
52
- icon: "headingFour"
53
- }),
54
- onInsert: editor => toggleBlock(editor, "headingFour", false)
55
- }, {
56
- name: "Heading 5",
57
- desc: "",
58
- group: "Text",
59
- type: "headingFive",
60
- icon: /*#__PURE__*/_jsx(Icon, {
61
- icon: "headingFive"
62
- }),
63
- onInsert: editor => toggleBlock(editor, "headingFive", false)
64
- }, {
65
- name: "Heading 6",
66
- desc: "",
67
- group: "Text",
68
- type: "headingSix",
69
- icon: /*#__PURE__*/_jsx(Icon, {
70
- icon: "headingSix"
71
- }),
72
- onInsert: editor => toggleBlock(editor, "headingSix", false)
73
- }, {
74
- name: "Paragraph 1",
75
- desc: "",
76
- group: "Text",
77
- type: "paragraphOne",
78
- icon: /*#__PURE__*/_jsx(Icon, {
79
- icon: "paragraphOne"
80
- }),
81
- onInsert: editor => toggleBlock(editor, "paragraphOne", false)
82
- }, {
83
- name: "Paragraph 2",
84
- desc: "",
85
- group: "Text",
86
- type: "paragraphTwo",
87
- icon: /*#__PURE__*/_jsx(Icon, {
88
- icon: "paragraphTwo"
89
- }),
90
- onInsert: editor => toggleBlock(editor, "paragraphTwo", false)
91
- }, {
92
- name: "Paragraph 3",
93
- desc: "",
94
- group: "Text",
95
- type: "paragraphThree",
96
- icon: /*#__PURE__*/_jsx(Icon, {
97
- icon: "paragraphThree"
98
- }),
99
- onInsert: editor => toggleBlock(editor, "paragraphThree", false)
100
46
  }, {
101
47
  name: "Quote",
102
48
  desc: "",
@@ -203,10 +149,7 @@ const ELEMENTS_LIST = [{
203
149
  type: "emoji",
204
150
  renderComponent: rest => /*#__PURE__*/_jsx(EmojiButton, {
205
151
  ...rest,
206
- icoBtnType: "cmd",
207
- customProps: {
208
- ...rest
209
- }
152
+ icoBtnType: "cmd"
210
153
  })
211
154
  }, {
212
155
  name: "Brain",
@@ -218,10 +161,7 @@ const ELEMENTS_LIST = [{
218
161
  element: {
219
162
  name: "Brain"
220
163
  },
221
- icoBtnType: "cmd",
222
- customProps: {
223
- ...rest
224
- }
164
+ icoBtnType: "cmd"
225
165
  })
226
166
  }, {
227
167
  name: "Divider",
@@ -338,20 +278,9 @@ const ELEMENTS_LIST = [{
338
278
  const elements = props => {
339
279
  const {
340
280
  search,
341
- hideTools,
342
- translation
281
+ hideTools
343
282
  } = props;
344
- const translatedElements = ELEMENTS_LIST.map(element => ({
345
- ...element,
346
- name: translation(element.name),
347
- renderComponent: element.renderComponent ? rest => {
348
- return element.renderComponent({
349
- ...rest,
350
- translation
351
- });
352
- } : undefined
353
- }));
354
- const filteredElements = translatedElements.filter(f => (hideTools || []).indexOf(f.type) === -1);
283
+ const filteredElements = ELEMENTS_LIST.filter(f => (hideTools || []).indexOf(f.type) === -1);
355
284
  return filteredElements.filter(c => c.name.toLowerCase().includes(search?.toLowerCase()));
356
285
  };
357
286
  export default elements;
@@ -15,12 +15,12 @@ const appHeaderStyle = [{
15
15
  options: fontOptions,
16
16
  webFont: true,
17
17
  width: 7,
18
- renderOption: (option, elementProps, translation) => {
18
+ renderOption: option => {
19
19
  return /*#__PURE__*/_jsx("span", {
20
20
  style: {
21
21
  fontFamily: option.value
22
22
  },
23
- children: translation("LOGO")
23
+ children: "LOGO"
24
24
  });
25
25
  }
26
26
  }, {
@@ -58,12 +58,12 @@ const appHeaderStyle = [{
58
58
  webFont: true,
59
59
  width: 7,
60
60
  options: fontOptions,
61
- renderOption: (option, elementProps, translation) => {
61
+ renderOption: option => {
62
62
  return /*#__PURE__*/_jsx("span", {
63
63
  style: {
64
64
  fontFamily: option.value
65
65
  },
66
- children: translation("Home")
66
+ children: "Home"
67
67
  });
68
68
  }
69
69
  }, {