@flozy/editor 11.2.3 → 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.
Files changed (145) hide show
  1. package/dist/Editor/ChatEditor.js +7 -7
  2. package/dist/Editor/CommonEditor.js +86 -24
  3. package/dist/Editor/DialogWrapper.js +31 -25
  4. package/dist/Editor/Editor.css +37 -4
  5. package/dist/Editor/Elements/AI/PopoverAIInput.js +11 -3
  6. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  7. package/dist/Editor/Elements/Attachments/AttachmentStyles.js +16 -0
  8. package/dist/Editor/Elements/Attachments/Attachments.js +239 -11
  9. package/dist/Editor/Elements/Attachments/AttachmentsButton.js +11 -4
  10. package/dist/Editor/Elements/Button/EditorButton.js +32 -44
  11. package/dist/Editor/Elements/Color Picker/ColorButtons.js +61 -14
  12. package/dist/Editor/Elements/Color Picker/ColorPicker.css +25 -1
  13. package/dist/Editor/Elements/Color Picker/ColorPicker.js +10 -7
  14. package/dist/Editor/Elements/Color Picker/Styles.js +15 -13
  15. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +134 -55
  16. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SelectV1.js +7 -8
  17. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +8 -3
  18. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +1 -1
  19. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +1 -1
  20. package/dist/Editor/Elements/Embed/Embed.js +37 -43
  21. package/dist/Editor/Elements/Embed/Image.js +307 -26
  22. package/dist/Editor/Elements/Embed/Video.js +355 -35
  23. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +9 -6
  24. package/dist/Editor/Elements/EmbedScript/styles.js +17 -1
  25. package/dist/Editor/Elements/Form/FormField.js +1 -1
  26. package/dist/Editor/Elements/Form/Workflow/Styles.js +25 -22
  27. package/dist/Editor/Elements/Form/Workflow/constant.js +25 -1
  28. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +37 -76
  29. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +9 -5
  30. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +3 -1
  31. package/dist/Editor/Elements/FreeGrid/helper.js +194 -0
  32. package/dist/Editor/Elements/FreeGrid/styles.js +15 -0
  33. package/dist/Editor/Elements/Grid/GridItem.js +1 -1
  34. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +2 -1
  35. package/dist/Editor/Elements/Table/Table.js +2 -1
  36. package/dist/Editor/Elements/Table/TableCell.js +10 -3
  37. package/dist/Editor/Elements/Title/title.js +4 -5
  38. package/dist/Editor/Elements/TopBanner/TopBanner.js +4 -2
  39. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +5 -3
  40. package/dist/Editor/Styles/EditorStyles.js +19 -5
  41. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +27 -3
  42. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -3
  43. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  44. package/dist/Editor/Toolbar/FormatTools/TextSize.js +33 -29
  45. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +2 -1
  46. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +3 -1
  47. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +25 -23
  48. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +167 -42
  49. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +15 -5
  50. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +2 -1
  51. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +65 -7
  52. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +66 -12
  53. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +439 -0
  54. package/dist/Editor/Toolbar/PopupTool/index.js +6 -4
  55. package/dist/Editor/Toolbar/toolbarGroups.js +48 -6
  56. package/dist/Editor/assets/svg/BackIcon.js +18 -0
  57. package/dist/Editor/assets/svg/ThemeIcons.js +293 -0
  58. package/dist/Editor/common/ColorPickerButton.js +38 -19
  59. package/dist/Editor/common/CustomColorPicker/index.js +130 -0
  60. package/dist/Editor/common/CustomColorPicker/style.js +53 -0
  61. package/dist/Editor/common/CustomDialog2/index.js +94 -0
  62. package/dist/Editor/common/CustomDialog2/style.js +67 -0
  63. package/dist/Editor/common/CustomSelect.js +43 -0
  64. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  65. package/dist/Editor/common/FontLoader/FontLoader.js +1 -0
  66. package/dist/Editor/common/Icon.js +28 -0
  67. package/dist/Editor/common/ImageSelector/ImageSelector.js +66 -13
  68. package/dist/Editor/common/ImageSelector/Options/ChooseAssets.js +1 -1
  69. package/dist/Editor/common/ImageSelector/Options/RecentUploads.js +483 -0
  70. package/dist/Editor/common/ImageSelector/Options/Upload.js +26 -11
  71. package/dist/Editor/common/ImageSelector/Styles.js +3 -9
  72. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +2 -1
  73. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +3 -2
  74. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +3 -2
  75. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +3 -2
  76. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +3 -2
  77. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +3 -2
  78. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +20 -7
  79. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +3 -2
  80. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +2 -0
  81. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +20 -7
  82. package/dist/Editor/common/RnD/GuideLines/styles.js +1 -1
  83. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +17 -0
  84. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +6 -3
  85. package/dist/Editor/common/RnD/Utils/gridDropItem.js +28 -11
  86. package/dist/Editor/common/RnD/Utils/index.js +3 -1
  87. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +52 -63
  88. package/dist/Editor/common/RnD/VirtualElement/helper.js +248 -68
  89. package/dist/Editor/common/RnD/VirtualElement/styles.js +22 -0
  90. package/dist/Editor/common/RnD/index.js +61 -14
  91. package/dist/Editor/common/Shorthands/elements.js +55 -3
  92. package/dist/Editor/common/StyleBuilder/buttonStyle.js +5 -15
  93. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +4 -0
  94. package/dist/Editor/common/StyleBuilder/fieldStyle.js +1 -0
  95. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +13 -3
  96. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +12 -2
  97. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +15 -7
  98. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +36 -10
  99. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +13 -4
  100. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +2 -0
  101. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +16 -4
  102. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +15 -7
  103. package/dist/Editor/common/StyleBuilder/formStyle.js +19 -13
  104. package/dist/Editor/common/StyleBuilder/index.js +10 -19
  105. package/dist/Editor/common/Uploader.js +118 -17
  106. package/dist/Editor/common/UploaderWithProgress.js +183 -0
  107. package/dist/Editor/common/iconslist.js +21 -0
  108. package/dist/Editor/commonStyle.js +111 -53
  109. package/dist/Editor/helper/index.js +4 -1
  110. package/dist/Editor/helper/theme.js +203 -2
  111. package/dist/Editor/hooks/useEditorTheme.js +153 -0
  112. package/dist/Editor/hooks/useMouseMove.js +12 -3
  113. package/dist/Editor/hooks/useTable.js +62 -1
  114. package/dist/Editor/hooks/useThemeValues.js +63 -0
  115. package/dist/Editor/plugins/withEmbeds.js +1 -1
  116. package/dist/Editor/plugins/withHTML.js +56 -3
  117. package/dist/Editor/plugins/withTable.js +1 -1
  118. package/dist/Editor/service/fileTracking.js +22 -0
  119. package/dist/Editor/service/fileupload.js +77 -0
  120. package/dist/Editor/theme/ThemeList.js +50 -173
  121. package/dist/Editor/theme/index.js +149 -0
  122. package/dist/Editor/themeSettings/ActiveTheme.js +82 -0
  123. package/dist/Editor/themeSettings/buttons/index.js +300 -0
  124. package/dist/Editor/themeSettings/buttons/style.js +23 -0
  125. package/dist/Editor/themeSettings/colorTheme/index.js +310 -0
  126. package/dist/Editor/themeSettings/colorTheme/style.js +81 -0
  127. package/dist/Editor/themeSettings/fonts/PreviewElement.js +121 -0
  128. package/dist/Editor/themeSettings/fonts/index.js +240 -0
  129. package/dist/Editor/themeSettings/fonts/style.js +62 -0
  130. package/dist/Editor/themeSettings/icons.js +60 -0
  131. package/dist/Editor/themeSettings/index.js +380 -0
  132. package/dist/Editor/themeSettings/style.js +299 -0
  133. package/dist/Editor/themeSettingsAI/icons.js +96 -0
  134. package/dist/Editor/themeSettingsAI/index.js +355 -0
  135. package/dist/Editor/themeSettingsAI/saveTheme.js +202 -0
  136. package/dist/Editor/themeSettingsAI/style.js +332 -0
  137. package/dist/Editor/utils/SlateUtilityFunctions.js +165 -40
  138. package/dist/Editor/utils/accordion.js +1 -1
  139. package/dist/Editor/utils/attachments.js +138 -2
  140. package/dist/Editor/utils/button.js +1 -17
  141. package/dist/Editor/utils/font.js +40 -37
  142. package/dist/Editor/utils/formfield.js +2 -2
  143. package/dist/Editor/utils/helper.js +101 -3
  144. package/dist/Editor/utils/insertAppHeader.js +8 -4
  145. package/package.json +1 -1
@@ -1,9 +1,13 @@
1
- import React, { useState } from "react";
2
- import { Grid, Button, Typography } from "@mui/material";
1
+ import React, { useRef, useState } from "react";
2
+ import Grid from '@mui/material/Grid';
3
+ import Button from '@mui/material/Button';
4
+ import Typography from '@mui/material/Typography';
5
+ import Box from '@mui/material/Box';
6
+ import CircularProgress from '@mui/material/CircularProgress';
3
7
  import { convertBase64 } from "../utils/helper";
4
- import { uploadFile } from "../service/fileupload";
5
8
  import Icon from "./Icon";
6
9
  import UploadStyles from "../common/ImageSelector/UploadStyles";
10
+ import { allowedFormat, allowedTypes, extensionMap } from "../Elements/Form/Workflow/constant";
7
11
  import { jsx as _jsx } from "react/jsx-runtime";
8
12
  import { Fragment as _Fragment } from "react/jsx-runtime";
9
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -12,35 +16,88 @@ const Uploader = props => {
12
16
  value,
13
17
  onUploaded,
14
18
  customProps,
15
- title
19
+ title,
20
+ setS3UploadProp,
21
+ setUniqueId,
22
+ uniqueId
16
23
  } = props;
17
24
  const classes = UploadStyles();
18
25
  const [base64, setBase64] = useState(value?.url);
19
26
  const [fileName, setFileName] = useState("");
20
- const [uploading, setUploading] = useState(false);
27
+ const {
28
+ uploadFile,
29
+ services,
30
+ uploadTerminator
31
+ } = customProps;
32
+ const [uploadStatus, setUploadStatus] = useState({
33
+ isUploading: false,
34
+ uploadPercentage: 0
35
+ });
36
+ const [error, setError] = useState(null);
37
+ const xhrRef = useRef(null);
21
38
  const handleChange = async e => {
39
+ setError("");
22
40
  const uFile = e.target.files[0];
23
- const strImage = await convertBase64(uFile);
24
- setBase64(strImage);
25
- setFileName(uFile?.name);
26
- doUpload(strImage, e.target.files[0]);
41
+ if (!uFile) return;
42
+ const maxAllowedSize = 5 * 1024 * 1024;
43
+
44
+ // ✅ Check file size
45
+ if (uFile.size > maxAllowedSize) {
46
+ const sizeInMB = Math.round(maxAllowedSize / (1024 * 1024));
47
+ setError(`File size exceeds ${sizeInMB}MB for ${uFile.name.toLowerCase()}.`);
48
+ return;
49
+ }
50
+
51
+ // ✅ File type check with fallback to extension
52
+ const validTypes = allowedTypes["Image"];
53
+ const fileType = uFile.type;
54
+ const fileName = uFile.name.toLowerCase();
55
+ const fileExtension = fileName.split(".").pop();
56
+ const isValid = title === "Embed" || validTypes.includes(fileType) || extensionMap["Image"]?.includes(fileExtension);
57
+ if (!isValid) {
58
+ setError(`Invalid file format. Please upload a valid ${title.toLowerCase()}.`);
59
+ return;
60
+ }
61
+ try {
62
+ const strImage = await convertBase64(uFile);
63
+ setBase64(strImage);
64
+ setFileName(uFile?.name);
65
+ doUpload(strImage, e.target.files[0]);
66
+ } catch (error) {
67
+ setError("Failed to read file.");
68
+ }
69
+ };
70
+ const onSave = url => {
71
+ if (!uploadStatus?.isUploading) {
72
+ setS3UploadProp({
73
+ file: true
74
+ });
75
+ }
76
+ onUploaded(url);
27
77
  };
28
78
  const doUpload = async (strImage, file) => {
29
- setUploading(true);
30
79
  const formData = new FormData();
31
80
  formData.set("file", file);
32
81
  formData.set("resource_type", "pages");
33
82
  formData.set("resource_id", customProps?.page_id);
34
- const result = await uploadFile(formData, customProps);
35
- setUploading(false);
36
- if (result && result?.imageURL) {
37
- onUploaded(result?.imageURL[0]);
83
+ const id = crypto?.randomUUID();
84
+ setUniqueId(id);
85
+ const result = await services("uploadFile", file);
86
+ if (result?.data?.[0]) {
87
+ const fileEntry = {
88
+ file: file,
89
+ xhrRef,
90
+ presidnedURL: result.data?.[0],
91
+ status: "uploading"
92
+ };
93
+ uploadFile(id, fileEntry, setUploadStatus, onSave, "image");
38
94
  }
39
95
  };
40
96
  const {
41
97
  translation
42
98
  } = customProps;
43
99
  const onRemoveBG = () => {
100
+ uploadTerminator(uniqueId, setUploadStatus);
44
101
  setBase64(null);
45
102
  onUploaded("none");
46
103
  };
@@ -82,11 +139,54 @@ const Uploader = props => {
82
139
  });
83
140
  }
84
141
  };
142
+ const UploadingProgress = () => {
143
+ return /*#__PURE__*/_jsx(Grid, {
144
+ container: true,
145
+ direction: "row",
146
+ justifyContent: "space-between",
147
+ alignItems: "center",
148
+ children: /*#__PURE__*/_jsx(Box, {
149
+ display: "flex",
150
+ flexDirection: "column",
151
+ alignItems: "flex-start",
152
+ justifyContent: "space-between",
153
+ sx: {
154
+ gap: 1,
155
+ mb: 1,
156
+ mt: 1
157
+ },
158
+ children: /*#__PURE__*/_jsxs(Box, {
159
+ display: "flex",
160
+ alignItems: "center",
161
+ gap: 1,
162
+ children: [/*#__PURE__*/_jsx(Typography, {
163
+ variant: "body",
164
+ children: `Uploading ${uploadStatus?.fileSize}`
165
+ }), /*#__PURE__*/_jsx(CircularProgress, {
166
+ variant: "determinate",
167
+ value: uploadStatus?.uploadPercentage ?? 0,
168
+ className: "circularProgress-cls",
169
+ size: 15,
170
+ thickness: 8
171
+ }), /*#__PURE__*/_jsx(Typography, {
172
+ variant: "body",
173
+ children: `${uploadStatus?.uploadPercentage?.toFixed(0) ?? 0}%`
174
+ })]
175
+ })
176
+ })
177
+ });
178
+ };
85
179
  return /*#__PURE__*/_jsxs(_Fragment, {
86
- children: [/*#__PURE__*/_jsx(Grid, {
180
+ children: [/*#__PURE__*/_jsxs(Grid, {
87
181
  item: true,
88
182
  xs: 12,
89
- children: uploading ? translation("uploadingText") : ""
183
+ children: [!error && uploadStatus?.isUploading ? /*#__PURE__*/_jsx(UploadingProgress, {}) : "", error && /*#__PURE__*/_jsx(Typography, {
184
+ style: {
185
+ color: "red",
186
+ marginBottom: "8px"
187
+ },
188
+ children: error
189
+ })]
90
190
  }), /*#__PURE__*/_jsx(Grid, {
91
191
  container: true,
92
192
  sx: classes.uploadContainer,
@@ -98,7 +198,7 @@ const Uploader = props => {
98
198
  ...getBackground()
99
199
  },
100
200
  sx: classes.uploadField,
101
- children: !uploading ? /*#__PURE__*/_jsx(Grid, {
201
+ children: !uploadStatus?.isUploading ? /*#__PURE__*/_jsx(Grid, {
102
202
  className: "uploadImageSection",
103
203
  children: base64 ? renderThumb() : /*#__PURE__*/_jsx(Grid, {
104
204
  className: "uploadImageText",
@@ -112,6 +212,7 @@ const Uploader = props => {
112
212
  sx: classes.uploadIcon,
113
213
  children: [/*#__PURE__*/_jsx("input", {
114
214
  type: "file",
215
+ accept: allowedFormat["Image"],
115
216
  style: {
116
217
  opacity: 0,
117
218
  width: "0px"
@@ -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: 'unset !important',
58
- borderRadius: '0px',
59
- height: 'fit-content',
60
- padding: '2px'
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: 'fit-content'
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: '36px !important'
137
+ height: "36px !important"
138
138
  },
139
139
  "& .spacingSlider": {
140
140
  width: "calc(100% - 18px)"
141
141
  }
142
142
  },
143
- '& .MuiFormHelperText-root': {
144
- margin: '4px 0px 0px 0px',
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?.background,
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?.background,
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?.background
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: '500',
440
+ fontWeight: "500",
407
441
  fontFamily: "Inter, sans-serif",
408
- minHeight: '36px',
442
+ minHeight: "36px",
409
443
  "&:hover": {
410
444
  backgroundColor: theme?.palette?.editor?.menuOptionHoverBackground
411
445
  }
412
446
  },
413
- '& .Mui-selected': {
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: '8px',
423
- padding: '0px',
456
+ borderRadius: "8px",
457
+ padding: "0px",
424
458
  background: `${theme?.palette?.editor?.textWeightPopUpBackground} !important`
425
459
  },
426
- '& .MuiButtonBase-root': {
427
- margin: '4px',
428
- borderRadius: '6px'
460
+ "& .MuiButtonBase-root": {
461
+ margin: "4px",
462
+ borderRadius: "6px"
429
463
  },
430
- '& .MuiList-root': {
431
- padding: '0px'
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: '4px !important',
545
- '& svg': {
546
- width: '18px !important',
547
- height: '18px !important',
548
- '& path': {
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
- '& svg': {
557
- '& path': {
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: '5px !important',
566
- '& svg': {
567
- width: '16px !important',
568
- height: '16px !important',
569
- '& path': {
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: '5px !important',
578
- borderRadius: '50% !important',
579
- '& svg': {
580
- width: '18px',
581
- height: '18px',
582
- '& path': {
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
- '&:hover': {
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: 'math-auto !important',
593
- color: '#FFFFFF !important',
594
- padding: '0px 12px !important',
595
- height: '32px',
596
- borderRadius: '8px',
597
- fontWeight: '500',
598
- fontSize: '14px'
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: '14px !important',
604
- '& svg': {
605
- width: '20px !important',
606
- height: '20px !important',
607
- '& path': {
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
  });