@flozy/editor 9.3.5 → 9.3.7

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 (254) hide show
  1. package/dist/Editor/ChatEditor.js +15 -51
  2. package/dist/Editor/CommonEditor.js +23 -133
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +9 -19
  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 +4 -4
  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 +1 -4
  33. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +3 -4
  34. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +1 -6
  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 +2 -3
  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 +6 -7
  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 -12
  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/index.js +1 -3
  52. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +2 -5
  53. package/dist/Editor/Elements/Divider/Divider.js +3 -5
  54. package/dist/Editor/Elements/Divider/DividerButton.js +2 -6
  55. package/dist/Editor/Elements/Divider/DividerPopup.js +2 -3
  56. package/dist/Editor/Elements/Embed/Embed.js +1 -4
  57. package/dist/Editor/Elements/Embed/EmbedPopup.js +1 -4
  58. package/dist/Editor/Elements/Embed/Image.js +11 -16
  59. package/dist/Editor/Elements/Embed/Video.js +7 -10
  60. package/dist/Editor/Elements/EmbedScript/Code.js +4 -7
  61. package/dist/Editor/Elements/EmbedScript/EmbedScript.js +2 -6
  62. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +5 -8
  63. package/dist/Editor/Elements/Emoji/EmojiButton.js +2 -6
  64. package/dist/Editor/Elements/Form/FieldPopup.js +1 -4
  65. package/dist/Editor/Elements/Form/Form.js +9 -12
  66. package/dist/Editor/Elements/Form/FormButton.js +2 -6
  67. package/dist/Editor/Elements/Form/FormPopup.js +2 -3
  68. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +12 -18
  69. package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +8 -13
  70. package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +2 -3
  71. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +2 -4
  72. package/dist/Editor/Elements/Form/Workflow/index.js +9 -15
  73. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +18 -21
  74. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +2 -6
  75. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +2 -6
  76. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +3 -8
  77. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +2 -3
  78. package/dist/Editor/Elements/FreeGrid/Options/More.js +3 -4
  79. package/dist/Editor/Elements/FreeGrid/styles.js +0 -3
  80. package/dist/Editor/Elements/Grid/Grid.js +10 -13
  81. package/dist/Editor/Elements/Grid/GridButton.js +5 -9
  82. package/dist/Editor/Elements/Grid/GridItem.js +8 -14
  83. package/dist/Editor/Elements/Grid/GridItemPopup.js +1 -4
  84. package/dist/Editor/Elements/Grid/GridPopup.js +1 -4
  85. package/dist/Editor/Elements/Grid/SectionPopup.js +1 -4
  86. package/dist/Editor/Elements/Link/Link.js +7 -14
  87. package/dist/Editor/Elements/Link/LinkButton.js +1 -4
  88. package/dist/Editor/Elements/List/CheckList.js +9 -14
  89. package/dist/Editor/Elements/NewLine/NewLineButton.js +2 -6
  90. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +5 -16
  91. package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +1 -4
  92. package/dist/Editor/Elements/Search/SearchButton.js +3 -6
  93. package/dist/Editor/Elements/Search/SearchList.js +3 -7
  94. package/dist/Editor/Elements/Signature/SignatureButton.js +2 -6
  95. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -6
  96. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +1 -4
  97. package/dist/Editor/Elements/Signature/SignaturePopup.js +16 -17
  98. package/dist/Editor/Elements/SimpleText/index.js +4 -5
  99. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  100. package/dist/Editor/Elements/Table/DragButton.js +2 -4
  101. package/dist/Editor/Elements/Table/Table.js +25 -48
  102. package/dist/Editor/Elements/Table/TableCell.js +27 -6
  103. package/dist/Editor/Elements/Table/TablePopup.js +1 -4
  104. package/dist/Editor/Elements/Table/TableSelector.js +6 -10
  105. package/dist/Editor/Elements/Table/TableTool.js +4 -8
  106. package/dist/Editor/Elements/Title/title.js +0 -10
  107. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +1 -4
  108. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  109. package/dist/Editor/MiniEditor.js +3 -10
  110. package/dist/Editor/Styles/EditorStyles.js +5 -5
  111. package/dist/Editor/Toolbar/Basic/index.js +1 -2
  112. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +2 -6
  113. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  114. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  115. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +4 -8
  116. package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -7
  117. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +15 -20
  118. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +5 -10
  119. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +4 -10
  120. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +4 -10
  121. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +2 -6
  122. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +35 -42
  123. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
  124. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +51 -58
  125. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +22 -29
  126. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +87 -226
  127. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +7 -15
  128. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +4 -8
  129. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +9 -16
  130. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +5 -11
  131. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +44 -126
  132. package/dist/Editor/Toolbar/PopupTool/index.js +17 -6
  133. package/dist/Editor/Toolbar/Toolbar.js +10 -20
  134. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  135. package/dist/Editor/assets/svg/CalenderIconTick.js +0 -1
  136. package/dist/Editor/common/ColorPickerButton.js +10 -45
  137. package/dist/Editor/common/CustomDialog/index.js +10 -8
  138. package/dist/Editor/common/CustomDialog/styles.js +1 -1
  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/Options/Upload.js +1 -1
  145. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  146. package/dist/Editor/common/ImageSelector/UploadStyles.js +9 -9
  147. package/dist/Editor/common/LinkSettings/NavComponents.js +10 -14
  148. package/dist/Editor/common/LinkSettings/index.js +14 -20
  149. package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
  150. package/dist/Editor/common/MentionsPopup/Styles.js +73 -111
  151. package/dist/Editor/common/MentionsPopup/index.js +4 -8
  152. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -22
  153. package/dist/Editor/common/RnD/ContextMenu/index.js +2 -3
  154. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -7
  155. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +3 -8
  156. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +3 -7
  157. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  158. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  159. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  160. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  161. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +4 -7
  162. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  163. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  164. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +2 -6
  165. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  166. package/dist/Editor/common/RnD/ElementSettings/styles.js +1 -0
  167. package/dist/Editor/common/RnD/OptionsPopup/index.js +3 -4
  168. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +4 -11
  169. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +8 -20
  170. package/dist/Editor/common/RnD/Utils/index.js +0 -45
  171. package/dist/Editor/common/RnD/VirtualElement/index.js +2 -1
  172. package/dist/Editor/common/RnD/index.js +7 -34
  173. package/dist/Editor/common/Section/index.js +4 -7
  174. package/dist/Editor/common/Shorthands/elements.js +10 -98
  175. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
  176. package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
  177. package/dist/Editor/common/StyleBuilder/buttonStyle.js +4 -6
  178. package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
  179. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
  180. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
  181. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +9 -13
  182. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -11
  183. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +5 -19
  184. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +10 -22
  185. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +3 -6
  186. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +13 -27
  187. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +14 -41
  188. package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +6 -10
  189. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +6 -19
  190. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +2 -6
  191. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +2 -5
  192. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -9
  193. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +2 -8
  194. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +11 -12
  195. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +2 -6
  196. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -8
  197. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +2 -6
  198. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +12 -21
  199. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  200. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  201. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  202. package/dist/Editor/common/StyleBuilder/index.js +5 -8
  203. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  204. package/dist/Editor/common/Uploader.js +5 -16
  205. package/dist/Editor/commonStyle.js +23 -13
  206. package/dist/Editor/helper/index.js +12 -8
  207. package/dist/Editor/helper/theme.js +2 -200
  208. package/dist/Editor/hooks/useDrag.js +11 -17
  209. package/dist/Editor/hooks/useEditorScroll.js +6 -10
  210. package/dist/Editor/hooks/useMouseMove.js +13 -25
  211. package/dist/Editor/hooks/useTable.js +1 -1
  212. package/dist/Editor/plugins/withEmbeds.js +1 -1
  213. package/dist/Editor/plugins/withHTML.js +15 -19
  214. package/dist/Editor/plugins/withLayout.js +2 -3
  215. package/dist/Editor/plugins/withTable.js +1 -1
  216. package/dist/Editor/theme/ThemeList.js +173 -50
  217. package/dist/Editor/utils/SlateUtilityFunctions.js +47 -171
  218. package/dist/Editor/utils/button.js +2 -7
  219. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +0 -23
  220. package/dist/Editor/utils/dataView.js +2 -5
  221. package/dist/Editor/utils/divider.js +0 -8
  222. package/dist/Editor/utils/draftToSlate.js +2 -3
  223. package/dist/Editor/utils/embed.js +4 -9
  224. package/dist/Editor/utils/font.js +37 -40
  225. package/dist/Editor/utils/helper.js +20 -74
  226. package/dist/Editor/utils/signature.js +2 -5
  227. package/dist/Editor/utils/table.js +0 -8
  228. package/package.json +2 -2
  229. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -441
  230. package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
  231. package/dist/Editor/common/CustomColorPicker/index.js +0 -125
  232. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  233. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  234. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  235. package/dist/Editor/common/CustomSelect.js +0 -33
  236. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  237. package/dist/Editor/helper/textIndeces.js +0 -58
  238. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  239. package/dist/Editor/theme/index.js +0 -144
  240. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  241. package/dist/Editor/themeSettings/buttons/index.js +0 -285
  242. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  243. package/dist/Editor/themeSettings/colorTheme/index.js +0 -297
  244. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  245. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  246. package/dist/Editor/themeSettings/fonts/index.js +0 -222
  247. package/dist/Editor/themeSettings/fonts/style.js +0 -59
  248. package/dist/Editor/themeSettings/icons.js +0 -60
  249. package/dist/Editor/themeSettings/index.js +0 -328
  250. package/dist/Editor/themeSettings/style.js +0 -193
  251. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  252. package/dist/Editor/themeSettingsAI/index.js +0 -355
  253. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -215
  254. package/dist/Editor/themeSettingsAI/style.js +0 -250
@@ -9,11 +9,8 @@ const PageSettingsPopup = props => {
9
9
  onClose,
10
10
  customProps
11
11
  } = props;
12
- const {
13
- translation
14
- } = customProps;
15
12
  return /*#__PURE__*/_jsx(StyleBuilder, {
16
- title: translation("Page Settings"),
13
+ title: "Page Settings",
17
14
  type: "pageSettingsStyle",
18
15
  element: element,
19
16
  onSave: onSave,
@@ -17,8 +17,7 @@ const SearchButton = /*#__PURE__*/forwardRef((props, ref) => {
17
17
  icoBtnType,
18
18
  selectionTarget,
19
19
  theme = 'light',
20
- otherProps,
21
- customProps
20
+ otherProps
22
21
  } = props;
23
22
  const editor = useSlateStatic();
24
23
  const [anchorEl, setAnchorEl] = useState(null);
@@ -124,8 +123,7 @@ const SearchButton = /*#__PURE__*/forwardRef((props, ref) => {
124
123
  onSearchChange: onSearchChange,
125
124
  handleClick: handleClick,
126
125
  theme: theme,
127
- handleClose: handleClose,
128
- customProps: customProps
126
+ handleClose: handleClose
129
127
  })
130
128
  })
131
129
  }) : /*#__PURE__*/_jsx(Popover, {
@@ -168,8 +166,7 @@ const SearchButton = /*#__PURE__*/forwardRef((props, ref) => {
168
166
  onSearchChange: onSearchChange,
169
167
  handleClick: handleClick,
170
168
  theme: theme,
171
- handleClose: handleClose,
172
- customProps: customProps
169
+ handleClose: handleClose
173
170
  })
174
171
  })
175
172
  })]
@@ -11,12 +11,8 @@ const SearchAndDocList = ({
11
11
  onSearchChange,
12
12
  handleClick,
13
13
  theme,
14
- handleClose,
15
- customProps
14
+ handleClose
16
15
  }) => {
17
- const {
18
- translation
19
- } = customProps;
20
16
  const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
21
17
  return /*#__PURE__*/_jsxs(_Fragment, {
22
18
  children: [/*#__PURE__*/_jsxs(Box, {
@@ -32,7 +28,7 @@ const SearchAndDocList = ({
32
28
  fontWeight: 600,
33
29
  color: theme?.palette?.primary?.main
34
30
  },
35
- children: translation("Brains")
31
+ children: "Brains"
36
32
  }), !isMobile ? /*#__PURE__*/_jsx(IconButton, {
37
33
  onClick: e => {
38
34
  e.stopPropagation();
@@ -72,7 +68,7 @@ const SearchAndDocList = ({
72
68
  children: /*#__PURE__*/_jsx(TextField, {
73
69
  fullWidth: true,
74
70
  variant: "outlined",
75
- placeholder: translation("placeHolderSearch"),
71
+ placeholder: "Search here...",
76
72
  size: "small",
77
73
  onChange: e => onSearchChange(e.target.value),
78
74
  InputProps: {
@@ -6,17 +6,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const SignatureButton = props => {
7
7
  const {
8
8
  editor,
9
- icoBtnType,
10
- customProps
9
+ icoBtnType
11
10
  } = props;
12
- const {
13
- translation
14
- } = customProps;
15
11
  const handleInsertSignature = () => {
16
12
  insertSignature(editor);
17
13
  };
18
14
  return /*#__PURE__*/_jsx(ToolbarIcon, {
19
- title: translation("Signature"),
15
+ title: "Signature",
20
16
  onClick: handleInsertSignature,
21
17
  icon: /*#__PURE__*/_jsx(Icon, {
22
18
  icon: "signature"
@@ -6,12 +6,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
6
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
7
7
  const TypeSignature = props => {
8
8
  const {
9
- onDataChange,
10
- customProps
9
+ onDataChange
11
10
  } = props;
12
- const {
13
- translation
14
- } = customProps;
15
11
  const [name, setName] = useState("");
16
12
  const [fontFamily, setFontFamily] = useState("");
17
13
  const onChange = e => {
@@ -48,7 +44,7 @@ const TypeSignature = props => {
48
44
  warp: "noWarp",
49
45
  maxWidth: "120px"
50
46
  },
51
- children: name || translation("Signature")
47
+ children: name || "Signature"
52
48
  })
53
49
  })
54
50
  }, `typesign-ff-${m.value}`);
@@ -9,9 +9,6 @@ const UploadSignature = props => {
9
9
  customProps,
10
10
  onUploadDone
11
11
  } = props;
12
- const {
13
- translation
14
- } = customProps;
15
12
  const [base64, setBase64] = useState(null);
16
13
  const [uploading, setUploading] = useState(false);
17
14
  const onChange = async e => {
@@ -57,7 +54,7 @@ const UploadSignature = props => {
57
54
  sx: {
58
55
  ml: 1
59
56
  },
60
- children: translation("Upload your signature")
57
+ children: "Upload your signature"
61
58
  })]
62
59
  })
63
60
  })]
@@ -31,8 +31,7 @@ const SignaturePopup = props => {
31
31
  const {
32
32
  readOnly,
33
33
  metadata,
34
- isSignerDetailsRequired = false,
35
- translation
34
+ isSignerDetailsRequired = false
36
35
  } = customProps;
37
36
  const [open, setOpen] = useState(false);
38
37
  const [tab, setTab] = useState(0);
@@ -68,7 +67,7 @@ const SignaturePopup = props => {
68
67
  isValidEmail = validationMethods?.isEmail(signedData?.signedByEmail);
69
68
  }
70
69
  if (isValidEmail === "Enter valid email address") {
71
- alert(translation(isValidEmail));
70
+ alert(isValidEmail);
72
71
  } else {
73
72
  onSave(signedData);
74
73
  // manual delay
@@ -141,14 +140,14 @@ const SignaturePopup = props => {
141
140
  style: {
142
141
  color: "#A2B0B9"
143
142
  },
144
- children: translation("Your sign will be placed here")
143
+ children: "Your sign will be placed here"
145
144
  })]
146
145
  }), /*#__PURE__*/_jsx(Button, {
147
146
  onClick: handleOpen,
148
147
  style: {
149
148
  width: "fit-content"
150
149
  },
151
- children: translation("Sign here")
150
+ children: "Sign here"
152
151
  })]
153
152
  }), /*#__PURE__*/_jsx(Dialog, {
154
153
  className: `${className} dialogComp`,
@@ -185,7 +184,7 @@ const SignaturePopup = props => {
185
184
  variant: "h6",
186
185
  color: "primary",
187
186
  sx: classes.popupTitle2,
188
- children: translation("Signature")
187
+ children: "Signature"
189
188
  })
190
189
  }), /*#__PURE__*/_jsx(Grid, {
191
190
  item: true,
@@ -232,7 +231,7 @@ const SignaturePopup = props => {
232
231
  style: {
233
232
  textTransform: "none"
234
233
  },
235
- children: translation("Draw Signature")
234
+ children: "Draw Signature"
236
235
  })]
237
236
  })
238
237
  }), /*#__PURE__*/_jsx(Tab, {
@@ -245,7 +244,7 @@ const SignaturePopup = props => {
245
244
  style: {
246
245
  textTransform: "none"
247
246
  },
248
- children: translation("Type Signature")
247
+ children: "Type Signature"
249
248
  })]
250
249
  })
251
250
  }), /*#__PURE__*/_jsx(Tab, {
@@ -258,7 +257,7 @@ const SignaturePopup = props => {
258
257
  style: {
259
258
  textTransform: "none"
260
259
  },
261
- children: translation("Upload Signature")
260
+ children: "Upload Signature"
262
261
  })]
263
262
  })
264
263
  })]
@@ -304,7 +303,7 @@ const SignaturePopup = props => {
304
303
  fontWeight: 500,
305
304
  fontSize: "14px"
306
305
  },
307
- children: translation("nameField")
306
+ children: "Name:"
308
307
  })
309
308
  }), /*#__PURE__*/_jsx(Grid, {
310
309
  item: true,
@@ -313,7 +312,7 @@ const SignaturePopup = props => {
313
312
  fullWidth: true,
314
313
  id: "signedBy",
315
314
  name: "signedBy",
316
- placeholder: translation("Enter Name"),
315
+ placeholder: "Enter Name",
317
316
  value: signedData.signedBy || ""
318
317
  // defaultValue={defaultName || ""}
319
318
  ,
@@ -341,7 +340,7 @@ const SignaturePopup = props => {
341
340
  fontWeight: 500,
342
341
  fontSize: "14px"
343
342
  },
344
- children: translation("dateField")
343
+ children: "Date:"
345
344
  })
346
345
  }), /*#__PURE__*/_jsx(Grid, {
347
346
  item: true,
@@ -362,7 +361,7 @@ const SignaturePopup = props => {
362
361
  customInput: /*#__PURE__*/_jsx(TextField, {
363
362
  fullWidth: true,
364
363
  name: "signedOn",
365
- placeholder: translation("Select Date"),
364
+ placeholder: "Select Date",
366
365
  size: "small",
367
366
  InputProps: {
368
367
  startAdornment: /*#__PURE__*/_jsx(InputAdornment, {
@@ -432,7 +431,7 @@ const SignaturePopup = props => {
432
431
  fontWeight: 500,
433
432
  fontSize: "14px"
434
433
  },
435
- children: translation("emailField")
434
+ children: "Email:"
436
435
  })
437
436
  }), /*#__PURE__*/_jsx(Grid, {
438
437
  container: true,
@@ -441,7 +440,7 @@ const SignaturePopup = props => {
441
440
  fullWidth: true,
442
441
  id: "signedByEmail",
443
442
  name: "signedByEmail",
444
- placeholder: translation("Enter Email"),
443
+ placeholder: "Enter Email",
445
444
  size: "small",
446
445
  onChange: onChange,
447
446
  sx: classes.signaturePopUpNameField,
@@ -519,12 +518,12 @@ const SignaturePopup = props => {
519
518
  children: [!readOnly ? /*#__PURE__*/_jsx(Button, {
520
519
  onClick: handleClear,
521
520
  className: `secondaryBtn actionBtn deleteBtn deleteButtonSignature`,
522
- children: translation("Delete")
521
+ children: "Delete"
523
522
  }) : null, /*#__PURE__*/_jsx(Button, {
524
523
  onClick: handleSave,
525
524
  className: `primaryBtn actionBtn ${isEmpty ? "disabled disabledSaveBtn" : ""}`,
526
525
  disabled: isEmpty,
527
- children: translation("Save")
526
+ children: "Save"
528
527
  })]
529
528
  })]
530
529
  })]
@@ -24,8 +24,7 @@ const SimpleText = props => {
24
24
  } = props;
25
25
  const {
26
26
  readOnly,
27
- editorPlaceholder,
28
- translation
27
+ editorPlaceholder
29
28
  } = customProps;
30
29
  // const { element: pageSt } = getPageSettings(editor) || {};
31
30
  // const { pageColor } = pageSt?.pageProps || {};
@@ -47,15 +46,15 @@ const SimpleText = props => {
47
46
  }, children, openAI ? null : /*#__PURE__*/_jsx("span", {
48
47
  contentEditable: false,
49
48
  className: "placeholder-simple-text",
50
- children: isEmptyEditor ? editorPlaceholder || translation("writeSomethingPlaceHolder") : showPlaceHolder ? opacity && selected ? /*#__PURE__*/_jsxs(_Fragment, {
51
- children: [translation("Type"), " ", /*#__PURE__*/_jsx("span", {
49
+ children: isEmptyEditor ? editorPlaceholder || "Write Something..." : showPlaceHolder ? opacity && selected ? /*#__PURE__*/_jsxs(_Fragment, {
50
+ children: ["Type", " ", /*#__PURE__*/_jsx("span", {
52
51
  style: {
53
52
  backgroundColor: "#F2F6FA",
54
53
  padding: "0px 2px",
55
54
  borderRadius: "2px"
56
55
  },
57
56
  children: "/"
58
- }), " ", translation("browseElementText")]
57
+ }), " ", "to browse elements"]
59
58
  }) : "" : ""
60
59
  }));
61
60
  };
@@ -35,8 +35,8 @@ const SimpleTextStyle = ({
35
35
  height: "24px",
36
36
  overflow: "hidden",
37
37
  fontSize: "14px",
38
- display: "inline-flex",
39
- alignItems: "center",
38
+ display: 'inline-flex',
39
+ alignItems: 'center',
40
40
  "& .bg-pad-sl": {
41
41
  padding: "2px 4px 2px 4px",
42
42
  background: "transparent",
@@ -29,8 +29,7 @@ function DragButton({
29
29
  const dragElement = useRef(null);
30
30
  const [showTool, setShowTool] = useState(false);
31
31
  const {
32
- isMobile,
33
- translation
32
+ isMobile
34
33
  } = customProps || {};
35
34
  const onDragClick = () => {
36
35
  onDrag();
@@ -63,8 +62,7 @@ function DragButton({
63
62
  hideDelete,
64
63
  handleToolAction: (value, option, dragType) => {
65
64
  handleAction(value, option, dragType);
66
- },
67
- translation
65
+ }
68
66
  };
69
67
  return /*#__PURE__*/_jsx(_Fragment, {
70
68
  children: show || showTool ? /*#__PURE__*/_jsxs(_Fragment, {
@@ -12,11 +12,9 @@ import useTable, { TableProvider, getDefaultTableSelection } from "../../hooks/u
12
12
  import AddRowCol from "./AddRowCol";
13
13
  import TableTool from "./TableTool";
14
14
  import { MoreIcon, SettingsIcon } from "../../assets/svg/TableIcons";
15
- import { DeleteIcon } from "../../assets/svg/AIIcons";
16
15
  import { getSelectedCls } from "../../utils/helper";
17
16
  import SwipeableDrawerComponent from "../../common/SwipeableDrawer";
18
17
  import { jsx as _jsx } from "react/jsx-runtime";
19
- import { Fragment as _Fragment } from "react/jsx-runtime";
20
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
21
19
  const hideRowDragBtns = (hide, dragRowBtnCls) => {
22
20
  const rowDragBtns = document.querySelectorAll(`.${dragRowBtnCls}`);
@@ -27,8 +25,7 @@ const hideRowDragBtns = (hide, dragRowBtnCls) => {
27
25
  const ToolTableComponent = props => {
28
26
  const {
29
27
  handleAction,
30
- editorTheme,
31
- translation
28
+ editorTheme
32
29
  } = props;
33
30
  const {
34
31
  updateTableSelection
@@ -40,8 +37,7 @@ const ToolTableComponent = props => {
40
37
  if (type === "duplicate") {
41
38
  updateTableSelection(getDefaultTableSelection());
42
39
  }
43
- },
44
- translation: translation
40
+ }
45
41
  });
46
42
  };
47
43
  const MoreTableSettings = props => {
@@ -50,13 +46,9 @@ const MoreTableSettings = props => {
50
46
  handleAction,
51
47
  editorTheme,
52
48
  setExpandTools,
53
- classes,
54
- customProps
49
+ classes
55
50
  } = props;
56
51
  const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
57
- const {
58
- translation
59
- } = customProps;
60
52
  return isMobile ? /*#__PURE__*/_jsx(SwipeableDrawerComponent, {
61
53
  open: Boolean(exandTools),
62
54
  onClose: () => {
@@ -83,8 +75,7 @@ const MoreTableSettings = props => {
83
75
  children: /*#__PURE__*/_jsx("div", {
84
76
  children: /*#__PURE__*/_jsx(ToolTableComponent, {
85
77
  handleAction: handleAction,
86
- editorTheme: editorTheme,
87
- translation: translation
78
+ editorTheme: editorTheme
88
79
  })
89
80
  })
90
81
  })
@@ -98,45 +89,34 @@ const ToolBar = props => {
98
89
  handleExpand,
99
90
  handleAction,
100
91
  exandTools,
101
- openSetttings,
102
- hideTools
92
+ openSetttings
103
93
  } = props;
104
94
  const {
105
95
  getSelectedCells
106
96
  } = useTable();
107
97
  const viewTool = selected && !showTool && getSelectedCells()?.length <= 1;
108
- return viewTool ? /*#__PURE__*/_jsx(Box, {
98
+ return viewTool ? /*#__PURE__*/_jsxs(Box, {
109
99
  component: "div",
110
100
  contentEditable: false,
111
101
  className: `tableToolBar ${exandTools ? "active" : ""}`,
112
102
  sx: classes.tableToolBar,
113
- children: !hideTools.includes("settings") ? /*#__PURE__*/_jsxs(_Fragment, {
114
- children: [/*#__PURE__*/_jsx(Tooltip, {
115
- title: "Settings",
116
- arrow: true,
117
- onClick: () => handleAction("settings"),
118
- children: /*#__PURE__*/_jsx(IconButton, {
119
- className: getSelectedCls("toolbtn toggle", openSetttings),
120
- children: /*#__PURE__*/_jsx(SettingsIcon, {})
121
- })
122
- }), /*#__PURE__*/_jsx(Tooltip, {
123
- title: "Show Tools",
124
- arrow: true,
125
- onClick: handleExpand,
126
- children: /*#__PURE__*/_jsx(IconButton, {
127
- className: getSelectedCls("toolbtn toggle", exandTools),
128
- children: /*#__PURE__*/_jsx(MoreIcon, {})
129
- })
130
- })]
131
- }) : /*#__PURE__*/_jsx(Tooltip, {
132
- title: "Delete",
103
+ children: [/*#__PURE__*/_jsx(Tooltip, {
104
+ title: "Settings",
133
105
  arrow: true,
134
- onClick: () => handleAction("delete"),
106
+ onClick: () => handleAction("settings"),
135
107
  children: /*#__PURE__*/_jsx(IconButton, {
136
- className: "editor-deleteicon",
137
- children: /*#__PURE__*/_jsx(DeleteIcon, {})
108
+ className: getSelectedCls("toolbtn toggle", openSetttings),
109
+ children: /*#__PURE__*/_jsx(SettingsIcon, {})
138
110
  })
139
- })
111
+ }), /*#__PURE__*/_jsx(Tooltip, {
112
+ title: "Show Tools",
113
+ arrow: true,
114
+ onClick: handleExpand,
115
+ children: /*#__PURE__*/_jsx(IconButton, {
116
+ className: getSelectedCls("toolbtn toggle", exandTools),
117
+ children: /*#__PURE__*/_jsx(MoreIcon, {})
118
+ })
119
+ })]
140
120
  }) : null;
141
121
  };
142
122
  const Table = props => {
@@ -153,8 +133,7 @@ const Table = props => {
153
133
  const classes = TableStyles(editorTheme);
154
134
  const {
155
135
  readOnly,
156
- isMobile,
157
- hideTools = []
136
+ isMobile
158
137
  } = customProps;
159
138
  const [openSetttings, setOpenSettings] = useState(false);
160
139
  const [exandTools, setExpandTools] = useState(null);
@@ -325,12 +304,12 @@ const Table = props => {
325
304
  ...attributes,
326
305
  children: children
327
306
  })
328
- }), !hideTools.includes("add_column") && /*#__PURE__*/_jsx(AddRowCol, {
307
+ }), /*#__PURE__*/_jsx(AddRowCol, {
329
308
  ...commonAddBtnProps,
330
309
  addType: "col",
331
310
  onAdd: addCol
332
311
  })]
333
- }), !hideTools.includes("add_column") && /*#__PURE__*/_jsx(AddRowCol, {
312
+ }), /*#__PURE__*/_jsx(AddRowCol, {
334
313
  ...commonAddBtnProps,
335
314
  addType: "row",
336
315
  onAdd: addRow
@@ -341,15 +320,13 @@ const Table = props => {
341
320
  handleExpand: handleExpand,
342
321
  handleAction: handleAction,
343
322
  exandTools: exandTools,
344
- openSetttings: openSetttings,
345
- hideTools: hideTools
323
+ openSetttings: openSetttings
346
324
  }), /*#__PURE__*/_jsx(MoreTableSettings, {
347
325
  exandTools: exandTools,
348
326
  handleAction: handleAction,
349
327
  editorTheme: editorTheme,
350
328
  setExpandTools: setExpandTools,
351
- classes: classes,
352
- customProps: customProps
329
+ classes: classes
353
330
  }), openSetttings ? /*#__PURE__*/_jsx(TablePopup, {
354
331
  element: tableProps?.styleProps || {},
355
332
  onSave: onSave,
@@ -12,9 +12,30 @@ import TablePopup from "./TablePopup";
12
12
  import { Droppable } from "./Droppable";
13
13
  import { useDndContext } from "@dnd-kit/core";
14
14
  import { getNodeWithType } from "../../utils/helper";
15
+ import { isEmptyTextNode } from "../../helper";
16
+ import SimpleText from "../SimpleText";
15
17
  import { jsx as _jsx } from "react/jsx-runtime";
16
18
  import { Fragment as _Fragment } from "react/jsx-runtime";
17
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
20
+ const withOldTableData = WrappedComponent => {
21
+ // to prevent old table data issues, ("table-cell" node is coming without parent "table" node (FS-9330))
22
+ return function TableHOC(props) {
23
+ const tableData = useTable();
24
+ if (!tableData) {
25
+ const {
26
+ element
27
+ } = props;
28
+ const isEmpty = isEmptyTextNode(element);
29
+ return /*#__PURE__*/_jsx(SimpleText, {
30
+ ...props,
31
+ isEmpty: isEmpty
32
+ });
33
+ }
34
+ return /*#__PURE__*/_jsx(WrappedComponent, {
35
+ ...props
36
+ });
37
+ };
38
+ };
18
39
  const Resizer = ({
19
40
  classes,
20
41
  onMouseDown,
@@ -48,8 +69,7 @@ const TableCell = props => {
48
69
  customProps
49
70
  } = props;
50
71
  const {
51
- readOnly,
52
- hideTools = []
72
+ readOnly
53
73
  } = customProps;
54
74
  const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
55
75
  const {
@@ -111,8 +131,8 @@ const TableCell = props => {
111
131
  const isFirstRow = row === 0;
112
132
  const isFirstColumn = column === 0;
113
133
  const [hoverRow, hoverCol] = hoverPath ? hoverPath.slice(-2) : [];
114
- const showColDrag = isFirstRow && hoverCol === column && !resizing && !readOnly && !hideTools.includes("drag");
115
- const showRowDrag = isFirstColumn && hoverRow === row && !resizing && !readOnly && !hideTools.includes("drag");
134
+ const showColDrag = isFirstRow && hoverCol === column && !resizing && !readOnly;
135
+ const showRowDrag = isFirstColumn && hoverRow === row && !resizing && !readOnly;
116
136
  const [parentProps] = tableNode || [{}];
117
137
  const [rowProps] = rowNode || [{}];
118
138
  const tableDOM = table.getDOMNode(path, true);
@@ -160,7 +180,7 @@ const TableCell = props => {
160
180
  };
161
181
  useEffect(() => {
162
182
  const currentPath = path?.toString();
163
- setTimeout(() => {
183
+ const timeoutId = setTimeout(() => {
164
184
  if (tableResizing === currentPath) {
165
185
  setTableResizing(null);
166
186
 
@@ -176,6 +196,7 @@ const TableCell = props => {
176
196
  if (resizing) {
177
197
  setTableResizing(currentPath);
178
198
  }
199
+ return () => clearTimeout(timeoutId);
179
200
  }, [resizing]);
180
201
  const onMouseEnter = path => {
181
202
  setHoverPath(path);
@@ -459,4 +480,4 @@ const TableCell = props => {
459
480
  }) : null]
460
481
  });
461
482
  };
462
- export default TableCell;
483
+ export default withOldTableData(TableCell);
@@ -15,11 +15,8 @@ const TablePopup = props => {
15
15
  styleType
16
16
  } = props;
17
17
  const styles = STYLE_TYPES[styleType] || tableStyle;
18
- const {
19
- translation
20
- } = customProps;
21
18
  return /*#__PURE__*/_jsx(StyleBuilder, {
22
- title: translation("Table"),
19
+ title: "Table",
23
20
  type: "gridStyle",
24
21
  element: element,
25
22
  onSave: onSave,
@@ -10,8 +10,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
10
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
11
  const TableSelector = ({
12
12
  editor,
13
- icoBtnType,
14
- customProps
13
+ icoBtnType
15
14
  }) => {
16
15
  const tableOptionsRef = useRef();
17
16
  const [selection, setSelection] = useState();
@@ -21,9 +20,6 @@ const TableSelector = ({
21
20
  column: 2
22
21
  });
23
22
  const table = new TableUtil(editor);
24
- const {
25
- translation
26
- } = customProps;
27
23
  const handleButtonClick = () => {
28
24
  setSelection(editor.selection);
29
25
  setShowOptions(true);
@@ -76,7 +72,7 @@ const TableSelector = ({
76
72
  variant: "h6",
77
73
  className: "popupTitle",
78
74
  color: "primary",
79
- children: translation("Table")
75
+ children: "Table"
80
76
  }), /*#__PURE__*/_jsx(Grid, {
81
77
  style: {
82
78
  display: "flex"
@@ -114,7 +110,7 @@ const TableSelector = ({
114
110
  fontSize: "14px",
115
111
  fontWeight: 500
116
112
  },
117
- children: translation("numberOfRow")
113
+ children: "No.of Rows"
118
114
  })
119
115
  }), /*#__PURE__*/_jsx(TextField, {
120
116
  fullWidth: true,
@@ -141,7 +137,7 @@ const TableSelector = ({
141
137
  fontSize: "14px",
142
138
  fontWeight: 500
143
139
  },
144
- children: translation("numberOfCoumns")
140
+ children: "No.of Columns"
145
141
  })
146
142
  }), /*#__PURE__*/_jsx(TextField, {
147
143
  fullWidth: true,
@@ -162,11 +158,11 @@ const TableSelector = ({
162
158
  children: [/*#__PURE__*/_jsx(Button, {
163
159
  onClick: onCancel,
164
160
  className: "secondaryBtn",
165
- children: translation("Cancel")
161
+ children: "Cancel"
166
162
  }), /*#__PURE__*/_jsx(Button, {
167
163
  onClick: handleInsert,
168
164
  className: "primaryBtn",
169
- children: translation("Save")
165
+ children: "Save"
170
166
  })]
171
167
  })]
172
168
  })