@flozy/editor 1.6.1 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/CommonEditor.js +5 -3
- package/dist/Editor/Elements/Signature/SignaturePopup.js +9 -2
- package/dist/Editor/Toolbar/PopupTool/AddElements.js +3 -0
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +4 -0
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +1 -0
- package/dist/Editor/common/Icon.js +4 -2
- package/dist/Editor/common/MentionsPopup/ElementsListCard.js +2 -1
- package/dist/Editor/common/MentionsPopup/MentionsListCard.js +2 -1
- package/dist/Editor/plugins/withLayout.js +4 -2
- package/package.json +1 -1
@@ -90,7 +90,9 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
90
90
|
footer,
|
91
91
|
needLayout = true,
|
92
92
|
CHARACTERS = [],
|
93
|
-
editorClass
|
93
|
+
editorClass,
|
94
|
+
fixedWidth = "60%",
|
95
|
+
fullWidth = "80%"
|
94
96
|
} = otherProps || {};
|
95
97
|
const [drag, setDrag] = useState(null);
|
96
98
|
const classes = editorStyles({
|
@@ -451,14 +453,14 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
451
453
|
className: "scroll-area",
|
452
454
|
children: /*#__PURE__*/_jsxs("div", {
|
453
455
|
ref: editorWrapper,
|
454
|
-
className: `editor-wrapper`,
|
456
|
+
className: `editor-wrapper ${pageWidth === "fixed" ? "fixed" : "full"}`,
|
455
457
|
style: {
|
456
458
|
backgroundColor: pageColor || "#FFF",
|
457
459
|
paddingLeft: `${bannerSpacing?.left || 12}px`,
|
458
460
|
paddingRight: `${bannerSpacing?.right || 12}px`,
|
459
461
|
paddingTop: `${bannerSpacing?.top}px`,
|
460
462
|
paddingBottom: `${bannerSpacing?.bottom}px`,
|
461
|
-
width: !pageWidth || pageWidth === "fixed" ?
|
463
|
+
width: !pageWidth || pageWidth === "fixed" ? fixedWidth : fullWidth,
|
462
464
|
// width: viewport.w ? `${viewport.w}px` : "100%",
|
463
465
|
height: viewport.h ? `${viewport.h}px` : `100%`,
|
464
466
|
alignSelf: "center",
|
@@ -20,7 +20,8 @@ const SignaturePopup = props => {
|
|
20
20
|
className
|
21
21
|
} = props;
|
22
22
|
const {
|
23
|
-
readOnly
|
23
|
+
readOnly,
|
24
|
+
metadata
|
24
25
|
} = customProps;
|
25
26
|
const [open, setOpen] = useState(false);
|
26
27
|
const [tab, setTab] = useState(0);
|
@@ -41,7 +42,13 @@ const SignaturePopup = props => {
|
|
41
42
|
resource_id: customProps?.page_id
|
42
43
|
});
|
43
44
|
onSave(signedData);
|
44
|
-
|
45
|
+
// manual delay
|
46
|
+
setTimeout(() => {
|
47
|
+
if (metadata && metadata?.actionHandler) {
|
48
|
+
metadata?.actionHandler("signed", signedData);
|
49
|
+
}
|
50
|
+
handleClose();
|
51
|
+
}, 0);
|
45
52
|
};
|
46
53
|
const handleClear = () => {
|
47
54
|
onClear();
|
@@ -135,7 +135,8 @@ const iconList = {
|
|
135
135
|
size: 20
|
136
136
|
}),
|
137
137
|
emoji: /*#__PURE__*/_jsx(MdEmojiEmotions, {
|
138
|
-
size: 20
|
138
|
+
size: 20,
|
139
|
+
fill: "#64748B"
|
139
140
|
}),
|
140
141
|
grid: /*#__PURE__*/_jsx(GridIcon, {}),
|
141
142
|
accordion: /*#__PURE__*/_jsx(AccordionIcon, {}),
|
@@ -166,7 +167,8 @@ const iconList = {
|
|
166
167
|
}),
|
167
168
|
embed: /*#__PURE__*/_jsx(LinkIcon, {}),
|
168
169
|
topbanner: /*#__PURE__*/_jsx(IoIosImage, {
|
169
|
-
size: 20
|
170
|
+
size: 20,
|
171
|
+
fill: "#64748B"
|
170
172
|
}),
|
171
173
|
fileUpload: /*#__PURE__*/_jsx(MdOutlineFileUpload, {
|
172
174
|
size: 20
|
@@ -28,6 +28,7 @@ const withLayout = editor => {
|
|
28
28
|
at: path.concat(1)
|
29
29
|
});
|
30
30
|
}
|
31
|
+
let prevType = "";
|
31
32
|
for (const [child, childPath] of Node.children(editor, path)) {
|
32
33
|
let type = "";
|
33
34
|
const slateIndex = childPath[0];
|
@@ -43,11 +44,12 @@ const withLayout = editor => {
|
|
43
44
|
};
|
44
45
|
switch (slateIndex) {
|
45
46
|
case 0:
|
46
|
-
type = "title";
|
47
|
+
type = child.type === "topbanner" ? "topbanner" : "title";
|
48
|
+
prevType = type;
|
47
49
|
enforceType(type);
|
48
50
|
break;
|
49
51
|
case 1:
|
50
|
-
type = "paragraph";
|
52
|
+
type = prevType === "topbanner" ? "title" : "paragraph";
|
51
53
|
enforceType(type);
|
52
54
|
break;
|
53
55
|
default:
|