@flozy/editor 5.1.5 → 5.1.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/ChatEditor.js +25 -34
- package/dist/Editor/CommonEditor.js +15 -9
- package/dist/Editor/Editor.css +56 -12
- package/dist/Editor/Elements/AI/AIInput.js +0 -1
- package/dist/Editor/Elements/AI/CustomSelect.js +17 -10
- package/dist/Editor/Elements/AI/Styles.js +7 -1
- package/dist/Editor/Elements/Button/EditorButton.js +1 -1
- package/dist/Editor/Elements/Carousel/CarouselItem.js +1 -1
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +7 -5
- package/dist/Editor/Elements/Color Picker/Styles.js +7 -3
- package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
- package/dist/Editor/Elements/DataView/DataView.js +101 -0
- package/dist/Editor/Elements/DataView/DataViewButton.js +23 -0
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +59 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +30 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +140 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +40 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +59 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +26 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +38 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +30 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +30 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +35 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +36 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +17 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +29 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +38 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +74 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +64 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +106 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +174 -0
- package/dist/Editor/Elements/DataView/Layouts/Formula.js +29 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +113 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +37 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +111 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +62 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +36 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +101 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +160 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +190 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +42 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +30 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +110 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +179 -0
- package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +100 -0
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +227 -0
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +70 -0
- package/dist/Editor/Elements/DataView/Layouts/index.js +25 -0
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +288 -0
- package/dist/Editor/Elements/DataView/Utils/globalSearch.js +15 -0
- package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +72 -0
- package/dist/Editor/Elements/DataView/styles.js +143 -0
- package/dist/Editor/Elements/Divider/Divider.js +15 -14
- package/dist/Editor/Elements/Form/Form.js +38 -2
- package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +7 -1
- package/dist/Editor/Elements/Form/FormElements/FormDate.js +7 -1
- package/dist/Editor/Elements/Form/FormElements/FormEmail.js +7 -1
- package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +7 -1
- package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +7 -1
- package/dist/Editor/Elements/Form/FormElements/FormText.js +7 -1
- package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +6 -1
- package/dist/Editor/Elements/Form/FormPopup.js +12 -9
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +20 -1
- package/dist/Editor/Elements/Grid/GridButton.js +2 -1
- package/dist/Editor/Elements/Grid/GridItem.js +12 -0
- package/dist/Editor/Elements/Link/LinkButton.js +1 -1
- package/dist/Editor/Elements/Signature/Signature.css +1 -1
- package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -2
- package/dist/Editor/Elements/Signature/SignaturePopup.js +13 -48
- package/dist/Editor/Elements/SimpleText/index.js +8 -1
- package/dist/Editor/Elements/SimpleText/style.js +8 -1
- package/dist/Editor/Elements/Table/AddRowCol.js +77 -0
- package/dist/Editor/Elements/Table/DragButton.js +141 -0
- package/dist/Editor/Elements/Table/DragStyles.js +70 -0
- package/dist/Editor/Elements/Table/Draggable.js +25 -0
- package/dist/Editor/Elements/Table/Droppable.js +53 -0
- package/dist/Editor/Elements/Table/Styles.js +25 -43
- package/dist/Editor/Elements/Table/Table.js +205 -138
- package/dist/Editor/Elements/Table/TableCell.js +355 -102
- package/dist/Editor/Elements/Table/TablePopup.js +9 -3
- package/dist/Editor/Elements/Table/TableRow.js +10 -2
- package/dist/Editor/Elements/Table/TableTool.js +101 -0
- package/dist/Editor/Elements/Table/tableHelper.js +71 -0
- package/dist/Editor/Styles/EditorStyles.js +3 -1
- package/dist/Editor/Toolbar/FormatTools/BlockButton.js +10 -0
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +7 -11
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +10 -4
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +3 -0
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +0 -2
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +3 -6
- package/dist/Editor/Toolbar/Mini/Styles.js +4 -1
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +3 -3
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +16 -11
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +416 -49
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +62 -8
- package/dist/Editor/Toolbar/PopupTool/index.js +5 -6
- package/dist/Editor/Toolbar/Toolbar.js +6 -0
- package/dist/Editor/Toolbar/toolbarGroups.js +4 -0
- package/dist/Editor/assets/svg/BrainIcon.js +2 -2
- package/dist/Editor/assets/svg/TableIcons.js +220 -0
- package/dist/Editor/common/ColorPickerButton.js +3 -2
- package/dist/Editor/common/FontLoader/FontLoader.js +4 -4
- package/dist/Editor/common/Icon.js +24 -23
- package/dist/Editor/common/LinkSettings/NavComponents.js +2 -1
- package/dist/Editor/common/LinkSettings/index.js +2 -1
- package/dist/Editor/common/MentionsPopup/Styles.js +152 -7
- package/dist/Editor/common/MentionsPopup/index.js +1 -1
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +108 -12
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +14 -2
- package/dist/Editor/common/Select/index.js +20 -0
- package/dist/Editor/common/Select/styles.js +17 -0
- package/dist/Editor/common/Shorthands/elements.js +13 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +5 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +8 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +10 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +3 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +79 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +7 -7
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +5 -2
- package/dist/Editor/common/StyleBuilder/formStyle.js +268 -149
- package/dist/Editor/common/StyleBuilder/index.js +84 -11
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +4 -0
- package/dist/Editor/common/StyleBuilder/tableStyle.js +69 -25
- package/dist/Editor/common/SwipeableDrawer/style.js +15 -4
- package/dist/Editor/common/Uploader.js +8 -0
- package/dist/Editor/common/iconListV2.js +378 -40
- package/dist/Editor/common/iconslist.js +23 -17
- package/dist/Editor/commonStyle.js +126 -9
- package/dist/Editor/helper/deserialize/index.js +4 -1
- package/dist/Editor/helper/index.js +2 -2
- package/dist/Editor/helper/theme.js +24 -1
- package/dist/Editor/hooks/useMouseMove.js +5 -2
- package/dist/Editor/hooks/useTable.js +195 -0
- package/dist/Editor/plugins/withCustomDeleteBackward.js +3 -2
- package/dist/Editor/plugins/withHTML.js +17 -1
- package/dist/Editor/plugins/withLayout.js +48 -1
- package/dist/Editor/utils/SlateUtilityFunctions.js +18 -0
- package/dist/Editor/utils/button.js +4 -4
- package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +21 -0
- package/dist/Editor/utils/dataView.js +43 -0
- package/dist/Editor/utils/embed.js +2 -1
- package/dist/Editor/utils/events.js +0 -1
- package/dist/Editor/utils/font.js +11 -4
- package/dist/Editor/utils/formfield.js +8 -4
- package/dist/Editor/utils/helper.js +67 -2
- package/dist/Editor/utils/insertNewLine.js +19 -1
- package/dist/Editor/utils/pageSettings.js +14 -2
- package/dist/Editor/utils/serializeToText.js +2 -0
- package/dist/Editor/utils/table.js +228 -24
- package/package.json +1 -1
@@ -1,9 +1,11 @@
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
2
|
-
import { DialogTitle, DialogContent, DialogActions, Button, Grid, IconButton, Typography, Drawer, SwipeableDrawer } from "@mui/material";
|
2
|
+
import { DialogTitle, DialogContent, DialogActions, Button, Grid, IconButton, Typography, Drawer, SwipeableDrawer, Accordion, AccordionSummary, AccordionDetails, createTheme } from "@mui/material";
|
3
3
|
import FieldMap from "./fieldTypes";
|
4
4
|
import CloseIcon from "@mui/icons-material/Close";
|
5
5
|
import useCommonStyle from "../../commonStyle";
|
6
6
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
7
|
+
import { ThemeProvider } from "@mui/material/styles";
|
8
|
+
import { ExpandMoreOutlined, ExpandMoreSharp } from "@mui/icons-material";
|
7
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
11
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -73,6 +75,37 @@ const StyleBuilder = props => {
|
|
73
75
|
} = tabVal || {
|
74
76
|
needActions: true
|
75
77
|
};
|
78
|
+
const {
|
79
|
+
hideTools
|
80
|
+
} = customProps || {};
|
81
|
+
const muiTheme = createTheme({
|
82
|
+
components: {
|
83
|
+
MuiAccordion: {
|
84
|
+
styleOverrides: {
|
85
|
+
root: {
|
86
|
+
"& .MuiAccordionSummary-root": {
|
87
|
+
flexDirection: "row-reverse",
|
88
|
+
"& .MuiSvgIcon-root": {
|
89
|
+
color: theme?.palette?.primary?.main
|
90
|
+
},
|
91
|
+
"& .Mui-expanded": {
|
92
|
+
"& .MuiSvgIcon-root": {
|
93
|
+
color: theme?.palette?.text?.blueText
|
94
|
+
}
|
95
|
+
}
|
96
|
+
},
|
97
|
+
padding: "0px",
|
98
|
+
"&.Mui-expanded": {
|
99
|
+
margin: "0"
|
100
|
+
}
|
101
|
+
}
|
102
|
+
},
|
103
|
+
defaultProps: {
|
104
|
+
elevation: 0
|
105
|
+
}
|
106
|
+
}
|
107
|
+
}
|
108
|
+
});
|
76
109
|
useEffect(() => {
|
77
110
|
if (customProps?.onDrawerOpen) {
|
78
111
|
customProps?.onDrawerOpen(true);
|
@@ -140,22 +173,62 @@ const StyleBuilder = props => {
|
|
140
173
|
}), /*#__PURE__*/_jsx(DialogContent, {
|
141
174
|
sx: {
|
142
175
|
maxHeight: isMobile ? `500px` : `${window.innerHeight - 125}px`,
|
143
|
-
padding: "
|
176
|
+
padding: "0px"
|
144
177
|
},
|
145
178
|
children: renderTabs.map((m, i) => {
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
179
|
+
if (m?.hasChildrenTabs) {
|
180
|
+
return /*#__PURE__*/_jsx(ThemeProvider, {
|
181
|
+
theme: muiTheme,
|
182
|
+
children: /*#__PURE__*/_jsxs(Accordion, {
|
183
|
+
defaultExpanded: true,
|
184
|
+
children: [/*#__PURE__*/_jsx(AccordionSummary, {
|
185
|
+
expandIcon: /*#__PURE__*/_jsx(ExpandMoreSharp, {}),
|
186
|
+
sx: {
|
187
|
+
padding: "0px"
|
188
|
+
},
|
189
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
190
|
+
variant: "body1",
|
191
|
+
className: "settingsHeader",
|
192
|
+
color: "primary",
|
193
|
+
style: {
|
194
|
+
fontSize: "14px !important",
|
195
|
+
fontWeight: "400 !important"
|
196
|
+
},
|
197
|
+
children: m?.tab
|
198
|
+
})
|
199
|
+
}), /*#__PURE__*/_jsx(AccordionDetails, {
|
200
|
+
sx: {
|
201
|
+
padding: "5px"
|
202
|
+
},
|
203
|
+
children: m?.fields.filter(f => (hideTools || []).indexOf(f.value) === -1).map((field, index) => {
|
204
|
+
return /*#__PURE__*/_jsx(StyleContent, {
|
205
|
+
renderTabs: [field],
|
206
|
+
value: field.value,
|
207
|
+
element: elementProps,
|
208
|
+
onChange: onElementPropsChange,
|
209
|
+
customProps: customProps,
|
210
|
+
handleClose: handleClose
|
211
|
+
}, `tab_${field.value}_${index}`);
|
212
|
+
})
|
213
|
+
})]
|
214
|
+
}, `accordion_${i}`)
|
215
|
+
}, i);
|
216
|
+
} else {
|
217
|
+
return /*#__PURE__*/_jsx(StyleContent, {
|
218
|
+
renderTabs: renderTabs,
|
219
|
+
value: m.value,
|
220
|
+
element: elementProps,
|
221
|
+
onChange: onElementPropsChange,
|
222
|
+
customProps: customProps,
|
223
|
+
handleClose: handleClose
|
224
|
+
}, `tab_${m.value}_$${i}`);
|
225
|
+
}
|
154
226
|
})
|
155
227
|
}), needActions ? /*#__PURE__*/_jsxs(DialogActions, {
|
156
228
|
sx: {
|
157
229
|
p: 0,
|
158
230
|
pt: 2,
|
231
|
+
pl: 1,
|
159
232
|
justifyContent: "space-between"
|
160
233
|
},
|
161
234
|
children: [onDelete ? /*#__PURE__*/_jsx(Button, {
|
@@ -180,7 +253,7 @@ const StyleBuilder = props => {
|
|
180
253
|
style: {
|
181
254
|
zIndex: "1300"
|
182
255
|
},
|
183
|
-
sx: classes.
|
256
|
+
sx: classes.sideBarDrawer,
|
184
257
|
children: renderDrawerMenu()
|
185
258
|
}) : /*#__PURE__*/_jsx(Drawer, {
|
186
259
|
open: true,
|
@@ -1,35 +1,69 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
import { toolbarGroups } from "../../Toolbar/toolbarGroups";
|
2
|
+
import { fontOptions } from "../../utils/font";
|
3
|
+
import { capitalizeFirstLetter } from "../../utils/helper";
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
5
|
+
const allTools = toolbarGroups.flat();
|
6
|
+
const fontWeight = allTools.find(f => f.format === "fontWeight");
|
7
|
+
function getKey(prefix, key) {
|
8
|
+
const settingKey = prefix === "col" ? `entire${capitalizeFirstLetter(key)}` : key;
|
9
|
+
return `${prefix}.${settingKey}`;
|
10
|
+
}
|
11
|
+
function getCommonSettings(prefix) {
|
12
|
+
let settings = [{
|
13
|
+
label: "Font Family",
|
14
|
+
key: "fontFamily",
|
15
|
+
type: "textOptions",
|
16
|
+
webFont: true,
|
17
|
+
options: fontOptions,
|
18
|
+
renderOption: option => {
|
19
|
+
return /*#__PURE__*/_jsx("span", {
|
20
|
+
style: {
|
21
|
+
fontFamily: option.value
|
22
|
+
},
|
23
|
+
children: option.text
|
24
|
+
});
|
25
|
+
}
|
26
|
+
}, {
|
27
|
+
label: "Font Weight",
|
28
|
+
key: "fontWeight",
|
29
|
+
type: "textOptions",
|
30
|
+
options: fontWeight?.options,
|
31
|
+
width: 7
|
32
|
+
}, {
|
33
|
+
label: "Font Size",
|
34
|
+
key: "textSize",
|
35
|
+
type: "fontSize",
|
36
|
+
width: 5,
|
37
|
+
placeholder: "16px or 1em"
|
8
38
|
}, {
|
9
|
-
label: "
|
10
|
-
key: "
|
39
|
+
label: "Text Color",
|
40
|
+
key: "textColor",
|
11
41
|
type: "color"
|
12
|
-
}
|
13
|
-
|
14
|
-
|
15
|
-
value: "rowSettings",
|
16
|
-
fields: [{
|
17
|
-
label: "Row Background",
|
18
|
-
key: "row.bgColor",
|
42
|
+
}, {
|
43
|
+
label: "Background",
|
44
|
+
key: "bgColor",
|
19
45
|
type: "color"
|
20
46
|
}, {
|
21
|
-
label: "
|
22
|
-
key: "
|
47
|
+
label: "Border",
|
48
|
+
key: "borderColor",
|
23
49
|
type: "color"
|
24
|
-
}]
|
50
|
+
}];
|
51
|
+
|
52
|
+
// modify keys based on setting type (prefix)
|
53
|
+
settings = settings.map(s => ({
|
54
|
+
...s,
|
55
|
+
key: getKey(prefix, s.key)
|
56
|
+
}));
|
57
|
+
return settings;
|
58
|
+
}
|
59
|
+
const tableStyle = [{
|
60
|
+
tab: "Table",
|
61
|
+
value: "tableSettings",
|
62
|
+
fields: getCommonSettings("table")
|
25
63
|
}, {
|
26
|
-
tab: "
|
64
|
+
tab: "Selected cell",
|
27
65
|
value: "columnSettings",
|
28
66
|
fields: [{
|
29
|
-
label: "Entire Column Background",
|
30
|
-
key: "col.entireBgColor",
|
31
|
-
type: "color"
|
32
|
-
}, {
|
33
67
|
label: "Selected Cell Background",
|
34
68
|
key: "col.bgColor",
|
35
69
|
type: "color"
|
@@ -48,4 +82,14 @@ const tableStyle = [{
|
|
48
82
|
placeholder: "Hide on Mobile"
|
49
83
|
}]
|
50
84
|
}];
|
51
|
-
export default tableStyle;
|
85
|
+
export default tableStyle;
|
86
|
+
export const tableRowStyle = [{
|
87
|
+
tab: "Row",
|
88
|
+
value: "rowSettings",
|
89
|
+
fields: getCommonSettings("row")
|
90
|
+
}];
|
91
|
+
export const tableColumnStyle = [{
|
92
|
+
tab: "Column",
|
93
|
+
value: "columnSettings",
|
94
|
+
fields: getCommonSettings("col")
|
95
|
+
}];
|
@@ -6,14 +6,25 @@ const Styles = theme => ({
|
|
6
6
|
"& .MuiDrawer-paper": {
|
7
7
|
borderTopLeftRadius: 8,
|
8
8
|
borderTopRightRadius: 8,
|
9
|
-
backgroundColor: theme?.palette?.editor?.miniToolBarBackground
|
9
|
+
backgroundColor: theme?.palette?.editor?.miniToolBarBackground,
|
10
|
+
"& .MuiInputBase-root": {
|
11
|
+
border: `1px solid ${theme?.palette?.editor?.textColor}`,
|
12
|
+
color: theme?.palette?.editor?.textColor
|
13
|
+
},
|
14
|
+
"& .MuiSvgIcon-root": {
|
15
|
+
color: theme?.palette?.editor?.textColor
|
16
|
+
},
|
17
|
+
"& .MuiFormLabel-root": {
|
18
|
+
color: theme?.palette?.editor?.textColor,
|
19
|
+
backgroundColor: theme?.palette?.editor?.background
|
20
|
+
}
|
10
21
|
}
|
11
22
|
},
|
12
23
|
childContainer: {
|
13
24
|
padding: "20px",
|
14
|
-
|
15
|
-
padding:
|
16
|
-
paddingTop:
|
25
|
+
"&.emojiDrawer": {
|
26
|
+
padding: "unset",
|
27
|
+
paddingTop: "10px"
|
17
28
|
}
|
18
29
|
}
|
19
30
|
});
|
@@ -4,6 +4,7 @@ import { convertBase64 } from "../utils/helper";
|
|
4
4
|
import { uploadFile } from "../service/fileupload";
|
5
5
|
import Icon from "./Icon";
|
6
6
|
import UploadStyles from "../common/ImageSelector/UploadStyles";
|
7
|
+
import { useEditorContext } from "../hooks/useMouseMove";
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
9
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
9
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -18,6 +19,9 @@ const Uploader = props => {
|
|
18
19
|
const [base64, setBase64] = useState(value?.url);
|
19
20
|
const [fileName, setFileName] = useState("");
|
20
21
|
const [uploading, setUploading] = useState(false);
|
22
|
+
const {
|
23
|
+
theme
|
24
|
+
} = useEditorContext();
|
21
25
|
const handleChange = async e => {
|
22
26
|
const uFile = e.target.files[0];
|
23
27
|
const strImage = await convertBase64(uFile);
|
@@ -98,6 +102,10 @@ const Uploader = props => {
|
|
98
102
|
className: "uploadImageSection",
|
99
103
|
children: base64 ? renderThumb() : /*#__PURE__*/_jsx(Grid, {
|
100
104
|
className: "uploadImageText",
|
105
|
+
sx: {
|
106
|
+
background: `${theme?.palette?.editor?.inputFieldBgColor}`,
|
107
|
+
border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`
|
108
|
+
},
|
101
109
|
children: /*#__PURE__*/_jsxs(Button, {
|
102
110
|
component: "label",
|
103
111
|
variant: "text",
|