@flozy/editor 9.8.3 → 9.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Editor/ChatEditor.js +26 -19
- package/dist/Editor/CommonEditor.js +141 -26
- package/dist/Editor/DialogWrapper.js +31 -25
- package/dist/Editor/Editor.css +11 -7
- package/dist/Editor/Elements/AI/AIInput.js +5 -3
- package/dist/Editor/Elements/AI/CustomSelect.js +9 -5
- package/dist/Editor/Elements/AI/PopoverAIInput.js +15 -5
- package/dist/Editor/Elements/Accordion/Accordion.js +4 -3
- package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +4 -1
- package/dist/Editor/Elements/Accordion/AccordionButton.js +6 -2
- package/dist/Editor/Elements/Accordion/AccordionTitlePopup.js +4 -1
- package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
- package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +6 -2
- package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +4 -1
- package/dist/Editor/Elements/Attachments/AttachmentsButton.js +4 -1
- package/dist/Editor/Elements/Button/ButtonPopup.js +4 -1
- package/dist/Editor/Elements/Button/ButtonToolIcon.js +6 -2
- package/dist/Editor/Elements/Button/EditorButton.js +43 -30
- package/dist/Editor/Elements/Carousel/Carousel.js +5 -4
- package/dist/Editor/Elements/Carousel/CarouselButton.js +6 -2
- package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -2
- package/dist/Editor/Elements/ChipText/ChipTextPopup.js +4 -1
- package/dist/Editor/Elements/CodeToText/CodeToText.js +5 -4
- package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +6 -2
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +60 -14
- package/dist/Editor/Elements/Color Picker/ColorPicker.css +25 -1
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +10 -7
- package/dist/Editor/Elements/Color Picker/Styles.js +15 -13
- package/dist/Editor/Elements/Colorbox/ColorboxButton.js +6 -2
- package/dist/Editor/Elements/DataView/DataView.js +5 -2
- package/dist/Editor/Elements/DataView/DataViewButton.js +6 -2
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +4 -2
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +448 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +21 -6
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +13 -12
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +7 -4
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +7 -5
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +9 -7
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +8 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +5 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +6 -5
- package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +5 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +9 -7
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +15 -12
- package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +3 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +3 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +23 -6
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +6 -4
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +8 -4
- package/dist/Editor/Elements/DataView/Layouts/index.js +3 -1
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +5 -2
- package/dist/Editor/Elements/Divider/Divider.js +5 -3
- package/dist/Editor/Elements/Divider/DividerButton.js +6 -2
- package/dist/Editor/Elements/Divider/DividerPopup.js +3 -2
- package/dist/Editor/Elements/Embed/Embed.js +4 -1
- package/dist/Editor/Elements/Embed/EmbedPopup.js +4 -1
- package/dist/Editor/Elements/Embed/Image.js +16 -11
- package/dist/Editor/Elements/Embed/Video.js +10 -7
- package/dist/Editor/Elements/EmbedScript/Code.js +7 -4
- package/dist/Editor/Elements/EmbedScript/EmbedScript.js +6 -2
- package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +8 -5
- package/dist/Editor/Elements/Emoji/EmojiButton.js +6 -2
- package/dist/Editor/Elements/Form/FieldPopup.js +4 -1
- package/dist/Editor/Elements/Form/Form.js +12 -9
- package/dist/Editor/Elements/Form/FormButton.js +6 -2
- package/dist/Editor/Elements/Form/FormPopup.js +3 -2
- package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +18 -12
- package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +13 -8
- package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +3 -2
- package/dist/Editor/Elements/Form/Workflow/Styles.js +24 -22
- package/dist/Editor/Elements/Form/Workflow/UserInputs.js +4 -2
- package/dist/Editor/Elements/Form/Workflow/index.js +15 -9
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +67 -23
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +31 -6
- package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +6 -2
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +54 -6
- package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +3 -2
- package/dist/Editor/Elements/FreeGrid/Options/More.js +10 -4
- package/dist/Editor/Elements/FreeGrid/styles.js +3 -0
- package/dist/Editor/Elements/Grid/Grid.js +13 -10
- package/dist/Editor/Elements/Grid/GridButton.js +9 -5
- package/dist/Editor/Elements/Grid/GridItem.js +14 -8
- package/dist/Editor/Elements/Grid/GridItemPopup.js +4 -1
- package/dist/Editor/Elements/Grid/GridPopup.js +4 -1
- package/dist/Editor/Elements/Grid/SectionPopup.js +4 -1
- package/dist/Editor/Elements/Link/Link.js +8 -5
- package/dist/Editor/Elements/Link/LinkButton.js +4 -1
- package/dist/Editor/Elements/List/CheckList.js +18 -10
- package/dist/Editor/Elements/NewLine/NewLineButton.js +6 -2
- package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +4 -1
- package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +4 -1
- package/dist/Editor/Elements/Search/SearchButton.js +7 -4
- package/dist/Editor/Elements/Search/SearchList.js +10 -5
- package/dist/Editor/Elements/Signature/SignatureButton.js +6 -2
- package/dist/Editor/Elements/Signature/SignatureOptions/DrawSignature.js +2 -8
- package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +6 -2
- package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +4 -1
- package/dist/Editor/Elements/Signature/SignaturePopup.js +17 -16
- package/dist/Editor/Elements/SimpleText/index.js +14 -5
- package/dist/Editor/Elements/SimpleText/style.js +2 -2
- package/dist/Editor/Elements/Table/DragButton.js +4 -2
- package/dist/Editor/Elements/Table/Table.js +23 -11
- package/dist/Editor/Elements/Table/TablePopup.js +4 -1
- package/dist/Editor/Elements/Table/TableSelector.js +10 -6
- package/dist/Editor/Elements/Table/TableTool.js +8 -4
- package/dist/Editor/Elements/Title/title.js +9 -8
- package/dist/Editor/Elements/TopBanner/TopBannerButton.js +4 -1
- package/dist/Editor/Elements/Variables/VariableButton.js +10 -1
- package/dist/Editor/MiniEditor.js +10 -3
- package/dist/Editor/Styles/EditorStyles.js +5 -5
- package/dist/Editor/Toolbar/Basic/index.js +2 -1
- package/dist/Editor/Toolbar/FormatTools/BlockButton.js +6 -2
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +27 -3
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -3
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +8 -4
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +10 -13
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +17 -5
- package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +10 -5
- package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +10 -4
- package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +10 -4
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +9 -3
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +42 -35
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +6 -13
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +58 -51
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +29 -22
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +226 -87
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +20 -10
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +10 -5
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +71 -11
- package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +11 -5
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +122 -42
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +436 -0
- package/dist/Editor/Toolbar/PopupTool/index.js +18 -2
- package/dist/Editor/Toolbar/Toolbar.js +20 -10
- package/dist/Editor/Toolbar/toolbarGroups.js +48 -6
- package/dist/Editor/assets/svg/ClearAllRounded.js +31 -0
- package/dist/Editor/assets/svg/ResetIconNew.js +23 -0
- package/dist/Editor/assets/svg/ThemeIcons.js +291 -0
- package/dist/Editor/common/ColorPickerButton.js +39 -14
- package/dist/Editor/common/CustomColorPicker/index.js +131 -0
- package/dist/Editor/common/CustomColorPicker/style.js +53 -0
- package/dist/Editor/common/CustomDialog/index.js +8 -10
- package/dist/Editor/common/CustomDialog2/index.js +94 -0
- package/dist/Editor/common/CustomDialog2/style.js +67 -0
- package/dist/Editor/common/CustomSelect.js +43 -0
- package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
- package/dist/Editor/common/FontLoader/FontLoader.js +3 -0
- package/dist/Editor/common/Icon.js +31 -1
- package/dist/Editor/common/ImageSelector/ImageSelector.js +10 -8
- package/dist/Editor/common/ImageSelector/Options/AddLink.js +6 -4
- package/dist/Editor/common/ImageSelector/Styles.js +3 -9
- package/dist/Editor/common/LinkSettings/NavComponents.js +14 -10
- package/dist/Editor/common/LinkSettings/index.js +20 -14
- package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
- package/dist/Editor/common/MUIIcon/index.js +0 -3
- package/dist/Editor/common/MentionsPopup/index.js +6 -2
- package/dist/Editor/common/RnD/ContextMenu/CMenus.js +46 -22
- package/dist/Editor/common/RnD/ContextMenu/index.js +3 -2
- package/dist/Editor/common/RnD/ElementOptions/index.js +7 -2
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +8 -3
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +7 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +7 -4
- package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +6 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +3 -2
- package/dist/Editor/common/RnD/OptionsPopup/index.js +4 -3
- package/dist/Editor/common/RnD/ShadowElement.js +2 -1
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +11 -4
- package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +17 -0
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +6 -3
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +73 -9
- package/dist/Editor/common/RnD/Utils/index.js +3 -0
- package/dist/Editor/common/RnD/VirtualElement/BoxHeaderAutoAlignment.js +43 -0
- package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +44 -0
- package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +134 -0
- package/dist/Editor/common/RnD/VirtualElement/helper.js +382 -0
- package/dist/Editor/common/RnD/VirtualElement/index.js +187 -103
- package/dist/Editor/common/RnD/VirtualElement/styles.js +155 -7
- package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +5 -3
- package/dist/Editor/common/RnD/index.js +69 -13
- package/dist/Editor/common/Section/index.js +7 -4
- package/dist/Editor/common/Shorthands/elements.js +72 -3
- package/dist/Editor/common/SnackBar/index.js +43 -0
- package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
- package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +6 -4
- package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
- package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
- package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +13 -9
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +11 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +19 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +22 -10
- package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +6 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +27 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +43 -14
- package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +10 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +19 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +5 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +7 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +9 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +8 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +12 -11
- package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +8 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +21 -12
- package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
- package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
- package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
- package/dist/Editor/common/StyleBuilder/index.js +8 -5
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +5 -7
- package/dist/Editor/common/SwipeableDrawer/index.js +1 -1
- package/dist/Editor/common/Uploader.js +16 -5
- package/dist/Editor/commonStyle.js +68 -57
- package/dist/Editor/helper/index.js +27 -3
- package/dist/Editor/helper/textIndeces.js +58 -0
- package/dist/Editor/helper/theme.js +202 -2
- package/dist/Editor/hooks/useAutoScroll.js +38 -0
- package/dist/Editor/hooks/useEditorTheme.js +153 -0
- package/dist/Editor/hooks/useMouseMove.js +9 -3
- package/dist/Editor/hooks/useThemeValues.js +63 -0
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +11 -9
- package/dist/Editor/plugins/withLayout.js +3 -2
- package/dist/Editor/plugins/withLinks.js +10 -0
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/theme/ThemeList.js +50 -173
- package/dist/Editor/theme/index.js +149 -0
- package/dist/Editor/themeSettings/ActiveTheme.js +72 -0
- package/dist/Editor/themeSettings/buttons/index.js +290 -0
- package/dist/Editor/themeSettings/buttons/style.js +23 -0
- package/dist/Editor/themeSettings/colorTheme/index.js +310 -0
- package/dist/Editor/themeSettings/colorTheme/style.js +81 -0
- package/dist/Editor/themeSettings/fonts/PreviewElement.js +121 -0
- package/dist/Editor/themeSettings/fonts/index.js +240 -0
- package/dist/Editor/themeSettings/fonts/style.js +61 -0
- package/dist/Editor/themeSettings/icons.js +60 -0
- package/dist/Editor/themeSettings/index.js +351 -0
- package/dist/Editor/themeSettings/style.js +220 -0
- package/dist/Editor/themeSettingsAI/icons.js +96 -0
- package/dist/Editor/themeSettingsAI/index.js +355 -0
- package/dist/Editor/themeSettingsAI/saveTheme.js +205 -0
- package/dist/Editor/themeSettingsAI/style.js +259 -0
- package/dist/Editor/utils/SlateUtilityFunctions.js +186 -54
- package/dist/Editor/utils/brains.js +1 -2
- package/dist/Editor/utils/draftToSlate.js +3 -2
- package/dist/Editor/utils/font.js +40 -37
- package/dist/Editor/utils/freegrid.js +3 -3
- package/dist/Editor/utils/helper.js +92 -21
- package/package.json +4 -4
@@ -3,28 +3,40 @@ import { Grid, Typography, Slider, FormControlLabel, Checkbox, Box, IconButton }
|
|
3
3
|
import { radiusStyle } from "./radiusStyle";
|
4
4
|
import useWindowResize from "../../../hooks/useWindowResize";
|
5
5
|
import { getBreakPointsValue, getCustomizationValue } from "../../../helper/theme";
|
6
|
+
import { useEditorTheme } from "../../../hooks/useEditorTheme";
|
6
7
|
import { CheckedBoxCheckIcon } from "../../iconListV2";
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
10
|
const BORDER_RADIUS_KEYS = ["topLeft", "topRight", "bottomLeft", "bottomRight"];
|
10
11
|
const BorderRadius = props => {
|
11
12
|
const {
|
12
|
-
value: val,
|
13
13
|
data,
|
14
14
|
onChange,
|
15
15
|
elementProps,
|
16
|
-
classes
|
16
|
+
classes,
|
17
|
+
customProps
|
17
18
|
} = props;
|
18
|
-
|
19
|
-
|
20
|
-
} =
|
21
|
-
if (lockRadius === undefined) {
|
22
|
-
lockRadius = true;
|
23
|
-
}
|
19
|
+
const {
|
20
|
+
translation
|
21
|
+
} = customProps;
|
24
22
|
const {
|
25
23
|
key
|
26
24
|
} = data;
|
27
25
|
const [size] = useWindowResize();
|
26
|
+
const {
|
27
|
+
selectedTheme
|
28
|
+
} = useEditorTheme();
|
29
|
+
const {
|
30
|
+
borderRadius,
|
31
|
+
lockRadius: themeLockRadius
|
32
|
+
} = selectedTheme?.elementProps?.button || {};
|
33
|
+
const isUserValue = Object.keys(props?.value || {})?.length;
|
34
|
+
const isUserLockedRadius = typeof elementProps?.lockRadius === "boolean";
|
35
|
+
const val = isUserValue ? props?.value : borderRadius;
|
36
|
+
let lockRadius = isUserLockedRadius ? elementProps?.lockRadius : themeLockRadius;
|
37
|
+
if (lockRadius === undefined) {
|
38
|
+
lockRadius = true;
|
39
|
+
}
|
28
40
|
const value = getBreakPointsValue(val, size?.device);
|
29
41
|
const handleChange = e => {
|
30
42
|
let changeAll = {};
|
@@ -60,7 +72,7 @@ const BorderRadius = props => {
|
|
60
72
|
fontSize: "14px",
|
61
73
|
fontWeight: 500
|
62
74
|
},
|
63
|
-
children: data?.label
|
75
|
+
children: translation(data?.label)
|
64
76
|
}), /*#__PURE__*/_jsxs(Grid, {
|
65
77
|
container: true,
|
66
78
|
wrap: "nowrap",
|
@@ -113,7 +125,7 @@ const BorderRadius = props => {
|
|
113
125
|
sx: {
|
114
126
|
fontSize: "14px"
|
115
127
|
},
|
116
|
-
children: "Customize"
|
128
|
+
children: translation("Customize")
|
117
129
|
})
|
118
130
|
}), !lockRadius ? /*#__PURE__*/_jsx(Grid, {
|
119
131
|
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
|
})]
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Box, Card, Checkbox, FormControlLabel, Grid, Tooltip, Typography } from "@mui/material";
|
2
2
|
import React from "react";
|
3
3
|
import Icon from "../../Icon";
|
4
|
+
import { useEditorContext } from "../../../hooks/useMouseMove";
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
6
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
6
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -10,18 +11,22 @@ const RenderCard = ({
|
|
10
11
|
title,
|
11
12
|
content,
|
12
13
|
infoIcon,
|
13
|
-
classes
|
14
|
+
classes,
|
15
|
+
translation
|
14
16
|
}) => {
|
15
17
|
return /*#__PURE__*/_jsx(Card, {
|
16
18
|
sx: {
|
17
|
-
position:
|
18
|
-
padding: "10px"
|
19
|
+
position: "relative",
|
20
|
+
padding: "10px",
|
21
|
+
"& .MuiCheckbox-root svg": {
|
22
|
+
fill: "unset !important"
|
23
|
+
}
|
19
24
|
},
|
20
25
|
children: /*#__PURE__*/_jsx(FormControlLabel, {
|
21
26
|
control: /*#__PURE__*/_jsx(Checkbox, {
|
22
27
|
sx: {
|
23
28
|
padding: 0,
|
24
|
-
marginTop:
|
29
|
+
marginTop: "3px"
|
25
30
|
},
|
26
31
|
onChange: handleChange,
|
27
32
|
checked: value,
|
@@ -47,9 +52,9 @@ const RenderCard = ({
|
|
47
52
|
style: {
|
48
53
|
fontWeight: `500 !important`
|
49
54
|
},
|
50
|
-
children: title
|
55
|
+
children: translation(title)
|
51
56
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
52
|
-
title: content,
|
57
|
+
title: translation(content),
|
53
58
|
children: infoIcon && content && /*#__PURE__*/_jsx("span", {
|
54
59
|
children: infoIcon
|
55
60
|
})
|
@@ -57,10 +62,10 @@ const RenderCard = ({
|
|
57
62
|
})
|
58
63
|
}),
|
59
64
|
sx: {
|
60
|
-
width:
|
61
|
-
display:
|
62
|
-
justifyContent:
|
63
|
-
alignItems:
|
65
|
+
width: "100%",
|
66
|
+
display: "flex",
|
67
|
+
justifyContent: "space-between",
|
68
|
+
alignItems: "flex-start",
|
64
69
|
margin: 0
|
65
70
|
},
|
66
71
|
labelPlacement: "start"
|
@@ -72,7 +77,8 @@ const CardsMapping = props => {
|
|
72
77
|
value,
|
73
78
|
data,
|
74
79
|
onChange,
|
75
|
-
classes
|
80
|
+
classes,
|
81
|
+
customProps
|
76
82
|
} = props;
|
77
83
|
const {
|
78
84
|
key,
|
@@ -81,6 +87,12 @@ const CardsMapping = props => {
|
|
81
87
|
selectedCard,
|
82
88
|
infoIcon
|
83
89
|
} = data;
|
90
|
+
const {
|
91
|
+
theme
|
92
|
+
} = useEditorContext();
|
93
|
+
const {
|
94
|
+
translation
|
95
|
+
} = customProps;
|
84
96
|
const activeCard = value === selectedCard;
|
85
97
|
const handleChange = e => {
|
86
98
|
if (selectedCard === data?.value) {
|
@@ -99,7 +111,8 @@ const CardsMapping = props => {
|
|
99
111
|
sx: {
|
100
112
|
marginBottom: "12px",
|
101
113
|
"& .MuiPaper-root": {
|
102
|
-
|
114
|
+
background: theme?.palette?.editor?.miniToolBarBackground,
|
115
|
+
border: activeCard ? "1px solid #2563EB" : `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
|
103
116
|
borderRadius: "8px",
|
104
117
|
boxShadow: activeCard ? "0px 4px 16px 0px #2563EB40" : "unset"
|
105
118
|
}
|
@@ -110,7 +123,8 @@ const CardsMapping = props => {
|
|
110
123
|
title: label,
|
111
124
|
content: content,
|
112
125
|
infoIcon: infoIcon,
|
113
|
-
classes: classes
|
126
|
+
classes: classes,
|
127
|
+
translation: translation
|
114
128
|
})
|
115
129
|
});
|
116
130
|
};
|
@@ -1,22 +1,49 @@
|
|
1
|
-
import React, { useEffect, useState } from "react";
|
1
|
+
import React, { useEffect, useMemo, useState } from "react";
|
2
2
|
import { Grid, TextField, InputAdornment, Typography, Tooltip } from "@mui/material";
|
3
3
|
import ColorPickerButton from "../../ColorPickerButton";
|
4
|
+
import { getVariableValue } from "../../../helper/theme";
|
5
|
+
import { useButtonStyle } from "../../../hooks/useThemeValues";
|
4
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
|
+
const MAP_STYLE_PROPS = {
|
9
|
+
bgColor: "background-color",
|
10
|
+
textColor: "color"
|
11
|
+
};
|
6
12
|
const Color = props => {
|
7
13
|
const {
|
8
|
-
value,
|
14
|
+
value: val,
|
9
15
|
data,
|
10
16
|
onChange,
|
11
|
-
classes
|
17
|
+
classes,
|
18
|
+
elementProps,
|
19
|
+
handleClose,
|
20
|
+
customProps
|
12
21
|
} = props;
|
13
22
|
const {
|
14
23
|
key,
|
15
24
|
label,
|
16
25
|
hideGradient
|
17
26
|
} = data;
|
27
|
+
const {
|
28
|
+
translation
|
29
|
+
} = customProps;
|
18
30
|
const [recentColors, setRecentColors] = useState({});
|
19
|
-
const
|
31
|
+
const {
|
32
|
+
buttonStyle
|
33
|
+
} = useButtonStyle(val, key, elementProps);
|
34
|
+
const newValue = buttonStyle?.color;
|
35
|
+
const {
|
36
|
+
value,
|
37
|
+
inputValue
|
38
|
+
} = useMemo(() => {
|
39
|
+
const isVariable = newValue && newValue.startsWith("var");
|
40
|
+
const inputValue = isVariable ? getVariableValue(newValue) : newValue;
|
41
|
+
return {
|
42
|
+
value: newValue,
|
43
|
+
inputValue: inputValue
|
44
|
+
};
|
45
|
+
}, [buttonStyle?.color]);
|
46
|
+
const getLable = label === "Text" ? translation("selectTextColor") : label === "Background" ? translation("selectBgColor") : translation(label);
|
20
47
|
useEffect(() => {
|
21
48
|
const storedColors = JSON.parse(localStorage.getItem("recentColors"));
|
22
49
|
if (storedColors) {
|
@@ -54,27 +81,27 @@ const Color = props => {
|
|
54
81
|
fontSize: "14px",
|
55
82
|
fontWeight: 500,
|
56
83
|
marginBottom: "5px",
|
57
|
-
display:
|
58
|
-
alignItems:
|
59
|
-
|
60
|
-
width:
|
61
|
-
height:
|
84
|
+
display: "flex",
|
85
|
+
alignItems: "center",
|
86
|
+
"& svg": {
|
87
|
+
width: "20px",
|
88
|
+
height: "20px"
|
62
89
|
}
|
63
90
|
},
|
64
|
-
children: [label, data?.infoIcon ? /*#__PURE__*/_jsx(Tooltip, {
|
91
|
+
children: [translation(label), data?.infoIcon ? /*#__PURE__*/_jsx(Tooltip, {
|
65
92
|
arrow: true,
|
66
|
-
title: "
|
93
|
+
title: translation("noteText"),
|
67
94
|
children: /*#__PURE__*/_jsx("span", {
|
68
95
|
style: {
|
69
|
-
display:
|
96
|
+
display: "inline-block"
|
70
97
|
},
|
71
98
|
children: data?.infoIcon
|
72
99
|
})
|
73
100
|
}) : null]
|
74
101
|
}), /*#__PURE__*/_jsx(TextField, {
|
75
102
|
fullWidth: true,
|
76
|
-
value:
|
77
|
-
placeholder: getLable || `${label} color code`,
|
103
|
+
value: inputValue,
|
104
|
+
placeholder: getLable || `${label} ${translation("color code")}`,
|
78
105
|
InputLabelProps: {
|
79
106
|
shrink: true
|
80
107
|
},
|
@@ -86,6 +113,8 @@ const Color = props => {
|
|
86
113
|
value: value,
|
87
114
|
onSave: onSave,
|
88
115
|
recentColors: recentColors[key],
|
116
|
+
handleClose: handleClose,
|
117
|
+
disableEditTheme: customProps?.disableEditTheme,
|
89
118
|
hideGradient: hideGradient
|
90
119
|
})
|
91
120
|
})
|
@@ -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, {
|
@@ -1,19 +1,30 @@
|
|
1
|
-
import React from "react";
|
1
|
+
import React, { useMemo } from "react";
|
2
2
|
import { TextField, IconButton, Grid, Typography } from "@mui/material";
|
3
3
|
import { sizeMap } from "../../../utils/font.js";
|
4
4
|
import { TextMinusIcon, TextPlusIcon } from "../../../common/iconslist.js";
|
5
|
+
import { getElementStyle } from "../../../helper/theme.js";
|
6
|
+
import { useSlateStatic } from "slate-react";
|
5
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
7
9
|
const FontSize = props => {
|
8
10
|
const {
|
9
|
-
value,
|
11
|
+
value: val,
|
10
12
|
data,
|
11
|
-
onChange
|
13
|
+
onChange,
|
14
|
+
elementProps,
|
15
|
+
customProps
|
12
16
|
} = props;
|
13
17
|
const {
|
14
18
|
key,
|
15
19
|
width
|
16
20
|
} = data;
|
21
|
+
const editor = useSlateStatic();
|
22
|
+
const value = useMemo(() => {
|
23
|
+
return getElementStyle(editor, elementProps, "font-size") || val;
|
24
|
+
}, [editor, val]);
|
25
|
+
const {
|
26
|
+
translation
|
27
|
+
} = customProps;
|
17
28
|
const handleChange = e => {
|
18
29
|
let inc = parseInt(e.target.value) || 16;
|
19
30
|
inc = inc > 200 ? 200 : inc;
|
@@ -24,7 +35,9 @@ const FontSize = props => {
|
|
24
35
|
const getSizeVal = () => {
|
25
36
|
try {
|
26
37
|
const size = `${value}`?.indexOf("px") >= 0 ? value : sizeMap[value] || value;
|
27
|
-
|
38
|
+
const defaultSize = 16;
|
39
|
+
const val = parseInt(size || defaultSize);
|
40
|
+
return isNaN(val) ? defaultSize : val;
|
28
41
|
} catch (err) {
|
29
42
|
return "";
|
30
43
|
}
|
@@ -58,7 +71,7 @@ const FontSize = props => {
|
|
58
71
|
fontSize: "14px",
|
59
72
|
fontWeight: "500"
|
60
73
|
},
|
61
|
-
children: data?.label
|
74
|
+
children: translation(data?.label)
|
62
75
|
})
|
63
76
|
}), /*#__PURE__*/_jsx(Grid, {
|
64
77
|
item: true,
|
@@ -73,7 +86,7 @@ const FontSize = props => {
|
|
73
86
|
size: "small",
|
74
87
|
inputProps: {
|
75
88
|
style: {
|
76
|
-
// textAlign: "center",
|
89
|
+
// textAlign: "center",
|
77
90
|
padding: "11px"
|
78
91
|
}
|
79
92
|
},
|
@@ -8,8 +8,12 @@ const GridSize = props => {
|
|
8
8
|
const {
|
9
9
|
value: val,
|
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;
|
@@ -34,7 +38,7 @@ const GridSize = props => {
|
|
34
38
|
fontWeight: 500,
|
35
39
|
marginBottom: "5px"
|
36
40
|
},
|
37
|
-
children: [data?.label || "Grid Size", ": ", value || 12]
|
41
|
+
children: [translation(data?.label) || translation("Grid Size"), ": ", value || 12]
|
38
42
|
}), /*#__PURE__*/_jsx("div", {
|
39
43
|
className: "sld-wrpr",
|
40
44
|
children: /*#__PURE__*/_jsx(Slider, {
|
@@ -12,6 +12,9 @@ const Icons = props => {
|
|
12
12
|
onChange,
|
13
13
|
customProps
|
14
14
|
} = props;
|
15
|
+
const {
|
16
|
+
translation
|
17
|
+
} = customProps;
|
15
18
|
const {
|
16
19
|
key
|
17
20
|
} = data;
|
@@ -58,7 +61,7 @@ const Icons = props => {
|
|
58
61
|
children: /*#__PURE__*/_jsx(TextField, {
|
59
62
|
fullWidth: true,
|
60
63
|
size: "small",
|
61
|
-
placeholder: "
|
64
|
+
placeholder: translation("searchIcons"),
|
62
65
|
value: val,
|
63
66
|
onChange: handleChange
|
64
67
|
})
|
@@ -70,7 +73,7 @@ const Icons = props => {
|
|
70
73
|
padding: "4px"
|
71
74
|
},
|
72
75
|
children: SelectedIcon ? /*#__PURE__*/_jsx(Tooltip, {
|
73
|
-
title: "
|
76
|
+
title: translation("clickToRemove"),
|
74
77
|
arrow: true,
|
75
78
|
children: /*#__PURE__*/_jsx(IconButton, {
|
76
79
|
onClick: onRemoveIcon,
|
@@ -53,9 +53,9 @@ const LineSpacing = props => {
|
|
53
53
|
defaultValue: value || 1.43,
|
54
54
|
"aria-label": "Default",
|
55
55
|
valueLabelDisplay: "auto",
|
56
|
-
min: 0.
|
57
|
-
max: 3.
|
58
|
-
step: 0.
|
56
|
+
min: 0.50,
|
57
|
+
max: 3.00,
|
58
|
+
step: 0.01,
|
59
59
|
name: "lineHeight",
|
60
60
|
onChange: handleChange
|
61
61
|
}), /*#__PURE__*/_jsx(Box, {
|
@@ -65,15 +65,16 @@ const LineSpacing = props => {
|
|
65
65
|
color: theme?.palette?.editor?.textColor
|
66
66
|
},
|
67
67
|
name: "lineHeight",
|
68
|
-
value: pro_value,
|
68
|
+
value: pro_value || 1.43,
|
69
69
|
className: "sliderInput",
|
70
70
|
onChange: handleChange,
|
71
71
|
type: "number",
|
72
72
|
placeholder: "0",
|
73
|
-
disabled: true
|
74
|
-
defaultValue
|
73
|
+
disabled: true
|
74
|
+
// defaultValue={pro_value || 1.43}
|
75
75
|
})]
|
76
76
|
})]
|
77
77
|
});
|
78
78
|
};
|
79
|
+
|
79
80
|
export default LineSpacing;
|
@@ -14,6 +14,9 @@ const MenusArray = props => {
|
|
14
14
|
onChange,
|
15
15
|
customProps
|
16
16
|
} = props;
|
17
|
+
const {
|
18
|
+
translation
|
19
|
+
} = customProps;
|
17
20
|
const {
|
18
21
|
key
|
19
22
|
} = data;
|
@@ -79,7 +82,7 @@ const MenusArray = props => {
|
|
79
82
|
fontSize: "14px",
|
80
83
|
fontWeight: "500"
|
81
84
|
},
|
82
|
-
children: "Menu Variant"
|
85
|
+
children: translation("Menu Variant")
|
83
86
|
})
|
84
87
|
}), /*#__PURE__*/_jsxs(RadioGroup, {
|
85
88
|
row: true,
|
@@ -98,7 +101,7 @@ const MenusArray = props => {
|
|
98
101
|
sx: {
|
99
102
|
fontSize: "14px"
|
100
103
|
},
|
101
|
-
children: "Stacked"
|
104
|
+
children: translation("Stacked")
|
102
105
|
})
|
103
106
|
}), /*#__PURE__*/_jsx(FormControlLabel, {
|
104
107
|
value: "drawer",
|
@@ -110,7 +113,7 @@ const MenusArray = props => {
|
|
110
113
|
sx: {
|
111
114
|
fontSize: "14px"
|
112
115
|
},
|
113
|
-
children: "Drawer"
|
116
|
+
children: translation("Drawer")
|
114
117
|
})
|
115
118
|
})]
|
116
119
|
})]
|
@@ -141,7 +144,7 @@ const MenusArray = props => {
|
|
141
144
|
fullWidth: true,
|
142
145
|
disabled: true
|
143
146
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
144
|
-
title: "Link Settings",
|
147
|
+
title: translation("Link Settings"),
|
145
148
|
arrow: true,
|
146
149
|
children: /*#__PURE__*/_jsx(IconButton, {
|
147
150
|
onClick: () => setOpenNav({
|
@@ -151,7 +154,7 @@ const MenusArray = props => {
|
|
151
154
|
children: /*#__PURE__*/_jsx(Settings, {})
|
152
155
|
})
|
153
156
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
154
|
-
title: "Delete Menu",
|
157
|
+
title: translation("Delete Menu"),
|
155
158
|
arrow: true,
|
156
159
|
children: /*#__PURE__*/_jsx(IconButton, {
|
157
160
|
onClick: onDelete(i),
|
@@ -167,7 +170,7 @@ const MenusArray = props => {
|
|
167
170
|
sx: {
|
168
171
|
fontWeight: 700
|
169
172
|
},
|
170
|
-
children: "
|
173
|
+
children: translation("addTextIcon")
|
171
174
|
})
|
172
175
|
}), openNav ? /*#__PURE__*/_jsx(LinkSettings, {
|
173
176
|
handleClose: () => setOpenNav(null),
|
@@ -6,8 +6,12 @@ const MetaDataMapping = props => {
|
|
6
6
|
const {
|
7
7
|
data,
|
8
8
|
onChange,
|
9
|
-
elementProps
|
9
|
+
elementProps,
|
10
|
+
customProps
|
10
11
|
} = props;
|
12
|
+
const {
|
13
|
+
translation
|
14
|
+
} = customProps;
|
11
15
|
const {
|
12
16
|
compType
|
13
17
|
} = data;
|
@@ -33,7 +37,9 @@ const MetaDataMapping = props => {
|
|
33
37
|
element: elementProps,
|
34
38
|
value: data?.value,
|
35
39
|
data: updatedData,
|
36
|
-
onChange: handleCardSelect
|
40
|
+
onChange: handleCardSelect,
|
41
|
+
customProps: customProps,
|
42
|
+
translation: translation
|
37
43
|
}) : null
|
38
44
|
});
|
39
45
|
};
|
@@ -16,7 +16,8 @@ const SaveAsTemplate = props => {
|
|
16
16
|
elementProps,
|
17
17
|
handleClose,
|
18
18
|
saveText = "Save As Template",
|
19
|
-
closeText = ""
|
19
|
+
closeText = "",
|
20
|
+
translation
|
20
21
|
} = props;
|
21
22
|
const {
|
22
23
|
onSaveTemplate
|
@@ -93,7 +94,7 @@ const SaveAsTemplate = props => {
|
|
93
94
|
name: "title",
|
94
95
|
value: template?.title,
|
95
96
|
onChange: onChange,
|
96
|
-
placeholder: "Template Title",
|
97
|
+
placeholder: translation("Template Title"),
|
97
98
|
fullWidth: true,
|
98
99
|
size: "small"
|
99
100
|
})
|
@@ -114,7 +115,7 @@ const SaveAsTemplate = props => {
|
|
114
115
|
sx: {
|
115
116
|
fontSize: "14px"
|
116
117
|
},
|
117
|
-
children: "Element"
|
118
|
+
children: translation("Element")
|
118
119
|
})
|
119
120
|
}), /*#__PURE__*/_jsx(MenuItem, {
|
120
121
|
value: "Section",
|
@@ -124,7 +125,7 @@ const SaveAsTemplate = props => {
|
|
124
125
|
sx: {
|
125
126
|
fontSize: "14px"
|
126
127
|
},
|
127
|
-
children: "Section"
|
128
|
+
children: translation("Section")
|
128
129
|
})
|
129
130
|
}), /*#__PURE__*/_jsx(MenuItem, {
|
130
131
|
value: "Template",
|
@@ -134,7 +135,7 @@ const SaveAsTemplate = props => {
|
|
134
135
|
sx: {
|
135
136
|
fontSize: "14px"
|
136
137
|
},
|
137
|
-
children: "Template"
|
138
|
+
children: translation("Template")
|
138
139
|
})
|
139
140
|
})]
|
140
141
|
})
|
@@ -144,7 +145,7 @@ const SaveAsTemplate = props => {
|
|
144
145
|
children: /*#__PURE__*/_jsx(TextField, {
|
145
146
|
fullWidth: true,
|
146
147
|
name: "category",
|
147
|
-
placeholder: "Category",
|
148
|
+
placeholder: translation("Category"),
|
148
149
|
value: template?.category,
|
149
150
|
onChange: onChange,
|
150
151
|
size: "small"
|
@@ -166,7 +167,7 @@ const SaveAsTemplate = props => {
|
|
166
167
|
sx: {
|
167
168
|
...classes.gradientFillBtn
|
168
169
|
},
|
169
|
-
children: ["Upload file", /*#__PURE__*/_jsx("input", {
|
170
|
+
children: [translation("Upload file"), /*#__PURE__*/_jsx("input", {
|
170
171
|
type: "file",
|
171
172
|
style: {
|
172
173
|
opacity: 0,
|
@@ -184,10 +185,10 @@ const SaveAsTemplate = props => {
|
|
184
185
|
}), " ", /*#__PURE__*/_jsx(Typography, {
|
185
186
|
variant: "body1",
|
186
187
|
color: "primary",
|
187
|
-
children: "Remove"
|
188
|
+
children: translation("Remove")
|
188
189
|
})]
|
189
190
|
})]
|
190
|
-
}), uploading ? "Uploading..." : "", /*#__PURE__*/_jsx(Grid, {
|
191
|
+
}), uploading ? translation("Uploading...") : "", /*#__PURE__*/_jsx(Grid, {
|
191
192
|
item: true,
|
192
193
|
xs: 12,
|
193
194
|
style: {
|
@@ -216,7 +217,7 @@ const SaveAsTemplate = props => {
|
|
216
217
|
}
|
217
218
|
// variant="contained"
|
218
219
|
,
|
219
|
-
children: saveText
|
220
|
+
children: translation(saveText)
|
220
221
|
}), closeText ? /*#__PURE__*/_jsx(Button, {
|
221
222
|
className: "closebtn",
|
222
223
|
onClick: handleSave,
|
@@ -224,7 +225,7 @@ const SaveAsTemplate = props => {
|
|
224
225
|
fontWeight: 700
|
225
226
|
},
|
226
227
|
variant: "contained",
|
227
|
-
children: closeText
|
228
|
+
children: translation(closeText)
|
228
229
|
}) : null]
|
229
230
|
})]
|
230
231
|
});
|