@flozy/editor 9.8.3 → 9.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Editor/ChatEditor.js +14 -7
- package/dist/Editor/CommonEditor.js +27 -12
- package/dist/Editor/Elements/AI/AIInput.js +5 -3
- package/dist/Editor/Elements/AI/CustomSelect.js +9 -5
- package/dist/Editor/Elements/AI/PopoverAIInput.js +4 -2
- package/dist/Editor/Elements/Accordion/Accordion.js +4 -3
- package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +4 -1
- package/dist/Editor/Elements/Accordion/AccordionButton.js +6 -2
- package/dist/Editor/Elements/Accordion/AccordionTitlePopup.js +4 -1
- package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +6 -2
- package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +4 -1
- package/dist/Editor/Elements/Attachments/AttachmentsButton.js +4 -1
- package/dist/Editor/Elements/Button/ButtonPopup.js +4 -1
- package/dist/Editor/Elements/Button/ButtonToolIcon.js +6 -2
- package/dist/Editor/Elements/Button/EditorButton.js +6 -5
- package/dist/Editor/Elements/Carousel/Carousel.js +5 -4
- package/dist/Editor/Elements/Carousel/CarouselButton.js +6 -2
- package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -2
- package/dist/Editor/Elements/ChipText/ChipTextPopup.js +4 -1
- package/dist/Editor/Elements/CodeToText/CodeToText.js +5 -4
- package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +6 -2
- package/dist/Editor/Elements/Colorbox/ColorboxButton.js +6 -2
- package/dist/Editor/Elements/DataView/DataView.js +5 -2
- package/dist/Editor/Elements/DataView/DataViewButton.js +6 -2
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +13 -12
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +7 -4
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +7 -5
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +9 -7
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +3 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +5 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +6 -5
- package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +5 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +7 -6
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +15 -12
- package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +3 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +3 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +12 -6
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +6 -4
- package/dist/Editor/Elements/DataView/Layouts/index.js +3 -1
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +5 -2
- package/dist/Editor/Elements/Divider/Divider.js +5 -3
- package/dist/Editor/Elements/Divider/DividerButton.js +6 -2
- package/dist/Editor/Elements/Divider/DividerPopup.js +3 -2
- package/dist/Editor/Elements/Embed/Embed.js +4 -1
- package/dist/Editor/Elements/Embed/EmbedPopup.js +4 -1
- package/dist/Editor/Elements/Embed/Image.js +14 -9
- package/dist/Editor/Elements/Embed/Video.js +10 -7
- package/dist/Editor/Elements/EmbedScript/Code.js +7 -4
- package/dist/Editor/Elements/EmbedScript/EmbedScript.js +6 -2
- package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +8 -5
- package/dist/Editor/Elements/Emoji/EmojiButton.js +6 -2
- package/dist/Editor/Elements/Form/FieldPopup.js +4 -1
- package/dist/Editor/Elements/Form/Form.js +12 -9
- package/dist/Editor/Elements/Form/FormButton.js +6 -2
- package/dist/Editor/Elements/Form/FormPopup.js +3 -2
- package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +18 -12
- package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +13 -8
- package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +3 -2
- package/dist/Editor/Elements/Form/Workflow/UserInputs.js +4 -2
- package/dist/Editor/Elements/Form/Workflow/index.js +15 -9
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +21 -4
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +6 -2
- package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +6 -2
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +8 -3
- package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +3 -2
- package/dist/Editor/Elements/FreeGrid/Options/More.js +4 -3
- package/dist/Editor/Elements/Grid/Grid.js +13 -10
- package/dist/Editor/Elements/Grid/GridButton.js +9 -5
- package/dist/Editor/Elements/Grid/GridItem.js +13 -7
- package/dist/Editor/Elements/Grid/GridItemPopup.js +4 -1
- package/dist/Editor/Elements/Grid/GridPopup.js +4 -1
- package/dist/Editor/Elements/Grid/SectionPopup.js +4 -1
- package/dist/Editor/Elements/Link/Link.js +8 -5
- package/dist/Editor/Elements/Link/LinkButton.js +4 -1
- package/dist/Editor/Elements/List/CheckList.js +14 -9
- package/dist/Editor/Elements/NewLine/NewLineButton.js +6 -2
- package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +4 -1
- package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +4 -1
- package/dist/Editor/Elements/Search/SearchButton.js +6 -3
- package/dist/Editor/Elements/Search/SearchList.js +7 -3
- package/dist/Editor/Elements/Signature/SignatureButton.js +6 -2
- package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +6 -2
- package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +4 -1
- package/dist/Editor/Elements/Signature/SignaturePopup.js +17 -16
- package/dist/Editor/Elements/SimpleText/index.js +5 -4
- package/dist/Editor/Elements/Table/DragButton.js +4 -2
- package/dist/Editor/Elements/Table/Table.js +21 -9
- package/dist/Editor/Elements/Table/TablePopup.js +4 -1
- package/dist/Editor/Elements/Table/TableSelector.js +10 -6
- package/dist/Editor/Elements/Table/TableTool.js +8 -4
- package/dist/Editor/Elements/TopBanner/TopBannerButton.js +4 -1
- package/dist/Editor/MiniEditor.js +9 -3
- package/dist/Editor/Toolbar/Basic/index.js +2 -1
- package/dist/Editor/Toolbar/FormatTools/BlockButton.js +6 -2
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +6 -2
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +17 -5
- package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +10 -5
- package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +10 -4
- package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +10 -4
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +6 -2
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +42 -35
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +58 -51
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +29 -22
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +87 -73
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +14 -7
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +8 -4
- package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +11 -5
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +29 -21
- package/dist/Editor/Toolbar/PopupTool/index.js +17 -1
- package/dist/Editor/Toolbar/Toolbar.js +20 -10
- package/dist/Editor/common/CustomDialog/index.js +8 -10
- package/dist/Editor/common/ImageSelector/ImageSelector.js +10 -8
- package/dist/Editor/common/ImageSelector/Options/AddLink.js +6 -4
- package/dist/Editor/common/LinkSettings/NavComponents.js +14 -10
- package/dist/Editor/common/LinkSettings/index.js +20 -14
- package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
- package/dist/Editor/common/MentionsPopup/index.js +6 -2
- package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -22
- package/dist/Editor/common/RnD/ContextMenu/index.js +3 -2
- package/dist/Editor/common/RnD/ElementOptions/index.js +7 -2
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +8 -3
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +5 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +4 -2
- package/dist/Editor/common/RnD/OptionsPopup/index.js +4 -3
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +4 -3
- package/dist/Editor/common/RnD/index.js +11 -4
- package/dist/Editor/common/Section/index.js +7 -4
- package/dist/Editor/common/Shorthands/elements.js +18 -3
- package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
- package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
- package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
- package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +13 -9
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +6 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +7 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +6 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +11 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +9 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +10 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +5 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +9 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +8 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +12 -11
- package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +8 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +6 -5
- package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
- package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
- package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
- package/dist/Editor/common/StyleBuilder/index.js +8 -5
- package/dist/Editor/common/Uploader.js +8 -5
- package/dist/Editor/helper/index.js +27 -3
- package/dist/Editor/plugins/withLayout.js +3 -2
- package/dist/Editor/plugins/withLinks.js +10 -0
- package/dist/Editor/utils/SlateUtilityFunctions.js +15 -9
- package/dist/Editor/utils/brains.js +1 -2
- package/dist/Editor/utils/freegrid.js +1 -1
- package/dist/Editor/utils/helper.js +2 -2
- package/package.json +1 -1
@@ -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
|
};
|
@@ -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,
|
@@ -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",
|
@@ -35,7 +36,7 @@ const ToolBar = ({
|
|
35
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,7 +77,8 @@ const VideoPlaceholder = props => {
|
|
77
77
|
readOnly,
|
78
78
|
onSettings,
|
79
79
|
classes,
|
80
|
-
type
|
80
|
+
type,
|
81
|
+
translation
|
81
82
|
} = props;
|
82
83
|
return !url ? !readOnly ? /*#__PURE__*/_jsxs(Box, {
|
83
84
|
component: "button",
|
@@ -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
|
+
}), TYPE_LABELS[type] || translation("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,
|
@@ -32,7 +32,8 @@ const Form = props => {
|
|
32
32
|
page_id,
|
33
33
|
onFormSubmit = () => {},
|
34
34
|
tagName = "Pages",
|
35
|
-
isIframe = false
|
35
|
+
isIframe = false,
|
36
|
+
translation
|
36
37
|
} = customProps;
|
37
38
|
const {
|
38
39
|
buttonProps,
|
@@ -313,7 +314,7 @@ const Form = props => {
|
|
313
314
|
textAlign: "left"
|
314
315
|
},
|
315
316
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
316
|
-
title: "Form Settings",
|
317
|
+
title: translation("Form Settings"),
|
317
318
|
arrow: true,
|
318
319
|
children: /*#__PURE__*/_jsx(IconButton, {
|
319
320
|
onClick: onSettings,
|
@@ -321,7 +322,7 @@ const Form = props => {
|
|
321
322
|
children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
|
322
323
|
})
|
323
324
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
324
|
-
title: "Add Form Field",
|
325
|
+
title: translation("Add Form Field"),
|
325
326
|
arrow: true,
|
326
327
|
children: /*#__PURE__*/_jsx(IconButton, {
|
327
328
|
onClick: onAddFormField,
|
@@ -329,7 +330,7 @@ const Form = props => {
|
|
329
330
|
children: /*#__PURE__*/_jsx(GridAddSectionIcon, {})
|
330
331
|
})
|
331
332
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
332
|
-
title: "Delete Form",
|
333
|
+
title: translation("Delete Form"),
|
333
334
|
arrow: true,
|
334
335
|
children: /*#__PURE__*/_jsx(IconButton, {
|
335
336
|
onClick: onDelete,
|
@@ -337,7 +338,7 @@ const Form = props => {
|
|
337
338
|
children: /*#__PURE__*/_jsx(DeleteIcon, {})
|
338
339
|
})
|
339
340
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
340
|
-
title: "Workflow",
|
341
|
+
title: translation("Workflow"),
|
341
342
|
arrow: true,
|
342
343
|
children: /*#__PURE__*/_jsx(IconButton, {
|
343
344
|
className: "svg-big-btn",
|
@@ -521,12 +522,14 @@ const Form = props => {
|
|
521
522
|
element: element,
|
522
523
|
onSave: onSave,
|
523
524
|
onClose: onClose,
|
524
|
-
customProps: customProps
|
525
|
+
customProps: customProps,
|
526
|
+
translation: translation
|
525
527
|
}) : null, /*#__PURE__*/_jsx(Workflow, {
|
526
528
|
openWorkflow: openWorkflow,
|
527
529
|
element: element,
|
528
530
|
closeWorkflow: closeWorkflow,
|
529
|
-
onSave: onSave
|
531
|
+
onSave: onSave,
|
532
|
+
customProps: customProps
|
530
533
|
}), !readOnly && !isIframe ? /*#__PURE__*/_jsxs(Menu, {
|
531
534
|
className: "editor-btn-options",
|
532
535
|
open: anchorEl !== null,
|
@@ -536,7 +539,7 @@ const Form = props => {
|
|
536
539
|
children: [/*#__PURE__*/_jsx(MenuItem, {
|
537
540
|
onClick: onMenuClick("edit"),
|
538
541
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
539
|
-
title: "Button Settings",
|
542
|
+
title: translation("Button Settings"),
|
540
543
|
arrow: true,
|
541
544
|
children: /*#__PURE__*/_jsx(IconButton, {
|
542
545
|
children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
|
@@ -545,7 +548,7 @@ const Form = props => {
|
|
545
548
|
}), /*#__PURE__*/_jsx(MenuItem, {
|
546
549
|
onClick: onMenuClick("test"),
|
547
550
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
548
|
-
title: "Test Submit",
|
551
|
+
title: translation("Test Submit"),
|
549
552
|
arrow: true,
|
550
553
|
children: /*#__PURE__*/_jsx(IconButton, {
|
551
554
|
children: /*#__PURE__*/_jsx(BackupIcon, {})
|
@@ -5,14 +5,18 @@ import ToolbarIcon from "../../common/ToolbarIcon";
|
|
5
5
|
import Icon from "../../common/Icon";
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
7
|
const FormButton = ({
|
8
|
-
icoBtnType
|
8
|
+
icoBtnType,
|
9
|
+
customProps
|
9
10
|
}) => {
|
11
|
+
const {
|
12
|
+
translation
|
13
|
+
} = customProps;
|
10
14
|
const editor = useSlateStatic();
|
11
15
|
const onClick = () => {
|
12
16
|
insertForm(editor);
|
13
17
|
};
|
14
18
|
return /*#__PURE__*/_jsx(ToolbarIcon, {
|
15
|
-
title: "Form",
|
19
|
+
title: translation("Form"),
|
16
20
|
onClick: onClick,
|
17
21
|
icon: /*#__PURE__*/_jsx(Icon, {
|
18
22
|
icon: "form"
|
@@ -8,11 +8,12 @@ const FormPopup = props => {
|
|
8
8
|
element,
|
9
9
|
onSave,
|
10
10
|
onClose,
|
11
|
-
customProps
|
11
|
+
customProps,
|
12
|
+
translation
|
12
13
|
} = props;
|
13
14
|
return /*#__PURE__*/_jsx(_Fragment, {
|
14
15
|
children: /*#__PURE__*/_jsx(StyleBuilder, {
|
15
|
-
title: "Form",
|
16
|
+
title: translation("Form"),
|
16
17
|
type: "formStyle",
|
17
18
|
element: element,
|
18
19
|
onSave: onSave,
|
@@ -22,8 +22,12 @@ const FormWorkflow = props => {
|
|
22
22
|
setBodyData,
|
23
23
|
handleSelectedVariables,
|
24
24
|
handleInputReset,
|
25
|
-
classes
|
25
|
+
classes,
|
26
|
+
customProps
|
26
27
|
} = props;
|
28
|
+
const {
|
29
|
+
translation
|
30
|
+
} = customProps;
|
27
31
|
const [anchorEl, setAnchorEl] = useState(null);
|
28
32
|
const variables = element?.children;
|
29
33
|
const type = 1;
|
@@ -60,10 +64,10 @@ const FormWorkflow = props => {
|
|
60
64
|
xs: 12,
|
61
65
|
children: [/*#__PURE__*/_jsx(Typography, {
|
62
66
|
sx: classes.subHeadings,
|
63
|
-
children: "
|
67
|
+
children: translation("setTimingText")
|
64
68
|
}), /*#__PURE__*/_jsx(Typography, {
|
65
69
|
sx: classes.infoText,
|
66
|
-
children: "
|
70
|
+
children: translation("setTimingHelperText")
|
67
71
|
})]
|
68
72
|
}), /*#__PURE__*/_jsx(Grid, {
|
69
73
|
item: true,
|
@@ -80,7 +84,7 @@ const FormWorkflow = props => {
|
|
80
84
|
defaultValue: 1,
|
81
85
|
children: [/*#__PURE__*/_jsx(FormControlLabel, {
|
82
86
|
value: "immediately",
|
83
|
-
label: "Immediately",
|
87
|
+
label: translation("Immediately"),
|
84
88
|
onChange: () => {
|
85
89
|
setSchedule("immediately");
|
86
90
|
},
|
@@ -89,7 +93,7 @@ const FormWorkflow = props => {
|
|
89
93
|
})
|
90
94
|
}), /*#__PURE__*/_jsx(FormControlLabel, {
|
91
95
|
value: "after",
|
92
|
-
label: "After",
|
96
|
+
label: translation("After"),
|
93
97
|
onChange: () => {
|
94
98
|
setSchedule("after");
|
95
99
|
},
|
@@ -136,15 +140,15 @@ const FormWorkflow = props => {
|
|
136
140
|
children: [/*#__PURE__*/_jsx(MenuItem, {
|
137
141
|
sx: classes.selectList,
|
138
142
|
value: "minutes",
|
139
|
-
children: "Minutes"
|
143
|
+
children: translation("Minutes")
|
140
144
|
}), /*#__PURE__*/_jsx(MenuItem, {
|
141
145
|
sx: classes.selectList,
|
142
146
|
value: "hours",
|
143
|
-
children: "Hours"
|
147
|
+
children: translation("Hours")
|
144
148
|
}), /*#__PURE__*/_jsx(MenuItem, {
|
145
149
|
sx: classes.selectList,
|
146
150
|
value: "days",
|
147
|
-
children: "Day"
|
151
|
+
children: translation("Day")
|
148
152
|
})]
|
149
153
|
})
|
150
154
|
})
|
@@ -157,7 +161,7 @@ const FormWorkflow = props => {
|
|
157
161
|
xs: 12,
|
158
162
|
children: [/*#__PURE__*/_jsx(Typography, {
|
159
163
|
sx: classes.formHeadings,
|
160
|
-
children: "
|
164
|
+
children: translation("subjectText")
|
161
165
|
}), /*#__PURE__*/_jsx(TextField, {
|
162
166
|
multiline: true,
|
163
167
|
margin: "none",
|
@@ -192,7 +196,7 @@ const FormWorkflow = props => {
|
|
192
196
|
sx: classes.variableBtn,
|
193
197
|
onClick: handleVariables,
|
194
198
|
endIcon: /*#__PURE__*/_jsx(KeyboardArrowDownIcon, {}),
|
195
|
-
children: "Variables"
|
199
|
+
children: translation("Variables")
|
196
200
|
}), /*#__PURE__*/_jsx(Menu, {
|
197
201
|
id: "basic-menu",
|
198
202
|
open: Boolean(anchorEl),
|
@@ -222,7 +226,7 @@ const FormWorkflow = props => {
|
|
222
226
|
xs: 12,
|
223
227
|
children: [/*#__PURE__*/_jsx(Typography, {
|
224
228
|
sx: classes.formHeadings,
|
225
|
-
children: "
|
229
|
+
children: translation("bodyText")
|
226
230
|
}), /*#__PURE__*/_jsx(UserInputs, {
|
227
231
|
element: element,
|
228
232
|
type: 2,
|
@@ -230,7 +234,9 @@ const FormWorkflow = props => {
|
|
230
234
|
handleField: handleBodyField,
|
231
235
|
onSave: onSaveBodyField,
|
232
236
|
handleSelectedVariables: handleSelectedVariables,
|
233
|
-
handleInputReset: handleInputReset
|
237
|
+
handleInputReset: handleInputReset,
|
238
|
+
customProps: customProps,
|
239
|
+
translation: translation
|
234
240
|
})]
|
235
241
|
})]
|
236
242
|
});
|