@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
@@ -17,7 +17,8 @@ const OptionsPopup = props => {
|
|
17
17
|
open,
|
18
18
|
anchorEl,
|
19
19
|
placement,
|
20
|
-
handleClose
|
20
|
+
handleClose,
|
21
|
+
translation
|
21
22
|
} = props;
|
22
23
|
return anchorEl ? /*#__PURE__*/_jsx(Popper, {
|
23
24
|
sx: classes.root,
|
@@ -30,10 +31,10 @@ const OptionsPopup = props => {
|
|
30
31
|
children: [/*#__PURE__*/_jsxs(Typography, {
|
31
32
|
variant: "div",
|
32
33
|
className: "item-wrapper title",
|
33
|
-
children: [title, /*#__PURE__*/_jsx(Box, {
|
34
|
+
children: [translation(title), /*#__PURE__*/_jsx(Box, {
|
34
35
|
component: "div",
|
35
36
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
36
|
-
title: "Close",
|
37
|
+
title: translation("Close"),
|
37
38
|
arrow: true,
|
38
39
|
children: /*#__PURE__*/_jsx(IconButton, {
|
39
40
|
onClick: handleClose,
|
@@ -9,7 +9,8 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
const SwitchViewport = props => {
|
10
10
|
const {
|
11
11
|
breakpoint,
|
12
|
-
onChange
|
12
|
+
onChange,
|
13
|
+
translation
|
13
14
|
} = props;
|
14
15
|
const classes = useSwitchViewport();
|
15
16
|
const {
|
@@ -21,7 +22,7 @@ const SwitchViewport = props => {
|
|
21
22
|
return /*#__PURE__*/_jsxs(Box, {
|
22
23
|
sx: classes.root,
|
23
24
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
24
|
-
title: "Desktop View",
|
25
|
+
title: translation("Desktop View"),
|
25
26
|
children: /*#__PURE__*/_jsx(IconButton, {
|
26
27
|
className: `${!breakpoint || breakpoint === "lg" ? "active" : ""}`,
|
27
28
|
onClick: () => {
|
@@ -31,7 +32,7 @@ const SwitchViewport = props => {
|
|
31
32
|
children: /*#__PURE__*/_jsx(PersonalVideoIcon, {})
|
32
33
|
})
|
33
34
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
34
|
-
title: "Mobile View",
|
35
|
+
title: translation("Mobile View"),
|
35
36
|
children: /*#__PURE__*/_jsx(IconButton, {
|
36
37
|
className: `${breakpoint === "xs" ? "active" : ""}`,
|
37
38
|
onClick: () => {
|
@@ -64,7 +64,8 @@ const RnD = props => {
|
|
64
64
|
editor,
|
65
65
|
breakpoint = "",
|
66
66
|
handleContextMenuClick = () => {},
|
67
|
-
itemData = {}
|
67
|
+
itemData = {},
|
68
|
+
customProps
|
68
69
|
} = props;
|
69
70
|
const {
|
70
71
|
isSelectedElement,
|
@@ -106,6 +107,9 @@ const RnD = props => {
|
|
106
107
|
y: 0
|
107
108
|
});
|
108
109
|
const parentSectionPath = str_path?.split("|").slice(0, 2).join("_");
|
110
|
+
const {
|
111
|
+
translation
|
112
|
+
} = customProps;
|
109
113
|
useEffect(() => {
|
110
114
|
if (ITEM_TYPES.includes(type)) {
|
111
115
|
if (enable === 1) {
|
@@ -530,7 +534,7 @@ const RnD = props => {
|
|
530
534
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
531
535
|
children: [/*#__PURE__*/_jsxs(Box, {
|
532
536
|
component: Rnd,
|
533
|
-
placeholder: ItemTypes[childType] || "Item",
|
537
|
+
placeholder: translation(ItemTypes[childType]) || translation("Item"),
|
534
538
|
id: eId || "",
|
535
539
|
ref: c => {
|
536
540
|
positionRef.current = c;
|
@@ -597,7 +601,9 @@ const RnD = props => {
|
|
597
601
|
optionsProps: optionsProps,
|
598
602
|
selectedAction: currentAction,
|
599
603
|
path: str_path,
|
600
|
-
theme: theme
|
604
|
+
theme: theme,
|
605
|
+
translation: translation,
|
606
|
+
customProps: customProps
|
601
607
|
}) : null, /*#__PURE__*/_jsx(ElementSettings, {
|
602
608
|
open: Boolean(currentAction),
|
603
609
|
currentAction: currentAction,
|
@@ -631,7 +637,8 @@ const RnD = props => {
|
|
631
637
|
open: openContextMenu,
|
632
638
|
contextMenu: contextMenu,
|
633
639
|
handleClose: handleClose,
|
634
|
-
theme: theme
|
640
|
+
theme: theme,
|
641
|
+
translation: translation
|
635
642
|
}), type === "parent" && breakpoint === "lg" && !readOnly ? /*#__PURE__*/_jsx(VirtualElement, {
|
636
643
|
parentEle: positionRef?.current?.resizableElement?.current,
|
637
644
|
updated_at: updated_at,
|
@@ -19,7 +19,8 @@ const Toolbar = ({
|
|
19
19
|
readOnly,
|
20
20
|
showTool,
|
21
21
|
onSettings,
|
22
|
-
isSectionFullWidth
|
22
|
+
isSectionFullWidth,
|
23
|
+
translation
|
23
24
|
}) => {
|
24
25
|
return !readOnly && !showTool ? /*#__PURE__*/_jsx(Box, {
|
25
26
|
component: "div",
|
@@ -33,7 +34,7 @@ const Toolbar = ({
|
|
33
34
|
}
|
34
35
|
},
|
35
36
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
36
|
-
title: "Section Settings",
|
37
|
+
title: translation("Section Settings"),
|
37
38
|
children: /*#__PURE__*/_jsx(IconButton, {
|
38
39
|
onClick: onSettings,
|
39
40
|
children: /*#__PURE__*/_jsx(SectionSettingIcon, {})
|
@@ -51,7 +52,8 @@ const Section = props => {
|
|
51
52
|
customProps
|
52
53
|
} = props;
|
53
54
|
const {
|
54
|
-
readOnly
|
55
|
+
readOnly,
|
56
|
+
translation
|
55
57
|
} = customProps;
|
56
58
|
const editor = useSlateStatic();
|
57
59
|
// const [isHovering, setIsHovering] = useState(false);
|
@@ -176,7 +178,8 @@ const Section = props => {
|
|
176
178
|
isSectionFullWidth: isSectionFullWidth,
|
177
179
|
readOnly: readOnly,
|
178
180
|
showTool: false,
|
179
|
-
onSettings: onSettings
|
181
|
+
onSettings: onSettings,
|
182
|
+
translation: translation
|
180
183
|
}), children]
|
181
184
|
}), openSetttings ? /*#__PURE__*/_jsx(SectionPopup, {
|
182
185
|
element: {
|
@@ -164,7 +164,10 @@ const ELEMENTS_LIST = [{
|
|
164
164
|
type: "emoji",
|
165
165
|
renderComponent: rest => /*#__PURE__*/_jsx(EmojiButton, {
|
166
166
|
...rest,
|
167
|
-
icoBtnType: "cmd"
|
167
|
+
icoBtnType: "cmd",
|
168
|
+
customProps: {
|
169
|
+
...rest
|
170
|
+
}
|
168
171
|
})
|
169
172
|
}, {
|
170
173
|
name: "Brain",
|
@@ -176,7 +179,10 @@ const ELEMENTS_LIST = [{
|
|
176
179
|
element: {
|
177
180
|
name: "Brain"
|
178
181
|
},
|
179
|
-
icoBtnType: "cmd"
|
182
|
+
icoBtnType: "cmd",
|
183
|
+
customProps: {
|
184
|
+
...rest
|
185
|
+
}
|
180
186
|
})
|
181
187
|
}, {
|
182
188
|
name: "Divider",
|
@@ -299,10 +305,19 @@ const elements = props => {
|
|
299
305
|
const {
|
300
306
|
search,
|
301
307
|
hideTools,
|
308
|
+
translation,
|
302
309
|
editor
|
303
310
|
} = props;
|
304
311
|
const nodeType = canOpen(editor);
|
305
|
-
const
|
312
|
+
const translatedElements = ELEMENTS_LIST.map(element => ({
|
313
|
+
...element,
|
314
|
+
name: translation ? translation(element.name) : element.name,
|
315
|
+
renderComponent: element.renderComponent ? rest => element.renderComponent({
|
316
|
+
...rest,
|
317
|
+
translation
|
318
|
+
}) : undefined
|
319
|
+
}));
|
320
|
+
const filteredElements = translatedElements.filter(f => (hideTools || []).indexOf(f.type) === -1 && (!f?.hideFor || f?.hideFor?.indexOf(nodeType) === -1));
|
306
321
|
return filteredElements.filter(c => c.name.toLowerCase().includes(search?.toLowerCase()));
|
307
322
|
};
|
308
323
|
export default elements;
|
@@ -15,12 +15,12 @@ const appHeaderStyle = [{
|
|
15
15
|
options: fontOptions,
|
16
16
|
webFont: true,
|
17
17
|
width: 7,
|
18
|
-
renderOption: option => {
|
18
|
+
renderOption: (option, elementProps, translation) => {
|
19
19
|
return /*#__PURE__*/_jsx("span", {
|
20
20
|
style: {
|
21
21
|
fontFamily: option.value
|
22
22
|
},
|
23
|
-
children: "LOGO"
|
23
|
+
children: translation("LOGO")
|
24
24
|
});
|
25
25
|
}
|
26
26
|
}, {
|
@@ -58,12 +58,12 @@ const appHeaderStyle = [{
|
|
58
58
|
webFont: true,
|
59
59
|
width: 7,
|
60
60
|
options: fontOptions,
|
61
|
-
renderOption: option => {
|
61
|
+
renderOption: (option, elementProps, translation) => {
|
62
62
|
return /*#__PURE__*/_jsx("span", {
|
63
63
|
style: {
|
64
64
|
fontFamily: option.value
|
65
65
|
},
|
66
|
-
children: "Home"
|
66
|
+
children: translation("Home")
|
67
67
|
});
|
68
68
|
}
|
69
69
|
}, {
|
@@ -51,9 +51,9 @@ const boxStyle = [{
|
|
51
51
|
text: "Dashed",
|
52
52
|
value: "dashed"
|
53
53
|
}],
|
54
|
-
renderOption: option => {
|
54
|
+
renderOption: (option, elementProps, translation) => {
|
55
55
|
return /*#__PURE__*/_jsx("span", {
|
56
|
-
children: option.text
|
56
|
+
children: translation(option.text)
|
57
57
|
});
|
58
58
|
}
|
59
59
|
}]
|
@@ -104,9 +104,9 @@ const buttonStyle = [{
|
|
104
104
|
text: "Dashed",
|
105
105
|
value: "dashed"
|
106
106
|
}],
|
107
|
-
renderOption: option => {
|
107
|
+
renderOption: (option, elementProps, translation) => {
|
108
108
|
return /*#__PURE__*/_jsx("span", {
|
109
|
-
children: option.text
|
109
|
+
children: translation(option.text)
|
110
110
|
});
|
111
111
|
}
|
112
112
|
}]
|
@@ -46,9 +46,9 @@ const dividerStyle = [{
|
|
46
46
|
text: "Outset",
|
47
47
|
value: "outset"
|
48
48
|
}],
|
49
|
-
renderOption: option => {
|
49
|
+
renderOption: (option, lementProps, translation) => {
|
50
50
|
return /*#__PURE__*/_jsx("span", {
|
51
|
-
children: option.text
|
51
|
+
children: translation(option.text)
|
52
52
|
});
|
53
53
|
}
|
54
54
|
}]
|
@@ -16,18 +16,18 @@ const embedVideoStyle = [{
|
|
16
16
|
key: "aspectRatio",
|
17
17
|
type: "textOptions",
|
18
18
|
options: [{
|
19
|
-
text: "
|
19
|
+
text: "deafultRatio",
|
20
20
|
value: "16 / 9"
|
21
21
|
}, {
|
22
|
-
text: "
|
22
|
+
text: "nineSixteen",
|
23
23
|
value: "9 / 16"
|
24
24
|
}, {
|
25
25
|
text: "Custom",
|
26
26
|
value: "custom"
|
27
27
|
}],
|
28
|
-
renderOption: option => {
|
28
|
+
renderOption: (option, elementProps, translation) => {
|
29
29
|
return /*#__PURE__*/_jsx("span", {
|
30
|
-
children: option.text
|
30
|
+
children: translation(option.text)
|
31
31
|
});
|
32
32
|
}
|
33
33
|
}]
|
@@ -78,9 +78,9 @@ const embedVideoStyle = [{
|
|
78
78
|
text: "Dashed",
|
79
79
|
value: "dashed"
|
80
80
|
}],
|
81
|
-
renderOption: option => {
|
81
|
+
renderOption: (option, elementProps, translation) => {
|
82
82
|
return /*#__PURE__*/_jsx("span", {
|
83
|
-
children: option.text
|
83
|
+
children: translation(option.text)
|
84
84
|
});
|
85
85
|
}
|
86
86
|
}]
|
@@ -57,9 +57,9 @@ const fieldStyle = [{
|
|
57
57
|
text: "Dashed",
|
58
58
|
value: "dashed"
|
59
59
|
}],
|
60
|
-
renderOption: option => {
|
60
|
+
renderOption: (option, elementProps, translation) => {
|
61
61
|
return /*#__PURE__*/_jsx("span", {
|
62
|
-
children: option.text
|
62
|
+
children: translation(option.text)
|
63
63
|
});
|
64
64
|
}
|
65
65
|
}]
|
@@ -8,8 +8,12 @@ const Alignment = props => {
|
|
8
8
|
const {
|
9
9
|
value,
|
10
10
|
data,
|
11
|
-
onChange
|
11
|
+
onChange,
|
12
|
+
customProps
|
12
13
|
} = props;
|
14
|
+
const {
|
15
|
+
translation
|
16
|
+
} = customProps;
|
13
17
|
const {
|
14
18
|
key
|
15
19
|
} = data;
|
@@ -36,7 +40,7 @@ const Alignment = props => {
|
|
36
40
|
fontSize: "14px",
|
37
41
|
fontWeight: 500
|
38
42
|
},
|
39
|
-
children: "Alignment"
|
43
|
+
children: translation("Alignment")
|
40
44
|
})
|
41
45
|
}), /*#__PURE__*/_jsxs("div", {
|
42
46
|
style: {
|
@@ -53,21 +57,21 @@ const Alignment = props => {
|
|
53
57
|
display: "flex"
|
54
58
|
},
|
55
59
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
56
|
-
title: "Align Left",
|
60
|
+
title: translation("Align Left"),
|
57
61
|
children: /*#__PURE__*/_jsx(FormControlLabel, {
|
58
62
|
value: "start",
|
59
63
|
control: /*#__PURE__*/_jsx(Radio, {}),
|
60
64
|
label: /*#__PURE__*/_jsx(JustifyStartIcon, {})
|
61
65
|
})
|
62
66
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
63
|
-
title: "Align Center",
|
67
|
+
title: translation("Align Center"),
|
64
68
|
children: /*#__PURE__*/_jsx(FormControlLabel, {
|
65
69
|
value: "center",
|
66
70
|
control: /*#__PURE__*/_jsx(Radio, {}),
|
67
71
|
label: /*#__PURE__*/_jsx(JustifyCenterIcon, {})
|
68
72
|
})
|
69
73
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
70
|
-
title: "Align Right",
|
74
|
+
title: translation("Align Right"),
|
71
75
|
children: /*#__PURE__*/_jsx(FormControlLabel, {
|
72
76
|
value: "end",
|
73
77
|
control: /*#__PURE__*/_jsx(Radio, {}),
|
@@ -85,21 +89,21 @@ const Alignment = props => {
|
|
85
89
|
display: "flex"
|
86
90
|
},
|
87
91
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
88
|
-
title: "Align Top",
|
92
|
+
title: translation("Align Top"),
|
89
93
|
children: /*#__PURE__*/_jsx(FormControlLabel, {
|
90
94
|
value: "start",
|
91
95
|
control: /*#__PURE__*/_jsx(Radio, {}),
|
92
96
|
label: /*#__PURE__*/_jsx(AlignStartIcon, {})
|
93
97
|
})
|
94
98
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
95
|
-
title: "Align Middle",
|
99
|
+
title: translation("Align Middle"),
|
96
100
|
children: /*#__PURE__*/_jsx(FormControlLabel, {
|
97
101
|
value: "center",
|
98
102
|
control: /*#__PURE__*/_jsx(Radio, {}),
|
99
103
|
label: /*#__PURE__*/_jsx(AlignCenterIcon, {})
|
100
104
|
})
|
101
105
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
102
|
-
title: "Align Bottom",
|
106
|
+
title: translation("Align Bottom"),
|
103
107
|
children: /*#__PURE__*/_jsx(FormControlLabel, {
|
104
108
|
value: "end",
|
105
109
|
control: /*#__PURE__*/_jsx(Radio, {}),
|
@@ -122,7 +126,7 @@ const Alignment = props => {
|
|
122
126
|
fontSize: "14px",
|
123
127
|
fontWeight: 500
|
124
128
|
},
|
125
|
-
children: "Direction"
|
129
|
+
children: translation("Direction")
|
126
130
|
})
|
127
131
|
}), /*#__PURE__*/_jsxs(RadioGroup, {
|
128
132
|
row: true,
|
@@ -13,6 +13,9 @@ const BackgroundImage = props => {
|
|
13
13
|
customProps,
|
14
14
|
onChange
|
15
15
|
} = props;
|
16
|
+
const {
|
17
|
+
translation
|
18
|
+
} = customProps;
|
16
19
|
const {
|
17
20
|
key
|
18
21
|
} = data;
|
@@ -52,7 +55,7 @@ const BackgroundImage = props => {
|
|
52
55
|
fontWeight: "500",
|
53
56
|
marginBottom: "8px"
|
54
57
|
},
|
55
|
-
children: "Upload Image"
|
58
|
+
children: translation("Upload Image")
|
56
59
|
}), /*#__PURE__*/_jsx(Grid, {
|
57
60
|
container: true,
|
58
61
|
sx: classes.uploadContainer,
|
@@ -70,7 +73,7 @@ const BackgroundImage = props => {
|
|
70
73
|
children: base64 ? /*#__PURE__*/_jsx(Grid, {
|
71
74
|
className: "removeImageText",
|
72
75
|
onClick: onRemoveBG,
|
73
|
-
children: "REMOVE"
|
76
|
+
children: translation("REMOVE")
|
74
77
|
}) : /*#__PURE__*/_jsx(Grid, {
|
75
78
|
className: "uploadImageText",
|
76
79
|
children: /*#__PURE__*/_jsxs(Button, {
|
@@ -87,7 +90,7 @@ const BackgroundImage = props => {
|
|
87
90
|
style: {
|
88
91
|
paddingLeft: "8px"
|
89
92
|
},
|
90
|
-
children: "Upload a image"
|
93
|
+
children: translation("Upload a image")
|
91
94
|
})]
|
92
95
|
})
|
93
96
|
})
|
@@ -13,8 +13,12 @@ const BannerSpacing = props => {
|
|
13
13
|
data,
|
14
14
|
onChange,
|
15
15
|
elementProps,
|
16
|
-
classes
|
16
|
+
classes,
|
17
|
+
customProps
|
17
18
|
} = props;
|
19
|
+
const {
|
20
|
+
translation
|
21
|
+
} = customProps;
|
18
22
|
const {
|
19
23
|
key
|
20
24
|
} = data;
|
@@ -63,7 +67,7 @@ const BannerSpacing = props => {
|
|
63
67
|
fontSize: "14px",
|
64
68
|
fontWeight: 500
|
65
69
|
},
|
66
|
-
children: data?.label
|
70
|
+
children: translation(data?.label)
|
67
71
|
}), /*#__PURE__*/_jsxs(Grid, {
|
68
72
|
container: true,
|
69
73
|
wrap: "nowrap",
|
@@ -126,7 +130,7 @@ const BannerSpacing = props => {
|
|
126
130
|
sx: {
|
127
131
|
fontSize: "14px"
|
128
132
|
},
|
129
|
-
children: "Customize"
|
133
|
+
children: translation("Customize")
|
130
134
|
})
|
131
135
|
}), !lockSpacing ? /*#__PURE__*/_jsx(Grid, {
|
132
136
|
container: true,
|
@@ -13,8 +13,12 @@ const BorderRadius = props => {
|
|
13
13
|
data,
|
14
14
|
onChange,
|
15
15
|
elementProps,
|
16
|
-
classes
|
16
|
+
classes,
|
17
|
+
customProps
|
17
18
|
} = props;
|
19
|
+
const {
|
20
|
+
translation
|
21
|
+
} = customProps;
|
18
22
|
let {
|
19
23
|
lockRadius
|
20
24
|
} = elementProps;
|
@@ -60,7 +64,7 @@ const BorderRadius = props => {
|
|
60
64
|
fontSize: "14px",
|
61
65
|
fontWeight: 500
|
62
66
|
},
|
63
|
-
children: data?.label
|
67
|
+
children: translation(data?.label)
|
64
68
|
}), /*#__PURE__*/_jsxs(Grid, {
|
65
69
|
container: true,
|
66
70
|
wrap: "nowrap",
|
@@ -113,7 +117,7 @@ const BorderRadius = props => {
|
|
113
117
|
sx: {
|
114
118
|
fontSize: "14px"
|
115
119
|
},
|
116
|
-
children: "Customize"
|
120
|
+
children: translation("Customize")
|
117
121
|
})
|
118
122
|
}), !lockRadius ? /*#__PURE__*/_jsx(Grid, {
|
119
123
|
container: true,
|
@@ -14,6 +14,9 @@ const ButtonLink = props => {
|
|
14
14
|
const {
|
15
15
|
key
|
16
16
|
} = data;
|
17
|
+
const {
|
18
|
+
translation
|
19
|
+
} = customProps;
|
17
20
|
const {
|
18
21
|
metadata
|
19
22
|
} = customProps || {
|
@@ -76,7 +79,7 @@ const ButtonLink = props => {
|
|
76
79
|
fontWeight: 500
|
77
80
|
},
|
78
81
|
id: "demo-radio-buttons-group-label",
|
79
|
-
children: "
|
82
|
+
children: translation("whereToLinkText")
|
80
83
|
}), /*#__PURE__*/_jsxs(RadioGroup, {
|
81
84
|
row: true,
|
82
85
|
"aria-labelledby": "demo-radio-buttons-group-label",
|
@@ -93,7 +96,7 @@ const ButtonLink = props => {
|
|
93
96
|
style: {
|
94
97
|
fontSize: "14px"
|
95
98
|
},
|
96
|
-
children: "
|
99
|
+
children: translation("nextStep")
|
97
100
|
})
|
98
101
|
}), /*#__PURE__*/_jsx(FormControlLabel, {
|
99
102
|
value: "webAddress",
|
@@ -104,7 +107,7 @@ const ButtonLink = props => {
|
|
104
107
|
style: {
|
105
108
|
fontSize: "14px"
|
106
109
|
},
|
107
|
-
children: "
|
110
|
+
children: translation("webAddress")
|
108
111
|
})
|
109
112
|
})]
|
110
113
|
})]
|
@@ -10,7 +10,8 @@ const RenderCard = ({
|
|
10
10
|
title,
|
11
11
|
content,
|
12
12
|
infoIcon,
|
13
|
-
classes
|
13
|
+
classes,
|
14
|
+
translation
|
14
15
|
}) => {
|
15
16
|
return /*#__PURE__*/_jsx(Card, {
|
16
17
|
sx: {
|
@@ -47,9 +48,9 @@ const RenderCard = ({
|
|
47
48
|
style: {
|
48
49
|
fontWeight: `500 !important`
|
49
50
|
},
|
50
|
-
children: title
|
51
|
+
children: translation(title)
|
51
52
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
52
|
-
title: content,
|
53
|
+
title: translation(content),
|
53
54
|
children: infoIcon && content && /*#__PURE__*/_jsx("span", {
|
54
55
|
children: infoIcon
|
55
56
|
})
|
@@ -72,7 +73,8 @@ const CardsMapping = props => {
|
|
72
73
|
value,
|
73
74
|
data,
|
74
75
|
onChange,
|
75
|
-
classes
|
76
|
+
classes,
|
77
|
+
customProps
|
76
78
|
} = props;
|
77
79
|
const {
|
78
80
|
key,
|
@@ -81,6 +83,9 @@ const CardsMapping = props => {
|
|
81
83
|
selectedCard,
|
82
84
|
infoIcon
|
83
85
|
} = data;
|
86
|
+
const {
|
87
|
+
translation
|
88
|
+
} = customProps;
|
84
89
|
const activeCard = value === selectedCard;
|
85
90
|
const handleChange = e => {
|
86
91
|
if (selectedCard === data?.value) {
|
@@ -110,7 +115,8 @@ const CardsMapping = props => {
|
|
110
115
|
title: label,
|
111
116
|
content: content,
|
112
117
|
infoIcon: infoIcon,
|
113
|
-
classes: classes
|
118
|
+
classes: classes,
|
119
|
+
translation: translation
|
114
120
|
})
|
115
121
|
});
|
116
122
|
};
|
@@ -8,15 +8,19 @@ const Color = props => {
|
|
8
8
|
value,
|
9
9
|
data,
|
10
10
|
onChange,
|
11
|
-
classes
|
11
|
+
classes,
|
12
|
+
customProps
|
12
13
|
} = props;
|
13
14
|
const {
|
14
15
|
key,
|
15
16
|
label,
|
16
17
|
hideGradient
|
17
18
|
} = data;
|
19
|
+
const {
|
20
|
+
translation
|
21
|
+
} = customProps;
|
18
22
|
const [recentColors, setRecentColors] = useState({});
|
19
|
-
const getLable = label === 'Text' ?
|
23
|
+
const getLable = label === 'Text' ? translation("selectTextColor") : label === 'Background' ? translation("selectBgColor") : translation(label);
|
20
24
|
useEffect(() => {
|
21
25
|
const storedColors = JSON.parse(localStorage.getItem("recentColors"));
|
22
26
|
if (storedColors) {
|
@@ -61,9 +65,9 @@ const Color = props => {
|
|
61
65
|
height: '20px'
|
62
66
|
}
|
63
67
|
},
|
64
|
-
children: [label, data?.infoIcon ? /*#__PURE__*/_jsx(Tooltip, {
|
68
|
+
children: [translation(label), data?.infoIcon ? /*#__PURE__*/_jsx(Tooltip, {
|
65
69
|
arrow: true,
|
66
|
-
title: "
|
70
|
+
title: translation("noteText"),
|
67
71
|
children: /*#__PURE__*/_jsx("span", {
|
68
72
|
style: {
|
69
73
|
display: 'inline-block'
|
@@ -74,7 +78,7 @@ const Color = props => {
|
|
74
78
|
}), /*#__PURE__*/_jsx(TextField, {
|
75
79
|
fullWidth: true,
|
76
80
|
value: value,
|
77
|
-
placeholder: getLable || `${label} color code`,
|
81
|
+
placeholder: getLable || `${label} ${translation("color code")}`,
|
78
82
|
InputLabelProps: {
|
79
83
|
shrink: true
|
80
84
|
},
|
@@ -7,8 +7,12 @@ const ElementSize = props => {
|
|
7
7
|
const {
|
8
8
|
value,
|
9
9
|
data,
|
10
|
-
onChange
|
10
|
+
onChange,
|
11
|
+
customProps
|
11
12
|
} = props;
|
13
|
+
const {
|
14
|
+
translation
|
15
|
+
} = customProps;
|
12
16
|
const {
|
13
17
|
key
|
14
18
|
} = data;
|
@@ -45,13 +49,13 @@ const ElementSize = props => {
|
|
45
49
|
fontWeight: "500",
|
46
50
|
marginBottom: "5px"
|
47
51
|
},
|
48
|
-
children: "Width"
|
52
|
+
children: translation("Width")
|
49
53
|
}), /*#__PURE__*/_jsx(TextField, {
|
50
54
|
fullWidth: true,
|
51
55
|
name: wkey,
|
52
56
|
size: "small",
|
53
57
|
value: value ? value[wkey] : "100",
|
54
|
-
placeholder: "Width",
|
58
|
+
placeholder: translation("Width"),
|
55
59
|
onChange: handleChange,
|
56
60
|
InputProps: {
|
57
61
|
endAdornment: /*#__PURE__*/_jsxs(InputAdornment, {
|
@@ -97,14 +101,14 @@ const ElementSize = props => {
|
|
97
101
|
fontWeight: "500",
|
98
102
|
marginBottom: "5px"
|
99
103
|
},
|
100
|
-
children: "Height"
|
104
|
+
children: translation("Height")
|
101
105
|
}), /*#__PURE__*/_jsx(TextField, {
|
102
106
|
fullWidth: true,
|
103
107
|
name: "height",
|
104
108
|
size: "small",
|
105
109
|
value: value?.height,
|
106
|
-
placeholder: "Height",
|
107
|
-
helperText: "
|
110
|
+
placeholder: translation("Height"),
|
111
|
+
helperText: translation("heightHelperText"),
|
108
112
|
onChange: handleChange,
|
109
113
|
InputProps: {
|
110
114
|
endAdornment: /*#__PURE__*/_jsxs(InputAdornment, {
|