@flozy/editor 9.5.7 → 9.5.8
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 +139 -22
- 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 +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 +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 +7 -2
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +425 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +4 -3
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +25 -5
- 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 +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 +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 +23 -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/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/DataView/styles.js +13 -0
- 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 +9 -6
- 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 +23 -4
- package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +6 -2
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +36 -5
- 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 +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/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/TableCell.js +2 -24
- 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 +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 +5 -3
- 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 -8
- 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/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 +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/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 +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/gridDropItem.js +56 -7
- package/dist/Editor/common/RnD/Utils/index.js +3 -0
- package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +117 -0
- package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +134 -0
- package/dist/Editor/common/RnD/VirtualElement/helper.js +281 -0
- package/dist/Editor/common/RnD/VirtualElement/index.js +188 -105
- package/dist/Editor/common/RnD/VirtualElement/styles.js +123 -7
- package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +5 -3
- package/dist/Editor/common/RnD/index.js +59 -7
- package/dist/Editor/common/Section/index.js +7 -4
- package/dist/Editor/common/Shorthands/elements.js +74 -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/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 +68 -57
- package/dist/Editor/helper/index.js +35 -15
- 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/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/hooks/useThemeValues.js +63 -0
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +10 -7
- 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 +147 -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 +167 -48
- package/dist/Editor/utils/draftToSlate.js +3 -2
- package/dist/Editor/utils/font.js +40 -37
- package/dist/Editor/utils/freegrid.js +2 -2
- package/dist/Editor/utils/helper.js +90 -19
- package/package.json +2 -2
@@ -11,7 +11,8 @@ const FilterProperty = props => {
|
|
11
11
|
} = useDataView();
|
12
12
|
const {
|
13
13
|
edit,
|
14
|
-
onEvent
|
14
|
+
onEvent,
|
15
|
+
translation
|
15
16
|
} = props;
|
16
17
|
const handleChangeOption = m => () => {
|
17
18
|
onEvent("addSort", {
|
@@ -33,7 +34,7 @@ const FilterProperty = props => {
|
|
33
34
|
icon: m?.Icon
|
34
35
|
})
|
35
36
|
}), /*#__PURE__*/_jsx(ListItemText, {
|
36
|
-
primary: m.label
|
37
|
+
primary: translation(m.label)
|
37
38
|
})]
|
38
39
|
}, i);
|
39
40
|
})
|
@@ -7,7 +7,8 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
const PropertyList = props => {
|
8
8
|
const {
|
9
9
|
onSelect,
|
10
|
-
selected
|
10
|
+
selected,
|
11
|
+
translation
|
11
12
|
} = props;
|
12
13
|
return /*#__PURE__*/_jsx(List, {
|
13
14
|
children: PROPERTY_TYPES?.map(({
|
@@ -22,7 +23,7 @@ const PropertyList = props => {
|
|
22
23
|
icon: rest?.Icon
|
23
24
|
})
|
24
25
|
}), /*#__PURE__*/_jsx(ListItemText, {
|
25
|
-
primary: rest?.label
|
26
|
+
primary: translation(rest?.label)
|
26
27
|
})]
|
27
28
|
}, i);
|
28
29
|
})
|
@@ -29,6 +29,16 @@ const POSITIONS = {
|
|
29
29
|
vertical: "top",
|
30
30
|
horizontal: "right"
|
31
31
|
}
|
32
|
+
},
|
33
|
+
editOptionMulti: {
|
34
|
+
anchorOrigin: {
|
35
|
+
vertical: "top",
|
36
|
+
horizontal: "left"
|
37
|
+
},
|
38
|
+
transformOrigin: {
|
39
|
+
vertical: "top",
|
40
|
+
horizontal: "left"
|
41
|
+
}
|
32
42
|
}
|
33
43
|
};
|
34
44
|
const PropertySettings = props => {
|
@@ -41,7 +51,8 @@ const PropertySettings = props => {
|
|
41
51
|
anchorEl,
|
42
52
|
mode,
|
43
53
|
onClose,
|
44
|
-
onEvent
|
54
|
+
onEvent,
|
55
|
+
translation
|
45
56
|
} = props;
|
46
57
|
const classes = useOptionsStyles(theme, appTheme);
|
47
58
|
const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
|
@@ -53,35 +64,41 @@ const PropertySettings = props => {
|
|
53
64
|
classes: classes,
|
54
65
|
onClose: onClose,
|
55
66
|
onEvent: onEvent,
|
56
|
-
mode: mode
|
67
|
+
mode: mode,
|
68
|
+
translation: translation
|
57
69
|
});
|
58
70
|
case "editProperty":
|
59
71
|
return /*#__PURE__*/_jsx(EditProperty, {
|
60
72
|
classes: classes,
|
61
73
|
onClose: onClose,
|
62
74
|
onEvent: onEvent,
|
63
|
-
mode: mode
|
75
|
+
mode: mode,
|
76
|
+
translation: translation
|
64
77
|
});
|
65
78
|
case "changeProperty":
|
66
79
|
return /*#__PURE__*/_jsx(ChangeProperty, {
|
67
80
|
classes: classes,
|
68
81
|
onClose: onClose,
|
69
82
|
onEvent: onEvent,
|
70
|
-
mode: mode
|
83
|
+
mode: mode,
|
84
|
+
translation: translation
|
71
85
|
});
|
72
86
|
case "allProperties":
|
73
87
|
return /*#__PURE__*/_jsx(AllProperties, {
|
74
88
|
classes: classes,
|
75
89
|
onClose: onClose,
|
76
90
|
onEvent: onEvent,
|
77
|
-
mode: mode
|
91
|
+
mode: mode,
|
92
|
+
translation: translation
|
78
93
|
});
|
79
94
|
case "editOption":
|
95
|
+
case "editOptionMulti":
|
80
96
|
return /*#__PURE__*/_jsx(EditOption, {
|
81
97
|
classes: classes,
|
82
98
|
onClose: onClose,
|
83
99
|
onEvent: onEvent,
|
84
|
-
mode: mode
|
100
|
+
mode: mode,
|
101
|
+
translation: translation
|
85
102
|
});
|
86
103
|
default:
|
87
104
|
return null;
|
@@ -33,7 +33,7 @@ const useTableStyles = (theme, appTheme) => ({
|
|
33
33
|
height: "40px",
|
34
34
|
maxWidth: "0px !important",
|
35
35
|
minWidth: "0px !important",
|
36
|
-
"& input": {
|
36
|
+
"& input, & textarea": {
|
37
37
|
color: appTheme?.palette?.editor?.tv_text_primary,
|
38
38
|
background: "transparent",
|
39
39
|
fontSize: "14px"
|
@@ -107,6 +107,9 @@ const useTableStyles = (theme, appTheme) => ({
|
|
107
107
|
"& .MuiChip-deleteIcon": {
|
108
108
|
minWidth: "22px",
|
109
109
|
minHeight: "22px"
|
110
|
+
},
|
111
|
+
"&.wrap-true": {
|
112
|
+
flexWrap: "wrap"
|
110
113
|
}
|
111
114
|
},
|
112
115
|
"&.Mui-disabled": {
|
@@ -134,7 +134,8 @@ const TableView = props => {
|
|
134
134
|
} = useEditorContext();
|
135
135
|
const {
|
136
136
|
children,
|
137
|
-
readOnly
|
137
|
+
readOnly,
|
138
|
+
translation
|
138
139
|
} = props;
|
139
140
|
const theme = useTheme();
|
140
141
|
const classes = useTableStyles(theme, appTheme);
|
@@ -166,7 +167,7 @@ const TableView = props => {
|
|
166
167
|
case "addProperty":
|
167
168
|
const np = onAddProperty({
|
168
169
|
type: data?.type
|
169
|
-
}, data?.overrides || {});
|
170
|
+
}, data?.overrides || {}, translation);
|
170
171
|
if (navToEdit) {
|
171
172
|
setMode({
|
172
173
|
type: "editProperty",
|
@@ -336,14 +337,15 @@ const TableView = props => {
|
|
336
337
|
startIcon: /*#__PURE__*/_jsx(Icon, {
|
337
338
|
icon: "addRounded"
|
338
339
|
}),
|
339
|
-
children: "Add new row"
|
340
|
+
children: translation("Add new row")
|
340
341
|
}) : null, open && !readOnly ? /*#__PURE__*/_jsx(PropertySettings, {
|
341
342
|
open: open,
|
342
343
|
anchorEl: anchorEl,
|
343
344
|
mode: mode,
|
344
345
|
properties: properties,
|
345
346
|
onClose: onClose,
|
346
|
-
onEvent: onEvent
|
347
|
+
onEvent: onEvent,
|
348
|
+
translation: translation
|
347
349
|
}) : null]
|
348
350
|
});
|
349
351
|
};
|
@@ -11,7 +11,8 @@ const RenderRow = props => {
|
|
11
11
|
properties,
|
12
12
|
onSelect,
|
13
13
|
selected,
|
14
|
-
readOnly
|
14
|
+
readOnly,
|
15
|
+
translation
|
15
16
|
} = props;
|
16
17
|
const showProperties = properties?.filter(f => f.visible);
|
17
18
|
return showProperties?.map((property, i) => {
|
@@ -22,7 +23,8 @@ const RenderRow = props => {
|
|
22
23
|
property: property,
|
23
24
|
onSelect: onSelect,
|
24
25
|
selected: selected,
|
25
|
-
readOnly: readOnly
|
26
|
+
readOnly: readOnly,
|
27
|
+
translation: translation
|
26
28
|
}, `${property.key}_${i}`);
|
27
29
|
});
|
28
30
|
};
|
@@ -33,7 +35,8 @@ const ViewData = props => {
|
|
33
35
|
customProps
|
34
36
|
} = props;
|
35
37
|
const {
|
36
|
-
readOnly
|
38
|
+
readOnly,
|
39
|
+
translation
|
37
40
|
} = customProps || {};
|
38
41
|
const {
|
39
42
|
properties,
|
@@ -67,7 +70,8 @@ const ViewData = props => {
|
|
67
70
|
properties: properties,
|
68
71
|
onSelect: onSelect,
|
69
72
|
selected: selectedRows?.includes(row?.id),
|
70
|
-
readOnly: readOnly
|
73
|
+
readOnly: readOnly,
|
74
|
+
translation: translation
|
71
75
|
}), /*#__PURE__*/_jsx("td", {}), /*#__PURE__*/_jsx("td", {})]
|
72
76
|
}, i);
|
73
77
|
}), /*#__PURE__*/_jsx("tr", {
|
@@ -9,7 +9,8 @@ const LAYOUT_COMPONENT = {
|
|
9
9
|
const LayoutView = props => {
|
10
10
|
const {
|
11
11
|
readOnly,
|
12
|
-
children
|
12
|
+
children,
|
13
|
+
translation
|
13
14
|
} = props;
|
14
15
|
const {
|
15
16
|
layoutType
|
@@ -18,6 +19,7 @@ const LayoutView = props => {
|
|
18
19
|
return /*#__PURE__*/_jsx(_Fragment, {
|
19
20
|
children: /*#__PURE__*/_jsx(Layout, {
|
20
21
|
readOnly: readOnly,
|
22
|
+
translation: translation,
|
21
23
|
children: children
|
22
24
|
})
|
23
25
|
});
|
@@ -67,15 +67,18 @@ export const DataViewProvider = ({
|
|
67
67
|
setRows(globalSearch(initialData?.rows || [], search));
|
68
68
|
}
|
69
69
|
}, [sort, search]);
|
70
|
-
const onAddProperty = (data, overrides = {}) => {
|
70
|
+
const onAddProperty = (data, overrides = {}, translation) => {
|
71
71
|
try {
|
72
72
|
const {
|
73
73
|
type
|
74
74
|
} = data;
|
75
75
|
const key = `col_${new Date().getTime()}`;
|
76
|
+
const defaultProperty = PROPERTY_DEFAULTS[type] || {};
|
77
|
+
const translatedLabel = translation ? translation(defaultProperty.label) : defaultProperty.label;
|
76
78
|
const newProperty = {
|
77
|
-
...
|
79
|
+
...defaultProperty,
|
78
80
|
...overrides,
|
81
|
+
label: translatedLabel,
|
79
82
|
key: key,
|
80
83
|
type
|
81
84
|
};
|
@@ -69,6 +69,19 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
69
69
|
opacity: 1
|
70
70
|
}
|
71
71
|
}
|
72
|
+
},
|
73
|
+
"& .fe-tv-type_text": {
|
74
|
+
"& .MuiInputBase-multiline": {
|
75
|
+
height: "auto !important",
|
76
|
+
"&.Mui-focused": {
|
77
|
+
border: 0,
|
78
|
+
outline: 0,
|
79
|
+
"& textarea:focus-visible": {
|
80
|
+
border: 0,
|
81
|
+
borderColor: "none"
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
72
85
|
}
|
73
86
|
},
|
74
87
|
filterView: {
|
@@ -25,7 +25,8 @@ const Divider = props => {
|
|
25
25
|
borderStyle = "solid"
|
26
26
|
} = element;
|
27
27
|
const {
|
28
|
-
readOnly
|
28
|
+
readOnly,
|
29
|
+
translation
|
29
30
|
} = customProps;
|
30
31
|
const editor = useSlateStatic();
|
31
32
|
const path = ReactEditor.findPath(editor, element);
|
@@ -63,7 +64,7 @@ const Divider = props => {
|
|
63
64
|
left: 0
|
64
65
|
},
|
65
66
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
66
|
-
title: "Divider Settings",
|
67
|
+
title: translation("Divider Settings"),
|
67
68
|
arrow: true,
|
68
69
|
children: /*#__PURE__*/_jsx(IconButton, {
|
69
70
|
size: "small",
|
@@ -154,7 +155,8 @@ const Divider = props => {
|
|
154
155
|
onSave: onSave,
|
155
156
|
onClose: onClose,
|
156
157
|
onDelete: onDelete,
|
157
|
-
customProps: customProps
|
158
|
+
customProps: customProps,
|
159
|
+
translation: translation
|
158
160
|
}) : null]
|
159
161
|
});
|
160
162
|
};
|
@@ -6,13 +6,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
const DividerButton = props => {
|
7
7
|
const {
|
8
8
|
editor,
|
9
|
-
icoBtnType
|
9
|
+
icoBtnType,
|
10
|
+
customProps
|
10
11
|
} = props;
|
12
|
+
const {
|
13
|
+
translation
|
14
|
+
} = customProps;
|
11
15
|
const handleClick = () => {
|
12
16
|
insertDivider(editor);
|
13
17
|
};
|
14
18
|
return /*#__PURE__*/_jsx(ToolbarIcon, {
|
15
|
-
title: "Divider",
|
19
|
+
title: translation("Divider"),
|
16
20
|
onClick: handleClick,
|
17
21
|
icon: /*#__PURE__*/_jsx(Icon, {
|
18
22
|
icon: "divider"
|
@@ -8,10 +8,11 @@ const DividerPopup = props => {
|
|
8
8
|
onSave,
|
9
9
|
onClose,
|
10
10
|
onDelete,
|
11
|
-
customProps
|
11
|
+
customProps,
|
12
|
+
translation
|
12
13
|
} = props;
|
13
14
|
return /*#__PURE__*/_jsx(StyleBuilder, {
|
14
|
-
title: "Divider",
|
15
|
+
title: translation("Divider"),
|
15
16
|
type: "dividerStyle",
|
16
17
|
element: element,
|
17
18
|
onSave: onSave,
|
@@ -29,6 +29,9 @@ const Embed = ({
|
|
29
29
|
images: []
|
30
30
|
});
|
31
31
|
const [selection, setSelection] = useState();
|
32
|
+
const {
|
33
|
+
translation
|
34
|
+
} = customProps;
|
32
35
|
const handleFormSubmit = fd => {
|
33
36
|
if (fd?.url || fd?.images.length > 0) {
|
34
37
|
selection && Transforms.select(editor, selection);
|
@@ -72,7 +75,7 @@ const Embed = ({
|
|
72
75
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
73
76
|
children: [/*#__PURE__*/_jsx(ToolbarIcon, {
|
74
77
|
className: isBlockActive(editor, format) ? "active" : "",
|
75
|
-
title: EMBED_LABEL[lbT || format],
|
78
|
+
title: translation(EMBED_LABEL[lbT || format]),
|
76
79
|
onClick: onToggle,
|
77
80
|
icon: /*#__PURE__*/_jsx(Icon, {
|
78
81
|
icon: lbT || format
|
@@ -18,8 +18,11 @@ const EmbedPopup = props => {
|
|
18
18
|
}
|
19
19
|
return true;
|
20
20
|
});
|
21
|
+
const {
|
22
|
+
translation
|
23
|
+
} = customProps;
|
21
24
|
return /*#__PURE__*/_jsx(StyleBuilder, {
|
22
|
-
title: format === "image" ? "Image" : format === "video" ? "video" : format === "calendly" ? "calendly" : "Embed",
|
25
|
+
title: format === "image" ? translation("Image") : format === "video" ? translation("video") : format === "calendly" ? "calendly" : translation("Embed"),
|
23
26
|
type: format === "image" ? "embedImageStyle" : "embedVideoStyle",
|
24
27
|
element: element,
|
25
28
|
onSave: onSave,
|
@@ -5,7 +5,7 @@ import AspectRatioIcon from "@mui/icons-material/AspectRatio";
|
|
5
5
|
import useResize from "../../utils/customHooks/useResize";
|
6
6
|
import EmbedPopup from "./EmbedPopup";
|
7
7
|
import { IconButton, Tooltip, Box, useTheme } from "@mui/material";
|
8
|
-
import {
|
8
|
+
import { LinkIcon } from "../../common/iconslist";
|
9
9
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
10
10
|
import { getTRBLBreakPoints, getBreakPointsValue, groupByBreakpoint } from "../../helper/theme";
|
11
11
|
import Icon from "../../common/Icon";
|
@@ -23,7 +23,8 @@ const ToolBar = ({
|
|
23
23
|
onSettings,
|
24
24
|
setOpenNav,
|
25
25
|
topM,
|
26
|
-
classes
|
26
|
+
classes,
|
27
|
+
translation
|
27
28
|
}) => {
|
28
29
|
return !isEmpty ? /*#__PURE__*/_jsxs("div", {
|
29
30
|
className: "element-toolbar visible-on-hover",
|
@@ -32,10 +33,10 @@ const ToolBar = ({
|
|
32
33
|
top: "-4px",
|
33
34
|
left: topM ? "35px" : "0px",
|
34
35
|
margin: "0px",
|
35
|
-
gap:
|
36
|
+
gap: "3px"
|
36
37
|
},
|
37
38
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
38
|
-
title: "Image Settings",
|
39
|
+
title: translation("Image Settings"),
|
39
40
|
arrow: true,
|
40
41
|
children: /*#__PURE__*/_jsx(IconButton, {
|
41
42
|
onClick: onSettings,
|
@@ -43,7 +44,7 @@ const ToolBar = ({
|
|
43
44
|
children: /*#__PURE__*/_jsx(SettingsIcon, {})
|
44
45
|
})
|
45
46
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
46
|
-
title: "Link Settings",
|
47
|
+
title: translation("Link Settings"),
|
47
48
|
arrow: true,
|
48
49
|
children: /*#__PURE__*/_jsx(IconButton, {
|
49
50
|
className: "last-btn",
|
@@ -71,7 +72,8 @@ const ImageContent = props => {
|
|
71
72
|
onTouchEnd,
|
72
73
|
path,
|
73
74
|
theme,
|
74
|
-
classes
|
75
|
+
classes,
|
76
|
+
translation
|
75
77
|
} = props;
|
76
78
|
return !url ? !readOnly ? /*#__PURE__*/_jsxs(Box, {
|
77
79
|
component: "button",
|
@@ -85,7 +87,7 @@ const ImageContent = props => {
|
|
85
87
|
},
|
86
88
|
children: [/*#__PURE__*/_jsx(Icon, {
|
87
89
|
icon: "image"
|
88
|
-
}), "Add Image"]
|
90
|
+
}), translation("Add Image")]
|
89
91
|
}) : /*#__PURE__*/_jsxs(Box, {
|
90
92
|
sx: {
|
91
93
|
color: "#64748B !important",
|
@@ -97,7 +99,7 @@ const ImageContent = props => {
|
|
97
99
|
className: "element-empty-btn",
|
98
100
|
children: [/*#__PURE__*/_jsx(Icon, {
|
99
101
|
icon: "shieldNoAccess"
|
100
|
-
}), "
|
102
|
+
}), translation("contentNotAvilable")]
|
101
103
|
}) : /*#__PURE__*/_jsx(Box, {
|
102
104
|
component: "img",
|
103
105
|
className: "emb-img",
|
@@ -144,7 +146,8 @@ const Image = props => {
|
|
144
146
|
framePos
|
145
147
|
} = element;
|
146
148
|
const {
|
147
|
-
readOnly
|
149
|
+
readOnly,
|
150
|
+
translation
|
148
151
|
} = customProps;
|
149
152
|
const {
|
150
153
|
vertical,
|
@@ -309,7 +312,8 @@ const Image = props => {
|
|
309
312
|
onSettings: onSettings,
|
310
313
|
setOpenNav: setOpenNav,
|
311
314
|
topM: size.width < 100,
|
312
|
-
classes: classes
|
315
|
+
classes: classes,
|
316
|
+
translation: translation
|
313
317
|
}), /*#__PURE__*/_jsx(ImageContent, {
|
314
318
|
...element,
|
315
319
|
readOnly: readOnly,
|
@@ -318,7 +322,8 @@ const Image = props => {
|
|
318
322
|
onTouchEnd: onTouchEnd,
|
319
323
|
path: path,
|
320
324
|
theme: theme,
|
321
|
-
classes: classes
|
325
|
+
classes: classes,
|
326
|
+
translation: translation
|
322
327
|
}), url && frames[frame] ? /*#__PURE__*/_jsx(Box, {
|
323
328
|
component: "div",
|
324
329
|
className: "image-frame",
|
@@ -77,6 +77,7 @@ const VideoPlaceholder = props => {
|
|
77
77
|
readOnly,
|
78
78
|
onSettings,
|
79
79
|
classes,
|
80
|
+
translation,
|
80
81
|
type
|
81
82
|
} = props;
|
82
83
|
return !url ? !readOnly ? /*#__PURE__*/_jsxs(Box, {
|
@@ -88,7 +89,7 @@ const VideoPlaceholder = props => {
|
|
88
89
|
},
|
89
90
|
children: [/*#__PURE__*/_jsx(Icon, {
|
90
91
|
icon: "video"
|
91
|
-
}), TYPE_LABELS[type] || "Embed Video or Other"]
|
92
|
+
}), translation(TYPE_LABELS[type] || "Embed Video or Other")]
|
92
93
|
}) : /*#__PURE__*/_jsxs(Box, {
|
93
94
|
sx: {
|
94
95
|
color: "#64748B !important",
|
@@ -100,7 +101,7 @@ const VideoPlaceholder = props => {
|
|
100
101
|
className: "element-empty-btn",
|
101
102
|
children: [/*#__PURE__*/_jsx(Icon, {
|
102
103
|
icon: "shieldNoAccess"
|
103
|
-
}), "
|
104
|
+
}), translation("contentNotAvilable")]
|
104
105
|
}) : /*#__PURE__*/_jsx(VideoContent, {
|
105
106
|
...props
|
106
107
|
});
|
@@ -125,7 +126,8 @@ const Video = ({
|
|
125
126
|
const [openSetttings, setOpenSettings] = useState(false);
|
126
127
|
const [parentDOM, setParentDOM] = useState(null);
|
127
128
|
const {
|
128
|
-
readOnly
|
129
|
+
readOnly,
|
130
|
+
translation
|
129
131
|
} = customProps;
|
130
132
|
const {
|
131
133
|
vertical,
|
@@ -171,14 +173,14 @@ const Video = ({
|
|
171
173
|
className: "element-toolbar visible-on-hover",
|
172
174
|
contentEditable: false,
|
173
175
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
174
|
-
title: "Video Settings",
|
176
|
+
title: translation("Video Settings"),
|
175
177
|
arrow: true,
|
176
178
|
children: /*#__PURE__*/_jsx(IconButton, {
|
177
179
|
onClick: onSettings,
|
178
180
|
children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
|
179
181
|
})
|
180
182
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
181
|
-
title: "Delete Video",
|
183
|
+
title: translation("Delete Video"),
|
182
184
|
arrow: true,
|
183
185
|
children: /*#__PURE__*/_jsx(IconButton, {
|
184
186
|
onClick: onDelete,
|
@@ -284,7 +286,8 @@ const Video = ({
|
|
284
286
|
url: url,
|
285
287
|
readOnly: readOnly,
|
286
288
|
resizing: resizing,
|
287
|
-
classes: classes
|
289
|
+
classes: classes,
|
290
|
+
translation: translation
|
288
291
|
}), !readOnly && url ? /*#__PURE__*/_jsx(IconButton, {
|
289
292
|
onPointerDown: onMouseDown,
|
290
293
|
style: {
|
@@ -26,13 +26,14 @@ const getCode = (embedData, isEncoded) => {
|
|
26
26
|
return embedData;
|
27
27
|
};
|
28
28
|
const ToolBar = ({
|
29
|
-
onDelete
|
29
|
+
onDelete,
|
30
|
+
translation
|
30
31
|
}) => {
|
31
32
|
return /*#__PURE__*/_jsx("div", {
|
32
33
|
className: "element-toolbar visible-on-hover",
|
33
34
|
contentEditable: false,
|
34
35
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
35
|
-
title: "Delete",
|
36
|
+
title: translation("Delete"),
|
36
37
|
arrow: true,
|
37
38
|
children: /*#__PURE__*/_jsx(IconButton, {
|
38
39
|
onClick: onDelete,
|
@@ -55,7 +56,8 @@ const Code = props => {
|
|
55
56
|
isSanitized
|
56
57
|
} = element;
|
57
58
|
const {
|
58
|
-
readOnly
|
59
|
+
readOnly,
|
60
|
+
translation
|
59
61
|
} = customProps;
|
60
62
|
const editor = useSlateStatic();
|
61
63
|
const path = ReactEditor.findPath(editor, element);
|
@@ -90,7 +92,8 @@ const Code = props => {
|
|
90
92
|
}, /*#__PURE__*/_jsx("div", {
|
91
93
|
ref: codeRef
|
92
94
|
}), children, !readOnly && /*#__PURE__*/_jsx(ToolBar, {
|
93
|
-
onDelete: onDelete
|
95
|
+
onDelete: onDelete,
|
96
|
+
translation: translation
|
94
97
|
}));
|
95
98
|
};
|
96
99
|
export default Code;
|
@@ -7,15 +7,19 @@ import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
8
|
const EmbedScript = props => {
|
9
9
|
const {
|
10
|
-
icoBtnType
|
10
|
+
icoBtnType,
|
11
|
+
customProps
|
11
12
|
} = props;
|
12
13
|
const [open, setOpen] = useState(false);
|
14
|
+
const {
|
15
|
+
translation
|
16
|
+
} = customProps;
|
13
17
|
const handleClick = () => {
|
14
18
|
setOpen(true);
|
15
19
|
};
|
16
20
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
17
21
|
children: [/*#__PURE__*/_jsx(ToolbarIcon, {
|
18
|
-
title: "Code",
|
22
|
+
title: translation("Code"),
|
19
23
|
onClick: handleClick,
|
20
24
|
icon: /*#__PURE__*/_jsx(Icon, {
|
21
25
|
icon: "embedScript"
|
@@ -24,6 +24,9 @@ const EmbedScriptPopup = props => {
|
|
24
24
|
loading,
|
25
25
|
error
|
26
26
|
} = apiStatus;
|
27
|
+
const {
|
28
|
+
translation
|
29
|
+
} = customProps;
|
27
30
|
useEffect(() => {
|
28
31
|
if (customProps?.services) {
|
29
32
|
customProps.services("allowedDomains", {}).then(data => {
|
@@ -78,7 +81,7 @@ const EmbedScriptPopup = props => {
|
|
78
81
|
alignItems: "center",
|
79
82
|
gap: "6px"
|
80
83
|
},
|
81
|
-
children: ["Embed Code", allowedDomains?.length ? /*#__PURE__*/_jsx(Tooltip, {
|
84
|
+
children: [translation("Embed Code"), allowedDomains?.length ? /*#__PURE__*/_jsx(Tooltip, {
|
82
85
|
title: /*#__PURE__*/_jsxs(Box, {
|
83
86
|
sx: {
|
84
87
|
textTransform: "none"
|
@@ -87,7 +90,7 @@ const EmbedScriptPopup = props => {
|
|
87
90
|
style: {
|
88
91
|
fontWeight: "bold"
|
89
92
|
},
|
90
|
-
children: "Allowed Domains"
|
93
|
+
children: translation("Allowed Domains")
|
91
94
|
}), /*#__PURE__*/_jsx("br", {}), allowedDomains.join(", ")]
|
92
95
|
}),
|
93
96
|
children: /*#__PURE__*/_jsx(InfoOutlinedIcon, {
|
@@ -114,16 +117,16 @@ const EmbedScriptPopup = props => {
|
|
114
117
|
}), /*#__PURE__*/_jsx(Box, {
|
115
118
|
component: "div",
|
116
119
|
color: "red",
|
117
|
-
children: error ? "
|
120
|
+
children: error ? translation("errorOnCode") : ""
|
118
121
|
})]
|
119
122
|
}), /*#__PURE__*/_jsxs(DialogActions, {
|
120
123
|
children: [/*#__PURE__*/_jsx(Button, {
|
121
124
|
onClick: onSubmit,
|
122
125
|
disabled: loading,
|
123
|
-
children: loading ? "Validating" : "Save"
|
126
|
+
children: loading ? translation("Validating") : translation("Save")
|
124
127
|
}), /*#__PURE__*/_jsx(Button, {
|
125
128
|
onClick: onClose,
|
126
|
-
children: "Cancel"
|
129
|
+
children: translation("Cancel")
|
127
130
|
})]
|
128
131
|
})]
|
129
132
|
})
|
@@ -14,13 +14,17 @@ const EmojiButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
14
14
|
const {
|
15
15
|
icoBtnType,
|
16
16
|
selectionTarget,
|
17
|
-
theme = 'light'
|
17
|
+
theme = 'light',
|
18
|
+
customProps
|
18
19
|
} = props;
|
19
20
|
const editor = useSlateStatic();
|
20
21
|
const [anchorEl, setAnchorEl] = useState(null);
|
21
22
|
const [target, setTarget] = useState(selectionTarget);
|
22
23
|
const open = Boolean(anchorEl);
|
23
24
|
const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
|
25
|
+
const {
|
26
|
+
translation
|
27
|
+
} = customProps;
|
24
28
|
useImperativeHandle(ref, () => ({
|
25
29
|
triggerClick: target => {
|
26
30
|
setTarget(target);
|
@@ -50,7 +54,7 @@ const EmojiButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
50
54
|
};
|
51
55
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
52
56
|
children: [/*#__PURE__*/_jsx(ToolbarIcon, {
|
53
|
-
title: "Emoji",
|
57
|
+
title: translation("Emoji"),
|
54
58
|
onClick: onClick,
|
55
59
|
icon: /*#__PURE__*/_jsx(Icon, {
|
56
60
|
icon: "emoji"
|
@@ -9,8 +9,11 @@ const FieldPopup = props => {
|
|
9
9
|
onClose,
|
10
10
|
customProps
|
11
11
|
} = props;
|
12
|
+
const {
|
13
|
+
translation
|
14
|
+
} = customProps;
|
12
15
|
return /*#__PURE__*/_jsx(StyleBuilder, {
|
13
|
-
title: "Form Field",
|
16
|
+
title: translation("Form Field"),
|
14
17
|
type: "fieldStyle",
|
15
18
|
element: element,
|
16
19
|
onSave: onSave,
|