@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
@@ -2,222 +2,108 @@ import { useMemo } from "react";
2
2
  import { activeMark, addMarkData, isBlockActive, toggleBlock } from "../../../utils/SlateUtilityFunctions";
3
3
  import CustomSelectTool from "./CustomSelectTool";
4
4
  import useWindowResize from "../../../hooks/useWindowResize";
5
- import { BREAKPOINTS_DEVICES, getBreakPointsValue, isTextCustomized as isCustomized, textThemeFields as themeFields } from "../../../helper/theme";
5
+ import { BREAKPOINTS_DEVICES, getBreakPointsValue } from "../../../helper/theme";
6
6
  import { sizeMap } from "../../../utils/font";
7
- import { Editor } from "slate";
8
- import { useEditorTheme } from "../../../hooks/useEditorTheme";
9
- import { MenuItem, Select } from "@mui/material";
10
7
  import { jsx as _jsx } from "react/jsx-runtime";
11
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
9
  function Label({
13
10
  label,
14
- type,
15
- translation
11
+ type
16
12
  }) {
17
13
  return /*#__PURE__*/_jsxs("span", {
18
14
  children: [/*#__PURE__*/_jsx("strong", {
19
15
  children: label
20
- }), " ", translation(type)]
16
+ }), " ", type]
21
17
  });
22
18
  }
23
19
  function DisplayHeaderLabel({
24
- type,
25
- isCustomized,
26
- isPara = false
20
+ type
27
21
  }) {
28
22
  return /*#__PURE__*/_jsxs("div", {
29
- children: [isCustomized ? "*" : "", isPara ? "P" : "H", /*#__PURE__*/_jsx("sub", {
23
+ children: ["H", /*#__PURE__*/_jsx("sub", {
30
24
  children: type
31
25
  })]
32
26
  });
33
27
  }
34
- function getTypographyOptions(isCustomized, translation) {
35
- const typographyOptions = [{
36
- id: 11,
37
- format: "headingOne",
38
- type: "block",
39
- title: /*#__PURE__*/_jsx(Label, {
40
- label: "H1",
41
- type: "Heading",
42
- translation: translation
43
- }),
44
- label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
45
- type: 1,
46
- isCustomized: isCustomized
47
- }),
48
- group: "typography",
49
- value: "headingOne"
50
- }, {
51
- id: 12,
52
- format: "headingTwo",
53
- type: "block",
54
- title: /*#__PURE__*/_jsx(Label, {
55
- label: "H2",
56
- type: "Heading",
57
- translation: translation
58
- }),
59
- label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
60
- type: 2,
61
- isCustomized: isCustomized
62
- }),
63
- group: "typography",
64
- value: "headingTwo"
65
- }, {
66
- id: 13,
67
- format: "headingThree",
68
- type: "block",
69
- title: /*#__PURE__*/_jsx(Label, {
70
- label: "H3",
71
- type: "Heading",
72
- translation: translation
73
- }),
74
- label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
75
- type: 3,
76
- isCustomized: isCustomized
77
- }),
78
- group: "typography",
79
- value: "headingThree"
80
- }, {
81
- id: 17,
82
- format: "headingFour",
83
- type: "block",
84
- title: /*#__PURE__*/_jsx(Label, {
85
- label: "H4",
86
- type: "Heading",
87
- translation: translation
88
- }),
89
- label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
90
- type: 4,
91
- isCustomized: isCustomized
92
- }),
93
- group: "typography",
94
- value: "headingFour"
95
- }, {
96
- id: 18,
97
- format: "headingFive",
98
- type: "block",
99
- title: /*#__PURE__*/_jsx(Label, {
100
- label: "H5",
101
- type: "Heading",
102
- translation: translation
103
- }),
104
- label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
105
- type: 5,
106
- isCustomized: isCustomized
107
- }),
108
- group: "typography",
109
- value: "headingFive"
110
- }, {
111
- id: 19,
112
- format: "headingSix",
113
- type: "block",
114
- title: /*#__PURE__*/_jsx(Label, {
115
- label: "H6",
116
- type: "Heading",
117
- translation: translation
118
- }),
119
- label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
120
- type: 6,
121
- isCustomized: isCustomized
122
- }),
123
- group: "typography",
124
- value: "headingSix"
125
- }, {
126
- id: 20,
127
- format: "paragraphOne",
128
- type: "block",
129
- title: /*#__PURE__*/_jsx(Label, {
130
- label: "P1",
131
- type: "Paragraph",
132
- translation: translation
133
- }),
134
- label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
135
- type: 1,
136
- isCustomized: isCustomized,
137
- isPara: true
138
- }),
139
- group: "typography",
140
- value: "paragraphOne"
141
- }, {
142
- id: 21,
143
- format: "paragraphTwo",
144
- type: "block",
145
- title: /*#__PURE__*/_jsx(Label, {
146
- label: "P2",
147
- type: "Paragraph",
148
- translation: translation
149
- }),
150
- label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
151
- type: 2,
152
- isCustomized: isCustomized,
153
- isPara: true
154
- }),
155
- group: "typography",
156
- value: "paragraphTwo"
157
- }, {
158
- id: 22,
159
- format: "paragraphThree",
160
- type: "block",
161
- title: /*#__PURE__*/_jsx(Label, {
162
- label: "P3",
163
- type: "Paragraph",
164
- translation: translation
165
- }),
166
- label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
167
- type: 3,
168
- isCustomized: isCustomized,
169
- isPara: true
170
- }),
171
- group: "typography",
172
- value: "paragraphThree"
173
- }
174
- // {
175
- // id: 14,
176
- // format: "fontSize",
177
- // type: "mark",
178
- // title: <Label label="L" type="Large" />,
179
- // label: "L",
180
- // group: "typography",
181
- // value: "huge",
182
- // },
183
- // {
184
- // id: 15,
185
- // format: "fontSize",
186
- // type: "mark",
187
- // title: <Label label="M" type="Medium" />,
188
- // label: "M",
189
- // group: "typography",
190
- // value: "medium",
191
- // },
192
- // {
193
- // id: 16,
194
- // format: "fontSize",
195
- // type: "mark",
196
- // title: <Label label="S" type="Small" />,
197
- // label: "S",
198
- // group: "typography",
199
- // value: "small",
200
- // },
201
- ];
202
-
203
- return typographyOptions;
204
- }
28
+ const typographyOptions = [{
29
+ id: 11,
30
+ format: "headingOne",
31
+ type: "block",
32
+ title: /*#__PURE__*/_jsx(Label, {
33
+ label: "H1",
34
+ type: "Header"
35
+ }),
36
+ label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
37
+ type: 1
38
+ }),
39
+ group: "typography",
40
+ value: "headingOne"
41
+ }, {
42
+ id: 12,
43
+ format: "headingTwo",
44
+ type: "block",
45
+ title: /*#__PURE__*/_jsx(Label, {
46
+ label: "H2",
47
+ type: "Header"
48
+ }),
49
+ label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
50
+ type: 2
51
+ }),
52
+ group: "typography",
53
+ value: "headingTwo"
54
+ }, {
55
+ id: 13,
56
+ format: "headingThree",
57
+ type: "block",
58
+ title: /*#__PURE__*/_jsx(Label, {
59
+ label: "H3",
60
+ type: "Header"
61
+ }),
62
+ label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
63
+ type: 3
64
+ }),
65
+ group: "typography",
66
+ value: "headingThree"
67
+ }, {
68
+ id: 14,
69
+ format: "fontSize",
70
+ type: "mark",
71
+ title: /*#__PURE__*/_jsx(Label, {
72
+ label: "L",
73
+ type: "Large"
74
+ }),
75
+ label: "L",
76
+ group: "typography",
77
+ value: "huge"
78
+ }, {
79
+ id: 15,
80
+ format: "fontSize",
81
+ type: "mark",
82
+ title: /*#__PURE__*/_jsx(Label, {
83
+ label: "M",
84
+ type: "Medium"
85
+ }),
86
+ label: "M",
87
+ group: "typography",
88
+ value: "medium"
89
+ }, {
90
+ id: 16,
91
+ format: "fontSize",
92
+ type: "mark",
93
+ title: /*#__PURE__*/_jsx(Label, {
94
+ label: "S",
95
+ type: "Small"
96
+ }),
97
+ label: "S",
98
+ group: "typography",
99
+ value: "small"
100
+ }];
205
101
  function SelectTypography({
206
102
  editor,
207
103
  classes,
208
- closeMainPopup,
209
- type,
210
- customProps
104
+ closeMainPopup
211
105
  }) {
212
106
  const [size] = useWindowResize();
213
- const {
214
- theme
215
- } = useEditorTheme();
216
- const {
217
- translation
218
- } = customProps;
219
- const isTextCustomized = theme?.id ? isCustomized(editor) : false;
220
- const typographyOptions = getTypographyOptions(isTextCustomized, translation);
221
107
  const updateMarkData = newVal => {
222
108
  const val = activeMark(editor, "fontSize");
223
109
  let upData = {
@@ -239,10 +125,7 @@ function SelectTypography({
239
125
  ...upData
240
126
  }
241
127
  });
242
-
243
- // closeMainPopup();
244
128
  };
245
-
246
129
  const selectedBlock = useMemo(() => {
247
130
  return typographyOptions.find(t => {
248
131
  if (t.type === "block") {
@@ -264,13 +147,15 @@ function SelectTypography({
264
147
  });
265
148
  }, [typographyOptions, activeMark, isBlockActive, editor]);
266
149
  const onChange = (format, option) => {
150
+ // add/reset block elements
151
+ toggleBlock(editor, format);
267
152
  if (option.type === "block") {
268
- themeFields.forEach(field => {
269
- Editor.removeMark(editor, field);
153
+ // reset old font size
154
+ // let updatedValue = !selectedBlock ? {} : { xs: "16px", sm: "16px", md: "16px", lg: "16px" }
155
+ addMarkData(editor, {
156
+ format: "fontSize",
157
+ value: {}
270
158
  });
271
-
272
- // add/reset block elements
273
- toggleBlock(editor, format);
274
159
  } else if (option.type === "mark") {
275
160
  const size = sizeMap[option.value] || "";
276
161
  const [sizeInNumber] = size.split("px");
@@ -278,35 +163,11 @@ function SelectTypography({
278
163
  }
279
164
  closeMainPopup();
280
165
  };
281
- const typographyValue = selectedBlock?.value || "headingOne";
282
- if (type === "fullWidth") {
283
- return /*#__PURE__*/_jsx(Select, {
284
- value: typographyValue,
285
- className: "editor-dd",
286
- onChange: e => {
287
- const {
288
- value
289
- } = e.target;
290
- const option = typographyOptions?.find(o => o.value === value);
291
- onChange(value, option);
292
- },
293
- style: {
294
- width: "100%",
295
- height: "36px",
296
- borderRadius: "10px",
297
- fontSize: "14px"
298
- },
299
- children: typographyOptions.map((item, index) => /*#__PURE__*/_jsxs(MenuItem, {
300
- value: item.value,
301
- children: [item.title, " ", isTextCustomized && item.value === typographyValue ? " *" : ""]
302
- }, index))
303
- });
304
- }
305
166
  return /*#__PURE__*/_jsx(CustomSelectTool, {
306
167
  options: typographyOptions,
307
168
  editor: editor,
308
169
  onChange: onChange,
309
- value: typographyValue,
170
+ value: selectedBlock?.value || "headingOne",
310
171
  classes: classes
311
172
  });
312
173
  }
@@ -1,4 +1,4 @@
1
- import { Fade, Grid, IconButton, Paper, Popper, useTheme } from "@mui/material";
1
+ import { Fade, Grid, IconButton, Paper, Popper } from "@mui/material";
2
2
  import SelectTypography from "./SelectTypography";
3
3
  import SelectList from "./SelectList";
4
4
  import { toolbarGroups } from "../../toolbarGroups";
@@ -14,7 +14,7 @@ import MiniColorPicker from "./MiniColorPicker";
14
14
  import SelectAlignment from "./SelectAlignment";
15
15
  import SelectFontSize from "./SelectFontSize";
16
16
  import InfinityAITool from "./InfinityAITool";
17
- import { getSelectedElementColor, viewSlateSelection } from "../../../utils/helper";
17
+ import { viewSlateSelection } from "../../../utils/helper";
18
18
  import { jsx as _jsx } from "react/jsx-runtime";
19
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
20
20
  const DEFAULT_COLOR = {
@@ -35,12 +35,11 @@ const MiniTextFormat = props => {
35
35
  const open = Boolean(anchorEl);
36
36
  const id = open ? "popup-edit-tool" : "";
37
37
  const [size] = useWindowResize();
38
- const theme = useTheme();
39
38
  const removeFontStyles = ["superscript", "subscript"];
40
39
  const fontStyle = allTools.filter(f => f.type === "mark" && !removeFontStyles.includes(f.format));
41
40
  const link = allTools.find(f => f.format?.indexOf("link") >= 0);
42
41
  const fontAlign = allTools.filter(f => f.format?.indexOf("align") >= 0);
43
- const activeColor = getSelectedElementColor(editor, textColorFormat, theme);
42
+ const activeColor = activeMark(editor, textColorFormat) || DEFAULT_COLOR[textColorFormat];
44
43
  const activeBg = activeMark(editor, textBgFormat) || DEFAULT_COLOR[textBgFormat];
45
44
  return /*#__PURE__*/_jsx(Grid, {
46
45
  container: true,
@@ -57,24 +56,20 @@ const MiniTextFormat = props => {
57
56
  }), /*#__PURE__*/_jsx(SelectTypography, {
58
57
  classes: classes,
59
58
  editor: editor,
60
- closeMainPopup: closeMainPopup,
61
- type: "miniToolBar",
62
- customProps: customProps
59
+ closeMainPopup: closeMainPopup
63
60
  }), /*#__PURE__*/_jsx("div", {
64
61
  className: "verticalLine"
65
62
  }), /*#__PURE__*/_jsx(SelectList, {
66
63
  classes: classes,
67
64
  editor: editor,
68
- closeMainPopup: closeMainPopup,
69
- customProps: customProps
65
+ closeMainPopup: closeMainPopup
70
66
  }), /*#__PURE__*/_jsx("div", {
71
67
  className: "verticalLine mr-1"
72
68
  }), /*#__PURE__*/_jsx(SelectAlignment, {
73
69
  fontAlign: fontAlign,
74
70
  classes: classes,
75
71
  editor: editor,
76
- closeMainPopup: closeMainPopup,
77
- customProps: customProps
72
+ closeMainPopup: closeMainPopup
78
73
  }), /*#__PURE__*/_jsx("div", {
79
74
  className: "verticalLine mr-1"
80
75
  }), /*#__PURE__*/_jsx(SelectFontSize, {
@@ -85,24 +80,20 @@ const MiniTextFormat = props => {
85
80
  }), fontStyle?.map((m, i) => {
86
81
  return /*#__PURE__*/_jsx(MarkButton, {
87
82
  editor: editor,
88
- ...m,
89
- customProps: customProps
83
+ ...m
90
84
  }, `pptool_mark_${i}_${m.id}`);
91
85
  }), /*#__PURE__*/_jsx(MiniColorPicker, {
92
86
  format: textColorFormat,
93
87
  classes: classes,
94
88
  activeColor: activeColor,
95
89
  id: "11_cc",
96
- editor: editor,
97
- customProps: customProps,
98
- type: "textColor"
90
+ editor: editor
99
91
  }), /*#__PURE__*/_jsx(MiniColorPicker, {
100
92
  format: textBgFormat,
101
93
  classes: classes,
102
94
  activeColor: activeBg,
103
95
  id: "12_cc",
104
- editor: editor,
105
- customProps: customProps
96
+ editor: editor
106
97
  }), /*#__PURE__*/_jsx("div", {
107
98
  className: "verticalLine ml-1 mr-1"
108
99
  }), /*#__PURE__*/_jsx(LinkButton, {
@@ -135,8 +126,7 @@ const MiniTextFormat = props => {
135
126
  children: [/*#__PURE__*/_jsx(PopperHeader, {
136
127
  title: "Text Settings",
137
128
  classes: classes,
138
- onClose: () => setAnchorEl(null),
139
- customProps: customProps
129
+ onClose: () => setAnchorEl(null)
140
130
  }), /*#__PURE__*/_jsx(TextFormat, {
141
131
  editor: editor,
142
132
  classes: classes,
@@ -35,13 +35,9 @@ const PopperHeader = props => {
35
35
  fullScreen,
36
36
  toggleFullscreen,
37
37
  search,
38
- onSearch,
39
- customProps
38
+ onSearch
40
39
  } = props;
41
40
  const [openSearch, setOpenSearch] = useState(false);
42
- const {
43
- translation
44
- } = customProps;
45
41
  const handleSearchButton = () => {
46
42
  setOpenSearch(!openSearch);
47
43
  };
@@ -50,8 +46,7 @@ const PopperHeader = props => {
50
46
  padding: 2,
51
47
  className: "headerContainer",
52
48
  style: {
53
- paddingTop: "5px",
54
- paddingBottom: "0px"
49
+ paddingTop: "5px"
55
50
  },
56
51
  children: /*#__PURE__*/_jsxs(Grid, {
57
52
  item: true,
@@ -66,7 +61,7 @@ const PopperHeader = props => {
66
61
  fontWeight: "700",
67
62
  color: "#000"
68
63
  },
69
- children: translation(title)
64
+ children: title
70
65
  }), /*#__PURE__*/_jsxs(Grid, {
71
66
  sx: classes.textFormatLabel,
72
67
  justifyContent: "end",
@@ -87,7 +82,7 @@ const PopperHeader = props => {
87
82
  handleChange: onSearch
88
83
  })]
89
84
  }) : null, needFullscreen ? /*#__PURE__*/_jsx(Tooltip, {
90
- title: translation("toggleFullScreen"),
85
+ title: "Toggle Fullscreen",
91
86
  arrow: true,
92
87
  children: /*#__PURE__*/_jsx(IconButton, {
93
88
  style: {
@@ -99,7 +94,7 @@ const PopperHeader = props => {
99
94
  children: fullScreen ? /*#__PURE__*/_jsx(CloseFullscreenIcon, {}) : /*#__PURE__*/_jsx(ToggleFullScreenIcon, {})
100
95
  })
101
96
  }) : null, /*#__PURE__*/_jsx(Tooltip, {
102
- title: translation("Close"),
97
+ title: "Close",
103
98
  arrow: true,
104
99
  children: /*#__PURE__*/_jsx(IconButton, {
105
100
  sx: classes.closeBtn,
@@ -111,7 +111,6 @@ const usePopupStyle = theme => ({
111
111
  width: "323px",
112
112
  maxWidth: "100%",
113
113
  overflowX: "hidden !important",
114
- marginTop: "6px",
115
114
  // 30% of window height
116
115
  maxHeight: `${window.innerHeight * 0.45}px`,
117
116
  overflow: "auto",
@@ -131,7 +130,7 @@ const usePopupStyle = theme => ({
131
130
  },
132
131
  "& .accordionIcon": {
133
132
  "& p": {
134
- textAlign: "left"
133
+ textAlign: 'left'
135
134
  }
136
135
  }
137
136
  },
@@ -305,21 +304,6 @@ const usePopupStyle = theme => ({
305
304
  paddingRight: "0px !important"
306
305
  }
307
306
  },
308
- textFormatContainer: {
309
- ".saveThemeBtnsWrapper": {
310
- position: "sticky",
311
- bottom: "0px",
312
- right: "0px",
313
- boxShadow: "0px -3px 12px 0px #00000017",
314
- padding: "10px",
315
- borderRadius: "8px 8px 19px 19px",
316
- display: "flex",
317
- justifyContent: "end",
318
- alignItems: "center",
319
- gap: "8px",
320
- background: theme?.palette?.editor?.background
321
- }
322
- },
323
307
  textFormatLabel: {
324
308
  display: "flex",
325
309
  alignItems: "center",
@@ -351,10 +335,9 @@ const usePopupStyle = theme => ({
351
335
  borderBottom: `1px solid ${theme?.palette?.editor?.deviderBgColor} !important`
352
336
  },
353
337
  textFormatField: {
354
- marginBottom: "8px"
355
- // marginTop: "8px",
338
+ marginBottom: "8px",
339
+ marginTop: "8px"
356
340
  },
357
-
358
341
  textFormatField1: {
359
342
  marginBottom: "16px",
360
343
  marginTop: "10px"
@@ -433,11 +416,6 @@ const usePopupStyle = theme => ({
433
416
  "& .MuiOutlinedInput-notchedOutline": {
434
417
  border: `1px solid ${theme?.palette?.editor?.inputFieldBorder} !important`
435
418
  },
436
- "& .MuiInputBase-root": {
437
- "& input": {
438
- border: "none !important"
439
- }
440
- },
441
419
  "& svg": {
442
420
  width: "20px",
443
421
  height: "24px"
@@ -446,6 +424,9 @@ const usePopupStyle = theme => ({
446
424
  fontFamilyListOptions: {
447
425
  "& .MuiAutocomplete-listbox": {
448
426
  padding: "0px",
427
+ // "&::-webkit-scrollbar-thumb": {
428
+ // background: `none !important`,
429
+ // },
449
430
  "&::-webkit-scrollbar-thumb": {
450
431
  background: `${theme?.palette?.editor?.brainPopupScroll} !important`
451
432
  },
@@ -456,8 +437,8 @@ const usePopupStyle = theme => ({
456
437
  margin: "5px",
457
438
  borderRadius: "8px",
458
439
  color: theme?.palette?.editor?.menuOptionTextColor,
459
- fontSize: "14px",
460
- padding: "8px 12px",
440
+ fontSize: '14px',
441
+ padding: '8px 12px',
461
442
  '&[aria-selected="true"]': {
462
443
  backgroundColor: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`
463
444
  }
@@ -556,7 +537,7 @@ const usePopupStyle = theme => ({
556
537
  }
557
538
  },
558
539
  alignItems: "flexStart",
559
- // justifyContent: "center",
540
+ justifyContent: "center",
560
541
  flexDirection: "row",
561
542
  "&:hover": {
562
543
  background: "unset"
@@ -805,13 +786,8 @@ const usePopupStyle = theme => ({
805
786
  padding: "0px"
806
787
  },
807
788
  defaultBtn: {
808
- color: "#2563EB !important",
809
- textTransform: "none",
810
- textDecoration: "underline",
811
- "&.Mui-disabled": {
812
- color: "#A0AEC0 !important",
813
- textDecoration: "none"
814
- }
789
+ color: "#0F172A",
790
+ textTransform: "none"
815
791
  },
816
792
  templateCardBtnGrp: {
817
793
  display: "none",
@@ -1162,42 +1138,6 @@ const usePopupStyle = theme => ({
1162
1138
  "& fieldset": {
1163
1139
  border: "none !important"
1164
1140
  }
1165
- },
1166
- customCheckBox: {
1167
- marginTop: "4px",
1168
- padding: "0px",
1169
- "& .MuiCheckbox-root": {
1170
- padding: "8px 8px 8px 10px",
1171
- "&:hover": {
1172
- background: "unset !important"
1173
- }
1174
- },
1175
- "& button": {
1176
- width: "14px !important",
1177
- height: "14px !important",
1178
- borderRadius: "3px",
1179
- border: `1px solid ${theme?.palette?.editor?.buttonBorder3}`,
1180
- padding: "0px",
1181
- "& svg": {
1182
- width: "10px",
1183
- height: "10px"
1184
- }
1185
- },
1186
- "& .checkedIcon": {
1187
- background: "#2563EB",
1188
- borderColor: "#2563EB"
1189
- },
1190
- "& .unCheckedIcon": {
1191
- background: theme?.palette?.editor?.checkedIconBg
1192
- },
1193
- "& p": {
1194
- margin: "0px !important",
1195
- color: theme?.palette?.editor?.tv_text,
1196
- fontSize: "13px"
1197
- }
1198
- },
1199
- dividerGrid: {
1200
- margin: "5px 0px 10px 0px"
1201
1141
  }
1202
1142
  });
1203
1143
  export default usePopupStyle;