@flozy/editor 9.8.3 → 9.8.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 (166) hide show
  1. package/dist/Editor/ChatEditor.js +14 -7
  2. package/dist/Editor/CommonEditor.js +27 -12
  3. package/dist/Editor/Elements/AI/AIInput.js +5 -3
  4. package/dist/Editor/Elements/AI/CustomSelect.js +9 -5
  5. package/dist/Editor/Elements/AI/PopoverAIInput.js +4 -2
  6. package/dist/Editor/Elements/Accordion/Accordion.js +4 -3
  7. package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +4 -1
  8. package/dist/Editor/Elements/Accordion/AccordionButton.js +6 -2
  9. package/dist/Editor/Elements/Accordion/AccordionTitlePopup.js +4 -1
  10. package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +6 -2
  11. package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +4 -1
  12. package/dist/Editor/Elements/Attachments/AttachmentsButton.js +4 -1
  13. package/dist/Editor/Elements/Button/ButtonPopup.js +4 -1
  14. package/dist/Editor/Elements/Button/ButtonToolIcon.js +6 -2
  15. package/dist/Editor/Elements/Button/EditorButton.js +6 -5
  16. package/dist/Editor/Elements/Carousel/Carousel.js +5 -4
  17. package/dist/Editor/Elements/Carousel/CarouselButton.js +6 -2
  18. package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -2
  19. package/dist/Editor/Elements/ChipText/ChipTextPopup.js +4 -1
  20. package/dist/Editor/Elements/CodeToText/CodeToText.js +5 -4
  21. package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +6 -2
  22. package/dist/Editor/Elements/Colorbox/ColorboxButton.js +6 -2
  23. package/dist/Editor/Elements/DataView/DataView.js +5 -2
  24. package/dist/Editor/Elements/DataView/DataViewButton.js +6 -2
  25. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +13 -12
  26. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +7 -4
  27. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +7 -5
  28. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +9 -7
  29. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +3 -2
  30. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +5 -3
  31. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +6 -5
  32. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +5 -3
  33. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +7 -6
  34. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +15 -12
  35. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +3 -2
  36. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +3 -2
  37. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +12 -6
  38. package/dist/Editor/Elements/DataView/Layouts/TableView.js +6 -4
  39. package/dist/Editor/Elements/DataView/Layouts/index.js +3 -1
  40. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +5 -2
  41. package/dist/Editor/Elements/Divider/Divider.js +5 -3
  42. package/dist/Editor/Elements/Divider/DividerButton.js +6 -2
  43. package/dist/Editor/Elements/Divider/DividerPopup.js +3 -2
  44. package/dist/Editor/Elements/Embed/Embed.js +4 -1
  45. package/dist/Editor/Elements/Embed/EmbedPopup.js +4 -1
  46. package/dist/Editor/Elements/Embed/Image.js +14 -9
  47. package/dist/Editor/Elements/Embed/Video.js +10 -7
  48. package/dist/Editor/Elements/EmbedScript/Code.js +7 -4
  49. package/dist/Editor/Elements/EmbedScript/EmbedScript.js +6 -2
  50. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +8 -5
  51. package/dist/Editor/Elements/Emoji/EmojiButton.js +6 -2
  52. package/dist/Editor/Elements/Form/FieldPopup.js +4 -1
  53. package/dist/Editor/Elements/Form/Form.js +12 -9
  54. package/dist/Editor/Elements/Form/FormButton.js +6 -2
  55. package/dist/Editor/Elements/Form/FormPopup.js +3 -2
  56. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +18 -12
  57. package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +13 -8
  58. package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +3 -2
  59. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +4 -2
  60. package/dist/Editor/Elements/Form/Workflow/index.js +15 -9
  61. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +21 -4
  62. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +6 -2
  63. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +6 -2
  64. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +8 -3
  65. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +3 -2
  66. package/dist/Editor/Elements/FreeGrid/Options/More.js +4 -3
  67. package/dist/Editor/Elements/Grid/Grid.js +13 -10
  68. package/dist/Editor/Elements/Grid/GridButton.js +9 -5
  69. package/dist/Editor/Elements/Grid/GridItem.js +13 -7
  70. package/dist/Editor/Elements/Grid/GridItemPopup.js +4 -1
  71. package/dist/Editor/Elements/Grid/GridPopup.js +4 -1
  72. package/dist/Editor/Elements/Grid/SectionPopup.js +4 -1
  73. package/dist/Editor/Elements/Link/Link.js +8 -5
  74. package/dist/Editor/Elements/Link/LinkButton.js +4 -1
  75. package/dist/Editor/Elements/List/CheckList.js +14 -9
  76. package/dist/Editor/Elements/NewLine/NewLineButton.js +6 -2
  77. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +4 -1
  78. package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +4 -1
  79. package/dist/Editor/Elements/Search/SearchButton.js +6 -3
  80. package/dist/Editor/Elements/Search/SearchList.js +7 -3
  81. package/dist/Editor/Elements/Signature/SignatureButton.js +6 -2
  82. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +6 -2
  83. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +4 -1
  84. package/dist/Editor/Elements/Signature/SignaturePopup.js +17 -16
  85. package/dist/Editor/Elements/SimpleText/index.js +5 -4
  86. package/dist/Editor/Elements/Table/DragButton.js +4 -2
  87. package/dist/Editor/Elements/Table/Table.js +21 -9
  88. package/dist/Editor/Elements/Table/TablePopup.js +4 -1
  89. package/dist/Editor/Elements/Table/TableSelector.js +10 -6
  90. package/dist/Editor/Elements/Table/TableTool.js +8 -4
  91. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +4 -1
  92. package/dist/Editor/MiniEditor.js +9 -3
  93. package/dist/Editor/Toolbar/Basic/index.js +2 -1
  94. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +6 -2
  95. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +6 -2
  96. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +17 -5
  97. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +10 -5
  98. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +10 -4
  99. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +10 -4
  100. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +6 -2
  101. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +42 -35
  102. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +58 -51
  103. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +29 -22
  104. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +87 -73
  105. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +14 -7
  106. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +8 -4
  107. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +11 -5
  108. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +29 -21
  109. package/dist/Editor/Toolbar/PopupTool/index.js +17 -1
  110. package/dist/Editor/Toolbar/Toolbar.js +20 -10
  111. package/dist/Editor/common/CustomDialog/index.js +8 -10
  112. package/dist/Editor/common/ImageSelector/ImageSelector.js +10 -8
  113. package/dist/Editor/common/ImageSelector/Options/AddLink.js +6 -4
  114. package/dist/Editor/common/LinkSettings/NavComponents.js +14 -10
  115. package/dist/Editor/common/LinkSettings/index.js +20 -14
  116. package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
  117. package/dist/Editor/common/MentionsPopup/index.js +6 -2
  118. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -22
  119. package/dist/Editor/common/RnD/ContextMenu/index.js +3 -2
  120. package/dist/Editor/common/RnD/ElementOptions/index.js +7 -2
  121. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +8 -3
  122. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +5 -2
  123. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +3 -2
  124. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +4 -2
  125. package/dist/Editor/common/RnD/OptionsPopup/index.js +4 -3
  126. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +4 -3
  127. package/dist/Editor/common/RnD/index.js +11 -4
  128. package/dist/Editor/common/Section/index.js +7 -4
  129. package/dist/Editor/common/Shorthands/elements.js +18 -3
  130. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
  131. package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
  132. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -2
  133. package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
  134. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
  135. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
  136. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +13 -9
  137. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +6 -3
  138. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +7 -3
  139. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -3
  140. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +6 -3
  141. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +11 -5
  142. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +9 -5
  143. package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +10 -6
  144. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +6 -2
  145. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +6 -2
  146. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +5 -2
  147. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +9 -6
  148. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +8 -2
  149. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +12 -11
  150. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +6 -2
  151. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +8 -4
  152. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +6 -2
  153. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +6 -5
  154. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  155. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  156. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  157. package/dist/Editor/common/StyleBuilder/index.js +8 -5
  158. package/dist/Editor/common/Uploader.js +8 -5
  159. package/dist/Editor/helper/index.js +27 -3
  160. package/dist/Editor/plugins/withLayout.js +3 -2
  161. package/dist/Editor/plugins/withLinks.js +10 -0
  162. package/dist/Editor/utils/SlateUtilityFunctions.js +15 -9
  163. package/dist/Editor/utils/brains.js +1 -2
  164. package/dist/Editor/utils/freegrid.js +1 -1
  165. package/dist/Editor/utils/helper.js +2 -2
  166. 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
  });
@@ -324,6 +328,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
324
328
  ...mentions,
325
329
  CHARACTERS,
326
330
  hideTools: updatedHideTools || [],
331
+ translation: translation || translationFn,
327
332
  editor
328
333
  }) : [];
329
334
  const handleEditorChange = newValue => {
@@ -351,6 +356,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
351
356
  isIframe: isIframe,
352
357
  onDrawerOpen: onDrawerOpen,
353
358
  ICON_API: "https://assets.agenciflow.com",
359
+ translation: translationFn,
354
360
  getTitleSaveData
355
361
  };
356
362
  const lineH = getBreakpointLineSpacing(lineHeight, breakpoint);
@@ -486,9 +492,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
486
492
  window.open("https://www.flozy.com", "_blank");
487
493
  };
488
494
  const editorWrapperStyle = useMemo(() => {
489
- const style = {
490
- color: pageTextColor || ""
491
- };
495
+ const style = {};
492
496
  if (pageBgImage && pageBgImage !== "none") {
493
497
  style.backgroundImage = `url(${pageBgImage})`;
494
498
  style.backgroundSize = `cover`;
@@ -506,6 +510,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
506
510
  // }
507
511
  // };
508
512
 
513
+ const gradientColor = pageTextStyle(pageTextColor);
509
514
  const handleCursorScroll = container => {
510
515
  try {
511
516
  if (!customProps?.isMobile) {
@@ -553,7 +558,12 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
553
558
  children: /*#__PURE__*/_jsxs(Overlay, {
554
559
  children: [/*#__PURE__*/_jsx(Box, {
555
560
  className: `pc-${editorClass || ""} ${hasTopBanner() ? "has-topbanner" : ""} ${!pageColor ? "no-color" : ""} scrollable-content scrollSmooth ${readOnly ? "readOnlyContainer" : ""}`,
556
- sx: classes.slateWrapper,
561
+ sx: {
562
+ ...classes.slateWrapper,
563
+ '& span[data-slate-string="true"]': {
564
+ ...gradientColor
565
+ }
566
+ },
557
567
  id: "slate-wrapper-scroll-container",
558
568
  ref: editorWrapper,
559
569
  onClick: e => {
@@ -608,7 +618,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
608
618
  chars: chars,
609
619
  type: type,
610
620
  theme: theme,
611
- otherProps: customProps
621
+ otherProps: customProps,
622
+ customProps: customProps
612
623
  }) : null, /*#__PURE__*/_jsx(RnDCopy, {
613
624
  readOnly: readOnly
614
625
  })]
@@ -618,7 +629,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
618
629
  theme: theme
619
630
  }) : null, /*#__PURE__*/_jsx(PopoverAIInput, {
620
631
  otherProps: otherProps || {},
621
- editorWrapper: editorWrapper
632
+ editorWrapper: editorWrapper,
633
+ translation: translation || translationMock
622
634
  }), footer && (fullScreen || readOnly) && /*#__PURE__*/_jsx(Typography, {
623
635
  sx: {
624
636
  color: "rgb(100, 116, 139)",
@@ -640,12 +652,14 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
640
652
  editorWrapper: editorWrapper
641
653
  }) : null, !readOnly && showViewport ? /*#__PURE__*/_jsx(SwitchViewport, {
642
654
  breakpoint: breakpoint,
643
- onChange: b => onSwitchBreakpoint(b)
655
+ onChange: b => onSwitchBreakpoint(b),
656
+ translation: translation || translationMock
644
657
  }) : null]
645
658
  })
646
659
  }), htmlAction.showInput && /*#__PURE__*/_jsx(CodeToText, {
647
660
  ...htmlAction,
648
- handleCodeToText: handleCodeToText
661
+ handleCodeToText: handleCodeToText,
662
+ translation: translation || translationMock
649
663
  })]
650
664
  }, id), /*#__PURE__*/_jsx(FontLoader, {
651
665
  otherProps: {
@@ -661,7 +675,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
661
675
  cancelText: "Cancel",
662
676
  onConfirm: () => {
663
677
  handleDeleteAll();
664
- }
678
+ },
679
+ translation: translation || translationMock
665
680
  })]
666
681
  });
667
682
  });
@@ -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
  })
@@ -7,13 +7,17 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
7
7
  const HtmlContextMenu = props => {
8
8
  const {
9
9
  editor,
10
- handleCodeToText
10
+ handleCodeToText,
11
+ customProps
11
12
  } = props;
12
13
  const [selection, setSelection] = useState();
13
14
  const [showMenu, {
14
15
  top,
15
16
  left
16
17
  }] = useContextMenu(editor, "htmlCode", setSelection);
18
+ const {
19
+ translation
20
+ } = customProps;
17
21
  const handleEditHtml = () => {
18
22
  Transforms.select(editor, selection);
19
23
  const parentPath = Path.parent(selection.focus.path);
@@ -37,7 +41,7 @@ const HtmlContextMenu = props => {
37
41
  children: [/*#__PURE__*/_jsx(Icon, {
38
42
  icon: "pen"
39
43
  }), /*#__PURE__*/_jsx("span", {
40
- children: "Edit HTML"
44
+ children: translation("Edit HTML")
41
45
  })]
42
46
  })
43
47
  });