@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
@@ -11,7 +11,8 @@ const CustomDialog = (props, ref) => {
|
|
11
11
|
content,
|
12
12
|
confirmText,
|
13
13
|
cancelText,
|
14
|
-
onConfirm
|
14
|
+
onConfirm,
|
15
|
+
translation
|
15
16
|
} = props;
|
16
17
|
const [open, setOpen] = useState(false);
|
17
18
|
const isMobile = useMediaQuery("(max-width:899px)");
|
@@ -19,6 +20,9 @@ const CustomDialog = (props, ref) => {
|
|
19
20
|
theme
|
20
21
|
} = useEditorContext();
|
21
22
|
const classes = CustomDialogStyles(theme);
|
23
|
+
const translatedContent = content || translation("custonDialogueDefaultText");
|
24
|
+
const translatedConfirmText = confirmText || translation("confirmText");
|
25
|
+
const translatedCancelText = cancelText || translation("cancelText");
|
22
26
|
useImperativeHandle(ref, () => ({
|
23
27
|
handleOpen: () => setOpen(true),
|
24
28
|
handleClose: () => setOpen(false)
|
@@ -26,20 +30,20 @@ const CustomDialog = (props, ref) => {
|
|
26
30
|
const DialogueContent = () => /*#__PURE__*/_jsxs(_Fragment, {
|
27
31
|
children: [/*#__PURE__*/_jsx(DialogContent, {
|
28
32
|
children: /*#__PURE__*/_jsx(Typography, {
|
29
|
-
children:
|
33
|
+
children: translatedContent
|
30
34
|
})
|
31
35
|
}), /*#__PURE__*/_jsxs(DialogActions, {
|
32
36
|
children: [/*#__PURE__*/_jsx(Button, {
|
33
37
|
className: "closeBtn",
|
34
38
|
onClick: () => setOpen(false),
|
35
|
-
children:
|
39
|
+
children: translatedCancelText
|
36
40
|
}), /*#__PURE__*/_jsx(Button, {
|
37
41
|
className: "confirmBtn",
|
38
42
|
onClick: () => {
|
39
43
|
onConfirm();
|
40
44
|
setOpen(false);
|
41
45
|
},
|
42
|
-
children:
|
46
|
+
children: translatedConfirmText
|
43
47
|
})]
|
44
48
|
})]
|
45
49
|
});
|
@@ -75,12 +79,6 @@ const CustomDialog = (props, ref) => {
|
|
75
79
|
});
|
76
80
|
};
|
77
81
|
const CustomDialogComponent = /*#__PURE__*/forwardRef(CustomDialog);
|
78
|
-
CustomDialogComponent.defaultProps = {
|
79
|
-
content: "Are you sure you want to proceed?",
|
80
|
-
confirmText: "Confirm",
|
81
|
-
cancelText: "Cancel",
|
82
|
-
onConfirm: () => console.warn("onConfirm not provided")
|
83
|
-
};
|
84
82
|
CustomDialogComponent.propTypes = {
|
85
83
|
content: PropTypes.string,
|
86
84
|
confirmText: PropTypes.string,
|
@@ -31,8 +31,10 @@ const ImageSelector = props => {
|
|
31
31
|
onClose,
|
32
32
|
open,
|
33
33
|
onSelectImage,
|
34
|
-
title
|
34
|
+
title,
|
35
|
+
customProps
|
35
36
|
} = props;
|
37
|
+
const translation = customProps?.translation;
|
36
38
|
const [tabValue, setTabValue] = useState(title === "Image" ? "choose" : "addLink");
|
37
39
|
const [image, setImage] = useState(value || "");
|
38
40
|
const handleTabChange = (e, newValue) => {
|
@@ -59,9 +61,9 @@ const ImageSelector = props => {
|
|
59
61
|
justifyContent: "space-between",
|
60
62
|
alignItems: "center"
|
61
63
|
},
|
62
|
-
children: [/*#__PURE__*/
|
64
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
63
65
|
sx: classes.titleTypo,
|
64
|
-
children:
|
66
|
+
children: `${translation("addText")} ${translation(title)}`
|
65
67
|
}), /*#__PURE__*/_jsx(IconButton, {
|
66
68
|
sx: {
|
67
69
|
padding: "0px"
|
@@ -98,14 +100,14 @@ const ImageSelector = props => {
|
|
98
100
|
}),
|
99
101
|
iconPosition: "start",
|
100
102
|
value: "upload",
|
101
|
-
label:
|
103
|
+
label: `${translation("Upload")} ${translation(title)}`
|
102
104
|
}), /*#__PURE__*/_jsx(Tab, {
|
103
105
|
className: `${isActive("choose")} ${TAB_SHOW[title].indexOf("choose") === -1 ? "hidden" : ""}`,
|
104
106
|
sx: classes.tab,
|
105
107
|
icon: /*#__PURE__*/_jsx(ImageElementIcon, {}),
|
106
108
|
iconPosition: "start",
|
107
109
|
value: "choose",
|
108
|
-
label:
|
110
|
+
label: `${translation("Choose")} ${translation(title)}`
|
109
111
|
}), /*#__PURE__*/_jsx(Tab, {
|
110
112
|
className: `${isActive("addLink")} ${TAB_SHOW[title].indexOf("addLink") === -1 ? "hidden" : ""}`,
|
111
113
|
sx: classes.tab,
|
@@ -117,7 +119,7 @@ const ImageSelector = props => {
|
|
117
119
|
}),
|
118
120
|
iconPosition: "start",
|
119
121
|
value: "addLink",
|
120
|
-
label:
|
122
|
+
label: `${translation("addText")} ${translation(title)} ${translation("Link")}`
|
121
123
|
})]
|
122
124
|
})
|
123
125
|
}), /*#__PURE__*/_jsx(Grid, {
|
@@ -144,13 +146,13 @@ const ImageSelector = props => {
|
|
144
146
|
onClick: onClose,
|
145
147
|
className: "secondaryBtn",
|
146
148
|
sx: classes.closeBtn,
|
147
|
-
children: "Cancel"
|
149
|
+
children: translation("Cancel")
|
148
150
|
}), /*#__PURE__*/_jsx(Button, {
|
149
151
|
disabled: !image,
|
150
152
|
onClick: onSave,
|
151
153
|
className: `primaryBtn ${!image ? "disabled" : ""}`,
|
152
154
|
sx: classes.saveBtn,
|
153
|
-
children: "Save"
|
155
|
+
children: translation("Save")
|
154
156
|
})]
|
155
157
|
})]
|
156
158
|
}) : null;
|
@@ -6,8 +6,10 @@ const AddLink = props => {
|
|
6
6
|
const {
|
7
7
|
classes,
|
8
8
|
onUploaded,
|
9
|
-
title
|
9
|
+
title,
|
10
|
+
customProps
|
10
11
|
} = props;
|
12
|
+
const translation = customProps?.translation;
|
11
13
|
const [url, setUrl] = useState("");
|
12
14
|
const handleChange = e => {
|
13
15
|
setUrl(e.target.value);
|
@@ -23,16 +25,16 @@ const AddLink = props => {
|
|
23
25
|
paddingTop: "8px"
|
24
26
|
},
|
25
27
|
children: /*#__PURE__*/_jsx(TextField, {
|
26
|
-
placeholder:
|
28
|
+
placeholder: `${translation("Add")} ${translation(title)} ${translation("URL")}`,
|
27
29
|
fullWidth: true,
|
28
30
|
size: "small",
|
29
31
|
value: url,
|
30
32
|
onChange: handleChange,
|
31
|
-
helperText: "
|
33
|
+
helperText: translation("addLinkHelperText"),
|
32
34
|
sx: classes.addLinkField,
|
33
35
|
InputProps: {
|
34
36
|
endAdornment: /*#__PURE__*/_jsx(Tooltip, {
|
35
|
-
title:
|
37
|
+
title: `${translation("Add")} ${translation(title)} ${translation("URL")}`,
|
36
38
|
arrow: true,
|
37
39
|
children: /*#__PURE__*/_jsx(IconButton, {
|
38
40
|
sx: classes.addLinkBtn,
|
@@ -24,7 +24,8 @@ const OpenInNewTab = props => {
|
|
24
24
|
const {
|
25
25
|
nav,
|
26
26
|
openInNewTab,
|
27
|
-
onNewTabChange
|
27
|
+
onNewTabChange,
|
28
|
+
translation
|
28
29
|
} = props;
|
29
30
|
return nav?.showOpenInNewTab ? /*#__PURE__*/_jsx(FormControlLabel, {
|
30
31
|
className: "ccheckbox-primary",
|
@@ -34,7 +35,7 @@ const OpenInNewTab = props => {
|
|
34
35
|
}),
|
35
36
|
label: /*#__PURE__*/_jsx(Typography, {
|
36
37
|
variant: "body2",
|
37
|
-
children: "Open in new tab"
|
38
|
+
children: translation("Open in new tab")
|
38
39
|
})
|
39
40
|
}) : null;
|
40
41
|
};
|
@@ -56,7 +57,8 @@ export const SelectPage = props => {
|
|
56
57
|
const {
|
57
58
|
value,
|
58
59
|
onChange,
|
59
|
-
services
|
60
|
+
services,
|
61
|
+
translation
|
60
62
|
} = props;
|
61
63
|
const [pages, setPages] = useState([]);
|
62
64
|
const editor = useSlate();
|
@@ -112,7 +114,7 @@ export const SelectPage = props => {
|
|
112
114
|
children: [/*#__PURE__*/_jsx(FreeSoloCreateOption, {
|
113
115
|
label: page?.label,
|
114
116
|
setValue: val => onChange(val?.value || ""),
|
115
|
-
placeholder: "Select Page",
|
117
|
+
placeholder: translation("Select Page"),
|
116
118
|
options: pages,
|
117
119
|
disabled: isCurrentPage
|
118
120
|
}), /*#__PURE__*/_jsx(FreeSoloCreateOption, {
|
@@ -124,7 +126,7 @@ export const SelectPage = props => {
|
|
124
126
|
}
|
125
127
|
onChange(url);
|
126
128
|
},
|
127
|
-
placeholder: "Select Section or anchor",
|
129
|
+
placeholder: translation("Select Section or anchor"),
|
128
130
|
options: page?.sections?.map(p => ({
|
129
131
|
label: p,
|
130
132
|
value: p
|
@@ -136,12 +138,13 @@ export const SelectPage = props => {
|
|
136
138
|
};
|
137
139
|
export const Trigger = props => {
|
138
140
|
const {
|
139
|
-
nav
|
141
|
+
nav,
|
142
|
+
translation
|
140
143
|
} = props;
|
141
|
-
return /*#__PURE__*/
|
144
|
+
return /*#__PURE__*/_jsx(Typography, {
|
142
145
|
variant: "subtitle1",
|
143
146
|
gutterBottom: true,
|
144
|
-
children:
|
147
|
+
children: `${translation("Choosing this will trigger the")} ${translation(nav.type)} ${translation("step")}`
|
145
148
|
});
|
146
149
|
};
|
147
150
|
const scrollToOptions = [{
|
@@ -155,6 +158,7 @@ export const ScrollTopBottom = props => {
|
|
155
158
|
const {
|
156
159
|
value,
|
157
160
|
onChange,
|
161
|
+
translation,
|
158
162
|
classes
|
159
163
|
} = props;
|
160
164
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
@@ -163,7 +167,7 @@ export const ScrollTopBottom = props => {
|
|
163
167
|
sx: {
|
164
168
|
paddingBottom: "4px"
|
165
169
|
},
|
166
|
-
children: "Choose Top/Bottom of page"
|
170
|
+
children: translation("Choose Top/Bottom of page")
|
167
171
|
}), /*#__PURE__*/_jsx(Select, {
|
168
172
|
size: "small",
|
169
173
|
fullWidth: true,
|
@@ -177,7 +181,7 @@ export const ScrollTopBottom = props => {
|
|
177
181
|
value: option.value,
|
178
182
|
children: /*#__PURE__*/_jsx(Typography, {
|
179
183
|
variant: "body2",
|
180
|
-
children: option.label
|
184
|
+
children: translation(option.label)
|
181
185
|
})
|
182
186
|
}, i);
|
183
187
|
})
|
@@ -44,7 +44,8 @@ export default function LinkSettings(props) {
|
|
44
44
|
} = props;
|
45
45
|
const {
|
46
46
|
isMobile,
|
47
|
-
tagName
|
47
|
+
tagName,
|
48
|
+
translation
|
48
49
|
} = customProps;
|
49
50
|
const navOptions = getNavOptions(customProps.hideTools, tagName, allowTrigger);
|
50
51
|
const classes = LinkSettingsStyles(theme);
|
@@ -72,7 +73,7 @@ export default function LinkSettings(props) {
|
|
72
73
|
sx: {
|
73
74
|
fontWeight: 600
|
74
75
|
},
|
75
|
-
children: "
|
76
|
+
children: translation("dialogueTitle")
|
76
77
|
}), /*#__PURE__*/_jsx(Select, {
|
77
78
|
size: "small",
|
78
79
|
fullWidth: true,
|
@@ -94,7 +95,7 @@ export default function LinkSettings(props) {
|
|
94
95
|
value: navOption.value,
|
95
96
|
children: /*#__PURE__*/_jsx(Typography, {
|
96
97
|
variant: "body2",
|
97
|
-
children: navOption.label
|
98
|
+
children: translation(navOption.label)
|
98
99
|
})
|
99
100
|
}, i);
|
100
101
|
})
|
@@ -103,14 +104,15 @@ export default function LinkSettings(props) {
|
|
103
104
|
paddingTop: "14px"
|
104
105
|
},
|
105
106
|
children: NavSettings && /*#__PURE__*/_jsx(NavSettings, {
|
106
|
-
placeholder: nav?.placeholder,
|
107
|
+
placeholder: translation(nav?.placeholder),
|
107
108
|
nav: nav,
|
108
109
|
onChange: onChange,
|
109
110
|
value: navValue,
|
110
111
|
openInNewTab: openInNewTab,
|
111
112
|
onNewTabChange: () => setOpenInNewTab(prev => !prev),
|
112
113
|
services: customProps.services,
|
113
|
-
classes: classes
|
114
|
+
classes: classes,
|
115
|
+
translation: translation
|
114
116
|
})
|
115
117
|
}), /*#__PURE__*/_jsx(Box, {
|
116
118
|
component: "div",
|
@@ -118,7 +120,8 @@ export default function LinkSettings(props) {
|
|
118
120
|
children: /*#__PURE__*/_jsx(ActionsButtons, {
|
119
121
|
classes: classes,
|
120
122
|
onCancel: handleClose,
|
121
|
-
onSave: onSubmit
|
123
|
+
onSave: onSubmit,
|
124
|
+
translation: translation
|
122
125
|
})
|
123
126
|
})]
|
124
127
|
});
|
@@ -130,7 +133,7 @@ export default function LinkSettings(props) {
|
|
130
133
|
fullWidth: true,
|
131
134
|
maxWidth: "sm",
|
132
135
|
children: [/*#__PURE__*/_jsx(DialogTitle, {
|
133
|
-
children: "
|
136
|
+
children: translation("dialogueTitle")
|
134
137
|
}), /*#__PURE__*/_jsx(IconButton, {
|
135
138
|
"aria-label": "close",
|
136
139
|
onClick: handleClose,
|
@@ -152,7 +155,7 @@ export default function LinkSettings(props) {
|
|
152
155
|
return /*#__PURE__*/_jsx(FormControlLabel, {
|
153
156
|
value: navOption.value,
|
154
157
|
control: /*#__PURE__*/_jsx(Radio, {}),
|
155
|
-
label: navOption.label,
|
158
|
+
label: translation(navOption.label),
|
156
159
|
onChange: () => {
|
157
160
|
setNav(navOption);
|
158
161
|
setNavValue("");
|
@@ -165,14 +168,15 @@ export default function LinkSettings(props) {
|
|
165
168
|
item: true,
|
166
169
|
xs: 6,
|
167
170
|
children: NavSettings && /*#__PURE__*/_jsx(NavSettings, {
|
168
|
-
placeholder: nav?.placeholder,
|
171
|
+
placeholder: translation(nav?.placeholder),
|
169
172
|
nav: nav,
|
170
173
|
onChange: onChange,
|
171
174
|
value: navValue,
|
172
175
|
openInNewTab: openInNewTab,
|
173
176
|
onNewTabChange: () => setOpenInNewTab(prev => !prev),
|
174
177
|
services: customProps.services,
|
175
|
-
classes: classes
|
178
|
+
classes: classes,
|
179
|
+
translation: translation
|
176
180
|
})
|
177
181
|
})]
|
178
182
|
})
|
@@ -180,7 +184,8 @@ export default function LinkSettings(props) {
|
|
180
184
|
children: /*#__PURE__*/_jsx(ActionsButtons, {
|
181
185
|
classes: classes,
|
182
186
|
onCancel: handleClose,
|
183
|
-
onSave: onSubmit
|
187
|
+
onSave: onSubmit,
|
188
|
+
translation: translation
|
184
189
|
})
|
185
190
|
})]
|
186
191
|
});
|
@@ -189,17 +194,18 @@ export default function LinkSettings(props) {
|
|
189
194
|
function ActionsButtons({
|
190
195
|
classes,
|
191
196
|
onCancel,
|
192
|
-
onSave
|
197
|
+
onSave,
|
198
|
+
translation
|
193
199
|
}) {
|
194
200
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
195
201
|
children: [/*#__PURE__*/_jsx(Button, {
|
196
202
|
onClick: onCancel,
|
197
203
|
sx: classes.closeBtn,
|
198
|
-
children: "Cancel"
|
204
|
+
children: translation("Cancel")
|
199
205
|
}), /*#__PURE__*/_jsx(Button, {
|
200
206
|
onClick: onSave,
|
201
207
|
sx: classes.saveBtn,
|
202
|
-
children: "Save"
|
208
|
+
children: translation("Save")
|
203
209
|
})]
|
204
210
|
});
|
205
211
|
}
|
@@ -13,7 +13,7 @@ export const getNavOptions = (hideTools = [], tagName = "", allowTrigger) => {
|
|
13
13
|
}, {
|
14
14
|
label: "Web Address",
|
15
15
|
value: "webAddress",
|
16
|
-
placeholder: "
|
16
|
+
placeholder: "httpsText",
|
17
17
|
showOpenInNewTab: true
|
18
18
|
}, {
|
19
19
|
label: "Select Page and Section",
|
@@ -24,8 +24,12 @@ const MentionsPopup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
24
24
|
mentions,
|
25
25
|
setMentions,
|
26
26
|
type,
|
27
|
-
otherProps
|
27
|
+
otherProps,
|
28
|
+
customProps
|
28
29
|
} = props;
|
30
|
+
const {
|
31
|
+
translation
|
32
|
+
} = customProps;
|
29
33
|
const classes = usePopupStyle(theme);
|
30
34
|
const papperRef = useRef(null);
|
31
35
|
const buttonRef = useRef(null);
|
@@ -94,7 +98,7 @@ const MentionsPopup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
94
98
|
sx: classes.groupHeader,
|
95
99
|
component: "div",
|
96
100
|
variant: "h6",
|
97
|
-
children: prevGroup
|
101
|
+
children: translation(prevGroup)
|
98
102
|
});
|
99
103
|
} else {
|
100
104
|
return null;
|
@@ -7,9 +7,9 @@ const CMenus = {
|
|
7
7
|
name: "bringForward",
|
8
8
|
label: "Move to Front",
|
9
9
|
autoClose: false,
|
10
|
-
render:
|
10
|
+
render: translation => {
|
11
11
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
12
|
-
children: ["Move to Front", " ", /*#__PURE__*/_jsxs("span", {
|
12
|
+
children: [translation("Move to Front"), " ", /*#__PURE__*/_jsxs("span", {
|
13
13
|
className: "shortcut-help-info",
|
14
14
|
children: [/*#__PURE__*/_jsx(CMDIcon, {}), " \u2191"]
|
15
15
|
})]
|
@@ -19,9 +19,9 @@ const CMenus = {
|
|
19
19
|
name: "bringBackward",
|
20
20
|
label: "Move to Back",
|
21
21
|
autoClose: false,
|
22
|
-
render:
|
22
|
+
render: translation => {
|
23
23
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
24
|
-
children: ["Move to Back", " ", /*#__PURE__*/_jsxs("span", {
|
24
|
+
children: [translation("Move to Back"), " ", /*#__PURE__*/_jsxs("span", {
|
25
25
|
className: "shortcut-help-info",
|
26
26
|
children: [/*#__PURE__*/_jsx(CMDIcon, {}), " \u2193"]
|
27
27
|
})]
|
@@ -30,9 +30,9 @@ const CMenus = {
|
|
30
30
|
}, {
|
31
31
|
name: "cut",
|
32
32
|
label: "Cut",
|
33
|
-
render:
|
33
|
+
render: translation => {
|
34
34
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
35
|
-
children: ["Cut", " ", /*#__PURE__*/_jsxs("span", {
|
35
|
+
children: [translation("Cut"), " ", /*#__PURE__*/_jsxs("span", {
|
36
36
|
className: "shortcut-help-info",
|
37
37
|
children: [/*#__PURE__*/_jsx(CMDIcon, {}), " X"]
|
38
38
|
})]
|
@@ -41,9 +41,9 @@ const CMenus = {
|
|
41
41
|
}, {
|
42
42
|
name: "copy",
|
43
43
|
label: "Copy",
|
44
|
-
render:
|
44
|
+
render: translation => {
|
45
45
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
46
|
-
children: ["Copy", " ", /*#__PURE__*/_jsxs("span", {
|
46
|
+
children: [translation("Copy"), " ", /*#__PURE__*/_jsxs("span", {
|
47
47
|
className: "shortcut-help-info",
|
48
48
|
children: [/*#__PURE__*/_jsx(CMDIcon, {}), " C"]
|
49
49
|
})]
|
@@ -52,9 +52,9 @@ const CMenus = {
|
|
52
52
|
}, {
|
53
53
|
name: "paste",
|
54
54
|
label: "Paste",
|
55
|
-
render:
|
55
|
+
render: translation => {
|
56
56
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
57
|
-
children: ["Paste", " ", /*#__PURE__*/_jsxs("span", {
|
57
|
+
children: [translation("Paste"), " ", /*#__PURE__*/_jsxs("span", {
|
58
58
|
className: "shortcut-help-info",
|
59
59
|
children: [/*#__PURE__*/_jsx(CMDIcon, {}), " V"]
|
60
60
|
})]
|
@@ -67,9 +67,9 @@ const CMenus = {
|
|
67
67
|
parent: [{
|
68
68
|
name: "cut",
|
69
69
|
label: "Cut",
|
70
|
-
render:
|
70
|
+
render: translation => {
|
71
71
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
72
|
-
children: ["Cut Section", " ", /*#__PURE__*/_jsxs("span", {
|
72
|
+
children: [translation("Cut Section"), " ", /*#__PURE__*/_jsxs("span", {
|
73
73
|
className: "shortcut-help-info",
|
74
74
|
children: [/*#__PURE__*/_jsx(CMDIcon, {}), " X"]
|
75
75
|
})]
|
@@ -78,9 +78,9 @@ const CMenus = {
|
|
78
78
|
}, {
|
79
79
|
name: "copy",
|
80
80
|
label: "Copy",
|
81
|
-
render:
|
81
|
+
render: translation => {
|
82
82
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
83
|
-
children: ["Copy Section", " ", /*#__PURE__*/_jsxs("span", {
|
83
|
+
children: [translation("Copy Section"), " ", /*#__PURE__*/_jsxs("span", {
|
84
84
|
className: "shortcut-help-info",
|
85
85
|
children: [/*#__PURE__*/_jsx(CMDIcon, {}), " C"]
|
86
86
|
})]
|
@@ -89,9 +89,9 @@ const CMenus = {
|
|
89
89
|
}, {
|
90
90
|
name: "paste",
|
91
91
|
label: "Paste",
|
92
|
-
render:
|
92
|
+
render: translation => {
|
93
93
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
94
|
-
children: ["Paste Section", " ", /*#__PURE__*/_jsxs("span", {
|
94
|
+
children: [translation("Paste Section"), " ", /*#__PURE__*/_jsxs("span", {
|
95
95
|
className: "shortcut-help-info",
|
96
96
|
children: [/*#__PURE__*/_jsx(CMDIcon, {}), " V"]
|
97
97
|
})]
|
@@ -101,9 +101,9 @@ const CMenus = {
|
|
101
101
|
"parent-container": [{
|
102
102
|
name: "cut",
|
103
103
|
label: "Cut",
|
104
|
-
render:
|
104
|
+
render: translation => {
|
105
105
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
106
|
-
children: ["Cut", " ", /*#__PURE__*/_jsxs("span", {
|
106
|
+
children: [translation("Cut"), " ", /*#__PURE__*/_jsxs("span", {
|
107
107
|
className: "shortcut-help-info",
|
108
108
|
children: [/*#__PURE__*/_jsx(CMDIcon, {}), " X"]
|
109
109
|
})]
|
@@ -112,9 +112,9 @@ const CMenus = {
|
|
112
112
|
}, {
|
113
113
|
name: "copy",
|
114
114
|
label: "Copy",
|
115
|
-
render:
|
115
|
+
render: translation => {
|
116
116
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
117
|
-
children: ["Copy", " ", /*#__PURE__*/_jsxs("span", {
|
117
|
+
children: [translation("Copy"), " ", /*#__PURE__*/_jsxs("span", {
|
118
118
|
className: "shortcut-help-info",
|
119
119
|
children: [/*#__PURE__*/_jsx(CMDIcon, {}), " C"]
|
120
120
|
})]
|
@@ -123,9 +123,9 @@ const CMenus = {
|
|
123
123
|
}, {
|
124
124
|
name: "paste",
|
125
125
|
label: "Paste",
|
126
|
-
render:
|
126
|
+
render: translation => {
|
127
127
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
128
|
-
children: ["Paste", " ", /*#__PURE__*/_jsxs("span", {
|
128
|
+
children: [translation("Paste"), " ", /*#__PURE__*/_jsxs("span", {
|
129
129
|
className: "shortcut-help-info",
|
130
130
|
children: [/*#__PURE__*/_jsx(CMDIcon, {}), " V"]
|
131
131
|
})]
|
@@ -14,7 +14,8 @@ const ContextMenu = props => {
|
|
14
14
|
open,
|
15
15
|
type,
|
16
16
|
contextMenu,
|
17
|
-
handleClose
|
17
|
+
handleClose,
|
18
|
+
translation
|
18
19
|
} = props;
|
19
20
|
const {
|
20
21
|
path,
|
@@ -35,7 +36,7 @@ const ContextMenu = props => {
|
|
35
36
|
return /*#__PURE__*/_jsx(MenuItem, {
|
36
37
|
className: "cm-menu-item",
|
37
38
|
onClick: handleClose(m),
|
38
|
-
children: m?.render ? m.render() : m.label
|
39
|
+
children: m?.render ? m.render(translation) : translation(m.label)
|
39
40
|
}, `cm_${i}`);
|
40
41
|
})
|
41
42
|
}) : null;
|
@@ -16,7 +16,8 @@ const ElementOptions = props => {
|
|
16
16
|
actionsMap,
|
17
17
|
optionsProps,
|
18
18
|
selectedAction,
|
19
|
-
theme
|
19
|
+
theme,
|
20
|
+
customProps
|
20
21
|
} = props;
|
21
22
|
const classes = useElementOptionsStyle({
|
22
23
|
theme
|
@@ -28,6 +29,9 @@ const ElementOptions = props => {
|
|
28
29
|
menuProps
|
29
30
|
} = menu;
|
30
31
|
const isOpen = Boolean(anchorEl) && open;
|
32
|
+
const {
|
33
|
+
translation
|
34
|
+
} = customProps;
|
31
35
|
const handleOptionClick = type => e => {
|
32
36
|
if (actionsMap[type]) {
|
33
37
|
const {
|
@@ -57,7 +61,7 @@ const ElementOptions = props => {
|
|
57
61
|
title
|
58
62
|
} = Actions[action] || {};
|
59
63
|
return type ? /*#__PURE__*/_jsx(Tooltip, {
|
60
|
-
title: title,
|
64
|
+
title: translation(title),
|
61
65
|
arrow: true,
|
62
66
|
children: /*#__PURE__*/_jsx(Button, {
|
63
67
|
onClick: handleOptionClick(type),
|
@@ -85,6 +89,7 @@ const ElementOptions = props => {
|
|
85
89
|
}), open && MenuComp ? /*#__PURE__*/_jsx(OptionsPopup, {
|
86
90
|
theme: theme,
|
87
91
|
open: openMenu,
|
92
|
+
translation: translation,
|
88
93
|
...menu,
|
89
94
|
handleClose: handleClose,
|
90
95
|
children: /*#__PURE__*/_jsx(MenuComp, {
|
@@ -8,14 +8,18 @@ const SavePopup = props => {
|
|
8
8
|
const {
|
9
9
|
classes,
|
10
10
|
onClose,
|
11
|
-
elementProps
|
11
|
+
elementProps,
|
12
|
+
customProps
|
12
13
|
} = props;
|
14
|
+
const {
|
15
|
+
translation
|
16
|
+
} = customProps;
|
13
17
|
return /*#__PURE__*/_jsxs(Dialog, {
|
14
18
|
open: true,
|
15
19
|
fullWidth: true,
|
16
20
|
sx: classes.dialog,
|
17
21
|
children: [/*#__PURE__*/_jsxs(DialogTitle, {
|
18
|
-
children: ["Save As Template", /*#__PURE__*/_jsx(IconButton, {
|
22
|
+
children: [translation("Save As Template"), /*#__PURE__*/_jsx(IconButton, {
|
19
23
|
onClick: onClose,
|
20
24
|
children: /*#__PURE__*/_jsx(CloseIcon, {})
|
21
25
|
})]
|
@@ -27,7 +31,8 @@ const SavePopup = props => {
|
|
27
31
|
},
|
28
32
|
saveText: "Save",
|
29
33
|
handleClose: onClose,
|
30
|
-
elementProps: elementProps
|
34
|
+
elementProps: elementProps,
|
35
|
+
translation: translation
|
31
36
|
})
|
32
37
|
})]
|
33
38
|
});
|
@@ -19,6 +19,9 @@ const Settings = props => {
|
|
19
19
|
customProps,
|
20
20
|
theme
|
21
21
|
} = props;
|
22
|
+
const {
|
23
|
+
translation
|
24
|
+
} = customProps;
|
22
25
|
const title = settingsLabel[childType] || "Settings";
|
23
26
|
const Settings = SettingsComponents[childType];
|
24
27
|
return /*#__PURE__*/_jsx(_Fragment, {
|
@@ -46,10 +49,10 @@ const Settings = props => {
|
|
46
49
|
children: [/*#__PURE__*/_jsxs(Typography, {
|
47
50
|
variant: "h6",
|
48
51
|
className: "item-wrapper title",
|
49
|
-
children: [title, /*#__PURE__*/_jsx(Box, {
|
52
|
+
children: [translation(title), /*#__PURE__*/_jsx(Box, {
|
50
53
|
component: "div",
|
51
54
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
52
|
-
title: "Close",
|
55
|
+
title: translation("Close"),
|
53
56
|
arrow: true,
|
54
57
|
children: /*#__PURE__*/_jsx(IconButton, {
|
55
58
|
className: "closeBtn",
|
@@ -19,7 +19,8 @@ const FormSettings = props => {
|
|
19
19
|
const element = Node.get(editor, element_path);
|
20
20
|
const styleMaps = formStyle;
|
21
21
|
const {
|
22
|
-
hideTools
|
22
|
+
hideTools,
|
23
|
+
translation
|
23
24
|
} = customProps || {};
|
24
25
|
const {
|
25
26
|
theme
|
@@ -107,7 +108,7 @@ const FormSettings = props => {
|
|
107
108
|
fontSize: "14px !important",
|
108
109
|
fontWeight: "400"
|
109
110
|
},
|
110
|
-
children: m?.tab
|
111
|
+
children: translation(m?.tab)
|
111
112
|
})
|
112
113
|
}), /*#__PURE__*/_jsx(AccordionDetails, {
|
113
114
|
sx: {
|
@@ -8,7 +8,8 @@ const TextSettings = props => {
|
|
8
8
|
const {
|
9
9
|
editor,
|
10
10
|
path,
|
11
|
-
theme
|
11
|
+
theme,
|
12
|
+
customProps
|
12
13
|
} = props;
|
13
14
|
const item_path = path.split("|").map(m => parseInt(m));
|
14
15
|
const element_path = [...item_path, 0];
|
@@ -25,7 +26,8 @@ const TextSettings = props => {
|
|
25
26
|
}, []);
|
26
27
|
return /*#__PURE__*/_jsx(TextFormat, {
|
27
28
|
classes: classes,
|
28
|
-
editor: editor
|
29
|
+
editor: editor,
|
30
|
+
customProps: customProps
|
29
31
|
});
|
30
32
|
};
|
31
33
|
export default TextSettings;
|