@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
@@ -1,8 +1,8 @@
1
1
  import React, { useMemo, useState } from "react";
2
2
  import { Grid, Button, Popover } from "@mui/material";
3
+ import ColorPickerTool from "react-gcolor-picker";
3
4
  import { colors } from "../Elements/Color Picker/defaultColors";
4
5
  import SwipeableDrawerComponent from "./SwipeableDrawer";
5
- import CustomColorPicker from "./CustomColorPicker";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
8
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -12,10 +12,7 @@ const ColorPickerToolComponent = ({
12
12
  onSave = () => {},
13
13
  recentColors = [],
14
14
  hideGradient,
15
- handleClose,
16
- closeDrawer,
17
- hideThemeColors,
18
- disableEditTheme
15
+ handleClose
19
16
  }) => {
20
17
  const [color, setColor] = useState(value);
21
18
  const handleSave = () => {
@@ -35,28 +32,22 @@ const ColorPickerToolComponent = ({
35
32
  return /*#__PURE__*/_jsxs(Grid, {
36
33
  item: true,
37
34
  xs: 12,
38
- style: {
39
- position: "relative"
40
- },
41
35
  children: [/*#__PURE__*/_jsx("div", {
42
- children: /*#__PURE__*/_jsx(CustomColorPicker, {
36
+ children: /*#__PURE__*/_jsx(ColorPickerTool, {
43
37
  gradient: hideGradient ? false : true,
44
- color: color,
38
+ value: color,
45
39
  onChange: handleColorChange,
46
- recentColors: recentColors,
47
- defaultColors: initialColors,
48
- closeDrawer: closeDrawer,
49
- hideThemeColors: hideThemeColors,
50
- disableEditTheme: disableEditTheme
40
+ defaultColors: initialColors
51
41
  })
52
42
  }), /*#__PURE__*/_jsxs("div", {
53
- className: "colorPickerActionBtns",
43
+ style: {
44
+ display: "flex",
45
+ justifyContent: "end",
46
+ margin: "8px"
47
+ },
54
48
  children: [/*#__PURE__*/_jsx(Button, {
55
49
  onClick: handleClose,
56
50
  className: "secondaryBtn",
57
- style: {
58
- background: "none"
59
- },
60
51
  children: "Cancel"
61
52
  }), /*#__PURE__*/_jsx(Button, {
62
53
  onClick: handleSave,
@@ -73,11 +64,7 @@ const ColorPickerButton = props => {
73
64
  defaultColors = [],
74
65
  classes = {},
75
66
  recentColors = [],
76
- hideGradient,
77
- children,
78
- handleClose: closeDrawer,
79
- hideThemeColors,
80
- disableEditTheme
67
+ hideGradient
81
68
  } = props;
82
69
  const [anchorEl, setAnchorEl] = useState(null);
83
70
  const open = Boolean(anchorEl);
@@ -89,13 +76,7 @@ const ColorPickerButton = props => {
89
76
  setAnchorEl(null);
90
77
  };
91
78
  return /*#__PURE__*/_jsxs(_Fragment, {
92
- children: [children ? /*#__PURE__*/_jsx("div", {
93
- onClick: handleColorPicker,
94
- style: {
95
- cursor: "pointer"
96
- },
97
- children: children
98
- }) : /*#__PURE__*/_jsx(Button, {
79
+ children: [/*#__PURE__*/_jsx(Button, {
99
80
  style: {
100
81
  background: value,
101
82
  height: "22px",
@@ -122,10 +103,7 @@ const ColorPickerButton = props => {
122
103
  onSave: onSave,
123
104
  recentColors: recentColors,
124
105
  hideGradient: hideGradient,
125
- handleClose: handleClose,
126
- closeDrawer: closeDrawer,
127
- hideThemeColors: hideThemeColors,
128
- disableEditTheme: disableEditTheme
106
+ handleClose: handleClose
129
107
  })
130
108
  })
131
109
  }) : /*#__PURE__*/_jsx(Popover, {
@@ -151,10 +129,7 @@ const ColorPickerButton = props => {
151
129
  onSave: onSave,
152
130
  recentColors: recentColors,
153
131
  hideGradient: hideGradient,
154
- handleClose: handleClose,
155
- closeDrawer: closeDrawer,
156
- hideThemeColors: hideThemeColors,
157
- disableEditTheme: disableEditTheme
132
+ handleClose: handleClose
158
133
  })
159
134
  })
160
135
  })]
@@ -11,8 +11,7 @@ const CustomDialog = (props, ref) => {
11
11
  content,
12
12
  confirmText,
13
13
  cancelText,
14
- onConfirm,
15
- translation
14
+ onConfirm
16
15
  } = props;
17
16
  const [open, setOpen] = useState(false);
18
17
  const isMobile = useMediaQuery("(max-width:899px)");
@@ -20,9 +19,6 @@ const CustomDialog = (props, ref) => {
20
19
  theme
21
20
  } = useEditorContext();
22
21
  const classes = CustomDialogStyles(theme);
23
- const translatedContent = content || translation("custonDialogueDefaultText");
24
- const translatedConfirmText = confirmText || translation("confirmText");
25
- const translatedCancelText = cancelText || translation("cancelText");
26
22
  useImperativeHandle(ref, () => ({
27
23
  handleOpen: () => setOpen(true),
28
24
  handleClose: () => setOpen(false)
@@ -30,20 +26,20 @@ const CustomDialog = (props, ref) => {
30
26
  const DialogueContent = () => /*#__PURE__*/_jsxs(_Fragment, {
31
27
  children: [/*#__PURE__*/_jsx(DialogContent, {
32
28
  children: /*#__PURE__*/_jsx(Typography, {
33
- children: translatedContent
29
+ children: content
34
30
  })
35
31
  }), /*#__PURE__*/_jsxs(DialogActions, {
36
32
  children: [/*#__PURE__*/_jsx(Button, {
37
33
  className: "closeBtn",
38
34
  onClick: () => setOpen(false),
39
- children: translatedCancelText
35
+ children: cancelText
40
36
  }), /*#__PURE__*/_jsx(Button, {
41
37
  className: "confirmBtn",
42
38
  onClick: () => {
43
39
  onConfirm();
44
40
  setOpen(false);
45
41
  },
46
- children: translatedConfirmText
42
+ children: confirmText
47
43
  })]
48
44
  })]
49
45
  });
@@ -79,6 +75,12 @@ const CustomDialog = (props, ref) => {
79
75
  });
80
76
  };
81
77
  const CustomDialogComponent = /*#__PURE__*/forwardRef(CustomDialog);
78
+ CustomDialogComponent.defaultProps = {
79
+ content: "Are you sure you want to proceed?",
80
+ confirmText: "Confirm",
81
+ cancelText: "Cancel",
82
+ onConfirm: () => console.warn("onConfirm not provided")
83
+ };
82
84
  CustomDialogComponent.propTypes = {
83
85
  content: PropTypes.string,
84
86
  confirmText: PropTypes.string,
@@ -7,7 +7,7 @@ import { useEditorContext } from "../../hooks/useMouseMove";
7
7
  import { Transforms } from "slate";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
- const DRAGGABLE_TYPES = ["paragraph", "headingOne", "headingTwo", "headingThree", "headingFour", "headingFive", "headingSix", "paragraphOne", "paragraphTwo", "paragraphThree", "grid"];
10
+ const DRAGGABLE_TYPES = ["paragraph", "headingOne", "headingTwo", "headingThree", "grid"];
11
11
  const DragHandleStyle = fromPopper => {
12
12
  const handleDragStyle = fromPopper ? {
13
13
  position: "absolute",
@@ -18,8 +18,6 @@ const FontLoader = props => {
18
18
  const loadFontsInBatches = (families, batchSize = 5, maxRetries = 3) => {
19
19
  let currentIndex = 0;
20
20
  let retryCount = 0;
21
- // let hideLoaderOn = 30;
22
-
23
21
  const loadNextBatch = () => {
24
22
  try {
25
23
  if (currentIndex >= families?.length) {
@@ -80,7 +78,6 @@ const FontLoader = props => {
80
78
  // console.log(err);
81
79
  setLoading(false);
82
80
  });
83
- // setLoading(true);
84
81
  } else {
85
82
  function correctFontArray(fontString) {
86
83
  let fontsArray = fontString?.split(",");
@@ -45,19 +45,8 @@ import TrashIcon from "../assets/svg/TrashCanIcon";
45
45
  import DataTableIcon from "../assets/svg/DataTableIcon";
46
46
  import ChervDown from "../assets/svg/ChervDown";
47
47
  import ChervUp from "../assets/svg/ChervUp";
48
- import ResetIconNew from "../assets/svg/ResetIconNew";
49
48
  import { jsx as _jsx } from "react/jsx-runtime";
50
49
  import { jsxs as _jsxs } from "react/jsx-runtime";
51
- const HeadingIcon = ({
52
- variant
53
- }) => {
54
- return /*#__PURE__*/_jsx("div", {
55
- style: {
56
- color: "#64748B"
57
- },
58
- children: variant
59
- });
60
- };
61
50
  const iconList = {
62
51
  fontFamily: /*#__PURE__*/_jsx(FontFamilyIcon, {
63
52
  size: 20
@@ -90,24 +79,6 @@ const iconList = {
90
79
  size: 18,
91
80
  fill: "#64748B"
92
81
  }),
93
- headingFour: /*#__PURE__*/_jsx(HeadingIcon, {
94
- variant: "H4"
95
- }),
96
- headingFive: /*#__PURE__*/_jsx(HeadingIcon, {
97
- variant: "H5"
98
- }),
99
- headingSix: /*#__PURE__*/_jsx(HeadingIcon, {
100
- variant: "H6"
101
- }),
102
- paragraphOne: /*#__PURE__*/_jsx(HeadingIcon, {
103
- variant: "P1"
104
- }),
105
- paragraphTwo: /*#__PURE__*/_jsx(HeadingIcon, {
106
- variant: "P2"
107
- }),
108
- paragraphThree: /*#__PURE__*/_jsx(HeadingIcon, {
109
- variant: "P3"
110
- }),
111
82
  blockquote: /*#__PURE__*/_jsx(MdFormatQuote, {
112
83
  size: 20,
113
84
  fill: "#64748B",
@@ -358,8 +329,7 @@ const iconList = {
358
329
  stroke: "#64748B",
359
330
  color: "#64748B"
360
331
  }
361
- }),
362
- resetIconNew: /*#__PURE__*/_jsx(ResetIconNew, {})
332
+ })
363
333
  };
364
334
  export const icons = {
365
335
  ...iconList
@@ -31,10 +31,8 @@ const ImageSelector = props => {
31
31
  onClose,
32
32
  open,
33
33
  onSelectImage,
34
- title,
35
- customProps
34
+ title
36
35
  } = props;
37
- const translation = customProps?.translation;
38
36
  const [tabValue, setTabValue] = useState(title === "Image" ? "choose" : "addLink");
39
37
  const [image, setImage] = useState(value || "");
40
38
  const handleTabChange = (e, newValue) => {
@@ -61,9 +59,9 @@ const ImageSelector = props => {
61
59
  justifyContent: "space-between",
62
60
  alignItems: "center"
63
61
  },
64
- children: [/*#__PURE__*/_jsx(Typography, {
62
+ children: [/*#__PURE__*/_jsxs(Typography, {
65
63
  sx: classes.titleTypo,
66
- children: `${translation("addText")} ${translation(title)}`
64
+ children: ["Add ", title]
67
65
  }), /*#__PURE__*/_jsx(IconButton, {
68
66
  sx: {
69
67
  padding: "0px"
@@ -100,14 +98,14 @@ const ImageSelector = props => {
100
98
  }),
101
99
  iconPosition: "start",
102
100
  value: "upload",
103
- label: `${translation("Upload")} ${translation(title)}`
101
+ label: `Upload ${title}`
104
102
  }), /*#__PURE__*/_jsx(Tab, {
105
103
  className: `${isActive("choose")} ${TAB_SHOW[title].indexOf("choose") === -1 ? "hidden" : ""}`,
106
104
  sx: classes.tab,
107
105
  icon: /*#__PURE__*/_jsx(ImageElementIcon, {}),
108
106
  iconPosition: "start",
109
107
  value: "choose",
110
- label: `${translation("Choose")} ${translation(title)}`
108
+ label: `Choose ${title}`
111
109
  }), /*#__PURE__*/_jsx(Tab, {
112
110
  className: `${isActive("addLink")} ${TAB_SHOW[title].indexOf("addLink") === -1 ? "hidden" : ""}`,
113
111
  sx: classes.tab,
@@ -119,7 +117,7 @@ const ImageSelector = props => {
119
117
  }),
120
118
  iconPosition: "start",
121
119
  value: "addLink",
122
- label: `${translation("addText")} ${translation(title)} ${translation("Link")}`
120
+ label: `Add ${title} Link`
123
121
  })]
124
122
  })
125
123
  }), /*#__PURE__*/_jsx(Grid, {
@@ -146,13 +144,13 @@ const ImageSelector = props => {
146
144
  onClick: onClose,
147
145
  className: "secondaryBtn",
148
146
  sx: classes.closeBtn,
149
- children: translation("Cancel")
147
+ children: "Cancel"
150
148
  }), /*#__PURE__*/_jsx(Button, {
151
149
  disabled: !image,
152
150
  onClick: onSave,
153
151
  className: `primaryBtn ${!image ? "disabled" : ""}`,
154
152
  sx: classes.saveBtn,
155
- children: translation("Save")
153
+ children: "Save"
156
154
  })]
157
155
  })]
158
156
  }) : null;
@@ -6,10 +6,8 @@ const AddLink = props => {
6
6
  const {
7
7
  classes,
8
8
  onUploaded,
9
- title,
10
- customProps
9
+ title
11
10
  } = props;
12
- const translation = customProps?.translation;
13
11
  const [url, setUrl] = useState("");
14
12
  const handleChange = e => {
15
13
  setUrl(e.target.value);
@@ -25,16 +23,16 @@ const AddLink = props => {
25
23
  paddingTop: "8px"
26
24
  },
27
25
  children: /*#__PURE__*/_jsx(TextField, {
28
- placeholder: `${translation("Add")} ${translation(title)} ${translation("URL")}`,
26
+ placeholder: `Add ${title} URL`,
29
27
  fullWidth: true,
30
28
  size: "small",
31
29
  value: url,
32
30
  onChange: handleChange,
33
- helperText: translation("addLinkHelperText"),
31
+ helperText: "Click Check Icon and Save...",
34
32
  sx: classes.addLinkField,
35
33
  InputProps: {
36
34
  endAdornment: /*#__PURE__*/_jsx(Tooltip, {
37
- title: `${translation("Add")} ${translation(title)} ${translation("URL")}`,
35
+ title: `Add ${title} URL`,
38
36
  arrow: true,
39
37
  children: /*#__PURE__*/_jsx(IconButton, {
40
38
  sx: classes.addLinkBtn,
@@ -76,7 +76,7 @@ const ImageSelectorStyles = theme => ({
76
76
  background: theme?.palette?.editor?.deviderBgColor,
77
77
  "@media only screen and (min-width: 899px)": {
78
78
  margin: "0px 24px",
79
- width: "calc(100% - 48px)"
79
+ width: 'calc(100% - 48px)'
80
80
  }
81
81
  },
82
82
  "& .primaryBtn": {
@@ -104,6 +104,12 @@ const ImageSelectorStyles = theme => ({
104
104
  marginRight: "8px !important"
105
105
  },
106
106
  "& .MuiGrid-root": {
107
+ "&::-webkit-scrollbar-thumb": {
108
+ background: `none !important`
109
+ },
110
+ "&::-webkit-scrollbar-track": {
111
+ visibility: "hidden"
112
+ },
107
113
  "&::-webkit-scrollbar-thumb": {
108
114
  background: `${theme?.palette?.editor?.brainPopupScroll} !important`
109
115
  },
@@ -112,10 +118,10 @@ const ImageSelectorStyles = theme => ({
112
118
  }
113
119
  },
114
120
  "& .MuiImageList-root": {
115
- margin: "0px"
121
+ margin: '0px'
116
122
  },
117
123
  "& .MuiDialogContent-root": {
118
- padding: "20px 24px 5px 24px"
124
+ padding: '20px 24px 5px 24px'
119
125
  }
120
126
  },
121
127
  titleTypo: {
@@ -24,8 +24,7 @@ const OpenInNewTab = props => {
24
24
  const {
25
25
  nav,
26
26
  openInNewTab,
27
- onNewTabChange,
28
- translation
27
+ onNewTabChange
29
28
  } = props;
30
29
  return nav?.showOpenInNewTab ? /*#__PURE__*/_jsx(FormControlLabel, {
31
30
  className: "ccheckbox-primary",
@@ -35,7 +34,7 @@ const OpenInNewTab = props => {
35
34
  }),
36
35
  label: /*#__PURE__*/_jsx(Typography, {
37
36
  variant: "body2",
38
- children: translation("Open in new tab")
37
+ children: "Open in new tab"
39
38
  })
40
39
  }) : null;
41
40
  };
@@ -57,8 +56,7 @@ export const SelectPage = props => {
57
56
  const {
58
57
  value,
59
58
  onChange,
60
- services,
61
- translation
59
+ services
62
60
  } = props;
63
61
  const [pages, setPages] = useState([]);
64
62
  const editor = useSlate();
@@ -114,7 +112,7 @@ export const SelectPage = props => {
114
112
  children: [/*#__PURE__*/_jsx(FreeSoloCreateOption, {
115
113
  label: page?.label,
116
114
  setValue: val => onChange(val?.value || ""),
117
- placeholder: translation("Select Page"),
115
+ placeholder: "Select Page",
118
116
  options: pages,
119
117
  disabled: isCurrentPage
120
118
  }), /*#__PURE__*/_jsx(FreeSoloCreateOption, {
@@ -126,7 +124,7 @@ export const SelectPage = props => {
126
124
  }
127
125
  onChange(url);
128
126
  },
129
- placeholder: translation("Select Section or anchor"),
127
+ placeholder: "Select Section or anchor",
130
128
  options: page?.sections?.map(p => ({
131
129
  label: p,
132
130
  value: p
@@ -138,13 +136,12 @@ export const SelectPage = props => {
138
136
  };
139
137
  export const Trigger = props => {
140
138
  const {
141
- nav,
142
- translation
139
+ nav
143
140
  } = props;
144
- return /*#__PURE__*/_jsx(Typography, {
141
+ return /*#__PURE__*/_jsxs(Typography, {
145
142
  variant: "subtitle1",
146
143
  gutterBottom: true,
147
- children: `${translation("Choosing this will trigger the")} ${translation(nav.type)} ${translation("step")}`
144
+ children: ["Choosing this will trigger the ", nav.type, " step"]
148
145
  });
149
146
  };
150
147
  const scrollToOptions = [{
@@ -158,7 +155,6 @@ export const ScrollTopBottom = props => {
158
155
  const {
159
156
  value,
160
157
  onChange,
161
- translation,
162
158
  classes
163
159
  } = props;
164
160
  return /*#__PURE__*/_jsxs(_Fragment, {
@@ -167,7 +163,7 @@ export const ScrollTopBottom = props => {
167
163
  sx: {
168
164
  paddingBottom: "4px"
169
165
  },
170
- children: translation("Choose Top/Bottom of page")
166
+ children: "Choose Top/Bottom of page"
171
167
  }), /*#__PURE__*/_jsx(Select, {
172
168
  size: "small",
173
169
  fullWidth: true,
@@ -181,7 +177,7 @@ export const ScrollTopBottom = props => {
181
177
  value: option.value,
182
178
  children: /*#__PURE__*/_jsx(Typography, {
183
179
  variant: "body2",
184
- children: translation(option.label)
180
+ children: option.label
185
181
  })
186
182
  }, i);
187
183
  })
@@ -44,8 +44,7 @@ export default function LinkSettings(props) {
44
44
  } = props;
45
45
  const {
46
46
  isMobile,
47
- tagName,
48
- translation
47
+ tagName
49
48
  } = customProps;
50
49
  const navOptions = getNavOptions(customProps.hideTools, tagName, allowTrigger);
51
50
  const classes = LinkSettingsStyles(theme);
@@ -73,7 +72,7 @@ export default function LinkSettings(props) {
73
72
  sx: {
74
73
  fontWeight: 600
75
74
  },
76
- children: translation("dialogueTitle")
75
+ children: "What do you want to link to?"
77
76
  }), /*#__PURE__*/_jsx(Select, {
78
77
  size: "small",
79
78
  fullWidth: true,
@@ -95,7 +94,7 @@ export default function LinkSettings(props) {
95
94
  value: navOption.value,
96
95
  children: /*#__PURE__*/_jsx(Typography, {
97
96
  variant: "body2",
98
- children: translation(navOption.label)
97
+ children: navOption.label
99
98
  })
100
99
  }, i);
101
100
  })
@@ -104,15 +103,14 @@ export default function LinkSettings(props) {
104
103
  paddingTop: "14px"
105
104
  },
106
105
  children: NavSettings && /*#__PURE__*/_jsx(NavSettings, {
107
- placeholder: translation(nav?.placeholder),
106
+ placeholder: nav?.placeholder,
108
107
  nav: nav,
109
108
  onChange: onChange,
110
109
  value: navValue,
111
110
  openInNewTab: openInNewTab,
112
111
  onNewTabChange: () => setOpenInNewTab(prev => !prev),
113
112
  services: customProps.services,
114
- classes: classes,
115
- translation: translation
113
+ classes: classes
116
114
  })
117
115
  }), /*#__PURE__*/_jsx(Box, {
118
116
  component: "div",
@@ -120,8 +118,7 @@ export default function LinkSettings(props) {
120
118
  children: /*#__PURE__*/_jsx(ActionsButtons, {
121
119
  classes: classes,
122
120
  onCancel: handleClose,
123
- onSave: onSubmit,
124
- translation: translation
121
+ onSave: onSubmit
125
122
  })
126
123
  })]
127
124
  });
@@ -133,7 +130,7 @@ export default function LinkSettings(props) {
133
130
  fullWidth: true,
134
131
  maxWidth: "sm",
135
132
  children: [/*#__PURE__*/_jsx(DialogTitle, {
136
- children: translation("dialogueTitle")
133
+ children: "What do you want to link to?"
137
134
  }), /*#__PURE__*/_jsx(IconButton, {
138
135
  "aria-label": "close",
139
136
  onClick: handleClose,
@@ -155,7 +152,7 @@ export default function LinkSettings(props) {
155
152
  return /*#__PURE__*/_jsx(FormControlLabel, {
156
153
  value: navOption.value,
157
154
  control: /*#__PURE__*/_jsx(Radio, {}),
158
- label: translation(navOption.label),
155
+ label: navOption.label,
159
156
  onChange: () => {
160
157
  setNav(navOption);
161
158
  setNavValue("");
@@ -168,15 +165,14 @@ export default function LinkSettings(props) {
168
165
  item: true,
169
166
  xs: 6,
170
167
  children: NavSettings && /*#__PURE__*/_jsx(NavSettings, {
171
- placeholder: translation(nav?.placeholder),
168
+ placeholder: nav?.placeholder,
172
169
  nav: nav,
173
170
  onChange: onChange,
174
171
  value: navValue,
175
172
  openInNewTab: openInNewTab,
176
173
  onNewTabChange: () => setOpenInNewTab(prev => !prev),
177
174
  services: customProps.services,
178
- classes: classes,
179
- translation: translation
175
+ classes: classes
180
176
  })
181
177
  })]
182
178
  })
@@ -184,8 +180,7 @@ export default function LinkSettings(props) {
184
180
  children: /*#__PURE__*/_jsx(ActionsButtons, {
185
181
  classes: classes,
186
182
  onCancel: handleClose,
187
- onSave: onSubmit,
188
- translation: translation
183
+ onSave: onSubmit
189
184
  })
190
185
  })]
191
186
  });
@@ -194,18 +189,17 @@ export default function LinkSettings(props) {
194
189
  function ActionsButtons({
195
190
  classes,
196
191
  onCancel,
197
- onSave,
198
- translation
192
+ onSave
199
193
  }) {
200
194
  return /*#__PURE__*/_jsxs(_Fragment, {
201
195
  children: [/*#__PURE__*/_jsx(Button, {
202
196
  onClick: onCancel,
203
197
  sx: classes.closeBtn,
204
- children: translation("Cancel")
198
+ children: "Cancel"
205
199
  }), /*#__PURE__*/_jsx(Button, {
206
200
  onClick: onSave,
207
201
  sx: classes.saveBtn,
208
- children: translation("Save")
202
+ children: "Save"
209
203
  })]
210
204
  });
211
205
  }
@@ -13,7 +13,7 @@ export const getNavOptions = (hideTools = [], tagName = "", allowTrigger) => {
13
13
  }, {
14
14
  label: "Web Address",
15
15
  value: "webAddress",
16
- placeholder: "httpsText",
16
+ placeholder: "https://",
17
17
  showOpenInNewTab: true
18
18
  }, {
19
19
  label: "Select Page and Section",
@@ -27,6 +27,9 @@ const DynamicIcon = ({
27
27
  iconLoader(iconName, props).then(iconHTML => {
28
28
  if (mounted) {
29
29
  setIcon(iconHTML);
30
+ if (props.onIconLoad) {
31
+ props.onIconLoad(iconHTML);
32
+ }
30
33
  }
31
34
  });
32
35
  return () => {
@@ -24,12 +24,8 @@ const MentionsPopup = /*#__PURE__*/forwardRef((props, ref) => {
24
24
  mentions,
25
25
  setMentions,
26
26
  type,
27
- otherProps,
28
- customProps
27
+ otherProps
29
28
  } = props;
30
- const {
31
- translation
32
- } = customProps;
33
29
  const classes = usePopupStyle(theme);
34
30
  const papperRef = useRef(null);
35
31
  const buttonRef = useRef(null);
@@ -98,7 +94,7 @@ const MentionsPopup = /*#__PURE__*/forwardRef((props, ref) => {
98
94
  sx: classes.groupHeader,
99
95
  component: "div",
100
96
  variant: "h6",
101
- children: translation(prevGroup)
97
+ children: prevGroup
102
98
  });
103
99
  } else {
104
100
  return null;