@flozy/editor 9.3.2 → 9.3.3
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 +50 -15
- package/dist/Editor/CommonEditor.js +129 -20
- package/dist/Editor/DialogWrapper.js +31 -25
- package/dist/Editor/Editor.css +17 -7
- package/dist/Editor/Elements/AI/AIInput.js +5 -3
- package/dist/Editor/Elements/AI/CustomSelect.js +9 -5
- package/dist/Editor/Elements/AI/PopoverAIInput.js +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/AppHeader.js +3 -3
- package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +6 -2
- package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +4 -1
- package/dist/Editor/Elements/Attachments/AttachmentsButton.js +4 -1
- package/dist/Editor/Elements/Button/ButtonPopup.js +4 -1
- package/dist/Editor/Elements/Button/ButtonToolIcon.js +6 -2
- package/dist/Editor/Elements/Button/EditorButton.js +31 -14
- package/dist/Editor/Elements/Carousel/Carousel.js +5 -4
- package/dist/Editor/Elements/Carousel/CarouselButton.js +6 -2
- package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -2
- package/dist/Editor/Elements/ChipText/ChipTextPopup.js +4 -1
- package/dist/Editor/Elements/CodeToText/CodeToText.js +5 -4
- package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +6 -2
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +60 -14
- package/dist/Editor/Elements/Color Picker/ColorPicker.css +25 -1
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +4 -4
- package/dist/Editor/Elements/Color Picker/Styles.js +3 -3
- package/dist/Editor/Elements/Colorbox/ColorboxButton.js +6 -2
- package/dist/Editor/Elements/DataView/DataView.js +5 -2
- package/dist/Editor/Elements/DataView/DataViewButton.js +6 -2
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +4 -1
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +4 -3
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +6 -1
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +7 -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 +64 -38
- 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/TableStyles.js +4 -1
- 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 +16 -11
- package/dist/Editor/Elements/Embed/Video.js +10 -7
- package/dist/Editor/Elements/EmbedScript/Code.js +7 -4
- package/dist/Editor/Elements/EmbedScript/EmbedScript.js +6 -2
- package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +8 -5
- package/dist/Editor/Elements/Emoji/EmojiButton.js +6 -2
- package/dist/Editor/Elements/Form/FieldPopup.js +4 -1
- package/dist/Editor/Elements/Form/Form.js +12 -9
- package/dist/Editor/Elements/Form/FormButton.js +6 -2
- package/dist/Editor/Elements/Form/FormPopup.js +3 -2
- package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +18 -12
- package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +13 -8
- package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +3 -2
- package/dist/Editor/Elements/Form/Workflow/UserInputs.js +4 -2
- package/dist/Editor/Elements/Form/Workflow/index.js +15 -9
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +21 -18
- 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/FreeGrid/styles.js +3 -0
- package/dist/Editor/Elements/Grid/Grid.js +13 -10
- package/dist/Editor/Elements/Grid/GridButton.js +9 -5
- package/dist/Editor/Elements/Grid/GridItem.js +14 -8
- package/dist/Editor/Elements/Grid/GridItemPopup.js +4 -1
- package/dist/Editor/Elements/Grid/GridPopup.js +4 -1
- package/dist/Editor/Elements/Grid/SectionPopup.js +4 -1
- package/dist/Editor/Elements/Link/Link.js +14 -7
- 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 +16 -5
- 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/SimpleText/style.js +2 -2
- package/dist/Editor/Elements/Table/DragButton.js +4 -2
- package/dist/Editor/Elements/Table/Table.js +48 -25
- package/dist/Editor/Elements/Table/TableCell.js +6 -27
- package/dist/Editor/Elements/Table/TablePopup.js +4 -1
- package/dist/Editor/Elements/Table/TableSelector.js +10 -6
- package/dist/Editor/Elements/Table/TableTool.js +8 -4
- package/dist/Editor/Elements/Title/title.js +10 -0
- package/dist/Editor/Elements/TopBanner/TopBannerButton.js +4 -1
- package/dist/Editor/Elements/Variables/VariableButton.js +10 -1
- package/dist/Editor/MiniEditor.js +9 -3
- package/dist/Editor/Styles/EditorStyles.js +5 -5
- package/dist/Editor/Toolbar/Basic/index.js +2 -1
- package/dist/Editor/Toolbar/FormatTools/BlockButton.js +6 -2
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +27 -3
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -3
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +8 -4
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +7 -13
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +20 -15
- 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/SelectFontSize.js +6 -13
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +58 -51
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +29 -22
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +226 -87
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +15 -7
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +8 -4
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +16 -9
- package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +11 -5
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +120 -41
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +441 -0
- package/dist/Editor/Toolbar/PopupTool/index.js +3 -8
- package/dist/Editor/Toolbar/Toolbar.js +20 -10
- package/dist/Editor/Toolbar/toolbarGroups.js +48 -6
- package/dist/Editor/assets/svg/CalenderIconTick.js +1 -0
- package/dist/Editor/assets/svg/ThemeIcons.js +291 -0
- package/dist/Editor/common/ColorPickerButton.js +45 -10
- package/dist/Editor/common/CustomColorPicker/index.js +125 -0
- package/dist/Editor/common/CustomColorPicker/style.js +53 -0
- package/dist/Editor/common/CustomDialog/index.js +8 -10
- package/dist/Editor/common/CustomDialog2/index.js +94 -0
- package/dist/Editor/common/CustomDialog2/style.js +67 -0
- package/dist/Editor/common/CustomSelect.js +33 -0
- package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
- package/dist/Editor/common/FontLoader/FontLoader.js +3 -0
- package/dist/Editor/common/Icon.js +46 -1
- package/dist/Editor/common/ImageSelector/ImageSelector.js +10 -8
- package/dist/Editor/common/ImageSelector/Options/AddLink.js +6 -4
- package/dist/Editor/common/ImageSelector/Styles.js +3 -9
- package/dist/Editor/common/LinkSettings/NavComponents.js +14 -10
- package/dist/Editor/common/LinkSettings/index.js +20 -14
- package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
- package/dist/Editor/common/MentionsPopup/Styles.js +106 -68
- package/dist/Editor/common/MentionsPopup/index.js +8 -4
- 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 +7 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +7 -4
- package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +6 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +3 -2
- package/dist/Editor/common/RnD/OptionsPopup/index.js +4 -3
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +11 -4
- package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +17 -0
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +20 -8
- package/dist/Editor/common/RnD/Utils/index.js +45 -0
- package/dist/Editor/common/RnD/VirtualElement/index.js +1 -2
- package/dist/Editor/common/RnD/index.js +34 -7
- package/dist/Editor/common/Section/index.js +7 -4
- package/dist/Editor/common/Shorthands/elements.js +93 -10
- package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
- package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +6 -4
- package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
- package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
- package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +13 -9
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +11 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +19 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +22 -10
- package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +6 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +27 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +41 -14
- package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +10 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +19 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +5 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +9 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +8 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +12 -11
- package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +8 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +21 -12
- package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
- package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
- package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
- package/dist/Editor/common/StyleBuilder/index.js +8 -5
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +5 -7
- package/dist/Editor/common/Uploader.js +16 -5
- package/dist/Editor/commonStyle.js +55 -65
- package/dist/Editor/helper/index.js +8 -12
- package/dist/Editor/helper/textIndeces.js +58 -0
- package/dist/Editor/helper/theme.js +200 -2
- package/dist/Editor/hooks/useDrag.js +16 -10
- package/dist/Editor/hooks/useEditorScroll.js +10 -5
- package/dist/Editor/hooks/useEditorTheme.js +153 -0
- package/dist/Editor/hooks/useMouseMove.js +25 -13
- package/dist/Editor/hooks/useTable.js +1 -1
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +18 -13
- package/dist/Editor/plugins/withLayout.js +3 -2
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/theme/ThemeList.js +50 -173
- package/dist/Editor/theme/index.js +144 -0
- package/dist/Editor/themeSettings/ActiveTheme.js +72 -0
- package/dist/Editor/themeSettings/buttons/index.js +285 -0
- package/dist/Editor/themeSettings/buttons/style.js +23 -0
- package/dist/Editor/themeSettings/colorTheme/index.js +297 -0
- package/dist/Editor/themeSettings/colorTheme/style.js +81 -0
- package/dist/Editor/themeSettings/fonts/PreviewElement.js +121 -0
- package/dist/Editor/themeSettings/fonts/index.js +222 -0
- package/dist/Editor/themeSettings/fonts/style.js +59 -0
- package/dist/Editor/themeSettings/icons.js +60 -0
- package/dist/Editor/themeSettings/index.js +328 -0
- package/dist/Editor/themeSettings/style.js +193 -0
- package/dist/Editor/themeSettingsAI/icons.js +96 -0
- package/dist/Editor/themeSettingsAI/index.js +355 -0
- package/dist/Editor/themeSettingsAI/saveTheme.js +215 -0
- package/dist/Editor/themeSettingsAI/style.js +250 -0
- package/dist/Editor/utils/SlateUtilityFunctions.js +171 -47
- package/dist/Editor/utils/button.js +0 -14
- package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +23 -0
- package/dist/Editor/utils/divider.js +8 -0
- package/dist/Editor/utils/draftToSlate.js +3 -2
- package/dist/Editor/utils/embed.js +9 -4
- package/dist/Editor/utils/font.js +40 -37
- package/dist/Editor/utils/helper.js +65 -19
- package/dist/Editor/utils/table.js +8 -0
- package/package.json +1 -1
@@ -8,7 +8,9 @@ const TextSettings = props => {
|
|
8
8
|
const {
|
9
9
|
editor,
|
10
10
|
path,
|
11
|
-
theme
|
11
|
+
theme,
|
12
|
+
onClose,
|
13
|
+
customProps
|
12
14
|
} = props;
|
13
15
|
const item_path = path.split("|").map(m => parseInt(m));
|
14
16
|
const element_path = [...item_path, 0];
|
@@ -25,7 +27,9 @@ const TextSettings = props => {
|
|
25
27
|
}, []);
|
26
28
|
return /*#__PURE__*/_jsx(TextFormat, {
|
27
29
|
classes: classes,
|
28
|
-
editor: editor
|
30
|
+
editor: editor,
|
31
|
+
customProps: customProps,
|
32
|
+
closeMainPopup: onClose
|
29
33
|
});
|
30
34
|
};
|
31
35
|
export default TextSettings;
|
@@ -8,7 +8,8 @@ const VideoSettings = props => {
|
|
8
8
|
const {
|
9
9
|
editor,
|
10
10
|
path,
|
11
|
-
customProps
|
11
|
+
customProps,
|
12
|
+
onClose
|
12
13
|
} = props;
|
13
14
|
const item_path = path?.split("|").map(m => parseInt(m));
|
14
15
|
const element_path = [...item_path, 0];
|
@@ -28,7 +29,7 @@ const VideoSettings = props => {
|
|
28
29
|
});
|
29
30
|
};
|
30
31
|
const handleClose = () => {
|
31
|
-
|
32
|
+
onClose();
|
32
33
|
};
|
33
34
|
return /*#__PURE__*/_jsx(Box, {
|
34
35
|
component: "div",
|
@@ -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,19 +9,26 @@ 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,
|
14
|
+
show
|
13
15
|
} = props;
|
14
16
|
const classes = useSwitchViewport();
|
15
17
|
const {
|
18
|
+
setSelectedElement,
|
16
19
|
setActiveBreakPoint
|
17
20
|
} = useEditorContext();
|
18
21
|
useEffect(() => {
|
19
|
-
|
22
|
+
// to reset selection on viewport changes - FS-6589
|
23
|
+
setSelectedElement({});
|
20
24
|
}, [breakpoint]);
|
21
25
|
return /*#__PURE__*/_jsxs(Box, {
|
22
26
|
sx: classes.root,
|
27
|
+
style: {
|
28
|
+
display: show ? "block" : "none"
|
29
|
+
},
|
23
30
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
24
|
-
title: "Desktop View",
|
31
|
+
title: translation("Desktop View"),
|
25
32
|
children: /*#__PURE__*/_jsx(IconButton, {
|
26
33
|
className: `${!breakpoint || breakpoint === "lg" ? "active" : ""}`,
|
27
34
|
onClick: () => {
|
@@ -31,7 +38,7 @@ const SwitchViewport = props => {
|
|
31
38
|
children: /*#__PURE__*/_jsx(PersonalVideoIcon, {})
|
32
39
|
})
|
33
40
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
34
|
-
title: "Mobile View",
|
41
|
+
title: translation("Mobile View"),
|
35
42
|
children: /*#__PURE__*/_jsx(IconButton, {
|
36
43
|
className: `${breakpoint === "xs" ? "active" : ""}`,
|
37
44
|
onClick: () => {
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Experimental_CssVarsProvider as CssVarsProvider, experimental_extendTheme as extendTheme } from "@mui/material/styles";
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
3
|
+
function MainThemeProvider({
|
4
|
+
children,
|
5
|
+
userSelectedTheme,
|
6
|
+
theme = {}
|
7
|
+
}) {
|
8
|
+
const themeVars = extendTheme(userSelectedTheme?.theme?.cssVars || {});
|
9
|
+
return /*#__PURE__*/_jsx(CssVarsProvider, {
|
10
|
+
theme: {
|
11
|
+
...themeVars,
|
12
|
+
...theme
|
13
|
+
},
|
14
|
+
children: children
|
15
|
+
});
|
16
|
+
}
|
17
|
+
export default MainThemeProvider;
|
@@ -1,9 +1,20 @@
|
|
1
1
|
import React from "react";
|
2
|
-
import { useTheme,
|
2
|
+
import { useTheme, createTheme } from "@mui/material";
|
3
3
|
import { isStimulator, STIMULATOR_MOCK } from "../../../hooks/useBreakpoints";
|
4
|
+
import MainThemeProvider from "./MainThemeProvider";
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
+
const isPdf = () => {
|
7
|
+
try {
|
8
|
+
const hash = window.location.hash;
|
9
|
+
const queryString = hash.split("?")[1]; // Get part after "?"
|
10
|
+
const params = new URLSearchParams(queryString);
|
11
|
+
return params.get("isPdf");
|
12
|
+
} catch (err) {
|
13
|
+
console.log(err);
|
14
|
+
}
|
15
|
+
};
|
4
16
|
|
5
17
|
// Custom breakpoints functions
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
7
18
|
const customUp = (key, breakpoints) => {
|
8
19
|
const MOCK_BREAKPOINT = isStimulator();
|
9
20
|
if (key === "xs") {
|
@@ -49,9 +60,9 @@ const getBreakPoints = prevTheme => {
|
|
49
60
|
};
|
50
61
|
|
51
62
|
// Extend the existing theme with custom breakpoint functions
|
52
|
-
const extendedTheme =
|
63
|
+
const extendedTheme = prevTheme => createTheme({
|
53
64
|
...prevTheme,
|
54
|
-
breakpoints:
|
65
|
+
breakpoints: isPdf() ? {
|
55
66
|
values: {
|
56
67
|
...prevTheme.breakpoints.values,
|
57
68
|
md: 400 // To resolve, while taking pdf on A4 size, it is getting mobile view because of breakpoint
|
@@ -59,13 +70,14 @@ const extendedTheme = (prevTheme, isPrintMode) => createTheme({
|
|
59
70
|
} : getBreakPoints(prevTheme)
|
60
71
|
});
|
61
72
|
const ViewportStimulator = ({
|
62
|
-
children
|
73
|
+
children,
|
74
|
+
selectedTheme
|
63
75
|
}) => {
|
64
76
|
const theme = useTheme();
|
65
|
-
const
|
66
|
-
|
67
|
-
return /*#__PURE__*/_jsx(ThemeProvider, {
|
77
|
+
const viewportTheme = extendedTheme(theme);
|
78
|
+
return /*#__PURE__*/_jsx(MainThemeProvider, {
|
68
79
|
theme: viewportTheme,
|
80
|
+
userSelectedTheme: selectedTheme,
|
69
81
|
children: children
|
70
82
|
});
|
71
83
|
};
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import { Transforms, Node } from "slate";
|
2
2
|
import { ReactEditor } from "slate-react";
|
3
3
|
import { getNearestItem } from "./calculateDropItem";
|
4
|
+
import { ROW_HEIGHT, getBorderWidth } from "./gridDropItem";
|
5
|
+
import { handleNegativeInteger } from "../../../utils/helper";
|
6
|
+
import { getDevice } from "../../../helper/theme";
|
4
7
|
const GUIDE_LINE_THRESHOLD = 5;
|
5
8
|
const GUIDE_LINE_OVERLAP_THRESHOLD = 5;
|
6
9
|
const handleMoveNode = (editor, path, newPath, {
|
@@ -248,4 +251,46 @@ export function getParentSectionPath(props, closestClass) {
|
|
248
251
|
} catch (err) {
|
249
252
|
console.log(err);
|
250
253
|
}
|
254
|
+
}
|
255
|
+
export function getAbsolutePositionX(currentEle) {
|
256
|
+
const isMobile = getDevice(window.innerWidth) === "xs";
|
257
|
+
const {
|
258
|
+
left: currElementLeft
|
259
|
+
} = currentEle?.getBoundingClientRect() || {};
|
260
|
+
let parentBoxDom = currentEle?.closest(".fgi_type_box");
|
261
|
+
if (isMobile && !parentBoxDom) {
|
262
|
+
parentBoxDom = currentEle?.closest(".freegrid-section");
|
263
|
+
}
|
264
|
+
const relativeElementX = parentBoxDom || document.querySelector(".rnd-guideline-lv");
|
265
|
+
const {
|
266
|
+
left
|
267
|
+
} = relativeElementX?.getBoundingClientRect() || {};
|
268
|
+
const borderLeftWidth = getBorderWidth(relativeElementX, "borderLeftWidth");
|
269
|
+
const absolutePositionX = parseInt(currElementLeft - left - borderLeftWidth);
|
270
|
+
return {
|
271
|
+
absolutePositionX
|
272
|
+
};
|
273
|
+
}
|
274
|
+
export function getAbsolutePositionY(currentEle) {
|
275
|
+
const {
|
276
|
+
top: currElementTop
|
277
|
+
} = currentEle?.getBoundingClientRect() || {};
|
278
|
+
const relativeElementY = currentEle?.closest(".freegrid-container-parent");
|
279
|
+
const borderTopWidth = getBorderWidth(relativeElementY, "borderTopWidth");
|
280
|
+
const rect = relativeElementY.getBoundingClientRect();
|
281
|
+
const absolutePositionY = handleNegativeInteger(currElementTop - rect.top - borderTopWidth);
|
282
|
+
|
283
|
+
// Calculate grid position
|
284
|
+
const row = Math.floor(absolutePositionY / ROW_HEIGHT) + 1;
|
285
|
+
|
286
|
+
// Update grid area
|
287
|
+
const gridArea = `${row} / 1 / ${row + 1} / 2`;
|
288
|
+
|
289
|
+
// to calculate difference inside the grid
|
290
|
+
const marginTop = Math.abs((row - 1) * ROW_HEIGHT - absolutePositionY);
|
291
|
+
return {
|
292
|
+
absolutePositionY,
|
293
|
+
gridArea,
|
294
|
+
marginTop
|
295
|
+
};
|
251
296
|
}
|
@@ -75,13 +75,12 @@ const VirtualElement = props => {
|
|
75
75
|
const virtualRef = useRef();
|
76
76
|
useEffect(() => {
|
77
77
|
if (virtualRef?.current) {
|
78
|
-
|
78
|
+
setTimeout(() => {
|
79
79
|
const allData = calculateProps(path, virtualRef?.current, ROOT_ITEM_CLASS, []);
|
80
80
|
const groupData = groupByPathAndCalculateHeight(allData);
|
81
81
|
// it should trigger by auto alignment or on clicking mobile view change
|
82
82
|
updateAutoProps(editor, allData, "xs", groupData);
|
83
83
|
}, 100);
|
84
|
-
return () => clearTimeout(timeoutId);
|
85
84
|
}
|
86
85
|
}, [updated_at, virtualRef?.current]);
|
87
86
|
const calculateProps = (curPath, dom, domClass, allData) => {
|
@@ -6,7 +6,7 @@ import Handles from "./TransformHandles";
|
|
6
6
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
7
7
|
import ElementOptions from "./ElementOptions";
|
8
8
|
import ElementSettings from "./ElementSettings";
|
9
|
-
import { getClosestDraggable, getParentSectionPath } from "./Utils";
|
9
|
+
import { getAbsolutePositionX, getAbsolutePositionY, getClosestDraggable, getParentSectionPath } from "./Utils";
|
10
10
|
import DragInfo from "./DragInfo";
|
11
11
|
import GuideLines from "./GuideLines";
|
12
12
|
import ShadowElement from "./ShadowElement";
|
@@ -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) {
|
@@ -425,9 +429,26 @@ const RnD = props => {
|
|
425
429
|
};
|
426
430
|
const onResizeStop = (e, direction, ref, d, position) => {
|
427
431
|
e.preventDefault();
|
432
|
+
let updatedPosition = {};
|
433
|
+
if (type !== "parent") {
|
434
|
+
// update element position while resizing, (for free grid box and item)
|
435
|
+
const {
|
436
|
+
absolutePositionX
|
437
|
+
} = getAbsolutePositionX(ref);
|
438
|
+
const {
|
439
|
+
gridArea,
|
440
|
+
marginTop
|
441
|
+
} = getAbsolutePositionY(ref);
|
442
|
+
updatedPosition = {
|
443
|
+
left: absolutePositionX,
|
444
|
+
gridArea: gridArea,
|
445
|
+
marginTop: marginTop
|
446
|
+
};
|
447
|
+
}
|
428
448
|
const updatedSize = {
|
429
449
|
width: delta?.width + d.width,
|
430
|
-
height: delta?.height + d.height
|
450
|
+
height: delta?.height + d.height,
|
451
|
+
...updatedPosition
|
431
452
|
};
|
432
453
|
onChange({
|
433
454
|
...updatedSize
|
@@ -500,12 +521,15 @@ const RnD = props => {
|
|
500
521
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
501
522
|
children: [/*#__PURE__*/_jsxs(Box, {
|
502
523
|
component: Rnd,
|
503
|
-
placeholder: ItemTypes[childType] || "Item",
|
524
|
+
placeholder: translation(ItemTypes[childType]) || translation("Item"),
|
504
525
|
id: eId || "",
|
505
526
|
ref: c => {
|
506
527
|
positionRef.current = c;
|
507
528
|
},
|
508
|
-
className: `${className || ""} ${dragInfoOpen ? "active-drag" : "inactive-drag"} enable-${enable} type_${childType} section_type_${type || "parent"}
|
529
|
+
className: `${className || ""} ${dragInfoOpen ? "active-drag" : "inactive-drag"} enable-${enable} type_${childType} section_type_${type || "parent"} ${Object.keys(absPosition)?.length ? "" : "remove-resize-styles"
|
530
|
+
// Fix rerender issue (remove-resize-styles): After resizing, click close button on a free grid-selected element
|
531
|
+
// doesn't remove the default `transform` style from react-rnd. Removing it manually.
|
532
|
+
}`,
|
509
533
|
"data-path": str_path,
|
510
534
|
style: {
|
511
535
|
position: "relative",
|
@@ -564,7 +588,9 @@ const RnD = props => {
|
|
564
588
|
optionsProps: optionsProps,
|
565
589
|
selectedAction: currentAction,
|
566
590
|
path: str_path,
|
567
|
-
theme: theme
|
591
|
+
theme: theme,
|
592
|
+
translation: translation,
|
593
|
+
customProps: customProps
|
568
594
|
}) : null, /*#__PURE__*/_jsx(ElementSettings, {
|
569
595
|
open: Boolean(currentAction),
|
570
596
|
currentAction: currentAction,
|
@@ -598,7 +624,8 @@ const RnD = props => {
|
|
598
624
|
open: openContextMenu,
|
599
625
|
contextMenu: contextMenu,
|
600
626
|
handleClose: handleClose,
|
601
|
-
theme: theme
|
627
|
+
theme: theme,
|
628
|
+
translation: translation
|
602
629
|
}), type === "parent" && breakpoint === "lg" && !readOnly ? /*#__PURE__*/_jsx(VirtualElement, {
|
603
630
|
parentEle: positionRef?.current?.resizableElement?.current,
|
604
631
|
updated_at: updated_at,
|
@@ -18,7 +18,8 @@ const Toolbar = ({
|
|
18
18
|
readOnly,
|
19
19
|
showTool,
|
20
20
|
onSettings,
|
21
|
-
isSectionFullWidth
|
21
|
+
isSectionFullWidth,
|
22
|
+
translation
|
22
23
|
}) => {
|
23
24
|
return !readOnly && !showTool ? /*#__PURE__*/_jsx(Box, {
|
24
25
|
component: "div",
|
@@ -32,7 +33,7 @@ const Toolbar = ({
|
|
32
33
|
}
|
33
34
|
},
|
34
35
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
35
|
-
title: "Section Settings",
|
36
|
+
title: translation("Section Settings"),
|
36
37
|
children: /*#__PURE__*/_jsx(IconButton, {
|
37
38
|
onClick: onSettings,
|
38
39
|
children: /*#__PURE__*/_jsx(SectionSettingIcon, {})
|
@@ -50,7 +51,8 @@ const Section = props => {
|
|
50
51
|
customProps
|
51
52
|
} = props;
|
52
53
|
const {
|
53
|
-
readOnly
|
54
|
+
readOnly,
|
55
|
+
translation
|
54
56
|
} = customProps;
|
55
57
|
const editor = useSlateStatic();
|
56
58
|
// const [isHovering, setIsHovering] = useState(false);
|
@@ -160,7 +162,8 @@ const Section = props => {
|
|
160
162
|
isSectionFullWidth: isSectionFullWidth,
|
161
163
|
readOnly: readOnly,
|
162
164
|
showTool: false,
|
163
|
-
onSettings: onSettings
|
165
|
+
onSettings: onSettings,
|
166
|
+
translation: translation
|
164
167
|
}), children]
|
165
168
|
}), openSetttings ? /*#__PURE__*/_jsx(SectionPopup, {
|
166
169
|
element: {
|
@@ -43,6 +43,60 @@ const ELEMENTS_LIST = [{
|
|
43
43
|
icon: "headingThree"
|
44
44
|
}),
|
45
45
|
onInsert: editor => toggleBlock(editor, "headingThree", false)
|
46
|
+
}, {
|
47
|
+
name: "Heading 4",
|
48
|
+
desc: "",
|
49
|
+
group: "Text",
|
50
|
+
type: "headingFour",
|
51
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
52
|
+
icon: "headingFour"
|
53
|
+
}),
|
54
|
+
onInsert: editor => toggleBlock(editor, "headingFour", false)
|
55
|
+
}, {
|
56
|
+
name: "Heading 5",
|
57
|
+
desc: "",
|
58
|
+
group: "Text",
|
59
|
+
type: "headingFive",
|
60
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
61
|
+
icon: "headingFive"
|
62
|
+
}),
|
63
|
+
onInsert: editor => toggleBlock(editor, "headingFive", false)
|
64
|
+
}, {
|
65
|
+
name: "Heading 6",
|
66
|
+
desc: "",
|
67
|
+
group: "Text",
|
68
|
+
type: "headingSix",
|
69
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
70
|
+
icon: "headingSix"
|
71
|
+
}),
|
72
|
+
onInsert: editor => toggleBlock(editor, "headingSix", false)
|
73
|
+
}, {
|
74
|
+
name: "Paragraph 1",
|
75
|
+
desc: "",
|
76
|
+
group: "Text",
|
77
|
+
type: "paragraphOne",
|
78
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
79
|
+
icon: "paragraphOne"
|
80
|
+
}),
|
81
|
+
onInsert: editor => toggleBlock(editor, "paragraphOne", false)
|
82
|
+
}, {
|
83
|
+
name: "Paragraph 2",
|
84
|
+
desc: "",
|
85
|
+
group: "Text",
|
86
|
+
type: "paragraphTwo",
|
87
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
88
|
+
icon: "paragraphTwo"
|
89
|
+
}),
|
90
|
+
onInsert: editor => toggleBlock(editor, "paragraphTwo", false)
|
91
|
+
}, {
|
92
|
+
name: "Paragraph 3",
|
93
|
+
desc: "",
|
94
|
+
group: "Text",
|
95
|
+
type: "paragraphThree",
|
96
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
97
|
+
icon: "paragraphThree"
|
98
|
+
}),
|
99
|
+
onInsert: editor => toggleBlock(editor, "paragraphThree", false)
|
46
100
|
}, {
|
47
101
|
name: "Quote",
|
48
102
|
desc: "",
|
@@ -100,7 +154,10 @@ const ELEMENTS_LIST = [{
|
|
100
154
|
icon: /*#__PURE__*/_jsx(Icon, {
|
101
155
|
icon: "image"
|
102
156
|
}),
|
103
|
-
onInsert: editor =>
|
157
|
+
onInsert: editor => {
|
158
|
+
Transforms.delete(editor, editor.selection);
|
159
|
+
insertDefaultEmbed(editor, "image");
|
160
|
+
}
|
104
161
|
}, {
|
105
162
|
name: "Video",
|
106
163
|
desc: "",
|
@@ -109,9 +166,12 @@ const ELEMENTS_LIST = [{
|
|
109
166
|
icon: /*#__PURE__*/_jsx(Icon, {
|
110
167
|
icon: "video"
|
111
168
|
}),
|
112
|
-
onInsert: editor =>
|
113
|
-
|
114
|
-
|
169
|
+
onInsert: editor => {
|
170
|
+
Transforms.delete(editor, editor.selection);
|
171
|
+
insertDefaultEmbed(editor, "video", "", {
|
172
|
+
aspectRatio: "16 / 9"
|
173
|
+
});
|
174
|
+
}
|
115
175
|
}, {
|
116
176
|
name: "Embed",
|
117
177
|
desc: "",
|
@@ -120,7 +180,10 @@ const ELEMENTS_LIST = [{
|
|
120
180
|
icon: /*#__PURE__*/_jsx(Icon, {
|
121
181
|
icon: "embed"
|
122
182
|
}),
|
123
|
-
onInsert: editor =>
|
183
|
+
onInsert: editor => {
|
184
|
+
Transforms.delete(editor, editor.selection);
|
185
|
+
insertDefaultEmbed(editor, "embed", "");
|
186
|
+
}
|
124
187
|
}, {
|
125
188
|
name: "Calendly",
|
126
189
|
desc: "",
|
@@ -129,7 +192,10 @@ const ELEMENTS_LIST = [{
|
|
129
192
|
icon: /*#__PURE__*/_jsx(Icon, {
|
130
193
|
icon: "calenderNewIcon"
|
131
194
|
}),
|
132
|
-
onInsert: editor =>
|
195
|
+
onInsert: editor => {
|
196
|
+
Transforms.delete(editor, editor.selection);
|
197
|
+
insertDefaultEmbed(editor, "calendly", "");
|
198
|
+
}
|
133
199
|
}, {
|
134
200
|
name: "Table",
|
135
201
|
group: "Elements",
|
@@ -149,7 +215,10 @@ const ELEMENTS_LIST = [{
|
|
149
215
|
type: "emoji",
|
150
216
|
renderComponent: rest => /*#__PURE__*/_jsx(EmojiButton, {
|
151
217
|
...rest,
|
152
|
-
icoBtnType: "cmd"
|
218
|
+
icoBtnType: "cmd",
|
219
|
+
customProps: {
|
220
|
+
...rest
|
221
|
+
}
|
153
222
|
})
|
154
223
|
}, {
|
155
224
|
name: "Brain",
|
@@ -161,7 +230,10 @@ const ELEMENTS_LIST = [{
|
|
161
230
|
element: {
|
162
231
|
name: "Brain"
|
163
232
|
},
|
164
|
-
icoBtnType: "cmd"
|
233
|
+
icoBtnType: "cmd",
|
234
|
+
customProps: {
|
235
|
+
...rest
|
236
|
+
}
|
165
237
|
})
|
166
238
|
}, {
|
167
239
|
name: "Divider",
|
@@ -278,9 +350,20 @@ const ELEMENTS_LIST = [{
|
|
278
350
|
const elements = props => {
|
279
351
|
const {
|
280
352
|
search,
|
281
|
-
hideTools
|
353
|
+
hideTools,
|
354
|
+
translation
|
282
355
|
} = props;
|
283
|
-
const
|
356
|
+
const translatedElements = ELEMENTS_LIST.map(element => ({
|
357
|
+
...element,
|
358
|
+
name: translation(element.name),
|
359
|
+
renderComponent: element.renderComponent ? rest => {
|
360
|
+
return element.renderComponent({
|
361
|
+
...rest,
|
362
|
+
translation
|
363
|
+
});
|
364
|
+
} : undefined
|
365
|
+
}));
|
366
|
+
const filteredElements = translatedElements.filter(f => (hideTools || []).indexOf(f.type) === -1);
|
284
367
|
return filteredElements.filter(c => c.name.toLowerCase().includes(search?.toLowerCase()));
|
285
368
|
};
|
286
369
|
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
|
}]
|
@@ -21,7 +21,8 @@ const buttonStyle = [{
|
|
21
21
|
},
|
22
22
|
children: option.text
|
23
23
|
});
|
24
|
-
}
|
24
|
+
},
|
25
|
+
themeEnabled: true
|
25
26
|
}, {
|
26
27
|
label: "Font Size",
|
27
28
|
key: "textSize",
|
@@ -45,7 +46,8 @@ const buttonStyle = [{
|
|
45
46
|
}, {
|
46
47
|
label: "Button Color",
|
47
48
|
key: "bgColor",
|
48
|
-
type: "color"
|
49
|
+
type: "color",
|
50
|
+
themeEnabled: true
|
49
51
|
}, {
|
50
52
|
label: "Border Color",
|
51
53
|
key: "borderColor",
|
@@ -104,9 +106,9 @@ const buttonStyle = [{
|
|
104
106
|
text: "Dashed",
|
105
107
|
value: "dashed"
|
106
108
|
}],
|
107
|
-
renderOption: option => {
|
109
|
+
renderOption: (option, elementProps, translation) => {
|
108
110
|
return /*#__PURE__*/_jsx("span", {
|
109
|
-
children: option.text
|
111
|
+
children: translation(option.text)
|
110
112
|
});
|
111
113
|
}
|
112
114
|
}]
|
@@ -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
|
}]
|