@flozy/editor 11.2.2 → 11.2.4
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 +7 -7
- package/dist/Editor/CommonEditor.js +86 -24
- package/dist/Editor/DialogWrapper.js +31 -25
- package/dist/Editor/Editor.css +37 -4
- package/dist/Editor/Elements/AI/PopoverAIInput.js +11 -3
- package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
- package/dist/Editor/Elements/Attachments/AttachmentStyles.js +16 -0
- package/dist/Editor/Elements/Attachments/Attachments.js +239 -11
- package/dist/Editor/Elements/Attachments/AttachmentsButton.js +11 -4
- package/dist/Editor/Elements/Button/EditorButton.js +22 -7
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +61 -14
- package/dist/Editor/Elements/Color Picker/ColorPicker.css +25 -1
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +10 -7
- package/dist/Editor/Elements/Color Picker/Styles.js +15 -13
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +134 -55
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SelectV1.js +7 -8
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +8 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +1 -1
- package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +1 -1
- package/dist/Editor/Elements/Embed/Embed.js +37 -43
- package/dist/Editor/Elements/Embed/Image.js +307 -26
- package/dist/Editor/Elements/Embed/Video.js +355 -35
- package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +9 -6
- package/dist/Editor/Elements/EmbedScript/styles.js +17 -1
- package/dist/Editor/Elements/Form/FormField.js +1 -1
- package/dist/Editor/Elements/Form/Workflow/Styles.js +25 -22
- package/dist/Editor/Elements/Form/Workflow/constant.js +25 -1
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +37 -76
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +9 -5
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +3 -1
- package/dist/Editor/Elements/FreeGrid/helper.js +194 -0
- package/dist/Editor/Elements/FreeGrid/styles.js +15 -0
- package/dist/Editor/Elements/Grid/GridItem.js +1 -1
- package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +2 -1
- package/dist/Editor/Elements/Table/Table.js +2 -1
- package/dist/Editor/Elements/Table/TableCell.js +10 -3
- package/dist/Editor/Elements/Title/title.js +4 -5
- package/dist/Editor/Elements/TopBanner/TopBanner.js +4 -2
- package/dist/Editor/Elements/TopBanner/TopBannerButton.js +5 -3
- package/dist/Editor/Styles/EditorStyles.js +19 -5
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +27 -3
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -3
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +33 -29
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +2 -1
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +3 -1
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +25 -23
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +167 -42
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +15 -5
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +2 -1
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +65 -7
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +66 -12
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +439 -0
- package/dist/Editor/Toolbar/PopupTool/index.js +6 -4
- package/dist/Editor/Toolbar/toolbarGroups.js +48 -6
- package/dist/Editor/assets/svg/BackIcon.js +18 -0
- package/dist/Editor/assets/svg/ThemeIcons.js +293 -0
- package/dist/Editor/common/ColorPickerButton.js +38 -19
- package/dist/Editor/common/CustomColorPicker/index.js +130 -0
- package/dist/Editor/common/CustomColorPicker/style.js +53 -0
- package/dist/Editor/common/CustomDialog2/index.js +94 -0
- package/dist/Editor/common/CustomDialog2/style.js +67 -0
- package/dist/Editor/common/CustomSelect.js +43 -0
- package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
- package/dist/Editor/common/FontLoader/FontLoader.js +1 -0
- package/dist/Editor/common/Icon.js +28 -0
- package/dist/Editor/common/ImageSelector/ImageSelector.js +66 -13
- package/dist/Editor/common/ImageSelector/Options/ChooseAssets.js +1 -1
- package/dist/Editor/common/ImageSelector/Options/RecentUploads.js +483 -0
- package/dist/Editor/common/ImageSelector/Options/Upload.js +26 -11
- package/dist/Editor/common/ImageSelector/Styles.js +3 -9
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +2 -1
- package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +20 -7
- package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +2 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +20 -7
- package/dist/Editor/common/RnD/GuideLines/styles.js +1 -1
- package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +17 -0
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +6 -3
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +28 -11
- package/dist/Editor/common/RnD/Utils/index.js +3 -1
- package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +52 -63
- package/dist/Editor/common/RnD/VirtualElement/helper.js +248 -68
- package/dist/Editor/common/RnD/VirtualElement/styles.js +22 -0
- package/dist/Editor/common/RnD/index.js +61 -14
- package/dist/Editor/common/Shorthands/elements.js +55 -3
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +4 -2
- package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +4 -0
- package/dist/Editor/common/StyleBuilder/fieldStyle.js +1 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +13 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +12 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +15 -7
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +36 -10
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +13 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +2 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +16 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +15 -7
- package/dist/Editor/common/StyleBuilder/formStyle.js +19 -13
- package/dist/Editor/common/StyleBuilder/index.js +8 -4
- package/dist/Editor/common/Uploader.js +118 -17
- package/dist/Editor/common/UploaderWithProgress.js +183 -0
- package/dist/Editor/common/iconslist.js +21 -0
- package/dist/Editor/commonStyle.js +111 -53
- package/dist/Editor/helper/index.js +4 -1
- package/dist/Editor/helper/theme.js +203 -2
- package/dist/Editor/hooks/useEditorTheme.js +153 -0
- package/dist/Editor/hooks/useMouseMove.js +12 -3
- package/dist/Editor/hooks/useTable.js +62 -1
- package/dist/Editor/hooks/useThemeValues.js +63 -0
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +56 -3
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/service/fileTracking.js +22 -0
- package/dist/Editor/service/fileupload.js +77 -0
- package/dist/Editor/theme/ThemeList.js +50 -173
- package/dist/Editor/theme/index.js +149 -0
- package/dist/Editor/themeSettings/ActiveTheme.js +82 -0
- package/dist/Editor/themeSettings/buttons/index.js +300 -0
- package/dist/Editor/themeSettings/buttons/style.js +23 -0
- package/dist/Editor/themeSettings/colorTheme/index.js +310 -0
- package/dist/Editor/themeSettings/colorTheme/style.js +81 -0
- package/dist/Editor/themeSettings/fonts/PreviewElement.js +121 -0
- package/dist/Editor/themeSettings/fonts/index.js +240 -0
- package/dist/Editor/themeSettings/fonts/style.js +62 -0
- package/dist/Editor/themeSettings/icons.js +60 -0
- package/dist/Editor/themeSettings/index.js +380 -0
- package/dist/Editor/themeSettings/style.js +299 -0
- package/dist/Editor/themeSettingsAI/icons.js +96 -0
- package/dist/Editor/themeSettingsAI/index.js +355 -0
- package/dist/Editor/themeSettingsAI/saveTheme.js +202 -0
- package/dist/Editor/themeSettingsAI/style.js +332 -0
- package/dist/Editor/utils/SlateUtilityFunctions.js +165 -40
- package/dist/Editor/utils/accordion.js +1 -1
- package/dist/Editor/utils/attachments.js +138 -2
- package/dist/Editor/utils/button.js +1 -17
- package/dist/Editor/utils/font.js +40 -37
- package/dist/Editor/utils/formfield.js +2 -2
- package/dist/Editor/utils/helper.js +101 -3
- package/dist/Editor/utils/insertAppHeader.js +8 -4
- package/package.json +1 -1
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Grid, Button, Typography } from "@mui/material";
|
|
3
|
+
import { convertBase64 } from "../utils/helper";
|
|
4
|
+
import Icon from "./Icon";
|
|
5
|
+
import UploadStyles from "../common/ImageSelector/UploadStyles";
|
|
6
|
+
import { allowedFormat, maxSizeMap, allowedTypes, extensionMap } from "../Elements/Form/Workflow/constant";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
const UploaderWithProgress = props => {
|
|
11
|
+
const {
|
|
12
|
+
value,
|
|
13
|
+
onUploaded,
|
|
14
|
+
customProps,
|
|
15
|
+
setS3UploadProp,
|
|
16
|
+
s3UploadProp
|
|
17
|
+
} = props;
|
|
18
|
+
const title = props.title || "Image";
|
|
19
|
+
const classes = UploadStyles();
|
|
20
|
+
const [base64, setBase64] = useState(value?.url);
|
|
21
|
+
const [fileName, setFileName] = useState("");
|
|
22
|
+
const [uploading, setUploading] = useState(false);
|
|
23
|
+
const [error, setError] = useState("");
|
|
24
|
+
const handleChange = async e => {
|
|
25
|
+
setError("");
|
|
26
|
+
const uFile = e.target.files[0];
|
|
27
|
+
if (!uFile) return;
|
|
28
|
+
const maxAllowedSize = maxSizeMap[title] || 5 * 1024 * 1024;
|
|
29
|
+
|
|
30
|
+
// ✅ Check file size
|
|
31
|
+
if (uFile.size > maxAllowedSize) {
|
|
32
|
+
const sizeInMB = Math.round(maxAllowedSize / (1024 * 1024));
|
|
33
|
+
setError(`File size exceeds ${sizeInMB}MB for ${title.toLowerCase()}.`);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// ✅ File type check with fallback to extension
|
|
38
|
+
const validTypes = allowedTypes[title];
|
|
39
|
+
const fileType = uFile.type;
|
|
40
|
+
const fileName = uFile.name.toLowerCase();
|
|
41
|
+
const fileExtension = fileName.split(".").pop();
|
|
42
|
+
const isValid = title === "Embed" || validTypes.includes(fileType) || extensionMap[title]?.includes(fileExtension);
|
|
43
|
+
if (!isValid) {
|
|
44
|
+
setError(`Invalid file format. Please upload a valid ${title.toLowerCase()}.`);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
const strImage = await convertBase64(uFile);
|
|
49
|
+
setBase64(strImage);
|
|
50
|
+
setFileName(uFile?.name);
|
|
51
|
+
doUpload(strImage, uFile);
|
|
52
|
+
} catch (err) {
|
|
53
|
+
setError("Failed to read file.");
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const doUpload = async (strImage, file) => {
|
|
57
|
+
setUploading(true);
|
|
58
|
+
setS3UploadProp({
|
|
59
|
+
...s3UploadProp,
|
|
60
|
+
file: file,
|
|
61
|
+
pageId: customProps?.page_id,
|
|
62
|
+
services: customProps?.services
|
|
63
|
+
});
|
|
64
|
+
setUploading(false);
|
|
65
|
+
};
|
|
66
|
+
const {
|
|
67
|
+
translation
|
|
68
|
+
} = customProps;
|
|
69
|
+
const onRemoveBG = () => {
|
|
70
|
+
setBase64(null);
|
|
71
|
+
onUploaded("");
|
|
72
|
+
setS3UploadProp({
|
|
73
|
+
...s3UploadProp,
|
|
74
|
+
file: null
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
const getBackground = () => {
|
|
78
|
+
switch (title) {
|
|
79
|
+
case "Document":
|
|
80
|
+
return {
|
|
81
|
+
backgroundImage: `url()`
|
|
82
|
+
};
|
|
83
|
+
default:
|
|
84
|
+
return {
|
|
85
|
+
backgroundImage: base64 ? `url(${base64})` : "none"
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const renderThumb = () => {
|
|
90
|
+
switch (title) {
|
|
91
|
+
case "Video":
|
|
92
|
+
case "Document":
|
|
93
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
94
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
95
|
+
style: {
|
|
96
|
+
padding: "8px",
|
|
97
|
+
fontSize: "12px",
|
|
98
|
+
color: "#2563eb",
|
|
99
|
+
textAlign: "center"
|
|
100
|
+
},
|
|
101
|
+
children: fileName
|
|
102
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
103
|
+
className: "removeImageText",
|
|
104
|
+
onClick: onRemoveBG,
|
|
105
|
+
children: translation("Remove")
|
|
106
|
+
})]
|
|
107
|
+
});
|
|
108
|
+
default:
|
|
109
|
+
return /*#__PURE__*/_jsx(Grid, {
|
|
110
|
+
className: "removeImageText",
|
|
111
|
+
onClick: onRemoveBG,
|
|
112
|
+
children: translation("Remove")
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
117
|
+
children: /*#__PURE__*/_jsxs(Grid, {
|
|
118
|
+
style: {
|
|
119
|
+
height: error ? "fit-content" : "inherit"
|
|
120
|
+
},
|
|
121
|
+
className: "uploaderRoot",
|
|
122
|
+
children: [/*#__PURE__*/_jsx(Grid, {
|
|
123
|
+
item: true,
|
|
124
|
+
xs: 12,
|
|
125
|
+
children: error && /*#__PURE__*/_jsx(Typography, {
|
|
126
|
+
style: {
|
|
127
|
+
color: "red",
|
|
128
|
+
marginBottom: "8px"
|
|
129
|
+
},
|
|
130
|
+
children: error
|
|
131
|
+
})
|
|
132
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
133
|
+
container: true,
|
|
134
|
+
sx: classes.uploadContainer,
|
|
135
|
+
style: {
|
|
136
|
+
minHeight: error ? "250px" : "none"
|
|
137
|
+
},
|
|
138
|
+
className: "uploaderDragPlace",
|
|
139
|
+
children: /*#__PURE__*/_jsx(Grid, {
|
|
140
|
+
item: true,
|
|
141
|
+
xs: 12,
|
|
142
|
+
className: "btn--wrpr",
|
|
143
|
+
style: {
|
|
144
|
+
...getBackground()
|
|
145
|
+
},
|
|
146
|
+
sx: classes.uploadField,
|
|
147
|
+
children: !uploading ? /*#__PURE__*/_jsx(Grid, {
|
|
148
|
+
className: "uploadImageSection",
|
|
149
|
+
children: base64 ? renderThumb() : /*#__PURE__*/_jsx(Grid, {
|
|
150
|
+
className: "uploadImageText",
|
|
151
|
+
children: /*#__PURE__*/_jsxs(Button, {
|
|
152
|
+
component: "label",
|
|
153
|
+
variant: "text",
|
|
154
|
+
style: {
|
|
155
|
+
background: "none",
|
|
156
|
+
width: "100%"
|
|
157
|
+
},
|
|
158
|
+
sx: classes.uploadIcon,
|
|
159
|
+
children: [/*#__PURE__*/_jsx("input", {
|
|
160
|
+
type: "file",
|
|
161
|
+
accept: allowedFormat[title],
|
|
162
|
+
style: {
|
|
163
|
+
opacity: 0,
|
|
164
|
+
width: "0px"
|
|
165
|
+
},
|
|
166
|
+
onChange: handleChange
|
|
167
|
+
}), /*#__PURE__*/_jsx(Icon, {
|
|
168
|
+
icon: "fileUpload"
|
|
169
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
170
|
+
style: {
|
|
171
|
+
paddingLeft: "8px"
|
|
172
|
+
},
|
|
173
|
+
children: `${translation("upload")} ${translation(title) || translation("image")}`
|
|
174
|
+
})]
|
|
175
|
+
})
|
|
176
|
+
})
|
|
177
|
+
}) : null
|
|
178
|
+
})
|
|
179
|
+
})]
|
|
180
|
+
})
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
export default UploaderWithProgress;
|
|
@@ -1677,6 +1677,27 @@ export const CloseIcon = props => /*#__PURE__*/_jsxs("svg", {
|
|
|
1677
1677
|
strokeLinejoin: "round"
|
|
1678
1678
|
})]
|
|
1679
1679
|
});
|
|
1680
|
+
export const CloseIcon2 = props => /*#__PURE__*/_jsxs("svg", {
|
|
1681
|
+
width: "10",
|
|
1682
|
+
height: "10",
|
|
1683
|
+
viewBox: "0 0 10 10",
|
|
1684
|
+
fill: "none",
|
|
1685
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1686
|
+
...(props || {}),
|
|
1687
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
1688
|
+
d: "M9.12476 0.875L0.875176 9.12458",
|
|
1689
|
+
stroke: "#8F9CAE",
|
|
1690
|
+
strokeWidth: "1.5",
|
|
1691
|
+
strokeLinecap: "round",
|
|
1692
|
+
strokeLinejoin: "round"
|
|
1693
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
1694
|
+
d: "M0.875183 0.875L9.12476 9.12458",
|
|
1695
|
+
stroke: "#8F9CAE",
|
|
1696
|
+
strokeWidth: "1.5",
|
|
1697
|
+
strokeLinecap: "round",
|
|
1698
|
+
strokeLinejoin: "round"
|
|
1699
|
+
})]
|
|
1700
|
+
});
|
|
1680
1701
|
export const SearchIcon = () => /*#__PURE__*/_jsxs("svg", {
|
|
1681
1702
|
width: "18",
|
|
1682
1703
|
height: "18",
|
|
@@ -54,10 +54,10 @@ const useCommonStyle = theme => ({
|
|
|
54
54
|
marginTop: "4px"
|
|
55
55
|
},
|
|
56
56
|
"& .MuiPaper-root": {
|
|
57
|
-
border:
|
|
58
|
-
borderRadius:
|
|
59
|
-
height:
|
|
60
|
-
padding:
|
|
57
|
+
border: "unset !important",
|
|
58
|
+
borderRadius: "0px",
|
|
59
|
+
height: "fit-content",
|
|
60
|
+
padding: "2px"
|
|
61
61
|
},
|
|
62
62
|
"& .muiIconsListParent": {
|
|
63
63
|
"& svg": {
|
|
@@ -73,7 +73,7 @@ const useCommonStyle = theme => ({
|
|
|
73
73
|
"& .MuiGrid-root>.MuiGrid-item": {
|
|
74
74
|
paddingRight: "0px !important",
|
|
75
75
|
fontFamily: "Inter, sans-serif",
|
|
76
|
-
height:
|
|
76
|
+
height: "fit-content"
|
|
77
77
|
},
|
|
78
78
|
"& .MuiInputBase-root": {
|
|
79
79
|
borderRadius: "10px",
|
|
@@ -134,14 +134,14 @@ const useCommonStyle = theme => ({
|
|
|
134
134
|
borderRadius: "10px",
|
|
135
135
|
width: "52px !important",
|
|
136
136
|
marginLeft: "10px",
|
|
137
|
-
height:
|
|
137
|
+
height: "36px !important"
|
|
138
138
|
},
|
|
139
139
|
"& .spacingSlider": {
|
|
140
140
|
width: "calc(100% - 18px)"
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
|
-
|
|
144
|
-
margin:
|
|
143
|
+
"& .MuiFormHelperText-root": {
|
|
144
|
+
margin: "4px 0px 0px 0px",
|
|
145
145
|
color: theme?.palette?.editor?.closeButtonSvgStroke,
|
|
146
146
|
fontFamily: "Inter, sans-serif"
|
|
147
147
|
}
|
|
@@ -211,16 +211,16 @@ const useCommonStyle = theme => ({
|
|
|
211
211
|
backgroundColor: theme?.palette?.editor?.miniToolBarBackground
|
|
212
212
|
},
|
|
213
213
|
"& .popup_tabs": {
|
|
214
|
-
backgroundColor: theme?.palette?.editor?.
|
|
214
|
+
backgroundColor: theme?.palette?.editor?.miniToolBarBackground,
|
|
215
215
|
"@media only screen and (max-width: 899px)": {
|
|
216
216
|
width: "100% !important"
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
219
|
"& .popup_tabs-header": {
|
|
220
|
-
backgroundColor: theme?.palette?.editor?.
|
|
220
|
+
backgroundColor: theme?.palette?.editor?.miniToolBarBackground,
|
|
221
221
|
"& .popup_tabs-header-label-active": {
|
|
222
222
|
color: theme?.palette?.editor?.activeColor,
|
|
223
|
-
backgroundColor: theme?.palette?.editor?.
|
|
223
|
+
backgroundColor: theme?.palette?.editor?.miniToolBarBackground
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
"& .colorpicker": {
|
|
@@ -249,6 +249,40 @@ const useCommonStyle = theme => ({
|
|
|
249
249
|
backgroundColor: theme?.palette?.editor?.miniToolBarBackground,
|
|
250
250
|
color: theme?.palette?.editor?.textColor
|
|
251
251
|
}
|
|
252
|
+
},
|
|
253
|
+
"& .colorPickerActionBtns": {
|
|
254
|
+
backgroundColor: theme?.palette?.editor?.miniToolBarBackground,
|
|
255
|
+
display: "flex",
|
|
256
|
+
justifyContent: "end",
|
|
257
|
+
padding: "10px",
|
|
258
|
+
position: "sticky",
|
|
259
|
+
bottom: 0,
|
|
260
|
+
right: 0,
|
|
261
|
+
boxShadow: `0px -3px 12px 0px ${theme?.palette?.editor?.cardShadow}`,
|
|
262
|
+
gap: "8px",
|
|
263
|
+
"& button": {
|
|
264
|
+
fontWeight: 600,
|
|
265
|
+
fontSize: "14px",
|
|
266
|
+
opacity: 1,
|
|
267
|
+
borderRadius: "8px",
|
|
268
|
+
textTransform: "math-auto",
|
|
269
|
+
padding: "4px 20px",
|
|
270
|
+
height: "fit-content",
|
|
271
|
+
minWidth: "90px",
|
|
272
|
+
"@media only screen and (max-width: 899px)": {
|
|
273
|
+
width: "50%"
|
|
274
|
+
},
|
|
275
|
+
"&.confirmBtn": {
|
|
276
|
+
backgroundColor: "#2563EB",
|
|
277
|
+
color: "#ffffff",
|
|
278
|
+
border: `1px solid #2563EB`
|
|
279
|
+
},
|
|
280
|
+
"&.cancelBtn": {
|
|
281
|
+
backgroundColor: theme?.palette?.editor?.closeButtonBackground,
|
|
282
|
+
color: theme?.palette?.editor?.customDialogueCloseBtnColor,
|
|
283
|
+
border: `1px solid ${theme?.palette?.editor?.customDialogueCloseBtnBorder}`
|
|
284
|
+
}
|
|
285
|
+
}
|
|
252
286
|
}
|
|
253
287
|
},
|
|
254
288
|
colorPickerBtnBorder: {
|
|
@@ -403,14 +437,14 @@ const useCommonStyle = theme => ({
|
|
|
403
437
|
padding: "8px 12px",
|
|
404
438
|
fontSize: "12px",
|
|
405
439
|
color: theme?.palette?.editor?.menuOptionTextColor,
|
|
406
|
-
fontWeight:
|
|
440
|
+
fontWeight: "500",
|
|
407
441
|
fontFamily: "Inter, sans-serif",
|
|
408
|
-
minHeight:
|
|
442
|
+
minHeight: "36px",
|
|
409
443
|
"&:hover": {
|
|
410
444
|
backgroundColor: theme?.palette?.editor?.menuOptionHoverBackground
|
|
411
445
|
}
|
|
412
446
|
},
|
|
413
|
-
|
|
447
|
+
"& .Mui-selected": {
|
|
414
448
|
background: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`
|
|
415
449
|
},
|
|
416
450
|
"& .MuiListSubheader-root": {
|
|
@@ -419,16 +453,16 @@ const useCommonStyle = theme => ({
|
|
|
419
453
|
fontSize: "12px"
|
|
420
454
|
},
|
|
421
455
|
"& .MuiPaper-root": {
|
|
422
|
-
borderRadius:
|
|
423
|
-
padding:
|
|
456
|
+
borderRadius: "8px",
|
|
457
|
+
padding: "0px",
|
|
424
458
|
background: `${theme?.palette?.editor?.textWeightPopUpBackground} !important`
|
|
425
459
|
},
|
|
426
|
-
|
|
427
|
-
margin:
|
|
428
|
-
borderRadius:
|
|
460
|
+
"& .MuiButtonBase-root": {
|
|
461
|
+
margin: "4px",
|
|
462
|
+
borderRadius: "6px"
|
|
429
463
|
},
|
|
430
|
-
|
|
431
|
-
padding:
|
|
464
|
+
"& .MuiList-root": {
|
|
465
|
+
padding: "0px"
|
|
432
466
|
}
|
|
433
467
|
},
|
|
434
468
|
datePicker: {
|
|
@@ -530,7 +564,24 @@ const useCommonStyle = theme => ({
|
|
|
530
564
|
},
|
|
531
565
|
pageSettingPopUpRoot: {
|
|
532
566
|
padding: "16px 8px 16px 10px!important",
|
|
533
|
-
height: "100%"
|
|
567
|
+
height: "100%",
|
|
568
|
+
"& .text-field-wrapper": {
|
|
569
|
+
"& input:-webkit-autofill": {
|
|
570
|
+
WebkitBackgroundClip: "text !important",
|
|
571
|
+
WebkitBoxShadow: "0 0 0 1000px transparent inset !important",
|
|
572
|
+
WebkitTextFillColor: `${theme?.palette?.editor?.deletePopUpButtonTextColor} !important`,
|
|
573
|
+
transition: "background-color 600000s 0s, color 600000s 0s !important"
|
|
574
|
+
},
|
|
575
|
+
"& .MuiFilledInput-root": {
|
|
576
|
+
backgroundColor: "rgba(255, 255, 255, 0.5)",
|
|
577
|
+
"&:hover": {
|
|
578
|
+
backgroundColor: "rgba(255, 255, 255, 0.7)"
|
|
579
|
+
},
|
|
580
|
+
"&.Mui-focused": {
|
|
581
|
+
backgroundColor: "rgba(255, 255, 255, 0.9)"
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
534
585
|
},
|
|
535
586
|
buttonMoreIcon: {
|
|
536
587
|
position: "absolute",
|
|
@@ -541,11 +592,11 @@ const useCommonStyle = theme => ({
|
|
|
541
592
|
buttonMoreOption: {
|
|
542
593
|
background: `${theme?.palette?.editor?.aiInputBackground} !important`,
|
|
543
594
|
border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
|
|
544
|
-
padding:
|
|
545
|
-
|
|
546
|
-
width:
|
|
547
|
-
height:
|
|
548
|
-
|
|
595
|
+
padding: "4px !important",
|
|
596
|
+
"& svg": {
|
|
597
|
+
width: "18px !important",
|
|
598
|
+
height: "18px !important",
|
|
599
|
+
"& path": {
|
|
549
600
|
stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
|
|
550
601
|
}
|
|
551
602
|
}
|
|
@@ -553,8 +604,8 @@ const useCommonStyle = theme => ({
|
|
|
553
604
|
buttonMoreOption2: {
|
|
554
605
|
background: `${theme?.palette?.editor?.aiInputBackground} !important`,
|
|
555
606
|
border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
|
|
556
|
-
|
|
557
|
-
|
|
607
|
+
"& svg": {
|
|
608
|
+
"& path": {
|
|
558
609
|
fill: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
|
|
559
610
|
}
|
|
560
611
|
}
|
|
@@ -562,11 +613,11 @@ const useCommonStyle = theme => ({
|
|
|
562
613
|
buttonMoreOption3: {
|
|
563
614
|
background: `${theme?.palette?.editor?.aiInputBackground} !important`,
|
|
564
615
|
border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
|
|
565
|
-
padding:
|
|
566
|
-
|
|
567
|
-
width:
|
|
568
|
-
height:
|
|
569
|
-
|
|
616
|
+
padding: "5px !important",
|
|
617
|
+
"& svg": {
|
|
618
|
+
width: "16px !important",
|
|
619
|
+
height: "16px !important",
|
|
620
|
+
"& path": {
|
|
570
621
|
stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
|
|
571
622
|
}
|
|
572
623
|
}
|
|
@@ -574,37 +625,37 @@ const useCommonStyle = theme => ({
|
|
|
574
625
|
resizeButton: {
|
|
575
626
|
background: theme?.palette?.editor?.aiInputBackground,
|
|
576
627
|
border: `1px solid ${theme?.palette?.editor?.buttonBorder1}`,
|
|
577
|
-
padding:
|
|
578
|
-
borderRadius:
|
|
579
|
-
|
|
580
|
-
width:
|
|
581
|
-
height:
|
|
582
|
-
|
|
628
|
+
padding: "5px !important",
|
|
629
|
+
borderRadius: "50% !important",
|
|
630
|
+
"& svg": {
|
|
631
|
+
width: "18px",
|
|
632
|
+
height: "18px",
|
|
633
|
+
"& path": {
|
|
583
634
|
fill: `${theme?.palette?.editor?.closeButtonSvgStroke}`
|
|
584
635
|
}
|
|
585
636
|
},
|
|
586
|
-
|
|
637
|
+
"&:hover": {
|
|
587
638
|
background: theme?.palette?.editor?.aiInputBackground
|
|
588
639
|
}
|
|
589
640
|
},
|
|
590
641
|
gradientFillBtn: {
|
|
591
642
|
background: `linear-gradient(112.61deg, #2C63ED 19.3%, #8360FD 88.14%) !important`,
|
|
592
|
-
textTransform:
|
|
593
|
-
color:
|
|
594
|
-
padding:
|
|
595
|
-
height:
|
|
596
|
-
borderRadius:
|
|
597
|
-
fontWeight:
|
|
598
|
-
fontSize:
|
|
643
|
+
textTransform: "math-auto !important",
|
|
644
|
+
color: "#FFFFFF !important",
|
|
645
|
+
padding: "0px 12px !important",
|
|
646
|
+
height: "32px",
|
|
647
|
+
borderRadius: "8px",
|
|
648
|
+
fontWeight: "500",
|
|
649
|
+
fontSize: "14px"
|
|
599
650
|
},
|
|
600
651
|
emptyThumbBtn: {
|
|
601
652
|
background: `${theme?.palette?.editor?.sectionSettingIconHover} !important`,
|
|
602
653
|
color: `${theme?.palette?.editor?.textColor} !important`,
|
|
603
|
-
fontSize:
|
|
604
|
-
|
|
605
|
-
width:
|
|
606
|
-
height:
|
|
607
|
-
|
|
654
|
+
fontSize: "14px !important",
|
|
655
|
+
"& svg": {
|
|
656
|
+
width: "20px !important",
|
|
657
|
+
height: "20px !important",
|
|
658
|
+
"& path": {
|
|
608
659
|
stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
|
|
609
660
|
}
|
|
610
661
|
}
|
|
@@ -676,6 +727,13 @@ const useCommonStyle = theme => ({
|
|
|
676
727
|
stroke: theme?.palette?.editor?.closeButtonSvgStroke
|
|
677
728
|
}
|
|
678
729
|
}
|
|
730
|
+
},
|
|
731
|
+
"& .element-toolbar": {
|
|
732
|
+
"& button": {
|
|
733
|
+
borderRadius: "50%",
|
|
734
|
+
background: theme?.palette?.editor?.signatureFontBtnBg,
|
|
735
|
+
border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`
|
|
736
|
+
}
|
|
679
737
|
}
|
|
680
738
|
}
|
|
681
739
|
});
|
|
@@ -7,7 +7,7 @@ import { Node } from "slate";
|
|
|
7
7
|
const HIDE_PLACHOLDERS = ["grid", "grid-item", "table"];
|
|
8
8
|
const TEXT_NODES = ["paragraph", "headingOne", "headingTwo", "headingThree"];
|
|
9
9
|
const PREVIEW_IMAGE_HIDE_CLASS = ["grid-container-toolbar", "grid-item-toolbar", "element-toolbar", "mini-tool-wrpr-ei", "element-selector", "element-selector-ctrl"];
|
|
10
|
-
const RND_ITEMS = ["freegridItem", "freegridBox"];
|
|
10
|
+
export const RND_ITEMS = ["freegridItem", "freegridBox"];
|
|
11
11
|
export const getThumbnailImage = async (dom, options = {}) => {
|
|
12
12
|
try {
|
|
13
13
|
const canvas = await html2canvas(dom, {
|
|
@@ -99,6 +99,9 @@ function padZero(str, len) {
|
|
|
99
99
|
return (zeros + str).slice(-len);
|
|
100
100
|
}
|
|
101
101
|
export function getEmbedURL(element, needType = false) {
|
|
102
|
+
if (typeof element?.href !== "string" && typeof element?.url !== "string") {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
102
105
|
let refUrl = element.href ? element.href : element.url;
|
|
103
106
|
refUrl = refUrl ? refUrl.includes("http") ? refUrl : `//${refUrl}` : "Link";
|
|
104
107
|
let embedUrl = refUrl;
|