@flozy/editor 9.5.6 → 9.5.8

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 (256) hide show
  1. package/dist/Editor/ChatEditor.js +26 -19
  2. package/dist/Editor/CommonEditor.js +139 -22
  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 +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 +7 -2
  33. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +425 -0
  34. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +4 -3
  35. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +25 -5
  36. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +7 -2
  37. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +13 -12
  38. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +7 -4
  39. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +7 -5
  40. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +9 -7
  41. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +8 -3
  42. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +5 -3
  43. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +6 -5
  44. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +5 -3
  45. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +9 -7
  46. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +64 -38
  47. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +3 -2
  48. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +3 -2
  49. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +23 -6
  50. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +4 -1
  51. package/dist/Editor/Elements/DataView/Layouts/TableView.js +6 -4
  52. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +8 -4
  53. package/dist/Editor/Elements/DataView/Layouts/index.js +3 -1
  54. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +5 -2
  55. package/dist/Editor/Elements/DataView/styles.js +13 -0
  56. package/dist/Editor/Elements/Divider/Divider.js +5 -3
  57. package/dist/Editor/Elements/Divider/DividerButton.js +6 -2
  58. package/dist/Editor/Elements/Divider/DividerPopup.js +3 -2
  59. package/dist/Editor/Elements/Embed/Embed.js +4 -1
  60. package/dist/Editor/Elements/Embed/EmbedPopup.js +4 -1
  61. package/dist/Editor/Elements/Embed/Image.js +16 -11
  62. package/dist/Editor/Elements/Embed/Video.js +9 -6
  63. package/dist/Editor/Elements/EmbedScript/Code.js +7 -4
  64. package/dist/Editor/Elements/EmbedScript/EmbedScript.js +6 -2
  65. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +8 -5
  66. package/dist/Editor/Elements/Emoji/EmojiButton.js +6 -2
  67. package/dist/Editor/Elements/Form/FieldPopup.js +4 -1
  68. package/dist/Editor/Elements/Form/Form.js +12 -9
  69. package/dist/Editor/Elements/Form/FormButton.js +6 -2
  70. package/dist/Editor/Elements/Form/FormPopup.js +3 -2
  71. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +18 -12
  72. package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +13 -8
  73. package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +3 -2
  74. package/dist/Editor/Elements/Form/Workflow/Styles.js +24 -22
  75. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +4 -2
  76. package/dist/Editor/Elements/Form/Workflow/index.js +15 -9
  77. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +67 -23
  78. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +23 -4
  79. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +6 -2
  80. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +36 -5
  81. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +3 -2
  82. package/dist/Editor/Elements/FreeGrid/Options/More.js +10 -4
  83. package/dist/Editor/Elements/FreeGrid/styles.js +3 -0
  84. package/dist/Editor/Elements/Grid/Grid.js +13 -10
  85. package/dist/Editor/Elements/Grid/GridButton.js +9 -5
  86. package/dist/Editor/Elements/Grid/GridItem.js +14 -8
  87. package/dist/Editor/Elements/Grid/GridItemPopup.js +4 -1
  88. package/dist/Editor/Elements/Grid/GridPopup.js +4 -1
  89. package/dist/Editor/Elements/Grid/SectionPopup.js +4 -1
  90. package/dist/Editor/Elements/Link/Link.js +8 -5
  91. package/dist/Editor/Elements/Link/LinkButton.js +4 -1
  92. package/dist/Editor/Elements/List/CheckList.js +14 -9
  93. package/dist/Editor/Elements/NewLine/NewLineButton.js +6 -2
  94. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +4 -1
  95. package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +4 -1
  96. package/dist/Editor/Elements/Search/SearchButton.js +6 -3
  97. package/dist/Editor/Elements/Search/SearchList.js +7 -3
  98. package/dist/Editor/Elements/Signature/SignatureButton.js +6 -2
  99. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +6 -2
  100. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +4 -1
  101. package/dist/Editor/Elements/Signature/SignaturePopup.js +17 -16
  102. package/dist/Editor/Elements/SimpleText/index.js +5 -4
  103. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  104. package/dist/Editor/Elements/Table/DragButton.js +4 -2
  105. package/dist/Editor/Elements/Table/Table.js +23 -11
  106. package/dist/Editor/Elements/Table/TableCell.js +2 -24
  107. package/dist/Editor/Elements/Table/TablePopup.js +4 -1
  108. package/dist/Editor/Elements/Table/TableSelector.js +10 -6
  109. package/dist/Editor/Elements/Table/TableTool.js +8 -4
  110. package/dist/Editor/Elements/Title/title.js +10 -0
  111. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +4 -1
  112. package/dist/Editor/Elements/Variables/VariableButton.js +10 -1
  113. package/dist/Editor/MiniEditor.js +10 -3
  114. package/dist/Editor/Styles/EditorStyles.js +5 -5
  115. package/dist/Editor/Toolbar/Basic/index.js +2 -1
  116. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +6 -2
  117. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +27 -3
  118. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -3
  119. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +8 -4
  120. package/dist/Editor/Toolbar/FormatTools/TextSize.js +10 -13
  121. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +5 -3
  122. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +10 -5
  123. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +10 -4
  124. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +10 -4
  125. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +9 -3
  126. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +42 -35
  127. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +6 -13
  128. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +58 -51
  129. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +29 -22
  130. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +226 -87
  131. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +20 -10
  132. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +10 -5
  133. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +71 -11
  134. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +11 -5
  135. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +122 -42
  136. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +436 -0
  137. package/dist/Editor/Toolbar/PopupTool/index.js +18 -8
  138. package/dist/Editor/Toolbar/Toolbar.js +20 -10
  139. package/dist/Editor/Toolbar/toolbarGroups.js +48 -6
  140. package/dist/Editor/assets/svg/ClearAllRounded.js +31 -0
  141. package/dist/Editor/assets/svg/ThemeIcons.js +291 -0
  142. package/dist/Editor/common/ColorPickerButton.js +39 -14
  143. package/dist/Editor/common/CustomColorPicker/index.js +131 -0
  144. package/dist/Editor/common/CustomColorPicker/style.js +53 -0
  145. package/dist/Editor/common/CustomDialog/index.js +8 -10
  146. package/dist/Editor/common/CustomDialog2/index.js +94 -0
  147. package/dist/Editor/common/CustomDialog2/style.js +67 -0
  148. package/dist/Editor/common/CustomSelect.js +43 -0
  149. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  150. package/dist/Editor/common/FontLoader/FontLoader.js +3 -0
  151. package/dist/Editor/common/Icon.js +46 -1
  152. package/dist/Editor/common/ImageSelector/ImageSelector.js +10 -8
  153. package/dist/Editor/common/ImageSelector/Options/AddLink.js +6 -4
  154. package/dist/Editor/common/ImageSelector/Styles.js +3 -9
  155. package/dist/Editor/common/LinkSettings/NavComponents.js +14 -10
  156. package/dist/Editor/common/LinkSettings/index.js +20 -14
  157. package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
  158. package/dist/Editor/common/MentionsPopup/index.js +6 -2
  159. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -22
  160. package/dist/Editor/common/RnD/ContextMenu/index.js +3 -2
  161. package/dist/Editor/common/RnD/ElementOptions/index.js +7 -2
  162. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +8 -3
  163. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +7 -3
  164. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +3 -2
  165. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +3 -2
  166. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +3 -2
  167. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +3 -2
  168. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +7 -4
  169. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +3 -2
  170. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +3 -2
  171. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +6 -2
  172. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +3 -2
  173. package/dist/Editor/common/RnD/OptionsPopup/index.js +4 -3
  174. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +11 -4
  175. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +17 -0
  176. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +20 -8
  177. package/dist/Editor/common/RnD/Utils/gridDropItem.js +56 -7
  178. package/dist/Editor/common/RnD/Utils/index.js +3 -0
  179. package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +117 -0
  180. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +134 -0
  181. package/dist/Editor/common/RnD/VirtualElement/helper.js +281 -0
  182. package/dist/Editor/common/RnD/VirtualElement/index.js +188 -105
  183. package/dist/Editor/common/RnD/VirtualElement/styles.js +123 -7
  184. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +5 -3
  185. package/dist/Editor/common/RnD/index.js +59 -7
  186. package/dist/Editor/common/Section/index.js +7 -4
  187. package/dist/Editor/common/Shorthands/elements.js +74 -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/menusArray.js +9 -6
  207. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +8 -2
  208. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +12 -11
  209. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +6 -2
  210. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +8 -4
  211. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +6 -2
  212. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +21 -12
  213. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  214. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  215. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  216. package/dist/Editor/common/StyleBuilder/index.js +8 -5
  217. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +5 -7
  218. package/dist/Editor/common/Uploader.js +16 -5
  219. package/dist/Editor/commonStyle.js +68 -57
  220. package/dist/Editor/helper/index.js +35 -15
  221. package/dist/Editor/helper/textIndeces.js +58 -0
  222. package/dist/Editor/helper/theme.js +202 -2
  223. package/dist/Editor/hooks/useAutoScroll.js +38 -0
  224. package/dist/Editor/hooks/useDrag.js +16 -10
  225. package/dist/Editor/hooks/useEditorScroll.js +10 -5
  226. package/dist/Editor/hooks/useEditorTheme.js +153 -0
  227. package/dist/Editor/hooks/useMouseMove.js +25 -13
  228. package/dist/Editor/hooks/useTable.js +1 -1
  229. package/dist/Editor/hooks/useThemeValues.js +63 -0
  230. package/dist/Editor/plugins/withEmbeds.js +1 -1
  231. package/dist/Editor/plugins/withHTML.js +10 -7
  232. package/dist/Editor/plugins/withLayout.js +3 -2
  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 +147 -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 +167 -48
  252. package/dist/Editor/utils/draftToSlate.js +3 -2
  253. package/dist/Editor/utils/font.js +40 -37
  254. package/dist/Editor/utils/freegrid.js +2 -2
  255. package/dist/Editor/utils/helper.js +90 -19
  256. package/package.json +2 -2
@@ -32,7 +32,8 @@ const Form = props => {
32
32
  page_id,
33
33
  onFormSubmit = () => {},
34
34
  tagName = "Pages",
35
- isIframe = false
35
+ isIframe = false,
36
+ translation
36
37
  } = customProps;
37
38
  const {
38
39
  buttonProps,
@@ -313,7 +314,7 @@ const Form = props => {
313
314
  textAlign: "left"
314
315
  },
315
316
  children: [/*#__PURE__*/_jsx(Tooltip, {
316
- title: "Form Settings",
317
+ title: translation("Form Settings"),
317
318
  arrow: true,
318
319
  children: /*#__PURE__*/_jsx(IconButton, {
319
320
  onClick: onSettings,
@@ -321,7 +322,7 @@ const Form = props => {
321
322
  children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
322
323
  })
323
324
  }), /*#__PURE__*/_jsx(Tooltip, {
324
- title: "Add Form Field",
325
+ title: translation("Add Form Field"),
325
326
  arrow: true,
326
327
  children: /*#__PURE__*/_jsx(IconButton, {
327
328
  onClick: onAddFormField,
@@ -329,7 +330,7 @@ const Form = props => {
329
330
  children: /*#__PURE__*/_jsx(GridAddSectionIcon, {})
330
331
  })
331
332
  }), /*#__PURE__*/_jsx(Tooltip, {
332
- title: "Delete Form",
333
+ title: translation("Delete Form"),
333
334
  arrow: true,
334
335
  children: /*#__PURE__*/_jsx(IconButton, {
335
336
  onClick: onDelete,
@@ -337,7 +338,7 @@ const Form = props => {
337
338
  children: /*#__PURE__*/_jsx(DeleteIcon, {})
338
339
  })
339
340
  }), /*#__PURE__*/_jsx(Tooltip, {
340
- title: "Workflow",
341
+ title: translation("Workflow"),
341
342
  arrow: true,
342
343
  children: /*#__PURE__*/_jsx(IconButton, {
343
344
  className: "svg-big-btn",
@@ -521,12 +522,14 @@ const Form = props => {
521
522
  element: element,
522
523
  onSave: onSave,
523
524
  onClose: onClose,
524
- customProps: customProps
525
+ customProps: customProps,
526
+ translation: translation
525
527
  }) : null, /*#__PURE__*/_jsx(Workflow, {
526
528
  openWorkflow: openWorkflow,
527
529
  element: element,
528
530
  closeWorkflow: closeWorkflow,
529
- onSave: onSave
531
+ onSave: onSave,
532
+ customProps: customProps
530
533
  }), !readOnly && !isIframe ? /*#__PURE__*/_jsxs(Menu, {
531
534
  className: "editor-btn-options",
532
535
  open: anchorEl !== null,
@@ -536,7 +539,7 @@ const Form = props => {
536
539
  children: [/*#__PURE__*/_jsx(MenuItem, {
537
540
  onClick: onMenuClick("edit"),
538
541
  children: /*#__PURE__*/_jsx(Tooltip, {
539
- title: "Button Settings",
542
+ title: translation("Button Settings"),
540
543
  arrow: true,
541
544
  children: /*#__PURE__*/_jsx(IconButton, {
542
545
  children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
@@ -545,7 +548,7 @@ const Form = props => {
545
548
  }), /*#__PURE__*/_jsx(MenuItem, {
546
549
  onClick: onMenuClick("test"),
547
550
  children: /*#__PURE__*/_jsx(Tooltip, {
548
- title: "Test Submit",
551
+ title: translation("Test Submit"),
549
552
  arrow: true,
550
553
  children: /*#__PURE__*/_jsx(IconButton, {
551
554
  children: /*#__PURE__*/_jsx(BackupIcon, {})
@@ -5,14 +5,18 @@ import ToolbarIcon from "../../common/ToolbarIcon";
5
5
  import Icon from "../../common/Icon";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  const FormButton = ({
8
- icoBtnType
8
+ icoBtnType,
9
+ customProps
9
10
  }) => {
11
+ const {
12
+ translation
13
+ } = customProps;
10
14
  const editor = useSlateStatic();
11
15
  const onClick = () => {
12
16
  insertForm(editor);
13
17
  };
14
18
  return /*#__PURE__*/_jsx(ToolbarIcon, {
15
- title: "Form",
19
+ title: translation("Form"),
16
20
  onClick: onClick,
17
21
  icon: /*#__PURE__*/_jsx(Icon, {
18
22
  icon: "form"
@@ -8,11 +8,12 @@ const FormPopup = props => {
8
8
  element,
9
9
  onSave,
10
10
  onClose,
11
- customProps
11
+ customProps,
12
+ translation
12
13
  } = props;
13
14
  return /*#__PURE__*/_jsx(_Fragment, {
14
15
  children: /*#__PURE__*/_jsx(StyleBuilder, {
15
- title: "Form",
16
+ title: translation("Form"),
16
17
  type: "formStyle",
17
18
  element: element,
18
19
  onSave: onSave,
@@ -21,8 +21,12 @@ const FormWorkflow = props => {
21
21
  setBodyData,
22
22
  handleSelectedVariables,
23
23
  handleInputReset,
24
- classes
24
+ classes,
25
+ customProps
25
26
  } = props;
27
+ const {
28
+ translation
29
+ } = customProps;
26
30
  const [anchorEl, setAnchorEl] = useState(null);
27
31
  const variables = element?.children;
28
32
  const type = 1;
@@ -57,10 +61,10 @@ const FormWorkflow = props => {
57
61
  xs: 12,
58
62
  children: [/*#__PURE__*/_jsx(Typography, {
59
63
  sx: classes.subHeadings,
60
- children: "Set Timings *"
64
+ children: translation("setTimingText")
61
65
  }), /*#__PURE__*/_jsx(Typography, {
62
66
  sx: classes.infoText,
63
- children: "Invitees will receive reminder emails at specified times before scheduled events"
67
+ children: translation("setTimingHelperText")
64
68
  })]
65
69
  }), /*#__PURE__*/_jsx(Grid, {
66
70
  item: true,
@@ -77,7 +81,7 @@ const FormWorkflow = props => {
77
81
  defaultValue: 1,
78
82
  children: [/*#__PURE__*/_jsx(FormControlLabel, {
79
83
  value: "immediately",
80
- label: "Immediately",
84
+ label: translation("Immediately"),
81
85
  onChange: () => {
82
86
  setSchedule("immediately");
83
87
  },
@@ -86,7 +90,7 @@ const FormWorkflow = props => {
86
90
  })
87
91
  }), /*#__PURE__*/_jsx(FormControlLabel, {
88
92
  value: "after",
89
- label: "After",
93
+ label: translation("After"),
90
94
  onChange: () => {
91
95
  setSchedule("after");
92
96
  },
@@ -133,15 +137,15 @@ const FormWorkflow = props => {
133
137
  children: [/*#__PURE__*/_jsx(MenuItem, {
134
138
  sx: classes.selectList,
135
139
  value: "minutes",
136
- children: "Minutes"
140
+ children: translation("Minutes")
137
141
  }), /*#__PURE__*/_jsx(MenuItem, {
138
142
  sx: classes.selectList,
139
143
  value: "hours",
140
- children: "Hours"
144
+ children: translation("Hours")
141
145
  }), /*#__PURE__*/_jsx(MenuItem, {
142
146
  sx: classes.selectList,
143
147
  value: "days",
144
- children: "Day"
148
+ children: translation("Day")
145
149
  })]
146
150
  })
147
151
  })
@@ -154,7 +158,7 @@ const FormWorkflow = props => {
154
158
  xs: 12,
155
159
  children: [/*#__PURE__*/_jsx(Typography, {
156
160
  sx: classes.formHeadings,
157
- children: "Subject *"
161
+ children: translation("subjectText")
158
162
  }), /*#__PURE__*/_jsx(TextField, {
159
163
  multiline: true,
160
164
  margin: "none",
@@ -189,7 +193,7 @@ const FormWorkflow = props => {
189
193
  sx: classes.variableBtn,
190
194
  onClick: handleVariables,
191
195
  endIcon: /*#__PURE__*/_jsx(KeyboardArrowDownIcon, {}),
192
- children: "Variables"
196
+ children: translation("Variables")
193
197
  }), /*#__PURE__*/_jsx(Menu, {
194
198
  id: "basic-menu",
195
199
  open: Boolean(anchorEl),
@@ -219,7 +223,7 @@ const FormWorkflow = props => {
219
223
  xs: 12,
220
224
  children: [/*#__PURE__*/_jsx(Typography, {
221
225
  sx: classes.formHeadings,
222
- children: "Body *"
226
+ children: translation("bodyText")
223
227
  }), /*#__PURE__*/_jsx(UserInputs, {
224
228
  element: element,
225
229
  type: 2,
@@ -227,7 +231,9 @@ const FormWorkflow = props => {
227
231
  handleField: handleBodyField,
228
232
  onSave: onSaveBodyField,
229
233
  handleSelectedVariables: handleSelectedVariables,
230
- handleInputReset: handleInputReset
234
+ handleInputReset: handleInputReset,
235
+ customProps: customProps,
236
+ translation: translation
231
237
  })]
232
238
  })]
233
239
  });
@@ -2,16 +2,20 @@ import React from "react";
2
2
  import { Grid, Typography } from "@mui/material";
3
3
  import FormStyles from "./Styles";
4
4
  import MoreOptions from "./MoreOptions";
5
- import { jsxs as _jsxs } from "react/jsx-runtime";
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
+ import { jsxs as _jsxs } from "react/jsx-runtime";
7
7
  const ListWorkflow = props => {
8
8
  const {
9
9
  workflow,
10
10
  handleEditFormWorkflow,
11
- handleDeleteFormWorkflow
11
+ handleDeleteFormWorkflow,
12
+ customProps
12
13
  } = props;
13
14
  const classes = FormStyles();
14
15
  const optionsList = ["Edit", "Delete"];
16
+ const {
17
+ translation
18
+ } = customProps;
15
19
  const onMenuClick = (selectedMenu, selectedFlow) => () => {
16
20
  if (selectedMenu === "Edit") {
17
21
  handleEditFormWorkflow(selectedFlow);
@@ -32,12 +36,12 @@ const ListWorkflow = props => {
32
36
  children: [/*#__PURE__*/_jsx(Grid, {
33
37
  item: true,
34
38
  sx: classes.emailIndexCard,
35
- children: /*#__PURE__*/_jsxs(Typography, {
39
+ children: /*#__PURE__*/_jsx(Typography, {
36
40
  sx: {
37
41
  fontSize: "12px",
38
42
  fontWeight: 600
39
43
  },
40
- children: ["Email ", index + 1]
44
+ children: `${translation("Email")} ${index + 1}`
41
45
  })
42
46
  }), /*#__PURE__*/_jsx(Grid, {
43
47
  item: true,
@@ -63,7 +67,7 @@ const ListWorkflow = props => {
63
67
  item: true,
64
68
  children: /*#__PURE__*/_jsx(Typography, {
65
69
  sx: classes.listHeading,
66
- children: "Subject:"
70
+ children: translation("subjectTextColon")
67
71
  })
68
72
  }), /*#__PURE__*/_jsx(Grid, {
69
73
  item: true,
@@ -86,7 +90,7 @@ const ListWorkflow = props => {
86
90
  item: true,
87
91
  children: /*#__PURE__*/_jsx(Typography, {
88
92
  sx: classes.listHeading,
89
- children: "Body:"
93
+ children: translation("bodyTextColon")
90
94
  })
91
95
  }), /*#__PURE__*/_jsx(Grid, {
92
96
  item: true,
@@ -109,7 +113,7 @@ const ListWorkflow = props => {
109
113
  item: true,
110
114
  children: /*#__PURE__*/_jsx(Typography, {
111
115
  sx: classes.listHeading,
112
- children: "Scheduled:"
116
+ children: translation("sheduleText")
113
117
  })
114
118
  }), /*#__PURE__*/_jsx(Grid, {
115
119
  item: true,
@@ -146,7 +150,8 @@ const ListWorkflow = props => {
146
150
  classes: classes,
147
151
  menus: optionsList,
148
152
  selectedFlow: index,
149
- onMenuClick: onMenuClick
153
+ onMenuClick: onMenuClick,
154
+ translation: translation
150
155
  })
151
156
  })]
152
157
  })
@@ -9,7 +9,8 @@ function MoreOptions(props) {
9
9
  classes,
10
10
  menus,
11
11
  onMenuClick,
12
- selectedFlow
12
+ selectedFlow,
13
+ translation
13
14
  } = props;
14
15
 
15
16
  //state
@@ -52,7 +53,7 @@ function MoreOptions(props) {
52
53
  paddingRight: "100px"
53
54
  },
54
55
  onClick: onMenuClick(m, selectedFlow),
55
- children: m
56
+ children: translation(m)
56
57
  }, `menu_${i}_${m}`))
57
58
  })]
58
59
  });
@@ -9,20 +9,20 @@ const FormStyles = theme => ({
9
9
  color: "#94A3B8"
10
10
  },
11
11
  bodyTextArea: {
12
- '& .mini-editor-cls': {
13
- padding: '12px',
14
- '&:focus-visible': {
15
- outline: 'none',
16
- border: 'none'
12
+ "& .mini-editor-cls": {
13
+ padding: "12px",
14
+ "&:focus-visible": {
15
+ outline: "none",
16
+ border: "none"
17
17
  }
18
18
  },
19
19
  "& .editorWorkflow": {
20
- minHeight: '130px',
21
- padding: '12px',
20
+ minHeight: "130px",
21
+ padding: "12px",
22
22
  paddingBottom: 0,
23
- '&:focus-visible': {
24
- outline: 'none',
25
- border: 'none'
23
+ "&:focus-visible": {
24
+ outline: "none",
25
+ border: "none"
26
26
  }
27
27
  }
28
28
  },
@@ -105,7 +105,7 @@ const FormStyles = theme => ({
105
105
  padding: "4px 22px",
106
106
  textTransform: "none",
107
107
  border: "1px solid #D8DDE1",
108
- minWidth: '126px',
108
+ minWidth: "126px",
109
109
  "& svg": {
110
110
  "& path": {
111
111
  stroke: "#64748B"
@@ -169,17 +169,19 @@ const FormStyles = theme => ({
169
169
  }
170
170
  },
171
171
  colorButtonSingle: {
172
+ border: "1.5px solid #DCE4EC !important",
172
173
  "&.active": {
173
- "&:before": {
174
- content: '" "',
175
- position: "absolute",
176
- top: "-5px",
177
- left: "-5px",
178
- width: "calc(100% + 4px)",
179
- height: "calc(100% + 4px)",
180
- border: "3px solid blue",
181
- borderRadius: "50%"
182
- }
174
+ // "&:before": {
175
+ // content: '" "',
176
+ // position: "absolute",
177
+ // top: "-5px",
178
+ // left: "-5px",
179
+ // width: "calc(100% + 4px)",
180
+ // height: "calc(100% + 4px)",
181
+ // border: "3px solid blue",
182
+ // borderRadius: "50%",
183
+ // },
184
+ outline: "2px solid #2563EB"
183
185
  }
184
186
  },
185
187
  colorButtonsInner: {
@@ -249,7 +251,7 @@ const FormStyles = theme => ({
249
251
  }
250
252
  },
251
253
  root: {
252
- padding: '10px'
254
+ padding: "10px"
253
255
  }
254
256
  });
255
257
  export default FormStyles;
@@ -10,7 +10,8 @@ const UserInputs = props => {
10
10
  type,
11
11
  subject,
12
12
  handleField,
13
- onSave
13
+ onSave,
14
+ translation
14
15
  } = props;
15
16
  const editorRef = useRef();
16
17
  const variables = element?.children;
@@ -39,7 +40,8 @@ const UserInputs = props => {
39
40
  fontStyleOptions: ['underline'],
40
41
  hideLink: true,
41
42
  hideTextColor: true
42
- }
43
+ },
44
+ translation: translation
43
45
  })
44
46
  })
45
47
  });
@@ -17,8 +17,12 @@ const Workflow = props => {
17
17
  element: propElement,
18
18
  closeWorkflow,
19
19
  onSave,
20
- customWorkflowElement = null
20
+ customWorkflowElement = null,
21
+ customProps
21
22
  } = props;
23
+ const {
24
+ translation
25
+ } = customProps;
22
26
  // replacing element for forms in DND
23
27
  const element = customWorkflowElement ? customWorkflowElement : propElement;
24
28
  const {
@@ -34,11 +38,11 @@ const Workflow = props => {
34
38
  const [scheduleEvery, setScheduleEvery] = useState("minutes");
35
39
  const currentInstant = scheduleEvery === "minutes" ? minutes : scheduleEvery === "hours" ? hours : scheduleEvery === "days" ? days : [];
36
40
  const [scheduleOn, setScheduleOn] = useState(currentInstant[0]);
37
- const [subject, setSubject] = useState("Welcome to Flozy!");
41
+ const [subject, setSubject] = useState(translation("welcomFlozt"));
38
42
  const [bodyData, setBodyData] = useState([{
39
43
  type: "paragraph",
40
44
  children: [{
41
- text: "Write Something"
45
+ text: translation("writeSometing")
42
46
  }]
43
47
  }]);
44
48
  const [flowEdited, setFlowEdited] = useState({
@@ -150,7 +154,7 @@ const Workflow = props => {
150
154
  children: [formData && /*#__PURE__*/_jsx(IconButton, {
151
155
  onClick: onFormBack,
152
156
  children: /*#__PURE__*/_jsx(ArrowBackIcon, {})
153
- }), "Follow-Up Email", !formData && workflowList?.length > 0 && /*#__PURE__*/_jsxs(Button, {
157
+ }), translation("flowUpEmail"), !formData && workflowList?.length > 0 && /*#__PURE__*/_jsxs(Button, {
154
158
  variant: "outlined",
155
159
  sx: {
156
160
  textTransform: "none",
@@ -160,13 +164,14 @@ const Workflow = props => {
160
164
  onClick: handleAddFormWorkflow,
161
165
  size: "small",
162
166
  startIcon: /*#__PURE__*/_jsx(PlusIcon, {}),
163
- children: [" ", "New Email"]
167
+ children: [" ", translation("newEmail")]
164
168
  })]
165
169
  }), /*#__PURE__*/_jsxs(DialogContent, {
166
170
  children: [!formData && workflowList?.length > 0 && /*#__PURE__*/_jsx(ListWorkflow, {
167
171
  workflow: workflowList,
168
172
  handleEditFormWorkflow: handleEditFormWorkflow,
169
- handleDeleteFormWorkflow: handleDeleteFormWorkflow
173
+ handleDeleteFormWorkflow: handleDeleteFormWorkflow,
174
+ customProps: customProps
170
175
  }), (formData || workflowList?.length === 0) && /*#__PURE__*/_jsx(FormWorkflow, {
171
176
  subject: subject,
172
177
  schedule: schedule,
@@ -183,7 +188,8 @@ const Workflow = props => {
183
188
  setScheduleOn: setScheduleOn,
184
189
  handleSelectedVariables: handleSelectedVariables,
185
190
  handleInputReset: handleInputReset,
186
- classes: classes
191
+ classes: classes,
192
+ customProps: customProps
187
193
  })]
188
194
  }), /*#__PURE__*/_jsxs(DialogActions, {
189
195
  sx: classes.dialogFooter,
@@ -192,13 +198,13 @@ const Workflow = props => {
192
198
  sx: classes.closeBtn,
193
199
  onClick: closeWorkflow,
194
200
  size: "small",
195
- children: "Close"
201
+ children: translation("Close")
196
202
  }), (formData || workflowList?.length === 0) && /*#__PURE__*/_jsx(Button, {
197
203
  className: "primaryBtn",
198
204
  sx: classes.saveBtn,
199
205
  onClick: saveFormWorkflow,
200
206
  size: "small",
201
- children: "Save"
207
+ children: translation("Save")
202
208
  })]
203
209
  })]
204
210
  });
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { useEffect, useRef, useState } from "react";
2
2
  import { Path, Transforms, Node } from "slate";
3
3
  import { ReactEditor, useSlateStatic } from "slate-react";
4
4
  import { Box, useTheme } from "@mui/material";
@@ -43,12 +43,14 @@ const FreeGrid = props => {
43
43
  } = props;
44
44
  const {
45
45
  sectionName,
46
- sectionBorderRadius
46
+ sectionBorderRadius,
47
+ height_xs
47
48
  } = element;
48
49
  const {
49
50
  readOnly,
50
51
  customSX,
51
- hideTools
52
+ hideTools,
53
+ translation
52
54
  } = customProps;
53
55
  const {
54
56
  updated_at,
@@ -63,11 +65,14 @@ const FreeGrid = props => {
63
65
  const {
64
66
  setSelectedElement
65
67
  } = useEditorContext();
68
+ const [autoAlign, setAutoAlign] = useState(false);
69
+ const count = useRef(2);
70
+ const childrenCountRef = useRef(element?.children?.length);
66
71
  const onChange = data => {
67
72
  const append = breakpoint === "lg" ? "" : `_${breakpoint}`;
68
73
  const updateData = {
69
74
  ...data,
70
- [`height${append}`]: height + data.height
75
+ [`height${append}`]: data.height
71
76
  };
72
77
  if (append !== "") {
73
78
  delete updateData.height;
@@ -129,6 +134,10 @@ const FreeGrid = props => {
129
134
  setSelectedElement
130
135
  });
131
136
  break;
137
+ case "forceAutoAlignment":
138
+ setAutoAlign(true);
139
+ setSelectedElement({});
140
+ break;
132
141
  case "deleteSection":
133
142
  if (Node.has(editor, cur_root_path)) {
134
143
  Transforms.removeNodes(editor, {
@@ -150,9 +159,12 @@ const FreeGrid = props => {
150
159
  console.log(err);
151
160
  }
152
161
  };
162
+ useEffect(() => {
163
+ childrenCountRef.current = element?.children?.length;
164
+ }, [element?.children?.length]);
153
165
  const handleAddElementClick = type => () => {
154
166
  const isEmpty = isEmptySection();
155
- const insertAt = isEmpty ? [...path, 0] : [...path, element?.children?.length];
167
+ const insertAt = isEmpty ? [...path, 0] : [...path, childrenCountRef.current];
156
168
  switch (type) {
157
169
  case "addText":
158
170
  Transforms.insertNodes(editor, [{
@@ -187,20 +199,6 @@ const FreeGrid = props => {
187
199
  linkType: "webAddress"
188
200
  },
189
201
  iconPosition: "start",
190
- bgColor: "#2563EB",
191
- textColor: "#FFF",
192
- borderRadius: {
193
- topLeft: 30,
194
- topRight: 30,
195
- bottomLeft: 30,
196
- bottomRight: 30
197
- },
198
- bannerSpacing: {
199
- left: 12,
200
- top: 12,
201
- right: 12,
202
- bottom: 12
203
- },
204
202
  textAlign: "center",
205
203
  label: "Get Started"
206
204
  }],
@@ -373,6 +371,19 @@ const FreeGrid = props => {
373
371
  break;
374
372
  default:
375
373
  }
374
+ if (breakpoint === "lg") {
375
+ setSelectedElement({});
376
+
377
+ // auto align in mobile
378
+ Transforms.setNodes(editor, {
379
+ xs_updatedOn: null,
380
+ updated_at: new Date().getTime()
381
+ }, {
382
+ at: path
383
+ });
384
+ }
385
+ count.current = count.current + 1;
386
+
376
387
  // focus on newly added element
377
388
  focusOnNewItem(editor, insertAt, {
378
389
  setSelectedElement
@@ -444,6 +455,17 @@ const FreeGrid = props => {
444
455
  }
445
456
  }, theme);
446
457
  const sectionTypeOptions = (itemOptions?.section || []).filter(f => (hideTools || []).indexOf(f) === -1);
458
+
459
+ // const id = useMemo(() => {
460
+ // let eleId = `freegrid_container_${path.join("|")}_${breakpoint}`;
461
+
462
+ // if (autoAlign) {
463
+ // eleId += `_${updated_at}`; // re-render component on force auto align
464
+ // }
465
+
466
+ // return eleId;
467
+ // }, [autoAlign, updated_at, breakpoint, path]);
468
+
447
469
  return /*#__PURE__*/_jsx(RnD, {
448
470
  id: `freegrid_container_${path.join("|")}_${updated_at}_${breakpoint}`,
449
471
  className: `
@@ -457,6 +479,9 @@ const FreeGrid = props => {
457
479
  position: "relative",
458
480
  "--height": `${height}px`
459
481
  },
482
+ dataSets: {
483
+ "data-height-xs": height_xs
484
+ },
460
485
  defaultStyle: {
461
486
  width: "100%",
462
487
  height: height ? `${height}px` : "auto"
@@ -493,7 +518,13 @@ const FreeGrid = props => {
493
518
  title: "Add Element",
494
519
  props: {
495
520
  handleClick: handleAddElementClick,
496
- hideTools: hideTools || []
521
+ hideTools: hideTools || [],
522
+ translation: {
523
+ translation
524
+ },
525
+ customProps: {
526
+ customProps
527
+ }
497
528
  }
498
529
  },
499
530
  more: {
@@ -501,7 +532,14 @@ const FreeGrid = props => {
501
532
  placement: "left",
502
533
  title: "More Options",
503
534
  props: {
504
- handleClick: handleMoreClick
535
+ handleClick: handleMoreClick,
536
+ translation: {
537
+ translation
538
+ },
539
+ customProps: {
540
+ customProps
541
+ },
542
+ breakpoint
505
543
  }
506
544
  },
507
545
  settings: {
@@ -512,7 +550,8 @@ const FreeGrid = props => {
512
550
  editor,
513
551
  path,
514
552
  classes,
515
- customProps
553
+ customProps,
554
+ translation
516
555
  }
517
556
  }
518
557
  },
@@ -520,6 +559,11 @@ const FreeGrid = props => {
520
559
  updated_at: updated_at,
521
560
  breakpoint: breakpoint,
522
561
  handleContextMenuClick: handleContextMenuClick,
562
+ translation: translation,
563
+ customProps: customProps,
564
+ sectionElement: element,
565
+ autoAlign: autoAlign,
566
+ setAutoAlign: setAutoAlign,
523
567
  children: /*#__PURE__*/_jsxs(Box, {
524
568
  ...attributes,
525
569
  id: sectionName,
@@ -540,7 +584,7 @@ const FreeGrid = props => {
540
584
  "--rows": `repeat(${repeatTimes}, ${ROW_HEIGHT}px)`
541
585
  },
542
586
  children: [children, !readOnly ? /*#__PURE__*/_jsx("span", {
543
- placeholder: `Section (${sectionName || "Welcome"})`,
587
+ placeholder: `${translation("Section")} (${sectionName || "Welcome"})`,
544
588
  className: "freegrid-section-infos",
545
589
  contentEditable: false
546
590
  }) : null]