@flozy/editor 9.1.4 → 9.1.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 +20 -9
- 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 +4 -1
- package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +6 -2
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +6 -2
- 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 +13 -5
- 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 +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 +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 +28 -14
- 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/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 +3 -2
- 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 +21 -4
- 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 +19 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +7 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +10 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +7 -3
- 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 +4 -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 +4 -3
- package/dist/Editor/common/Uploader.js +8 -5
- package/dist/Editor/plugins/withLayout.js +3 -2
- package/dist/Editor/utils/SlateUtilityFunctions.js +12 -8
- package/package.json +1 -1
@@ -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,
|
@@ -308,7 +311,8 @@ const Image = props => {
|
|
308
311
|
onSettings: onSettings,
|
309
312
|
setOpenNav: setOpenNav,
|
310
313
|
topM: size.width < 100,
|
311
|
-
classes: classes
|
314
|
+
classes: classes,
|
315
|
+
translation: translation
|
312
316
|
}), /*#__PURE__*/_jsx(ImageContent, {
|
313
317
|
...element,
|
314
318
|
readOnly: readOnly,
|
@@ -317,7 +321,8 @@ const Image = props => {
|
|
317
321
|
onTouchEnd: onTouchEnd,
|
318
322
|
path: path,
|
319
323
|
theme: theme,
|
320
|
-
classes: classes
|
324
|
+
classes: classes,
|
325
|
+
translation: translation
|
321
326
|
}), url && frames[frame] ? /*#__PURE__*/_jsx(Box, {
|
322
327
|
component: "div",
|
323
328
|
className: "image-frame",
|
@@ -71,7 +71,8 @@ const VideoPlaceholder = props => {
|
|
71
71
|
url,
|
72
72
|
readOnly,
|
73
73
|
onSettings,
|
74
|
-
classes
|
74
|
+
classes,
|
75
|
+
translation
|
75
76
|
} = props;
|
76
77
|
return !url ? !readOnly ? /*#__PURE__*/_jsxs(Box, {
|
77
78
|
component: "button",
|
@@ -82,7 +83,7 @@ const VideoPlaceholder = props => {
|
|
82
83
|
},
|
83
84
|
children: [/*#__PURE__*/_jsx(Icon, {
|
84
85
|
icon: "video"
|
85
|
-
}), "Embed Video or Other"]
|
86
|
+
}), translation("Embed Video or Other")]
|
86
87
|
}) : /*#__PURE__*/_jsxs(Box, {
|
87
88
|
sx: {
|
88
89
|
color: "#64748B !important",
|
@@ -94,7 +95,7 @@ const VideoPlaceholder = props => {
|
|
94
95
|
className: "element-empty-btn",
|
95
96
|
children: [/*#__PURE__*/_jsx(Icon, {
|
96
97
|
icon: "shieldNoAccess"
|
97
|
-
}), "
|
98
|
+
}), translation("contentNotAvilable")]
|
98
99
|
}) : /*#__PURE__*/_jsx(VideoContent, {
|
99
100
|
...props
|
100
101
|
});
|
@@ -119,7 +120,8 @@ const Video = ({
|
|
119
120
|
const [openSetttings, setOpenSettings] = useState(false);
|
120
121
|
const [parentDOM, setParentDOM] = useState(null);
|
121
122
|
const {
|
122
|
-
readOnly
|
123
|
+
readOnly,
|
124
|
+
translation
|
123
125
|
} = customProps;
|
124
126
|
const {
|
125
127
|
vertical,
|
@@ -165,14 +167,14 @@ const Video = ({
|
|
165
167
|
className: "element-toolbar visible-on-hover",
|
166
168
|
contentEditable: false,
|
167
169
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
168
|
-
title: "Video Settings",
|
170
|
+
title: translation("Video Settings"),
|
169
171
|
arrow: true,
|
170
172
|
children: /*#__PURE__*/_jsx(IconButton, {
|
171
173
|
onClick: onSettings,
|
172
174
|
children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
|
173
175
|
})
|
174
176
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
175
|
-
title: "Delete Video",
|
177
|
+
title: translation("Delete Video"),
|
176
178
|
arrow: true,
|
177
179
|
children: /*#__PURE__*/_jsx(IconButton, {
|
178
180
|
onClick: onDelete,
|
@@ -278,7 +280,8 @@ const Video = ({
|
|
278
280
|
url: url,
|
279
281
|
readOnly: readOnly,
|
280
282
|
resizing: resizing,
|
281
|
-
classes: classes
|
283
|
+
classes: classes,
|
284
|
+
translation: translation
|
282
285
|
}), !readOnly && url ? /*#__PURE__*/_jsx(IconButton, {
|
283
286
|
onPointerDown: onMouseDown,
|
284
287
|
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,
|
@@ -21,8 +21,12 @@ const FormWorkflow = props => {
|
|
21
21
|
setBodyData,
|
22
22
|
handleSelectedVariables,
|
23
23
|
handleInputReset,
|
24
|
-
classes
|
24
|
+
classes,
|
25
|
+
customProps
|
25
26
|
} = props;
|
27
|
+
const {
|
28
|
+
translation
|
29
|
+
} = customProps;
|
26
30
|
const [anchorEl, setAnchorEl] = useState(null);
|
27
31
|
const variables = element?.children;
|
28
32
|
const type = 1;
|
@@ -57,10 +61,10 @@ const FormWorkflow = props => {
|
|
57
61
|
xs: 12,
|
58
62
|
children: [/*#__PURE__*/_jsx(Typography, {
|
59
63
|
sx: classes.subHeadings,
|
60
|
-
children: "
|
64
|
+
children: translation("setTimingText")
|
61
65
|
}), /*#__PURE__*/_jsx(Typography, {
|
62
66
|
sx: classes.infoText,
|
63
|
-
children: "
|
67
|
+
children: translation("setTimingHelperText")
|
64
68
|
})]
|
65
69
|
}), /*#__PURE__*/_jsx(Grid, {
|
66
70
|
item: true,
|
@@ -77,7 +81,7 @@ const FormWorkflow = props => {
|
|
77
81
|
defaultValue: 1,
|
78
82
|
children: [/*#__PURE__*/_jsx(FormControlLabel, {
|
79
83
|
value: "immediately",
|
80
|
-
label: "Immediately",
|
84
|
+
label: translation("Immediately"),
|
81
85
|
onChange: () => {
|
82
86
|
setSchedule("immediately");
|
83
87
|
},
|
@@ -86,7 +90,7 @@ const FormWorkflow = props => {
|
|
86
90
|
})
|
87
91
|
}), /*#__PURE__*/_jsx(FormControlLabel, {
|
88
92
|
value: "after",
|
89
|
-
label: "After",
|
93
|
+
label: translation("After"),
|
90
94
|
onChange: () => {
|
91
95
|
setSchedule("after");
|
92
96
|
},
|
@@ -133,15 +137,15 @@ const FormWorkflow = props => {
|
|
133
137
|
children: [/*#__PURE__*/_jsx(MenuItem, {
|
134
138
|
sx: classes.selectList,
|
135
139
|
value: "minutes",
|
136
|
-
children: "Minutes"
|
140
|
+
children: translation("Minutes")
|
137
141
|
}), /*#__PURE__*/_jsx(MenuItem, {
|
138
142
|
sx: classes.selectList,
|
139
143
|
value: "hours",
|
140
|
-
children: "Hours"
|
144
|
+
children: translation("Hours")
|
141
145
|
}), /*#__PURE__*/_jsx(MenuItem, {
|
142
146
|
sx: classes.selectList,
|
143
147
|
value: "days",
|
144
|
-
children: "Day"
|
148
|
+
children: translation("Day")
|
145
149
|
})]
|
146
150
|
})
|
147
151
|
})
|
@@ -154,7 +158,7 @@ const FormWorkflow = props => {
|
|
154
158
|
xs: 12,
|
155
159
|
children: [/*#__PURE__*/_jsx(Typography, {
|
156
160
|
sx: classes.formHeadings,
|
157
|
-
children: "
|
161
|
+
children: translation("subjectText")
|
158
162
|
}), /*#__PURE__*/_jsx(TextField, {
|
159
163
|
multiline: true,
|
160
164
|
margin: "none",
|
@@ -189,7 +193,7 @@ const FormWorkflow = props => {
|
|
189
193
|
sx: classes.variableBtn,
|
190
194
|
onClick: handleVariables,
|
191
195
|
endIcon: /*#__PURE__*/_jsx(KeyboardArrowDownIcon, {}),
|
192
|
-
children: "Variables"
|
196
|
+
children: translation("Variables")
|
193
197
|
}), /*#__PURE__*/_jsx(Menu, {
|
194
198
|
id: "basic-menu",
|
195
199
|
open: Boolean(anchorEl),
|
@@ -219,7 +223,7 @@ const FormWorkflow = props => {
|
|
219
223
|
xs: 12,
|
220
224
|
children: [/*#__PURE__*/_jsx(Typography, {
|
221
225
|
sx: classes.formHeadings,
|
222
|
-
children: "
|
226
|
+
children: translation("bodyText")
|
223
227
|
}), /*#__PURE__*/_jsx(UserInputs, {
|
224
228
|
element: element,
|
225
229
|
type: 2,
|
@@ -227,7 +231,9 @@ const FormWorkflow = props => {
|
|
227
231
|
handleField: handleBodyField,
|
228
232
|
onSave: onSaveBodyField,
|
229
233
|
handleSelectedVariables: handleSelectedVariables,
|
230
|
-
handleInputReset: handleInputReset
|
234
|
+
handleInputReset: handleInputReset,
|
235
|
+
customProps: customProps,
|
236
|
+
translation: translation
|
231
237
|
})]
|
232
238
|
})]
|
233
239
|
});
|
@@ -2,16 +2,20 @@ import React from "react";
|
|
2
2
|
import { Grid, Typography } from "@mui/material";
|
3
3
|
import FormStyles from "./Styles";
|
4
4
|
import MoreOptions from "./MoreOptions";
|
5
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
7
7
|
const ListWorkflow = props => {
|
8
8
|
const {
|
9
9
|
workflow,
|
10
10
|
handleEditFormWorkflow,
|
11
|
-
handleDeleteFormWorkflow
|
11
|
+
handleDeleteFormWorkflow,
|
12
|
+
customProps
|
12
13
|
} = props;
|
13
14
|
const classes = FormStyles();
|
14
15
|
const optionsList = ["Edit", "Delete"];
|
16
|
+
const {
|
17
|
+
translation
|
18
|
+
} = customProps;
|
15
19
|
const onMenuClick = (selectedMenu, selectedFlow) => () => {
|
16
20
|
if (selectedMenu === "Edit") {
|
17
21
|
handleEditFormWorkflow(selectedFlow);
|
@@ -32,12 +36,12 @@ const ListWorkflow = props => {
|
|
32
36
|
children: [/*#__PURE__*/_jsx(Grid, {
|
33
37
|
item: true,
|
34
38
|
sx: classes.emailIndexCard,
|
35
|
-
children: /*#__PURE__*/
|
39
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
36
40
|
sx: {
|
37
41
|
fontSize: "12px",
|
38
42
|
fontWeight: 600
|
39
43
|
},
|
40
|
-
children:
|
44
|
+
children: `${translation("Email")} ${index + 1}`
|
41
45
|
})
|
42
46
|
}), /*#__PURE__*/_jsx(Grid, {
|
43
47
|
item: true,
|
@@ -63,7 +67,7 @@ const ListWorkflow = props => {
|
|
63
67
|
item: true,
|
64
68
|
children: /*#__PURE__*/_jsx(Typography, {
|
65
69
|
sx: classes.listHeading,
|
66
|
-
children: "
|
70
|
+
children: translation("subjectTextColon")
|
67
71
|
})
|
68
72
|
}), /*#__PURE__*/_jsx(Grid, {
|
69
73
|
item: true,
|
@@ -86,7 +90,7 @@ const ListWorkflow = props => {
|
|
86
90
|
item: true,
|
87
91
|
children: /*#__PURE__*/_jsx(Typography, {
|
88
92
|
sx: classes.listHeading,
|
89
|
-
children: "
|
93
|
+
children: translation("bodyTextColon")
|
90
94
|
})
|
91
95
|
}), /*#__PURE__*/_jsx(Grid, {
|
92
96
|
item: true,
|
@@ -109,7 +113,7 @@ const ListWorkflow = props => {
|
|
109
113
|
item: true,
|
110
114
|
children: /*#__PURE__*/_jsx(Typography, {
|
111
115
|
sx: classes.listHeading,
|
112
|
-
children: "
|
116
|
+
children: translation("sheduleText")
|
113
117
|
})
|
114
118
|
}), /*#__PURE__*/_jsx(Grid, {
|
115
119
|
item: true,
|
@@ -146,7 +150,8 @@ const ListWorkflow = props => {
|
|
146
150
|
classes: classes,
|
147
151
|
menus: optionsList,
|
148
152
|
selectedFlow: index,
|
149
|
-
onMenuClick: onMenuClick
|
153
|
+
onMenuClick: onMenuClick,
|
154
|
+
translation: translation
|
150
155
|
})
|
151
156
|
})]
|
152
157
|
})
|
@@ -9,7 +9,8 @@ function MoreOptions(props) {
|
|
9
9
|
classes,
|
10
10
|
menus,
|
11
11
|
onMenuClick,
|
12
|
-
selectedFlow
|
12
|
+
selectedFlow,
|
13
|
+
translation
|
13
14
|
} = props;
|
14
15
|
|
15
16
|
//state
|
@@ -52,7 +53,7 @@ function MoreOptions(props) {
|
|
52
53
|
paddingRight: "100px"
|
53
54
|
},
|
54
55
|
onClick: onMenuClick(m, selectedFlow),
|
55
|
-
children: m
|
56
|
+
children: translation(m)
|
56
57
|
}, `menu_${i}_${m}`))
|
57
58
|
})]
|
58
59
|
});
|