@flozy/editor 9.5.4 → 9.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/dist/Editor/ChatEditor.js +29 -20
  2. package/dist/Editor/CommonEditor.js +19 -130
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +7 -11
  5. package/dist/Editor/Elements/AI/AIInput.js +3 -5
  6. package/dist/Editor/Elements/AI/CustomSelect.js +5 -9
  7. package/dist/Editor/Elements/AI/PopoverAIInput.js +2 -4
  8. package/dist/Editor/Elements/Accordion/Accordion.js +3 -4
  9. package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +1 -4
  10. package/dist/Editor/Elements/Accordion/AccordionButton.js +2 -6
  11. package/dist/Editor/Elements/Accordion/AccordionTitlePopup.js +1 -4
  12. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  13. package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +2 -6
  14. package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +1 -4
  15. package/dist/Editor/Elements/Attachments/AttachmentsButton.js +1 -4
  16. package/dist/Editor/Elements/Button/ButtonPopup.js +1 -4
  17. package/dist/Editor/Elements/Button/ButtonToolIcon.js +2 -6
  18. package/dist/Editor/Elements/Button/EditorButton.js +14 -31
  19. package/dist/Editor/Elements/Carousel/Carousel.js +4 -5
  20. package/dist/Editor/Elements/Carousel/CarouselButton.js +2 -6
  21. package/dist/Editor/Elements/Carousel/CarouselItem.js +2 -3
  22. package/dist/Editor/Elements/ChipText/ChipTextPopup.js +1 -4
  23. package/dist/Editor/Elements/CodeToText/CodeToText.js +4 -5
  24. package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +2 -6
  25. package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -60
  26. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  27. package/dist/Editor/Elements/Color Picker/ColorPicker.js +7 -10
  28. package/dist/Editor/Elements/Color Picker/Styles.js +3 -3
  29. package/dist/Editor/Elements/Colorbox/ColorboxButton.js +2 -6
  30. package/dist/Editor/Elements/DataView/DataView.js +2 -5
  31. package/dist/Editor/Elements/DataView/DataViewButton.js +2 -6
  32. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +2 -7
  33. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +3 -4
  34. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +5 -25
  35. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +2 -7
  36. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +12 -13
  37. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +4 -7
  38. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +5 -7
  39. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +7 -9
  40. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +3 -8
  41. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +3 -5
  42. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +5 -6
  43. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +3 -5
  44. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +7 -9
  45. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +38 -64
  46. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +2 -3
  47. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +2 -3
  48. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +6 -23
  49. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +1 -4
  50. package/dist/Editor/Elements/DataView/Layouts/TableView.js +4 -6
  51. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +4 -8
  52. package/dist/Editor/Elements/DataView/Layouts/index.js +1 -3
  53. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +2 -5
  54. package/dist/Editor/Elements/DataView/styles.js +0 -13
  55. package/dist/Editor/Elements/Divider/Divider.js +3 -5
  56. package/dist/Editor/Elements/Divider/DividerButton.js +2 -6
  57. package/dist/Editor/Elements/Divider/DividerPopup.js +2 -3
  58. package/dist/Editor/Elements/Embed/Embed.js +1 -4
  59. package/dist/Editor/Elements/Embed/EmbedPopup.js +1 -4
  60. package/dist/Editor/Elements/Embed/Image.js +11 -16
  61. package/dist/Editor/Elements/Embed/Video.js +6 -9
  62. package/dist/Editor/Elements/EmbedScript/Code.js +4 -7
  63. package/dist/Editor/Elements/EmbedScript/EmbedScript.js +2 -6
  64. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +5 -8
  65. package/dist/Editor/Elements/Emoji/EmojiButton.js +2 -6
  66. package/dist/Editor/Elements/Form/FieldPopup.js +1 -4
  67. package/dist/Editor/Elements/Form/Form.js +9 -12
  68. package/dist/Editor/Elements/Form/FormButton.js +2 -6
  69. package/dist/Editor/Elements/Form/FormPopup.js +2 -3
  70. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +12 -18
  71. package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +8 -13
  72. package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +2 -3
  73. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +2 -4
  74. package/dist/Editor/Elements/Form/Workflow/index.js +9 -15
  75. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +23 -67
  76. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +3 -21
  77. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +2 -6
  78. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +4 -34
  79. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +2 -3
  80. package/dist/Editor/Elements/FreeGrid/Options/More.js +4 -10
  81. package/dist/Editor/Elements/FreeGrid/styles.js +0 -3
  82. package/dist/Editor/Elements/Grid/Grid.js +10 -13
  83. package/dist/Editor/Elements/Grid/GridButton.js +5 -9
  84. package/dist/Editor/Elements/Grid/GridItem.js +8 -14
  85. package/dist/Editor/Elements/Grid/GridItemPopup.js +1 -4
  86. package/dist/Editor/Elements/Grid/GridPopup.js +1 -4
  87. package/dist/Editor/Elements/Grid/SectionPopup.js +1 -4
  88. package/dist/Editor/Elements/Link/Link.js +5 -8
  89. package/dist/Editor/Elements/Link/LinkButton.js +1 -4
  90. package/dist/Editor/Elements/List/CheckList.js +9 -14
  91. package/dist/Editor/Elements/NewLine/NewLineButton.js +2 -6
  92. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +1 -4
  93. package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +1 -4
  94. package/dist/Editor/Elements/Search/SearchButton.js +3 -6
  95. package/dist/Editor/Elements/Search/SearchList.js +3 -7
  96. package/dist/Editor/Elements/Signature/SignatureButton.js +2 -6
  97. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -6
  98. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +1 -4
  99. package/dist/Editor/Elements/Signature/SignaturePopup.js +16 -17
  100. package/dist/Editor/Elements/SimpleText/index.js +4 -5
  101. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  102. package/dist/Editor/Elements/Table/DragButton.js +2 -4
  103. package/dist/Editor/Elements/Table/Table.js +11 -23
  104. package/dist/Editor/Elements/Table/TableCell.js +24 -2
  105. package/dist/Editor/Elements/Table/TablePopup.js +1 -4
  106. package/dist/Editor/Elements/Table/TableSelector.js +6 -10
  107. package/dist/Editor/Elements/Table/TableTool.js +4 -8
  108. package/dist/Editor/Elements/Title/title.js +0 -10
  109. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +1 -4
  110. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  111. package/dist/Editor/MiniEditor.js +3 -10
  112. package/dist/Editor/Styles/EditorStyles.js +5 -5
  113. package/dist/Editor/Toolbar/Basic/index.js +1 -2
  114. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +2 -6
  115. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  116. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  117. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +4 -8
  118. package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
  119. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +3 -5
  120. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +5 -10
  121. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +4 -10
  122. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +4 -10
  123. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +3 -9
  124. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +35 -42
  125. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
  126. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +51 -58
  127. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +22 -29
  128. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +87 -226
  129. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +10 -20
  130. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +4 -8
  131. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +9 -16
  132. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +5 -11
  133. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +42 -122
  134. package/dist/Editor/Toolbar/PopupTool/index.js +8 -18
  135. package/dist/Editor/Toolbar/Toolbar.js +10 -20
  136. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  137. package/dist/Editor/common/ColorPickerButton.js +14 -39
  138. package/dist/Editor/common/CustomDialog/index.js +10 -8
  139. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  140. package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
  141. package/dist/Editor/common/Icon.js +1 -46
  142. package/dist/Editor/common/ImageSelector/ImageSelector.js +8 -10
  143. package/dist/Editor/common/ImageSelector/Options/AddLink.js +4 -6
  144. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  145. package/dist/Editor/common/LinkSettings/NavComponents.js +10 -14
  146. package/dist/Editor/common/LinkSettings/index.js +14 -20
  147. package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
  148. package/dist/Editor/common/MentionsPopup/index.js +2 -6
  149. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -22
  150. package/dist/Editor/common/RnD/ContextMenu/index.js +2 -3
  151. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -7
  152. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +3 -8
  153. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +3 -7
  154. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  155. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  156. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  157. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  158. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +4 -7
  159. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  160. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  161. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +2 -6
  162. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  163. package/dist/Editor/common/RnD/OptionsPopup/index.js +3 -4
  164. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +4 -11
  165. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +8 -20
  166. package/dist/Editor/common/RnD/Utils/gridDropItem.js +7 -56
  167. package/dist/Editor/common/RnD/Utils/index.js +0 -3
  168. package/dist/Editor/common/RnD/VirtualElement/index.js +105 -188
  169. package/dist/Editor/common/RnD/VirtualElement/styles.js +7 -123
  170. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +3 -5
  171. package/dist/Editor/common/RnD/index.js +7 -59
  172. package/dist/Editor/common/Section/index.js +4 -7
  173. package/dist/Editor/common/Shorthands/elements.js +3 -74
  174. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
  175. package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
  176. package/dist/Editor/common/StyleBuilder/buttonStyle.js +4 -6
  177. package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
  178. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
  179. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
  180. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +9 -13
  181. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -11
  182. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +5 -19
  183. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +10 -22
  184. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +3 -6
  185. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +13 -27
  186. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +14 -43
  187. package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +6 -10
  188. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +6 -19
  189. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +2 -6
  190. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +2 -5
  191. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -9
  192. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +2 -8
  193. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +11 -12
  194. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +2 -6
  195. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -8
  196. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +2 -6
  197. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +12 -21
  198. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  199. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  200. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  201. package/dist/Editor/common/StyleBuilder/index.js +5 -8
  202. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  203. package/dist/Editor/common/Uploader.js +5 -16
  204. package/dist/Editor/commonStyle.js +57 -68
  205. package/dist/Editor/helper/index.js +12 -8
  206. package/dist/Editor/helper/theme.js +2 -202
  207. package/dist/Editor/hooks/useDrag.js +10 -16
  208. package/dist/Editor/hooks/useEditorScroll.js +5 -10
  209. package/dist/Editor/hooks/useMouseMove.js +13 -25
  210. package/dist/Editor/hooks/useTable.js +1 -1
  211. package/dist/Editor/plugins/withEmbeds.js +1 -1
  212. package/dist/Editor/plugins/withHTML.js +7 -10
  213. package/dist/Editor/plugins/withLayout.js +2 -3
  214. package/dist/Editor/plugins/withTable.js +1 -1
  215. package/dist/Editor/theme/ThemeList.js +173 -50
  216. package/dist/Editor/utils/SlateUtilityFunctions.js +47 -164
  217. package/dist/Editor/utils/draftToSlate.js +2 -3
  218. package/dist/Editor/utils/embed.js +6 -8
  219. package/dist/Editor/utils/font.js +37 -40
  220. package/dist/Editor/utils/freegrid.js +2 -2
  221. package/dist/Editor/utils/helper.js +19 -90
  222. package/package.json +2 -2
  223. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -425
  224. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -441
  225. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  226. package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
  227. package/dist/Editor/common/CustomColorPicker/index.js +0 -131
  228. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  229. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  230. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  231. package/dist/Editor/common/CustomSelect.js +0 -33
  232. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  233. package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +0 -117
  234. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +0 -134
  235. package/dist/Editor/common/RnD/VirtualElement/helper.js +0 -281
  236. package/dist/Editor/common/SnackBar/index.js +0 -43
  237. package/dist/Editor/helper/textIndeces.js +0 -58
  238. package/dist/Editor/hooks/useAutoScroll.js +0 -38
  239. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  240. package/dist/Editor/hooks/useThemeValues.js +0 -63
  241. package/dist/Editor/theme/index.js +0 -147
  242. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  243. package/dist/Editor/themeSettings/buttons/index.js +0 -285
  244. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  245. package/dist/Editor/themeSettings/colorTheme/index.js +0 -305
  246. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  247. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  248. package/dist/Editor/themeSettings/fonts/index.js +0 -222
  249. package/dist/Editor/themeSettings/fonts/style.js +0 -60
  250. package/dist/Editor/themeSettings/icons.js +0 -60
  251. package/dist/Editor/themeSettings/index.js +0 -331
  252. package/dist/Editor/themeSettings/style.js +0 -211
  253. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  254. package/dist/Editor/themeSettingsAI/index.js +0 -355
  255. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -205
  256. package/dist/Editor/themeSettingsAI/style.js +0 -259
@@ -32,16 +32,15 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
32
32
  onBlur = () => {},
33
33
  isMobile = false,
34
34
  debounceTimeOut = 10,
35
- translation,
36
35
  isMarkDown = false,
37
- markDownContent = ""
36
+ markDownContent = ''
38
37
  } = props;
39
38
  const classes = usePopupStyle(theme);
40
39
  const convertedContent = draftToSlate({
41
40
  data: content && content?.length > 0 ? content : [{
42
- type: "paragraph",
41
+ type: 'paragraph',
43
42
  children: [{
44
- text: ""
43
+ text: ''
45
44
  }]
46
45
  }]
47
46
  });
@@ -148,19 +147,16 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
148
147
  };
149
148
  const {
150
149
  CHARACTERS = [],
151
- hideTools,
152
- translationMock
150
+ hideTools
153
151
  // needLayout = true,
154
152
  } = otherProps || {};
155
153
  const mentionsRef = useRef();
156
- const dummyTranslation = () => {};
157
154
  const customProps = {
158
155
  ...(otherProps || {}),
159
156
  hideTools: ["settings", "add_column", "drag", "resize"],
160
157
  readOnly: isReadOnly,
161
158
  editorPlaceholder: "Write Something",
162
- page_id: 1,
163
- translation: translation || translationMock || dummyTranslation
159
+ page_id: 1
164
160
  };
165
161
  const [mentions, setMentions] = useMentions({
166
162
  editor,
@@ -180,8 +176,7 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
180
176
  const chars = type ? Shorthands[type]({
181
177
  ...mentions,
182
178
  CHARACTERS,
183
- hideTools: hideTools,
184
- translation: translation || translationMock
179
+ hideTools: hideTools
185
180
  }) : [];
186
181
  const Leaf = ({
187
182
  attributes,
@@ -195,6 +190,7 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
195
190
  });
196
191
  };
197
192
  const handleEditorChange = newValue => {
193
+ console.log("🚀 ~ handleEditorChange ~ newValue:", newValue);
198
194
  if (editor.children.length === 0) {
199
195
  Transforms.insertNodes(editor, {
200
196
  type: "paragraph",
@@ -202,6 +198,22 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
202
198
  text: ""
203
199
  }]
204
200
  });
201
+ } else {
202
+ newValue.forEach((val, index) => {
203
+ if (val?.type === "table") {
204
+ const nextNode = newValue[index + 1];
205
+ if (!nextNode || nextNode.type !== "paragraph") {
206
+ Transforms.insertNodes(editor, {
207
+ type: "paragraph",
208
+ children: [{
209
+ text: ""
210
+ }]
211
+ }, {
212
+ at: [index + 1]
213
+ });
214
+ }
215
+ }
216
+ });
205
217
  }
206
218
  debounced(newValue);
207
219
  debouncedValue.current = newValue;
@@ -241,7 +253,7 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
241
253
  editor
242
254
  });
243
255
  } else if (event.key === "Enter" && !isMobile) {
244
- const isEmpty = debouncedValue?.current.length === 1 && debouncedValue?.current[0].type === "paragraph" && debouncedValue?.current[0].children.length === 1 && debouncedValue?.current[0].children[0].text === "";
256
+ const isEmpty = debouncedValue?.current.length === 1 && debouncedValue?.current[0].type === 'paragraph' && debouncedValue?.current[0].children.length === 1 && debouncedValue?.current[0].children[0].text === '';
245
257
  if (isEmpty) {
246
258
  event.preventDefault();
247
259
  return;
@@ -281,10 +293,10 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
281
293
  }
282
294
  };
283
295
 
284
- const html = isMarkDown ? convertMDToHTML(markDownContent) : null;
285
296
  const handleFocus = () => {
286
297
  setIsFocused(true);
287
298
  };
299
+ const html = isMarkDown ? convertMDToHTML(markDownContent) : null;
288
300
  return !isMarkDown ? /*#__PURE__*/_jsx(EditorProvider, {
289
301
  theme: theme,
290
302
  editor: editor,
@@ -295,20 +307,18 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
295
307
  children: [toolBar && /*#__PURE__*/_jsx(MiniTextFormat, {
296
308
  classes: classes,
297
309
  editor: editor,
298
- closeMainPopup: handleClose,
299
- customProps: customProps
310
+ closeMainPopup: handleClose
300
311
  }), /*#__PURE__*/_jsx(Editable, {
312
+ onFocus: handleFocus,
301
313
  className: "chatEditorRoot",
302
314
  renderElement: renderElement,
303
315
  renderLeaf: renderLeaf,
304
316
  decorate: decorators,
305
317
  placeholder: "Start typing ...",
306
318
  spellCheck: true,
307
- onFocus: handleFocus,
308
319
  onBlur: handleBlur,
309
320
  onKeyDown: onKeyDown,
310
- onPaste: handlePaste,
311
- customProps: customProps
321
+ onPaste: handlePaste
312
322
  }), !readOnly && isFocused ? /*#__PURE__*/_jsx(MentionsPopup, {
313
323
  ref: mentionsRef,
314
324
  mentions: mentions,
@@ -318,8 +328,7 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
318
328
  index: index,
319
329
  chars: chars,
320
330
  type: type,
321
- theme: theme,
322
- customProps: customProps
331
+ theme: theme
323
332
  }) : null]
324
333
  }, id)
325
334
  }) : /*#__PURE__*/_jsx("div", {
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable no-unused-vars */
2
- import React, { useRef, useCallback, useEffect, useMemo, useState, forwardRef, useImperativeHandle, createContext } from "react";
2
+ import React, { useRef, useCallback, useEffect, useMemo, useState, forwardRef, useImperativeHandle } from "react";
3
3
  import PropTypes from "prop-types";
4
- import { createEditor, Editor, Range, Transforms } from "slate";
4
+ import { createEditor, Range, Transforms } from "slate";
5
5
  import { Slate, Editable, ReactEditor } from "slate-react";
6
6
  import { useDebouncedCallback } from "use-debounce";
7
7
  import { getMarked, getBlock } from "./utils/SlateUtilityFunctions";
@@ -17,7 +17,7 @@ import { serializeToText } from "./utils/serializeToText";
17
17
  import { getPageSettings } from "./utils/pageSettings";
18
18
  import { getThumbnailImage, invertColor } from "./helper";
19
19
  import PopupTool from "./Toolbar/PopupTool";
20
- import { Box, Typography, useTheme, IconButton } from "@mui/material";
20
+ import { Box, Typography, useTheme } from "@mui/material";
21
21
  import Shorthands from "./common/Shorthands";
22
22
  import MiniToolbar from "./Toolbar/Mini/MiniToolbar";
23
23
  import { EditorProvider } from "./hooks/useMouseMove";
@@ -26,12 +26,9 @@ import editorStyles from "./Styles/EditorStyles";
26
26
  import DragAndDrop from "./common/DnD";
27
27
  import Section from "./common/Section";
28
28
  import decorators from "./utils/Decorators";
29
- import { getTRBLBreakPoints, getVariableValue, getBreakpointLineSpacing } from "./helper/theme";
29
+ import { getBreakpointLineSpacing, getTRBLBreakPoints } from "./helper/theme";
30
30
  import { getInitialValue, handleInsertLastElement, isEverythingSelected, isFreeGrid, isFreeGridFragment, isRestrictedNode, outsideEditorClickLabel } from "./utils/helper";
31
31
  import useWindowResize from "./hooks/useWindowResize";
32
- import { getTheme } from "./theme";
33
- import ThemeSettings from "./themeSettings";
34
- import ThemeSettingsAI from "./themeSettingsAI";
35
32
  import PopoverAIInput from "./Elements/AI/PopoverAIInput";
36
33
  import RnDCopy from "./common/RnD/RnDCopy";
37
34
  import SwitchViewport from "./common/RnD/SwitchViewport/SwitchViewport";
@@ -40,12 +37,9 @@ import "./font.css";
40
37
  import "./Editor.css";
41
38
  import "animate.css";
42
39
  import FontLoader from "./common/FontLoader/FontLoader";
43
- import { ThemeAIIcon, ThemePaintIcon } from "./assets/svg/ThemeIcons";
44
40
  import { CustomDialogComponent } from "./common/CustomDialog";
45
- import { extractTextWithPath, replaceTextPath } from "./helper/textIndeces.js";
46
41
  import { jsx as _jsx } from "react/jsx-runtime";
47
42
  import { jsxs as _jsxs } from "react/jsx-runtime";
48
- export const ThemeContext = /*#__PURE__*/createContext(null);
49
43
  const Item = /*#__PURE__*/forwardRef(({
50
44
  children,
51
45
  ...props
@@ -87,7 +81,6 @@ const updateTopBanner = (content = [], setTopBanner) => {
87
81
  return firstNode?.type === "topbanner" ? firstNode : null;
88
82
  });
89
83
  };
90
- const dummyTranslation = () => {};
91
84
  const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
92
85
  const {
93
86
  id,
@@ -101,16 +94,13 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
101
94
  otherProps,
102
95
  isIframe,
103
96
  theme,
104
- showThemeButtons,
105
97
  showViewport = false,
106
- overrideWrapperStyles = {},
107
- translation
98
+ overrideWrapperStyles = {}
108
99
  } = props;
109
100
  const editorWrapper = useRef();
110
101
  const mentionsRef = useRef();
111
102
  const convertedContent = draftToSlate({
112
- data: content,
113
- needLayout: otherProps?.needLayout
103
+ data: content
114
104
  });
115
105
  const [value, setValue] = useState(convertedContent);
116
106
  const [isInteracted, setIsInteracted] = useState(false);
@@ -135,15 +125,12 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
135
125
  editorClass,
136
126
  fixedWidth = "60%",
137
127
  fullWidth = "80%",
138
- hideTools = [],
139
- translationMock
128
+ hideTools = []
140
129
  } = otherProps || {};
141
- const translationFn = translation || translationMock || dummyTranslation;
142
130
  const editor = useMemo(() => {
143
131
  if (collaborativeEditor) return collaborativeEditor;
144
132
  const editor = createEditor();
145
133
  editor.needLayout = needLayout;
146
- editor.translation = translationFn;
147
134
  return withCommon(editor, {
148
135
  needLayout
149
136
  });
@@ -154,11 +141,10 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
154
141
  const {
155
142
  bannerSpacing,
156
143
  pageBgImage,
157
- pageColor = "",
144
+ pageColor,
158
145
  color: pageTextColor,
159
146
  pageWidth,
160
147
  maxWidth: pageMaxWidth,
161
- theme: selectedTheme,
162
148
  lineHeight
163
149
  } = pageSt?.pageProps || {
164
150
  bannerSpacing: {
@@ -170,17 +156,10 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
170
156
  };
171
157
  const classes = editorStyles({
172
158
  padHeight: !fullScreen ? otherProps?.padHeight : 20,
173
- placeHolderColor: invertColor(pageColor.startsWith("var") ? getVariableValue(pageColor) : pageColor || "#FFF"),
159
+ placeHolderColor: invertColor(pageColor || "#FFF"),
174
160
  theme,
175
161
  overrideWrapperStyles
176
162
  });
177
- const [openTheme, setOpenTheme] = useState(false);
178
- const [openAITheme, setOpenAITheme] = useState(false);
179
- const [, setThemeUpdated] = useState(0);
180
- const triggerRender = () => {
181
- setThemeUpdated(prev => prev + 1); // Incrementing forces a re-render while updating theme
182
- };
183
-
184
163
  const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
185
164
  useEffect(() => {
186
165
  setValue(draftToSlate({
@@ -194,11 +173,11 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
194
173
  const debounced = useDebouncedCallback(
195
174
  // function
196
175
  value => {
197
- debouncedValue.current = value;
198
176
  const {
199
177
  value: strVal,
200
178
  ...restVal
201
179
  } = getOnSaveData(value);
180
+ debouncedValue.current = value;
202
181
  onSave(strVal, restVal);
203
182
  },
204
183
  // delay in ms
@@ -209,7 +188,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
209
188
  return {
210
189
  value: JSON.stringify(val),
211
190
  text: text,
212
- title: serializeToText(title?.children) || ""
191
+ title: serializeToText(title?.children) || "Untitled"
213
192
  };
214
193
  };
215
194
  const getTitleSaveData = title => {
@@ -241,9 +220,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
241
220
 
242
221
  const onSwitchBreakpoint = b => {
243
222
  setBreakpoint(b);
244
- setTimeout(() => {
245
- reRenderAllNodes();
246
- }, 0);
223
+ reRenderAllNodes();
247
224
  };
248
225
  useImperativeHandle(ref, () => ({
249
226
  async getThumbnail(needBackground = false, options = {}) {
@@ -321,12 +298,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
321
298
  redo() {
322
299
  editor?.redo();
323
300
  },
324
- toggleTheme() {
325
- setOpenTheme(!openTheme);
326
- },
327
- toggleAITheme() {
328
- setOpenAITheme(!openAITheme);
329
- },
330
301
  getPageSettings: {
331
302
  background: pageBgImage && pageBgImage !== "none" ? `url(${pageBgImage})` : pageColor || ""
332
303
  }
@@ -352,7 +323,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
352
323
  ...mentions,
353
324
  CHARACTERS,
354
325
  hideTools: updatedHideTools || [],
355
- translation: translation || translationFn,
356
326
  editor
357
327
  }) : [];
358
328
  const handleEditorChange = newValue => {
@@ -380,10 +350,9 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
380
350
  isIframe: isIframe,
381
351
  onDrawerOpen: onDrawerOpen,
382
352
  ICON_API: "https://assets.agenciflow.com",
383
- translation: translationFn,
384
353
  getTitleSaveData
385
354
  };
386
- const lineH = getBreakpointLineSpacing(lineHeight, breakpoint || (isMobile ? "xs" : ""));
355
+ const lineH = getBreakpointLineSpacing(lineHeight, breakpoint);
387
356
  const renderElement = useCallback(props => {
388
357
  return /*#__PURE__*/_jsx(Element, {
389
358
  ...props,
@@ -528,7 +497,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
528
497
  }
529
498
  return style;
530
499
  }, [pageBgImage, pageColor, pageTextColor]);
531
- const themeProps = getTheme(selectedTheme);
532
500
 
533
501
  // const handleContextMenu = (e) => {
534
502
  // if (!readOnly) {
@@ -558,74 +526,14 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
558
526
  console.log("handleCursorScroll", err);
559
527
  }
560
528
  };
561
- window.getTextIndeces = () => {
562
- try {
563
- const textWithPaths = extractTextWithPath(editor.children, []);
564
- return textWithPaths;
565
- } catch (err) {
566
- console.log(err);
567
- }
568
- };
569
- window.replaceTextIndeces = (path_data = []) => {
570
- try {
571
- const replacedJson = replaceTextPath(JSON.parse(JSON.stringify(editor.children)), path_data);
572
-
573
- // loop delete all
574
- editor.children.forEach(() => {
575
- Transforms.delete(editor, {
576
- at: [0]
577
- });
578
- });
579
-
580
- // Insert new nodes
581
- Transforms.insertNodes(editor, replacedJson, {
582
- at: [0]
583
- });
584
- } catch (err) {
585
- console.log(err);
586
- }
587
- };
588
- window.replaceEditorContent = (fragments = []) => {
589
- try {
590
- // loop delete all
591
- editor.children.forEach(() => {
592
- Transforms.delete(editor, {
593
- at: [0]
594
- });
595
- });
596
-
597
- // Insert new nodes
598
- Transforms.insertNodes(editor, fragments, {
599
- at: [0]
600
- });
601
- } catch (err) {
602
- console.log(err);
603
- }
604
- };
605
529
  return /*#__PURE__*/_jsxs(EditorProvider, {
606
530
  theme: theme,
607
531
  editor: editor,
608
- openTheme: openTheme,
609
- setOpenTheme: setOpenTheme,
610
- triggerRender: triggerRender,
611
- children: [showThemeButtons ? /*#__PURE__*/_jsxs("div", {
612
- className: "theme-buttons",
613
- children: [/*#__PURE__*/_jsx(IconButton, {
614
- onClick: () => setOpenTheme(true),
615
- children: /*#__PURE__*/_jsx(ThemePaintIcon, {})
616
- }), /*#__PURE__*/_jsx(IconButton, {
617
- onClick: () => setOpenAITheme(true),
618
- style: {
619
- marginTop: "4px"
620
- },
621
- children: /*#__PURE__*/_jsx(ThemeAIIcon, {})
622
- })]
623
- }) : null, /*#__PURE__*/_jsx(DialogWrapper, {
532
+ children: [/*#__PURE__*/_jsx(DialogWrapper, {
624
533
  classes: classes,
625
534
  ...props,
626
535
  fullScreen: fullScreen,
627
536
  footer: footer || "",
628
- selectedTheme: selectedTheme,
629
537
  children: /*#__PURE__*/_jsxs(Box, {
630
538
  component: "div",
631
539
  className: `et-wrpr stimulate-${breakpoint} ${editorClass || ""} ${isIframe ? "iframe-editor" : ""}`,
@@ -655,7 +563,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
655
563
  children: /*#__PURE__*/_jsxs(Box, {
656
564
  component: "div",
657
565
  className: "max-content",
658
- sx: themeProps?.sxProps || {},
659
566
  "data-info": outsideEditorClickLabel,
660
567
  children: [renderTopBanner(), /*#__PURE__*/_jsx("div", {
661
568
  className: "scroll-area",
@@ -700,7 +607,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
700
607
  chars: chars,
701
608
  type: type,
702
609
  theme: theme,
703
- customProps: customProps,
704
610
  otherProps: customProps
705
611
  }) : null, /*#__PURE__*/_jsx(RnDCopy, {
706
612
  readOnly: readOnly
@@ -711,8 +617,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
711
617
  theme: theme
712
618
  }) : null, /*#__PURE__*/_jsx(PopoverAIInput, {
713
619
  otherProps: otherProps || {},
714
- editorWrapper: editorWrapper,
715
- translation: translation || translationMock
620
+ editorWrapper: editorWrapper
716
621
  }), footer && (fullScreen || readOnly) && /*#__PURE__*/_jsx(Typography, {
717
622
  sx: {
718
623
  color: "rgb(100, 116, 139)",
@@ -724,18 +629,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
724
629
  "data-info": outsideEditorClickLabel,
725
630
  onClick: handleFooterClick,
726
631
  children: footer
727
- }), openTheme ? /*#__PURE__*/_jsx(ThemeSettings, {
728
- open: openTheme,
729
- setOpen: setOpenTheme,
730
- editor: editor,
731
- services: otherProps?.services,
732
- appTheme: theme,
733
- customProps: customProps
734
- }) : null, /*#__PURE__*/_jsx(ThemeSettingsAI, {
735
- openAITheme: openAITheme,
736
- setOpenAITheme: setOpenAITheme,
737
- onSaveTheme: otherProps?.onSaveTheme,
738
- theme: theme
739
632
  })]
740
633
  })
741
634
  }), !readOnly ? /*#__PURE__*/_jsx(PopupTool, {
@@ -744,17 +637,14 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
744
637
  setIsTextSelected: setIsTextSelected,
745
638
  customProps: customProps,
746
639
  editorWrapper: editorWrapper
747
- }) : null, !readOnly ? /*#__PURE__*/_jsx(SwitchViewport, {
640
+ }) : null, !readOnly && showViewport ? /*#__PURE__*/_jsx(SwitchViewport, {
748
641
  breakpoint: breakpoint,
749
- show: showViewport,
750
- onChange: b => onSwitchBreakpoint(b),
751
- translation: translation || translationMock
642
+ onChange: b => onSwitchBreakpoint(b)
752
643
  }) : null]
753
644
  })
754
645
  }), htmlAction.showInput && /*#__PURE__*/_jsx(CodeToText, {
755
646
  ...htmlAction,
756
- handleCodeToText: handleCodeToText,
757
- translation: translation || translationMock
647
+ handleCodeToText: handleCodeToText
758
648
  })]
759
649
  }, id), /*#__PURE__*/_jsx(FontLoader, {
760
650
  otherProps: {
@@ -770,8 +660,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
770
660
  cancelText: "Cancel",
771
661
  onConfirm: () => {
772
662
  handleDeleteAll();
773
- },
774
- translation: translation || translationMock
663
+ }
775
664
  })]
776
665
  });
777
666
  });
@@ -2,7 +2,6 @@ import React from "react";
2
2
  import { Dialog, DialogTitle, DialogContent, IconButton, Grid } from "@mui/material";
3
3
  import CloseIcon from "@mui/icons-material/Close";
4
4
  import ViewportStimulator from "./common/RnD/Theme/ViewportStimulator";
5
- import MainThemeProvider from "./common/RnD/Theme/MainThemeProvider";
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
7
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
7
  const DialogWrapper = props => {
@@ -10,45 +9,40 @@ const DialogWrapper = props => {
10
9
  fullScreen,
11
10
  onClose,
12
11
  children,
13
- classes,
14
- selectedTheme
12
+ classes
15
13
  } = props;
16
- return fullScreen ? /*#__PURE__*/_jsx(MainThemeProvider, {
17
- userSelectedTheme: selectedTheme,
18
- children: /*#__PURE__*/_jsxs(Dialog, {
19
- className: `dialogComp`,
20
- open: fullScreen,
21
- fullScreen: fullScreen,
22
- onClose: onClose,
14
+ return fullScreen ? /*#__PURE__*/_jsxs(Dialog, {
15
+ className: `dialogComp`,
16
+ open: fullScreen,
17
+ fullScreen: fullScreen,
18
+ onClose: onClose,
19
+ style: {
20
+ zIndex: 1000
21
+ },
22
+ sx: classes.fullScreenWrapper,
23
+ children: [/*#__PURE__*/_jsx(DialogTitle, {
23
24
  style: {
24
- zIndex: 1000
25
+ padding: "6px 8px"
25
26
  },
26
- sx: classes.fullScreenWrapper,
27
- children: [/*#__PURE__*/_jsx(DialogTitle, {
28
- style: {
29
- padding: "6px 8px"
30
- },
27
+ children: /*#__PURE__*/_jsx(Grid, {
31
28
  children: /*#__PURE__*/_jsx(Grid, {
32
- children: /*#__PURE__*/_jsx(Grid, {
29
+ style: {
30
+ display: "flex",
31
+ justifyContent: "end"
32
+ },
33
+ children: /*#__PURE__*/_jsx(IconButton, {
34
+ onClick: onClose,
33
35
  style: {
34
- display: "flex",
35
- justifyContent: "end"
36
+ background: "rgba(255,255,255,0.5)"
36
37
  },
37
- children: /*#__PURE__*/_jsx(IconButton, {
38
- onClick: onClose,
39
- style: {
40
- background: "rgba(255,255,255,0.5)"
41
- },
42
- children: /*#__PURE__*/_jsx(CloseIcon, {})
43
- })
38
+ children: /*#__PURE__*/_jsx(CloseIcon, {})
44
39
  })
45
40
  })
46
- }), /*#__PURE__*/_jsx(DialogContent, {
47
- children: children
48
- })]
49
- })
41
+ })
42
+ }), /*#__PURE__*/_jsx(DialogContent, {
43
+ children: children
44
+ })]
50
45
  }) : /*#__PURE__*/_jsx(ViewportStimulator, {
51
- selectedTheme: selectedTheme,
52
46
  children: children
53
47
  });
54
48
  };
@@ -1342,23 +1342,19 @@ code.markcode {
1342
1342
  background-color: #f3f3f3;
1343
1343
  font-family: 'Source Code Pro' !important;
1344
1344
  }
1345
-
1346
1345
  /* Hide the popper when the reference is hidden */
1347
1346
  .hide-popper-on-overlap[data-popper-escaped],
1348
1347
  .hide-popper-on-overlap[data-popper-reference-hidden] {
1349
1348
  visibility: hidden;
1350
1349
  pointer-events: none;
1351
1350
  }
1352
-
1353
- .theme-buttons {
1354
- display: flex;
1355
- justify-content: end;
1356
- align-items: center;
1357
- margin: auto;
1358
- position: absolute;
1359
- top: 60px;
1360
- right: 20px;
1361
- z-index: 1000;
1351
+ code.markcode {
1352
+ border-radius: 4px;
1353
+ padding: 6px 8px;
1354
+ margin: 8px 0px;
1355
+ display: block;
1356
+ background-color: #f3f3f3;
1357
+ font-family: 'Source Code Pro' !important;
1362
1358
  }
1363
1359
 
1364
1360
  .hyperLink {
@@ -43,8 +43,7 @@ function AIInput({
43
43
  onClickOutside,
44
44
  startRecording,
45
45
  loading,
46
- isMobile,
47
- translation
46
+ isMobile
48
47
  }, ref) {
49
48
  const {
50
49
  theme
@@ -116,7 +115,7 @@ function AIInput({
116
115
  children: /*#__PURE__*/_jsx(WaveLoading, {})
117
116
  }) : /*#__PURE__*/_jsx(TextareaAutosize, {
118
117
  className: "ai-input",
119
- placeholder: translation("askAItoWrite"),
118
+ placeholder: "Ask AI to write anything...",
120
119
  ref: inputRef,
121
120
  value: inputValue,
122
121
  onChange: onInputChange,
@@ -151,8 +150,7 @@ function AIInput({
151
150
  children: /*#__PURE__*/_jsx(CustomSelect, {
152
151
  ...props,
153
152
  onSend: onSend,
154
- classes: classes,
155
- translation: translation
153
+ classes: classes
156
154
  })
157
155
  })]
158
156
  });
@@ -9,8 +9,7 @@ function CustomSelect({
9
9
  options,
10
10
  onSend,
11
11
  show,
12
- btnProps = {},
13
- translation
12
+ btnProps = {}
14
13
  }) {
15
14
  if (show) {
16
15
  return /*#__PURE__*/_jsx(Box, {
@@ -32,8 +31,7 @@ function CustomSelect({
32
31
  option: option,
33
32
  classes: classes,
34
33
  onSend: onSend,
35
- btnProps: btnProps,
36
- translation: translation
34
+ btnProps: btnProps
37
35
  }, i);
38
36
  })]
39
37
  }, index);
@@ -48,8 +46,7 @@ function DisplayOption({
48
46
  option,
49
47
  classes,
50
48
  onSend,
51
- btnProps = {},
52
- translation
49
+ btnProps = {}
53
50
  }) {
54
51
  const {
55
52
  Icon,
@@ -88,7 +85,7 @@ function DisplayOption({
88
85
  children: [/*#__PURE__*/_jsxs("div", {
89
86
  className: "option-label",
90
87
  id: "infinity-select-popover",
91
- children: [Icon && /*#__PURE__*/_jsx(Icon, {}), translation(option.label)]
88
+ children: [Icon && /*#__PURE__*/_jsx(Icon, {}), option.label]
92
89
  }), showChild ? /*#__PURE__*/_jsx(IconButton, {
93
90
  children: /*#__PURE__*/_jsx(FaChevronRight, {
94
91
  color: "#94A3B8",
@@ -111,8 +108,7 @@ function DisplayOption({
111
108
  options: option.options,
112
109
  onSend: onSend,
113
110
  classes: classes,
114
- show: open,
115
- translation: translation
111
+ show: open
116
112
  })
117
113
  })
118
114
  })]
@@ -151,8 +151,7 @@ function PopoverAIInput({
151
151
  otherProps,
152
152
  editorWrapper = {
153
153
  current: null
154
- },
155
- translation
154
+ }
156
155
  }) {
157
156
  const {
158
157
  services
@@ -321,8 +320,7 @@ function PopoverAIInput({
321
320
  inputValue: inputValue,
322
321
  onInputChange: onInputChange,
323
322
  onClickOutside: onClickOutside,
324
- isMobile: otherProps?.isMobile,
325
- translation: translation
323
+ isMobile: otherProps?.isMobile
326
324
  })
327
325
  })
328
326
  })