@flozy/editor 10.0.3 → 10.0.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 (179) hide show
  1. package/dist/Editor/ChatEditor.js +14 -7
  2. package/dist/Editor/CommonEditor.js +30 -13
  3. package/dist/Editor/Editor.css +1 -1
  4. package/dist/Editor/Elements/AI/AIInput.js +5 -3
  5. package/dist/Editor/Elements/AI/CustomSelect.js +9 -5
  6. package/dist/Editor/Elements/AI/PopoverAIInput.js +4 -2
  7. package/dist/Editor/Elements/Accordion/Accordion.js +4 -3
  8. package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +4 -1
  9. package/dist/Editor/Elements/Accordion/AccordionButton.js +6 -2
  10. package/dist/Editor/Elements/Accordion/AccordionTitlePopup.js +4 -1
  11. package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +6 -2
  12. package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +4 -1
  13. package/dist/Editor/Elements/Attachments/AttachmentsButton.js +4 -1
  14. package/dist/Editor/Elements/Button/ButtonPopup.js +4 -1
  15. package/dist/Editor/Elements/Button/ButtonToolIcon.js +6 -2
  16. package/dist/Editor/Elements/Button/EditorButton.js +6 -5
  17. package/dist/Editor/Elements/Carousel/Carousel.js +5 -4
  18. package/dist/Editor/Elements/Carousel/CarouselButton.js +6 -2
  19. package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -2
  20. package/dist/Editor/Elements/ChipText/ChipTextPopup.js +4 -1
  21. package/dist/Editor/Elements/CodeToText/CodeToText.js +5 -4
  22. package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +6 -2
  23. package/dist/Editor/Elements/Colorbox/ColorboxButton.js +6 -2
  24. package/dist/Editor/Elements/DataView/DataView.js +5 -2
  25. package/dist/Editor/Elements/DataView/DataViewButton.js +6 -2
  26. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +13 -12
  27. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +7 -4
  28. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +7 -5
  29. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +9 -7
  30. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +3 -2
  31. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +5 -3
  32. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +6 -5
  33. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +5 -3
  34. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +7 -6
  35. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +15 -12
  36. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +3 -2
  37. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +3 -2
  38. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +12 -6
  39. package/dist/Editor/Elements/DataView/Layouts/TableView.js +6 -4
  40. package/dist/Editor/Elements/DataView/Layouts/index.js +3 -1
  41. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +5 -2
  42. package/dist/Editor/Elements/Divider/Divider.js +5 -3
  43. package/dist/Editor/Elements/Divider/DividerButton.js +6 -2
  44. package/dist/Editor/Elements/Divider/DividerPopup.js +3 -2
  45. package/dist/Editor/Elements/Embed/Embed.js +4 -1
  46. package/dist/Editor/Elements/Embed/EmbedPopup.js +4 -1
  47. package/dist/Editor/Elements/Embed/Image.js +16 -11
  48. package/dist/Editor/Elements/Embed/Video.js +10 -7
  49. package/dist/Editor/Elements/EmbedScript/Code.js +7 -4
  50. package/dist/Editor/Elements/EmbedScript/EmbedScript.js +6 -2
  51. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +8 -5
  52. package/dist/Editor/Elements/Emoji/EmojiButton.js +6 -2
  53. package/dist/Editor/Elements/Form/FieldPopup.js +4 -1
  54. package/dist/Editor/Elements/Form/Form.js +12 -9
  55. package/dist/Editor/Elements/Form/FormButton.js +6 -2
  56. package/dist/Editor/Elements/Form/FormPopup.js +3 -2
  57. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +18 -12
  58. package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +13 -8
  59. package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +3 -2
  60. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +4 -2
  61. package/dist/Editor/Elements/Form/Workflow/index.js +15 -9
  62. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +168 -97
  63. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +31 -6
  64. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +6 -2
  65. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +54 -6
  66. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +3 -2
  67. package/dist/Editor/Elements/FreeGrid/Options/More.js +10 -4
  68. package/dist/Editor/Elements/Grid/Grid.js +13 -10
  69. package/dist/Editor/Elements/Grid/GridButton.js +9 -5
  70. package/dist/Editor/Elements/Grid/GridItem.js +13 -7
  71. package/dist/Editor/Elements/Grid/GridItemPopup.js +4 -1
  72. package/dist/Editor/Elements/Grid/GridPopup.js +4 -1
  73. package/dist/Editor/Elements/Grid/SectionPopup.js +4 -1
  74. package/dist/Editor/Elements/Link/Link.js +8 -5
  75. package/dist/Editor/Elements/Link/LinkButton.js +4 -1
  76. package/dist/Editor/Elements/List/CheckList.js +14 -9
  77. package/dist/Editor/Elements/NewLine/NewLineButton.js +6 -2
  78. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +4 -1
  79. package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +4 -1
  80. package/dist/Editor/Elements/Search/SearchButton.js +6 -3
  81. package/dist/Editor/Elements/Search/SearchList.js +7 -3
  82. package/dist/Editor/Elements/Signature/SignatureButton.js +6 -2
  83. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +6 -2
  84. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +4 -1
  85. package/dist/Editor/Elements/Signature/SignaturePopup.js +17 -16
  86. package/dist/Editor/Elements/SimpleText/index.js +5 -4
  87. package/dist/Editor/Elements/Table/DragButton.js +4 -2
  88. package/dist/Editor/Elements/Table/Table.js +21 -9
  89. package/dist/Editor/Elements/Table/TablePopup.js +4 -1
  90. package/dist/Editor/Elements/Table/TableSelector.js +10 -6
  91. package/dist/Editor/Elements/Table/TableTool.js +8 -4
  92. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +4 -1
  93. package/dist/Editor/MiniEditor.js +9 -3
  94. package/dist/Editor/Toolbar/Basic/index.js +2 -1
  95. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +6 -2
  96. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +6 -2
  97. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +17 -5
  98. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +10 -5
  99. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +10 -4
  100. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +10 -4
  101. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +6 -2
  102. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +42 -35
  103. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +58 -51
  104. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +29 -22
  105. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +87 -73
  106. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +14 -7
  107. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +8 -4
  108. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +11 -5
  109. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +32 -27
  110. package/dist/Editor/Toolbar/PopupTool/index.js +17 -1
  111. package/dist/Editor/Toolbar/Toolbar.js +20 -10
  112. package/dist/Editor/common/CustomDialog/index.js +8 -10
  113. package/dist/Editor/common/ImageSelector/ImageSelector.js +10 -8
  114. package/dist/Editor/common/ImageSelector/Options/AddLink.js +6 -4
  115. package/dist/Editor/common/LinkSettings/NavComponents.js +14 -10
  116. package/dist/Editor/common/LinkSettings/index.js +20 -14
  117. package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
  118. package/dist/Editor/common/MentionsPopup/index.js +6 -2
  119. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +46 -22
  120. package/dist/Editor/common/RnD/ContextMenu/index.js +3 -2
  121. package/dist/Editor/common/RnD/ElementOptions/index.js +7 -2
  122. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +8 -3
  123. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +5 -2
  124. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +3 -2
  125. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +4 -2
  126. package/dist/Editor/common/RnD/OptionsPopup/index.js +4 -3
  127. package/dist/Editor/common/RnD/ShadowElement.js +2 -1
  128. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +4 -3
  129. package/dist/Editor/common/RnD/Utils/gridDropItem.js +74 -9
  130. package/dist/Editor/common/RnD/Utils/index.js +3 -0
  131. package/dist/Editor/common/RnD/VirtualElement/BoxHeaderAutoAlignment.js +43 -0
  132. package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +44 -0
  133. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +134 -0
  134. package/dist/Editor/common/RnD/VirtualElement/helper.js +382 -0
  135. package/dist/Editor/common/RnD/VirtualElement/index.js +187 -103
  136. package/dist/Editor/common/RnD/VirtualElement/styles.js +157 -7
  137. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +5 -3
  138. package/dist/Editor/common/RnD/index.js +76 -8
  139. package/dist/Editor/common/Section/index.js +7 -4
  140. package/dist/Editor/common/Shorthands/elements.js +18 -3
  141. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
  142. package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
  143. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -2
  144. package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
  145. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
  146. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
  147. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +13 -9
  148. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +6 -3
  149. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +7 -3
  150. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -3
  151. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +6 -3
  152. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +11 -5
  153. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +9 -5
  154. package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +10 -6
  155. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +6 -2
  156. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +6 -2
  157. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +5 -2
  158. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +9 -6
  159. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +8 -2
  160. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +12 -11
  161. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +6 -2
  162. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +8 -4
  163. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +6 -2
  164. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +6 -5
  165. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  166. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  167. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  168. package/dist/Editor/common/StyleBuilder/index.js +8 -5
  169. package/dist/Editor/common/Uploader.js +8 -5
  170. package/dist/Editor/helper/index.js +27 -3
  171. package/dist/Editor/hooks/useAutoScroll.js +38 -0
  172. package/dist/Editor/plugins/withHTML.js +7 -6
  173. package/dist/Editor/plugins/withLayout.js +3 -2
  174. package/dist/Editor/plugins/withLinks.js +9 -0
  175. package/dist/Editor/utils/SlateUtilityFunctions.js +20 -11
  176. package/dist/Editor/utils/brains.js +1 -2
  177. package/dist/Editor/utils/freegrid.js +3 -4
  178. package/dist/Editor/utils/helper.js +2 -2
  179. package/package.json +1 -1
@@ -33,7 +33,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
33
33
  isMobile = false,
34
34
  debounceTimeOut = 10,
35
35
  isMarkDown = false,
36
- markDownContent = ''
36
+ markDownContent = '',
37
+ translation
37
38
  } = props;
38
39
  const classes = usePopupStyle(theme);
39
40
  const convertedContent = draftToSlate({
@@ -147,7 +148,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
147
148
  };
148
149
  const {
149
150
  CHARACTERS = [],
150
- hideTools
151
+ hideTools,
152
+ translationMock
151
153
  // needLayout = true,
152
154
  } = otherProps || {};
153
155
  const mentionsRef = useRef();
@@ -156,7 +158,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
156
158
  hideTools: ["settings", "add_column", "drag", "resize"],
157
159
  readOnly: isReadOnly,
158
160
  editorPlaceholder: "Write Something",
159
- page_id: 1
161
+ page_id: 1,
162
+ translation: translation || translationMock
160
163
  };
161
164
  const [mentions, setMentions] = useMentions({
162
165
  editor,
@@ -176,7 +179,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
176
179
  const chars = type ? Shorthands[type]({
177
180
  ...mentions,
178
181
  CHARACTERS,
179
- hideTools: hideTools
182
+ hideTools: hideTools,
183
+ translation: translation || translationMock
180
184
  }) : [];
181
185
  const Leaf = ({
182
186
  attributes,
@@ -307,7 +311,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
307
311
  children: [toolBar && /*#__PURE__*/_jsx(MiniTextFormat, {
308
312
  classes: classes,
309
313
  editor: editor,
310
- closeMainPopup: handleClose
314
+ closeMainPopup: handleClose,
315
+ customProps: customProps
311
316
  }), /*#__PURE__*/_jsx(Editable, {
312
317
  onFocus: handleFocus,
313
318
  className: "chatEditorRoot",
@@ -318,7 +323,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
318
323
  spellCheck: true,
319
324
  onBlur: handleBlur,
320
325
  onKeyDown: onKeyDown,
321
- onPaste: handlePaste
326
+ onPaste: handlePaste,
327
+ customProps: customProps
322
328
  }), !readOnly && isFocused ? /*#__PURE__*/_jsx(MentionsPopup, {
323
329
  ref: mentionsRef,
324
330
  mentions: mentions,
@@ -328,7 +334,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
328
334
  index: index,
329
335
  chars: chars,
330
336
  type: type,
331
- theme: theme
337
+ theme: theme,
338
+ customProps: customProps
332
339
  }) : null]
333
340
  }, id)
334
341
  }) : /*#__PURE__*/_jsx("div", {
@@ -15,7 +15,7 @@ import withCommon from "./hooks/withCommon";
15
15
  import DialogWrapper from "./DialogWrapper";
16
16
  import { serializeToText } from "./utils/serializeToText";
17
17
  import { getPageSettings } from "./utils/pageSettings";
18
- import { getThumbnailImage, invertColor } from "./helper";
18
+ import { getThumbnailImage, invertColor, pageTextStyle } from "./helper";
19
19
  import PopupTool from "./Toolbar/PopupTool";
20
20
  import { Box, Typography, useTheme } from "@mui/material";
21
21
  import Shorthands from "./common/Shorthands";
@@ -95,7 +95,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
95
95
  isIframe,
96
96
  theme,
97
97
  showViewport = false,
98
- overrideWrapperStyles = {}
98
+ overrideWrapperStyles = {},
99
+ translation
99
100
  } = props;
100
101
  const editorWrapper = useRef();
101
102
  const mentionsRef = useRef();
@@ -125,12 +126,15 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
125
126
  editorClass,
126
127
  fixedWidth = "60%",
127
128
  fullWidth = "80%",
128
- hideTools = []
129
+ hideTools = [],
130
+ translationMock
129
131
  } = otherProps || {};
132
+ const translationFn = translation || translationMock || (() => {});
130
133
  const editor = useMemo(() => {
131
134
  if (collaborativeEditor) return collaborativeEditor;
132
135
  const editor = createEditor();
133
136
  editor.needLayout = needLayout;
137
+ editor.translation = translationFn;
134
138
  return withCommon(editor, {
135
139
  needLayout
136
140
  });
@@ -220,7 +224,9 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
220
224
 
221
225
  const onSwitchBreakpoint = b => {
222
226
  setBreakpoint(b);
223
- reRenderAllNodes();
227
+ setTimeout(() => {
228
+ reRenderAllNodes();
229
+ }, 0);
224
230
  };
225
231
  useImperativeHandle(ref, () => ({
226
232
  async getThumbnail(needBackground = false, options = {}) {
@@ -324,6 +330,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
324
330
  ...mentions,
325
331
  CHARACTERS,
326
332
  hideTools: updatedHideTools || [],
333
+ translation: translation || translationFn,
327
334
  editor
328
335
  }) : [];
329
336
  const handleEditorChange = newValue => {
@@ -349,6 +356,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
349
356
  isIframe: isIframe,
350
357
  onDrawerOpen: onDrawerOpen,
351
358
  ICON_API: "https://assets.agenciflow.com",
359
+ translation: translationFn,
352
360
  getTitleSaveData
353
361
  };
354
362
  const lineH = getBreakpointLineSpacing(lineHeight, breakpoint);
@@ -484,9 +492,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
484
492
  window.open("https://www.flozy.com", "_blank");
485
493
  };
486
494
  const editorWrapperStyle = useMemo(() => {
487
- const style = {
488
- color: pageTextColor || ""
489
- };
495
+ const style = {};
490
496
  if (pageBgImage && pageBgImage !== "none") {
491
497
  style.backgroundImage = `url(${pageBgImage})`;
492
498
  style.backgroundSize = `cover`;
@@ -504,6 +510,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
504
510
  // }
505
511
  // };
506
512
 
513
+ const gradientColor = pageTextStyle(pageTextColor);
507
514
  const handleCursorScroll = container => {
508
515
  try {
509
516
  if (!customProps?.isMobile) {
@@ -551,7 +558,12 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
551
558
  children: /*#__PURE__*/_jsxs(Overlay, {
552
559
  children: [/*#__PURE__*/_jsx(Box, {
553
560
  className: `pc-${editorClass || ""} ${hasTopBanner() ? "has-topbanner" : ""} ${!pageColor ? "no-color" : ""} scrollable-content scrollSmooth ${readOnly ? "readOnlyContainer" : ""}`,
554
- sx: classes.slateWrapper,
561
+ sx: {
562
+ ...classes.slateWrapper,
563
+ '& span[data-slate-string="true"]': {
564
+ ...gradientColor
565
+ }
566
+ },
555
567
  id: "slate-wrapper-scroll-container",
556
568
  ref: editorWrapper,
557
569
  onClick: e => {
@@ -606,7 +618,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
606
618
  chars: chars,
607
619
  type: type,
608
620
  theme: theme,
609
- otherProps: customProps
621
+ otherProps: customProps,
622
+ customProps: customProps
610
623
  }) : null, /*#__PURE__*/_jsx(RnDCopy, {
611
624
  readOnly: readOnly
612
625
  })]
@@ -616,7 +629,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
616
629
  theme: theme
617
630
  }) : null, /*#__PURE__*/_jsx(PopoverAIInput, {
618
631
  otherProps: otherProps || {},
619
- editorWrapper: editorWrapper
632
+ editorWrapper: editorWrapper,
633
+ translation: translationFn
620
634
  }), footer && (fullScreen || readOnly) && /*#__PURE__*/_jsx(Typography, {
621
635
  sx: {
622
636
  color: "rgb(100, 116, 139)",
@@ -638,12 +652,14 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
638
652
  editorWrapper: editorWrapper
639
653
  }) : null, !readOnly && showViewport ? /*#__PURE__*/_jsx(SwitchViewport, {
640
654
  breakpoint: breakpoint,
641
- onChange: b => onSwitchBreakpoint(b)
655
+ onChange: b => onSwitchBreakpoint(b),
656
+ translation: translationFn
642
657
  }) : null]
643
658
  })
644
659
  }), htmlAction.showInput && /*#__PURE__*/_jsx(CodeToText, {
645
660
  ...htmlAction,
646
- handleCodeToText: handleCodeToText
661
+ handleCodeToText: handleCodeToText,
662
+ translation: translationFn
647
663
  })]
648
664
  }, id), /*#__PURE__*/_jsx(FontLoader, {
649
665
  otherProps: {
@@ -659,7 +675,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
659
675
  cancelText: "Cancel",
660
676
  onConfirm: () => {
661
677
  handleDeleteAll();
662
- }
678
+ },
679
+ translation: translationFn
663
680
  })]
664
681
  });
665
682
  });
@@ -62,7 +62,7 @@ blockquote {
62
62
  height: fit-content;
63
63
  max-width: 100%;
64
64
  border: none !important;
65
- z-index: 1;
65
+ /* z-index: 1; */
66
66
  }
67
67
 
68
68
  .editor-wrapper table {
@@ -43,7 +43,8 @@ function AIInput({
43
43
  onClickOutside,
44
44
  startRecording,
45
45
  loading,
46
- isMobile
46
+ isMobile,
47
+ translation
47
48
  }, ref) {
48
49
  const {
49
50
  theme
@@ -115,7 +116,7 @@ function AIInput({
115
116
  children: /*#__PURE__*/_jsx(WaveLoading, {})
116
117
  }) : /*#__PURE__*/_jsx(TextareaAutosize, {
117
118
  className: "ai-input",
118
- placeholder: "Ask AI to write anything...",
119
+ placeholder: translation("askAItoWrite"),
119
120
  ref: inputRef,
120
121
  value: inputValue,
121
122
  onChange: onInputChange,
@@ -150,7 +151,8 @@ function AIInput({
150
151
  children: /*#__PURE__*/_jsx(CustomSelect, {
151
152
  ...props,
152
153
  onSend: onSend,
153
- classes: classes
154
+ classes: classes,
155
+ translation: translation
154
156
  })
155
157
  })]
156
158
  });
@@ -9,7 +9,8 @@ function CustomSelect({
9
9
  options,
10
10
  onSend,
11
11
  show,
12
- btnProps = {}
12
+ btnProps = {},
13
+ translation
13
14
  }) {
14
15
  if (show) {
15
16
  return /*#__PURE__*/_jsx(Box, {
@@ -31,7 +32,8 @@ function CustomSelect({
31
32
  option: option,
32
33
  classes: classes,
33
34
  onSend: onSend,
34
- btnProps: btnProps
35
+ btnProps: btnProps,
36
+ translation: translation
35
37
  }, i);
36
38
  })]
37
39
  }, index);
@@ -46,7 +48,8 @@ function DisplayOption({
46
48
  option,
47
49
  classes,
48
50
  onSend,
49
- btnProps = {}
51
+ btnProps = {},
52
+ translation
50
53
  }) {
51
54
  const {
52
55
  Icon,
@@ -85,7 +88,7 @@ function DisplayOption({
85
88
  children: [/*#__PURE__*/_jsxs("div", {
86
89
  className: "option-label",
87
90
  id: "infinity-select-popover",
88
- children: [Icon && /*#__PURE__*/_jsx(Icon, {}), option.label]
91
+ children: [Icon && /*#__PURE__*/_jsx(Icon, {}), translation(option.label)]
89
92
  }), showChild ? /*#__PURE__*/_jsx(IconButton, {
90
93
  children: /*#__PURE__*/_jsx(FaChevronRight, {
91
94
  color: "#94A3B8",
@@ -108,7 +111,8 @@ function DisplayOption({
108
111
  options: option.options,
109
112
  onSend: onSend,
110
113
  classes: classes,
111
- show: open
114
+ show: open,
115
+ translation: translation
112
116
  })
113
117
  })
114
118
  })]
@@ -151,7 +151,8 @@ function PopoverAIInput({
151
151
  otherProps,
152
152
  editorWrapper = {
153
153
  current: null
154
- }
154
+ },
155
+ translation
155
156
  }) {
156
157
  const {
157
158
  services
@@ -320,7 +321,8 @@ function PopoverAIInput({
320
321
  inputValue: inputValue,
321
322
  onInputChange: onInputChange,
322
323
  onClickOutside: onClickOutside,
323
- isMobile: otherProps?.isMobile
324
+ isMobile: otherProps?.isMobile,
325
+ translation: translation
324
326
  })
325
327
  })
326
328
  })
@@ -67,7 +67,8 @@ const Accordion = props => {
67
67
  customProps
68
68
  } = props;
69
69
  const {
70
- readOnly
70
+ readOnly,
71
+ translation
71
72
  } = customProps;
72
73
  const [toggle, setToggle] = useState(false);
73
74
  const [openSetttings, setOpenSettings] = useState(false);
@@ -97,7 +98,7 @@ const Accordion = props => {
97
98
  width: "fit-content"
98
99
  },
99
100
  children: [/*#__PURE__*/_jsx(Tooltip, {
100
- title: "Settings",
101
+ title: translation("accordianSettings"),
101
102
  arrow: true,
102
103
  children: /*#__PURE__*/_jsx(IconButton, {
103
104
  size: "small",
@@ -106,7 +107,7 @@ const Accordion = props => {
106
107
  children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
107
108
  })
108
109
  }), /*#__PURE__*/_jsx(Tooltip, {
109
- title: "Delete",
110
+ title: translation("Delete"),
110
111
  arrow: true,
111
112
  children: /*#__PURE__*/_jsx(IconButton, {
112
113
  size: "small",
@@ -10,8 +10,11 @@ const AccordionBtnPopup = props => {
10
10
  onClose,
11
11
  customProps
12
12
  } = props;
13
+ const {
14
+ translation
15
+ } = customProps;
13
16
  return /*#__PURE__*/_jsx(StyleBuilder, {
14
- title: "Accordion Settings",
17
+ title: translation("Accordion Settings"),
15
18
  type: "accordionTitleBtnStyle",
16
19
  element: element,
17
20
  onSave: onSave,
@@ -6,8 +6,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const AccordionButton = props => {
7
7
  const {
8
8
  editor,
9
- icoBtnType
9
+ icoBtnType,
10
+ customProps
10
11
  } = props;
12
+ const {
13
+ translation
14
+ } = customProps;
11
15
  const handleInsertAccordion = () => {
12
16
  insertAccordion(editor);
13
17
  };
@@ -15,7 +19,7 @@ const AccordionButton = props => {
15
19
  icon: /*#__PURE__*/_jsx(Icon, {
16
20
  icon: "accordion"
17
21
  }),
18
- title: "Accordion",
22
+ title: translation("Accordion"),
19
23
  onClick: handleInsertAccordion,
20
24
  style: {
21
25
  marginLeft: "0px"
@@ -9,8 +9,11 @@ const AccordionTitlePopup = props => {
9
9
  onClose,
10
10
  customProps
11
11
  } = props;
12
+ const {
13
+ translation
14
+ } = customProps;
12
15
  return /*#__PURE__*/_jsx(StyleBuilder, {
13
- title: "Accordion Title",
16
+ title: translation("Accordion Title"),
14
17
  type: "accordionTitleStyle",
15
18
  element: element,
16
19
  onSave: onSave,
@@ -7,14 +7,18 @@ import { jsx as _jsx } from "react/jsx-runtime";
7
7
  const AppHeaderButton = props => {
8
8
  const {
9
9
  editor,
10
- icoBtnType
10
+ icoBtnType,
11
+ customProps
11
12
  } = props;
13
+ const {
14
+ translation
15
+ } = customProps;
12
16
  const handleClick = () => {
13
17
  insertAppHeader(editor, {});
14
18
  insertNewLine(editor);
15
19
  };
16
20
  return /*#__PURE__*/_jsx(ToolbarIcon, {
17
- title: "App Header",
21
+ title: translation("appHeaderButton"),
18
22
  onClick: handleClick,
19
23
  icon: /*#__PURE__*/_jsx(Icon, {
20
24
  icon: "appHeader"
@@ -10,8 +10,11 @@ const AppHeaderPopup = props => {
10
10
  onDelete,
11
11
  customProps
12
12
  } = props;
13
+ const {
14
+ translation
15
+ } = customProps;
13
16
  return /*#__PURE__*/_jsx(StyleBuilder, {
14
- title: "App Header",
17
+ title: translation("appHeaderButton"),
15
18
  type: "gridItemStyle",
16
19
  element: element,
17
20
  onSave: onSave,
@@ -14,6 +14,9 @@ const AttachmentsButton = props => {
14
14
  icoBtnType
15
15
  } = props;
16
16
  const [open, SetOpen] = useState(false);
17
+ const {
18
+ translation
19
+ } = customProps;
17
20
  const handleClick = () => {
18
21
  SetOpen(true);
19
22
  };
@@ -28,7 +31,7 @@ const AttachmentsButton = props => {
28
31
  };
29
32
  return /*#__PURE__*/_jsxs(_Fragment, {
30
33
  children: [/*#__PURE__*/_jsx(ToolbarIcon, {
31
- title: "Doc Upload",
34
+ title: translation("Doc Upload"),
32
35
  onClick: handleClick,
33
36
  icon: /*#__PURE__*/_jsx(Icon, {
34
37
  icon: "docsUpload"
@@ -12,8 +12,11 @@ const ButtonPopup = props => {
12
12
  styleName,
13
13
  onDelete
14
14
  } = props;
15
+ const {
16
+ translation
17
+ } = customProps;
15
18
  return /*#__PURE__*/_jsx(StyleBuilder, {
16
- title: "Button",
19
+ title: translation("Button"),
17
20
  type: styleName ? "" : "buttonStyle",
18
21
  element: element,
19
22
  onSave: onSave,
@@ -6,13 +6,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const ButtonToolIcon = props => {
7
7
  const {
8
8
  editor,
9
- icoBtnType
9
+ icoBtnType,
10
+ customProps
10
11
  } = props;
12
+ const {
13
+ translation
14
+ } = customProps;
11
15
  const handleInsertButton = () => {
12
16
  insertButton(editor);
13
17
  };
14
18
  return /*#__PURE__*/_jsx(ToolbarIcon, {
15
- title: "Button",
19
+ title: translation("Button"),
16
20
  onClick: handleInsertButton,
17
21
  icon: /*#__PURE__*/_jsx(Icon, {
18
22
  icon: "button"
@@ -30,7 +30,8 @@ const EditorButton = props => {
30
30
  const {
31
31
  readOnly,
32
32
  metadata,
33
- isMobile
33
+ isMobile,
34
+ translation
34
35
  } = customProps;
35
36
  const editor = useSlateStatic();
36
37
  const path = ReactEditor.findPath(editor, element);
@@ -135,7 +136,7 @@ const EditorButton = props => {
135
136
  justifyContent: "center"
136
137
  },
137
138
  children: [/*#__PURE__*/_jsx(Tooltip, {
138
- title: "Settings",
139
+ title: translation("Settings"),
139
140
  arrow: true,
140
141
  children: /*#__PURE__*/_jsx(IconButton, {
141
142
  onClick: onMenuClick("edit"),
@@ -145,7 +146,7 @@ const EditorButton = props => {
145
146
  })
146
147
  })
147
148
  }), /*#__PURE__*/_jsx(Tooltip, {
148
- title: "Nav Settings",
149
+ title: translation("Nav Settings"),
149
150
  arrow: true,
150
151
  children: /*#__PURE__*/_jsx(IconButton, {
151
152
  onClick: onMenuClick("nav"),
@@ -156,7 +157,7 @@ const EditorButton = props => {
156
157
  })
157
158
  }), hideOpenLink ? null : /*#__PURE__*/_jsx(_Fragment, {
158
159
  children: /*#__PURE__*/_jsx(Tooltip, {
159
- title: "Open Link",
160
+ title: translation("Open Link"),
160
161
  arrow: true,
161
162
  children: /*#__PURE__*/_jsx(Box, {
162
163
  sx: {
@@ -294,7 +295,7 @@ const EditorButton = props => {
294
295
  ...buttonProps,
295
296
  children: [BtnIcon && iconPosition === "start" && /*#__PURE__*/_jsx(MUIIcon, {
296
297
  ...muiIconProps
297
- }), label || "My Button", BtnIcon && iconPosition === "end" && /*#__PURE__*/_jsx(MUIIcon, {
298
+ }), label || translation("My Button"), BtnIcon && iconPosition === "end" && /*#__PURE__*/_jsx(MUIIcon, {
298
299
  ...muiIconProps
299
300
  })]
300
301
  }), !readOnly && buttonRef?.current && /*#__PURE__*/_jsx(Popper, {
@@ -29,7 +29,8 @@ const Carousel = props => {
29
29
  customProps
30
30
  } = props;
31
31
  const {
32
- readOnly
32
+ readOnly,
33
+ translation
33
34
  } = customProps;
34
35
  const editor = useSlateStatic();
35
36
  const [showOptions, setShowOptions] = useState(false);
@@ -96,21 +97,21 @@ const Carousel = props => {
96
97
  left: "0px"
97
98
  },
98
99
  children: [/*#__PURE__*/_jsx(Tooltip, {
99
- title: edit ? "Save Carousel" : "Edit Carousel",
100
+ title: edit ? translation("Save Carousel") : translation("Edit Carousel"),
100
101
  arrow: true,
101
102
  children: /*#__PURE__*/_jsx(IconButton, {
102
103
  onClick: onEdit,
103
104
  children: !edit ? /*#__PURE__*/_jsx(EditIcon, {}) : /*#__PURE__*/_jsx(CheckCircleIcon, {})
104
105
  })
105
106
  }), /*#__PURE__*/_jsx(Tooltip, {
106
- title: "Add Slide",
107
+ title: translation("Add Slide"),
107
108
  arrow: true,
108
109
  children: /*#__PURE__*/_jsx(IconButton, {
109
110
  onClick: onAddSlide,
110
111
  children: /*#__PURE__*/_jsx(GridAddSectionIcon, {})
111
112
  })
112
113
  }), /*#__PURE__*/_jsx(Tooltip, {
113
- title: "Delete Carousel",
114
+ title: translation("Delete Carousel"),
114
115
  arrow: true,
115
116
  children: /*#__PURE__*/_jsx(IconButton, {
116
117
  onClick: onDelete,
@@ -6,13 +6,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const CarouselButton = props => {
7
7
  const {
8
8
  editor,
9
- icoBtnType
9
+ icoBtnType,
10
+ customProps
10
11
  } = props;
12
+ const {
13
+ translation
14
+ } = customProps;
11
15
  const handleClick = () => {
12
16
  insertCarousel(editor);
13
17
  };
14
18
  return /*#__PURE__*/_jsx(ToolbarIcon, {
15
- title: "Carousel",
19
+ title: translation("Carousel"),
16
20
  onClick: handleClick,
17
21
  icon: /*#__PURE__*/_jsx(CarouselElementIcon, {}),
18
22
  icoBtnType: icoBtnType
@@ -13,7 +13,8 @@ const CarouselItem = props => {
13
13
  customProps
14
14
  } = props;
15
15
  const {
16
- readOnly
16
+ readOnly,
17
+ translation
17
18
  } = customProps;
18
19
  const editor = useSlateStatic();
19
20
  const onMenuClick = val => () => {
@@ -41,7 +42,7 @@ const CarouselItem = props => {
41
42
  },
42
43
  contentEditable: false,
43
44
  children: /*#__PURE__*/_jsx(Tooltip, {
44
- title: "Delete Slide",
45
+ title: translation("Delete Slide"),
45
46
  arrow: true,
46
47
  children: /*#__PURE__*/_jsx(IconButton, {
47
48
  onClick: onMenuClick("delete"),
@@ -10,8 +10,11 @@ const ChipTextPopup = props => {
10
10
  onDelete,
11
11
  customProps
12
12
  } = props;
13
+ const {
14
+ translation
15
+ } = customProps;
13
16
  return /*#__PURE__*/_jsx(StyleBuilder, {
14
- title: "Chip Text",
17
+ title: translation("Chip Text"),
15
18
  type: "ChipTextPopup",
16
19
  element: element,
17
20
  onSave: onSave,
@@ -11,7 +11,8 @@ const CodeToText = props => {
11
11
  html,
12
12
  action,
13
13
  location,
14
- handleCodeToText
14
+ handleCodeToText,
15
+ translation
15
16
  } = props;
16
17
  const codeToTextRef = useRef();
17
18
  const wrapperRef = useRef();
@@ -89,7 +90,7 @@ const CodeToText = props => {
89
90
  id: "",
90
91
  value: html,
91
92
  onChange: codeOnChange,
92
- placeholder: "Write html here..."
93
+ placeholder: translation("writeHTMLText")
93
94
  }), /*#__PURE__*/_jsx("div", {
94
95
  style: {
95
96
  display: "flex",
@@ -110,11 +111,11 @@ const CodeToText = props => {
110
111
  children: [/*#__PURE__*/_jsx("button", {
111
112
  onClick: addHtml,
112
113
  className: "done",
113
- children: "Done"
114
+ children: translation("Done")
114
115
  }), /*#__PURE__*/_jsx("button", {
115
116
  className: "clear",
116
117
  onClick: clearHtml,
117
- children: "Clear"
118
+ children: translation("Clear")
118
119
  })]
119
120
  })]
120
121
  })