@flozy/editor 9.6.3 → 9.6.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 (253) hide show
  1. package/dist/Editor/ChatEditor.js +26 -19
  2. package/dist/Editor/CommonEditor.js +139 -23
  3. package/dist/Editor/DialogWrapper.js +31 -25
  4. package/dist/Editor/Editor.css +13 -9
  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 +4 -2
  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 +31 -14
  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 +425 -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 +14 -9
  58. package/dist/Editor/Elements/Embed/Video.js +9 -6
  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 +24 -15
  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 +22 -10
  73. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +67 -23
  74. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +23 -4
  75. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +6 -2
  76. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +36 -5
  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 +14 -9
  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 +6 -3
  93. package/dist/Editor/Elements/Search/SearchList.js +7 -3
  94. package/dist/Editor/Elements/Signature/SignatureButton.js +6 -2
  95. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +6 -2
  96. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +4 -1
  97. package/dist/Editor/Elements/Signature/SignaturePopup.js +17 -16
  98. package/dist/Editor/Elements/SimpleText/index.js +5 -4
  99. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  100. package/dist/Editor/Elements/Table/DragButton.js +4 -2
  101. package/dist/Editor/Elements/Table/Table.js +24 -12
  102. package/dist/Editor/Elements/Table/TablePopup.js +4 -1
  103. package/dist/Editor/Elements/Table/TableSelector.js +10 -6
  104. package/dist/Editor/Elements/Table/TableTool.js +8 -4
  105. package/dist/Editor/Elements/Title/title.js +10 -0
  106. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +4 -1
  107. package/dist/Editor/Elements/Variables/VariableButton.js +10 -1
  108. package/dist/Editor/MiniEditor.js +10 -3
  109. package/dist/Editor/Styles/EditorStyles.js +5 -5
  110. package/dist/Editor/Toolbar/Basic/index.js +2 -1
  111. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +6 -2
  112. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +27 -3
  113. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -3
  114. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +8 -4
  115. package/dist/Editor/Toolbar/FormatTools/TextSize.js +10 -13
  116. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +12 -5
  117. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +10 -5
  118. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +10 -4
  119. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +10 -4
  120. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +9 -3
  121. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +42 -35
  122. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +6 -13
  123. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +58 -51
  124. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +29 -22
  125. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +226 -87
  126. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +20 -10
  127. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +10 -5
  128. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +71 -11
  129. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +11 -5
  130. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +128 -45
  131. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +436 -0
  132. package/dist/Editor/Toolbar/PopupTool/index.js +20 -10
  133. package/dist/Editor/Toolbar/Toolbar.js +20 -10
  134. package/dist/Editor/Toolbar/toolbarGroups.js +48 -6
  135. package/dist/Editor/assets/svg/ClearAllRounded.js +31 -0
  136. package/dist/Editor/assets/svg/ThemeIcons.js +291 -0
  137. package/dist/Editor/common/ColorPickerButton.js +39 -14
  138. package/dist/Editor/common/CustomColorPicker/index.js +131 -0
  139. package/dist/Editor/common/CustomColorPicker/style.js +53 -0
  140. package/dist/Editor/common/CustomDialog/index.js +8 -10
  141. package/dist/Editor/common/CustomDialog2/index.js +94 -0
  142. package/dist/Editor/common/CustomDialog2/style.js +67 -0
  143. package/dist/Editor/common/CustomSelect.js +43 -0
  144. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  145. package/dist/Editor/common/FontLoader/FontLoader.js +3 -0
  146. package/dist/Editor/common/Icon.js +28 -0
  147. package/dist/Editor/common/ImageSelector/ImageSelector.js +10 -8
  148. package/dist/Editor/common/ImageSelector/Options/AddLink.js +6 -4
  149. package/dist/Editor/common/ImageSelector/Options/Upload.js +1 -1
  150. package/dist/Editor/common/ImageSelector/Styles.js +3 -9
  151. package/dist/Editor/common/ImageSelector/UploadStyles.js +9 -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/MentionsPopup/index.js +6 -2
  156. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -22
  157. package/dist/Editor/common/RnD/ContextMenu/index.js +3 -2
  158. package/dist/Editor/common/RnD/ElementOptions/index.js +7 -2
  159. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +8 -3
  160. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +7 -3
  161. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +3 -2
  162. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +3 -2
  163. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +3 -2
  164. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +3 -2
  165. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +7 -4
  166. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +3 -2
  167. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +3 -2
  168. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +6 -2
  169. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +3 -2
  170. package/dist/Editor/common/RnD/ElementSettings/styles.js +0 -1
  171. package/dist/Editor/common/RnD/OptionsPopup/index.js +4 -3
  172. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +11 -4
  173. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +17 -0
  174. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +6 -3
  175. package/dist/Editor/common/RnD/Utils/gridDropItem.js +56 -7
  176. package/dist/Editor/common/RnD/Utils/index.js +3 -0
  177. package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +117 -0
  178. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +134 -0
  179. package/dist/Editor/common/RnD/VirtualElement/helper.js +281 -0
  180. package/dist/Editor/common/RnD/VirtualElement/index.js +187 -103
  181. package/dist/Editor/common/RnD/VirtualElement/styles.js +123 -7
  182. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +5 -3
  183. package/dist/Editor/common/RnD/index.js +59 -14
  184. package/dist/Editor/common/Section/index.js +7 -4
  185. package/dist/Editor/common/Shorthands/elements.js +74 -3
  186. package/dist/Editor/common/SnackBar/index.js +43 -0
  187. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
  188. package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
  189. package/dist/Editor/common/StyleBuilder/buttonStyle.js +6 -4
  190. package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
  191. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
  192. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
  193. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +13 -9
  194. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +11 -3
  195. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +19 -5
  196. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +22 -10
  197. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +6 -3
  198. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +27 -13
  199. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +43 -14
  200. package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +10 -6
  201. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +19 -6
  202. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +6 -2
  203. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +5 -2
  204. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +9 -6
  205. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +8 -2
  206. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +12 -11
  207. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +6 -2
  208. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +8 -4
  209. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +6 -2
  210. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +21 -12
  211. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  212. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  213. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  214. package/dist/Editor/common/StyleBuilder/index.js +8 -5
  215. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +5 -7
  216. package/dist/Editor/common/Uploader.js +16 -5
  217. package/dist/Editor/commonStyle.js +23 -12
  218. package/dist/Editor/helper/index.js +27 -3
  219. package/dist/Editor/helper/textIndeces.js +58 -0
  220. package/dist/Editor/helper/theme.js +202 -2
  221. package/dist/Editor/hooks/useAutoScroll.js +38 -0
  222. package/dist/Editor/hooks/useDrag.js +1 -1
  223. package/dist/Editor/hooks/useEditorScroll.js +0 -1
  224. package/dist/Editor/hooks/useEditorTheme.js +153 -0
  225. package/dist/Editor/hooks/useMouseMove.js +9 -3
  226. package/dist/Editor/hooks/useThemeValues.js +63 -0
  227. package/dist/Editor/plugins/withEmbeds.js +1 -1
  228. package/dist/Editor/plugins/withHTML.js +11 -9
  229. package/dist/Editor/plugins/withLayout.js +3 -2
  230. package/dist/Editor/plugins/withTable.js +1 -1
  231. package/dist/Editor/theme/ThemeList.js +50 -173
  232. package/dist/Editor/theme/index.js +149 -0
  233. package/dist/Editor/themeSettings/ActiveTheme.js +72 -0
  234. package/dist/Editor/themeSettings/buttons/index.js +290 -0
  235. package/dist/Editor/themeSettings/buttons/style.js +23 -0
  236. package/dist/Editor/themeSettings/colorTheme/index.js +310 -0
  237. package/dist/Editor/themeSettings/colorTheme/style.js +81 -0
  238. package/dist/Editor/themeSettings/fonts/PreviewElement.js +121 -0
  239. package/dist/Editor/themeSettings/fonts/index.js +240 -0
  240. package/dist/Editor/themeSettings/fonts/style.js +61 -0
  241. package/dist/Editor/themeSettings/icons.js +60 -0
  242. package/dist/Editor/themeSettings/index.js +351 -0
  243. package/dist/Editor/themeSettings/style.js +220 -0
  244. package/dist/Editor/themeSettingsAI/icons.js +96 -0
  245. package/dist/Editor/themeSettingsAI/index.js +355 -0
  246. package/dist/Editor/themeSettingsAI/saveTheme.js +205 -0
  247. package/dist/Editor/themeSettingsAI/style.js +259 -0
  248. package/dist/Editor/utils/SlateUtilityFunctions.js +168 -49
  249. package/dist/Editor/utils/draftToSlate.js +3 -2
  250. package/dist/Editor/utils/font.js +40 -37
  251. package/dist/Editor/utils/freegrid.js +2 -2
  252. package/dist/Editor/utils/helper.js +90 -19
  253. package/package.json +3 -3
@@ -2,20 +2,40 @@ const useVirtualElementStyles = () => ({
2
2
  root: {
3
3
  width: "320px",
4
4
  position: "fixed",
5
- backgroundColor: "red",
6
- height: "auto",
5
+ // backgroundColor: "red",
6
+ // height: "fit-content",
7
7
  overflow: "visible",
8
8
  pointerEvents: "none",
9
- opacity: 0,
9
+ opacity: 1,
10
10
  right: 0,
11
11
  top: 0,
12
+ "& .leaf-item": {
13
+ fontSize: "var(--fontSize_xs) !important",
14
+ "& span": {
15
+ fontSize: "var(--fontSize_xs) !important"
16
+ }
17
+ },
18
+ "& .editor-blocker": {
19
+ display: "none"
20
+ },
12
21
  "& .freegrid-item": {
13
22
  position: "relative !important",
14
- gridArea: "none !important",
23
+ top: "0 !important",
24
+ gridArea: "var(--gridArea_xs) !important",
15
25
  width: "calc(100% - 48px) !important",
16
- height: "auto !important",
26
+ height: "var(--height_xs) !important",
17
27
  left: "24px !important",
18
- marginTop: "24px !important",
28
+ marginTop: "var(--marginTop_xs) !important",
29
+ outline: "1px solid gray !important",
30
+ "&.type_text": {
31
+ height: "auto !important"
32
+ },
33
+ // "&.type_box": {
34
+ // // display: "grid !important",
35
+ // // gridTemplateRows: "repeat(auto-fill, 50px) !important",
36
+ // // height: "min-content !important",
37
+ // },
38
+
19
39
  "& .debug-info, & .editor-blocker": {
20
40
  display: "none"
21
41
  },
@@ -25,4 +45,100 @@ const useVirtualElementStyles = () => ({
25
45
  }
26
46
  }
27
47
  });
28
- export default useVirtualElementStyles;
48
+ export default useVirtualElementStyles;
49
+ export const useAutoAlignStyles = () => ({
50
+ root: {
51
+ width: "320px",
52
+ position: "fixed",
53
+ overflow: "visible",
54
+ opacity: 1,
55
+ right: 0,
56
+ top: 0,
57
+ height: "auto !important",
58
+ pointerEvents: "none",
59
+ "& .leaf-item": {
60
+ fontSize: "var(--fontSize_xs) !important",
61
+ "& span": {
62
+ fontSize: "var(--fontSize_xs) !important"
63
+ }
64
+ },
65
+ "& .editor-blocker": {
66
+ display: "none"
67
+ },
68
+ "& .freegrid-item": {
69
+ position: "relative !important",
70
+ top: "0 !important",
71
+ gridArea: "none !important",
72
+ width: "calc(100% - 48px) !important",
73
+ height: "var(--height_xs) !important",
74
+ left: "24px !important",
75
+ marginTop: "12px !important",
76
+ minHeight: "auto",
77
+ display: "inherit !important",
78
+ "&.type_box": {
79
+ height: "auto !important"
80
+ },
81
+ "&.type_image": {
82
+ width: "var(--width_xs) !important",
83
+ height: "var(--height_xs) !important"
84
+ },
85
+ "&.type_text": {
86
+ height: "auto !important"
87
+ },
88
+ // start - default signature classes on free-grid
89
+ "& .fgi_type_signature": {
90
+ height: "100%",
91
+ "& .signature-container": {
92
+ height: "100%",
93
+ LineHeight: 1.43,
94
+ "& .signature-btn-container": {
95
+ height: "100%",
96
+ display: "flex",
97
+ flexDirection: "column",
98
+ "& .sign-placeholder": {
99
+ display: "flex",
100
+ // remove hidden sign placeholder
101
+ width: "100%",
102
+ flexGrow: 1
103
+ },
104
+ "& button": {
105
+ margin: "6px 0px"
106
+ }
107
+ }
108
+ }
109
+ },
110
+ "& .fgi_type_sign": {
111
+ width: "100%",
112
+ height: "100%",
113
+ "& .signature-signed-wrapper": {
114
+ width: "100%",
115
+ height: "100%",
116
+ "& .signature-signed-span": {
117
+ width: "100%",
118
+ height: "100%",
119
+ "& .signed-btn": {
120
+ width: "100%",
121
+ height: "100%",
122
+ display: "flex",
123
+ flexDirection: "column",
124
+ "& img": {
125
+ width: "100% !important",
126
+ maxWidth: "none !important",
127
+ height: "70% !important",
128
+ flexGrow: 1
129
+ }
130
+ }
131
+ }
132
+ }
133
+ },
134
+ // end - default signature classes on free-grid
135
+
136
+ "& .debug-info, & .editor-blocker": {
137
+ display: "none"
138
+ },
139
+ "& .embed": {
140
+ minHeight: "300px"
141
+ }
142
+ }
143
+ }
144
+ });
@@ -1,5 +1,5 @@
1
1
  import { Node, Transforms } from "slate";
2
- const updateAutoProps = (editor, datas = [], breakpoint = "", groupData) => {
2
+ const updateAutoProps = (editor, datas = [], breakpoint = "", updateAll) => {
3
3
  try {
4
4
  // const { heightData } = groupData;
5
5
  for (let i = 0; i < datas.length; i++) {
@@ -14,9 +14,11 @@ const updateAutoProps = (editor, datas = [], breakpoint = "", groupData) => {
14
14
  return a;
15
15
  }, {});
16
16
  const oldProps = Node.get(editor, int_path);
17
- if (!oldProps?.xs_updatedOn) {
17
+ const updateNode = !oldProps?.xs_updatedOn || updateAll;
18
+ if (updateNode) {
18
19
  Transforms.setNodes(editor, {
19
- ...updatedProps
20
+ ...updatedProps,
21
+ xs_updatedOn: new Date().getTime()
20
22
  }, {
21
23
  at: int_path
22
24
  });
@@ -19,6 +19,10 @@ import { removeSign } from "./ElementSettings/OtherSettings";
19
19
  import useDragging from "../../hooks/useDragging";
20
20
  import { dragOverOn } from "../../helper/RnD/focusNode";
21
21
  import { focusSelection, clearSelection, clearSelectionOnly } from "../../helper";
22
+ import { reRenderChildNodes } from "./Utils/gridDropItem";
23
+ import VirtualTextElement from "./VirtualElement/VirtualTextElement";
24
+ import useAutoScroll from "../../hooks/useAutoScroll";
25
+ import ForceAutoAlignment from "./VirtualElement/ForceAutoAlignment";
22
26
  import { jsx as _jsx } from "react/jsx-runtime";
23
27
  import { jsxs as _jsxs } from "react/jsx-runtime";
24
28
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -64,7 +68,12 @@ const RnD = props => {
64
68
  editor,
65
69
  breakpoint = "",
66
70
  handleContextMenuClick = () => {},
67
- itemData = {}
71
+ itemData = {},
72
+ customProps,
73
+ sectionElement,
74
+ dataSets,
75
+ autoAlign,
76
+ setAutoAlign
68
77
  } = props;
69
78
  const {
70
79
  isSelectedElement,
@@ -106,6 +115,13 @@ const RnD = props => {
106
115
  y: 0
107
116
  });
108
117
  const parentSectionPath = str_path?.split("|").slice(0, 2).join("_");
118
+ const {
119
+ translation
120
+ } = customProps;
121
+ const {
122
+ startAutoScroll,
123
+ stopAutoScroll
124
+ } = useAutoScroll(10, "slate-wrapper-scroll-container");
109
125
  useEffect(() => {
110
126
  if (ITEM_TYPES.includes(type)) {
111
127
  if (enable === 1) {
@@ -347,6 +363,16 @@ const RnD = props => {
347
363
  };
348
364
  const onDrag = e => {
349
365
  e.preventDefault();
366
+ const {
367
+ clientY
368
+ } = e;
369
+ if (clientY < 50) {
370
+ startAutoScroll("up");
371
+ } else if (window.innerHeight - clientY < 50) {
372
+ startAutoScroll("down");
373
+ } else {
374
+ stopAutoScroll();
375
+ }
350
376
  const lines = getClosestDraggable(e.clientX, e.clientY, `.freegrid-section_${parentSectionPath} .freegrid-container .freegrid-item.inactive-drag`.replace(/\|/g, "\\|"), ".freegrid-item.active-drag:not(.exclude-virtual)");
351
377
  setAbsPosition({
352
378
  ...absPosition,
@@ -389,6 +415,7 @@ const RnD = props => {
389
415
  const onDragStop = (e, d) => {
390
416
  e.preventDefault();
391
417
  e.stopPropagation();
418
+ stopAutoScroll();
392
419
  if (dragging?.isDragging === 2 && dragging?.position?.strXY && dragging?.dragOver) {
393
420
  d.x = e.x;
394
421
  d.y = e.y;
@@ -449,13 +476,18 @@ const RnD = props => {
449
476
  }
450
477
  const updatedSize = {
451
478
  width: delta?.width + d.width,
452
- height: delta?.height + d.height,
479
+ height: ref.offsetHeight,
453
480
  ...updatedPosition
454
481
  };
455
482
  onChange({
456
483
  ...updatedSize
457
484
  });
458
485
  handleResizeEvent("stop");
486
+ const parentPath = getParentSectionPath({
487
+ ref
488
+ }, ".freegrid-container-parent");
489
+ const formatParentPath = parentPath?.split("|")?.map(m => parseInt(m));
490
+ reRenderChildNodes(editor, formatParentPath);
459
491
  };
460
492
  const onCloseSettings = () => {
461
493
  setSelectedElement({
@@ -470,13 +502,6 @@ const RnD = props => {
470
502
  }
471
503
  e.preventDefault();
472
504
  e.stopPropagation();
473
- const isMuiBackdrop = e.target.classList.contains("MuiBackdrop-root");
474
- if (isMuiBackdrop) {
475
- setContextMenu({
476
- path: null
477
- });
478
- return;
479
- }
480
505
  onClick({
481
506
  detail: 1
482
507
  });
@@ -530,7 +555,7 @@ const RnD = props => {
530
555
  return /*#__PURE__*/_jsxs(_Fragment, {
531
556
  children: [/*#__PURE__*/_jsxs(Box, {
532
557
  component: Rnd,
533
- placeholder: ItemTypes[childType] || "Item",
558
+ placeholder: translation(ItemTypes[childType]) || translation("Item"),
534
559
  id: eId || "",
535
560
  ref: c => {
536
561
  positionRef.current = c;
@@ -564,6 +589,7 @@ const RnD = props => {
564
589
  ...DISABLE_RESIZING
565
590
  },
566
591
  ...getEventProps(),
592
+ ...(dataSets || {}),
567
593
  children: [/*#__PURE__*/_jsx("div", {
568
594
  id: `opt_ref_${str_path}`,
569
595
  style: {
@@ -597,7 +623,9 @@ const RnD = props => {
597
623
  optionsProps: optionsProps,
598
624
  selectedAction: currentAction,
599
625
  path: str_path,
600
- theme: theme
626
+ theme: theme,
627
+ translation: translation,
628
+ customProps: customProps
601
629
  }) : null, /*#__PURE__*/_jsx(ElementSettings, {
602
630
  open: Boolean(currentAction),
603
631
  currentAction: currentAction,
@@ -631,12 +659,29 @@ const RnD = props => {
631
659
  open: openContextMenu,
632
660
  contextMenu: contextMenu,
633
661
  handleClose: handleClose,
634
- theme: theme
662
+ theme: theme,
663
+ translation: translation
635
664
  }), type === "parent" && breakpoint === "lg" && !readOnly ? /*#__PURE__*/_jsx(VirtualElement, {
636
- parentEle: positionRef?.current?.resizableElement?.current,
637
665
  updated_at: updated_at,
638
666
  path: str_path,
639
- editor: editor
667
+ editor: editor,
668
+ sectionElement: sectionElement,
669
+ sectionCls: `.freegrid-section_${path.join("_")}`,
670
+ dataSets: dataSets
671
+ }) : null, childType === "text" && breakpoint === "lg" && !readOnly && enable ? /*#__PURE__*/_jsx(VirtualTextElement, {
672
+ editor: editor,
673
+ dataSets: dataSets,
674
+ getCurrentEle: getCurrentEle,
675
+ path: path
676
+ }) : null, type === "parent" && breakpoint === "xs" && !readOnly && autoAlign ? /*#__PURE__*/_jsx(ForceAutoAlignment, {
677
+ updated_at: updated_at,
678
+ path: str_path,
679
+ editor: editor,
680
+ sectionElement: sectionElement,
681
+ sectionCls: `.freegrid-section_${path.join("_")}`,
682
+ dataSets: dataSets,
683
+ autoAlign: autoAlign,
684
+ setAutoAlign: setAutoAlign
640
685
  }) : null]
641
686
  });
642
687
  };
@@ -19,7 +19,8 @@ const Toolbar = ({
19
19
  readOnly,
20
20
  showTool,
21
21
  onSettings,
22
- isSectionFullWidth
22
+ isSectionFullWidth,
23
+ translation
23
24
  }) => {
24
25
  return !readOnly && !showTool ? /*#__PURE__*/_jsx(Box, {
25
26
  component: "div",
@@ -33,7 +34,7 @@ const Toolbar = ({
33
34
  }
34
35
  },
35
36
  children: /*#__PURE__*/_jsx(Tooltip, {
36
- title: "Section Settings",
37
+ title: translation("Section Settings"),
37
38
  children: /*#__PURE__*/_jsx(IconButton, {
38
39
  onClick: onSettings,
39
40
  children: /*#__PURE__*/_jsx(SectionSettingIcon, {})
@@ -51,7 +52,8 @@ const Section = props => {
51
52
  customProps
52
53
  } = props;
53
54
  const {
54
- readOnly
55
+ readOnly,
56
+ translation
55
57
  } = customProps;
56
58
  const editor = useSlateStatic();
57
59
  // const [isHovering, setIsHovering] = useState(false);
@@ -176,7 +178,8 @@ const Section = props => {
176
178
  isSectionFullWidth: isSectionFullWidth,
177
179
  readOnly: readOnly,
178
180
  showTool: false,
179
- onSettings: onSettings
181
+ onSettings: onSettings,
182
+ translation: translation
180
183
  }), children]
181
184
  }), openSetttings ? /*#__PURE__*/_jsx(SectionPopup, {
182
185
  element: {
@@ -44,6 +44,60 @@ const ELEMENTS_LIST = [{
44
44
  icon: "headingThree"
45
45
  }),
46
46
  onInsert: editor => toggleBlock(editor, "headingThree", false)
47
+ }, {
48
+ name: "Heading 4",
49
+ desc: "",
50
+ group: "Text",
51
+ type: "headingFour",
52
+ icon: /*#__PURE__*/_jsx(Icon, {
53
+ icon: "headingFour"
54
+ }),
55
+ onInsert: editor => toggleBlock(editor, "headingFour", false)
56
+ }, {
57
+ name: "Heading 5",
58
+ desc: "",
59
+ group: "Text",
60
+ type: "headingFive",
61
+ icon: /*#__PURE__*/_jsx(Icon, {
62
+ icon: "headingFive"
63
+ }),
64
+ onInsert: editor => toggleBlock(editor, "headingFive", false)
65
+ }, {
66
+ name: "Heading 6",
67
+ desc: "",
68
+ group: "Text",
69
+ type: "headingSix",
70
+ icon: /*#__PURE__*/_jsx(Icon, {
71
+ icon: "headingSix"
72
+ }),
73
+ onInsert: editor => toggleBlock(editor, "headingSix", false)
74
+ }, {
75
+ name: "Paragraph 1",
76
+ desc: "",
77
+ group: "Text",
78
+ type: "paragraphOne",
79
+ icon: /*#__PURE__*/_jsx(Icon, {
80
+ icon: "paragraphOne"
81
+ }),
82
+ onInsert: editor => toggleBlock(editor, "paragraphOne", false)
83
+ }, {
84
+ name: "Paragraph 2",
85
+ desc: "",
86
+ group: "Text",
87
+ type: "paragraphTwo",
88
+ icon: /*#__PURE__*/_jsx(Icon, {
89
+ icon: "paragraphTwo"
90
+ }),
91
+ onInsert: editor => toggleBlock(editor, "paragraphTwo", false)
92
+ }, {
93
+ name: "Paragraph 3",
94
+ desc: "",
95
+ group: "Text",
96
+ type: "paragraphThree",
97
+ icon: /*#__PURE__*/_jsx(Icon, {
98
+ icon: "paragraphThree"
99
+ }),
100
+ onInsert: editor => toggleBlock(editor, "paragraphThree", false)
47
101
  }, {
48
102
  name: "Quote",
49
103
  desc: "",
@@ -164,7 +218,10 @@ const ELEMENTS_LIST = [{
164
218
  type: "emoji",
165
219
  renderComponent: rest => /*#__PURE__*/_jsx(EmojiButton, {
166
220
  ...rest,
167
- icoBtnType: "cmd"
221
+ icoBtnType: "cmd",
222
+ customProps: {
223
+ ...rest
224
+ }
168
225
  })
169
226
  }, {
170
227
  name: "Brain",
@@ -176,7 +233,10 @@ const ELEMENTS_LIST = [{
176
233
  element: {
177
234
  name: "Brain"
178
235
  },
179
- icoBtnType: "cmd"
236
+ icoBtnType: "cmd",
237
+ customProps: {
238
+ ...rest
239
+ }
180
240
  })
181
241
  }, {
182
242
  name: "Divider",
@@ -299,10 +359,21 @@ const elements = props => {
299
359
  const {
300
360
  search,
301
361
  hideTools,
362
+ translation,
302
363
  editor
303
364
  } = props;
304
365
  const nodeType = canOpen(editor);
305
- const filteredElements = ELEMENTS_LIST.filter(f => (hideTools || []).indexOf(f.type) === -1 && (!f?.hideFor || f?.hideFor?.indexOf(nodeType) === -1));
366
+ const translatedElements = ELEMENTS_LIST.map(element => ({
367
+ ...element,
368
+ name: translation(element.name),
369
+ renderComponent: element.renderComponent ? rest => {
370
+ return element.renderComponent({
371
+ ...rest,
372
+ translation
373
+ });
374
+ } : undefined
375
+ }));
376
+ const filteredElements = translatedElements.filter(f => (hideTools || []).indexOf(f.type) === -1 && (!f?.hideFor || f?.hideFor?.indexOf(nodeType) === -1));
306
377
  return filteredElements.filter(c => c.name.toLowerCase().includes(search?.toLowerCase()));
307
378
  };
308
379
  export default elements;
@@ -0,0 +1,43 @@
1
+ import Snackbar from "@mui/material/Snackbar";
2
+ import Alert from "@mui/material/Alert";
3
+ import { useState } from "react";
4
+ import { useEditorContext } from "../../hooks/useMouseMove";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ const SnackbarAlert = ({
7
+ message,
8
+ setShowSnackBar,
9
+ severity = "info"
10
+ }) => {
11
+ const [open, setOpen] = useState(!!message);
12
+ const {
13
+ theme
14
+ } = useEditorContext();
15
+ return /*#__PURE__*/_jsx(Snackbar, {
16
+ open: open,
17
+ autoHideDuration: 3000,
18
+ onClose: () => {
19
+ setOpen(false);
20
+ setShowSnackBar(false);
21
+ },
22
+ anchorOrigin: {
23
+ vertical: "top",
24
+ horizontal: "right"
25
+ },
26
+ children: /*#__PURE__*/_jsx(Alert, {
27
+ severity: severity,
28
+ onClose: () => {
29
+ setOpen(false);
30
+ setShowSnackBar(false);
31
+ },
32
+ sx: {
33
+ background: theme?.palette?.primary?.gradientBtn,
34
+ color: "#FFFFFF",
35
+ "& .MuiAlert-icon": {
36
+ color: "#FFFFFF"
37
+ }
38
+ },
39
+ children: message
40
+ })
41
+ });
42
+ };
43
+ export default SnackbarAlert;
@@ -15,12 +15,12 @@ const appHeaderStyle = [{
15
15
  options: fontOptions,
16
16
  webFont: true,
17
17
  width: 7,
18
- renderOption: option => {
18
+ renderOption: (option, elementProps, translation) => {
19
19
  return /*#__PURE__*/_jsx("span", {
20
20
  style: {
21
21
  fontFamily: option.value
22
22
  },
23
- children: "LOGO"
23
+ children: translation("LOGO")
24
24
  });
25
25
  }
26
26
  }, {
@@ -58,12 +58,12 @@ const appHeaderStyle = [{
58
58
  webFont: true,
59
59
  width: 7,
60
60
  options: fontOptions,
61
- renderOption: option => {
61
+ renderOption: (option, elementProps, translation) => {
62
62
  return /*#__PURE__*/_jsx("span", {
63
63
  style: {
64
64
  fontFamily: option.value
65
65
  },
66
- children: "Home"
66
+ children: translation("Home")
67
67
  });
68
68
  }
69
69
  }, {
@@ -51,9 +51,9 @@ const boxStyle = [{
51
51
  text: "Dashed",
52
52
  value: "dashed"
53
53
  }],
54
- renderOption: option => {
54
+ renderOption: (option, elementProps, translation) => {
55
55
  return /*#__PURE__*/_jsx("span", {
56
- children: option.text
56
+ children: translation(option.text)
57
57
  });
58
58
  }
59
59
  }]
@@ -21,7 +21,8 @@ const buttonStyle = [{
21
21
  },
22
22
  children: option.text
23
23
  });
24
- }
24
+ },
25
+ themeEnabled: true
25
26
  }, {
26
27
  label: "Font Size",
27
28
  key: "textSize",
@@ -45,7 +46,8 @@ const buttonStyle = [{
45
46
  }, {
46
47
  label: "Button Color",
47
48
  key: "bgColor",
48
- type: "color"
49
+ type: "color",
50
+ themeEnabled: true
49
51
  }, {
50
52
  label: "Border Color",
51
53
  key: "borderColor",
@@ -104,9 +106,9 @@ const buttonStyle = [{
104
106
  text: "Dashed",
105
107
  value: "dashed"
106
108
  }],
107
- renderOption: option => {
109
+ renderOption: (option, elementProps, translation) => {
108
110
  return /*#__PURE__*/_jsx("span", {
109
- children: option.text
111
+ children: translation(option.text)
110
112
  });
111
113
  }
112
114
  }]
@@ -46,9 +46,9 @@ const dividerStyle = [{
46
46
  text: "Outset",
47
47
  value: "outset"
48
48
  }],
49
- renderOption: option => {
49
+ renderOption: (option, lementProps, translation) => {
50
50
  return /*#__PURE__*/_jsx("span", {
51
- children: option.text
51
+ children: translation(option.text)
52
52
  });
53
53
  }
54
54
  }]
@@ -16,18 +16,18 @@ const embedVideoStyle = [{
16
16
  key: "aspectRatio",
17
17
  type: "textOptions",
18
18
  options: [{
19
- text: "16:9 (Default)",
19
+ text: "deafultRatio",
20
20
  value: "16 / 9"
21
21
  }, {
22
- text: "9:16",
22
+ text: "nineSixteen",
23
23
  value: "9 / 16"
24
24
  }, {
25
25
  text: "Custom",
26
26
  value: "custom"
27
27
  }],
28
- renderOption: option => {
28
+ renderOption: (option, elementProps, translation) => {
29
29
  return /*#__PURE__*/_jsx("span", {
30
- children: option.text
30
+ children: translation(option.text)
31
31
  });
32
32
  }
33
33
  }]
@@ -78,9 +78,9 @@ const embedVideoStyle = [{
78
78
  text: "Dashed",
79
79
  value: "dashed"
80
80
  }],
81
- renderOption: option => {
81
+ renderOption: (option, elementProps, translation) => {
82
82
  return /*#__PURE__*/_jsx("span", {
83
- children: option.text
83
+ children: translation(option.text)
84
84
  });
85
85
  }
86
86
  }]
@@ -57,9 +57,9 @@ const fieldStyle = [{
57
57
  text: "Dashed",
58
58
  value: "dashed"
59
59
  }],
60
- renderOption: option => {
60
+ renderOption: (option, elementProps, translation) => {
61
61
  return /*#__PURE__*/_jsx("span", {
62
- children: option.text
62
+ children: translation(option.text)
63
63
  });
64
64
  }
65
65
  }]