@flozy/editor 9.8.3 → 9.8.4
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 +26 -19
- package/dist/Editor/CommonEditor.js +141 -26
- package/dist/Editor/DialogWrapper.js +31 -25
- package/dist/Editor/Editor.css +11 -7
- 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 +448 -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 +16 -11
- package/dist/Editor/Elements/Embed/Video.js +10 -7
- 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 +54 -6
- 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 +18 -10
- 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 +14 -5
- 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 +23 -11
- 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 +122 -42
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +436 -0
- package/dist/Editor/Toolbar/PopupTool/index.js +18 -2
- 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/ResetIconNew.js +23 -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 +31 -1
- package/dist/Editor/common/ImageSelector/ImageSelector.js +10 -8
- package/dist/Editor/common/ImageSelector/Options/AddLink.js +6 -4
- package/dist/Editor/common/ImageSelector/Styles.js +3 -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/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 +73 -9
- 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 +382 -0
- package/dist/Editor/common/RnD/VirtualElement/index.js +187 -103
- package/dist/Editor/common/RnD/VirtualElement/styles.js +155 -7
- package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +5 -3
- package/dist/Editor/common/RnD/index.js +69 -13
- package/dist/Editor/common/Section/index.js +7 -4
- package/dist/Editor/common/Shorthands/elements.js +72 -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/lineSpacing.js +7 -6
- 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 +68 -57
- 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/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 +10 -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 +186 -54
- package/dist/Editor/utils/brains.js +1 -2
- 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 +4 -4
@@ -9,20 +9,20 @@ const FormStyles = theme => ({
|
|
9
9
|
color: "#94A3B8"
|
10
10
|
},
|
11
11
|
bodyTextArea: {
|
12
|
-
|
13
|
-
padding:
|
14
|
-
|
15
|
-
outline:
|
16
|
-
border:
|
12
|
+
"& .mini-editor-cls": {
|
13
|
+
padding: "12px",
|
14
|
+
"&:focus-visible": {
|
15
|
+
outline: "none",
|
16
|
+
border: "none"
|
17
17
|
}
|
18
18
|
},
|
19
19
|
"& .editorWorkflow": {
|
20
|
-
minHeight:
|
21
|
-
padding:
|
20
|
+
minHeight: "130px",
|
21
|
+
padding: "12px",
|
22
22
|
paddingBottom: 0,
|
23
|
-
|
24
|
-
outline:
|
25
|
-
border:
|
23
|
+
"&:focus-visible": {
|
24
|
+
outline: "none",
|
25
|
+
border: "none"
|
26
26
|
}
|
27
27
|
}
|
28
28
|
},
|
@@ -105,7 +105,7 @@ const FormStyles = theme => ({
|
|
105
105
|
padding: "4px 22px",
|
106
106
|
textTransform: "none",
|
107
107
|
border: "1px solid #D8DDE1",
|
108
|
-
minWidth:
|
108
|
+
minWidth: "126px",
|
109
109
|
"& svg": {
|
110
110
|
"& path": {
|
111
111
|
stroke: "#64748B"
|
@@ -169,17 +169,19 @@ const FormStyles = theme => ({
|
|
169
169
|
}
|
170
170
|
},
|
171
171
|
colorButtonSingle: {
|
172
|
+
border: "1.5px solid #DCE4EC !important",
|
172
173
|
"&.active": {
|
173
|
-
"&:before": {
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
}
|
174
|
+
// "&:before": {
|
175
|
+
// content: '" "',
|
176
|
+
// position: "absolute",
|
177
|
+
// top: "-5px",
|
178
|
+
// left: "-5px",
|
179
|
+
// width: "calc(100% + 4px)",
|
180
|
+
// height: "calc(100% + 4px)",
|
181
|
+
// border: "3px solid blue",
|
182
|
+
// borderRadius: "50%",
|
183
|
+
// },
|
184
|
+
outline: "2px solid #2563EB"
|
183
185
|
}
|
184
186
|
},
|
185
187
|
colorButtonsInner: {
|
@@ -249,7 +251,7 @@ const FormStyles = theme => ({
|
|
249
251
|
}
|
250
252
|
},
|
251
253
|
root: {
|
252
|
-
padding:
|
254
|
+
padding: "10px"
|
253
255
|
}
|
254
256
|
});
|
255
257
|
export default FormStyles;
|
@@ -10,7 +10,8 @@ const UserInputs = props => {
|
|
10
10
|
type,
|
11
11
|
subject,
|
12
12
|
handleField,
|
13
|
-
onSave
|
13
|
+
onSave,
|
14
|
+
translation
|
14
15
|
} = props;
|
15
16
|
const editorRef = useRef();
|
16
17
|
const variables = element?.children;
|
@@ -39,7 +40,8 @@ const UserInputs = props => {
|
|
39
40
|
fontStyleOptions: ['underline'],
|
40
41
|
hideLink: true,
|
41
42
|
hideTextColor: true
|
42
|
-
}
|
43
|
+
},
|
44
|
+
translation: translation
|
43
45
|
})
|
44
46
|
})
|
45
47
|
});
|
@@ -17,8 +17,12 @@ const Workflow = props => {
|
|
17
17
|
element: propElement,
|
18
18
|
closeWorkflow,
|
19
19
|
onSave,
|
20
|
-
customWorkflowElement = null
|
20
|
+
customWorkflowElement = null,
|
21
|
+
customProps
|
21
22
|
} = props;
|
23
|
+
const {
|
24
|
+
translation
|
25
|
+
} = customProps;
|
22
26
|
// replacing element for forms in DND
|
23
27
|
const element = customWorkflowElement ? customWorkflowElement : propElement;
|
24
28
|
const {
|
@@ -34,11 +38,11 @@ const Workflow = props => {
|
|
34
38
|
const [scheduleEvery, setScheduleEvery] = useState("minutes");
|
35
39
|
const currentInstant = scheduleEvery === "minutes" ? minutes : scheduleEvery === "hours" ? hours : scheduleEvery === "days" ? days : [];
|
36
40
|
const [scheduleOn, setScheduleOn] = useState(currentInstant[0]);
|
37
|
-
const [subject, setSubject] = useState("
|
41
|
+
const [subject, setSubject] = useState(translation("welcomFlozt"));
|
38
42
|
const [bodyData, setBodyData] = useState([{
|
39
43
|
type: "paragraph",
|
40
44
|
children: [{
|
41
|
-
text: "
|
45
|
+
text: translation("writeSometing")
|
42
46
|
}]
|
43
47
|
}]);
|
44
48
|
const [flowEdited, setFlowEdited] = useState({
|
@@ -156,7 +160,7 @@ const Workflow = props => {
|
|
156
160
|
children: [formData && /*#__PURE__*/_jsx(IconButton, {
|
157
161
|
onClick: onFormBack,
|
158
162
|
children: /*#__PURE__*/_jsx(ArrowBackIcon, {})
|
159
|
-
}), "
|
163
|
+
}), translation("flowUpEmail"), !formData && workflowList?.length > 0 && /*#__PURE__*/_jsxs(Button, {
|
160
164
|
variant: "outlined",
|
161
165
|
sx: {
|
162
166
|
textTransform: "none",
|
@@ -166,13 +170,14 @@ const Workflow = props => {
|
|
166
170
|
onClick: handleAddFormWorkflow,
|
167
171
|
size: "small",
|
168
172
|
startIcon: /*#__PURE__*/_jsx(PlusIcon, {}),
|
169
|
-
children: [" ", "
|
173
|
+
children: [" ", translation("newEmail")]
|
170
174
|
})]
|
171
175
|
}), /*#__PURE__*/_jsxs(DialogContent, {
|
172
176
|
children: [!formData && workflowList?.length > 0 && /*#__PURE__*/_jsx(ListWorkflow, {
|
173
177
|
workflow: workflowList,
|
174
178
|
handleEditFormWorkflow: handleEditFormWorkflow,
|
175
|
-
handleDeleteFormWorkflow: handleDeleteFormWorkflow
|
179
|
+
handleDeleteFormWorkflow: handleDeleteFormWorkflow,
|
180
|
+
customProps: customProps
|
176
181
|
}), (formData || workflowList?.length === 0) && /*#__PURE__*/_jsx(FormWorkflow, {
|
177
182
|
subject: subject,
|
178
183
|
schedule: schedule,
|
@@ -189,7 +194,8 @@ const Workflow = props => {
|
|
189
194
|
setScheduleOn: setScheduleOn,
|
190
195
|
handleSelectedVariables: handleSelectedVariables,
|
191
196
|
handleInputReset: handleInputReset,
|
192
|
-
classes: classes
|
197
|
+
classes: classes,
|
198
|
+
customProps: customProps
|
193
199
|
})]
|
194
200
|
}), /*#__PURE__*/_jsxs(DialogActions, {
|
195
201
|
sx: classes.dialogFooter,
|
@@ -198,13 +204,13 @@ const Workflow = props => {
|
|
198
204
|
sx: classes.closeBtn,
|
199
205
|
onClick: closeWorkflow,
|
200
206
|
size: "small",
|
201
|
-
children: "Close"
|
207
|
+
children: translation("Close")
|
202
208
|
}), (formData || workflowList?.length === 0) && /*#__PURE__*/_jsx(Button, {
|
203
209
|
className: "primaryBtn",
|
204
210
|
sx: classes.saveBtn,
|
205
211
|
onClick: saveFormWorkflow,
|
206
212
|
size: "small",
|
207
|
-
children: "Save"
|
213
|
+
children: translation("Save")
|
208
214
|
})]
|
209
215
|
})]
|
210
216
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React from "react";
|
1
|
+
import React, { useEffect, useRef, useState } from "react";
|
2
2
|
import { Path, Transforms, Node } from "slate";
|
3
3
|
import { ReactEditor, useSlateStatic } from "slate-react";
|
4
4
|
import { Box, useTheme } from "@mui/material";
|
@@ -43,12 +43,14 @@ const FreeGrid = props => {
|
|
43
43
|
} = props;
|
44
44
|
const {
|
45
45
|
sectionName,
|
46
|
-
sectionBorderRadius
|
46
|
+
sectionBorderRadius,
|
47
|
+
height_xs
|
47
48
|
} = element;
|
48
49
|
const {
|
49
50
|
readOnly,
|
50
51
|
customSX,
|
51
|
-
hideTools
|
52
|
+
hideTools,
|
53
|
+
translation
|
52
54
|
} = customProps;
|
53
55
|
const {
|
54
56
|
updated_at,
|
@@ -63,11 +65,14 @@ const FreeGrid = props => {
|
|
63
65
|
const {
|
64
66
|
setSelectedElement
|
65
67
|
} = useEditorContext();
|
68
|
+
const [autoAlign, setAutoAlign] = useState(false);
|
69
|
+
const count = useRef(2);
|
70
|
+
const childrenCountRef = useRef(element?.children?.length);
|
66
71
|
const onChange = data => {
|
67
72
|
const append = breakpoint === "lg" ? "" : `_${breakpoint}`;
|
68
73
|
const updateData = {
|
69
74
|
...data,
|
70
|
-
[`height${append}`]:
|
75
|
+
[`height${append}`]: data.height
|
71
76
|
};
|
72
77
|
if (append !== "") {
|
73
78
|
delete updateData.height;
|
@@ -129,6 +134,10 @@ const FreeGrid = props => {
|
|
129
134
|
setSelectedElement
|
130
135
|
});
|
131
136
|
break;
|
137
|
+
case "forceAutoAlignment":
|
138
|
+
setAutoAlign(true);
|
139
|
+
setSelectedElement({});
|
140
|
+
break;
|
132
141
|
case "deleteSection":
|
133
142
|
if (Node.has(editor, cur_root_path)) {
|
134
143
|
Transforms.removeNodes(editor, {
|
@@ -150,9 +159,12 @@ const FreeGrid = props => {
|
|
150
159
|
console.log(err);
|
151
160
|
}
|
152
161
|
};
|
162
|
+
useEffect(() => {
|
163
|
+
childrenCountRef.current = element?.children?.length;
|
164
|
+
}, [element?.children?.length]);
|
153
165
|
const handleAddElementClick = type => () => {
|
154
166
|
const isEmpty = isEmptySection();
|
155
|
-
const insertAt = isEmpty ? [...path, 0] : [...path,
|
167
|
+
const insertAt = isEmpty ? [...path, 0] : [...path, childrenCountRef.current];
|
156
168
|
switch (type) {
|
157
169
|
case "addText":
|
158
170
|
Transforms.insertNodes(editor, [{
|
@@ -187,20 +199,6 @@ const FreeGrid = props => {
|
|
187
199
|
linkType: "webAddress"
|
188
200
|
},
|
189
201
|
iconPosition: "start",
|
190
|
-
bgColor: "#2563EB",
|
191
|
-
textColor: "#FFF",
|
192
|
-
borderRadius: {
|
193
|
-
topLeft: 30,
|
194
|
-
topRight: 30,
|
195
|
-
bottomLeft: 30,
|
196
|
-
bottomRight: 30
|
197
|
-
},
|
198
|
-
bannerSpacing: {
|
199
|
-
left: 12,
|
200
|
-
top: 12,
|
201
|
-
right: 12,
|
202
|
-
bottom: 12
|
203
|
-
},
|
204
202
|
textAlign: "center",
|
205
203
|
label: "Get Started"
|
206
204
|
}],
|
@@ -373,6 +371,19 @@ const FreeGrid = props => {
|
|
373
371
|
break;
|
374
372
|
default:
|
375
373
|
}
|
374
|
+
if (breakpoint === "lg") {
|
375
|
+
setSelectedElement({});
|
376
|
+
|
377
|
+
// auto align in mobile
|
378
|
+
Transforms.setNodes(editor, {
|
379
|
+
xs_updatedOn: null,
|
380
|
+
updated_at: new Date().getTime()
|
381
|
+
}, {
|
382
|
+
at: path
|
383
|
+
});
|
384
|
+
}
|
385
|
+
count.current = count.current + 1;
|
386
|
+
|
376
387
|
// focus on newly added element
|
377
388
|
focusOnNewItem(editor, insertAt, {
|
378
389
|
setSelectedElement
|
@@ -444,6 +455,17 @@ const FreeGrid = props => {
|
|
444
455
|
}
|
445
456
|
}, theme);
|
446
457
|
const sectionTypeOptions = (itemOptions?.section || []).filter(f => (hideTools || []).indexOf(f) === -1);
|
458
|
+
|
459
|
+
// const id = useMemo(() => {
|
460
|
+
// let eleId = `freegrid_container_${path.join("|")}_${breakpoint}`;
|
461
|
+
|
462
|
+
// if (autoAlign) {
|
463
|
+
// eleId += `_${updated_at}`; // re-render component on force auto align
|
464
|
+
// }
|
465
|
+
|
466
|
+
// return eleId;
|
467
|
+
// }, [autoAlign, updated_at, breakpoint, path]);
|
468
|
+
|
447
469
|
return /*#__PURE__*/_jsx(RnD, {
|
448
470
|
id: `freegrid_container_${path.join("|")}_${updated_at}_${breakpoint}`,
|
449
471
|
className: `
|
@@ -457,6 +479,9 @@ const FreeGrid = props => {
|
|
457
479
|
position: "relative",
|
458
480
|
"--height": `${height}px`
|
459
481
|
},
|
482
|
+
dataSets: {
|
483
|
+
"data-height-xs": height_xs
|
484
|
+
},
|
460
485
|
defaultStyle: {
|
461
486
|
width: "100%",
|
462
487
|
height: height ? `${height}px` : "auto"
|
@@ -493,7 +518,13 @@ const FreeGrid = props => {
|
|
493
518
|
title: "Add Element",
|
494
519
|
props: {
|
495
520
|
handleClick: handleAddElementClick,
|
496
|
-
hideTools: hideTools || []
|
521
|
+
hideTools: hideTools || [],
|
522
|
+
translation: {
|
523
|
+
translation
|
524
|
+
},
|
525
|
+
customProps: {
|
526
|
+
customProps
|
527
|
+
}
|
497
528
|
}
|
498
529
|
},
|
499
530
|
more: {
|
@@ -501,7 +532,14 @@ const FreeGrid = props => {
|
|
501
532
|
placement: "left",
|
502
533
|
title: "More Options",
|
503
534
|
props: {
|
504
|
-
handleClick: handleMoreClick
|
535
|
+
handleClick: handleMoreClick,
|
536
|
+
translation: {
|
537
|
+
translation
|
538
|
+
},
|
539
|
+
customProps: {
|
540
|
+
customProps
|
541
|
+
},
|
542
|
+
breakpoint
|
505
543
|
}
|
506
544
|
},
|
507
545
|
settings: {
|
@@ -512,7 +550,8 @@ const FreeGrid = props => {
|
|
512
550
|
editor,
|
513
551
|
path,
|
514
552
|
classes,
|
515
|
-
customProps
|
553
|
+
customProps,
|
554
|
+
translation
|
516
555
|
}
|
517
556
|
}
|
518
557
|
},
|
@@ -520,6 +559,11 @@ const FreeGrid = props => {
|
|
520
559
|
updated_at: updated_at,
|
521
560
|
breakpoint: breakpoint,
|
522
561
|
handleContextMenuClick: handleContextMenuClick,
|
562
|
+
translation: translation,
|
563
|
+
customProps: customProps,
|
564
|
+
sectionElement: element,
|
565
|
+
autoAlign: autoAlign,
|
566
|
+
setAutoAlign: setAutoAlign,
|
523
567
|
children: /*#__PURE__*/_jsxs(Box, {
|
524
568
|
...attributes,
|
525
569
|
id: sectionName,
|
@@ -540,7 +584,7 @@ const FreeGrid = props => {
|
|
540
584
|
"--rows": `repeat(${repeatTimes}, ${ROW_HEIGHT}px)`
|
541
585
|
},
|
542
586
|
children: [children, !readOnly ? /*#__PURE__*/_jsx("span", {
|
543
|
-
placeholder:
|
587
|
+
placeholder: `${translation("Section")} (${sectionName || "Welcome"})`,
|
544
588
|
className: "freegrid-section-infos",
|
545
589
|
contentEditable: false
|
546
590
|
}) : null]
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React from "react";
|
1
|
+
import React, { useMemo } from "react";
|
2
2
|
import { Transforms, Node, Path } from "slate";
|
3
3
|
import { useSlateStatic } from "slate-react";
|
4
4
|
import { ReactEditor } from "slate-react";
|
@@ -26,7 +26,8 @@ const FreeGridBox = props => {
|
|
26
26
|
const path = ReactEditor.findPath(editor, element);
|
27
27
|
const {
|
28
28
|
readOnly,
|
29
|
-
hideTools
|
29
|
+
hideTools,
|
30
|
+
translation
|
30
31
|
} = customProps;
|
31
32
|
const {
|
32
33
|
updated_at,
|
@@ -36,7 +37,12 @@ const FreeGridBox = props => {
|
|
36
37
|
sectionBorderRadius,
|
37
38
|
borderWidth,
|
38
39
|
borderColor,
|
39
|
-
borderStyle
|
40
|
+
borderStyle,
|
41
|
+
height_xs,
|
42
|
+
marginTop_xs,
|
43
|
+
gridArea_xs,
|
44
|
+
width_xs,
|
45
|
+
left_xs
|
40
46
|
} = element;
|
41
47
|
// get values based on breakpoint size
|
42
48
|
const {
|
@@ -50,7 +56,8 @@ const FreeGridBox = props => {
|
|
50
56
|
const {
|
51
57
|
setSelectedElement
|
52
58
|
} = useEditorContext();
|
53
|
-
|
59
|
+
let arrangeIndex = zIndex === undefined ? path[path.length - 1] : zIndex;
|
60
|
+
arrangeIndex = Math.max(1, arrangeIndex);
|
54
61
|
const onChangeSettings = () => {};
|
55
62
|
const onChange = data => {
|
56
63
|
let updateData = {
|
@@ -150,9 +157,12 @@ const FreeGridBox = props => {
|
|
150
157
|
};
|
151
158
|
const repeatTimes = Math.floor(height / ROW_HEIGHT);
|
152
159
|
const sectionTypeOptions = (itemOptions?.box || []).filter(f => (hideTools || []).indexOf(f) === -1);
|
160
|
+
const isBoxHeader = useMemo(() => {
|
161
|
+
return element?.children?.some(c => c.childType === "appHeader" && !c.xs_updatedOn);
|
162
|
+
}, [element]);
|
153
163
|
return /*#__PURE__*/_jsx(RnD, {
|
154
164
|
id: `freegrid_box_item_${path.join("|")}_${updated_at}_${breakpoint}`,
|
155
|
-
className: `freegrid-item path-${path.length} breakpoint-${breakpoint}`,
|
165
|
+
className: `freegrid-item path-${path.length} breakpoint-${breakpoint} freegrid-box_${path.join("_")}`,
|
156
166
|
editor: editor,
|
157
167
|
path: path,
|
158
168
|
actions: sectionTypeOptions,
|
@@ -167,12 +177,23 @@ const FreeGridBox = props => {
|
|
167
177
|
"--gridArea": `${gridArea}`,
|
168
178
|
"--width": `${width}px`,
|
169
179
|
"--height": `${height}px`,
|
170
|
-
"--zIndex": 100 + arrangeIndex
|
180
|
+
"--zIndex": 100 + arrangeIndex,
|
181
|
+
"--height_xs": height_xs ? `${height_xs}px` : "auto",
|
182
|
+
"--marginTop_xs": marginTop_xs ? `${marginTop_xs}px` : "24px"
|
183
|
+
// "--gridArea_xs": gridArea_xs ? gridArea_xs : "unset",
|
171
184
|
},
|
185
|
+
|
172
186
|
defaultStyle: {
|
173
187
|
height: `${height}px`,
|
174
188
|
width: `${width}px`
|
175
189
|
},
|
190
|
+
dataSets: {
|
191
|
+
"data-grid-area-xs": gridArea_xs,
|
192
|
+
"data-margin-top-xs": marginTop_xs,
|
193
|
+
"data-height-xs": height_xs,
|
194
|
+
"data-width-xs": width_xs,
|
195
|
+
"data-left-xs": left_xs
|
196
|
+
},
|
176
197
|
gridArea: gridArea,
|
177
198
|
onChange: onChange,
|
178
199
|
delta: {
|
@@ -188,6 +209,10 @@ const FreeGridBox = props => {
|
|
188
209
|
left: left || 0
|
189
210
|
},
|
190
211
|
type: "parent-container",
|
212
|
+
customProps: customProps,
|
213
|
+
translation: translation,
|
214
|
+
breakpoint: breakpoint,
|
215
|
+
isBoxHeader: isBoxHeader,
|
191
216
|
children: /*#__PURE__*/_jsx(Box, {
|
192
217
|
component: "div",
|
193
218
|
...attributes,
|
@@ -6,13 +6,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
const FreeGridButton = props => {
|
7
7
|
const {
|
8
8
|
editor,
|
9
|
-
icoBtnType
|
9
|
+
icoBtnType,
|
10
|
+
customProps
|
10
11
|
} = props;
|
12
|
+
const {
|
13
|
+
translation
|
14
|
+
} = customProps;
|
11
15
|
const onButtonClick = () => {
|
12
16
|
insertFreeGrid(editor);
|
13
17
|
};
|
14
18
|
return /*#__PURE__*/_jsx(ToolbarIcon, {
|
15
|
-
title: "Free Grid",
|
19
|
+
title: translation("Free Grid"),
|
16
20
|
onClick: onButtonClick,
|
17
21
|
icon: /*#__PURE__*/_jsx(Icon, {
|
18
22
|
icon: "freegrid"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { useState } from "react";
|
1
|
+
import React, { useMemo, useState } from "react";
|
2
2
|
import { Transforms, Node, Path } from "slate";
|
3
3
|
import { useSlateStatic } from "slate-react";
|
4
4
|
import { ReactEditor } from "slate-react";
|
@@ -29,12 +29,18 @@ const FreeGridItem = props => {
|
|
29
29
|
const path = ReactEditor.findPath(editor, element);
|
30
30
|
const {
|
31
31
|
readOnly,
|
32
|
-
hideTools
|
32
|
+
hideTools,
|
33
|
+
translation
|
33
34
|
} = customProps;
|
34
35
|
const {
|
35
36
|
updated_at,
|
36
37
|
childType,
|
37
|
-
zIndex
|
38
|
+
zIndex,
|
39
|
+
height_xs,
|
40
|
+
width_xs,
|
41
|
+
marginTop_xs,
|
42
|
+
gridArea_xs,
|
43
|
+
left_xs
|
38
44
|
} = element;
|
39
45
|
// get values based on breakpoint size
|
40
46
|
const {
|
@@ -49,9 +55,13 @@ const FreeGridItem = props => {
|
|
49
55
|
setSelectedElement,
|
50
56
|
selectedElement
|
51
57
|
} = useEditorContext();
|
52
|
-
|
58
|
+
let arrangeIndex = zIndex === undefined ? path[path.length - 1] : zIndex;
|
59
|
+
arrangeIndex = Math.max(1, arrangeIndex);
|
53
60
|
const [popup, setPopup] = useState(null);
|
54
61
|
const onChangeSettings = () => {};
|
62
|
+
// const refInput = useRef();
|
63
|
+
// const [virtualHeight, setVirtualHeight] = useState(height || 0);
|
64
|
+
|
55
65
|
const onChange = data => {
|
56
66
|
let updateData = {
|
57
67
|
...data
|
@@ -107,6 +117,13 @@ const FreeGridItem = props => {
|
|
107
117
|
Transforms.removeNodes(editor, {
|
108
118
|
at: path
|
109
119
|
});
|
120
|
+
const parentPath = Path.parent(path);
|
121
|
+
Transforms.setNodes(editor, {
|
122
|
+
xs_updatedOn: null,
|
123
|
+
updated_at: new Date().getTime()
|
124
|
+
}, {
|
125
|
+
at: parentPath
|
126
|
+
});
|
110
127
|
} catch (err) {
|
111
128
|
console.log(err);
|
112
129
|
}
|
@@ -233,6 +250,22 @@ const FreeGridItem = props => {
|
|
233
250
|
}
|
234
251
|
};
|
235
252
|
const itemTypeOptions = (itemOptions[childType] || itemOptions?.default).filter(f => (hideTools || []).indexOf(f) === -1);
|
253
|
+
const variableStyle = useMemo(() => {
|
254
|
+
const {
|
255
|
+
width,
|
256
|
+
height
|
257
|
+
} = element || {};
|
258
|
+
let widthVar = width_xs;
|
259
|
+
let heightVar = height_xs;
|
260
|
+
if (element?.childType === "image") {
|
261
|
+
widthVar = width_xs || width;
|
262
|
+
heightVar = height_xs || height;
|
263
|
+
}
|
264
|
+
return {
|
265
|
+
"--width_xs": widthVar ? `${widthVar}px` : "auto",
|
266
|
+
"--height_xs": heightVar ? `${heightVar}px` : "auto"
|
267
|
+
};
|
268
|
+
}, [element]);
|
236
269
|
return /*#__PURE__*/_jsx(RnD, {
|
237
270
|
id: `freegrid_item_${path.join("|")}_${updated_at}_${breakpoint}`,
|
238
271
|
className: `freegrid-item path-${path.length} breakpoint-${breakpoint}`,
|
@@ -252,7 +285,18 @@ const FreeGridItem = props => {
|
|
252
285
|
"--gridArea": `${gridArea}`,
|
253
286
|
"--width": `${width}px`,
|
254
287
|
"--height": `${height}px`,
|
255
|
-
"--zIndex": 100 + arrangeIndex
|
288
|
+
"--zIndex": 100 + arrangeIndex,
|
289
|
+
"--marginTop_xs": marginTop_xs ? `${marginTop_xs}px` : "0px",
|
290
|
+
...variableStyle
|
291
|
+
// "--gridArea_xs": gridArea_xs ? gridArea_xs : "unset",
|
292
|
+
},
|
293
|
+
|
294
|
+
dataSets: {
|
295
|
+
"data-grid-area-xs": gridArea_xs,
|
296
|
+
"data-margin-top-xs": marginTop_xs,
|
297
|
+
"data-height-xs": height_xs,
|
298
|
+
"data-width-xs": width_xs,
|
299
|
+
"data-left-xs": left_xs
|
256
300
|
},
|
257
301
|
defaultStyle: {
|
258
302
|
height: `${height}px`,
|
@@ -273,6 +317,9 @@ const FreeGridItem = props => {
|
|
273
317
|
itemData: {
|
274
318
|
left: left || 0
|
275
319
|
},
|
320
|
+
customProps: customProps,
|
321
|
+
translation: translation,
|
322
|
+
breakpoint: breakpoint,
|
276
323
|
children: /*#__PURE__*/_jsxs(Box, {
|
277
324
|
component: "div",
|
278
325
|
...attributes,
|
@@ -282,7 +329,8 @@ const FreeGridItem = props => {
|
|
282
329
|
element: element,
|
283
330
|
customWorkflowElement: element?.children?.[0] || null,
|
284
331
|
closeWorkflow: onClose,
|
285
|
-
onSave: onWorkflowSave
|
332
|
+
onSave: onWorkflowSave,
|
333
|
+
customProps: customProps
|
286
334
|
}) : null, popup === "embedScript" ? /*#__PURE__*/_jsx(EmbedScriptPopup, {
|
287
335
|
open: popup === "embedScript",
|
288
336
|
customProps: customProps,
|
@@ -51,7 +51,8 @@ const FREE_GRID_ELEMENTS = [{
|
|
51
51
|
const AddElement = props => {
|
52
52
|
const {
|
53
53
|
handleClick,
|
54
|
-
hideTools
|
54
|
+
hideTools,
|
55
|
+
translation
|
55
56
|
} = props;
|
56
57
|
const ADD_ELEMENTS = FREE_GRID_ELEMENTS.filter(f => (hideTools || []).indexOf(f.actionType) === -1);
|
57
58
|
return /*#__PURE__*/_jsx(Box, {
|
@@ -70,7 +71,7 @@ const AddElement = props => {
|
|
70
71
|
icon: m.icon
|
71
72
|
})
|
72
73
|
}), /*#__PURE__*/_jsx(ListItemText, {
|
73
|
-
children: m.label
|
74
|
+
children: translation?.translation(m.label)
|
74
75
|
})]
|
75
76
|
}, m.actionType);
|
76
77
|
})
|
@@ -4,7 +4,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
5
5
|
const More = props => {
|
6
6
|
const {
|
7
|
-
handleClick
|
7
|
+
handleClick,
|
8
|
+
translation,
|
9
|
+
breakpoint
|
8
10
|
} = props;
|
9
11
|
return /*#__PURE__*/_jsx(Box, {
|
10
12
|
children: /*#__PURE__*/_jsxs(List, {
|
@@ -12,12 +14,16 @@ const More = props => {
|
|
12
14
|
children: [/*#__PURE__*/_jsx(ListItemButton, {
|
13
15
|
className: "item-wrapper",
|
14
16
|
onClick: handleClick("addSection"),
|
15
|
-
children: "Add Section"
|
17
|
+
children: translation?.translation("Add Section")
|
16
18
|
}), /*#__PURE__*/_jsx(ListItemButton, {
|
17
19
|
className: "item-wrapper",
|
18
20
|
onClick: handleClick("duplicateSection"),
|
19
|
-
children: "Duplicate Section"
|
20
|
-
}), /*#__PURE__*/_jsx(ListItemButton, {
|
21
|
+
children: translation?.translation("Duplicate Section")
|
22
|
+
}), breakpoint === "xs" ? /*#__PURE__*/_jsx(ListItemButton, {
|
23
|
+
className: "item-wrapper",
|
24
|
+
onClick: handleClick("forceAutoAlignment"),
|
25
|
+
children: "Force Auto Alignment"
|
26
|
+
}) : null, /*#__PURE__*/_jsx(ListItemButton, {
|
21
27
|
className: "item-wrapper",
|
22
28
|
onClick: handleClick("deleteSection"),
|
23
29
|
children: "Delete Section"
|