@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
@@ -8,8 +8,12 @@ const FontSize = props => {
|
|
8
8
|
const {
|
9
9
|
value,
|
10
10
|
data,
|
11
|
-
onChange
|
11
|
+
onChange,
|
12
|
+
customProps
|
12
13
|
} = props;
|
14
|
+
const {
|
15
|
+
translation
|
16
|
+
} = customProps;
|
13
17
|
const {
|
14
18
|
key,
|
15
19
|
width
|
@@ -58,7 +62,7 @@ const FontSize = props => {
|
|
58
62
|
fontSize: "14px",
|
59
63
|
fontWeight: "500"
|
60
64
|
},
|
61
|
-
children: data?.label
|
65
|
+
children: translation(data?.label)
|
62
66
|
})
|
63
67
|
}), /*#__PURE__*/_jsx(Grid, {
|
64
68
|
item: true,
|
@@ -8,8 +8,12 @@ const GridSize = props => {
|
|
8
8
|
const {
|
9
9
|
value: val,
|
10
10
|
data,
|
11
|
-
onChange
|
11
|
+
onChange,
|
12
|
+
customProps
|
12
13
|
} = props;
|
14
|
+
const {
|
15
|
+
translation
|
16
|
+
} = customProps;
|
13
17
|
const {
|
14
18
|
key
|
15
19
|
} = data;
|
@@ -34,7 +38,7 @@ const GridSize = props => {
|
|
34
38
|
fontWeight: 500,
|
35
39
|
marginBottom: "5px"
|
36
40
|
},
|
37
|
-
children: [data?.label || "Grid Size", ": ", value || 12]
|
41
|
+
children: [translation(data?.label) || translation("Grid Size"), ": ", value || 12]
|
38
42
|
}), /*#__PURE__*/_jsx("div", {
|
39
43
|
className: "sld-wrpr",
|
40
44
|
children: /*#__PURE__*/_jsx(Slider, {
|
@@ -12,6 +12,9 @@ const Icons = props => {
|
|
12
12
|
onChange,
|
13
13
|
customProps
|
14
14
|
} = props;
|
15
|
+
const {
|
16
|
+
translation
|
17
|
+
} = customProps;
|
15
18
|
const {
|
16
19
|
key
|
17
20
|
} = data;
|
@@ -58,7 +61,7 @@ const Icons = props => {
|
|
58
61
|
children: /*#__PURE__*/_jsx(TextField, {
|
59
62
|
fullWidth: true,
|
60
63
|
size: "small",
|
61
|
-
placeholder: "
|
64
|
+
placeholder: translation("searchIcons"),
|
62
65
|
value: val,
|
63
66
|
onChange: handleChange
|
64
67
|
})
|
@@ -70,7 +73,7 @@ const Icons = props => {
|
|
70
73
|
padding: "4px"
|
71
74
|
},
|
72
75
|
children: SelectedIcon ? /*#__PURE__*/_jsx(Tooltip, {
|
73
|
-
title: "
|
76
|
+
title: translation("clickToRemove"),
|
74
77
|
arrow: true,
|
75
78
|
children: /*#__PURE__*/_jsx(IconButton, {
|
76
79
|
onClick: onRemoveIcon,
|
@@ -14,6 +14,9 @@ const MenusArray = props => {
|
|
14
14
|
onChange,
|
15
15
|
customProps
|
16
16
|
} = props;
|
17
|
+
const {
|
18
|
+
translation
|
19
|
+
} = customProps;
|
17
20
|
const {
|
18
21
|
key
|
19
22
|
} = data;
|
@@ -79,7 +82,7 @@ const MenusArray = props => {
|
|
79
82
|
fontSize: "14px",
|
80
83
|
fontWeight: "500"
|
81
84
|
},
|
82
|
-
children: "Menu Variant"
|
85
|
+
children: translation("Menu Variant")
|
83
86
|
})
|
84
87
|
}), /*#__PURE__*/_jsxs(RadioGroup, {
|
85
88
|
row: true,
|
@@ -98,7 +101,7 @@ const MenusArray = props => {
|
|
98
101
|
sx: {
|
99
102
|
fontSize: "14px"
|
100
103
|
},
|
101
|
-
children: "Stacked"
|
104
|
+
children: translation("Stacked")
|
102
105
|
})
|
103
106
|
}), /*#__PURE__*/_jsx(FormControlLabel, {
|
104
107
|
value: "drawer",
|
@@ -110,7 +113,7 @@ const MenusArray = props => {
|
|
110
113
|
sx: {
|
111
114
|
fontSize: "14px"
|
112
115
|
},
|
113
|
-
children: "Drawer"
|
116
|
+
children: translation("Drawer")
|
114
117
|
})
|
115
118
|
})]
|
116
119
|
})]
|
@@ -141,7 +144,7 @@ const MenusArray = props => {
|
|
141
144
|
fullWidth: true,
|
142
145
|
disabled: true
|
143
146
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
144
|
-
title: "Link Settings",
|
147
|
+
title: translation("Link Settings"),
|
145
148
|
arrow: true,
|
146
149
|
children: /*#__PURE__*/_jsx(IconButton, {
|
147
150
|
onClick: () => setOpenNav({
|
@@ -151,7 +154,7 @@ const MenusArray = props => {
|
|
151
154
|
children: /*#__PURE__*/_jsx(Settings, {})
|
152
155
|
})
|
153
156
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
154
|
-
title: "Delete Menu",
|
157
|
+
title: translation("Delete Menu"),
|
155
158
|
arrow: true,
|
156
159
|
children: /*#__PURE__*/_jsx(IconButton, {
|
157
160
|
onClick: onDelete(i),
|
@@ -167,7 +170,7 @@ const MenusArray = props => {
|
|
167
170
|
sx: {
|
168
171
|
fontWeight: 700
|
169
172
|
},
|
170
|
-
children: "
|
173
|
+
children: translation("addTextIcon")
|
171
174
|
})
|
172
175
|
}), openNav ? /*#__PURE__*/_jsx(LinkSettings, {
|
173
176
|
handleClose: () => setOpenNav(null),
|
@@ -6,11 +6,15 @@ const MetaDataMapping = props => {
|
|
6
6
|
const {
|
7
7
|
data,
|
8
8
|
onChange,
|
9
|
-
elementProps
|
9
|
+
elementProps,
|
10
|
+
customProps
|
10
11
|
} = props;
|
11
12
|
const {
|
12
13
|
compType
|
13
14
|
} = data;
|
15
|
+
const {
|
16
|
+
translation
|
17
|
+
} = customProps;
|
14
18
|
const previousCardRef = useRef(null);
|
15
19
|
const [selectedCard, setSelectedCard] = useState(null);
|
16
20
|
const updatedData = {
|
@@ -33,7 +37,9 @@ const MetaDataMapping = props => {
|
|
33
37
|
element: elementProps,
|
34
38
|
value: data?.value,
|
35
39
|
data: updatedData,
|
36
|
-
onChange: handleCardSelect
|
40
|
+
onChange: handleCardSelect,
|
41
|
+
customProps: customProps,
|
42
|
+
translation: translation
|
37
43
|
}) : null
|
38
44
|
});
|
39
45
|
};
|
@@ -16,7 +16,8 @@ const SaveAsTemplate = props => {
|
|
16
16
|
elementProps,
|
17
17
|
handleClose,
|
18
18
|
saveText = "Save As Template",
|
19
|
-
closeText = ""
|
19
|
+
closeText = "",
|
20
|
+
translation
|
20
21
|
} = props;
|
21
22
|
const {
|
22
23
|
onSaveTemplate
|
@@ -93,7 +94,7 @@ const SaveAsTemplate = props => {
|
|
93
94
|
name: "title",
|
94
95
|
value: template?.title,
|
95
96
|
onChange: onChange,
|
96
|
-
placeholder: "Template Title",
|
97
|
+
placeholder: translation("Template Title"),
|
97
98
|
fullWidth: true,
|
98
99
|
size: "small"
|
99
100
|
})
|
@@ -114,7 +115,7 @@ const SaveAsTemplate = props => {
|
|
114
115
|
sx: {
|
115
116
|
fontSize: "14px"
|
116
117
|
},
|
117
|
-
children: "Element"
|
118
|
+
children: translation("Element")
|
118
119
|
})
|
119
120
|
}), /*#__PURE__*/_jsx(MenuItem, {
|
120
121
|
value: "Section",
|
@@ -124,7 +125,7 @@ const SaveAsTemplate = props => {
|
|
124
125
|
sx: {
|
125
126
|
fontSize: "14px"
|
126
127
|
},
|
127
|
-
children: "Section"
|
128
|
+
children: translation("Section")
|
128
129
|
})
|
129
130
|
}), /*#__PURE__*/_jsx(MenuItem, {
|
130
131
|
value: "Template",
|
@@ -134,7 +135,7 @@ const SaveAsTemplate = props => {
|
|
134
135
|
sx: {
|
135
136
|
fontSize: "14px"
|
136
137
|
},
|
137
|
-
children: "Template"
|
138
|
+
children: translation("Template")
|
138
139
|
})
|
139
140
|
})]
|
140
141
|
})
|
@@ -144,7 +145,7 @@ const SaveAsTemplate = props => {
|
|
144
145
|
children: /*#__PURE__*/_jsx(TextField, {
|
145
146
|
fullWidth: true,
|
146
147
|
name: "category",
|
147
|
-
placeholder: "Category",
|
148
|
+
placeholder: translation("Category"),
|
148
149
|
value: template?.category,
|
149
150
|
onChange: onChange,
|
150
151
|
size: "small"
|
@@ -166,7 +167,7 @@ const SaveAsTemplate = props => {
|
|
166
167
|
sx: {
|
167
168
|
...classes.gradientFillBtn
|
168
169
|
},
|
169
|
-
children: ["Upload file", /*#__PURE__*/_jsx("input", {
|
170
|
+
children: [translation("Upload file"), /*#__PURE__*/_jsx("input", {
|
170
171
|
type: "file",
|
171
172
|
style: {
|
172
173
|
opacity: 0,
|
@@ -184,10 +185,10 @@ const SaveAsTemplate = props => {
|
|
184
185
|
}), " ", /*#__PURE__*/_jsx(Typography, {
|
185
186
|
variant: "body1",
|
186
187
|
color: "primary",
|
187
|
-
children: "Remove"
|
188
|
+
children: translation("Remove")
|
188
189
|
})]
|
189
190
|
})]
|
190
|
-
}), uploading ? "Uploading..." : "", /*#__PURE__*/_jsx(Grid, {
|
191
|
+
}), uploading ? translation("Uploading...") : "", /*#__PURE__*/_jsx(Grid, {
|
191
192
|
item: true,
|
192
193
|
xs: 12,
|
193
194
|
style: {
|
@@ -216,7 +217,7 @@ const SaveAsTemplate = props => {
|
|
216
217
|
}
|
217
218
|
// variant="contained"
|
218
219
|
,
|
219
|
-
children: saveText
|
220
|
+
children: translation(saveText)
|
220
221
|
}), closeText ? /*#__PURE__*/_jsx(Button, {
|
221
222
|
className: "closebtn",
|
222
223
|
onClick: handleSave,
|
@@ -224,7 +225,7 @@ const SaveAsTemplate = props => {
|
|
224
225
|
fontWeight: 700
|
225
226
|
},
|
226
227
|
variant: "contained",
|
227
|
-
children: closeText
|
228
|
+
children: translation(closeText)
|
228
229
|
}) : null]
|
229
230
|
})]
|
230
231
|
});
|
@@ -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,
|
@@ -71,7 +72,7 @@ const TextOptions = props => {
|
|
71
72
|
fontWeight: "500",
|
72
73
|
marginBottom: "4px"
|
73
74
|
},
|
74
|
-
children: data?.label
|
75
|
+
children: translation(data?.label)
|
75
76
|
}), /*#__PURE__*/_jsx(FormControl, {
|
76
77
|
sx: {
|
77
78
|
"& .MuiSelect-select": {
|
@@ -84,7 +85,7 @@ const TextOptions = props => {
|
|
84
85
|
children: !webFont ? /*#__PURE__*/_jsx(Select, {
|
85
86
|
onChange: handleChange,
|
86
87
|
value: value || updatedOption[0]?.value,
|
87
|
-
placeholder: data?.label,
|
88
|
+
placeholder: translation(data?.label),
|
88
89
|
fullWidth: true,
|
89
90
|
size: "small",
|
90
91
|
style: {
|
@@ -99,7 +100,7 @@ const TextOptions = props => {
|
|
99
100
|
},
|
100
101
|
children: updatedOption?.map((m, i) => {
|
101
102
|
return m?.value === "listSubHeader" ? /*#__PURE__*/_jsx(ListSubheader, {
|
102
|
-
children: m?.label
|
103
|
+
children: translation(m?.label || m?.text)
|
103
104
|
}, `subHeader_${i}`) : /*#__PURE__*/_jsxs(MenuItem, {
|
104
105
|
value: m?.value,
|
105
106
|
item: m?.metaDataKey,
|
@@ -109,7 +110,7 @@ const TextOptions = props => {
|
|
109
110
|
minWidth: "25px"
|
110
111
|
},
|
111
112
|
children: m?.icon
|
112
|
-
}), renderOption ? renderOption(m, elementProps) : m
|
113
|
+
}), renderOption ? renderOption(m, elementProps, translation) : translation(m?.label || m?.text)]
|
113
114
|
}, `${key}_${i}`);
|
114
115
|
})
|
115
116
|
}) : /*#__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
|
}]
|
@@ -21,7 +21,8 @@ export const StyleContent = props => {
|
|
21
21
|
} = props;
|
22
22
|
const element = customElement ? customElement : propsElement;
|
23
23
|
const {
|
24
|
-
hideTools
|
24
|
+
hideTools,
|
25
|
+
translation
|
25
26
|
} = customProps || {};
|
26
27
|
const {
|
27
28
|
theme
|
@@ -47,7 +48,8 @@ export const StyleContent = props => {
|
|
47
48
|
elementProps: element,
|
48
49
|
customProps: customProps,
|
49
50
|
handleClose: handleClose,
|
50
|
-
classes: classes
|
51
|
+
classes: classes,
|
52
|
+
translation: translation
|
51
53
|
}, `ei_stt_tab_${value}_${m.key}_${i}`) : null;
|
52
54
|
})
|
53
55
|
}, value);
|
@@ -77,7 +79,8 @@ const StyleBuilder = props => {
|
|
77
79
|
needActions: true
|
78
80
|
};
|
79
81
|
const {
|
80
|
-
hideTools
|
82
|
+
hideTools,
|
83
|
+
translation
|
81
84
|
} = customProps || {};
|
82
85
|
const muiTheme = createTheme({
|
83
86
|
components: {
|
@@ -242,12 +245,12 @@ const StyleBuilder = props => {
|
|
242
245
|
onClick: onDelete,
|
243
246
|
color: "error",
|
244
247
|
className: "deleteBtn",
|
245
|
-
children: "Delete"
|
248
|
+
children: translation("Delete")
|
246
249
|
}) : null, /*#__PURE__*/_jsx(Button, {
|
247
250
|
onClick: handleSave,
|
248
251
|
disabled: saveDisable,
|
249
252
|
className: "primaryBtn",
|
250
|
-
children: "Save"
|
253
|
+
children: translation("Save")
|
251
254
|
})]
|
252
255
|
}) : null]
|
253
256
|
});
|
@@ -37,6 +37,9 @@ const Uploader = props => {
|
|
37
37
|
onUploaded(result?.imageURL[0]);
|
38
38
|
}
|
39
39
|
};
|
40
|
+
const {
|
41
|
+
translation
|
42
|
+
} = customProps;
|
40
43
|
const onRemoveBG = () => {
|
41
44
|
setBase64(null);
|
42
45
|
onUploaded("none");
|
@@ -68,14 +71,14 @@ const Uploader = props => {
|
|
68
71
|
}), /*#__PURE__*/_jsx(Grid, {
|
69
72
|
className: "removeImageText",
|
70
73
|
onClick: onRemoveBG,
|
71
|
-
children: "
|
74
|
+
children: translation("Remove")
|
72
75
|
})]
|
73
76
|
});
|
74
77
|
default:
|
75
78
|
return /*#__PURE__*/_jsx(Grid, {
|
76
79
|
className: "removeImageText",
|
77
80
|
onClick: onRemoveBG,
|
78
|
-
children: "
|
81
|
+
children: translation("Remove")
|
79
82
|
});
|
80
83
|
}
|
81
84
|
};
|
@@ -83,7 +86,7 @@ const Uploader = props => {
|
|
83
86
|
children: [/*#__PURE__*/_jsx(Grid, {
|
84
87
|
item: true,
|
85
88
|
xs: 12,
|
86
|
-
children: uploading ? "
|
89
|
+
children: uploading ? translation("uploadingText") : ""
|
87
90
|
}), /*#__PURE__*/_jsx(Grid, {
|
88
91
|
container: true,
|
89
92
|
sx: classes.uploadContainer,
|
@@ -116,11 +119,11 @@ const Uploader = props => {
|
|
116
119
|
onChange: handleChange
|
117
120
|
}), /*#__PURE__*/_jsx(Icon, {
|
118
121
|
icon: "fileUpload"
|
119
|
-
}), /*#__PURE__*/
|
122
|
+
}), /*#__PURE__*/_jsx("span", {
|
120
123
|
style: {
|
121
124
|
paddingLeft: "8px"
|
122
125
|
},
|
123
|
-
children:
|
126
|
+
children: `${translation("upload")} ${translation(title) || translation("image")}`
|
124
127
|
})]
|
125
128
|
})
|
126
129
|
})
|
@@ -276,8 +276,10 @@ export const bringItemToFB = (editor, {
|
|
276
276
|
} = itemNode;
|
277
277
|
let arrangeIndex = zIndex === undefined ? path[path.length - 1] : zIndex;
|
278
278
|
arrangeIndex = moveFront ? arrangeIndex + 1 : arrangeIndex - 1;
|
279
|
+
arrangeIndex = Math.min(arrangeIndex, editor.children.length);
|
280
|
+
arrangeIndex = Math.max(1, arrangeIndex); // to avoid negative z-index
|
279
281
|
Transforms.setNodes(editor, {
|
280
|
-
zIndex:
|
282
|
+
zIndex: arrangeIndex
|
281
283
|
}, {
|
282
284
|
at: path
|
283
285
|
});
|
@@ -306,7 +308,7 @@ export const debounce = function (func, wait, immediate) {
|
|
306
308
|
};
|
307
309
|
export const getTextColor = (color = "") => {
|
308
310
|
return color?.indexOf("gradient") >= 0 ? {
|
309
|
-
background: color?.concat("text")
|
311
|
+
background: `${color?.concat("text")} !important`,
|
310
312
|
WebkitBackgroundClip: "text",
|
311
313
|
WebkitTextFillColor: "transparent !important",
|
312
314
|
color: "transparent !important",
|
@@ -321,7 +323,29 @@ export const getTextColor = (color = "") => {
|
|
321
323
|
color: "#000 !important"
|
322
324
|
}
|
323
325
|
} : {
|
324
|
-
color
|
326
|
+
color: `${color} !important`,
|
327
|
+
WebkitTextFillColor: "unset !important"
|
328
|
+
};
|
329
|
+
};
|
330
|
+
export const pageTextStyle = (color = "") => {
|
331
|
+
return color?.indexOf("gradient") >= 0 ? {
|
332
|
+
background: color?.concat("text"),
|
333
|
+
WebkitBackgroundClip: "text",
|
334
|
+
WebkitTextFillColor: "transparent",
|
335
|
+
color: "transparent",
|
336
|
+
caretColor: "black",
|
337
|
+
"& span": {
|
338
|
+
color: "transparent",
|
339
|
+
"& ::selection": {
|
340
|
+
color: "#000"
|
341
|
+
}
|
342
|
+
},
|
343
|
+
"& ::selection": {
|
344
|
+
color: "#000"
|
345
|
+
}
|
346
|
+
} : {
|
347
|
+
color: color,
|
348
|
+
WebkitTextFillColor: "unset"
|
325
349
|
};
|
326
350
|
};
|
327
351
|
export const getBorderColor = (borderColor = "") => {
|
@@ -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: "Untitled"
|
43
|
+
text: translation ? translation("Untitled") : "Untitled"
|
43
44
|
}]
|
44
45
|
};
|
45
46
|
Transforms.insertNodes(editor, title, {
|