@flozy/editor 9.7.5 → 9.7.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.
- package/dist/Editor/ChatEditor.js +41 -49
- package/dist/Editor/CommonEditor.js +139 -25
- package/dist/Editor/DialogWrapper.js +31 -25
- package/dist/Editor/Editor.css +13 -9
- package/dist/Editor/Elements/AI/AIInput.js +5 -3
- package/dist/Editor/Elements/AI/CustomSelect.js +9 -5
- package/dist/Editor/Elements/AI/PopoverAIInput.js +15 -5
- package/dist/Editor/Elements/Accordion/Accordion.js +4 -3
- package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +4 -1
- package/dist/Editor/Elements/Accordion/AccordionButton.js +6 -2
- package/dist/Editor/Elements/Accordion/AccordionTitlePopup.js +4 -1
- package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
- package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +6 -2
- package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +4 -1
- package/dist/Editor/Elements/Attachments/AttachmentsButton.js +4 -1
- package/dist/Editor/Elements/Button/ButtonPopup.js +4 -1
- package/dist/Editor/Elements/Button/ButtonToolIcon.js +6 -2
- package/dist/Editor/Elements/Button/EditorButton.js +43 -30
- package/dist/Editor/Elements/Carousel/Carousel.js +5 -4
- package/dist/Editor/Elements/Carousel/CarouselButton.js +6 -2
- package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -2
- package/dist/Editor/Elements/ChipText/ChipTextPopup.js +4 -1
- package/dist/Editor/Elements/CodeToText/CodeToText.js +5 -4
- package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +6 -2
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +60 -14
- package/dist/Editor/Elements/Color Picker/ColorPicker.css +25 -1
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +10 -7
- package/dist/Editor/Elements/Color Picker/Styles.js +15 -13
- package/dist/Editor/Elements/Colorbox/ColorboxButton.js +6 -2
- package/dist/Editor/Elements/DataView/DataView.js +5 -2
- package/dist/Editor/Elements/DataView/DataViewButton.js +6 -2
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +4 -2
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +425 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +21 -6
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +13 -12
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +7 -4
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +7 -5
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +9 -7
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +8 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +5 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +6 -5
- package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +5 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +9 -7
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +15 -12
- package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +3 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +3 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +23 -6
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +6 -4
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +8 -4
- package/dist/Editor/Elements/DataView/Layouts/index.js +3 -1
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +5 -2
- package/dist/Editor/Elements/Divider/Divider.js +5 -3
- package/dist/Editor/Elements/Divider/DividerButton.js +6 -2
- package/dist/Editor/Elements/Divider/DividerPopup.js +3 -2
- package/dist/Editor/Elements/Embed/Embed.js +4 -1
- package/dist/Editor/Elements/Embed/EmbedPopup.js +4 -1
- package/dist/Editor/Elements/Embed/Image.js +14 -9
- package/dist/Editor/Elements/Embed/Video.js +9 -6
- package/dist/Editor/Elements/EmbedScript/Code.js +7 -4
- package/dist/Editor/Elements/EmbedScript/EmbedScript.js +6 -2
- package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +8 -5
- package/dist/Editor/Elements/Emoji/EmojiButton.js +6 -2
- package/dist/Editor/Elements/Form/FieldPopup.js +4 -1
- package/dist/Editor/Elements/Form/Form.js +12 -9
- package/dist/Editor/Elements/Form/FormButton.js +6 -2
- package/dist/Editor/Elements/Form/FormPopup.js +3 -2
- package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +18 -12
- package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +13 -8
- package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +3 -2
- package/dist/Editor/Elements/Form/Workflow/Styles.js +24 -22
- package/dist/Editor/Elements/Form/Workflow/UserInputs.js +4 -2
- package/dist/Editor/Elements/Form/Workflow/index.js +15 -9
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +67 -23
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +31 -6
- package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +6 -2
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +38 -5
- package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +3 -2
- package/dist/Editor/Elements/FreeGrid/Options/More.js +10 -4
- package/dist/Editor/Elements/FreeGrid/styles.js +3 -0
- package/dist/Editor/Elements/Grid/Grid.js +13 -10
- package/dist/Editor/Elements/Grid/GridButton.js +9 -5
- package/dist/Editor/Elements/Grid/GridItem.js +14 -8
- package/dist/Editor/Elements/Grid/GridItemPopup.js +4 -1
- package/dist/Editor/Elements/Grid/GridPopup.js +4 -1
- package/dist/Editor/Elements/Grid/SectionPopup.js +4 -1
- package/dist/Editor/Elements/Link/Link.js +8 -5
- package/dist/Editor/Elements/Link/LinkButton.js +4 -1
- package/dist/Editor/Elements/List/CheckList.js +14 -9
- package/dist/Editor/Elements/NewLine/NewLineButton.js +6 -2
- package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +4 -1
- package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +4 -1
- package/dist/Editor/Elements/Search/SearchButton.js +7 -4
- package/dist/Editor/Elements/Search/SearchList.js +10 -5
- package/dist/Editor/Elements/Signature/SignatureButton.js +6 -2
- package/dist/Editor/Elements/Signature/SignatureOptions/DrawSignature.js +2 -8
- package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +6 -2
- package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +4 -1
- package/dist/Editor/Elements/Signature/SignaturePopup.js +17 -16
- package/dist/Editor/Elements/SimpleText/index.js +5 -4
- package/dist/Editor/Elements/SimpleText/style.js +2 -2
- package/dist/Editor/Elements/Table/DragButton.js +4 -2
- package/dist/Editor/Elements/Table/Table.js +24 -12
- package/dist/Editor/Elements/Table/TablePopup.js +4 -1
- package/dist/Editor/Elements/Table/TableSelector.js +10 -6
- package/dist/Editor/Elements/Table/TableTool.js +8 -4
- package/dist/Editor/Elements/Title/title.js +9 -8
- package/dist/Editor/Elements/TopBanner/TopBannerButton.js +4 -1
- package/dist/Editor/Elements/Variables/VariableButton.js +10 -1
- package/dist/Editor/MiniEditor.js +10 -3
- package/dist/Editor/Styles/EditorStyles.js +5 -5
- package/dist/Editor/Toolbar/Basic/index.js +2 -1
- package/dist/Editor/Toolbar/FormatTools/BlockButton.js +6 -2
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +27 -3
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -3
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +8 -4
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +10 -13
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +17 -5
- package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +10 -5
- package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +10 -4
- package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +10 -4
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +9 -3
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +42 -35
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +6 -13
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +58 -51
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +29 -22
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +226 -87
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +20 -10
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +10 -5
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +71 -11
- package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +11 -5
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +128 -45
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +436 -0
- package/dist/Editor/Toolbar/PopupTool/index.js +21 -11
- package/dist/Editor/Toolbar/Toolbar.js +20 -10
- package/dist/Editor/Toolbar/toolbarGroups.js +48 -6
- package/dist/Editor/assets/svg/ClearAllRounded.js +31 -0
- package/dist/Editor/assets/svg/ThemeIcons.js +291 -0
- package/dist/Editor/common/ColorPickerButton.js +39 -14
- package/dist/Editor/common/CustomColorPicker/index.js +131 -0
- package/dist/Editor/common/CustomColorPicker/style.js +53 -0
- package/dist/Editor/common/CustomDialog/index.js +8 -10
- package/dist/Editor/common/CustomDialog2/index.js +94 -0
- package/dist/Editor/common/CustomDialog2/style.js +67 -0
- package/dist/Editor/common/CustomSelect.js +43 -0
- package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
- package/dist/Editor/common/FontLoader/FontLoader.js +3 -0
- package/dist/Editor/common/Icon.js +28 -0
- package/dist/Editor/common/ImageSelector/ImageSelector.js +10 -8
- package/dist/Editor/common/ImageSelector/Options/AddLink.js +6 -4
- package/dist/Editor/common/ImageSelector/Options/Upload.js +1 -1
- package/dist/Editor/common/ImageSelector/Styles.js +3 -9
- package/dist/Editor/common/ImageSelector/UploadStyles.js +9 -9
- package/dist/Editor/common/LinkSettings/NavComponents.js +14 -10
- package/dist/Editor/common/LinkSettings/index.js +20 -14
- package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
- package/dist/Editor/common/MUIIcon/index.js +0 -3
- package/dist/Editor/common/MentionsPopup/index.js +6 -2
- package/dist/Editor/common/RnD/ContextMenu/CMenus.js +46 -22
- package/dist/Editor/common/RnD/ContextMenu/index.js +3 -2
- package/dist/Editor/common/RnD/ElementOptions/index.js +7 -2
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +8 -3
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +7 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +7 -4
- package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +6 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/styles.js +0 -1
- package/dist/Editor/common/RnD/OptionsPopup/index.js +4 -3
- package/dist/Editor/common/RnD/ShadowElement.js +2 -1
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +11 -4
- package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +17 -0
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +6 -3
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +55 -8
- package/dist/Editor/common/RnD/Utils/index.js +3 -0
- package/dist/Editor/common/RnD/VirtualElement/BoxHeaderAutoAlignment.js +43 -0
- package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +44 -0
- package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +134 -0
- package/dist/Editor/common/RnD/VirtualElement/helper.js +375 -0
- package/dist/Editor/common/RnD/VirtualElement/index.js +187 -103
- package/dist/Editor/common/RnD/VirtualElement/styles.js +151 -7
- package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +5 -3
- package/dist/Editor/common/RnD/index.js +64 -13
- package/dist/Editor/common/Section/index.js +7 -4
- package/dist/Editor/common/Shorthands/elements.js +74 -3
- package/dist/Editor/common/SnackBar/index.js +43 -0
- package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
- package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +6 -4
- package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
- package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
- package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +13 -9
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +11 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +19 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +22 -10
- package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +6 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +27 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +43 -14
- package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +10 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +19 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +5 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +9 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +8 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +12 -11
- package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +8 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +21 -12
- package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
- package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
- package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
- package/dist/Editor/common/StyleBuilder/index.js +8 -5
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +5 -7
- package/dist/Editor/common/SwipeableDrawer/index.js +1 -1
- package/dist/Editor/common/Uploader.js +16 -5
- package/dist/Editor/commonStyle.js +23 -12
- package/dist/Editor/helper/index.js +27 -3
- package/dist/Editor/helper/textIndeces.js +58 -0
- package/dist/Editor/helper/theme.js +202 -2
- package/dist/Editor/hooks/useAutoScroll.js +38 -0
- package/dist/Editor/hooks/useDrag.js +1 -1
- package/dist/Editor/hooks/useEditorScroll.js +0 -1
- package/dist/Editor/hooks/useEditorTheme.js +153 -0
- package/dist/Editor/hooks/useMouseMove.js +9 -3
- package/dist/Editor/hooks/useThemeValues.js +63 -0
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +11 -9
- package/dist/Editor/plugins/withLayout.js +3 -2
- package/dist/Editor/plugins/withLinks.js +9 -0
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/theme/ThemeList.js +50 -173
- package/dist/Editor/theme/index.js +149 -0
- package/dist/Editor/themeSettings/ActiveTheme.js +72 -0
- package/dist/Editor/themeSettings/buttons/index.js +290 -0
- package/dist/Editor/themeSettings/buttons/style.js +23 -0
- package/dist/Editor/themeSettings/colorTheme/index.js +310 -0
- package/dist/Editor/themeSettings/colorTheme/style.js +81 -0
- package/dist/Editor/themeSettings/fonts/PreviewElement.js +121 -0
- package/dist/Editor/themeSettings/fonts/index.js +240 -0
- package/dist/Editor/themeSettings/fonts/style.js +61 -0
- package/dist/Editor/themeSettings/icons.js +60 -0
- package/dist/Editor/themeSettings/index.js +351 -0
- package/dist/Editor/themeSettings/style.js +220 -0
- package/dist/Editor/themeSettingsAI/icons.js +96 -0
- package/dist/Editor/themeSettingsAI/index.js +355 -0
- package/dist/Editor/themeSettingsAI/saveTheme.js +205 -0
- package/dist/Editor/themeSettingsAI/style.js +259 -0
- package/dist/Editor/utils/SlateUtilityFunctions.js +177 -49
- package/dist/Editor/utils/draftToSlate.js +3 -2
- package/dist/Editor/utils/font.js +40 -37
- package/dist/Editor/utils/freegrid.js +3 -3
- package/dist/Editor/utils/helper.js +92 -21
- package/package.json +3 -3
@@ -27,7 +27,8 @@ const hideRowDragBtns = (hide, dragRowBtnCls) => {
|
|
27
27
|
const ToolTableComponent = props => {
|
28
28
|
const {
|
29
29
|
handleAction,
|
30
|
-
editorTheme
|
30
|
+
editorTheme,
|
31
|
+
translation
|
31
32
|
} = props;
|
32
33
|
const {
|
33
34
|
updateTableSelection
|
@@ -39,7 +40,8 @@ const ToolTableComponent = props => {
|
|
39
40
|
if (type === "duplicate") {
|
40
41
|
updateTableSelection(getDefaultTableSelection());
|
41
42
|
}
|
42
|
-
}
|
43
|
+
},
|
44
|
+
translation: translation
|
43
45
|
});
|
44
46
|
};
|
45
47
|
const MoreTableSettings = props => {
|
@@ -48,9 +50,13 @@ const MoreTableSettings = props => {
|
|
48
50
|
handleAction,
|
49
51
|
editorTheme,
|
50
52
|
setExpandTools,
|
51
|
-
classes
|
53
|
+
classes,
|
54
|
+
customProps
|
52
55
|
} = props;
|
53
56
|
const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
|
57
|
+
const {
|
58
|
+
translation
|
59
|
+
} = customProps;
|
54
60
|
return isMobile ? /*#__PURE__*/_jsx(SwipeableDrawerComponent, {
|
55
61
|
open: Boolean(exandTools),
|
56
62
|
onClose: () => {
|
@@ -61,7 +67,8 @@ const MoreTableSettings = props => {
|
|
61
67
|
sx: classes.mobileToolDrawer,
|
62
68
|
children: /*#__PURE__*/_jsx(ToolTableComponent, {
|
63
69
|
handleAction: handleAction,
|
64
|
-
editorTheme: editorTheme
|
70
|
+
editorTheme: editorTheme,
|
71
|
+
translation: translation
|
65
72
|
})
|
66
73
|
})
|
67
74
|
}) : /*#__PURE__*/_jsx(Popper, {
|
@@ -77,7 +84,8 @@ const MoreTableSettings = props => {
|
|
77
84
|
children: /*#__PURE__*/_jsx("div", {
|
78
85
|
children: /*#__PURE__*/_jsx(ToolTableComponent, {
|
79
86
|
handleAction: handleAction,
|
80
|
-
editorTheme: editorTheme
|
87
|
+
editorTheme: editorTheme,
|
88
|
+
translation: translation
|
81
89
|
})
|
82
90
|
})
|
83
91
|
})
|
@@ -92,7 +100,8 @@ const ToolBar = props => {
|
|
92
100
|
handleAction,
|
93
101
|
exandTools,
|
94
102
|
openSetttings,
|
95
|
-
hideTools
|
103
|
+
hideTools,
|
104
|
+
translation
|
96
105
|
} = props;
|
97
106
|
const {
|
98
107
|
getSelectedCells
|
@@ -105,7 +114,7 @@ const ToolBar = props => {
|
|
105
114
|
sx: classes.tableToolBar,
|
106
115
|
children: !hideTools.includes("settings") ? /*#__PURE__*/_jsxs(_Fragment, {
|
107
116
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
108
|
-
title: "Settings",
|
117
|
+
title: translation("Settings"),
|
109
118
|
arrow: true,
|
110
119
|
onClick: () => handleAction("settings"),
|
111
120
|
children: /*#__PURE__*/_jsx(IconButton, {
|
@@ -113,7 +122,7 @@ const ToolBar = props => {
|
|
113
122
|
children: /*#__PURE__*/_jsx(SettingsIcon, {})
|
114
123
|
})
|
115
124
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
116
|
-
title: "Show Tools",
|
125
|
+
title: translation("Show Tools"),
|
117
126
|
arrow: true,
|
118
127
|
onClick: handleExpand,
|
119
128
|
children: /*#__PURE__*/_jsx(IconButton, {
|
@@ -147,7 +156,8 @@ const Table = props => {
|
|
147
156
|
const {
|
148
157
|
readOnly,
|
149
158
|
isMobile,
|
150
|
-
hideTools = []
|
159
|
+
hideTools = [],
|
160
|
+
translation
|
151
161
|
} = customProps;
|
152
162
|
const [openSetttings, setOpenSettings] = useState(false);
|
153
163
|
const [exandTools, setExpandTools] = useState(null);
|
@@ -297,7 +307,7 @@ const Table = props => {
|
|
297
307
|
onScroll: handleScroll,
|
298
308
|
onMouseOver: onMouseOver,
|
299
309
|
onMouseLeave: onMouseLeave,
|
300
|
-
className:
|
310
|
+
className: "custom-scroll",
|
301
311
|
children: [/*#__PURE__*/_jsx(TableComp, {
|
302
312
|
className: readOnly ? "readOnly" : "",
|
303
313
|
sx: {
|
@@ -335,13 +345,15 @@ const Table = props => {
|
|
335
345
|
handleAction: handleAction,
|
336
346
|
exandTools: exandTools,
|
337
347
|
openSetttings: openSetttings,
|
338
|
-
hideTools: hideTools
|
348
|
+
hideTools: hideTools,
|
349
|
+
translation: translation
|
339
350
|
}), /*#__PURE__*/_jsx(MoreTableSettings, {
|
340
351
|
exandTools: exandTools,
|
341
352
|
handleAction: handleAction,
|
342
353
|
editorTheme: editorTheme,
|
343
354
|
setExpandTools: setExpandTools,
|
344
|
-
classes: classes
|
355
|
+
classes: classes,
|
356
|
+
customProps: customProps
|
345
357
|
}), openSetttings ? /*#__PURE__*/_jsx(TablePopup, {
|
346
358
|
element: tableProps?.styleProps || {},
|
347
359
|
onSave: onSave,
|
@@ -15,8 +15,11 @@ const TablePopup = props => {
|
|
15
15
|
styleType
|
16
16
|
} = props;
|
17
17
|
const styles = STYLE_TYPES[styleType] || tableStyle;
|
18
|
+
const {
|
19
|
+
translation
|
20
|
+
} = customProps;
|
18
21
|
return /*#__PURE__*/_jsx(StyleBuilder, {
|
19
|
-
title: "Table",
|
22
|
+
title: translation("Table"),
|
20
23
|
type: "gridStyle",
|
21
24
|
element: element,
|
22
25
|
onSave: onSave,
|
@@ -10,7 +10,8 @@ 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
|
13
|
+
icoBtnType,
|
14
|
+
customProps
|
14
15
|
}) => {
|
15
16
|
const tableOptionsRef = useRef();
|
16
17
|
const [selection, setSelection] = useState();
|
@@ -20,6 +21,9 @@ const TableSelector = ({
|
|
20
21
|
column: 2
|
21
22
|
});
|
22
23
|
const table = new TableUtil(editor);
|
24
|
+
const {
|
25
|
+
translation
|
26
|
+
} = customProps;
|
23
27
|
const handleButtonClick = () => {
|
24
28
|
setSelection(editor.selection);
|
25
29
|
setShowOptions(true);
|
@@ -72,7 +76,7 @@ const TableSelector = ({
|
|
72
76
|
variant: "h6",
|
73
77
|
className: "popupTitle",
|
74
78
|
color: "primary",
|
75
|
-
children: "Table"
|
79
|
+
children: translation("Table")
|
76
80
|
}), /*#__PURE__*/_jsx(Grid, {
|
77
81
|
style: {
|
78
82
|
display: "flex"
|
@@ -110,7 +114,7 @@ const TableSelector = ({
|
|
110
114
|
fontSize: "14px",
|
111
115
|
fontWeight: 500
|
112
116
|
},
|
113
|
-
children: "
|
117
|
+
children: translation("numberOfRow")
|
114
118
|
})
|
115
119
|
}), /*#__PURE__*/_jsx(TextField, {
|
116
120
|
fullWidth: true,
|
@@ -137,7 +141,7 @@ const TableSelector = ({
|
|
137
141
|
fontSize: "14px",
|
138
142
|
fontWeight: 500
|
139
143
|
},
|
140
|
-
children: "
|
144
|
+
children: translation("numberOfCoumns")
|
141
145
|
})
|
142
146
|
}), /*#__PURE__*/_jsx(TextField, {
|
143
147
|
fullWidth: true,
|
@@ -158,11 +162,11 @@ const TableSelector = ({
|
|
158
162
|
children: [/*#__PURE__*/_jsx(Button, {
|
159
163
|
onClick: onCancel,
|
160
164
|
className: "secondaryBtn",
|
161
|
-
children: "Cancel"
|
165
|
+
children: translation("Cancel")
|
162
166
|
}), /*#__PURE__*/_jsx(Button, {
|
163
167
|
onClick: handleInsert,
|
164
168
|
className: "primaryBtn",
|
165
|
-
children: "Save"
|
169
|
+
children: translation("Save")
|
166
170
|
})]
|
167
171
|
})]
|
168
172
|
})
|
@@ -67,7 +67,8 @@ export function TableToolOnDrag({
|
|
67
67
|
theme,
|
68
68
|
dragType,
|
69
69
|
handleToolAction,
|
70
|
-
hideDelete
|
70
|
+
hideDelete,
|
71
|
+
translation
|
71
72
|
}) {
|
72
73
|
const classes = Styles(theme);
|
73
74
|
const tools = getTools(dragType, hideDelete);
|
@@ -81,12 +82,14 @@ export function TableToolOnDrag({
|
|
81
82
|
btnProps: {
|
82
83
|
onMouseDown: e => e.stopPropagation(),
|
83
84
|
onMouseUp: e => e.stopPropagation()
|
84
|
-
}
|
85
|
+
},
|
86
|
+
translation: translation
|
85
87
|
});
|
86
88
|
}
|
87
89
|
function TableTool({
|
88
90
|
theme,
|
89
|
-
handleToolAction
|
91
|
+
handleToolAction,
|
92
|
+
translation
|
90
93
|
}) {
|
91
94
|
const classes = Styles(theme);
|
92
95
|
return /*#__PURE__*/_jsx(CustomSelect, {
|
@@ -95,7 +98,8 @@ function TableTool({
|
|
95
98
|
options: wholeTableTools,
|
96
99
|
onSend: (value, option) => {
|
97
100
|
handleToolAction(value, option);
|
98
|
-
}
|
101
|
+
},
|
102
|
+
translation: translation
|
99
103
|
});
|
100
104
|
}
|
101
105
|
export default TableTool;
|
@@ -1,9 +1,16 @@
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
2
|
-
import { Editor
|
2
|
+
import { Editor } from "slate";
|
3
3
|
import { useSlate } from "slate-react";
|
4
4
|
import { getNodeText } from "../../utils/helper";
|
5
|
+
import { Text } from "slate";
|
5
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
|
+
const isEmptyTextNode = node => {
|
9
|
+
if (Text.isText(node)) {
|
10
|
+
return !node.text.trim();
|
11
|
+
}
|
12
|
+
return false;
|
13
|
+
};
|
7
14
|
const Title = props => {
|
8
15
|
const {
|
9
16
|
attributes,
|
@@ -11,8 +18,8 @@ const Title = props => {
|
|
11
18
|
element,
|
12
19
|
customProps
|
13
20
|
} = props;
|
14
|
-
const isEmpty = !customProps?.readOnly && isEmptyTextNode(element?.children[0]) ? "empty" : "";
|
15
21
|
useDetectExitFromTitle(element, customProps?.getTitleSaveData);
|
22
|
+
const isEmpty = !customProps?.readOnly && isEmptyTextNode(element?.children[0]) ? "empty" : "";
|
16
23
|
return /*#__PURE__*/_jsxs("div", {
|
17
24
|
...attributes,
|
18
25
|
placeholder: "Title",
|
@@ -50,10 +57,4 @@ const useDetectExitFromTitle = (titleNode, onSaveTitle) => {
|
|
50
57
|
}
|
51
58
|
}, [editor.selection]);
|
52
59
|
return null;
|
53
|
-
};
|
54
|
-
const isEmptyTextNode = node => {
|
55
|
-
if (Text.isText(node)) {
|
56
|
-
return !node.text.trim();
|
57
|
-
}
|
58
|
-
return false;
|
59
60
|
};
|
@@ -13,6 +13,9 @@ const TopBannerButton = props => {
|
|
13
13
|
customProps
|
14
14
|
} = props;
|
15
15
|
const [open, setOpen] = useState(false);
|
16
|
+
const {
|
17
|
+
translation
|
18
|
+
} = customProps;
|
16
19
|
const onSelectImage = url => {
|
17
20
|
if (url) {
|
18
21
|
insertTopBanner(editor, {
|
@@ -29,7 +32,7 @@ const TopBannerButton = props => {
|
|
29
32
|
};
|
30
33
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
31
34
|
children: [/*#__PURE__*/_jsx(ToolbarIcon, {
|
32
|
-
title: "Top Banner",
|
35
|
+
title: translation("Top Banner"),
|
33
36
|
onClick: handleClick,
|
34
37
|
icon: /*#__PURE__*/_jsx(Icon, {
|
35
38
|
icon: "topbanner"
|
@@ -34,7 +34,8 @@ const VariableButton = props => {
|
|
34
34
|
PaperProps: {
|
35
35
|
style: {
|
36
36
|
maxHeight: 300,
|
37
|
-
overflowY: "auto"
|
37
|
+
overflowY: "auto",
|
38
|
+
transformOrigin: 'top left'
|
38
39
|
},
|
39
40
|
sx: {
|
40
41
|
"&::-webkit-scrollbar-track": {
|
@@ -44,6 +45,14 @@ const VariableButton = props => {
|
|
44
45
|
borderRadius: "16px"
|
45
46
|
}
|
46
47
|
}
|
48
|
+
},
|
49
|
+
anchorOrigin: {
|
50
|
+
vertical: 'bottom',
|
51
|
+
horizontal: 'right'
|
52
|
+
},
|
53
|
+
transformOrigin: {
|
54
|
+
vertical: 'top',
|
55
|
+
horizontal: 'right'
|
47
56
|
}
|
48
57
|
},
|
49
58
|
children: [/*#__PURE__*/_jsx(MenuItem, {
|
@@ -26,7 +26,8 @@ const MiniEditor = props => {
|
|
26
26
|
className,
|
27
27
|
otherProps,
|
28
28
|
onSave,
|
29
|
-
theme
|
29
|
+
theme,
|
30
|
+
translation
|
30
31
|
} = props;
|
31
32
|
const {
|
32
33
|
CHARACTERS = []
|
@@ -41,11 +42,16 @@ const MiniEditor = props => {
|
|
41
42
|
const [value, setValue] = useState(ensureWrappedVariables(updatedContent));
|
42
43
|
const [deboundedValue] = useDebounce(value, 500);
|
43
44
|
const isReadOnly = readOnly === "readonly";
|
45
|
+
const {
|
46
|
+
translationMock
|
47
|
+
} = otherProps;
|
48
|
+
const dummyTranslation = () => {};
|
44
49
|
const customProps = {
|
45
50
|
...(otherProps || {}),
|
46
51
|
readOnly: isReadOnly,
|
47
52
|
editorPlaceholder: miniEditorPlaceholder,
|
48
|
-
page_id: id
|
53
|
+
page_id: id,
|
54
|
+
translation: translation || translationMock || dummyTranslation
|
49
55
|
};
|
50
56
|
const [mentions, setMentions] = useMentions({
|
51
57
|
editor,
|
@@ -58,7 +64,8 @@ const MiniEditor = props => {
|
|
58
64
|
} = mentions;
|
59
65
|
const chars = type ? Shorthands[type]({
|
60
66
|
...mentions,
|
61
|
-
CHARACTERS
|
67
|
+
CHARACTERS,
|
68
|
+
translation: translation || translationMock
|
62
69
|
}) : [];
|
63
70
|
useEffect(() => {
|
64
71
|
if (onSave && isInteracted) {
|
@@ -133,7 +133,7 @@ const editorStyles = ({
|
|
133
133
|
},
|
134
134
|
"& .accordion-summary-collapse-btn": {
|
135
135
|
padding: "4px",
|
136
|
-
width:
|
136
|
+
width: "5px"
|
137
137
|
},
|
138
138
|
"& .workflow-icon-btn": {
|
139
139
|
pointerEvents: "none",
|
@@ -242,7 +242,7 @@ const editorStyles = ({
|
|
242
242
|
}
|
243
243
|
},
|
244
244
|
"& .section-tw": {
|
245
|
-
background:
|
245
|
+
background: "transparent !important",
|
246
246
|
"& button": {
|
247
247
|
padding: "2px",
|
248
248
|
borderRadius: "0px",
|
@@ -291,8 +291,8 @@ const editorStyles = ({
|
|
291
291
|
}
|
292
292
|
},
|
293
293
|
"& ::selection": {
|
294
|
-
background:
|
295
|
-
color:
|
294
|
+
background: "rgba(35, 131, 226, 0.35)!important",
|
295
|
+
color: "inherit"
|
296
296
|
},
|
297
297
|
"&.readOnlyContainer": {
|
298
298
|
"& .max-content": {
|
@@ -302,7 +302,7 @@ const editorStyles = ({
|
|
302
302
|
},
|
303
303
|
fullScreenWrapper: {
|
304
304
|
"& .editor-wrapper": {
|
305
|
-
paddingTop:
|
305
|
+
paddingTop: "20px"
|
306
306
|
},
|
307
307
|
"& .MuiDialog-paper, & .MuiPopover-paper": {
|
308
308
|
background: `${theme?.palette?.editor?.background} !important`
|
@@ -59,7 +59,8 @@ const BasicToolbar = props => {
|
|
59
59
|
children: fontStyle?.map((m, i) => {
|
60
60
|
return /*#__PURE__*/_jsx(MarkButton, {
|
61
61
|
editor: editor,
|
62
|
-
...m
|
62
|
+
...m,
|
63
|
+
customProps: customProps
|
63
64
|
}, `pptool_mark_${i}_${m.id}`);
|
64
65
|
})
|
65
66
|
}), !hideLink && /*#__PURE__*/_jsx(Grid, {
|
@@ -10,8 +10,12 @@ const BlockButton = props => {
|
|
10
10
|
const {
|
11
11
|
editor,
|
12
12
|
format,
|
13
|
-
title
|
13
|
+
title,
|
14
|
+
customProps
|
14
15
|
} = props;
|
16
|
+
const {
|
17
|
+
translation
|
18
|
+
} = customProps;
|
15
19
|
const isMark = MARK_TYPES?.indexOf(format) >= 0;
|
16
20
|
const isActive = isMark ? isMarkActive(editor, format) : isBlockActive(editor, format);
|
17
21
|
const {
|
@@ -29,7 +33,7 @@ const BlockButton = props => {
|
|
29
33
|
toggleBlock(editor, format);
|
30
34
|
}
|
31
35
|
},
|
32
|
-
title: title,
|
36
|
+
title: translation(title),
|
33
37
|
sx: classes.textAlignButtons,
|
34
38
|
style: {
|
35
39
|
color: "#64748B"
|
@@ -1,8 +1,32 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Select, MenuItem } from "@mui/material";
|
3
|
-
import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions.js";
|
3
|
+
import { addMarkData, activeMark, getSelectedElementStyle } from "../../utils/SlateUtilityFunctions.js";
|
4
|
+
import { toolbarGroups } from "../toolbarGroups.js";
|
4
5
|
import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
|
6
|
+
import { googleFontList as defaultFonts } from "../../common/FontLoader/FontList.js";
|
5
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
|
+
const allTools = toolbarGroups.flat();
|
9
|
+
const fontWeight = allTools.find(f => f.format === "fontWeight");
|
10
|
+
export const getValue = (editor, format) => {
|
11
|
+
switch (format) {
|
12
|
+
case "fontFamily":
|
13
|
+
{
|
14
|
+
const style = getSelectedElementStyle("font-family", editor, format);
|
15
|
+
return style || defaultFonts[0];
|
16
|
+
}
|
17
|
+
case "fontWeight":
|
18
|
+
{
|
19
|
+
const {
|
20
|
+
options
|
21
|
+
} = fontWeight || {};
|
22
|
+
const fontWeightStyle = getSelectedElementStyle("font-weight", editor, format);
|
23
|
+
const selected = options?.find(o => o.value === fontWeightStyle || o.numVal === fontWeightStyle);
|
24
|
+
return selected?.value;
|
25
|
+
}
|
26
|
+
default:
|
27
|
+
return activeMark(editor, format);
|
28
|
+
}
|
29
|
+
};
|
6
30
|
const Dropdown = ({
|
7
31
|
classes,
|
8
32
|
editor,
|
@@ -10,7 +34,7 @@ const Dropdown = ({
|
|
10
34
|
options,
|
11
35
|
width
|
12
36
|
}) => {
|
13
|
-
const value = activeMark(editor, format);
|
37
|
+
const value = activeMark(editor, format, true) || getValue(editor, format);
|
14
38
|
const changeMarkData = (event, format) => {
|
15
39
|
event.preventDefault();
|
16
40
|
const value = event.target.value;
|
@@ -20,7 +44,7 @@ const Dropdown = ({
|
|
20
44
|
});
|
21
45
|
};
|
22
46
|
return /*#__PURE__*/_jsx(Select, {
|
23
|
-
value: value,
|
47
|
+
value: value || options?.[0]?.value,
|
24
48
|
className: "editor-dd",
|
25
49
|
onChange: e => changeMarkData(e, format),
|
26
50
|
MenuProps: {
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Autocomplete, TextField } from "@mui/material";
|
3
|
-
import {
|
3
|
+
import { addMarkData } from "../../utils/SlateUtilityFunctions.js";
|
4
4
|
import usePopupStyle from "../PopupTool/PopupToolStyle.js";
|
5
5
|
import { useEditorContext } from "../../hooks/useMouseMove.js";
|
6
|
-
import KeyboardArrowDownRoundedIcon from
|
6
|
+
import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
|
7
|
+
import { getValue } from "./Dropdown.js";
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
9
|
const FontFamilyAutocomplete = ({
|
9
10
|
editor,
|
@@ -14,7 +15,7 @@ const FontFamilyAutocomplete = ({
|
|
14
15
|
val = "",
|
15
16
|
webFont = false
|
16
17
|
}) => {
|
17
|
-
const markValue =
|
18
|
+
const markValue = getValue(editor, format);
|
18
19
|
const value = !webFont ? markValue : val;
|
19
20
|
const changeMarkData = (event, newValue, format) => {
|
20
21
|
if (!webFont) {
|
@@ -1,21 +1,25 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import Icon from "../../common/Icon";
|
3
3
|
import Button from "../../common/Button";
|
4
|
-
import { toggleMark,
|
4
|
+
import { toggleMark, isMarkBtnActive } from "../../utils/SlateUtilityFunctions.js";
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
6
|
const MarkButton = ({
|
7
7
|
editor,
|
8
8
|
format,
|
9
|
-
title
|
9
|
+
title,
|
10
|
+
customProps
|
10
11
|
}) => {
|
12
|
+
const {
|
13
|
+
translation
|
14
|
+
} = customProps;
|
11
15
|
return /*#__PURE__*/_jsx(Button, {
|
12
|
-
active:
|
16
|
+
active: isMarkBtnActive(editor, format),
|
13
17
|
format: format,
|
14
18
|
onMouseDown: e => {
|
15
19
|
e.preventDefault();
|
16
20
|
toggleMark(editor, format);
|
17
21
|
},
|
18
|
-
title: title,
|
22
|
+
title: translation(title),
|
19
23
|
style: {
|
20
24
|
color: "#64748B"
|
21
25
|
},
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
2
2
|
import { TextField, IconButton } from "@mui/material";
|
3
|
-
import { addMarkData, activeMark
|
4
|
-
import {
|
5
|
-
import { getBreakPointsValue } from "../../helper/theme.js";
|
3
|
+
import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions.js";
|
4
|
+
import { getBreakPointsValue, getTextSizeVal } from "../../helper/theme.js";
|
6
5
|
import useWindowResize from "../../hooks/useWindowResize.js";
|
7
6
|
import { BREAKPOINTS_DEVICES } from "../../helper/theme.js";
|
8
7
|
import { TextSizeDownArrow, TextSizeUpArrow } from "../../common/iconListV2.js";
|
@@ -15,11 +14,15 @@ const TextSize = ({
|
|
15
14
|
format,
|
16
15
|
fullWidth
|
17
16
|
}) => {
|
18
|
-
const [size] = useWindowResize();
|
19
|
-
const val = activeMark(editor, format);
|
20
|
-
const value = getBreakPointsValue(val, size?.device);
|
21
17
|
const [fontSize, setFontSize] = useState();
|
22
18
|
const timerRef = useRef();
|
19
|
+
const [size] = useWindowResize();
|
20
|
+
const val = activeMark(editor, format);
|
21
|
+
|
22
|
+
// const noFontSize =
|
23
|
+
// val === "normal" || (typeof val === "object" && !Object.keys(val)?.length);
|
24
|
+
|
25
|
+
const value = getTextSizeVal(editor);
|
23
26
|
useEffect(() => {
|
24
27
|
setFontSize(getSizeVal());
|
25
28
|
}, [value]);
|
@@ -55,13 +58,7 @@ const TextSize = ({
|
|
55
58
|
};
|
56
59
|
const getSizeVal = () => {
|
57
60
|
try {
|
58
|
-
|
59
|
-
Object.entries(headingMap).forEach(([format, value]) => {
|
60
|
-
if (isBlockActive(editor, format) && isNaN(parseInt(size))) {
|
61
|
-
size = value;
|
62
|
-
}
|
63
|
-
});
|
64
|
-
return parseInt(size);
|
61
|
+
return parseInt(value);
|
65
62
|
} catch (err) {
|
66
63
|
return "";
|
67
64
|
}
|
@@ -10,6 +10,7 @@ import usePopupStyle from "../PopupTool/PopupToolStyle";
|
|
10
10
|
import PopperHeader from "../PopupTool/PopperHeader";
|
11
11
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
12
12
|
import PageSettingsButton from "../../Elements/PageSettings/PageSettingsButton";
|
13
|
+
import { isFreeGrid } from "../../utils/helper";
|
13
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
14
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
15
16
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -31,6 +32,16 @@ const POPUP_TITLE = {
|
|
31
32
|
addElement: "Add Elements",
|
32
33
|
addTemplate: "Templates"
|
33
34
|
};
|
35
|
+
const disableAddElementBtn = editor => {
|
36
|
+
if (isFreeGrid(editor?.children || [])) {
|
37
|
+
return true;
|
38
|
+
}
|
39
|
+
const isFocused = !!editor?.selection?.anchor?.path;
|
40
|
+
if (!isFocused) {
|
41
|
+
return true;
|
42
|
+
}
|
43
|
+
return false;
|
44
|
+
};
|
34
45
|
const MiniToolbar = props => {
|
35
46
|
const {
|
36
47
|
customProps,
|
@@ -49,7 +60,8 @@ const MiniToolbar = props => {
|
|
49
60
|
const open = Boolean(PopupComponent);
|
50
61
|
const DialogComp = !fullScreen ? Popper : Dialog;
|
51
62
|
const {
|
52
|
-
hideTools
|
63
|
+
hideTools,
|
64
|
+
translation
|
53
65
|
} = customProps;
|
54
66
|
const boxRef = useRef(null); // Add ref to get the Box element
|
55
67
|
const UPDATED_MENU_OPTIONS = MENU_OPTIONS.filter(f => (hideTools || [])?.indexOf(f.type) === -1);
|
@@ -140,11 +152,10 @@ const MiniToolbar = props => {
|
|
140
152
|
icon: Icon
|
141
153
|
}) => {
|
142
154
|
const isDisabled = popupType === type || type === "undo" ? !canUndo : type === "redo" ? !canRedo : false;
|
143
|
-
const
|
144
|
-
const disableAddElement = type === "addElement" && !isFocussed;
|
155
|
+
const disableAddElement = type === "addElement" && disableAddElementBtn(editor);
|
145
156
|
return /*#__PURE__*/_jsxs(Tooltip, {
|
146
157
|
arrow: true,
|
147
|
-
title: label,
|
158
|
+
title: translation(label),
|
148
159
|
disableHoverListener: toolTip,
|
149
160
|
children: [type !== "page-settings" && /*#__PURE__*/_jsx(IconButton, {
|
150
161
|
className: `${type === popper ? "active" : ""} ${type === "undo" && !canUndo || type === "redo" && !canRedo ? "disabled" : ""} ${type === "undo" ? canUndo ? "activeUndo" : "disabledUndo" : type === "redo" ? canRedo ? "activeRedo" : "disabledRedo" : ""} ${disableAddElement ? "disableAddElement" : ""}
|
@@ -194,7 +205,8 @@ const MiniToolbar = props => {
|
|
194
205
|
fullScreen: fullScreen,
|
195
206
|
toggleFullscreen: toggleFullscreen,
|
196
207
|
search: search,
|
197
|
-
onSearch: onSearch
|
208
|
+
onSearch: onSearch,
|
209
|
+
customProps: customProps
|
198
210
|
}), /*#__PURE__*/_jsx(PopupComponent, {
|
199
211
|
classes: popupStyles,
|
200
212
|
editor: editor,
|
@@ -135,14 +135,16 @@ const AddTemplates = props => {
|
|
135
135
|
classes: classes,
|
136
136
|
onSelectTemplate: onSelectTemplate,
|
137
137
|
m: mapData,
|
138
|
-
fullScreen: fullScreen
|
138
|
+
fullScreen: fullScreen,
|
139
|
+
customProps: customProps
|
139
140
|
}, `template_Card_${mapData.id}_popup`);
|
140
141
|
case "Buttons":
|
141
142
|
return /*#__PURE__*/_jsx(ButtonTemplateCard, {
|
142
143
|
classes: classes,
|
143
144
|
onSelectTemplate: onSelectTemplate,
|
144
145
|
m: mapData,
|
145
|
-
fullScreen: fullScreen
|
146
|
+
fullScreen: fullScreen,
|
147
|
+
customProps: customProps
|
146
148
|
}, `template_Card_${mapData.id}_popup`);
|
147
149
|
case "Banners":
|
148
150
|
case "Tables":
|
@@ -151,7 +153,8 @@ const AddTemplates = props => {
|
|
151
153
|
onSelectTemplate: onSelectTemplate,
|
152
154
|
m: mapData,
|
153
155
|
fullScreen: fullScreen,
|
154
|
-
height: "smallCard"
|
156
|
+
height: "smallCard",
|
157
|
+
customProps: customProps
|
155
158
|
}, `template_Card_${mapData.id}_popup`);
|
156
159
|
case "404 Page":
|
157
160
|
return /*#__PURE__*/_jsx(FullViewCard, {
|
@@ -159,14 +162,16 @@ const AddTemplates = props => {
|
|
159
162
|
onSelectTemplate: onSelectTemplate,
|
160
163
|
m: mapData,
|
161
164
|
fullScreen: fullScreen,
|
162
|
-
height: "mediumCard"
|
165
|
+
height: "mediumCard",
|
166
|
+
customProps: customProps
|
163
167
|
}, `template_Card_${mapData.id}_popup`);
|
164
168
|
default:
|
165
169
|
return /*#__PURE__*/_jsx(TemplateCard, {
|
166
170
|
classes: classes,
|
167
171
|
onSelectTemplate: onSelectTemplate,
|
168
172
|
m: mapData,
|
169
|
-
fullScreen: fullScreen
|
173
|
+
fullScreen: fullScreen,
|
174
|
+
customProps: customProps
|
170
175
|
}, `template_Card_${mapData.id}_popup`);
|
171
176
|
}
|
172
177
|
};
|