@flozy/editor 4.1.5 → 4.1.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/ChatEditor.js +12 -1
- package/dist/Editor/Editor.css +8 -0
- package/dist/Editor/Elements/AI/AIInput.js +1 -1
- package/dist/Editor/Elements/AI/PopoverAIInput.js +22 -16
- package/dist/Editor/Elements/AI/Styles.js +2 -1
- package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +3 -3
- package/dist/Editor/Elements/Link/LinkPopup.js +8 -1
- package/dist/Editor/Elements/Link/LinkPopupStyles.js +35 -23
- package/dist/Editor/Elements/Signature/SignaturePopup.js +37 -37
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +15 -15
- package/dist/Editor/common/FontLoader/FontLoader.js +1 -0
- package/dist/Editor/common/Icon.js +8 -11
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +15 -1
- package/dist/Editor/common/iconListV2.js +77 -10
- package/dist/Editor/commonStyle.js +8 -3
- package/dist/Editor/utils/helper.js +24 -0
- package/package.json +1 -1
@@ -248,6 +248,16 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
248
248
|
restVal
|
249
249
|
});
|
250
250
|
};
|
251
|
+
const handlePaste = event => {
|
252
|
+
const items = event.clipboardData.items;
|
253
|
+
for (let i = 0; i < items.length; i++) {
|
254
|
+
if (items[i].type.startsWith("image/")) {
|
255
|
+
event.preventDefault(); // Prevent the default paste behavior
|
256
|
+
return; // Exit early to keep the editor empty
|
257
|
+
}
|
258
|
+
}
|
259
|
+
};
|
260
|
+
|
251
261
|
return /*#__PURE__*/_jsx(EditorProvider, {
|
252
262
|
theme: theme,
|
253
263
|
editor: editor,
|
@@ -267,7 +277,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
267
277
|
placeholder: "Start typing ...",
|
268
278
|
spellCheck: true,
|
269
279
|
onBlur: handleBlur,
|
270
|
-
onKeyDown: onKeyDown
|
280
|
+
onKeyDown: onKeyDown,
|
281
|
+
onPaste: handlePaste
|
271
282
|
}), !readOnly ? /*#__PURE__*/_jsx(MentionsPopup, {
|
272
283
|
ref: mentionsRef,
|
273
284
|
mentions: mentions,
|
package/dist/Editor/Editor.css
CHANGED
@@ -81,7 +81,7 @@ function AIInput({
|
|
81
81
|
const selectWrapper = refs?.length ? refs[1]?.current : null;
|
82
82
|
const slateWrapper = document.getElementById("slate-wrapper-scroll-container");
|
83
83
|
if (selectWrapper && slateWrapper) {
|
84
|
-
const height = slateWrapper.offsetHeight - selectWrapper.offsetHeight -
|
84
|
+
const height = slateWrapper.offsetHeight - selectWrapper.offsetHeight - 170;
|
85
85
|
setContentHeight(height + "px");
|
86
86
|
}
|
87
87
|
}, [refs, generatedText]);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { useEffect,
|
1
|
+
import { useEffect, useState } from "react";
|
2
2
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
3
3
|
import Styles from "./Styles";
|
4
4
|
import { Fade, Paper, Popper } from "@mui/material";
|
@@ -11,9 +11,14 @@ import { VoiceToText } from "./VoiceToText";
|
|
11
11
|
import deserialize from "../../helper/deserialize";
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
13
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
14
|
+
const getInputWidth = selectedElement => {
|
15
|
+
const sectionElementWidth = selectedElement?.anchorEl || document.querySelector(".ed-section-inner");
|
16
|
+
const MIN_WIDTH = 400;
|
17
|
+
return sectionElementWidth?.offsetWidth || MIN_WIDTH;
|
18
|
+
};
|
14
19
|
const scrollToAIInput = editor => {
|
15
|
-
|
16
|
-
|
20
|
+
setTimeout(() => {
|
21
|
+
try {
|
17
22
|
const slateWrapper = document.getElementById("slate-wrapper-scroll-container");
|
18
23
|
let selectionRect;
|
19
24
|
if (getSelectedText(editor)) {
|
@@ -28,10 +33,10 @@ const scrollToAIInput = editor => {
|
|
28
33
|
// scroll to top of the slateWrapper
|
29
34
|
slateWrapper.scrollBy(0, cursorViewPortPosition - 80);
|
30
35
|
}
|
31
|
-
}
|
32
|
-
|
33
|
-
|
34
|
-
}
|
36
|
+
} catch (err) {
|
37
|
+
console.log(err);
|
38
|
+
}
|
39
|
+
}, 200);
|
35
40
|
};
|
36
41
|
const insertText = (editor, text, options) => {
|
37
42
|
const parsed = new DOMParser().parseFromString(text, "text/html");
|
@@ -94,7 +99,7 @@ const getNextLine = editor => {
|
|
94
99
|
return null;
|
95
100
|
}
|
96
101
|
};
|
97
|
-
const updateAnchorEl = (setAnchorEl, editor, openAI) => {
|
102
|
+
const updateAnchorEl = (setAnchorEl, editor, openAI, selectedElement) => {
|
98
103
|
try {
|
99
104
|
if (!editor.selection) {
|
100
105
|
return;
|
@@ -123,8 +128,9 @@ const updateAnchorEl = (setAnchorEl, editor, openAI) => {
|
|
123
128
|
|
124
129
|
const getBoundingClientRect = () => {
|
125
130
|
const editorContainer = document.querySelector("#slate-wrapper-scroll-container")?.getBoundingClientRect();
|
126
|
-
const editorEle = document.querySelector(".ed-section-inner")?.getBoundingClientRect();
|
127
131
|
const caretPos = caret.getBoundingClientRect();
|
132
|
+
const sectionEle = selectedElement?.anchorEl || document.querySelector(".ed-section-inner");
|
133
|
+
const selectedSectionRect = sectionEle?.getBoundingClientRect();
|
128
134
|
const isAIInputReachTop = caretPos.height + caretPos.y <= editorContainer.y;
|
129
135
|
const yValue = isAIInputReachTop ? "-500" : caretPos.y; // -500 is to hide the AI input if the toolbar reached the top
|
130
136
|
|
@@ -134,9 +140,9 @@ const updateAnchorEl = (setAnchorEl, editor, openAI) => {
|
|
134
140
|
top: yValue,
|
135
141
|
right: caretPos.right,
|
136
142
|
bottom: caretPos.bottom,
|
137
|
-
x:
|
138
|
-
left:
|
139
|
-
width:
|
143
|
+
x: selectedSectionRect.x,
|
144
|
+
left: selectedSectionRect.left,
|
145
|
+
width: selectedSectionRect.width
|
140
146
|
};
|
141
147
|
};
|
142
148
|
setAnchorEl({
|
@@ -155,7 +161,8 @@ function PopoverAIInput({
|
|
155
161
|
} = otherProps;
|
156
162
|
const {
|
157
163
|
openAI,
|
158
|
-
setOpenAI
|
164
|
+
setOpenAI,
|
165
|
+
selectedElement
|
159
166
|
} = useEditorContext();
|
160
167
|
const [anchorEl, setAnchorEl] = useState(null);
|
161
168
|
const [loading, setLoading] = useState(false);
|
@@ -174,9 +181,8 @@ function PopoverAIInput({
|
|
174
181
|
ReactEditor.focus(editor);
|
175
182
|
Transforms.deselect(editor);
|
176
183
|
};
|
177
|
-
const editorElement = document.querySelector(".ed-section-inner");
|
178
184
|
useEffect(() => {
|
179
|
-
updateAnchorEl(setAnchorEl, editor, openAI);
|
185
|
+
updateAnchorEl(setAnchorEl, editor, openAI, selectedElement);
|
180
186
|
}, [openAI, editor.selection]);
|
181
187
|
useEffect(() => {
|
182
188
|
if (openAI) {
|
@@ -269,7 +275,7 @@ function PopoverAIInput({
|
|
269
275
|
placement: "bottom-start",
|
270
276
|
sx: {
|
271
277
|
...classes.aiPopper,
|
272
|
-
width:
|
278
|
+
width: getInputWidth(selectedElement)
|
273
279
|
},
|
274
280
|
children: ({
|
275
281
|
TransitionProps
|
@@ -37,14 +37,14 @@ const FormTextArea = props => {
|
|
37
37
|
...getTRBLBreakPoints(bannerSpacing)
|
38
38
|
},
|
39
39
|
height: height || "150px",
|
40
|
-
borderColor: borderColor || "transparent"
|
40
|
+
borderColor: `${borderColor || "transparent"} !important`,
|
41
41
|
borderWidth: borderWidth || "1px",
|
42
42
|
borderRadius: {
|
43
43
|
...getBreakPointsValue(borderRadius || {}, null, "overrideBorderRadius", true)
|
44
44
|
},
|
45
45
|
borderStyle: borderStyle || "solid",
|
46
|
-
color: textColor || "#000"
|
47
|
-
background: bgColor || "transparent"
|
46
|
+
color: `${textColor || "#000"} !important`,
|
47
|
+
background: `${bgColor || "transparent"} !important`,
|
48
48
|
fontSize: '14px'
|
49
49
|
}
|
50
50
|
})
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Dialog, DialogActions, DialogContent, DialogTitle, FormControl, FormControlLabel, Grid, TextField, Button, IconButton, Typography, Checkbox, Divider } from "@mui/material";
|
3
3
|
import CloseIcon from "@mui/icons-material/Close";
|
4
|
+
import LinkPopupStyles from "./LinkPopupStyles";
|
5
|
+
import { getEditorTheme } from "../../utils/helper";
|
4
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
6
8
|
const LinkPopup = props => {
|
@@ -12,10 +14,13 @@ const LinkPopup = props => {
|
|
12
14
|
handleInsertLink
|
13
15
|
} = props;
|
14
16
|
const themeType = localStorage.getItem("themeType");
|
17
|
+
const classes = LinkPopupStyles(themeType);
|
18
|
+
const themeStyle = getEditorTheme(themeType);
|
15
19
|
return /*#__PURE__*/_jsxs(Dialog, {
|
16
20
|
fullWidth: true,
|
17
21
|
open: open,
|
18
22
|
className: `dialogComp`,
|
23
|
+
sx: classes.dialogRoot,
|
19
24
|
children: [/*#__PURE__*/_jsx(DialogTitle, {
|
20
25
|
sx: {
|
21
26
|
padding: "13px 19px 9px 19px"
|
@@ -38,7 +43,9 @@ const LinkPopup = props => {
|
|
38
43
|
},
|
39
44
|
children: /*#__PURE__*/_jsx(IconButton, {
|
40
45
|
onClick: handleClose,
|
41
|
-
|
46
|
+
sx: {
|
47
|
+
color: themeStyle?.editor?.svgStroke
|
48
|
+
},
|
42
49
|
children: /*#__PURE__*/_jsx(CloseIcon, {})
|
43
50
|
})
|
44
51
|
})]
|
@@ -1,28 +1,40 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
},
|
11
|
-
"& .MuiOutlinedInput-root": {
|
12
|
-
boxShadow: "0px 4px 10px rgba(0, 0, 0, 0.16)",
|
13
|
-
color: themeType === "dark" ? "#FFFFFF !important" : "#000000 !important",
|
14
|
-
borderRadius: "7px",
|
15
|
-
"& fieldset": {
|
16
|
-
borderColor: "#D8DDE1"
|
1
|
+
import { getEditorTheme } from "../../utils/helper";
|
2
|
+
const LinkPopupStyles = themeType => {
|
3
|
+
const themeStyle = getEditorTheme(themeType);
|
4
|
+
return {
|
5
|
+
addLinkField: {
|
6
|
+
"& .MuiOutlinedInput-input": {
|
7
|
+
fontSize: "12px",
|
8
|
+
fontWeight: 500,
|
9
|
+
color: themeType === "dark" ? "#FFFFFF !important" : "#000000 !important"
|
17
10
|
},
|
18
|
-
"
|
19
|
-
|
11
|
+
"& .MuiFormHelperText-root": {
|
12
|
+
color: themeType === "dark" ? "#FFFFFF !important" : "#000000 !important"
|
20
13
|
},
|
21
|
-
"
|
22
|
-
|
14
|
+
"& .MuiOutlinedInput-root": {
|
15
|
+
boxShadow: "0px 4px 10px rgba(0, 0, 0, 0.16)",
|
16
|
+
color: themeType === "dark" ? "#FFFFFF !important" : "#000000 !important",
|
17
|
+
borderRadius: "7px",
|
18
|
+
"& fieldset": {
|
19
|
+
borderColor: "#D8DDE1"
|
20
|
+
},
|
21
|
+
"&:hover fieldset": {
|
22
|
+
borderColor: "#64748B"
|
23
|
+
},
|
24
|
+
"&.Mui-focused fieldset": {
|
25
|
+
borderColor: "#2563EB"
|
26
|
+
},
|
27
|
+
"& .MuiFormLabel-root": {}
|
28
|
+
}
|
29
|
+
},
|
30
|
+
dialogRoot: {
|
31
|
+
"& .MuiPaper-root": {
|
32
|
+
background: `${themeStyle?.editor?.background} !important`
|
23
33
|
},
|
24
|
-
"& .
|
34
|
+
"& .MuiTypography-root": {
|
35
|
+
color: `${themeStyle?.editor?.color} !important`
|
36
|
+
}
|
25
37
|
}
|
26
|
-
}
|
27
|
-
}
|
38
|
+
};
|
39
|
+
};
|
28
40
|
export default LinkPopupStyles;
|
@@ -10,6 +10,7 @@ import useCommonStyle from "../../commonStyle";
|
|
10
10
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
11
11
|
import { validationMethods } from "../Form/FormElements/validations";
|
12
12
|
import { CalenderDownIconSignature, CalenderIconSignature } from "../../common/iconListV2";
|
13
|
+
import ColorPickerButton from "../../common/ColorPickerButton";
|
13
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
14
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
15
16
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -96,10 +97,10 @@ const SignaturePopup = props => {
|
|
96
97
|
size: val
|
97
98
|
});
|
98
99
|
};
|
99
|
-
const onBrushColor =
|
100
|
+
const onBrushColor = color => {
|
100
101
|
setBrush({
|
101
102
|
...brush,
|
102
|
-
color
|
103
|
+
color
|
103
104
|
});
|
104
105
|
};
|
105
106
|
const onUploadDone = data => {
|
@@ -138,9 +139,8 @@ const SignaturePopup = props => {
|
|
138
139
|
fullWidth: true,
|
139
140
|
PaperProps: {
|
140
141
|
sx: {
|
141
|
-
borderRadius:
|
142
|
+
borderRadius: "8px",
|
142
143
|
boxShadow: "0px 4px 10px 0px #00000029",
|
143
|
-
overflowY: tab === 0 ? "hidden" : "auto",
|
144
144
|
maxWidth: "560px",
|
145
145
|
...classes.signaturePopup
|
146
146
|
}
|
@@ -264,14 +264,15 @@ const SignaturePopup = props => {
|
|
264
264
|
sx: {
|
265
265
|
pt: 2
|
266
266
|
},
|
267
|
-
spacing:
|
267
|
+
spacing: 2,
|
268
268
|
style: {
|
269
269
|
display: "flex",
|
270
270
|
justifyContent: "space-between"
|
271
271
|
},
|
272
272
|
children: [/*#__PURE__*/_jsxs(Grid, {
|
273
273
|
item: true,
|
274
|
-
xs:
|
274
|
+
xs: 12,
|
275
|
+
sm: 6,
|
275
276
|
style: {
|
276
277
|
display: "flex",
|
277
278
|
alignItems: "center",
|
@@ -279,8 +280,8 @@ const SignaturePopup = props => {
|
|
279
280
|
fontFamily: '"Inter", sans-serif"'
|
280
281
|
},
|
281
282
|
children: [/*#__PURE__*/_jsx(Grid, {
|
282
|
-
|
283
|
-
|
283
|
+
sx: {
|
284
|
+
minWidth: "46px"
|
284
285
|
},
|
285
286
|
children: /*#__PURE__*/_jsx("label", {
|
286
287
|
htmlFor: "signedBy",
|
@@ -303,20 +304,20 @@ const SignaturePopup = props => {
|
|
303
304
|
size: "small",
|
304
305
|
onChange: onChange,
|
305
306
|
sx: {
|
306
|
-
|
307
|
-
borderRadius:
|
308
|
-
|
307
|
+
"& .MuiOutlinedInput-root": {
|
308
|
+
borderRadius: "10px",
|
309
|
+
"& fieldset": {
|
309
310
|
borderColor: "1px solid #D8DDE1"
|
310
311
|
}
|
311
312
|
// '&:hover fieldset': {
|
312
|
-
// borderColor: 'yourHoverColor',
|
313
|
+
// borderColor: 'yourHoverColor',
|
313
314
|
// },
|
314
315
|
// '&.Mui-focused fieldset': {
|
315
316
|
// borderColor: 'yourFocusedColor',
|
316
317
|
// },
|
317
318
|
},
|
318
319
|
|
319
|
-
|
320
|
+
"& .MuiInputBase-input::placeholder": {
|
320
321
|
fontFamily: '"Inter", sans-serif"',
|
321
322
|
fontSize: "14px"
|
322
323
|
}
|
@@ -325,16 +326,16 @@ const SignaturePopup = props => {
|
|
325
326
|
})]
|
326
327
|
}), /*#__PURE__*/_jsxs(Grid, {
|
327
328
|
item: true,
|
328
|
-
xs:
|
329
|
+
xs: 12,
|
330
|
+
sm: 6,
|
329
331
|
style: {
|
330
332
|
display: "flex",
|
331
333
|
alignItems: "center"
|
332
334
|
},
|
333
335
|
children: [/*#__PURE__*/_jsx(Grid, {
|
334
|
-
|
335
|
-
|
336
|
+
sx: {
|
337
|
+
minWidth: "46px"
|
336
338
|
},
|
337
|
-
xs: 2,
|
338
339
|
children: /*#__PURE__*/_jsx("label", {
|
339
340
|
htmlFor: "signedOn",
|
340
341
|
style: {
|
@@ -350,6 +351,7 @@ const SignaturePopup = props => {
|
|
350
351
|
e?.stopPropagation();
|
351
352
|
},
|
352
353
|
xs: 12,
|
354
|
+
sx: classes.datePicker,
|
353
355
|
children: /*#__PURE__*/_jsx(DatePicker, {
|
354
356
|
selected: signedData.signedOn,
|
355
357
|
onChange: date => {
|
@@ -416,16 +418,16 @@ const SignaturePopup = props => {
|
|
416
418
|
})]
|
417
419
|
}), /*#__PURE__*/_jsxs(Grid, {
|
418
420
|
item: true,
|
419
|
-
xs: 12,
|
420
421
|
style: {
|
421
422
|
display: "flex",
|
422
423
|
alignItems: "center"
|
423
424
|
},
|
425
|
+
xs: 12,
|
426
|
+
sm: 6,
|
424
427
|
children: [/*#__PURE__*/_jsx(Grid, {
|
425
|
-
|
426
|
-
|
428
|
+
sx: {
|
429
|
+
minWidth: "46px"
|
427
430
|
},
|
428
|
-
xs: 1,
|
429
431
|
children: /*#__PURE__*/_jsx("label", {
|
430
432
|
htmlFor: "signedByEmail",
|
431
433
|
style: {
|
@@ -438,7 +440,6 @@ const SignaturePopup = props => {
|
|
438
440
|
}), /*#__PURE__*/_jsx(Grid, {
|
439
441
|
container: true,
|
440
442
|
item: true,
|
441
|
-
xs: 11,
|
442
443
|
children: /*#__PURE__*/_jsx(TextField, {
|
443
444
|
fullWidth: true,
|
444
445
|
id: "signedByEmail",
|
@@ -447,20 +448,20 @@ const SignaturePopup = props => {
|
|
447
448
|
size: "small",
|
448
449
|
onChange: onChange,
|
449
450
|
sx: {
|
450
|
-
|
451
|
-
borderRadius:
|
452
|
-
|
451
|
+
"& .MuiOutlinedInput-root": {
|
452
|
+
borderRadius: "10px",
|
453
|
+
"& fieldset": {
|
453
454
|
borderColor: "1px solid #D8DDE1"
|
454
455
|
}
|
455
456
|
// '&:hover fieldset': {
|
456
|
-
// borderColor: 'yourHoverColor',
|
457
|
+
// borderColor: 'yourHoverColor',
|
457
458
|
// },
|
458
459
|
// '&.Mui-focused fieldset': {
|
459
460
|
// borderColor: 'yourFocusedColor',
|
460
461
|
// },
|
461
462
|
},
|
462
463
|
|
463
|
-
|
464
|
+
"& .MuiInputBase-input::placeholder": {
|
464
465
|
fontFamily: '"Inter", sans-serif"',
|
465
466
|
fontSize: "14px"
|
466
467
|
}
|
@@ -488,14 +489,13 @@ const SignaturePopup = props => {
|
|
488
489
|
container: true,
|
489
490
|
alignItems: "center",
|
490
491
|
sx: {
|
491
|
-
display:
|
492
|
+
display: "flex"
|
492
493
|
},
|
493
|
-
children: [/*#__PURE__*/_jsx(
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
value: brush?.color
|
494
|
+
children: [/*#__PURE__*/_jsx(ColorPickerButton, {
|
495
|
+
classes: classes,
|
496
|
+
value: brush.color,
|
497
|
+
onSave: onBrushColor,
|
498
|
+
recentColors: []
|
499
499
|
}), /*#__PURE__*/_jsx("span", {
|
500
500
|
style: {
|
501
501
|
marginLeft: "10px",
|
@@ -535,11 +535,11 @@ const SignaturePopup = props => {
|
|
535
535
|
}) : null, /*#__PURE__*/_jsxs(_Fragment, {
|
536
536
|
children: [!readOnly ? /*#__PURE__*/_jsx(Button, {
|
537
537
|
onClick: handleClear,
|
538
|
-
className: "secondaryBtn",
|
539
|
-
children: "
|
538
|
+
className: "secondaryBtn actionBtn",
|
539
|
+
children: "Delete"
|
540
540
|
}) : null, /*#__PURE__*/_jsx(Button, {
|
541
541
|
onClick: handleSave,
|
542
|
-
className: `primaryBtn ${isEmpty ? "disabled" : ""}`,
|
542
|
+
className: `primaryBtn actionBtn ${isEmpty ? "disabled" : ""}`,
|
543
543
|
disabled: isEmpty,
|
544
544
|
children: "Save"
|
545
545
|
})]
|
@@ -511,16 +511,16 @@ const usePopupStyle = theme => ({
|
|
511
511
|
}
|
512
512
|
},
|
513
513
|
buttonCardMediaWrpr: {
|
514
|
-
padding:
|
514
|
+
padding: "5px",
|
515
515
|
position: "relative",
|
516
516
|
margin: "8px",
|
517
517
|
height: "50px",
|
518
|
-
|
518
|
+
"& .img-wrapper": {
|
519
519
|
"&:hover": {
|
520
|
-
padding:
|
521
|
-
backgroundColor:
|
522
|
-
border:
|
523
|
-
borderRadius:
|
520
|
+
padding: "0px 2px 0px 2px",
|
521
|
+
backgroundColor: "#E9F3FE",
|
522
|
+
border: "1px solid #2563EB40",
|
523
|
+
borderRadius: "5px",
|
524
524
|
// height: "100%",
|
525
525
|
margin: "0px"
|
526
526
|
// "& .template-card-action": {
|
@@ -590,7 +590,7 @@ const usePopupStyle = theme => ({
|
|
590
590
|
// minWidth: "130px",
|
591
591
|
border: "1px solid #E4E8EB",
|
592
592
|
maxHeight: "140px",
|
593
|
-
background: theme?.palette?.editor?.background
|
593
|
+
background: `${theme?.palette?.editor?.background} !important`,
|
594
594
|
// overflowY: "hidden",
|
595
595
|
padding: "6px 12px 6px 0px",
|
596
596
|
overflowY: "scroll",
|
@@ -613,8 +613,8 @@ const usePopupStyle = theme => ({
|
|
613
613
|
background: `${theme?.palette?.action?.selected} !important`
|
614
614
|
},
|
615
615
|
"&.selected": {
|
616
|
-
color:
|
617
|
-
background:
|
616
|
+
color: `#2563EB !important`,
|
617
|
+
background: `#E9F3FE !important`
|
618
618
|
}
|
619
619
|
},
|
620
620
|
"& .menuOptions": {
|
@@ -645,16 +645,16 @@ const usePopupStyle = theme => ({
|
|
645
645
|
}
|
646
646
|
},
|
647
647
|
fullViewCardMediaWrpr: {
|
648
|
-
padding:
|
648
|
+
padding: "5px",
|
649
649
|
position: "relative",
|
650
650
|
margin: "8px",
|
651
651
|
height: "140px",
|
652
|
-
|
652
|
+
"& .img-wrapper": {
|
653
653
|
"&:hover": {
|
654
|
-
padding:
|
655
|
-
backgroundColor:
|
656
|
-
border:
|
657
|
-
borderRadius:
|
654
|
+
padding: "0px 2px 0px 2px",
|
655
|
+
backgroundColor: "#E9F3FE",
|
656
|
+
border: "1px solid #2563EB40",
|
657
|
+
borderRadius: "5px",
|
658
658
|
margin: "0px"
|
659
659
|
}
|
660
660
|
}
|
@@ -1,19 +1,19 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { MdFormatQuote, MdFormatAlignLeft, MdFormatAlignCenter, MdFormatAlignRight, MdAdd, MdArrowForward, MdOutlinePermMedia, MdFormatAlignJustify } from "react-icons/md";
|
3
|
-
import {
|
3
|
+
import { BsCameraVideoFill, BsArrowBarRight, BsArrowBarLeft, BsCodeSlash } from "react-icons/bs";
|
4
4
|
import { FaSuperscript, FaSubscript } from "react-icons/fa";
|
5
5
|
import { FcAddRow, FcAddColumn } from "react-icons/fc";
|
6
6
|
import { AiFillEdit, AiOutlineInsertRowBelow, AiOutlineInsertRowRight, AiOutlineDelete, AiFillTag, AiOutlineUpload, AiOutlineArrowsAlt, AiOutlineInsertRowAbove, AiOutlineInsertRowLeft, AiFillHtml5 } from "react-icons/ai";
|
7
7
|
import { SiLatex } from "react-icons/si";
|
8
8
|
import { RiDeleteColumn, RiDeleteRow } from "react-icons/ri";
|
9
9
|
import { CiGrid32 } from "react-icons/ci";
|
10
|
-
import { FontFamilyIcon, FontSizeIcon, StrikethroughIcon, AppHeader, MoreHorizontal, UploadImage, LeftArrow, RightArrow, CheckListButton, CheckListButtonActive, ExcelIcon, CsvIcon, CloseIcon, SearchIcon, ExpandIcon,
|
10
|
+
import { FontFamilyIcon, FontSizeIcon, StrikethroughIcon, AppHeader, MoreHorizontal, UploadImage, LeftArrow, RightArrow, CheckListButton, CheckListButtonActive, ExcelIcon, CsvIcon, CloseIcon, SearchIcon, ExpandIcon, Text, TextAreaIcon, Phone, BriefCase, Bank, CalendarTick, DollarSquare, Checkbox, Description, RadioButtonIcon, CheckedIcon, UncheckedIcon, InfinityIcon, ResetIcon } from "./iconslist";
|
11
11
|
import ArrowRightIcon from "@mui/icons-material/ArrowRight";
|
12
12
|
import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
|
13
13
|
import EmailRoundedIcon from "@mui/icons-material/EmailRounded";
|
14
14
|
import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
|
15
|
-
import { AccordionTextFormatIcon, BoldTextFormatIcon, BulletedListTextFormatIcon, ButtonElementIcon, CarouselElementIcon, CheckListTextFormatIcon, ColorBoxElementIcon, DividerElementIcon, DocUploadElementIcon, EmbedElementIcon, EmojiElementIcon, FormElementIcon, GridElementIcon, ImageElementIcon, ItalicTextFormatIcon, LinkIconV2, OrderedListTextFormatIcon, SignatureElementIcon, TableElementIcon, TopBannerElementIcon, UnderlineTextFormatIcon, VideoElementIcon } from "./iconListV2";
|
16
|
-
import MoreVertRoundedIcon from
|
15
|
+
import { AccordionTextFormatIcon, BoldTextFormatIcon, BulletedListTextFormatIcon, ButtonElementIcon, CarouselElementIcon, CheckListTextFormatIcon, ColorBoxElementIcon, DividerElementIcon, DocUploadElementIcon, EmbedElementIcon, EmojiElementIcon, FormElementIcon, GridElementIcon, H1, H2, H3, ImageElementIcon, ItalicTextFormatIcon, LinkIconV2, OrderedListTextFormatIcon, SignatureElementIcon, TableElementIcon, TopBannerElementIcon, UnderlineTextFormatIcon, VideoElementIcon, CalendlyIcon } from "./iconListV2";
|
16
|
+
import MoreVertRoundedIcon from "@mui/icons-material/MoreVertRounded";
|
17
17
|
import SettingsIcon from "../assets/svg/SettingsIcon";
|
18
18
|
import UndoIcon from "../assets/svg/UndoIcon";
|
19
19
|
import RedoIcon from "../assets/svg/RedoIcon";
|
@@ -46,15 +46,12 @@ const iconList = {
|
|
46
46
|
underline: /*#__PURE__*/_jsx(UnderlineTextFormatIcon, {
|
47
47
|
size: 20
|
48
48
|
}),
|
49
|
-
headingOne: /*#__PURE__*/_jsx(
|
49
|
+
headingOne: /*#__PURE__*/_jsx(H1, {}),
|
50
|
+
headingTwo: /*#__PURE__*/_jsx(H2, {
|
50
51
|
size: 18,
|
51
52
|
fill: "#64748B"
|
52
53
|
}),
|
53
|
-
|
54
|
-
size: 18,
|
55
|
-
fill: "#64748B"
|
56
|
-
}),
|
57
|
-
headingThree: /*#__PURE__*/_jsx(BsTypeH3, {
|
54
|
+
headingThree: /*#__PURE__*/_jsx(H3, {
|
58
55
|
size: 18,
|
59
56
|
fill: "#64748B"
|
60
57
|
}),
|
@@ -227,7 +224,7 @@ const iconList = {
|
|
227
224
|
fill: "#64748B"
|
228
225
|
}
|
229
226
|
}),
|
230
|
-
calenderNewIcon: /*#__PURE__*/_jsx(
|
227
|
+
calenderNewIcon: /*#__PURE__*/_jsx(CalendlyIcon, {}),
|
231
228
|
freegrid: /*#__PURE__*/_jsx(CiGrid32, {
|
232
229
|
size: 20,
|
233
230
|
style: {
|
@@ -25,8 +25,22 @@ const Settings = props => {
|
|
25
25
|
children: /*#__PURE__*/_jsx(Popper, {
|
26
26
|
open: open,
|
27
27
|
anchorEl: anchorEl,
|
28
|
-
placement:
|
28
|
+
placement: "auto-start",
|
29
29
|
sx: classes.root,
|
30
|
+
modifiers: [{
|
31
|
+
name: "flip",
|
32
|
+
enabled: true,
|
33
|
+
options: {
|
34
|
+
altBoundary: true,
|
35
|
+
rootBoundary: "viewport"
|
36
|
+
}
|
37
|
+
}, {
|
38
|
+
name: "preventOverflow",
|
39
|
+
enabled: true,
|
40
|
+
options: {
|
41
|
+
padding: 8
|
42
|
+
}
|
43
|
+
}],
|
30
44
|
children: /*#__PURE__*/_jsxs(Paper, {
|
31
45
|
className: "papper-root",
|
32
46
|
children: [/*#__PURE__*/_jsxs(Typography, {
|
@@ -1,24 +1,24 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
3
3
|
export const ImageElementIcon = props => /*#__PURE__*/_jsxs("svg", {
|
4
|
-
width: "
|
5
|
-
height: "
|
6
|
-
viewBox: "0 0
|
4
|
+
width: "14",
|
5
|
+
height: "14",
|
6
|
+
viewBox: "0 0 14 14",
|
7
7
|
fill: "none",
|
8
8
|
xmlns: "http://www.w3.org/2000/svg",
|
9
9
|
children: [/*#__PURE__*/_jsx("path", {
|
10
|
-
d: "M5.
|
11
|
-
stroke: "#
|
10
|
+
d: "M5.2 13H8.8C11.8 13 13 11.8 13 8.8V5.2C13 2.2 11.8 1 8.8 1H5.2C2.2 1 1 2.2 1 5.2V8.8C1 11.8 2.2 13 5.2 13Z",
|
11
|
+
stroke: "#64748B",
|
12
12
|
strokeLinecap: "round",
|
13
13
|
strokeLinejoin: "round"
|
14
14
|
}), /*#__PURE__*/_jsx("path", {
|
15
|
-
d: "
|
16
|
-
stroke: "#
|
15
|
+
d: "M5.2 5.80039C5.86274 5.80039 6.4 5.26313 6.4 4.60039C6.4 3.93765 5.86274 3.40039 5.2 3.40039C4.53726 3.40039 4 3.93765 4 4.60039C4 5.26313 4.53726 5.80039 5.2 5.80039Z",
|
16
|
+
stroke: "#64748B",
|
17
17
|
strokeLinecap: "round",
|
18
18
|
strokeLinejoin: "round"
|
19
19
|
}), /*#__PURE__*/_jsx("path", {
|
20
|
-
d: "M1.
|
21
|
-
stroke: "#
|
20
|
+
d: "M1.40186 11.1695L4.35986 9.18355C4.83386 8.86555 5.51786 8.90155 5.94386 9.26755L6.14185 9.44155C6.60985 9.84355 7.36586 9.84355 7.83386 9.44155L10.3299 7.29955C10.7979 6.89755 11.5539 6.89755 12.0219 7.29955L12.9999 8.13955",
|
21
|
+
stroke: "#64748B",
|
22
22
|
strokeLinecap: "round",
|
23
23
|
strokeLinejoin: "round"
|
24
24
|
})]
|
@@ -840,4 +840,71 @@ export const CloseIconImageUpload = () => {
|
|
840
840
|
strokeLinejoin: "round"
|
841
841
|
})]
|
842
842
|
});
|
843
|
-
};
|
843
|
+
};
|
844
|
+
export function H1() {
|
845
|
+
return /*#__PURE__*/_jsx("svg", {
|
846
|
+
width: "14",
|
847
|
+
height: "11",
|
848
|
+
viewBox: "0 0 14 11",
|
849
|
+
fill: "none",
|
850
|
+
xmlns: "http://www.w3.org/2000/svg",
|
851
|
+
children: /*#__PURE__*/_jsx("path", {
|
852
|
+
d: "M0.884943 11V0.818182H3.03764V5.01918H7.40767V0.818182H9.5554V11H7.40767V6.79403H3.03764V11H0.884943ZM13.4482 5.18182V11H12.218V6.34943H12.1839L10.8516 7.18466V6.09375L12.2919 5.18182H13.4482Z",
|
853
|
+
fill: "#64748B"
|
854
|
+
})
|
855
|
+
});
|
856
|
+
}
|
857
|
+
export function H2() {
|
858
|
+
return /*#__PURE__*/_jsx("svg", {
|
859
|
+
width: "16",
|
860
|
+
height: "11",
|
861
|
+
viewBox: "0 0 16 11",
|
862
|
+
fill: "none",
|
863
|
+
xmlns: "http://www.w3.org/2000/svg",
|
864
|
+
children: /*#__PURE__*/_jsx("path", {
|
865
|
+
d: "M0.884943 11V0.818182H3.03764V5.01918H7.40767V0.818182H9.5554V11H7.40767V6.79403H3.03764V11H0.884943ZM10.9169 11V10.1136L12.9879 8.19602C13.1641 8.02557 13.3118 7.87216 13.4311 7.7358C13.5523 7.59943 13.6442 7.46591 13.7067 7.33523C13.7692 7.20265 13.8004 7.05966 13.8004 6.90625C13.8004 6.7358 13.7616 6.58902 13.6839 6.46591C13.6063 6.34091 13.5002 6.24527 13.3658 6.17898C13.2313 6.1108 13.0788 6.0767 12.9084 6.0767C12.7304 6.0767 12.575 6.11269 12.4425 6.18466C12.3099 6.25663 12.2076 6.35985 12.1357 6.49432C12.0637 6.62879 12.0277 6.78883 12.0277 6.97443H10.8601C10.8601 6.59375 10.9463 6.26326 11.1186 5.98295C11.291 5.70265 11.5324 5.4858 11.843 5.33239C12.1536 5.17898 12.5116 5.10227 12.9169 5.10227C13.3336 5.10227 13.6963 5.17614 14.005 5.32386C14.3156 5.4697 14.5571 5.67235 14.7294 5.93182C14.9018 6.19129 14.9879 6.48864 14.9879 6.82386C14.9879 7.04356 14.9444 7.26042 14.8572 7.47443C14.772 7.68845 14.6196 7.92614 14.3999 8.1875C14.1802 8.44697 13.8705 8.75852 13.4709 9.12216L12.6214 9.95455V9.99432H15.0646V11H10.9169Z",
|
866
|
+
fill: "#64748B"
|
867
|
+
})
|
868
|
+
});
|
869
|
+
}
|
870
|
+
export function H3() {
|
871
|
+
return /*#__PURE__*/_jsx("svg", {
|
872
|
+
width: "16",
|
873
|
+
height: "12",
|
874
|
+
viewBox: "0 0 16 12",
|
875
|
+
fill: "none",
|
876
|
+
xmlns: "http://www.w3.org/2000/svg",
|
877
|
+
children: /*#__PURE__*/_jsx("path", {
|
878
|
+
d: "M0.884943 11V0.818182H3.03764V5.01918H7.40767V0.818182H9.5554V11H7.40767V6.79403H3.03764V11H0.884943ZM13.0675 11.0795C12.6432 11.0795 12.2654 11.0066 11.9339 10.8608C11.6044 10.7131 11.344 10.5104 11.1527 10.2528C10.9633 9.99337 10.8658 9.69413 10.8601 9.35511H12.0987C12.1063 9.49716 12.1527 9.62216 12.2379 9.73011C12.325 9.83617 12.4406 9.91856 12.5845 9.97727C12.7285 10.036 12.8904 10.0653 13.0703 10.0653C13.2578 10.0653 13.4235 10.0322 13.5675 9.96591C13.7114 9.89962 13.8241 9.80777 13.9055 9.69034C13.987 9.57292 14.0277 9.4375 14.0277 9.28409C14.0277 9.12879 13.9841 8.99148 13.897 8.87216C13.8118 8.75095 13.6887 8.65625 13.5277 8.58807C13.3686 8.51989 13.1792 8.4858 12.9595 8.4858H12.4169V7.58239H12.9595C13.1451 7.58239 13.3089 7.55019 13.451 7.4858C13.5949 7.4214 13.7067 7.33239 13.7862 7.21875C13.8658 7.10322 13.9055 6.96875 13.9055 6.81534C13.9055 6.66951 13.8705 6.54167 13.8004 6.43182C13.7322 6.32008 13.6357 6.23295 13.5107 6.17045C13.3875 6.10795 13.2436 6.0767 13.0788 6.0767C12.9122 6.0767 12.7597 6.10701 12.6214 6.16761C12.4832 6.22633 12.3724 6.31061 12.2891 6.42045C12.2057 6.5303 12.1612 6.65909 12.1555 6.80682H10.9766C10.9822 6.47159 11.0779 6.17614 11.2635 5.92045C11.4491 5.66477 11.6991 5.46496 12.0135 5.32102C12.3298 5.17519 12.6868 5.10227 13.0845 5.10227C13.486 5.10227 13.8374 5.17519 14.1385 5.32102C14.4396 5.46686 14.6735 5.66383 14.8402 5.91193C15.0088 6.15814 15.0921 6.43466 15.0902 6.74148C15.0921 7.06723 14.9908 7.33902 14.7862 7.55682C14.5836 7.77462 14.3194 7.91288 13.9936 7.97159V8.01705C14.4216 8.07197 14.7474 8.22064 14.9709 8.46307C15.1963 8.7036 15.308 9.00473 15.3061 9.36648C15.308 9.69792 15.2124 9.99242 15.0192 10.25C14.8279 10.5076 14.5637 10.7102 14.2266 10.858C13.8894 11.0057 13.5031 11.0795 13.0675 11.0795Z",
|
879
|
+
fill: "#64748B"
|
880
|
+
})
|
881
|
+
});
|
882
|
+
}
|
883
|
+
export function CalendlyIcon() {
|
884
|
+
return /*#__PURE__*/_jsxs("svg", {
|
885
|
+
width: "12",
|
886
|
+
height: "14",
|
887
|
+
viewBox: "0 0 12 14",
|
888
|
+
fill: "none",
|
889
|
+
xmlns: "http://www.w3.org/2000/svg",
|
890
|
+
children: [/*#__PURE__*/_jsx("rect", {
|
891
|
+
x: "0.5",
|
892
|
+
y: "2.5",
|
893
|
+
width: "11",
|
894
|
+
height: "11",
|
895
|
+
rx: "1.5",
|
896
|
+
stroke: "#64748B"
|
897
|
+
}), /*#__PURE__*/_jsx("path", {
|
898
|
+
d: "M3 1L3 4",
|
899
|
+
stroke: "#64748B",
|
900
|
+
strokeLinecap: "round"
|
901
|
+
}), /*#__PURE__*/_jsx("path", {
|
902
|
+
d: "M9 1L9 4",
|
903
|
+
stroke: "#64748B",
|
904
|
+
strokeLinecap: "round"
|
905
|
+
}), /*#__PURE__*/_jsx("path", {
|
906
|
+
d: "M8.10369 7.0554H7.43892C7.41335 6.91335 7.36577 6.78835 7.29616 6.6804C7.22656 6.57244 7.14134 6.48082 7.04048 6.40554C6.93963 6.33026 6.8267 6.27344 6.7017 6.23509C6.57813 6.19673 6.44673 6.17756 6.30753 6.17756C6.05611 6.17756 5.83097 6.24077 5.6321 6.36719C5.43466 6.49361 5.27841 6.67898 5.16335 6.9233C5.04972 7.16761 4.9929 7.46591 4.9929 7.81818C4.9929 8.1733 5.04972 8.47301 5.16335 8.71733C5.27841 8.96165 5.43537 9.14631 5.63423 9.27131C5.8331 9.39631 6.05682 9.45881 6.3054 9.45881C6.44318 9.45881 6.57386 9.44034 6.69744 9.40341C6.82244 9.36506 6.93537 9.30895 7.03622 9.23509C7.13707 9.16122 7.2223 9.07102 7.2919 8.96449C7.36293 8.85653 7.41193 8.73295 7.43892 8.59375L8.10369 8.59588C8.06818 8.81037 7.99929 9.00781 7.89702 9.18821C7.79616 9.36719 7.66619 9.52202 7.5071 9.6527C7.34943 9.78196 7.16903 9.8821 6.96591 9.95312C6.76278 10.0241 6.54119 10.0597 6.30114 10.0597C5.9233 10.0597 5.58665 9.97017 5.29119 9.79119C4.99574 9.6108 4.76278 9.35298 4.59233 9.01776C4.4233 8.68253 4.33878 8.28267 4.33878 7.81818C4.33878 7.35227 4.42401 6.95241 4.59446 6.61861C4.76491 6.28338 4.99787 6.02628 5.29332 5.8473C5.58878 5.6669 5.92472 5.5767 6.30114 5.5767C6.53267 5.5767 6.74858 5.61009 6.94886 5.67685C7.15057 5.74219 7.33168 5.83878 7.49219 5.96662C7.6527 6.09304 7.78551 6.24787 7.89062 6.43111C7.99574 6.61293 8.06676 6.82102 8.10369 7.0554Z",
|
907
|
+
fill: "#64748B"
|
908
|
+
})]
|
909
|
+
});
|
910
|
+
}
|
@@ -50,9 +50,9 @@ const useCommonStyle = theme => ({
|
|
50
50
|
overflow: "auto",
|
51
51
|
maxHeight: "105px",
|
52
52
|
"& .default-color-panel_item": {
|
53
|
-
height:
|
54
|
-
width:
|
55
|
-
border:
|
53
|
+
height: "20px",
|
54
|
+
width: "20px",
|
55
|
+
border: "1px solid #E2E8F0"
|
56
56
|
}
|
57
57
|
}
|
58
58
|
},
|
@@ -109,6 +109,11 @@ const useCommonStyle = theme => ({
|
|
109
109
|
"& .MuiPopover-root": {
|
110
110
|
backgroundColor: theme?.palette?.editor?.background
|
111
111
|
}
|
112
|
+
},
|
113
|
+
datePicker: {
|
114
|
+
"& .react-datepicker-wrapper": {
|
115
|
+
width: "100%"
|
116
|
+
}
|
112
117
|
}
|
113
118
|
});
|
114
119
|
export default useCommonStyle;
|
@@ -446,4 +446,28 @@ export const isFreeGridFragment = fragments => {
|
|
446
446
|
} else {
|
447
447
|
return false;
|
448
448
|
}
|
449
|
+
};
|
450
|
+
export const editorThemeStyle = {
|
451
|
+
light: {
|
452
|
+
editor: {
|
453
|
+
textColor: "#000000",
|
454
|
+
background: "#FFFFFF",
|
455
|
+
svgStroke: "#64748B",
|
456
|
+
borderColor: "#D8DDE1",
|
457
|
+
activeColor: "#2563EB",
|
458
|
+
svgStrokeDisabled: "#64748B4D"
|
459
|
+
}
|
460
|
+
},
|
461
|
+
dark: {
|
462
|
+
editor: {
|
463
|
+
textColor: "#FFFFFF",
|
464
|
+
background: "#141720",
|
465
|
+
svgStroke: "#64748B",
|
466
|
+
borderColor: "#64748B",
|
467
|
+
activeColor: "#2563EB"
|
468
|
+
}
|
469
|
+
}
|
470
|
+
};
|
471
|
+
export const getEditorTheme = (themeType = "light") => {
|
472
|
+
return editorThemeStyle[themeType] || {};
|
449
473
|
};
|