@flozy/editor 5.6.4 → 5.6.6
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/CommonEditor.js +8 -9
- package/dist/Editor/Editor.css +9 -3
- package/dist/Editor/Elements/DataView/DataViewButton.js +1 -1
- package/dist/Editor/Elements/Search/SearchAttachment.js +2 -2
- package/dist/Editor/Elements/Signature/SignaturePopup.js +8 -3
- package/dist/Editor/Styles/EditorStyles.js +3 -0
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +5 -5
- package/dist/Editor/assets/svg/DataTableIcon.js +1 -0
- package/dist/Editor/common/MentionsPopup/Styles.js +0 -1
- package/dist/Editor/plugins/withLayout.js +1 -1
- package/dist/Editor/utils/topBanner.js +11 -4
- package/package.json +1 -1
@@ -183,7 +183,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
183
183
|
return {
|
184
184
|
value: JSON.stringify(val),
|
185
185
|
text: text,
|
186
|
-
title: serializeToText(title?.children) || "
|
186
|
+
title: serializeToText(title?.children) || ""
|
187
187
|
};
|
188
188
|
};
|
189
189
|
const getPreviewImage = async (needBackground = false, options = {}) => {
|
@@ -309,13 +309,11 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
309
309
|
hideTools: updatedHideTools || []
|
310
310
|
}) : [];
|
311
311
|
const handleEditorChange = newValue => {
|
312
|
-
if (
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
setIsInteracted(true);
|
318
|
-
}
|
312
|
+
if (JSON.stringify(newValue) !== JSON.stringify(debouncedValue?.current)) {
|
313
|
+
updateTopBanner(newValue, setTopBanner);
|
314
|
+
debounced(newValue);
|
315
|
+
if (!isInteracted) {
|
316
|
+
setIsInteracted(true);
|
319
317
|
}
|
320
318
|
}
|
321
319
|
};
|
@@ -544,7 +542,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
544
542
|
transformOrigin: "left top",
|
545
543
|
transition: "all 0.3s",
|
546
544
|
minHeight: "87%",
|
547
|
-
maxWidth: pageMaxWidth ? `${parseInt(pageMaxWidth)}px !important` : "auto"
|
545
|
+
maxWidth: pageMaxWidth ? `${parseInt(pageMaxWidth)}px !important` : "auto",
|
546
|
+
paddingTop: hasTopBanner() ? '20px !important' : ''
|
548
547
|
},
|
549
548
|
"data-info": outsideEditorClickLabel,
|
550
549
|
children: [/*#__PURE__*/_jsx(Editable, {
|
package/dist/Editor/Editor.css
CHANGED
@@ -397,6 +397,12 @@ blockquote {
|
|
397
397
|
padding: 0px 5px 0px 2px !important
|
398
398
|
}
|
399
399
|
|
400
|
+
.signatureActionBtnContainer {
|
401
|
+
display: flex;
|
402
|
+
align-items: center;
|
403
|
+
gap: 1rem;
|
404
|
+
}
|
405
|
+
|
400
406
|
.signature-tab {
|
401
407
|
display: flex;
|
402
408
|
align-items: center;
|
@@ -605,8 +611,8 @@ blockquote {
|
|
605
611
|
display: block !important;
|
606
612
|
}
|
607
613
|
|
608
|
-
.dialog-actions-si .
|
609
|
-
margin-top:
|
614
|
+
.dialog-actions-si .signatureActionBtnContainer {
|
615
|
+
margin-top: 1.4rem;
|
610
616
|
}
|
611
617
|
}
|
612
618
|
|
@@ -989,7 +995,7 @@ blockquote {
|
|
989
995
|
|
990
996
|
.sliderInput {
|
991
997
|
width: 66px !important;
|
992
|
-
padding: 2px
|
998
|
+
padding: 2px 0px 2px 4px;
|
993
999
|
margin-left: 18px;
|
994
1000
|
box-shadow: 0px 4px 16px 0px #0000000d;
|
995
1001
|
border: 1px solid #6f6f6f33;
|
@@ -44,9 +44,9 @@ const SearchAttachment = props => {
|
|
44
44
|
maxWidth: '250px',
|
45
45
|
padding: "0px 10px",
|
46
46
|
boxShadow: "none",
|
47
|
-
border: `1px solid ${theme?.palette?.primary?.slashBrainBorder}`,
|
47
|
+
border: `1px solid ${theme?.palette?.primary?.slashBrainBorder} !important`,
|
48
48
|
borderRadius: "7px !important",
|
49
|
-
background: theme?.palette?.containers?.slashBrainCardBg
|
49
|
+
background: `${theme?.palette?.containers?.slashBrainCardBg} !important`,
|
50
50
|
cursor: 'pointer',
|
51
51
|
margin: '4px 0px',
|
52
52
|
lineHeight: 1.43,
|
@@ -313,7 +313,9 @@ const SignaturePopup = props => {
|
|
313
313
|
id: "signedBy",
|
314
314
|
name: "signedBy",
|
315
315
|
placeholder: "Enter Name",
|
316
|
-
|
316
|
+
value: signedData.signedBy || ""
|
317
|
+
// defaultValue={defaultName || ""}
|
318
|
+
,
|
317
319
|
size: "small",
|
318
320
|
onChange: onChange,
|
319
321
|
sx: classes.signaturePopUpNameField
|
@@ -442,7 +444,8 @@ const SignaturePopup = props => {
|
|
442
444
|
size: "small",
|
443
445
|
onChange: onChange,
|
444
446
|
sx: classes.signaturePopUpNameField,
|
445
|
-
|
447
|
+
value: signedData.signedByEmail || ""
|
448
|
+
// defaultValue={defaultEmail || ""}
|
446
449
|
})
|
447
450
|
})]
|
448
451
|
})]
|
@@ -509,7 +512,9 @@ const SignaturePopup = props => {
|
|
509
512
|
})
|
510
513
|
})
|
511
514
|
})]
|
512
|
-
}) : null, /*#__PURE__*/_jsxs(
|
515
|
+
}) : null, /*#__PURE__*/_jsxs(Box, {
|
516
|
+
component: "div",
|
517
|
+
className: "signatureActionBtnContainer",
|
513
518
|
children: [!readOnly ? /*#__PURE__*/_jsx(Button, {
|
514
519
|
onClick: handleClear,
|
515
520
|
className: `secondaryBtn actionBtn deleteBtn deleteButtonSignature`,
|
@@ -301,6 +301,9 @@ const editorStyles = ({
|
|
301
301
|
"& .editor-wrapper": {
|
302
302
|
paddingTop: '20px'
|
303
303
|
},
|
304
|
+
"& .MuiDialog-paper, & .MuiPopover-paper": {
|
305
|
+
background: `${theme?.palette?.editor?.background} !important`
|
306
|
+
},
|
304
307
|
"& .MuiPaper-root": {
|
305
308
|
borderRadius: "0px !important",
|
306
309
|
"& .MuiDialogTitle-root": {
|
@@ -127,6 +127,11 @@ const usePopupStyle = theme => ({
|
|
127
127
|
},
|
128
128
|
"@media only screen and (max-width: 599px)": {
|
129
129
|
width: "330px"
|
130
|
+
},
|
131
|
+
"& .accordionIcon": {
|
132
|
+
"& p": {
|
133
|
+
textAlign: 'left'
|
134
|
+
}
|
130
135
|
}
|
131
136
|
},
|
132
137
|
"& .MuiTypography-root": {
|
@@ -185,11 +190,6 @@ const usePopupStyle = theme => ({
|
|
185
190
|
justifyContent: "start",
|
186
191
|
borderRadius: "10px !important",
|
187
192
|
transition: "background-color 0.3s ease",
|
188
|
-
// "& .colorBoxElementIcon": {
|
189
|
-
// "& path": {
|
190
|
-
// fill: theme?.palette?.type === "dark" ? "none" : "",
|
191
|
-
// },
|
192
|
-
// },
|
193
193
|
"& .signatureElementIcon": {
|
194
194
|
"& path": {
|
195
195
|
fill: `${theme?.palette?.editor?.closeButtonSvgStroke}`
|
@@ -7,6 +7,7 @@ const DataTableIcon = () => {
|
|
7
7
|
viewBox: "0 0 16 16",
|
8
8
|
fill: "none",
|
9
9
|
xmlns: "http://www.w3.org/2000/svg",
|
10
|
+
className: "commonSvgStyle",
|
10
11
|
children: [/*#__PURE__*/_jsx("path", {
|
11
12
|
d: "M14.6668 7.33398V6.00065C14.6668 2.66732 13.3335 1.33398 10.0002 1.33398H6.00016C2.66683 1.33398 1.3335 2.66732 1.3335 6.00065V10.0007C1.3335 13.334 2.66683 14.6673 6.00016 14.6673H6.66683",
|
12
13
|
stroke: "#64748B",
|
@@ -22,10 +22,17 @@ export const insertTopBanner = (editor, embedData) => {
|
|
22
22
|
} = embedData;
|
23
23
|
if (!url) return;
|
24
24
|
const embed = createTopBannerNode(embedData);
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
const isTopBanner = editor?.children[0]?.type === "topbanner";
|
26
|
+
if (!isTopBanner) {
|
27
|
+
Transforms.insertNodes(editor, embed, {
|
28
|
+
at: [0]
|
29
|
+
});
|
30
|
+
insertNewLine(editor);
|
31
|
+
} else {
|
32
|
+
Transforms.setNodes(editor, embed, {
|
33
|
+
at: [0]
|
34
|
+
});
|
35
|
+
}
|
29
36
|
} catch (err) {
|
30
37
|
console.log(err);
|
31
38
|
}
|