@flozy/editor 9.8.3 → 9.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/dist/Editor/ChatEditor.js +26 -19
  2. package/dist/Editor/CommonEditor.js +141 -26
  3. package/dist/Editor/DialogWrapper.js +31 -25
  4. package/dist/Editor/Editor.css +11 -7
  5. package/dist/Editor/Elements/AI/AIInput.js +5 -3
  6. package/dist/Editor/Elements/AI/CustomSelect.js +9 -5
  7. package/dist/Editor/Elements/AI/PopoverAIInput.js +15 -5
  8. package/dist/Editor/Elements/Accordion/Accordion.js +4 -3
  9. package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +4 -1
  10. package/dist/Editor/Elements/Accordion/AccordionButton.js +6 -2
  11. package/dist/Editor/Elements/Accordion/AccordionTitlePopup.js +4 -1
  12. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  13. package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +6 -2
  14. package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +4 -1
  15. package/dist/Editor/Elements/Attachments/AttachmentsButton.js +4 -1
  16. package/dist/Editor/Elements/Button/ButtonPopup.js +4 -1
  17. package/dist/Editor/Elements/Button/ButtonToolIcon.js +6 -2
  18. package/dist/Editor/Elements/Button/EditorButton.js +43 -30
  19. package/dist/Editor/Elements/Carousel/Carousel.js +5 -4
  20. package/dist/Editor/Elements/Carousel/CarouselButton.js +6 -2
  21. package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -2
  22. package/dist/Editor/Elements/ChipText/ChipTextPopup.js +4 -1
  23. package/dist/Editor/Elements/CodeToText/CodeToText.js +5 -4
  24. package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +6 -2
  25. package/dist/Editor/Elements/Color Picker/ColorButtons.js +60 -14
  26. package/dist/Editor/Elements/Color Picker/ColorPicker.css +25 -1
  27. package/dist/Editor/Elements/Color Picker/ColorPicker.js +10 -7
  28. package/dist/Editor/Elements/Color Picker/Styles.js +15 -13
  29. package/dist/Editor/Elements/Colorbox/ColorboxButton.js +6 -2
  30. package/dist/Editor/Elements/DataView/DataView.js +5 -2
  31. package/dist/Editor/Elements/DataView/DataViewButton.js +6 -2
  32. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +4 -2
  33. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +448 -0
  34. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +21 -6
  35. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +13 -12
  36. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +7 -4
  37. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +7 -5
  38. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +9 -7
  39. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +8 -3
  40. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +5 -3
  41. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +6 -5
  42. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +5 -3
  43. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +9 -7
  44. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +15 -12
  45. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +3 -2
  46. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +3 -2
  47. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +23 -6
  48. package/dist/Editor/Elements/DataView/Layouts/TableView.js +6 -4
  49. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +8 -4
  50. package/dist/Editor/Elements/DataView/Layouts/index.js +3 -1
  51. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +5 -2
  52. package/dist/Editor/Elements/Divider/Divider.js +5 -3
  53. package/dist/Editor/Elements/Divider/DividerButton.js +6 -2
  54. package/dist/Editor/Elements/Divider/DividerPopup.js +3 -2
  55. package/dist/Editor/Elements/Embed/Embed.js +4 -1
  56. package/dist/Editor/Elements/Embed/EmbedPopup.js +4 -1
  57. package/dist/Editor/Elements/Embed/Image.js +16 -11
  58. package/dist/Editor/Elements/Embed/Video.js +10 -7
  59. package/dist/Editor/Elements/EmbedScript/Code.js +7 -4
  60. package/dist/Editor/Elements/EmbedScript/EmbedScript.js +6 -2
  61. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +8 -5
  62. package/dist/Editor/Elements/Emoji/EmojiButton.js +6 -2
  63. package/dist/Editor/Elements/Form/FieldPopup.js +4 -1
  64. package/dist/Editor/Elements/Form/Form.js +12 -9
  65. package/dist/Editor/Elements/Form/FormButton.js +6 -2
  66. package/dist/Editor/Elements/Form/FormPopup.js +3 -2
  67. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +18 -12
  68. package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +13 -8
  69. package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +3 -2
  70. package/dist/Editor/Elements/Form/Workflow/Styles.js +24 -22
  71. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +4 -2
  72. package/dist/Editor/Elements/Form/Workflow/index.js +15 -9
  73. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +67 -23
  74. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +31 -6
  75. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +6 -2
  76. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +54 -6
  77. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +3 -2
  78. package/dist/Editor/Elements/FreeGrid/Options/More.js +10 -4
  79. package/dist/Editor/Elements/FreeGrid/styles.js +3 -0
  80. package/dist/Editor/Elements/Grid/Grid.js +13 -10
  81. package/dist/Editor/Elements/Grid/GridButton.js +9 -5
  82. package/dist/Editor/Elements/Grid/GridItem.js +14 -8
  83. package/dist/Editor/Elements/Grid/GridItemPopup.js +4 -1
  84. package/dist/Editor/Elements/Grid/GridPopup.js +4 -1
  85. package/dist/Editor/Elements/Grid/SectionPopup.js +4 -1
  86. package/dist/Editor/Elements/Link/Link.js +8 -5
  87. package/dist/Editor/Elements/Link/LinkButton.js +4 -1
  88. package/dist/Editor/Elements/List/CheckList.js +18 -10
  89. package/dist/Editor/Elements/NewLine/NewLineButton.js +6 -2
  90. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +4 -1
  91. package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +4 -1
  92. package/dist/Editor/Elements/Search/SearchButton.js +7 -4
  93. package/dist/Editor/Elements/Search/SearchList.js +10 -5
  94. package/dist/Editor/Elements/Signature/SignatureButton.js +6 -2
  95. package/dist/Editor/Elements/Signature/SignatureOptions/DrawSignature.js +2 -8
  96. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +6 -2
  97. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +4 -1
  98. package/dist/Editor/Elements/Signature/SignaturePopup.js +17 -16
  99. package/dist/Editor/Elements/SimpleText/index.js +14 -5
  100. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  101. package/dist/Editor/Elements/Table/DragButton.js +4 -2
  102. package/dist/Editor/Elements/Table/Table.js +23 -11
  103. package/dist/Editor/Elements/Table/TablePopup.js +4 -1
  104. package/dist/Editor/Elements/Table/TableSelector.js +10 -6
  105. package/dist/Editor/Elements/Table/TableTool.js +8 -4
  106. package/dist/Editor/Elements/Title/title.js +9 -8
  107. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +4 -1
  108. package/dist/Editor/Elements/Variables/VariableButton.js +10 -1
  109. package/dist/Editor/MiniEditor.js +10 -3
  110. package/dist/Editor/Styles/EditorStyles.js +5 -5
  111. package/dist/Editor/Toolbar/Basic/index.js +2 -1
  112. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +6 -2
  113. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +27 -3
  114. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -3
  115. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +8 -4
  116. package/dist/Editor/Toolbar/FormatTools/TextSize.js +10 -13
  117. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +17 -5
  118. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +10 -5
  119. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +10 -4
  120. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +10 -4
  121. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +9 -3
  122. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +42 -35
  123. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +6 -13
  124. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +58 -51
  125. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +29 -22
  126. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +226 -87
  127. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +20 -10
  128. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +10 -5
  129. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +71 -11
  130. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +11 -5
  131. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +122 -42
  132. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +436 -0
  133. package/dist/Editor/Toolbar/PopupTool/index.js +18 -2
  134. package/dist/Editor/Toolbar/Toolbar.js +20 -10
  135. package/dist/Editor/Toolbar/toolbarGroups.js +48 -6
  136. package/dist/Editor/assets/svg/ClearAllRounded.js +31 -0
  137. package/dist/Editor/assets/svg/ResetIconNew.js +23 -0
  138. package/dist/Editor/assets/svg/ThemeIcons.js +291 -0
  139. package/dist/Editor/common/ColorPickerButton.js +39 -14
  140. package/dist/Editor/common/CustomColorPicker/index.js +131 -0
  141. package/dist/Editor/common/CustomColorPicker/style.js +53 -0
  142. package/dist/Editor/common/CustomDialog/index.js +8 -10
  143. package/dist/Editor/common/CustomDialog2/index.js +94 -0
  144. package/dist/Editor/common/CustomDialog2/style.js +67 -0
  145. package/dist/Editor/common/CustomSelect.js +43 -0
  146. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  147. package/dist/Editor/common/FontLoader/FontLoader.js +3 -0
  148. package/dist/Editor/common/Icon.js +31 -1
  149. package/dist/Editor/common/ImageSelector/ImageSelector.js +10 -8
  150. package/dist/Editor/common/ImageSelector/Options/AddLink.js +6 -4
  151. package/dist/Editor/common/ImageSelector/Styles.js +3 -9
  152. package/dist/Editor/common/LinkSettings/NavComponents.js +14 -10
  153. package/dist/Editor/common/LinkSettings/index.js +20 -14
  154. package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
  155. package/dist/Editor/common/MUIIcon/index.js +0 -3
  156. package/dist/Editor/common/MentionsPopup/index.js +6 -2
  157. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +46 -22
  158. package/dist/Editor/common/RnD/ContextMenu/index.js +3 -2
  159. package/dist/Editor/common/RnD/ElementOptions/index.js +7 -2
  160. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +8 -3
  161. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +7 -3
  162. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +3 -2
  163. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +3 -2
  164. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +3 -2
  165. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +3 -2
  166. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +7 -4
  167. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +3 -2
  168. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +3 -2
  169. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +6 -2
  170. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +3 -2
  171. package/dist/Editor/common/RnD/OptionsPopup/index.js +4 -3
  172. package/dist/Editor/common/RnD/ShadowElement.js +2 -1
  173. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +11 -4
  174. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +17 -0
  175. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +6 -3
  176. package/dist/Editor/common/RnD/Utils/gridDropItem.js +73 -9
  177. package/dist/Editor/common/RnD/Utils/index.js +3 -0
  178. package/dist/Editor/common/RnD/VirtualElement/BoxHeaderAutoAlignment.js +43 -0
  179. package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +44 -0
  180. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +134 -0
  181. package/dist/Editor/common/RnD/VirtualElement/helper.js +382 -0
  182. package/dist/Editor/common/RnD/VirtualElement/index.js +187 -103
  183. package/dist/Editor/common/RnD/VirtualElement/styles.js +155 -7
  184. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +5 -3
  185. package/dist/Editor/common/RnD/index.js +69 -13
  186. package/dist/Editor/common/Section/index.js +7 -4
  187. package/dist/Editor/common/Shorthands/elements.js +72 -3
  188. package/dist/Editor/common/SnackBar/index.js +43 -0
  189. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
  190. package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
  191. package/dist/Editor/common/StyleBuilder/buttonStyle.js +6 -4
  192. package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
  193. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
  194. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
  195. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +13 -9
  196. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +11 -3
  197. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +19 -5
  198. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +22 -10
  199. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +6 -3
  200. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +27 -13
  201. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +43 -14
  202. package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +10 -6
  203. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +19 -6
  204. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +6 -2
  205. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +5 -2
  206. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +7 -6
  207. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +9 -6
  208. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +8 -2
  209. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +12 -11
  210. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +6 -2
  211. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +8 -4
  212. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +6 -2
  213. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +21 -12
  214. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  215. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  216. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  217. package/dist/Editor/common/StyleBuilder/index.js +8 -5
  218. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +5 -7
  219. package/dist/Editor/common/SwipeableDrawer/index.js +1 -1
  220. package/dist/Editor/common/Uploader.js +16 -5
  221. package/dist/Editor/commonStyle.js +68 -57
  222. package/dist/Editor/helper/index.js +27 -3
  223. package/dist/Editor/helper/textIndeces.js +58 -0
  224. package/dist/Editor/helper/theme.js +202 -2
  225. package/dist/Editor/hooks/useAutoScroll.js +38 -0
  226. package/dist/Editor/hooks/useEditorTheme.js +153 -0
  227. package/dist/Editor/hooks/useMouseMove.js +9 -3
  228. package/dist/Editor/hooks/useThemeValues.js +63 -0
  229. package/dist/Editor/plugins/withEmbeds.js +1 -1
  230. package/dist/Editor/plugins/withHTML.js +11 -9
  231. package/dist/Editor/plugins/withLayout.js +3 -2
  232. package/dist/Editor/plugins/withLinks.js +10 -0
  233. package/dist/Editor/plugins/withTable.js +1 -1
  234. package/dist/Editor/theme/ThemeList.js +50 -173
  235. package/dist/Editor/theme/index.js +149 -0
  236. package/dist/Editor/themeSettings/ActiveTheme.js +72 -0
  237. package/dist/Editor/themeSettings/buttons/index.js +290 -0
  238. package/dist/Editor/themeSettings/buttons/style.js +23 -0
  239. package/dist/Editor/themeSettings/colorTheme/index.js +310 -0
  240. package/dist/Editor/themeSettings/colorTheme/style.js +81 -0
  241. package/dist/Editor/themeSettings/fonts/PreviewElement.js +121 -0
  242. package/dist/Editor/themeSettings/fonts/index.js +240 -0
  243. package/dist/Editor/themeSettings/fonts/style.js +61 -0
  244. package/dist/Editor/themeSettings/icons.js +60 -0
  245. package/dist/Editor/themeSettings/index.js +351 -0
  246. package/dist/Editor/themeSettings/style.js +220 -0
  247. package/dist/Editor/themeSettingsAI/icons.js +96 -0
  248. package/dist/Editor/themeSettingsAI/index.js +355 -0
  249. package/dist/Editor/themeSettingsAI/saveTheme.js +205 -0
  250. package/dist/Editor/themeSettingsAI/style.js +259 -0
  251. package/dist/Editor/utils/SlateUtilityFunctions.js +186 -54
  252. package/dist/Editor/utils/brains.js +1 -2
  253. package/dist/Editor/utils/draftToSlate.js +3 -2
  254. package/dist/Editor/utils/font.js +40 -37
  255. package/dist/Editor/utils/freegrid.js +3 -3
  256. package/dist/Editor/utils/helper.js +92 -21
  257. package/package.json +4 -4
@@ -111,6 +111,7 @@ const usePopupStyle = theme => ({
111
111
  width: "323px",
112
112
  maxWidth: "100%",
113
113
  overflowX: "hidden !important",
114
+ marginTop: "6px",
114
115
  // 30% of window height
115
116
  maxHeight: `${window.innerHeight * 0.45}px`,
116
117
  overflow: "auto",
@@ -130,7 +131,7 @@ const usePopupStyle = theme => ({
130
131
  },
131
132
  "& .accordionIcon": {
132
133
  "& p": {
133
- textAlign: 'left'
134
+ textAlign: "left"
134
135
  }
135
136
  }
136
137
  },
@@ -304,6 +305,21 @@ const usePopupStyle = theme => ({
304
305
  paddingRight: "0px !important"
305
306
  }
306
307
  },
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
+ },
307
323
  textFormatLabel: {
308
324
  display: "flex",
309
325
  alignItems: "center",
@@ -335,9 +351,10 @@ const usePopupStyle = theme => ({
335
351
  borderBottom: `1px solid ${theme?.palette?.editor?.deviderBgColor} !important`
336
352
  },
337
353
  textFormatField: {
338
- marginBottom: "8px",
339
- marginTop: "8px"
354
+ marginBottom: "8px"
355
+ // marginTop: "8px",
340
356
  },
357
+
341
358
  textFormatField1: {
342
359
  marginBottom: "16px",
343
360
  marginTop: "10px"
@@ -416,6 +433,11 @@ const usePopupStyle = theme => ({
416
433
  "& .MuiOutlinedInput-notchedOutline": {
417
434
  border: `1px solid ${theme?.palette?.editor?.inputFieldBorder} !important`
418
435
  },
436
+ "& .MuiInputBase-root": {
437
+ "& input": {
438
+ border: "none !important"
439
+ }
440
+ },
419
441
  "& svg": {
420
442
  width: "20px",
421
443
  height: "24px"
@@ -424,9 +446,6 @@ const usePopupStyle = theme => ({
424
446
  fontFamilyListOptions: {
425
447
  "& .MuiAutocomplete-listbox": {
426
448
  padding: "0px",
427
- // "&::-webkit-scrollbar-thumb": {
428
- // background: `none !important`,
429
- // },
430
449
  "&::-webkit-scrollbar-thumb": {
431
450
  background: `${theme?.palette?.editor?.brainPopupScroll} !important`
432
451
  },
@@ -437,8 +456,8 @@ const usePopupStyle = theme => ({
437
456
  margin: "5px",
438
457
  borderRadius: "8px",
439
458
  color: theme?.palette?.editor?.menuOptionTextColor,
440
- fontSize: '14px',
441
- padding: '8px 12px',
459
+ fontSize: "14px",
460
+ padding: "8px 12px",
442
461
  '&[aria-selected="true"]': {
443
462
  backgroundColor: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`
444
463
  }
@@ -537,7 +556,7 @@ const usePopupStyle = theme => ({
537
556
  }
538
557
  },
539
558
  alignItems: "flexStart",
540
- justifyContent: "center",
559
+ // justifyContent: "center",
541
560
  flexDirection: "row",
542
561
  "&:hover": {
543
562
  background: "unset"
@@ -786,8 +805,13 @@ const usePopupStyle = theme => ({
786
805
  padding: "0px"
787
806
  },
788
807
  defaultBtn: {
789
- color: "#0F172A",
790
- textTransform: "none"
808
+ color: "#2563EB !important",
809
+ textTransform: "none",
810
+ textDecoration: "underline",
811
+ "&.Mui-disabled": {
812
+ color: "#A0AEC0 !important",
813
+ textDecoration: "none"
814
+ }
791
815
  },
792
816
  templateCardBtnGrp: {
793
817
  display: "none",
@@ -1138,6 +1162,42 @@ const usePopupStyle = theme => ({
1138
1162
  "& fieldset": {
1139
1163
  border: "none !important"
1140
1164
  }
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"
1141
1201
  }
1142
1202
  });
1143
1203
  export default usePopupStyle;
@@ -6,7 +6,8 @@ const PreviewAndSelect = props => {
6
6
  const {
7
7
  classes,
8
8
  data,
9
- onSelectTemplate
9
+ onSelectTemplate,
10
+ translation
10
11
  } = props;
11
12
  return /*#__PURE__*/_jsxs(Box, {
12
13
  className: "template-card-action",
@@ -15,12 +16,12 @@ const PreviewAndSelect = props => {
15
16
  children: [/*#__PURE__*/_jsx(Button, {
16
17
  className: "blueBtn",
17
18
  onClick: onSelectTemplate(data),
18
- children: "Select"
19
+ children: translation("Select")
19
20
  }), /*#__PURE__*/_jsx(Button, {
20
21
  href: data?.previewLink,
21
22
  target: "_blank",
22
23
  className: "outlineBtn",
23
- children: "Preview"
24
+ children: translation("Preview")
24
25
  })]
25
26
  });
26
27
  };
@@ -29,8 +30,12 @@ const TemplateCard = props => {
29
30
  classes,
30
31
  m,
31
32
  onSelectTemplate,
32
- fullScreen
33
+ fullScreen,
34
+ customProps
33
35
  } = props;
36
+ const {
37
+ translation
38
+ } = customProps;
34
39
  return /*#__PURE__*/_jsx(Grid, {
35
40
  item: true,
36
41
  xs: 4,
@@ -53,7 +58,8 @@ const TemplateCard = props => {
53
58
  }), /*#__PURE__*/_jsx(PreviewAndSelect, {
54
59
  classes: classes,
55
60
  onSelectTemplate: onSelectTemplate,
56
- data: m
61
+ data: m,
62
+ translation: translation
57
63
  })]
58
64
  }), /*#__PURE__*/_jsx(CardContent, {
59
65
  sx: classes.templateCardTitle,
@@ -10,11 +10,13 @@ import { AllColors } from "../../Elements/Color Picker/ColorButtons";
10
10
  import { fontFamilyMap } from "../../utils/font";
11
11
  import { getBorderColor } from "../../utils/helper";
12
12
  import SelectTypography from "./MiniTextFormat/SelectTypography";
13
+ import { isTextCustomized, saveToTheme } from "../../helper/theme";
14
+ import { useEditorTheme } from "../../hooks/useEditorTheme";
13
15
  import SelectSuperSubscript from "./MiniTextFormat/SelectSuperSubscript";
14
16
  import { ColorResetIcon, TextDefaultStyleIcon } from "../../common/iconListV2";
15
17
  import FontFamilyAutocomplete from "../FormatTools/FontFamilyAutocomplete";
16
18
  import { useEditorContext } from "../../hooks/useMouseMove";
17
- // import LineSpacing from "../../common/StyleBuilder/fieldTypes/lineSpacing";
19
+ import LineSpacing from "../../common/StyleBuilder/fieldTypes/lineSpacing";
18
20
  import { getPageSettings } from "../../utils/pageSettings";
19
21
  import { jsx as _jsx } from "react/jsx-runtime";
20
22
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -33,18 +35,21 @@ const TextFormat = props => {
33
35
  const [anchorEl, setAnchorEl] = useState(null);
34
36
  const [type, setType] = useState(null);
35
37
  const open = Boolean(anchorEl);
38
+ const {
39
+ translation
40
+ } = customProps;
36
41
  const {
37
42
  element: pageSt
38
43
  } = getPageSettings(editor) || {};
39
- // const pageSettingLine = pageSt?.pageProps?.lineHeight;
44
+ const pageSettingLine = pageSt?.pageProps?.lineHeight;
40
45
  const {
41
46
  fontFamilies,
42
- theme
47
+ theme: appTheme
43
48
  } = useEditorContext();
44
49
  const {
45
50
  activeBreakPoint
46
51
  } = useEditorContext();
47
- // const breakpoint = activeBreakPoint === "" ? "lg" : activeBreakPoint;
52
+ const breakpoint = activeBreakPoint === "" ? "lg" : activeBreakPoint;
48
53
  const fontWeight = allTools.find(f => f.format === "fontWeight");
49
54
  const fontStyle = allTools.filter(f => f.type === "mark" && f.format !== "strikethrough" && f.format !== "superscript" && f.format !== "subscript");
50
55
  const fontAlign = allTools.filter(f => f.format?.indexOf("align") >= 0);
@@ -61,12 +66,13 @@ const TextFormat = props => {
61
66
  color: "",
62
67
  bgColor: ""
63
68
  };
64
-
65
- // let lineSpacingValue = activeMark(editor, "lineHeight");
66
- // lineSpacingValue =
67
- // lineSpacingValue?.[breakpoint] !== undefined
68
- // ? lineSpacingValue
69
- // : pageSettingLine;
69
+ const {
70
+ theme,
71
+ updateTheme
72
+ } = useEditorTheme();
73
+ const customized = isTextCustomized(editor);
74
+ let lineSpacingValue = activeMark(editor, "lineHeight");
75
+ lineSpacingValue = lineSpacingValue?.[breakpoint] !== undefined ? lineSpacingValue : pageSettingLine;
70
76
  const handleColorPicker = type => e => {
71
77
  setType(type);
72
78
  setAnchorEl(e.currentTarget);
@@ -107,11 +113,13 @@ const TextFormat = props => {
107
113
  value
108
114
  });
109
115
  };
110
-
111
- // const handleLineSpacing = (data) => {
112
- // const [[format, value]] = Object.entries(data);
113
- // addMarkData(editor, { format, value });
114
- // };
116
+ const handleLineSpacing = data => {
117
+ const [[format, value]] = Object.entries(data);
118
+ addMarkData(editor, {
119
+ format,
120
+ value
121
+ });
122
+ };
115
123
  return /*#__PURE__*/_jsxs(Grid, {
116
124
  container: true,
117
125
  sx: classes.textFormatWrapper,
@@ -129,7 +137,52 @@ const TextFormat = props => {
129
137
  variant: "body1",
130
138
  color: "primary",
131
139
  sx: classes.typoLabel,
132
- children: "Font Family"
140
+ children: "Style"
141
+ })
142
+ }), /*#__PURE__*/_jsx(Grid, {
143
+ item: true,
144
+ children: theme?.id ? /*#__PURE__*/_jsx(Button, {
145
+ sx: classes.defaultBtn,
146
+ onClick: () => {
147
+ const {
148
+ field,
149
+ theme
150
+ } = saveToTheme(editor) || {};
151
+ updateTheme(theme, {
152
+ action: "ELEMENT_PROPS_CHANGE",
153
+ fieldName: field
154
+ });
155
+ },
156
+ disabled: !customized,
157
+ children: "Save to theme"
158
+ }) : null
159
+ })]
160
+ }), /*#__PURE__*/_jsx(Grid, {
161
+ item: true,
162
+ xs: 12,
163
+ sx: classes.textFormatField,
164
+ children: /*#__PURE__*/_jsx(SelectTypography, {
165
+ editor: editor,
166
+ classes: classes,
167
+ closeMainPopup: closeMainPopup,
168
+ type: "fullWidth",
169
+ customProps: customProps
170
+ })
171
+ })]
172
+ }), /*#__PURE__*/_jsxs(Grid, {
173
+ item: true,
174
+ xs: 12,
175
+ children: [/*#__PURE__*/_jsxs(Grid, {
176
+ container: true,
177
+ justifyContent: "space-between",
178
+ alignItems: "center",
179
+ children: [/*#__PURE__*/_jsx(Grid, {
180
+ item: true,
181
+ children: /*#__PURE__*/_jsx(Typography, {
182
+ variant: "body1",
183
+ color: "primary",
184
+ sx: classes.typoLabel,
185
+ children: translation("fontFamily")
133
186
  })
134
187
  }), /*#__PURE__*/_jsx(Grid, {
135
188
  item: true,
@@ -141,7 +194,7 @@ const TextFormat = props => {
141
194
  val: Object.values(fontFamilyMap)[0]
142
195
  }),
143
196
  className: "npr-0",
144
- children: "Default Text"
197
+ children: translation("defaultText")
145
198
  })
146
199
  })]
147
200
  }), /*#__PURE__*/_jsx(Grid, {
@@ -166,7 +219,7 @@ const TextFormat = props => {
166
219
  variant: "body1",
167
220
  color: "primary",
168
221
  sx: classes.typoLabel3,
169
- children: "Font Weight"
222
+ children: translation("fontWeight")
170
223
  }), /*#__PURE__*/_jsx(Grid, {
171
224
  item: true,
172
225
  xs: 12,
@@ -187,7 +240,7 @@ const TextFormat = props => {
187
240
  variant: "body1",
188
241
  color: "primary",
189
242
  sx: classes.typoLabel3,
190
- children: "Font Size"
243
+ children: translation("fontSize")
191
244
  }), /*#__PURE__*/_jsx(Grid, {
192
245
  item: true,
193
246
  xs: 12,
@@ -220,7 +273,7 @@ const TextFormat = props => {
220
273
  variant: "body1",
221
274
  color: "primary",
222
275
  sx: classes.typoLabel,
223
- children: "Text Color"
276
+ children: translation("textColor")
224
277
  })
225
278
  }), /*#__PURE__*/_jsx(Grid, {
226
279
  item: true,
@@ -230,7 +283,7 @@ const TextFormat = props => {
230
283
  onClick: handleDefault({
231
284
  format: "color"
232
285
  }),
233
- children: "Default Color"
286
+ children: translation("defaultColor")
234
287
  })
235
288
  })]
236
289
  }), /*#__PURE__*/_jsx(Grid, {
@@ -241,9 +294,10 @@ const TextFormat = props => {
241
294
  editor: editor,
242
295
  showHex: false,
243
296
  rounded: true,
244
- title: "Text Color",
297
+ title: translation("textColor"),
245
298
  id: "11_cc",
246
- classes: classes
299
+ classes: classes,
300
+ type: "textColor"
247
301
  }, "11_cc")
248
302
  })]
249
303
  }), /*#__PURE__*/_jsxs(Grid, {
@@ -260,7 +314,7 @@ const TextFormat = props => {
260
314
  variant: "body1",
261
315
  color: "primary",
262
316
  sx: classes.typoLabel,
263
- children: "Background Color"
317
+ children: translation("backgroundColor")
264
318
  })
265
319
  }), /*#__PURE__*/_jsx(Grid, {
266
320
  item: true,
@@ -269,12 +323,12 @@ const TextFormat = props => {
269
323
  children: /*#__PURE__*/_jsx(Button, {
270
324
  sx: classes.defaultBtn2,
271
325
  startIcon: /*#__PURE__*/_jsx(ColorResetIcon, {
272
- stroke: theme?.palette?.type === "dark" ? "#505359" : "#A2B0B9"
326
+ stroke: appTheme?.palette?.type === "dark" ? "#505359" : "#A2B0B9"
273
327
  }),
274
328
  onClick: handleDefault({
275
329
  format: "bgColor"
276
330
  }),
277
- children: "Default Color"
331
+ children: translation("defaultColor")
278
332
  })
279
333
  })
280
334
  })]
@@ -288,7 +342,7 @@ const TextFormat = props => {
288
342
  editor: editor,
289
343
  showHex: false,
290
344
  rounded: true,
291
- title: "Text Background Color",
345
+ title: translation("textBgColor"),
292
346
  classes: classes,
293
347
  id: "12_cc"
294
348
  }, "12_cc")
@@ -306,7 +360,7 @@ const TextFormat = props => {
306
360
  variant: "body1",
307
361
  color: "primary",
308
362
  sx: classes.typoLabel2,
309
- children: "Alignment"
363
+ children: translation("Alignment")
310
364
  }), /*#__PURE__*/_jsx(Grid, {
311
365
  item: true,
312
366
  xs: 12,
@@ -314,7 +368,8 @@ const TextFormat = props => {
314
368
  children: fontAlign?.map((m, i) => {
315
369
  return /*#__PURE__*/_jsx(BlockButton, {
316
370
  editor: editor,
317
- ...m
371
+ ...m,
372
+ customProps: customProps
318
373
  }, `pptool_block_${i}_${m.id}`);
319
374
  })
320
375
  })]
@@ -326,7 +381,7 @@ const TextFormat = props => {
326
381
  variant: "body1",
327
382
  color: "primary",
328
383
  sx: classes.typoLabel2,
329
- children: "Lists"
384
+ children: translation("Lists")
330
385
  }), /*#__PURE__*/_jsx(Grid, {
331
386
  item: true,
332
387
  xs: 12,
@@ -335,7 +390,8 @@ const TextFormat = props => {
335
390
  const Comp = ButtonComp[m?.component] || BlockButton;
336
391
  return /*#__PURE__*/_jsx(Comp, {
337
392
  editor: editor,
338
- ...m
393
+ ...m,
394
+ customProps: customProps
339
395
  }, `pptool_block_${i}_${m.id}`);
340
396
  })
341
397
  })]
@@ -351,20 +407,17 @@ const TextFormat = props => {
351
407
  variant: "body1",
352
408
  color: "primary",
353
409
  sx: classes.typoLabel,
354
- children: "Typography"
410
+ children: translation("Typography")
355
411
  }), /*#__PURE__*/_jsxs(Grid, {
356
412
  item: true,
357
413
  xs: 12,
358
414
  className: "typo-icons",
359
415
  sx: classes.evenSpace,
360
- children: [/*#__PURE__*/_jsx(SelectTypography, {
361
- classes: classes,
362
- editor: editor,
363
- closeMainPopup: closeMainPopup || onClose
364
- }), fontStyle?.map((m, i) => {
416
+ children: [fontStyle?.map((m, i) => {
365
417
  return /*#__PURE__*/_jsx(MarkButton, {
366
418
  editor: editor,
367
- ...m
419
+ ...m,
420
+ customProps: customProps
368
421
  }, `pptool_mark_${i}_${m.id}`);
369
422
  }), /*#__PURE__*/_jsx(LinkButton, {
370
423
  active: isBlockActive(editor, link.format),
@@ -373,7 +426,8 @@ const TextFormat = props => {
373
426
  }, link.id), /*#__PURE__*/_jsx(SelectSuperSubscript, {
374
427
  classes: classes,
375
428
  editor: editor,
376
- closeMainPopup: closeMainPopup || onClose
429
+ closeMainPopup: closeMainPopup || onClose,
430
+ customProps: customProps
377
431
  })]
378
432
  })]
379
433
  }), /*#__PURE__*/_jsx(Grid, {
@@ -381,6 +435,32 @@ const TextFormat = props => {
381
435
  xs: 12,
382
436
  sx: classes.dividerGrid,
383
437
  children: /*#__PURE__*/_jsx(Divider, {})
438
+ }), /*#__PURE__*/_jsxs(Grid, {
439
+ item: true,
440
+ xs: 12,
441
+ children: [/*#__PURE__*/_jsx(Typography, {
442
+ variant: "body1",
443
+ color: "primary",
444
+ sx: classes.typoLabel,
445
+ children: "Line Spacing"
446
+ }), /*#__PURE__*/_jsx(Grid, {
447
+ item: true,
448
+ xs: 12,
449
+ className: "typo-icons",
450
+ sx: classes.evenSpace,
451
+ children: /*#__PURE__*/_jsx(LineSpacing, {
452
+ value: lineSpacingValue,
453
+ onChange: handleLineSpacing,
454
+ data: {
455
+ key: "lineHeight"
456
+ }
457
+ })
458
+ })]
459
+ }), /*#__PURE__*/_jsx(Grid, {
460
+ item: true,
461
+ xs: 12,
462
+ sx: classes.dividerGrid,
463
+ children: /*#__PURE__*/_jsx(Divider, {})
384
464
  }), /*#__PURE__*/_jsx(Grid, {
385
465
  item: true,
386
466
  xs: 12,
@@ -392,7 +472,7 @@ const TextFormat = props => {
392
472
  variant: "body1",
393
473
  color: "primary",
394
474
  sx: classes.typoLabel3,
395
- children: "Decorations"
475
+ children: translation("Decorations")
396
476
  })
397
477
  }), /*#__PURE__*/_jsxs(Grid, {
398
478
  item: true,
@@ -412,7 +492,7 @@ const TextFormat = props => {
412
492
  style: {
413
493
  background: bqBgColor
414
494
  },
415
- children: "Colorbox"
495
+ children: translation("Colorbox")
416
496
  }), /*#__PURE__*/_jsx("div", {
417
497
  className: "vl"
418
498
  }), /*#__PURE__*/_jsx(Button, {
@@ -433,7 +513,7 @@ const TextFormat = props => {
433
513
  ...getBorderColor(bqColor || "transparent", 3),
434
514
  borderWidth: bqColor ? "0px 0px 0px 3px" : "0px"
435
515
  },
436
- children: "Quote"
516
+ children: translation("Quote")
437
517
  })
438
518
  }), /*#__PURE__*/_jsx("div", {
439
519
  className: "vl"