@flozy/editor 9.8.3 → 9.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Editor/ChatEditor.js +14 -7
- package/dist/Editor/CommonEditor.js +27 -12
- 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 +4 -2
- 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/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 +6 -5
- 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/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/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 +3 -2
- 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 +7 -6
- 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 +12 -6
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +6 -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 +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/UserInputs.js +4 -2
- package/dist/Editor/Elements/Form/Workflow/index.js +15 -9
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +21 -4
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +6 -2
- package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +6 -2
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +8 -3
- package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +3 -2
- package/dist/Editor/Elements/FreeGrid/Options/More.js +4 -3
- 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 +13 -7
- 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 +6 -3
- package/dist/Editor/Elements/Search/SearchList.js +7 -3
- package/dist/Editor/Elements/Signature/SignatureButton.js +6 -2
- 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/Table/DragButton.js +4 -2
- package/dist/Editor/Elements/Table/Table.js +21 -9
- 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/TopBanner/TopBannerButton.js +4 -1
- package/dist/Editor/MiniEditor.js +9 -3
- package/dist/Editor/Toolbar/Basic/index.js +2 -1
- package/dist/Editor/Toolbar/FormatTools/BlockButton.js +6 -2
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +6 -2
- 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 +6 -2
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +42 -35
- 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 +87 -73
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +14 -7
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +8 -4
- package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +11 -5
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +29 -21
- package/dist/Editor/Toolbar/PopupTool/index.js +17 -1
- package/dist/Editor/Toolbar/Toolbar.js +20 -10
- package/dist/Editor/common/CustomDialog/index.js +8 -10
- package/dist/Editor/common/ImageSelector/ImageSelector.js +10 -8
- package/dist/Editor/common/ImageSelector/Options/AddLink.js +6 -4
- 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/MentionsPopup/index.js +6 -2
- package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -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 +5 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +4 -2
- package/dist/Editor/common/RnD/OptionsPopup/index.js +4 -3
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +4 -3
- package/dist/Editor/common/RnD/index.js +11 -4
- package/dist/Editor/common/Section/index.js +7 -4
- package/dist/Editor/common/Shorthands/elements.js +18 -3
- 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 +2 -2
- 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 +6 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +7 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +6 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +11 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +9 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +10 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +6 -2
- 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 +6 -5
- 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/Uploader.js +8 -5
- package/dist/Editor/helper/index.js +27 -3
- package/dist/Editor/plugins/withLayout.js +3 -2
- package/dist/Editor/plugins/withLinks.js +10 -0
- package/dist/Editor/utils/SlateUtilityFunctions.js +15 -9
- package/dist/Editor/utils/brains.js +1 -2
- package/dist/Editor/utils/freegrid.js +1 -1
- package/dist/Editor/utils/helper.js +2 -2
- package/package.json +1 -1
@@ -2,16 +2,20 @@ import React from "react";
|
|
2
2
|
import { Grid, Typography } from "@mui/material";
|
3
3
|
import FormStyles from "./Styles";
|
4
4
|
import MoreOptions from "./MoreOptions";
|
5
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
7
7
|
const ListWorkflow = props => {
|
8
8
|
const {
|
9
9
|
workflow,
|
10
10
|
handleEditFormWorkflow,
|
11
|
-
handleDeleteFormWorkflow
|
11
|
+
handleDeleteFormWorkflow,
|
12
|
+
customProps
|
12
13
|
} = props;
|
13
14
|
const classes = FormStyles();
|
14
15
|
const optionsList = ["Edit", "Delete"];
|
16
|
+
const {
|
17
|
+
translation
|
18
|
+
} = customProps;
|
15
19
|
const onMenuClick = (selectedMenu, selectedFlow) => () => {
|
16
20
|
if (selectedMenu === "Edit") {
|
17
21
|
handleEditFormWorkflow(selectedFlow);
|
@@ -32,12 +36,12 @@ const ListWorkflow = props => {
|
|
32
36
|
children: [/*#__PURE__*/_jsx(Grid, {
|
33
37
|
item: true,
|
34
38
|
sx: classes.emailIndexCard,
|
35
|
-
children: /*#__PURE__*/
|
39
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
36
40
|
sx: {
|
37
41
|
fontSize: "12px",
|
38
42
|
fontWeight: 600
|
39
43
|
},
|
40
|
-
children:
|
44
|
+
children: `${translation("Email")} ${index + 1}`
|
41
45
|
})
|
42
46
|
}), /*#__PURE__*/_jsx(Grid, {
|
43
47
|
item: true,
|
@@ -63,7 +67,7 @@ const ListWorkflow = props => {
|
|
63
67
|
item: true,
|
64
68
|
children: /*#__PURE__*/_jsx(Typography, {
|
65
69
|
sx: classes.listHeading,
|
66
|
-
children: "
|
70
|
+
children: translation("subjectTextColon")
|
67
71
|
})
|
68
72
|
}), /*#__PURE__*/_jsx(Grid, {
|
69
73
|
item: true,
|
@@ -86,7 +90,7 @@ const ListWorkflow = props => {
|
|
86
90
|
item: true,
|
87
91
|
children: /*#__PURE__*/_jsx(Typography, {
|
88
92
|
sx: classes.listHeading,
|
89
|
-
children: "
|
93
|
+
children: translation("bodyTextColon")
|
90
94
|
})
|
91
95
|
}), /*#__PURE__*/_jsx(Grid, {
|
92
96
|
item: true,
|
@@ -109,7 +113,7 @@ const ListWorkflow = props => {
|
|
109
113
|
item: true,
|
110
114
|
children: /*#__PURE__*/_jsx(Typography, {
|
111
115
|
sx: classes.listHeading,
|
112
|
-
children: "
|
116
|
+
children: translation("sheduleText")
|
113
117
|
})
|
114
118
|
}), /*#__PURE__*/_jsx(Grid, {
|
115
119
|
item: true,
|
@@ -146,7 +150,8 @@ const ListWorkflow = props => {
|
|
146
150
|
classes: classes,
|
147
151
|
menus: optionsList,
|
148
152
|
selectedFlow: index,
|
149
|
-
onMenuClick: onMenuClick
|
153
|
+
onMenuClick: onMenuClick,
|
154
|
+
translation: translation
|
150
155
|
})
|
151
156
|
})]
|
152
157
|
})
|
@@ -9,7 +9,8 @@ function MoreOptions(props) {
|
|
9
9
|
classes,
|
10
10
|
menus,
|
11
11
|
onMenuClick,
|
12
|
-
selectedFlow
|
12
|
+
selectedFlow,
|
13
|
+
translation
|
13
14
|
} = props;
|
14
15
|
|
15
16
|
//state
|
@@ -52,7 +53,7 @@ function MoreOptions(props) {
|
|
52
53
|
paddingRight: "100px"
|
53
54
|
},
|
54
55
|
onClick: onMenuClick(m, selectedFlow),
|
55
|
-
children: m
|
56
|
+
children: translation(m)
|
56
57
|
}, `menu_${i}_${m}`))
|
57
58
|
})]
|
58
59
|
});
|
@@ -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
|
});
|
@@ -48,7 +48,8 @@ const FreeGrid = props => {
|
|
48
48
|
const {
|
49
49
|
readOnly,
|
50
50
|
customSX,
|
51
|
-
hideTools
|
51
|
+
hideTools,
|
52
|
+
translation
|
52
53
|
} = customProps;
|
53
54
|
const {
|
54
55
|
updated_at,
|
@@ -493,7 +494,13 @@ const FreeGrid = props => {
|
|
493
494
|
title: "Add Element",
|
494
495
|
props: {
|
495
496
|
handleClick: handleAddElementClick,
|
496
|
-
hideTools: hideTools || []
|
497
|
+
hideTools: hideTools || [],
|
498
|
+
translation: {
|
499
|
+
translation
|
500
|
+
},
|
501
|
+
customProps: {
|
502
|
+
customProps
|
503
|
+
}
|
497
504
|
}
|
498
505
|
},
|
499
506
|
more: {
|
@@ -501,7 +508,13 @@ const FreeGrid = props => {
|
|
501
508
|
placement: "left",
|
502
509
|
title: "More Options",
|
503
510
|
props: {
|
504
|
-
handleClick: handleMoreClick
|
511
|
+
handleClick: handleMoreClick,
|
512
|
+
translation: {
|
513
|
+
translation
|
514
|
+
},
|
515
|
+
customProps: {
|
516
|
+
customProps
|
517
|
+
}
|
505
518
|
}
|
506
519
|
},
|
507
520
|
settings: {
|
@@ -512,6 +525,8 @@ const FreeGrid = props => {
|
|
512
525
|
editor,
|
513
526
|
path,
|
514
527
|
classes,
|
528
|
+
customProps,
|
529
|
+
translation,
|
515
530
|
customProps
|
516
531
|
}
|
517
532
|
}
|
@@ -520,6 +535,8 @@ const FreeGrid = props => {
|
|
520
535
|
updated_at: updated_at,
|
521
536
|
breakpoint: breakpoint,
|
522
537
|
handleContextMenuClick: handleContextMenuClick,
|
538
|
+
translation: translation,
|
539
|
+
customProps: customProps,
|
523
540
|
children: /*#__PURE__*/_jsxs(Box, {
|
524
541
|
...attributes,
|
525
542
|
id: sectionName,
|
@@ -540,7 +557,7 @@ const FreeGrid = props => {
|
|
540
557
|
"--rows": `repeat(${repeatTimes}, ${ROW_HEIGHT}px)`
|
541
558
|
},
|
542
559
|
children: [children, !readOnly ? /*#__PURE__*/_jsx("span", {
|
543
|
-
placeholder:
|
560
|
+
placeholder: `${translation("Section")} (${sectionName || "Welcome"})`,
|
544
561
|
className: "freegrid-section-infos",
|
545
562
|
contentEditable: false
|
546
563
|
}) : null]
|
@@ -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,
|
@@ -50,7 +51,8 @@ const FreeGridBox = props => {
|
|
50
51
|
const {
|
51
52
|
setSelectedElement
|
52
53
|
} = useEditorContext();
|
53
|
-
|
54
|
+
let arrangeIndex = zIndex === undefined ? path[path.length - 1] : zIndex;
|
55
|
+
arrangeIndex = Math.max(1, arrangeIndex);
|
54
56
|
const onChangeSettings = () => {};
|
55
57
|
const onChange = data => {
|
56
58
|
let updateData = {
|
@@ -188,6 +190,8 @@ const FreeGridBox = props => {
|
|
188
190
|
left: left || 0
|
189
191
|
},
|
190
192
|
type: "parent-container",
|
193
|
+
customProps: customProps,
|
194
|
+
translation: translation,
|
191
195
|
children: /*#__PURE__*/_jsx(Box, {
|
192
196
|
component: "div",
|
193
197
|
...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"
|
@@ -29,7 +29,8 @@ 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,
|
@@ -49,7 +50,8 @@ const FreeGridItem = props => {
|
|
49
50
|
setSelectedElement,
|
50
51
|
selectedElement
|
51
52
|
} = useEditorContext();
|
52
|
-
|
53
|
+
let arrangeIndex = zIndex === undefined ? path[path.length - 1] : zIndex;
|
54
|
+
arrangeIndex = Math.max(1, arrangeIndex);
|
53
55
|
const [popup, setPopup] = useState(null);
|
54
56
|
const onChangeSettings = () => {};
|
55
57
|
const onChange = data => {
|
@@ -273,6 +275,8 @@ const FreeGridItem = props => {
|
|
273
275
|
itemData: {
|
274
276
|
left: left || 0
|
275
277
|
},
|
278
|
+
customProps: customProps,
|
279
|
+
translation: translation,
|
276
280
|
children: /*#__PURE__*/_jsxs(Box, {
|
277
281
|
component: "div",
|
278
282
|
...attributes,
|
@@ -282,7 +286,8 @@ const FreeGridItem = props => {
|
|
282
286
|
element: element,
|
283
287
|
customWorkflowElement: element?.children?.[0] || null,
|
284
288
|
closeWorkflow: onClose,
|
285
|
-
onSave: onWorkflowSave
|
289
|
+
onSave: onWorkflowSave,
|
290
|
+
customProps: customProps
|
286
291
|
}) : null, popup === "embedScript" ? /*#__PURE__*/_jsx(EmbedScriptPopup, {
|
287
292
|
open: popup === "embedScript",
|
288
293
|
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,8 @@ 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
|
8
9
|
} = props;
|
9
10
|
return /*#__PURE__*/_jsx(Box, {
|
10
11
|
children: /*#__PURE__*/_jsxs(List, {
|
@@ -12,11 +13,11 @@ const More = props => {
|
|
12
13
|
children: [/*#__PURE__*/_jsx(ListItemButton, {
|
13
14
|
className: "item-wrapper",
|
14
15
|
onClick: handleClick("addSection"),
|
15
|
-
children: "Add Section"
|
16
|
+
children: translation?.translation("Add Section")
|
16
17
|
}), /*#__PURE__*/_jsx(ListItemButton, {
|
17
18
|
className: "item-wrapper",
|
18
19
|
onClick: handleClick("duplicateSection"),
|
19
|
-
children: "Duplicate Section"
|
20
|
+
children: translation?.translation("Duplicate Section")
|
20
21
|
}), /*#__PURE__*/_jsx(ListItemButton, {
|
21
22
|
className: "item-wrapper",
|
22
23
|
onClick: handleClick("deleteSection"),
|
@@ -32,7 +32,8 @@ const GridToolBar = ({
|
|
32
32
|
onAddSection,
|
33
33
|
onMoveSection,
|
34
34
|
path,
|
35
|
-
isSectionFullWidth
|
35
|
+
isSectionFullWidth,
|
36
|
+
translation
|
36
37
|
}) => {
|
37
38
|
return selected && !showTool ? /*#__PURE__*/_jsxs("div", {
|
38
39
|
className: "grid-container-toolbar",
|
@@ -42,21 +43,21 @@ const GridToolBar = ({
|
|
42
43
|
top: "4px"
|
43
44
|
} : {},
|
44
45
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
45
|
-
title: "Grid Settings",
|
46
|
+
title: translation("Grid Settings"),
|
46
47
|
arrow: true,
|
47
48
|
children: /*#__PURE__*/_jsx(IconButton, {
|
48
49
|
onClick: onSettings,
|
49
50
|
children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
|
50
51
|
})
|
51
52
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
52
|
-
title: "Add Grid Item",
|
53
|
+
title: translation("Add Grid Item"),
|
53
54
|
arrow: true,
|
54
55
|
children: /*#__PURE__*/_jsx(IconButton, {
|
55
56
|
onClick: onAddGridItem,
|
56
57
|
children: /*#__PURE__*/_jsx(GridAddGridIcon, {})
|
57
58
|
})
|
58
59
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
59
|
-
title: "Duplicate",
|
60
|
+
title: translation("Duplicate"),
|
60
61
|
arrow: true,
|
61
62
|
children: /*#__PURE__*/_jsx(IconButton, {
|
62
63
|
onClick: onAddSection(),
|
@@ -64,14 +65,14 @@ const GridToolBar = ({
|
|
64
65
|
})
|
65
66
|
}), path.length === 2 ? /*#__PURE__*/_jsxs(_Fragment, {
|
66
67
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
67
|
-
title: "Move Up",
|
68
|
+
title: translation("Move Up"),
|
68
69
|
arrow: true,
|
69
70
|
children: /*#__PURE__*/_jsx(IconButton, {
|
70
71
|
onClick: onMoveSection("up"),
|
71
72
|
children: /*#__PURE__*/_jsx(ArrowUpwardIcon, {})
|
72
73
|
})
|
73
74
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
74
|
-
title: "Move Down",
|
75
|
+
title: translation("Move Down"),
|
75
76
|
arrow: true,
|
76
77
|
children: /*#__PURE__*/_jsx(IconButton, {
|
77
78
|
onClick: onMoveSection("down"),
|
@@ -102,7 +103,8 @@ const Grid = props => {
|
|
102
103
|
customProps
|
103
104
|
} = props;
|
104
105
|
const {
|
105
|
-
readOnly
|
106
|
+
readOnly,
|
107
|
+
translation
|
106
108
|
} = customProps;
|
107
109
|
const [openSetttings, setOpenSettings] = useState(false);
|
108
110
|
const {
|
@@ -268,7 +270,7 @@ const Grid = props => {
|
|
268
270
|
contentEditable: false,
|
269
271
|
className: "element-selector-ctrl tc",
|
270
272
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
271
|
-
title: "Add Space above",
|
273
|
+
title: translation("Add Space above"),
|
272
274
|
arrow: true,
|
273
275
|
children: /*#__PURE__*/_jsx(IconButton, {
|
274
276
|
onClick: onNewLine("up"),
|
@@ -279,7 +281,7 @@ const Grid = props => {
|
|
279
281
|
contentEditable: false,
|
280
282
|
className: "element-selector-ctrl bc",
|
281
283
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
282
|
-
title: "Add Space below",
|
284
|
+
title: translation("Add Space below"),
|
283
285
|
arrow: true,
|
284
286
|
children: /*#__PURE__*/_jsx(IconButton, {
|
285
287
|
onClick: onNewLine("down"),
|
@@ -364,7 +366,8 @@ const Grid = props => {
|
|
364
366
|
onAddSection: onAddSection,
|
365
367
|
onMoveSection: onMoveSection,
|
366
368
|
path: path,
|
367
|
-
isSectionFullWidth: isSectionFullWidth
|
369
|
+
isSectionFullWidth: isSectionFullWidth,
|
370
|
+
translation: translation
|
368
371
|
})]
|
369
372
|
}), openSetttings ? /*#__PURE__*/_jsx(PoupComp, {
|
370
373
|
element: element,
|
@@ -11,9 +11,13 @@ const GridButton = props => {
|
|
11
11
|
const classes = GridStyles();
|
12
12
|
const {
|
13
13
|
editor,
|
14
|
-
icoBtnType
|
14
|
+
icoBtnType,
|
15
|
+
customProps
|
15
16
|
} = props;
|
16
17
|
const [open, setOpen] = useState(false);
|
18
|
+
const {
|
19
|
+
translation
|
20
|
+
} = customProps;
|
17
21
|
const onButtonClick = async () => {
|
18
22
|
insertGrid(editor, insertPlainGrid(2));
|
19
23
|
handleClose();
|
@@ -44,7 +48,7 @@ const GridButton = props => {
|
|
44
48
|
|
45
49
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
46
50
|
children: [/*#__PURE__*/_jsx(ToolbarIcon, {
|
47
|
-
title: "Column",
|
51
|
+
title: translation("Column"),
|
48
52
|
onClick: onButtonClick,
|
49
53
|
icon: /*#__PURE__*/_jsx(GridElement, {}),
|
50
54
|
icoBtnType: icoBtnType
|
@@ -58,14 +62,14 @@ const GridButton = props => {
|
|
58
62
|
children: [/*#__PURE__*/_jsx(Grid, {
|
59
63
|
item: true,
|
60
64
|
xs: 6,
|
61
|
-
children: "Grid"
|
65
|
+
children: translation("Grid")
|
62
66
|
}), /*#__PURE__*/_jsx(Grid, {
|
63
67
|
item: true,
|
64
68
|
xs: 6,
|
65
69
|
textAlign: "right",
|
66
70
|
children: /*#__PURE__*/_jsx(Button, {
|
67
71
|
onClick: handleInsertGrid(null),
|
68
|
-
children: "
|
72
|
+
children: translation("insertDefaultTemplate")
|
69
73
|
})
|
70
74
|
})]
|
71
75
|
})
|
@@ -90,7 +94,7 @@ const GridButton = props => {
|
|
90
94
|
display: "flex"
|
91
95
|
},
|
92
96
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
93
|
-
title:
|
97
|
+
title: `${translation("Insert")} ${m} ${translation("Column Grid")}`,
|
94
98
|
arrow: true,
|
95
99
|
children: /*#__PURE__*/_jsx(Button, {
|
96
100
|
sx: classes.gridButton,
|
@@ -43,8 +43,12 @@ const GridItemToolbar = props => {
|
|
43
43
|
showTool,
|
44
44
|
onSettings,
|
45
45
|
onAddColumn,
|
46
|
-
columnRef
|
46
|
+
columnRef,
|
47
|
+
customProps
|
47
48
|
} = props;
|
49
|
+
const {
|
50
|
+
translation
|
51
|
+
} = customProps;
|
48
52
|
return selected && !showTool ? /*#__PURE__*/_jsx(Popper, {
|
49
53
|
anchorEl: columnRef?.current,
|
50
54
|
open: true,
|
@@ -55,7 +59,7 @@ const GridItemToolbar = props => {
|
|
55
59
|
children: /*#__PURE__*/_jsxs(Box, {
|
56
60
|
className: "ico-grp-ss",
|
57
61
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
58
|
-
title: "Column Settings",
|
62
|
+
title: translation("Column Settings"),
|
59
63
|
arrow: true,
|
60
64
|
children: /*#__PURE__*/_jsx(IconButton, {
|
61
65
|
size: "small",
|
@@ -64,7 +68,7 @@ const GridItemToolbar = props => {
|
|
64
68
|
children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
|
65
69
|
})
|
66
70
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
67
|
-
title: "Add Column",
|
71
|
+
title: translation("Add Column"),
|
68
72
|
arrow: true,
|
69
73
|
children: /*#__PURE__*/_jsx(IconButton, {
|
70
74
|
size: "small",
|
@@ -98,7 +102,8 @@ const GridItem = props => {
|
|
98
102
|
customProps
|
99
103
|
} = props;
|
100
104
|
const {
|
101
|
-
readOnly
|
105
|
+
readOnly,
|
106
|
+
translation
|
102
107
|
} = customProps;
|
103
108
|
const [openSetttings, setOpenSettings] = useState(false);
|
104
109
|
const {
|
@@ -325,7 +330,8 @@ const GridItem = props => {
|
|
325
330
|
showTool: showTool,
|
326
331
|
onSettings: onSettings,
|
327
332
|
onAddColumn: onAddColumn,
|
328
|
-
columnRef: columnRef
|
333
|
+
columnRef: columnRef,
|
334
|
+
customProps: customProps
|
329
335
|
})]
|
330
336
|
}), /*#__PURE__*/_jsx(Box, {
|
331
337
|
ref: columnRef,
|
@@ -344,7 +350,7 @@ const GridItem = props => {
|
|
344
350
|
borderColor: borderColorHover || borderColor || "transparent"
|
345
351
|
}
|
346
352
|
},
|
347
|
-
placeholder: "Column",
|
353
|
+
placeholder: translation("Column"),
|
348
354
|
"data-info": "handle-outside-editor-click",
|
349
355
|
children: children
|
350
356
|
}), openSetttings ? /*#__PURE__*/_jsx(GridItemPopup, {
|
@@ -368,7 +374,7 @@ const GridItem = props => {
|
|
368
374
|
children: /*#__PURE__*/_jsx(Button, {
|
369
375
|
variant: "contained",
|
370
376
|
onClick: handleClose,
|
371
|
-
children: "Close"
|
377
|
+
children: translation("Close")
|
372
378
|
})
|
373
379
|
})]
|
374
380
|
})]
|
@@ -10,8 +10,11 @@ const GridItemPopup = props => {
|
|
10
10
|
onDelete,
|
11
11
|
customProps
|
12
12
|
} = props;
|
13
|
+
const {
|
14
|
+
translation
|
15
|
+
} = customProps;
|
13
16
|
return /*#__PURE__*/_jsx(StyleBuilder, {
|
14
|
-
title: "Grid Item",
|
17
|
+
title: translation("Grid Item"),
|
15
18
|
type: "gridItemStyle",
|
16
19
|
element: element,
|
17
20
|
onSave: onSave,
|
@@ -10,8 +10,11 @@ const GridPopup = props => {
|
|
10
10
|
onDelete,
|
11
11
|
customProps
|
12
12
|
} = props;
|
13
|
+
const {
|
14
|
+
translation
|
15
|
+
} = customProps;
|
13
16
|
return /*#__PURE__*/_jsx(StyleBuilder, {
|
14
|
-
title: "Grid",
|
17
|
+
title: translation("Grid"),
|
15
18
|
type: "gridStyle",
|
16
19
|
element: element,
|
17
20
|
onSave: onSave,
|
@@ -10,8 +10,11 @@ const SectionPopup = props => {
|
|
10
10
|
onDelete,
|
11
11
|
customProps
|
12
12
|
} = props;
|
13
|
+
const {
|
14
|
+
translation
|
15
|
+
} = customProps;
|
13
16
|
return /*#__PURE__*/_jsx(StyleBuilder, {
|
14
|
-
title: "Section",
|
17
|
+
title: translation("Section"),
|
15
18
|
type: "sectionStyle",
|
16
19
|
element: element,
|
17
20
|
onSave: onSave,
|