@flozy/editor 9.1.4 → 9.1.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 (160) hide show
  1. package/dist/Editor/ChatEditor.js +14 -7
  2. package/dist/Editor/CommonEditor.js +20 -9
  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 +4 -1
  63. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +6 -2
  64. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +6 -2
  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 +13 -5
  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 +5 -3
  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 +28 -14
  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/Toolbar.js +20 -10
  110. package/dist/Editor/common/CustomDialog/index.js +8 -10
  111. package/dist/Editor/common/ImageSelector/ImageSelector.js +10 -8
  112. package/dist/Editor/common/ImageSelector/Options/AddLink.js +6 -4
  113. package/dist/Editor/common/LinkSettings/NavComponents.js +14 -10
  114. package/dist/Editor/common/LinkSettings/index.js +20 -14
  115. package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
  116. package/dist/Editor/common/MentionsPopup/index.js +6 -2
  117. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -22
  118. package/dist/Editor/common/RnD/ContextMenu/index.js +3 -2
  119. package/dist/Editor/common/RnD/ElementOptions/index.js +7 -2
  120. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +8 -3
  121. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +5 -2
  122. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +3 -2
  123. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +4 -2
  124. package/dist/Editor/common/RnD/OptionsPopup/index.js +4 -3
  125. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +3 -2
  126. package/dist/Editor/common/RnD/index.js +11 -4
  127. package/dist/Editor/common/Section/index.js +7 -4
  128. package/dist/Editor/common/Shorthands/elements.js +21 -4
  129. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
  130. package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
  131. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -2
  132. package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
  133. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
  134. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
  135. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +13 -9
  136. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +6 -3
  137. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +7 -3
  138. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -3
  139. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +6 -3
  140. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +19 -13
  141. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +7 -4
  142. package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +10 -6
  143. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +7 -3
  144. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +6 -2
  145. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +5 -2
  146. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +9 -6
  147. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +4 -2
  148. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +12 -11
  149. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +6 -2
  150. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +8 -4
  151. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +6 -2
  152. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +6 -5
  153. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  154. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  155. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  156. package/dist/Editor/common/StyleBuilder/index.js +4 -3
  157. package/dist/Editor/common/Uploader.js +8 -5
  158. package/dist/Editor/plugins/withLayout.js +3 -2
  159. package/dist/Editor/utils/SlateUtilityFunctions.js +12 -8
  160. package/package.json +1 -1
@@ -30,7 +30,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
30
30
  onsubmit,
31
31
  onBlur = () => {},
32
32
  isMobile = false,
33
- debounceTimeOut = 10
33
+ debounceTimeOut = 10,
34
+ translation
34
35
  } = props;
35
36
  const classes = usePopupStyle(theme);
36
37
  const convertedContent = draftToSlate({
@@ -144,7 +145,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
144
145
  };
145
146
  const {
146
147
  CHARACTERS = [],
147
- hideTools
148
+ hideTools,
149
+ translationMock
148
150
  // needLayout = true,
149
151
  } = otherProps || {};
150
152
  const mentionsRef = useRef();
@@ -153,7 +155,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
153
155
  hideTools: ["settings", "add_column", "drag", "resize"],
154
156
  readOnly: isReadOnly,
155
157
  editorPlaceholder: "Write Something",
156
- page_id: 1
158
+ page_id: 1,
159
+ translation: translation || translationMock
157
160
  };
158
161
  const [mentions, setMentions] = useMentions({
159
162
  editor,
@@ -173,7 +176,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
173
176
  const chars = type ? Shorthands[type]({
174
177
  ...mentions,
175
178
  CHARACTERS,
176
- hideTools: hideTools
179
+ hideTools: hideTools,
180
+ translation: translation || translationMock
177
181
  }) : [];
178
182
  const Leaf = ({
179
183
  attributes,
@@ -282,7 +286,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
282
286
  children: [toolBar && /*#__PURE__*/_jsx(MiniTextFormat, {
283
287
  classes: classes,
284
288
  editor: editor,
285
- closeMainPopup: handleClose
289
+ closeMainPopup: handleClose,
290
+ customProps: customProps
286
291
  }), /*#__PURE__*/_jsx(Editable, {
287
292
  className: "chatEditorRoot",
288
293
  renderElement: renderElement,
@@ -292,7 +297,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
292
297
  spellCheck: true,
293
298
  onBlur: handleBlur,
294
299
  onKeyDown: onKeyDown,
295
- onPaste: handlePaste
300
+ onPaste: handlePaste,
301
+ customProps: customProps
296
302
  }), !readOnly ? /*#__PURE__*/_jsx(MentionsPopup, {
297
303
  ref: mentionsRef,
298
304
  mentions: mentions,
@@ -302,7 +308,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
302
308
  index: index,
303
309
  chars: chars,
304
310
  type: type,
305
- theme: theme
311
+ theme: theme,
312
+ customProps: customProps
306
313
  }) : null]
307
314
  }, id)
308
315
  });
@@ -101,7 +101,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
101
101
  theme,
102
102
  showThemeButtons,
103
103
  showViewport = false,
104
- overrideWrapperStyles = {}
104
+ overrideWrapperStyles = {},
105
+ translation
105
106
  } = props;
106
107
  const editorWrapper = useRef();
107
108
  const mentionsRef = useRef();
@@ -132,12 +133,15 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
132
133
  editorClass,
133
134
  fixedWidth = "60%",
134
135
  fullWidth = "80%",
135
- hideTools = []
136
+ hideTools = [],
137
+ translationMock
136
138
  } = otherProps || {};
139
+ const translationFn = translation || translationMock;
137
140
  const editor = useMemo(() => {
138
141
  if (collaborativeEditor) return collaborativeEditor;
139
142
  const editor = createEditor();
140
143
  editor.needLayout = needLayout;
144
+ editor.translation = translationFn;
141
145
  return withCommon(editor, {
142
146
  needLayout
143
147
  });
@@ -332,7 +336,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
332
336
  const chars = type && !isFreeGrid(content) ? Shorthands[type]({
333
337
  ...mentions,
334
338
  CHARACTERS,
335
- hideTools: updatedHideTools || []
339
+ hideTools: updatedHideTools || [],
340
+ translation: translation || translationFn
336
341
  }) : [];
337
342
  const handleEditorChange = newValue => {
338
343
  if (JSON.stringify(newValue) !== JSON.stringify(debouncedValue?.current)) {
@@ -356,7 +361,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
356
361
  page_title: page_title,
357
362
  isIframe: isIframe,
358
363
  onDrawerOpen: onDrawerOpen,
359
- ICON_API: "https://assets.agenciflow.com"
364
+ ICON_API: "https://assets.agenciflow.com",
365
+ translation: translationFn
360
366
  };
361
367
  const lineH = getBreakpointLineSpacing(lineHeight, breakpoint);
362
368
  const renderElement = useCallback(props => {
@@ -631,7 +637,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
631
637
  chars: chars,
632
638
  type: type,
633
639
  theme: theme,
634
- otherProps: otherProps
640
+ otherProps: otherProps,
641
+ customProps: customProps
635
642
  }) : null, /*#__PURE__*/_jsx(RnDCopy, {
636
643
  readOnly: readOnly
637
644
  })]
@@ -641,7 +648,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
641
648
  theme: theme
642
649
  }) : null, /*#__PURE__*/_jsx(PopoverAIInput, {
643
650
  otherProps: otherProps || {},
644
- editorWrapper: editorWrapper
651
+ editorWrapper: editorWrapper,
652
+ translation: translation || translationMock
645
653
  }), footer && (fullScreen || readOnly) && /*#__PURE__*/_jsx(Typography, {
646
654
  sx: {
647
655
  color: "rgb(100, 116, 139)",
@@ -673,12 +681,14 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
673
681
  }) : null, !readOnly ? /*#__PURE__*/_jsx(SwitchViewport, {
674
682
  breakpoint: breakpoint,
675
683
  show: showViewport,
676
- onChange: b => onSwitchBreakpoint(b)
684
+ onChange: b => onSwitchBreakpoint(b),
685
+ translation: translation || translationMock
677
686
  }) : null]
678
687
  })
679
688
  }), htmlAction.showInput && /*#__PURE__*/_jsx(CodeToText, {
680
689
  ...htmlAction,
681
- handleCodeToText: handleCodeToText
690
+ handleCodeToText: handleCodeToText,
691
+ translation: translation || translationMock
682
692
  })]
683
693
  }, id), /*#__PURE__*/_jsx(FontLoader, {
684
694
  otherProps: {
@@ -694,7 +704,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
694
704
  cancelText: "Cancel",
695
705
  onConfirm: () => {
696
706
  handleDeleteAll();
697
- }
707
+ },
708
+ translation: translation || translationMock
698
709
  })]
699
710
  });
700
711
  });
@@ -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"
@@ -32,7 +32,8 @@ const EditorButton = props => {
32
32
  const {
33
33
  readOnly,
34
34
  metadata,
35
- isMobile
35
+ isMobile,
36
+ translation
36
37
  } = customProps;
37
38
  const editor = useSlateStatic();
38
39
  const path = ReactEditor.findPath(editor, element);
@@ -143,7 +144,7 @@ const EditorButton = props => {
143
144
  justifyContent: "center"
144
145
  },
145
146
  children: [/*#__PURE__*/_jsx(Tooltip, {
146
- title: "Settings",
147
+ title: translation("Settings"),
147
148
  arrow: true,
148
149
  children: /*#__PURE__*/_jsx(IconButton, {
149
150
  onClick: onMenuClick("edit"),
@@ -153,7 +154,7 @@ const EditorButton = props => {
153
154
  })
154
155
  })
155
156
  }), /*#__PURE__*/_jsx(Tooltip, {
156
- title: "Nav Settings",
157
+ title: translation("Nav Settings"),
157
158
  arrow: true,
158
159
  children: /*#__PURE__*/_jsx(IconButton, {
159
160
  onClick: onMenuClick("nav"),
@@ -164,7 +165,7 @@ const EditorButton = props => {
164
165
  })
165
166
  }), hideOpenLink ? null : /*#__PURE__*/_jsx(_Fragment, {
166
167
  children: /*#__PURE__*/_jsx(Tooltip, {
167
- title: "Open Link",
168
+ title: translation("Open Link"),
168
169
  arrow: true,
169
170
  children: /*#__PURE__*/_jsx(Box, {
170
171
  sx: {
@@ -305,7 +306,7 @@ const EditorButton = props => {
305
306
  paddingRight: "4px"
306
307
  },
307
308
  props: customProps
308
- }), label || "My Button", BtnIcon && iconPosition === "end" && /*#__PURE__*/_jsx(MUIIcon, {
309
+ }), label || translation("My Button"), BtnIcon && iconPosition === "end" && /*#__PURE__*/_jsx(MUIIcon, {
309
310
  iconName: buttonIcon,
310
311
  style: {
311
312
  paddingLeft: "4px",
@@ -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
  });
@@ -9,8 +9,12 @@ import { Fragment as _Fragment } from "react/jsx-runtime";
9
9
  const ColorboxButton = props => {
10
10
  const editor = useSlateStatic();
11
11
  const {
12
- icoBtnType
12
+ icoBtnType,
13
+ customProps
13
14
  } = props;
15
+ const {
16
+ translation
17
+ } = customProps;
14
18
  const onClick = () => {
15
19
  toggleBlock(editor, "blockquote", false, {
16
20
  bgColor: "rgb(227, 236, 255)"
@@ -19,7 +23,7 @@ const ColorboxButton = props => {
19
23
  };
20
24
  return /*#__PURE__*/_jsx(_Fragment, {
21
25
  children: /*#__PURE__*/_jsx(ToolbarIcon, {
22
- title: "Colorbox",
26
+ title: translation("Colorbox"),
23
27
  onClick: onClick,
24
28
  icon: /*#__PURE__*/_jsx(Icon, {
25
29
  icon: "colorbox"
@@ -24,7 +24,8 @@ const DataView = props => {
24
24
  } = props;
25
25
  const {
26
26
  CHARACTERS,
27
- readOnly
27
+ readOnly,
28
+ translation
28
29
  } = customProps || {};
29
30
  const {
30
31
  properties,
@@ -114,9 +115,11 @@ const DataView = props => {
114
115
  readOnly: readOnly,
115
116
  title: title,
116
117
  onTitleChange: onTitleChange,
117
- path: path
118
+ path: path,
119
+ translation: translation
118
120
  }), /*#__PURE__*/_jsx(LayoutView, {
119
121
  readOnly: readOnly,
122
+ translation: translation,
120
123
  children: children
121
124
  })]
122
125
  })