@flozy/editor 9.8.1 → 9.8.3

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 (255) hide show
  1. package/dist/Editor/ChatEditor.js +19 -26
  2. package/dist/Editor/CommonEditor.js +25 -139
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +7 -11
  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 +5 -15
  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 +11 -16
  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 +6 -54
  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 +5 -10
  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 +8 -9
  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 +42 -122
  131. package/dist/Editor/Toolbar/PopupTool/index.js +2 -18
  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 +1 -31
  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/Styles.js +9 -3
  142. package/dist/Editor/common/LinkSettings/NavComponents.js +10 -14
  143. package/dist/Editor/common/LinkSettings/index.js +14 -20
  144. package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
  145. package/dist/Editor/common/MUIIcon/index.js +3 -0
  146. package/dist/Editor/common/MentionsPopup/index.js +2 -6
  147. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -46
  148. package/dist/Editor/common/RnD/ContextMenu/index.js +2 -3
  149. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -7
  150. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +3 -8
  151. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +3 -7
  152. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  153. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  154. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  155. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  156. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +4 -7
  157. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  158. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  159. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +2 -6
  160. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  161. package/dist/Editor/common/RnD/OptionsPopup/index.js +3 -4
  162. package/dist/Editor/common/RnD/ShadowElement.js +1 -2
  163. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +4 -11
  164. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  165. package/dist/Editor/common/RnD/Utils/gridDropItem.js +8 -55
  166. package/dist/Editor/common/RnD/Utils/index.js +0 -3
  167. package/dist/Editor/common/RnD/VirtualElement/index.js +103 -187
  168. package/dist/Editor/common/RnD/VirtualElement/styles.js +7 -155
  169. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +3 -5
  170. package/dist/Editor/common/RnD/index.js +13 -69
  171. package/dist/Editor/common/Section/index.js +4 -7
  172. package/dist/Editor/common/Shorthands/elements.js +3 -74
  173. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
  174. package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
  175. package/dist/Editor/common/StyleBuilder/buttonStyle.js +4 -6
  176. package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
  177. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
  178. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
  179. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +9 -13
  180. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -11
  181. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +5 -19
  182. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +10 -22
  183. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +3 -6
  184. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +13 -27
  185. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +14 -43
  186. package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +6 -10
  187. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +6 -19
  188. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +2 -6
  189. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +2 -5
  190. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -9
  191. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +2 -8
  192. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +11 -12
  193. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +2 -6
  194. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -8
  195. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +2 -6
  196. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +12 -21
  197. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  198. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  199. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  200. package/dist/Editor/common/StyleBuilder/index.js +5 -8
  201. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  202. package/dist/Editor/common/SwipeableDrawer/index.js +1 -1
  203. package/dist/Editor/common/Uploader.js +5 -16
  204. package/dist/Editor/commonStyle.js +57 -68
  205. package/dist/Editor/helper/index.js +3 -27
  206. package/dist/Editor/helper/theme.js +2 -202
  207. package/dist/Editor/hooks/useMouseMove.js +3 -9
  208. package/dist/Editor/plugins/withEmbeds.js +1 -1
  209. package/dist/Editor/plugins/withHTML.js +9 -11
  210. package/dist/Editor/plugins/withLayout.js +2 -3
  211. package/dist/Editor/plugins/withLinks.js +0 -10
  212. package/dist/Editor/plugins/withTable.js +1 -1
  213. package/dist/Editor/theme/ThemeList.js +173 -50
  214. package/dist/Editor/utils/SlateUtilityFunctions.js +50 -178
  215. package/dist/Editor/utils/draftToSlate.js +2 -3
  216. package/dist/Editor/utils/font.js +37 -40
  217. package/dist/Editor/utils/freegrid.js +3 -3
  218. package/dist/Editor/utils/helper.js +21 -92
  219. package/package.json +4 -4
  220. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -444
  221. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -436
  222. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  223. package/dist/Editor/assets/svg/ResetIconNew.js +0 -23
  224. package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
  225. package/dist/Editor/common/CustomColorPicker/index.js +0 -131
  226. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  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 -43
  230. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  231. package/dist/Editor/common/RnD/VirtualElement/BoxHeaderAutoAlignment.js +0 -43
  232. package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +0 -44
  233. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +0 -134
  234. package/dist/Editor/common/RnD/VirtualElement/helper.js +0 -381
  235. package/dist/Editor/common/SnackBar/index.js +0 -43
  236. package/dist/Editor/helper/textIndeces.js +0 -58
  237. package/dist/Editor/hooks/useAutoScroll.js +0 -38
  238. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  239. package/dist/Editor/hooks/useThemeValues.js +0 -63
  240. package/dist/Editor/theme/index.js +0 -149
  241. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  242. package/dist/Editor/themeSettings/buttons/index.js +0 -290
  243. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  244. package/dist/Editor/themeSettings/colorTheme/index.js +0 -310
  245. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  246. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  247. package/dist/Editor/themeSettings/fonts/index.js +0 -240
  248. package/dist/Editor/themeSettings/fonts/style.js +0 -61
  249. package/dist/Editor/themeSettings/icons.js +0 -60
  250. package/dist/Editor/themeSettings/index.js +0 -351
  251. package/dist/Editor/themeSettings/style.js +0 -220
  252. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  253. package/dist/Editor/themeSettingsAI/index.js +0 -355
  254. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -205
  255. package/dist/Editor/themeSettingsAI/style.js +0 -259
@@ -35,8 +35,8 @@ const SimpleTextStyle = ({
35
35
  height: "24px",
36
36
  overflow: "hidden",
37
37
  fontSize: "14px",
38
- display: "inline-flex",
39
- alignItems: "center",
38
+ display: 'inline-flex',
39
+ alignItems: 'center',
40
40
  "& .bg-pad-sl": {
41
41
  padding: "2px 4px 2px 4px",
42
42
  background: "transparent",
@@ -29,8 +29,7 @@ function DragButton({
29
29
  const dragElement = useRef(null);
30
30
  const [showTool, setShowTool] = useState(false);
31
31
  const {
32
- isMobile,
33
- translation
32
+ isMobile
34
33
  } = customProps || {};
35
34
  const onDragClick = () => {
36
35
  onDrag();
@@ -63,8 +62,7 @@ function DragButton({
63
62
  hideDelete,
64
63
  handleToolAction: (value, option, dragType) => {
65
64
  handleAction(value, option, dragType);
66
- },
67
- translation
65
+ }
68
66
  };
69
67
  return /*#__PURE__*/_jsx(_Fragment, {
70
68
  children: show || showTool ? /*#__PURE__*/_jsxs(_Fragment, {
@@ -27,8 +27,7 @@ const hideRowDragBtns = (hide, dragRowBtnCls) => {
27
27
  const ToolTableComponent = props => {
28
28
  const {
29
29
  handleAction,
30
- editorTheme,
31
- translation
30
+ editorTheme
32
31
  } = props;
33
32
  const {
34
33
  updateTableSelection
@@ -40,8 +39,7 @@ const ToolTableComponent = props => {
40
39
  if (type === "duplicate") {
41
40
  updateTableSelection(getDefaultTableSelection());
42
41
  }
43
- },
44
- translation: translation
42
+ }
45
43
  });
46
44
  };
47
45
  const MoreTableSettings = props => {
@@ -50,13 +48,9 @@ const MoreTableSettings = props => {
50
48
  handleAction,
51
49
  editorTheme,
52
50
  setExpandTools,
53
- classes,
54
- customProps
51
+ classes
55
52
  } = props;
56
53
  const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
57
- const {
58
- translation
59
- } = customProps;
60
54
  return isMobile ? /*#__PURE__*/_jsx(SwipeableDrawerComponent, {
61
55
  open: Boolean(exandTools),
62
56
  onClose: () => {
@@ -67,8 +61,7 @@ const MoreTableSettings = props => {
67
61
  sx: classes.mobileToolDrawer,
68
62
  children: /*#__PURE__*/_jsx(ToolTableComponent, {
69
63
  handleAction: handleAction,
70
- editorTheme: editorTheme,
71
- translation: translation
64
+ editorTheme: editorTheme
72
65
  })
73
66
  })
74
67
  }) : /*#__PURE__*/_jsx(Popper, {
@@ -84,8 +77,7 @@ const MoreTableSettings = props => {
84
77
  children: /*#__PURE__*/_jsx("div", {
85
78
  children: /*#__PURE__*/_jsx(ToolTableComponent, {
86
79
  handleAction: handleAction,
87
- editorTheme: editorTheme,
88
- translation: translation
80
+ editorTheme: editorTheme
89
81
  })
90
82
  })
91
83
  })
@@ -100,8 +92,7 @@ const ToolBar = props => {
100
92
  handleAction,
101
93
  exandTools,
102
94
  openSetttings,
103
- hideTools,
104
- translation
95
+ hideTools
105
96
  } = props;
106
97
  const {
107
98
  getSelectedCells
@@ -114,7 +105,7 @@ const ToolBar = props => {
114
105
  sx: classes.tableToolBar,
115
106
  children: !hideTools.includes("settings") ? /*#__PURE__*/_jsxs(_Fragment, {
116
107
  children: [/*#__PURE__*/_jsx(Tooltip, {
117
- title: translation("Settings"),
108
+ title: "Settings",
118
109
  arrow: true,
119
110
  onClick: () => handleAction("settings"),
120
111
  children: /*#__PURE__*/_jsx(IconButton, {
@@ -122,7 +113,7 @@ const ToolBar = props => {
122
113
  children: /*#__PURE__*/_jsx(SettingsIcon, {})
123
114
  })
124
115
  }), /*#__PURE__*/_jsx(Tooltip, {
125
- title: translation("Show Tools"),
116
+ title: "Show Tools",
126
117
  arrow: true,
127
118
  onClick: handleExpand,
128
119
  children: /*#__PURE__*/_jsx(IconButton, {
@@ -156,8 +147,7 @@ const Table = props => {
156
147
  const {
157
148
  readOnly,
158
149
  isMobile,
159
- hideTools = [],
160
- translation
150
+ hideTools = []
161
151
  } = customProps;
162
152
  const [openSetttings, setOpenSettings] = useState(false);
163
153
  const [exandTools, setExpandTools] = useState(null);
@@ -307,7 +297,7 @@ const Table = props => {
307
297
  onScroll: handleScroll,
308
298
  onMouseOver: onMouseOver,
309
299
  onMouseLeave: onMouseLeave,
310
- className: "custom-scroll",
300
+ className: !hideTools.includes("add_column") ? "custom-scroll" : '',
311
301
  children: [/*#__PURE__*/_jsx(TableComp, {
312
302
  className: readOnly ? "readOnly" : "",
313
303
  sx: {
@@ -345,15 +335,13 @@ const Table = props => {
345
335
  handleAction: handleAction,
346
336
  exandTools: exandTools,
347
337
  openSetttings: openSetttings,
348
- hideTools: hideTools,
349
- translation: translation
338
+ hideTools: hideTools
350
339
  }), /*#__PURE__*/_jsx(MoreTableSettings, {
351
340
  exandTools: exandTools,
352
341
  handleAction: handleAction,
353
342
  editorTheme: editorTheme,
354
343
  setExpandTools: setExpandTools,
355
- classes: classes,
356
- customProps: customProps
344
+ classes: classes
357
345
  }), openSetttings ? /*#__PURE__*/_jsx(TablePopup, {
358
346
  element: tableProps?.styleProps || {},
359
347
  onSave: onSave,
@@ -15,11 +15,8 @@ const TablePopup = props => {
15
15
  styleType
16
16
  } = props;
17
17
  const styles = STYLE_TYPES[styleType] || tableStyle;
18
- const {
19
- translation
20
- } = customProps;
21
18
  return /*#__PURE__*/_jsx(StyleBuilder, {
22
- title: translation("Table"),
19
+ title: "Table",
23
20
  type: "gridStyle",
24
21
  element: element,
25
22
  onSave: onSave,
@@ -10,8 +10,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
10
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
11
  const TableSelector = ({
12
12
  editor,
13
- icoBtnType,
14
- customProps
13
+ icoBtnType
15
14
  }) => {
16
15
  const tableOptionsRef = useRef();
17
16
  const [selection, setSelection] = useState();
@@ -21,9 +20,6 @@ const TableSelector = ({
21
20
  column: 2
22
21
  });
23
22
  const table = new TableUtil(editor);
24
- const {
25
- translation
26
- } = customProps;
27
23
  const handleButtonClick = () => {
28
24
  setSelection(editor.selection);
29
25
  setShowOptions(true);
@@ -76,7 +72,7 @@ const TableSelector = ({
76
72
  variant: "h6",
77
73
  className: "popupTitle",
78
74
  color: "primary",
79
- children: translation("Table")
75
+ children: "Table"
80
76
  }), /*#__PURE__*/_jsx(Grid, {
81
77
  style: {
82
78
  display: "flex"
@@ -114,7 +110,7 @@ const TableSelector = ({
114
110
  fontSize: "14px",
115
111
  fontWeight: 500
116
112
  },
117
- children: translation("numberOfRow")
113
+ children: "No.of Rows"
118
114
  })
119
115
  }), /*#__PURE__*/_jsx(TextField, {
120
116
  fullWidth: true,
@@ -141,7 +137,7 @@ const TableSelector = ({
141
137
  fontSize: "14px",
142
138
  fontWeight: 500
143
139
  },
144
- children: translation("numberOfCoumns")
140
+ children: "No.of Columns"
145
141
  })
146
142
  }), /*#__PURE__*/_jsx(TextField, {
147
143
  fullWidth: true,
@@ -162,11 +158,11 @@ const TableSelector = ({
162
158
  children: [/*#__PURE__*/_jsx(Button, {
163
159
  onClick: onCancel,
164
160
  className: "secondaryBtn",
165
- children: translation("Cancel")
161
+ children: "Cancel"
166
162
  }), /*#__PURE__*/_jsx(Button, {
167
163
  onClick: handleInsert,
168
164
  className: "primaryBtn",
169
- children: translation("Save")
165
+ children: "Save"
170
166
  })]
171
167
  })]
172
168
  })
@@ -67,8 +67,7 @@ export function TableToolOnDrag({
67
67
  theme,
68
68
  dragType,
69
69
  handleToolAction,
70
- hideDelete,
71
- translation
70
+ hideDelete
72
71
  }) {
73
72
  const classes = Styles(theme);
74
73
  const tools = getTools(dragType, hideDelete);
@@ -82,14 +81,12 @@ export function TableToolOnDrag({
82
81
  btnProps: {
83
82
  onMouseDown: e => e.stopPropagation(),
84
83
  onMouseUp: e => e.stopPropagation()
85
- },
86
- translation: translation
84
+ }
87
85
  });
88
86
  }
89
87
  function TableTool({
90
88
  theme,
91
- handleToolAction,
92
- translation
89
+ handleToolAction
93
90
  }) {
94
91
  const classes = Styles(theme);
95
92
  return /*#__PURE__*/_jsx(CustomSelect, {
@@ -98,8 +95,7 @@ function TableTool({
98
95
  options: wholeTableTools,
99
96
  onSend: (value, option) => {
100
97
  handleToolAction(value, option);
101
- },
102
- translation: translation
98
+ }
103
99
  });
104
100
  }
105
101
  export default TableTool;
@@ -1,16 +1,9 @@
1
1
  import React, { useEffect, useState } from "react";
2
- import { Editor } from "slate";
2
+ import { Editor, Text } from "slate";
3
3
  import { useSlate } from "slate-react";
4
4
  import { getNodeText } from "../../utils/helper";
5
- import { Text } from "slate";
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
7
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
- const isEmptyTextNode = node => {
9
- if (Text.isText(node)) {
10
- return !node.text.trim();
11
- }
12
- return false;
13
- };
14
7
  const Title = props => {
15
8
  const {
16
9
  attributes,
@@ -18,8 +11,8 @@ const Title = props => {
18
11
  element,
19
12
  customProps
20
13
  } = props;
21
- useDetectExitFromTitle(element, customProps?.getTitleSaveData);
22
14
  const isEmpty = !customProps?.readOnly && isEmptyTextNode(element?.children[0]) ? "empty" : "";
15
+ useDetectExitFromTitle(element, customProps?.getTitleSaveData);
23
16
  return /*#__PURE__*/_jsxs("div", {
24
17
  ...attributes,
25
18
  placeholder: "Title",
@@ -57,4 +50,10 @@ const useDetectExitFromTitle = (titleNode, onSaveTitle) => {
57
50
  }
58
51
  }, [editor.selection]);
59
52
  return null;
53
+ };
54
+ const isEmptyTextNode = node => {
55
+ if (Text.isText(node)) {
56
+ return !node.text.trim();
57
+ }
58
+ return false;
60
59
  };
@@ -13,9 +13,6 @@ const TopBannerButton = props => {
13
13
  customProps
14
14
  } = props;
15
15
  const [open, setOpen] = useState(false);
16
- const {
17
- translation
18
- } = customProps;
19
16
  const onSelectImage = url => {
20
17
  if (url) {
21
18
  insertTopBanner(editor, {
@@ -32,7 +29,7 @@ const TopBannerButton = props => {
32
29
  };
33
30
  return /*#__PURE__*/_jsxs(_Fragment, {
34
31
  children: [/*#__PURE__*/_jsx(ToolbarIcon, {
35
- title: translation("Top Banner"),
32
+ title: "Top Banner",
36
33
  onClick: handleClick,
37
34
  icon: /*#__PURE__*/_jsx(Icon, {
38
35
  icon: "topbanner"
@@ -34,8 +34,7 @@ const VariableButton = props => {
34
34
  PaperProps: {
35
35
  style: {
36
36
  maxHeight: 300,
37
- overflowY: "auto",
38
- transformOrigin: 'top left'
37
+ overflowY: "auto"
39
38
  },
40
39
  sx: {
41
40
  "&::-webkit-scrollbar-track": {
@@ -45,14 +44,6 @@ const VariableButton = props => {
45
44
  borderRadius: "16px"
46
45
  }
47
46
  }
48
- },
49
- anchorOrigin: {
50
- vertical: 'bottom',
51
- horizontal: 'right'
52
- },
53
- transformOrigin: {
54
- vertical: 'top',
55
- horizontal: 'right'
56
47
  }
57
48
  },
58
49
  children: [/*#__PURE__*/_jsx(MenuItem, {
@@ -26,8 +26,7 @@ const MiniEditor = props => {
26
26
  className,
27
27
  otherProps,
28
28
  onSave,
29
- theme,
30
- translation
29
+ theme
31
30
  } = props;
32
31
  const {
33
32
  CHARACTERS = []
@@ -42,16 +41,11 @@ const MiniEditor = props => {
42
41
  const [value, setValue] = useState(ensureWrappedVariables(updatedContent));
43
42
  const [deboundedValue] = useDebounce(value, 500);
44
43
  const isReadOnly = readOnly === "readonly";
45
- const {
46
- translationMock
47
- } = otherProps;
48
- const dummyTranslation = () => {};
49
44
  const customProps = {
50
45
  ...(otherProps || {}),
51
46
  readOnly: isReadOnly,
52
47
  editorPlaceholder: miniEditorPlaceholder,
53
- page_id: id,
54
- translation: translation || translationMock || dummyTranslation
48
+ page_id: id
55
49
  };
56
50
  const [mentions, setMentions] = useMentions({
57
51
  editor,
@@ -64,8 +58,7 @@ const MiniEditor = props => {
64
58
  } = mentions;
65
59
  const chars = type ? Shorthands[type]({
66
60
  ...mentions,
67
- CHARACTERS,
68
- translation: translation || translationMock
61
+ CHARACTERS
69
62
  }) : [];
70
63
  useEffect(() => {
71
64
  if (onSave && isInteracted) {
@@ -133,7 +133,7 @@ const editorStyles = ({
133
133
  },
134
134
  "& .accordion-summary-collapse-btn": {
135
135
  padding: "4px",
136
- width: "5px"
136
+ width: '5px'
137
137
  },
138
138
  "& .workflow-icon-btn": {
139
139
  pointerEvents: "none",
@@ -242,7 +242,7 @@ const editorStyles = ({
242
242
  }
243
243
  },
244
244
  "& .section-tw": {
245
- background: "transparent !important",
245
+ background: 'transparent !important',
246
246
  "& button": {
247
247
  padding: "2px",
248
248
  borderRadius: "0px",
@@ -291,8 +291,8 @@ const editorStyles = ({
291
291
  }
292
292
  },
293
293
  "& ::selection": {
294
- background: "rgba(35, 131, 226, 0.35)!important",
295
- color: "inherit"
294
+ background: 'rgba(35, 131, 226, 0.35)!important',
295
+ color: 'inherit'
296
296
  },
297
297
  "&.readOnlyContainer": {
298
298
  "& .max-content": {
@@ -302,7 +302,7 @@ const editorStyles = ({
302
302
  },
303
303
  fullScreenWrapper: {
304
304
  "& .editor-wrapper": {
305
- paddingTop: "20px"
305
+ paddingTop: '20px'
306
306
  },
307
307
  "& .MuiDialog-paper, & .MuiPopover-paper": {
308
308
  background: `${theme?.palette?.editor?.background} !important`
@@ -59,8 +59,7 @@ const BasicToolbar = props => {
59
59
  children: fontStyle?.map((m, i) => {
60
60
  return /*#__PURE__*/_jsx(MarkButton, {
61
61
  editor: editor,
62
- ...m,
63
- customProps: customProps
62
+ ...m
64
63
  }, `pptool_mark_${i}_${m.id}`);
65
64
  })
66
65
  }), !hideLink && /*#__PURE__*/_jsx(Grid, {
@@ -10,12 +10,8 @@ const BlockButton = props => {
10
10
  const {
11
11
  editor,
12
12
  format,
13
- title,
14
- customProps
13
+ title
15
14
  } = props;
16
- const {
17
- translation
18
- } = customProps;
19
15
  const isMark = MARK_TYPES?.indexOf(format) >= 0;
20
16
  const isActive = isMark ? isMarkActive(editor, format) : isBlockActive(editor, format);
21
17
  const {
@@ -33,7 +29,7 @@ const BlockButton = props => {
33
29
  toggleBlock(editor, format);
34
30
  }
35
31
  },
36
- title: translation(title),
32
+ title: title,
37
33
  sx: classes.textAlignButtons,
38
34
  style: {
39
35
  color: "#64748B"
@@ -1,32 +1,8 @@
1
1
  import React from "react";
2
2
  import { Select, MenuItem } from "@mui/material";
3
- import { addMarkData, activeMark, getSelectedElementStyle } from "../../utils/SlateUtilityFunctions.js";
4
- import { toolbarGroups } from "../toolbarGroups.js";
3
+ import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions.js";
5
4
  import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
6
- import { googleFontList as defaultFonts } from "../../common/FontLoader/FontList.js";
7
5
  import { jsx as _jsx } from "react/jsx-runtime";
8
- const allTools = toolbarGroups.flat();
9
- const fontWeight = allTools.find(f => f.format === "fontWeight");
10
- export const getValue = (editor, format) => {
11
- switch (format) {
12
- case "fontFamily":
13
- {
14
- const style = getSelectedElementStyle("font-family", editor, format);
15
- return style || defaultFonts[0];
16
- }
17
- case "fontWeight":
18
- {
19
- const {
20
- options
21
- } = fontWeight || {};
22
- const fontWeightStyle = getSelectedElementStyle("font-weight", editor, format);
23
- const selected = options?.find(o => o.value === fontWeightStyle || o.numVal === fontWeightStyle);
24
- return selected?.value;
25
- }
26
- default:
27
- return activeMark(editor, format);
28
- }
29
- };
30
6
  const Dropdown = ({
31
7
  classes,
32
8
  editor,
@@ -34,7 +10,7 @@ const Dropdown = ({
34
10
  options,
35
11
  width
36
12
  }) => {
37
- const value = activeMark(editor, format, true) || getValue(editor, format);
13
+ const value = activeMark(editor, format);
38
14
  const changeMarkData = (event, format) => {
39
15
  event.preventDefault();
40
16
  const value = event.target.value;
@@ -44,7 +20,7 @@ const Dropdown = ({
44
20
  });
45
21
  };
46
22
  return /*#__PURE__*/_jsx(Select, {
47
- value: value || options?.[0]?.value,
23
+ value: value,
48
24
  className: "editor-dd",
49
25
  onChange: e => changeMarkData(e, format),
50
26
  MenuProps: {
@@ -1,10 +1,9 @@
1
1
  import React from "react";
2
2
  import { Autocomplete, TextField } from "@mui/material";
3
- import { addMarkData } from "../../utils/SlateUtilityFunctions.js";
3
+ import { activeMark, addMarkData } from "../../utils/SlateUtilityFunctions.js";
4
4
  import usePopupStyle from "../PopupTool/PopupToolStyle.js";
5
5
  import { useEditorContext } from "../../hooks/useMouseMove.js";
6
- import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
7
- import { getValue } from "./Dropdown.js";
6
+ import KeyboardArrowDownRoundedIcon from '@mui/icons-material/KeyboardArrowDownRounded';
8
7
  import { jsx as _jsx } from "react/jsx-runtime";
9
8
  const FontFamilyAutocomplete = ({
10
9
  editor,
@@ -15,7 +14,7 @@ const FontFamilyAutocomplete = ({
15
14
  val = "",
16
15
  webFont = false
17
16
  }) => {
18
- const markValue = getValue(editor, format);
17
+ const markValue = activeMark(editor, format);
19
18
  const value = !webFont ? markValue : val;
20
19
  const changeMarkData = (event, newValue, format) => {
21
20
  if (!webFont) {
@@ -1,25 +1,21 @@
1
1
  import React from "react";
2
2
  import Icon from "../../common/Icon";
3
3
  import Button from "../../common/Button";
4
- import { toggleMark, isMarkBtnActive } from "../../utils/SlateUtilityFunctions.js";
4
+ import { toggleMark, isMarkActive } from "../../utils/SlateUtilityFunctions.js";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const MarkButton = ({
7
7
  editor,
8
8
  format,
9
- title,
10
- customProps
9
+ title
11
10
  }) => {
12
- const {
13
- translation
14
- } = customProps;
15
11
  return /*#__PURE__*/_jsx(Button, {
16
- active: isMarkBtnActive(editor, format),
12
+ active: isMarkActive(editor, format),
17
13
  format: format,
18
14
  onMouseDown: e => {
19
15
  e.preventDefault();
20
16
  toggleMark(editor, format);
21
17
  },
22
- title: translation(title),
18
+ title: title,
23
19
  style: {
24
20
  color: "#64748B"
25
21
  },
@@ -1,7 +1,8 @@
1
1
  import React, { useEffect, useRef, useState } from "react";
2
2
  import { TextField, IconButton } from "@mui/material";
3
- import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions.js";
4
- import { getBreakPointsValue, getTextSizeVal } from "../../helper/theme.js";
3
+ import { addMarkData, activeMark, isBlockActive } from "../../utils/SlateUtilityFunctions.js";
4
+ import { headingMap, sizeMap } from "../../utils/font.js";
5
+ import { getBreakPointsValue } from "../../helper/theme.js";
5
6
  import useWindowResize from "../../hooks/useWindowResize.js";
6
7
  import { BREAKPOINTS_DEVICES } from "../../helper/theme.js";
7
8
  import { TextSizeDownArrow, TextSizeUpArrow } from "../../common/iconListV2.js";
@@ -14,15 +15,11 @@ const TextSize = ({
14
15
  format,
15
16
  fullWidth
16
17
  }) => {
17
- const [fontSize, setFontSize] = useState();
18
- const timerRef = useRef();
19
18
  const [size] = useWindowResize();
20
19
  const val = activeMark(editor, format);
21
-
22
- // const noFontSize =
23
- // val === "normal" || (typeof val === "object" && !Object.keys(val)?.length);
24
-
25
- const value = getTextSizeVal(editor);
20
+ const value = getBreakPointsValue(val, size?.device);
21
+ const [fontSize, setFontSize] = useState();
22
+ const timerRef = useRef();
26
23
  useEffect(() => {
27
24
  setFontSize(getSizeVal());
28
25
  }, [value]);
@@ -58,7 +55,13 @@ const TextSize = ({
58
55
  };
59
56
  const getSizeVal = () => {
60
57
  try {
61
- return parseInt(value);
58
+ let size = `${value}`?.indexOf("px") >= 0 ? value : sizeMap[value] || value;
59
+ Object.entries(headingMap).forEach(([format, value]) => {
60
+ if (isBlockActive(editor, format) && isNaN(parseInt(size))) {
61
+ size = value;
62
+ }
63
+ });
64
+ return parseInt(size);
62
65
  } catch (err) {
63
66
  return "";
64
67
  }
@@ -10,7 +10,6 @@ import usePopupStyle from "../PopupTool/PopupToolStyle";
10
10
  import PopperHeader from "../PopupTool/PopperHeader";
11
11
  import { useEditorContext } from "../../hooks/useMouseMove";
12
12
  import PageSettingsButton from "../../Elements/PageSettings/PageSettingsButton";
13
- import { isFreeGrid } from "../../utils/helper";
14
13
  import { jsx as _jsx } from "react/jsx-runtime";
15
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
16
15
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -32,16 +31,6 @@ const POPUP_TITLE = {
32
31
  addElement: "Add Elements",
33
32
  addTemplate: "Templates"
34
33
  };
35
- const disableAddElementBtn = editor => {
36
- if (isFreeGrid(editor?.children || [])) {
37
- return true;
38
- }
39
- const isFocused = !!editor?.selection?.anchor?.path;
40
- if (!isFocused) {
41
- return true;
42
- }
43
- return false;
44
- };
45
34
  const MiniToolbar = props => {
46
35
  const {
47
36
  customProps,
@@ -60,8 +49,7 @@ const MiniToolbar = props => {
60
49
  const open = Boolean(PopupComponent);
61
50
  const DialogComp = !fullScreen ? Popper : Dialog;
62
51
  const {
63
- hideTools,
64
- translation
52
+ hideTools
65
53
  } = customProps;
66
54
  const boxRef = useRef(null); // Add ref to get the Box element
67
55
  const UPDATED_MENU_OPTIONS = MENU_OPTIONS.filter(f => (hideTools || [])?.indexOf(f.type) === -1);
@@ -152,10 +140,11 @@ const MiniToolbar = props => {
152
140
  icon: Icon
153
141
  }) => {
154
142
  const isDisabled = popupType === type || type === "undo" ? !canUndo : type === "redo" ? !canRedo : false;
155
- const disableAddElement = type === "addElement" && disableAddElementBtn(editor);
143
+ const isFocussed = editor?.selection?.anchor?.path;
144
+ const disableAddElement = type === "addElement" && !isFocussed;
156
145
  return /*#__PURE__*/_jsxs(Tooltip, {
157
146
  arrow: true,
158
- title: translation(label),
147
+ title: label,
159
148
  disableHoverListener: toolTip,
160
149
  children: [type !== "page-settings" && /*#__PURE__*/_jsx(IconButton, {
161
150
  className: `${type === popper ? "active" : ""} ${type === "undo" && !canUndo || type === "redo" && !canRedo ? "disabled" : ""} ${type === "undo" ? canUndo ? "activeUndo" : "disabledUndo" : type === "redo" ? canRedo ? "activeRedo" : "disabledRedo" : ""} ${disableAddElement ? "disableAddElement" : ""}
@@ -205,8 +194,7 @@ const MiniToolbar = props => {
205
194
  fullScreen: fullScreen,
206
195
  toggleFullscreen: toggleFullscreen,
207
196
  search: search,
208
- onSearch: onSearch,
209
- customProps: customProps
197
+ onSearch: onSearch
210
198
  }), /*#__PURE__*/_jsx(PopupComponent, {
211
199
  classes: popupStyles,
212
200
  editor: editor,