@flozy/editor 9.1.3 → 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/Theme/ViewportStimulator.js +25 -7
- 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
@@ -16,7 +16,8 @@ const SaveAsTemplate = props => {
|
|
16
16
|
elementProps,
|
17
17
|
handleClose,
|
18
18
|
saveText = "Save As Template",
|
19
|
-
closeText = ""
|
19
|
+
closeText = "",
|
20
|
+
translation
|
20
21
|
} = props;
|
21
22
|
const {
|
22
23
|
onSaveTemplate
|
@@ -93,7 +94,7 @@ const SaveAsTemplate = props => {
|
|
93
94
|
name: "title",
|
94
95
|
value: template?.title,
|
95
96
|
onChange: onChange,
|
96
|
-
placeholder: "Template Title",
|
97
|
+
placeholder: translation("Template Title"),
|
97
98
|
fullWidth: true,
|
98
99
|
size: "small"
|
99
100
|
})
|
@@ -114,7 +115,7 @@ const SaveAsTemplate = props => {
|
|
114
115
|
sx: {
|
115
116
|
fontSize: "14px"
|
116
117
|
},
|
117
|
-
children: "Element"
|
118
|
+
children: translation("Element")
|
118
119
|
})
|
119
120
|
}), /*#__PURE__*/_jsx(MenuItem, {
|
120
121
|
value: "Section",
|
@@ -124,7 +125,7 @@ const SaveAsTemplate = props => {
|
|
124
125
|
sx: {
|
125
126
|
fontSize: "14px"
|
126
127
|
},
|
127
|
-
children: "Section"
|
128
|
+
children: translation("Section")
|
128
129
|
})
|
129
130
|
}), /*#__PURE__*/_jsx(MenuItem, {
|
130
131
|
value: "Template",
|
@@ -134,7 +135,7 @@ const SaveAsTemplate = props => {
|
|
134
135
|
sx: {
|
135
136
|
fontSize: "14px"
|
136
137
|
},
|
137
|
-
children: "Template"
|
138
|
+
children: translation("Template")
|
138
139
|
})
|
139
140
|
})]
|
140
141
|
})
|
@@ -144,7 +145,7 @@ const SaveAsTemplate = props => {
|
|
144
145
|
children: /*#__PURE__*/_jsx(TextField, {
|
145
146
|
fullWidth: true,
|
146
147
|
name: "category",
|
147
|
-
placeholder: "Category",
|
148
|
+
placeholder: translation("Category"),
|
148
149
|
value: template?.category,
|
149
150
|
onChange: onChange,
|
150
151
|
size: "small"
|
@@ -166,7 +167,7 @@ const SaveAsTemplate = props => {
|
|
166
167
|
sx: {
|
167
168
|
...classes.gradientFillBtn
|
168
169
|
},
|
169
|
-
children: ["Upload file", /*#__PURE__*/_jsx("input", {
|
170
|
+
children: [translation("Upload file"), /*#__PURE__*/_jsx("input", {
|
170
171
|
type: "file",
|
171
172
|
style: {
|
172
173
|
opacity: 0,
|
@@ -184,10 +185,10 @@ const SaveAsTemplate = props => {
|
|
184
185
|
}), " ", /*#__PURE__*/_jsx(Typography, {
|
185
186
|
variant: "body1",
|
186
187
|
color: "primary",
|
187
|
-
children: "Remove"
|
188
|
+
children: translation("Remove")
|
188
189
|
})]
|
189
190
|
})]
|
190
|
-
}), uploading ? "Uploading..." : "", /*#__PURE__*/_jsx(Grid, {
|
191
|
+
}), uploading ? translation("Uploading...") : "", /*#__PURE__*/_jsx(Grid, {
|
191
192
|
item: true,
|
192
193
|
xs: 12,
|
193
194
|
style: {
|
@@ -216,7 +217,7 @@ const SaveAsTemplate = props => {
|
|
216
217
|
}
|
217
218
|
// variant="contained"
|
218
219
|
,
|
219
|
-
children: saveText
|
220
|
+
children: translation(saveText)
|
220
221
|
}), closeText ? /*#__PURE__*/_jsx(Button, {
|
221
222
|
className: "closebtn",
|
222
223
|
onClick: handleSave,
|
@@ -224,7 +225,7 @@ const SaveAsTemplate = props => {
|
|
224
225
|
fontWeight: 700
|
225
226
|
},
|
226
227
|
variant: "contained",
|
227
|
-
children: closeText
|
228
|
+
children: translation(closeText)
|
228
229
|
}) : null]
|
229
230
|
})]
|
230
231
|
});
|
@@ -10,8 +10,12 @@ const SelectBox = props => {
|
|
10
10
|
value,
|
11
11
|
data,
|
12
12
|
onChange,
|
13
|
-
elementProps
|
13
|
+
elementProps,
|
14
|
+
customProps
|
14
15
|
} = props;
|
16
|
+
const {
|
17
|
+
translation
|
18
|
+
} = customProps;
|
15
19
|
const {
|
16
20
|
key,
|
17
21
|
placeholder
|
@@ -59,7 +63,7 @@ const SelectBox = props => {
|
|
59
63
|
className: "unCheckedIcon"
|
60
64
|
})
|
61
65
|
}),
|
62
|
-
label: placeholder
|
66
|
+
label: translation(placeholder)
|
63
67
|
}), /*#__PURE__*/_jsx(FormHelperText, {
|
64
68
|
children: data?.helperText
|
65
69
|
})]
|
@@ -6,8 +6,12 @@ const Text = props => {
|
|
6
6
|
const {
|
7
7
|
value: pro_value,
|
8
8
|
data,
|
9
|
-
onChange
|
9
|
+
onChange,
|
10
|
+
customProps
|
10
11
|
} = props;
|
12
|
+
const {
|
13
|
+
translation
|
14
|
+
} = customProps;
|
11
15
|
const {
|
12
16
|
key,
|
13
17
|
placeholder,
|
@@ -39,10 +43,10 @@ const Text = props => {
|
|
39
43
|
fontWeight: "500",
|
40
44
|
marginBottom: "8px"
|
41
45
|
},
|
42
|
-
children: data?.label
|
46
|
+
children: translation(data?.label)
|
43
47
|
}), /*#__PURE__*/_jsx(TextField, {
|
44
48
|
name: key,
|
45
|
-
placeholder: placeholder || "",
|
49
|
+
placeholder: placeholder && translation(placeholder) || "",
|
46
50
|
type: "text",
|
47
51
|
value: value,
|
48
52
|
onChange: handleChange,
|
@@ -50,7 +54,7 @@ const Text = props => {
|
|
50
54
|
fullWidth: true,
|
51
55
|
required: required,
|
52
56
|
error: error,
|
53
|
-
helperText: error ?
|
57
|
+
helperText: error ? translation("This field is required") : '',
|
54
58
|
sx: {
|
55
59
|
'& .MuiFormHelperText-root': {
|
56
60
|
color: '#d32f2f !important'
|
@@ -7,8 +7,12 @@ const TextAlign = props => {
|
|
7
7
|
const {
|
8
8
|
value,
|
9
9
|
data,
|
10
|
-
onChange
|
10
|
+
onChange,
|
11
|
+
customProps
|
11
12
|
} = props;
|
13
|
+
const {
|
14
|
+
translation
|
15
|
+
} = customProps;
|
12
16
|
const {
|
13
17
|
key,
|
14
18
|
label
|
@@ -31,7 +35,7 @@ const TextAlign = props => {
|
|
31
35
|
fontWeight: 500,
|
32
36
|
fontSize: "14px"
|
33
37
|
},
|
34
|
-
children: label || "Text Alignment"
|
38
|
+
children: translation(label) || translation("Text Alignment")
|
35
39
|
})
|
36
40
|
}), /*#__PURE__*/_jsxs(RadioGroup, {
|
37
41
|
row: true,
|
@@ -21,7 +21,8 @@ const TextOptions = props => {
|
|
21
21
|
customProps
|
22
22
|
} = props;
|
23
23
|
const {
|
24
|
-
metaMappings
|
24
|
+
metaMappings,
|
25
|
+
translation
|
25
26
|
} = customProps;
|
26
27
|
const {
|
27
28
|
key,
|
@@ -79,7 +80,7 @@ const TextOptions = props => {
|
|
79
80
|
fontWeight: "500",
|
80
81
|
marginBottom: "4px"
|
81
82
|
},
|
82
|
-
children: data?.label
|
83
|
+
children: translation(data?.label)
|
83
84
|
}), /*#__PURE__*/_jsx(FormControl, {
|
84
85
|
sx: {
|
85
86
|
"& .MuiSelect-select": {
|
@@ -92,7 +93,7 @@ const TextOptions = props => {
|
|
92
93
|
children: !webFont ? /*#__PURE__*/_jsx(Select, {
|
93
94
|
onChange: handleChange,
|
94
95
|
value: value || updatedOption[0]?.value,
|
95
|
-
placeholder: data?.label,
|
96
|
+
placeholder: translation(data?.label),
|
96
97
|
fullWidth: true,
|
97
98
|
size: "small",
|
98
99
|
style: {
|
@@ -107,7 +108,7 @@ const TextOptions = props => {
|
|
107
108
|
},
|
108
109
|
children: updatedOption?.map((m, i) => {
|
109
110
|
return m?.value === "listSubHeader" ? /*#__PURE__*/_jsx(ListSubheader, {
|
110
|
-
children: m?.label
|
111
|
+
children: translation(m?.label || m?.text)
|
111
112
|
}, `subHeader_${i}`) : /*#__PURE__*/_jsxs(MenuItem, {
|
112
113
|
value: m?.value,
|
113
114
|
item: m?.metaDataKey,
|
@@ -117,7 +118,7 @@ const TextOptions = props => {
|
|
117
118
|
minWidth: "25px"
|
118
119
|
},
|
119
120
|
children: m?.icon
|
120
|
-
}), renderOption ? renderOption(m, elementProps) : m
|
121
|
+
}), renderOption ? renderOption(m, elementProps, translation) : translation(m?.label || m?.text)]
|
121
122
|
}, `${key}_${i}`);
|
122
123
|
})
|
123
124
|
}) : /*#__PURE__*/_jsx(FontFamilyAutocomplete, {
|
@@ -16,7 +16,7 @@ export const formStyle = [{
|
|
16
16
|
label: "Send Form to Email",
|
17
17
|
key: "email",
|
18
18
|
type: "text",
|
19
|
-
placeholder: "
|
19
|
+
placeholder: "emailResponsePlaceHolder"
|
20
20
|
}, {
|
21
21
|
label: "Save Response",
|
22
22
|
key: "saveResponse",
|
@@ -93,9 +93,9 @@ export const formStyle = [{
|
|
93
93
|
text: "Dashed",
|
94
94
|
value: "dashed"
|
95
95
|
}],
|
96
|
-
renderOption: option => {
|
96
|
+
renderOption: (option, elementProps, translation) => {
|
97
97
|
return /*#__PURE__*/_jsx("span", {
|
98
|
-
children: option.text
|
98
|
+
children: translation(option.text)
|
99
99
|
});
|
100
100
|
}
|
101
101
|
}]
|
@@ -204,12 +204,12 @@ export const formStyle = [{
|
|
204
204
|
width: 5,
|
205
205
|
options: fontWeightOptions,
|
206
206
|
hideMetaDataOptions: true,
|
207
|
-
renderOption: option => {
|
207
|
+
renderOption: (option, elementProps, translation) => {
|
208
208
|
return /*#__PURE__*/_jsx("span", {
|
209
209
|
style: {
|
210
210
|
fontWeight: option.value
|
211
211
|
},
|
212
|
-
children: option.text
|
212
|
+
children: translation(option.text)
|
213
213
|
});
|
214
214
|
}
|
215
215
|
}]
|
@@ -277,9 +277,9 @@ export const formStyle = [{
|
|
277
277
|
text: "Dashed",
|
278
278
|
value: "dashed"
|
279
279
|
}],
|
280
|
-
renderOption: option => {
|
280
|
+
renderOption: (option, elementProps, translation) => {
|
281
281
|
return /*#__PURE__*/_jsx("span", {
|
282
|
-
children: option.text
|
282
|
+
children: translation(option.text)
|
283
283
|
});
|
284
284
|
}
|
285
285
|
}]
|
@@ -66,9 +66,9 @@ const gridItemStyle = [{
|
|
66
66
|
text: "Dashed",
|
67
67
|
value: "dashed"
|
68
68
|
}],
|
69
|
-
renderOption: option => {
|
69
|
+
renderOption: (option, elementProps, translation) => {
|
70
70
|
return /*#__PURE__*/_jsx("span", {
|
71
|
-
children: option.text
|
71
|
+
children: translation(option.text)
|
72
72
|
});
|
73
73
|
}
|
74
74
|
}]
|
@@ -96,9 +96,9 @@ const gridItemStyle = [{
|
|
96
96
|
text: "Full",
|
97
97
|
value: "100%"
|
98
98
|
}],
|
99
|
-
renderOption: option => {
|
99
|
+
renderOption: (option, elementProps, translation) => {
|
100
100
|
return /*#__PURE__*/_jsx("span", {
|
101
|
-
children: option.text
|
101
|
+
children: translation(option.text)
|
102
102
|
});
|
103
103
|
}
|
104
104
|
}]
|
@@ -122,9 +122,9 @@ const gridItemStyle = [{
|
|
122
122
|
text: "Bounce In Left",
|
123
123
|
value: "animate__animated animate__bounceInLeft"
|
124
124
|
}],
|
125
|
-
renderOption: option => {
|
125
|
+
renderOption: (option, elementProps, translation) => {
|
126
126
|
return /*#__PURE__*/_jsx("span", {
|
127
|
-
children: option.text
|
127
|
+
children: translation(option.text)
|
128
128
|
});
|
129
129
|
}
|
130
130
|
}]
|
@@ -6,7 +6,7 @@ const gridStyle = [{
|
|
6
6
|
label: "Section Name",
|
7
7
|
key: "id",
|
8
8
|
type: "text",
|
9
|
-
placeholder: "
|
9
|
+
placeholder: "sectionNamePlaceHolder"
|
10
10
|
}]
|
11
11
|
}, {
|
12
12
|
tab: "Colors",
|
@@ -85,9 +85,9 @@ const gridStyle = [{
|
|
85
85
|
text: "Dashed",
|
86
86
|
value: "dashed"
|
87
87
|
}],
|
88
|
-
renderOption: option => {
|
88
|
+
renderOption: (option, elementProps, translation) => {
|
89
89
|
return /*#__PURE__*/_jsx("span", {
|
90
|
-
children: option.text
|
90
|
+
children: translation(option.text)
|
91
91
|
});
|
92
92
|
}
|
93
93
|
}]
|
@@ -113,9 +113,9 @@ const gridStyle = [{
|
|
113
113
|
text: "No Wrap",
|
114
114
|
value: "nowrap"
|
115
115
|
}],
|
116
|
-
renderOption: option => {
|
116
|
+
renderOption: (option, elementProps, translation) => {
|
117
117
|
return /*#__PURE__*/_jsx("span", {
|
118
|
-
children: option.text
|
118
|
+
children: translation(option.text)
|
119
119
|
});
|
120
120
|
}
|
121
121
|
}]
|
@@ -77,7 +77,8 @@ const StyleBuilder = props => {
|
|
77
77
|
needActions: true
|
78
78
|
};
|
79
79
|
const {
|
80
|
-
hideTools
|
80
|
+
hideTools,
|
81
|
+
translation
|
81
82
|
} = customProps || {};
|
82
83
|
const muiTheme = createTheme({
|
83
84
|
components: {
|
@@ -242,12 +243,12 @@ const StyleBuilder = props => {
|
|
242
243
|
onClick: onDelete,
|
243
244
|
color: "error",
|
244
245
|
className: "deleteBtn",
|
245
|
-
children: "Delete"
|
246
|
+
children: translation("Delete")
|
246
247
|
}) : null, /*#__PURE__*/_jsx(Button, {
|
247
248
|
onClick: handleSave,
|
248
249
|
disabled: saveDisable,
|
249
250
|
className: "primaryBtn",
|
250
|
-
children: "Save"
|
251
|
+
children: translation("Save")
|
251
252
|
})]
|
252
253
|
}) : null]
|
253
254
|
});
|
@@ -41,6 +41,9 @@ const Uploader = props => {
|
|
41
41
|
onUploaded(result?.imageURL[0]);
|
42
42
|
}
|
43
43
|
};
|
44
|
+
const {
|
45
|
+
translation
|
46
|
+
} = customProps;
|
44
47
|
const onRemoveBG = () => {
|
45
48
|
setBase64(null);
|
46
49
|
onUploaded("none");
|
@@ -72,14 +75,14 @@ const Uploader = props => {
|
|
72
75
|
}), /*#__PURE__*/_jsx(Grid, {
|
73
76
|
className: "removeImageText",
|
74
77
|
onClick: onRemoveBG,
|
75
|
-
children: "
|
78
|
+
children: translation("Remove")
|
76
79
|
})]
|
77
80
|
});
|
78
81
|
default:
|
79
82
|
return /*#__PURE__*/_jsx(Grid, {
|
80
83
|
className: "removeImageText",
|
81
84
|
onClick: onRemoveBG,
|
82
|
-
children: "
|
85
|
+
children: translation("Remove")
|
83
86
|
});
|
84
87
|
}
|
85
88
|
};
|
@@ -87,7 +90,7 @@ const Uploader = props => {
|
|
87
90
|
children: [/*#__PURE__*/_jsx(Grid, {
|
88
91
|
item: true,
|
89
92
|
xs: 12,
|
90
|
-
children: uploading ? "
|
93
|
+
children: uploading ? translation("uploadingText") : ""
|
91
94
|
}), /*#__PURE__*/_jsx(Grid, {
|
92
95
|
container: true,
|
93
96
|
sx: classes.uploadContainer,
|
@@ -124,11 +127,11 @@ const Uploader = props => {
|
|
124
127
|
onChange: handleChange
|
125
128
|
}), /*#__PURE__*/_jsx(Icon, {
|
126
129
|
icon: "fileUpload"
|
127
|
-
}), /*#__PURE__*/
|
130
|
+
}), /*#__PURE__*/_jsx("span", {
|
128
131
|
style: {
|
129
132
|
paddingLeft: "8px"
|
130
133
|
},
|
131
|
-
children:
|
134
|
+
children: `${translation("upload")} ${translation(title) || translation("image")}`
|
132
135
|
})]
|
133
136
|
})
|
134
137
|
})
|
@@ -27,7 +27,8 @@ const ORDERS_LAYOUT_VALIDATIONS = {
|
|
27
27
|
};
|
28
28
|
const withLayout = editor => {
|
29
29
|
const {
|
30
|
-
normalizeNode
|
30
|
+
normalizeNode,
|
31
|
+
translation
|
31
32
|
} = editor;
|
32
33
|
editor.normalizeNode = ([node, path]) => {
|
33
34
|
if (path.length === 0) {
|
@@ -39,7 +40,7 @@ const withLayout = editor => {
|
|
39
40
|
const title = {
|
40
41
|
type: "title",
|
41
42
|
children: [{
|
42
|
-
text: ""
|
43
|
+
text: translation ? translation("Untitled") : "Untitled"
|
43
44
|
}]
|
44
45
|
};
|
45
46
|
Transforms.insertNodes(editor, title, {
|
@@ -379,10 +379,14 @@ export const getMarked = (leaf, children, theme) => {
|
|
379
379
|
export const getBlock = props => {
|
380
380
|
const {
|
381
381
|
element,
|
382
|
-
children
|
382
|
+
children,
|
383
|
+
customProps
|
383
384
|
} = props;
|
384
385
|
const attributes = props.attributes ?? {};
|
385
386
|
const isEmpty = isEmptyTextNode(element);
|
387
|
+
const {
|
388
|
+
translation
|
389
|
+
} = customProps;
|
386
390
|
const commonHeadingProps = () => ({
|
387
391
|
...attributes,
|
388
392
|
...element.attr,
|
@@ -397,37 +401,37 @@ export const getBlock = props => {
|
|
397
401
|
case "headingOne":
|
398
402
|
return /*#__PURE__*/_jsx("h1", {
|
399
403
|
...commonHeadingProps(),
|
400
|
-
placeholder: "Heading 1",
|
404
|
+
placeholder: translation("Heading 1"),
|
401
405
|
children: children
|
402
406
|
});
|
403
407
|
case "headingTwo":
|
404
408
|
return /*#__PURE__*/_jsx("h2", {
|
405
409
|
...commonHeadingProps(),
|
406
|
-
placeholder: "Heading 2",
|
410
|
+
placeholder: translation("Heading 2"),
|
407
411
|
children: children
|
408
412
|
});
|
409
413
|
case "headingThree":
|
410
414
|
return /*#__PURE__*/_jsx("h3", {
|
411
415
|
...commonHeadingProps(),
|
412
|
-
placeholder: "Heading 3",
|
416
|
+
placeholder: translation("Heading 3"),
|
413
417
|
children: children
|
414
418
|
});
|
415
419
|
case "headingFour":
|
416
420
|
return /*#__PURE__*/_jsx("h4", {
|
417
421
|
...commonHeadingProps(),
|
418
|
-
placeholder: "Heading 4",
|
422
|
+
placeholder: translation("Heading 4"),
|
419
423
|
children: children
|
420
424
|
});
|
421
425
|
case "headingFive":
|
422
426
|
return /*#__PURE__*/_jsx("h5", {
|
423
427
|
...commonHeadingProps(),
|
424
|
-
placeholder: "Heading 5",
|
428
|
+
placeholder: translation("Heading 5"),
|
425
429
|
children: children
|
426
430
|
});
|
427
431
|
case "headingSix":
|
428
432
|
return /*#__PURE__*/_jsx("h6", {
|
429
433
|
...commonHeadingProps(),
|
430
|
-
placeholder: "Heading 6",
|
434
|
+
placeholder: translation("Heading 6"),
|
431
435
|
children: children
|
432
436
|
});
|
433
437
|
case "paragraphOne":
|
@@ -513,7 +517,7 @@ export const getBlock = props => {
|
|
513
517
|
...attributes,
|
514
518
|
...element.attr,
|
515
519
|
className: `content-editable ${isEmpty ? "empty" : ""}`,
|
516
|
-
placeholder: "List",
|
520
|
+
placeholder: translation("List"),
|
517
521
|
style: {
|
518
522
|
color: firstChildren?.color
|
519
523
|
},
|