@flozy/editor 9.5.4 → 9.5.5

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 (254) hide show
  1. package/dist/Editor/ChatEditor.js +29 -20
  2. package/dist/Editor/CommonEditor.js +19 -130
  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 +2 -4
  8. package/dist/Editor/Elements/Accordion/Accordion.js +3 -4
  9. package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +1 -4
  10. package/dist/Editor/Elements/Accordion/AccordionButton.js +2 -6
  11. package/dist/Editor/Elements/Accordion/AccordionTitlePopup.js +1 -4
  12. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  13. package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +2 -6
  14. package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +1 -4
  15. package/dist/Editor/Elements/Attachments/AttachmentsButton.js +1 -4
  16. package/dist/Editor/Elements/Button/ButtonPopup.js +1 -4
  17. package/dist/Editor/Elements/Button/ButtonToolIcon.js +2 -6
  18. package/dist/Editor/Elements/Button/EditorButton.js +14 -31
  19. package/dist/Editor/Elements/Carousel/Carousel.js +4 -5
  20. package/dist/Editor/Elements/Carousel/CarouselButton.js +2 -6
  21. package/dist/Editor/Elements/Carousel/CarouselItem.js +2 -3
  22. package/dist/Editor/Elements/ChipText/ChipTextPopup.js +1 -4
  23. package/dist/Editor/Elements/CodeToText/CodeToText.js +4 -5
  24. package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +2 -6
  25. package/dist/Editor/Elements/Color Picker/ColorButtons.js +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 +3 -3
  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 -7
  33. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +3 -4
  34. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +5 -25
  35. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +2 -7
  36. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +12 -13
  37. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +4 -7
  38. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +5 -7
  39. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +7 -9
  40. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +3 -8
  41. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +3 -5
  42. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +5 -6
  43. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +3 -5
  44. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +7 -9
  45. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +38 -64
  46. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +2 -3
  47. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +2 -3
  48. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +6 -23
  49. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +1 -4
  50. package/dist/Editor/Elements/DataView/Layouts/TableView.js +4 -6
  51. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +4 -8
  52. package/dist/Editor/Elements/DataView/Layouts/index.js +1 -3
  53. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +2 -5
  54. package/dist/Editor/Elements/DataView/styles.js +0 -13
  55. package/dist/Editor/Elements/Divider/Divider.js +3 -5
  56. package/dist/Editor/Elements/Divider/DividerButton.js +2 -6
  57. package/dist/Editor/Elements/Divider/DividerPopup.js +2 -3
  58. package/dist/Editor/Elements/Embed/Embed.js +1 -4
  59. package/dist/Editor/Elements/Embed/EmbedPopup.js +1 -4
  60. package/dist/Editor/Elements/Embed/Image.js +11 -16
  61. package/dist/Editor/Elements/Embed/Video.js +6 -9
  62. package/dist/Editor/Elements/EmbedScript/Code.js +4 -7
  63. package/dist/Editor/Elements/EmbedScript/EmbedScript.js +2 -6
  64. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +5 -8
  65. package/dist/Editor/Elements/Emoji/EmojiButton.js +2 -6
  66. package/dist/Editor/Elements/Form/FieldPopup.js +1 -4
  67. package/dist/Editor/Elements/Form/Form.js +9 -12
  68. package/dist/Editor/Elements/Form/FormButton.js +2 -6
  69. package/dist/Editor/Elements/Form/FormPopup.js +2 -3
  70. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +12 -18
  71. package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +8 -13
  72. package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +2 -3
  73. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +2 -4
  74. package/dist/Editor/Elements/Form/Workflow/index.js +9 -15
  75. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +23 -67
  76. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +3 -21
  77. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +2 -6
  78. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +4 -34
  79. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +2 -3
  80. package/dist/Editor/Elements/FreeGrid/Options/More.js +4 -10
  81. package/dist/Editor/Elements/FreeGrid/styles.js +0 -3
  82. package/dist/Editor/Elements/Grid/Grid.js +10 -13
  83. package/dist/Editor/Elements/Grid/GridButton.js +5 -9
  84. package/dist/Editor/Elements/Grid/GridItem.js +8 -14
  85. package/dist/Editor/Elements/Grid/GridItemPopup.js +1 -4
  86. package/dist/Editor/Elements/Grid/GridPopup.js +1 -4
  87. package/dist/Editor/Elements/Grid/SectionPopup.js +1 -4
  88. package/dist/Editor/Elements/Link/Link.js +5 -8
  89. package/dist/Editor/Elements/Link/LinkButton.js +1 -4
  90. package/dist/Editor/Elements/List/CheckList.js +9 -14
  91. package/dist/Editor/Elements/NewLine/NewLineButton.js +2 -6
  92. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +1 -4
  93. package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +1 -4
  94. package/dist/Editor/Elements/Search/SearchButton.js +3 -6
  95. package/dist/Editor/Elements/Search/SearchList.js +3 -7
  96. package/dist/Editor/Elements/Signature/SignatureButton.js +2 -6
  97. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -6
  98. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +1 -4
  99. package/dist/Editor/Elements/Signature/SignaturePopup.js +16 -17
  100. package/dist/Editor/Elements/SimpleText/index.js +4 -5
  101. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  102. package/dist/Editor/Elements/Table/DragButton.js +2 -4
  103. package/dist/Editor/Elements/Table/Table.js +11 -23
  104. package/dist/Editor/Elements/Table/TableCell.js +2 -6
  105. package/dist/Editor/Elements/Table/TablePopup.js +1 -4
  106. package/dist/Editor/Elements/Table/TableSelector.js +6 -10
  107. package/dist/Editor/Elements/Table/TableTool.js +4 -8
  108. package/dist/Editor/Elements/Title/title.js +0 -10
  109. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +1 -4
  110. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  111. package/dist/Editor/MiniEditor.js +3 -10
  112. package/dist/Editor/Styles/EditorStyles.js +5 -5
  113. package/dist/Editor/Toolbar/Basic/index.js +1 -2
  114. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +2 -6
  115. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  116. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  117. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +4 -8
  118. package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
  119. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +3 -5
  120. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +5 -10
  121. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +4 -10
  122. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +4 -10
  123. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +3 -9
  124. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +35 -42
  125. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
  126. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +51 -58
  127. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +22 -29
  128. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +87 -226
  129. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +10 -20
  130. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +4 -8
  131. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +9 -16
  132. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +5 -11
  133. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +42 -122
  134. package/dist/Editor/Toolbar/PopupTool/index.js +1 -17
  135. package/dist/Editor/Toolbar/Toolbar.js +10 -20
  136. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  137. package/dist/Editor/common/ColorPickerButton.js +14 -39
  138. package/dist/Editor/common/CustomDialog/index.js +10 -8
  139. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  140. package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
  141. package/dist/Editor/common/Icon.js +1 -46
  142. package/dist/Editor/common/ImageSelector/ImageSelector.js +8 -10
  143. package/dist/Editor/common/ImageSelector/Options/AddLink.js +4 -6
  144. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  145. package/dist/Editor/common/LinkSettings/NavComponents.js +10 -14
  146. package/dist/Editor/common/LinkSettings/index.js +14 -20
  147. package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
  148. package/dist/Editor/common/MentionsPopup/index.js +2 -6
  149. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -22
  150. package/dist/Editor/common/RnD/ContextMenu/index.js +2 -3
  151. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -7
  152. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +3 -8
  153. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +3 -7
  154. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  155. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  156. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  157. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  158. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +4 -7
  159. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  160. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  161. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +2 -6
  162. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  163. package/dist/Editor/common/RnD/OptionsPopup/index.js +3 -4
  164. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +4 -11
  165. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  166. package/dist/Editor/common/RnD/Utils/gridDropItem.js +7 -56
  167. package/dist/Editor/common/RnD/Utils/index.js +0 -3
  168. package/dist/Editor/common/RnD/VirtualElement/index.js +103 -187
  169. package/dist/Editor/common/RnD/VirtualElement/styles.js +7 -123
  170. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +3 -5
  171. package/dist/Editor/common/RnD/index.js +7 -59
  172. package/dist/Editor/common/Section/index.js +4 -7
  173. package/dist/Editor/common/Shorthands/elements.js +3 -74
  174. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
  175. package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
  176. package/dist/Editor/common/StyleBuilder/buttonStyle.js +4 -6
  177. package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
  178. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
  179. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
  180. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +9 -13
  181. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -11
  182. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +5 -19
  183. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +10 -22
  184. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +3 -6
  185. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +13 -27
  186. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +14 -43
  187. package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +6 -10
  188. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +6 -19
  189. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +2 -6
  190. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +2 -5
  191. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -9
  192. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +2 -8
  193. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +11 -12
  194. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +2 -6
  195. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -8
  196. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +2 -6
  197. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +12 -21
  198. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  199. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  200. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  201. package/dist/Editor/common/StyleBuilder/index.js +5 -8
  202. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  203. package/dist/Editor/common/Uploader.js +5 -16
  204. package/dist/Editor/commonStyle.js +57 -68
  205. package/dist/Editor/helper/index.js +2 -2
  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 +7 -10
  210. package/dist/Editor/plugins/withLayout.js +2 -3
  211. package/dist/Editor/plugins/withTable.js +1 -1
  212. package/dist/Editor/theme/ThemeList.js +173 -50
  213. package/dist/Editor/utils/SlateUtilityFunctions.js +47 -164
  214. package/dist/Editor/utils/draftToSlate.js +2 -3
  215. package/dist/Editor/utils/embed.js +6 -8
  216. package/dist/Editor/utils/font.js +37 -40
  217. package/dist/Editor/utils/freegrid.js +2 -2
  218. package/dist/Editor/utils/helper.js +19 -90
  219. package/dist/Editor/utils/table.js +6 -9
  220. package/package.json +2 -2
  221. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -425
  222. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -441
  223. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  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 -33
  230. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  231. package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +0 -117
  232. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +0 -134
  233. package/dist/Editor/common/RnD/VirtualElement/helper.js +0 -281
  234. package/dist/Editor/common/SnackBar/index.js +0 -43
  235. package/dist/Editor/helper/textIndeces.js +0 -58
  236. package/dist/Editor/hooks/useAutoScroll.js +0 -38
  237. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  238. package/dist/Editor/hooks/useThemeValues.js +0 -63
  239. package/dist/Editor/theme/index.js +0 -147
  240. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  241. package/dist/Editor/themeSettings/buttons/index.js +0 -285
  242. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  243. package/dist/Editor/themeSettings/colorTheme/index.js +0 -305
  244. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  245. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  246. package/dist/Editor/themeSettings/fonts/index.js +0 -222
  247. package/dist/Editor/themeSettings/fonts/style.js +0 -60
  248. package/dist/Editor/themeSettings/icons.js +0 -60
  249. package/dist/Editor/themeSettings/index.js +0 -331
  250. package/dist/Editor/themeSettings/style.js +0 -211
  251. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  252. package/dist/Editor/themeSettingsAI/index.js +0 -355
  253. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -205
  254. package/dist/Editor/themeSettingsAI/style.js +0 -259
@@ -1,222 +0,0 @@
1
- import React from "react";
2
- import { Accordion, AccordionDetails, AccordionSummary, Checkbox, Divider, Fade, FormControlLabel, Grid, Paper, Popper, Typography, styled } from "@mui/material";
3
- import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
4
-
5
- // Style
6
- import Style from "./style";
7
- import ThemeTextFormat from "../../Toolbar/PopupTool/ThemeTextFormat";
8
- import { useEditorContext } from "../../hooks/useMouseMove";
9
- import usePopupStyle from "../../Toolbar/PopupTool/PopupToolStyle";
10
- import useWindowResize from "../../hooks/useWindowResize";
11
- import PopperHeader from "../../Toolbar/PopupTool/PopperHeader";
12
- import { useEditorTheme } from "../../hooks/useEditorTheme";
13
- import { HEADING_THEME_FIELDS, PARAGRAPH_THEME_FIELDS } from "../../helper/theme";
14
- import PreviewElement from "./PreviewElement";
15
- import FontFamilyAutocomplete from "../../Toolbar/FormatTools/FontFamilyAutocomplete";
16
- import { googleFontList as defaultFonts } from "../../common/FontLoader/FontList";
17
- import { jsx as _jsx } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
19
- const Fonts = props => {
20
- const {
21
- className,
22
- customProps
23
- } = props;
24
- const [anchorEl, setAnchorEl] = React.useState();
25
- const [selectedField, setSelectedField] = React.useState("");
26
- const [settings, setSettings] = React.useState({});
27
- const updateSettings = update => {
28
- setSettings(prev => {
29
- return {
30
- ...prev,
31
- ...update
32
- };
33
- });
34
- };
35
- const onClose = () => {
36
- setAnchorEl(null);
37
- setSelectedField("");
38
- setSettings({});
39
- };
40
- const {
41
- theme,
42
- fontFamilies
43
- } = useEditorContext();
44
- const classes = usePopupStyle(theme);
45
- const [size] = useWindowResize();
46
- const {
47
- selectedTheme,
48
- updateTheme
49
- } = useEditorTheme();
50
- const {
51
- otherProps = {}
52
- } = selectedTheme || {};
53
- const {
54
- isHeadingCustomized,
55
- headingFontFamily,
56
- isParagraphCustomized,
57
- paragraphFontFamily
58
- } = otherProps;
59
- const onSaveTextSettings = () => {
60
- updateTheme(settings, {
61
- action: "ELEMENT_PROPS_CHANGE",
62
- fieldName: selectedField
63
- });
64
- onClose();
65
- };
66
- const updateOtherThemeProps = update => {
67
- updateTheme(update, {
68
- action: "OTHER_PROPS_CHANGE"
69
- });
70
- };
71
- const updateFont = (update, fieldType) => {
72
- updateTheme(update, {
73
- action: "FONT_CHANGE",
74
- fieldType
75
- });
76
- };
77
- const tabs = [{
78
- title: "Heading Font family",
79
- onFontFamilyChange: ({
80
- fontFamily
81
- }) => {
82
- updateFont({
83
- fontFamily
84
- }, "HEADING");
85
- updateSettings({
86
- fontFamily
87
- });
88
- },
89
- fontFamily: headingFontFamily || defaultFonts[0],
90
- isCustomized: isHeadingCustomized,
91
- onCustomizeClick: event => {
92
- updateOtherThemeProps({
93
- isHeadingCustomized: event.target.checked
94
- });
95
- },
96
- fields: HEADING_THEME_FIELDS
97
- }, {
98
- title: "Paragraph Font family",
99
- onFontFamilyChange: ({
100
- fontFamily
101
- }) => {
102
- updateFont({
103
- fontFamily
104
- }, "PARAGRAPH");
105
- updateSettings({
106
- fontFamily
107
- });
108
- },
109
- fontFamily: paragraphFontFamily || defaultFonts[0],
110
- isCustomized: isParagraphCustomized,
111
- onCustomizeClick: event => {
112
- updateOtherThemeProps({
113
- isParagraphCustomized: event.target.checked
114
- });
115
- },
116
- fields: PARAGRAPH_THEME_FIELDS
117
- }];
118
- return /*#__PURE__*/_jsxs(Grid, {
119
- className: className,
120
- children: [/*#__PURE__*/_jsxs(Accordion, {
121
- className: "settingAccordion",
122
- children: [/*#__PURE__*/_jsx(AccordionSummary, {
123
- expandIcon: /*#__PURE__*/_jsx(ExpandMoreIcon, {}),
124
- "aria-controls": "panel1-content",
125
- id: "panel1-header",
126
- children: "Fonts"
127
- }), /*#__PURE__*/_jsx(AccordionDetails, {
128
- children: tabs?.map((tab, i) => {
129
- const {
130
- title,
131
- onFontFamilyChange,
132
- fontFamily,
133
- isCustomized = "",
134
- onCustomizeClick,
135
- fields
136
- } = tab;
137
- return /*#__PURE__*/_jsxs(React.Fragment, {
138
- children: [/*#__PURE__*/_jsxs(Grid, {
139
- sx: {
140
- pt: 2
141
- },
142
- children: [/*#__PURE__*/_jsx(Typography, {
143
- variant: "body2",
144
- sx: {
145
- pb: 1
146
- },
147
- className: "fs-14 fw-500",
148
- children: title
149
- }), /*#__PURE__*/_jsx(FontFamilyAutocomplete, {
150
- editor: {},
151
- format: "fontFamily",
152
- options: fontFamilies.options,
153
- width: "100%",
154
- onChange: onFontFamilyChange,
155
- val: fontFamily,
156
- webFont: true
157
- }), /*#__PURE__*/_jsx(FormControlLabel, {
158
- control: /*#__PURE__*/_jsx(Checkbox, {
159
- checked: isCustomized,
160
- onChange: onCustomizeClick,
161
- size: "small"
162
- }),
163
- label: /*#__PURE__*/_jsx(Typography, {
164
- variant: "body2",
165
- className: "fs-12",
166
- children: "Customize Font style"
167
- })
168
- }), isCustomized && /*#__PURE__*/_jsx(Grid, {
169
- ref: anchorEl,
170
- children: fields.map((field, index) => {
171
- return /*#__PURE__*/_jsx(PreviewElement, {
172
- field: field,
173
- settings: settings,
174
- setSettings: setSettings,
175
- setAnchorEl: setAnchorEl,
176
- selectedField: selectedField,
177
- setSelectedField: setSelectedField
178
- }, index);
179
- })
180
- })]
181
- }), i === 0 && /*#__PURE__*/_jsx(Divider, {
182
- sx: {
183
- mt: 1,
184
- mb: 1
185
- }
186
- })]
187
- }, i);
188
- })
189
- })]
190
- }), /*#__PURE__*/_jsx(Popper, {
191
- open: Boolean(anchorEl),
192
- anchorEl: anchorEl,
193
- transition: true,
194
- placement: "left-start",
195
- sx: classes.popupWrapper,
196
- className: `tools-drawer ${size?.device} textSettings`,
197
- children: ({
198
- TransitionProps
199
- }) => /*#__PURE__*/_jsx(Fade, {
200
- ...TransitionProps,
201
- children: /*#__PURE__*/_jsxs(Paper, {
202
- style: {
203
- borderRadius: "10px",
204
- position: "relative"
205
- },
206
- children: [/*#__PURE__*/_jsx(PopperHeader, {
207
- title: "Text Settings",
208
- classes: classes,
209
- onClose: onClose,
210
- customProps: customProps
211
- }), /*#__PURE__*/_jsx(ThemeTextFormat, {
212
- settings: settings,
213
- updateSettings: updateSettings,
214
- onSaveTextSettings: onSaveTextSettings,
215
- onClose: onClose
216
- })]
217
- })
218
- })
219
- })]
220
- });
221
- };
222
- export default styled(Fonts)(Style);
@@ -1,60 +0,0 @@
1
- const Style = ({
2
- appTheme
3
- }) => ({
4
- ".settingAccordion": {
5
- ".MuiOutlinedInput-root": {
6
- borderRadius: "8px",
7
- boxShadow: "0px 4px 16px 0px #0000000D"
8
- }
9
- },
10
- ".fontTypeItem": {
11
- padding: "6px 10px",
12
- width: "calc(100% + 20px)",
13
- margin: "0 -10px",
14
- "&:hover": {
15
- background: appTheme?.palette?.editor?.tv_hover_bg,
16
- ".editIcon": {
17
- opacity: "1",
18
- visibility: "visible"
19
- }
20
- },
21
- ".editIcon": {
22
- opacity: "0",
23
- visibility: "hidden",
24
- width: "30px",
25
- height: "30px"
26
- }
27
- },
28
- ".typeValue": {
29
- fontSize: "12px",
30
- color: "#64748B",
31
- ".dotColor": {
32
- width: "14px",
33
- height: "14px",
34
- borderRadius: "12px",
35
- background: "#0F172A",
36
- marginRight: "3px"
37
- }
38
- },
39
- ".preview-theme-text": {
40
- width: "200px",
41
- whiteSpace: "nowrap",
42
- overflow: "hidden",
43
- textOverflow: "ellipsis",
44
- color: `${appTheme?.palette?.editor?.textColor} !important`
45
- },
46
- ".MuiAutocomplete-input": {
47
- color: appTheme?.palette?.editor?.textColor
48
- },
49
- ".MuiCheckbox-root": {
50
- "& svg": {
51
- fill: appTheme?.palette?.editor?.textColor
52
- }
53
- },
54
- ".MuiCheckbox-root.Mui-checked": {
55
- "& svg": {
56
- fill: "#1976d2"
57
- }
58
- }
59
- });
60
- export default Style;
@@ -1,60 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { jsxs as _jsxs } from "react/jsx-runtime";
3
- export const TickIcon = () => /*#__PURE__*/_jsxs("svg", {
4
- className: "tickIcon",
5
- xmlns: "http://www.w3.org/2000/svg",
6
- width: "26",
7
- height: "26",
8
- viewBox: "0 0 26 26",
9
- fill: "none",
10
- children: [/*#__PURE__*/_jsx("rect", {
11
- x: "0.5",
12
- y: "0.5",
13
- width: "25",
14
- height: "25",
15
- rx: "12.5",
16
- fill: "#2563EB",
17
- stroke: "white"
18
- }), /*#__PURE__*/_jsx("path", {
19
- d: "M7 13.105L11.0011 17.21L19 9",
20
- stroke: "white",
21
- strokeWidth: "1.5",
22
- strokeLinecap: "round",
23
- strokeLinejoin: "round"
24
- })]
25
- });
26
- export const EditIcon = () => /*#__PURE__*/_jsxs("svg", {
27
- className: "editIcon",
28
- xmlns: "http://www.w3.org/2000/svg",
29
- width: "16",
30
- height: "16",
31
- viewBox: "0 0 16 16",
32
- fill: "none",
33
- children: [/*#__PURE__*/_jsx("circle", {
34
- cx: "8",
35
- cy: "8",
36
- r: "8",
37
- fill: "#2563EB",
38
- fillOpacity: "0.14"
39
- }), /*#__PURE__*/_jsx("path", {
40
- d: "M11.3066 4.69573C10.3941 3.77831 9.50211 3.75792 8.5642 4.69573L7.98821 5.26658C7.93723 5.31754 7.92194 5.3889 7.94233 5.45516C8.29914 6.70387 9.29822 7.70284 10.5471 8.05962C10.5623 8.06472 10.5878 8.06472 10.6031 8.06472C10.6541 8.06472 10.7051 8.04433 10.7408 8.00865L11.3066 7.43781C11.7704 6.974 11.9998 6.53058 11.9998 6.07697C11.9998 5.61825 11.7704 5.16464 11.3066 4.69573Z",
41
- fill: "#2563EB"
42
- }), /*#__PURE__*/_jsx("path", {
43
- d: "M9.69545 8.48831C9.55783 8.42206 9.4253 8.3558 9.30296 8.27935C9.20102 8.21819 9.09907 8.15193 9.00223 8.08058C8.92067 8.02961 8.82892 7.95316 8.73717 7.87671C8.72697 7.87161 8.69639 7.84613 8.65561 7.80535C8.4976 7.67793 8.32939 7.50464 8.17137 7.31606C8.16118 7.30587 8.1306 7.27529 8.10511 7.22942C8.05414 7.17336 7.97768 7.07652 7.91141 6.96949C7.85534 6.89813 7.78908 6.7962 7.72791 6.68916C7.65145 6.56175 7.58519 6.43433 7.52402 6.30181C7.45776 6.1591 7.40679 6.02659 7.36091 5.89917L4.61859 8.64122C4.44019 8.8196 4.26688 9.15599 4.2312 9.40573L4.01202 10.9246C3.96614 11.2457 4.0528 11.5464 4.25159 11.7451C4.4198 11.9133 4.64917 12 4.90404 12C4.96011 12 5.01618 11.9949 5.07225 11.9898L6.58613 11.7757C6.83589 11.74 7.17231 11.5718 7.35072 11.3884L10.093 8.64631C9.96561 8.60554 9.83818 8.54948 9.69545 8.48831Z",
44
- fill: "#2563EB"
45
- })]
46
- });
47
- export const PenIcon = () => /*#__PURE__*/_jsxs("svg", {
48
- xmlns: "http://www.w3.org/2000/svg",
49
- width: "14",
50
- height: "14",
51
- viewBox: "0 0 14 14",
52
- fill: "none",
53
- children: [/*#__PURE__*/_jsx("path", {
54
- d: "M12.7874 1.21754C11.1907 -0.387958 9.62966 -0.423636 7.98833 1.21754L6.98034 2.21652C6.89114 2.30571 6.86438 2.43058 6.90006 2.54653C7.52448 4.7318 9.27285 6.48 11.4583 7.10436C11.4851 7.11328 11.5297 7.11328 11.5564 7.11328C11.6456 7.11328 11.7349 7.07761 11.7973 7.01517L12.7874 6.01619C13.5992 5.20452 14.0006 4.42853 14.0006 3.63471C14.0006 2.83196 13.5992 2.03813 12.7874 1.21754Z",
55
- fill: "#2563EB"
56
- }), /*#__PURE__*/_jsx("path", {
57
- d: "M9.96704 7.85451C9.7262 7.73856 9.49427 7.62261 9.28019 7.48882C9.10178 7.38178 8.92338 7.26583 8.75389 7.14096C8.61117 7.05177 8.45061 6.91798 8.29004 6.78419C8.2722 6.77527 8.21868 6.73067 8.14732 6.65932C7.8708 6.43633 7.57643 6.13308 7.2999 5.80306C7.28206 5.78522 7.22854 5.73171 7.18394 5.65143C7.09474 5.55332 6.96094 5.38385 6.84497 5.19655C6.74685 5.07168 6.63089 4.89329 6.52385 4.70598C6.39005 4.483 6.27408 4.26002 6.16704 4.02811C6.05108 3.77837 5.96188 3.54647 5.88159 3.32349L1.08253 8.12209C0.770327 8.43427 0.46704 9.02294 0.404599 9.45999L0.0210312 12.118C-0.0592505 12.6799 0.0923925 13.2061 0.44028 13.554C0.734646 13.8483 1.13605 13.9999 1.58206 13.9999C1.68019 13.9999 1.77831 13.991 1.87643 13.9821L4.52573 13.6075C4.96282 13.545 5.55155 13.2507 5.86375 12.9296L10.6628 8.13101C10.4398 8.05965 10.2168 7.96154 9.96704 7.85451Z",
58
- fill: "#2563EB"
59
- })]
60
- });
@@ -1,331 +0,0 @@
1
- import React, { useEffect, useState } from "react";
2
- import { Box, CircularProgress, Drawer, Grid, IconButton, Tab, Tabs, Typography, styled } from "@mui/material";
3
-
4
- // Style
5
- import Style from "./style";
6
-
7
- // icons
8
- import { CloseIcon } from "../common/iconslist";
9
- import { ChevronLeft } from "@mui/icons-material";
10
- import { TickIcon } from "./icons";
11
- import ColorTheme from "./colorTheme";
12
- import Buttons from "./buttons";
13
- import Fonts from "./fonts";
14
- import { useEditorTheme } from "../hooks/useEditorTheme";
15
- import ActiveTheme from "./ActiveTheme";
16
- import SaveTheme from "../themeSettingsAI/saveTheme";
17
- import { jsx as _jsx } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
19
- import { Fragment as _Fragment } from "react/jsx-runtime";
20
- function getColors(themeColors) {
21
- const colors = Object.values(themeColors || {});
22
- const primaryColors = colors.slice(0, 2);
23
- const otherColors = colors.slice(2);
24
- return {
25
- primaryColors,
26
- otherColors
27
- };
28
- }
29
- const ThemeSettings = props => {
30
- const {
31
- className,
32
- open,
33
- setOpen,
34
- services,
35
- appTheme,
36
- customProps
37
- } = props;
38
-
39
- // State
40
- // const [themeDrawer, setThemeDrawer] = useState(true);
41
- const [themeTabType, setThemeTabType] = React.useState(0);
42
- const [themeMoodboard, setThemeMoodboard] = React.useState(false);
43
- const [themes, setThemes] = useState([]);
44
- const [loading, setLoading] = useState(false);
45
- const [savingTheme, setSavingTheme] = useState(false);
46
- const {
47
- theme: userSelectedTheme,
48
- updateTheme
49
- } = useEditorTheme();
50
- const {
51
- colors = {}
52
- } = userSelectedTheme?.theme?.cssVars || {};
53
- const {
54
- id,
55
- name,
56
- mood_name
57
- } = userSelectedTheme || {};
58
- const onClose = () => setOpen(false);
59
- const getThemesList = async themeTabType => {
60
- setLoading(true);
61
- setThemes([]);
62
- try {
63
- const themeType = themeTabType === 0 ? "default" : "";
64
- const result = await services("getThemes", {
65
- type: themeType
66
- });
67
- setThemes(result?.data || []);
68
- } catch (err) {
69
- console.log(err);
70
- }
71
- setLoading(false);
72
- };
73
- useEffect(() => {
74
- getThemesList(themeTabType);
75
- }, []);
76
- const handleThemeChange = theme => {
77
- updateTheme(theme, {
78
- action: "THEME_CHANGE"
79
- });
80
- };
81
- const onColorChange = (color, colorIndex) => {
82
- updateTheme({
83
- [`color${colorIndex}`]: color
84
- }, {
85
- action: "CSS_VAR_CHANGE",
86
- fieldName: "colors"
87
- });
88
- };
89
- const handleTabChange = (event, newValue) => {
90
- setThemeTabType(newValue);
91
- getThemesList(newValue);
92
- };
93
- const isUpdateTheme = Number(userSelectedTheme?.type) === 2;
94
- const onSaveTheme = async (formData = {}, addNewTheme) => {
95
- setSavingTheme(true);
96
- try {
97
- let type = isUpdateTheme && !addNewTheme ? "update" : "create";
98
- const result = await services("saveTheme", {
99
- type,
100
- id,
101
- ...formData,
102
- theme: userSelectedTheme?.theme
103
- });
104
- const update = {
105
- ...userSelectedTheme,
106
- ...formData,
107
- type: "2"
108
- };
109
- const createdId = result?.data?.id;
110
- if (createdId) {
111
- update.id = createdId;
112
- }
113
- updateTheme(update);
114
- getThemesList(themeTabType);
115
- } catch (err) {
116
- console.log(err);
117
- }
118
- setSavingTheme(false);
119
- };
120
-
121
- // themeCard
122
- const ThemeCard = ({
123
- theme
124
- }) => {
125
- const {
126
- name,
127
- mood_name = ""
128
- } = theme;
129
- const {
130
- colors = {}
131
- } = theme?.theme?.cssVars || {};
132
- const {
133
- primaryColors,
134
- otherColors
135
- } = getColors(colors);
136
- const isSelected = theme.id === userSelectedTheme?.id;
137
- return /*#__PURE__*/_jsxs(Grid, {
138
- className: `themeCardWrapper ${isSelected ? "activeWrapper" : ""}`,
139
- onClick: () => handleThemeChange(theme),
140
- children: [isSelected ? /*#__PURE__*/_jsx(TickIcon, {}) : null, /*#__PURE__*/_jsxs(Grid, {
141
- container: true,
142
- justifyContent: "space-between",
143
- className: "themeCard",
144
- gap: 2,
145
- children: [/*#__PURE__*/_jsxs(Grid, {
146
- children: [/*#__PURE__*/_jsx(Typography, {
147
- variant: "body1",
148
- className: "title",
149
- style: {
150
- whiteSpace: "nowrap",
151
- maxWidth: "100px",
152
- textOverflow: "ellipsis",
153
- overflow: "hidden"
154
- },
155
- children: name
156
- }), /*#__PURE__*/_jsx(Typography, {
157
- variant: "body2",
158
- className: "fs-12 textSecondary",
159
- children: mood_name
160
- })]
161
- }), /*#__PURE__*/_jsxs(Grid, {
162
- className: "flexAlign",
163
- sx: {
164
- gap: "5px"
165
- },
166
- children: [primaryColors?.map((color, i) => {
167
- return /*#__PURE__*/_jsx(Grid, {
168
- className: "primaryCard",
169
- style: {
170
- backgroundColor: color
171
- }
172
- }, i);
173
- }), /*#__PURE__*/_jsx(Grid, {
174
- className: "otherColors",
175
- sx: {
176
- gap: "5px"
177
- },
178
- children: otherColors.map((color, i) => {
179
- return /*#__PURE__*/_jsx(Grid, {
180
- className: "smallCard",
181
- style: {
182
- backgroundColor: color
183
- }
184
- }, i);
185
- })
186
- })]
187
- })]
188
- })]
189
- });
190
- };
191
- const showThemeSettings = id && !themeMoodboard;
192
- return /*#__PURE__*/_jsx(Grid, {
193
- className: className,
194
- children: /*#__PURE__*/_jsxs(Drawer, {
195
- className: className,
196
- open: open,
197
- onClose: onClose,
198
- anchor: "right",
199
- children: [/*#__PURE__*/_jsxs(Grid, {
200
- className: "settingsContainer",
201
- children: [/*#__PURE__*/_jsxs(Grid, {
202
- container: true,
203
- justifyContent: "space-between",
204
- wrap: "nowrap",
205
- className: "header",
206
- sx: {
207
- px: 2
208
- },
209
- children: [/*#__PURE__*/_jsxs(Grid, {
210
- children: [/*#__PURE__*/_jsx(Typography, {
211
- variant: "body1",
212
- className: "title",
213
- children: "Theme/Brand Setting"
214
- }), /*#__PURE__*/_jsxs(Typography, {
215
- variant: "body1",
216
- className: "fs-12 textSecondary",
217
- children: ["Change the entire style of your website with a single click.", " "]
218
- })]
219
- }), /*#__PURE__*/_jsx(IconButton, {
220
- className: "closeBtn",
221
- onClick: onClose,
222
- children: /*#__PURE__*/_jsx(CloseIcon, {})
223
- })]
224
- }), /*#__PURE__*/_jsx(Grid, {
225
- className: "activeTheme",
226
- children: !themeMoodboard ? /*#__PURE__*/_jsx(ActiveTheme, {
227
- onExplore: () => setThemeMoodboard(true)
228
- }) : /*#__PURE__*/_jsxs(Grid, {
229
- className: "sectionDetail",
230
- children: [/*#__PURE__*/_jsxs(Typography, {
231
- variant: "body1",
232
- className: "sectionTitle flexAlign",
233
- children: [/*#__PURE__*/_jsx(IconButton, {
234
- onClick: () => setThemeMoodboard(false),
235
- className: "backBtn",
236
- children: /*#__PURE__*/_jsx(ChevronLeft, {})
237
- }), "Theme Moodboard"]
238
- }), /*#__PURE__*/_jsxs(Tabs, {
239
- value: themeTabType,
240
- onChange: handleTabChange,
241
- variant: "fullWidth",
242
- scrollButtons: false,
243
- "aria-label": "scrollable prevent tabs example",
244
- children: [/*#__PURE__*/_jsx(Tab, {
245
- label: /*#__PURE__*/_jsx(Typography, {
246
- variant: "body1",
247
- className: "fs-14 fw-500 transformNone",
248
- children: "Key themes"
249
- })
250
- }), /*#__PURE__*/_jsx(Tab, {
251
- label: /*#__PURE__*/_jsx(Typography, {
252
- variant: "body1",
253
- className: "fs-14 fw-500 transformNone",
254
- children: "Saved themes"
255
- })
256
- })]
257
- }), loading ? /*#__PURE__*/_jsx("div", {
258
- style: {
259
- display: "flex",
260
- justifyContent: "center",
261
- alignItems: "center",
262
- margin: 0,
263
- padding: 0,
264
- height: "50px",
265
- overflow: "hidden"
266
- },
267
- children: /*#__PURE__*/_jsx(CircularProgress, {})
268
- }) : null, themes.map((theme, i) => {
269
- return /*#__PURE__*/_jsx(ThemeCard, {
270
- theme: theme
271
- }, i);
272
- })]
273
- })
274
- }), showThemeSettings ? /*#__PURE__*/_jsxs(_Fragment, {
275
- children: [/*#__PURE__*/_jsx(Grid, {
276
- sx: {
277
- px: 1,
278
- mt: 2
279
- },
280
- children: /*#__PURE__*/_jsx(ColorTheme, {
281
- colors: getColors(colors),
282
- onColorChange: onColorChange,
283
- openDefault: open === "editThemeColor",
284
- appTheme: appTheme
285
- })
286
- }), /*#__PURE__*/_jsx(Grid, {
287
- sx: {
288
- px: 1,
289
- mt: 2
290
- },
291
- children: /*#__PURE__*/_jsx(Fonts, {
292
- appTheme: appTheme,
293
- customProps: customProps
294
- })
295
- }), /*#__PURE__*/_jsx(Grid, {
296
- sx: {
297
- px: 1,
298
- mt: 2
299
- },
300
- children: /*#__PURE__*/_jsx(Buttons, {
301
- appTheme: appTheme,
302
- customProps: customProps
303
- })
304
- })]
305
- }) : null]
306
- }), showThemeSettings ? /*#__PURE__*/_jsxs(Box, {
307
- className: "saveThemeBtnsWrapper",
308
- component: "div",
309
- children: [isUpdateTheme ? /*#__PURE__*/_jsx(SaveTheme, {
310
- saveBtnLabel: "Add new theme",
311
- loading: savingTheme,
312
- onSave: onSaveTheme,
313
- defaultFormData: {
314
- name,
315
- mood_name
316
- },
317
- addNewTheme: true
318
- }) : null, /*#__PURE__*/_jsx(SaveTheme, {
319
- saveBtnLabel: isUpdateTheme ? "Update theme" : "Save to my theme",
320
- loading: savingTheme,
321
- onSave: onSaveTheme,
322
- defaultFormData: {
323
- name,
324
- mood_name
325
- }
326
- })]
327
- }) : null]
328
- })
329
- });
330
- };
331
- export default styled(ThemeSettings)(Style);