From f463dc7af7fa1696fa117021b205162c3b7474be Mon Sep 17 00:00:00 2001 From: Raktima <110812506+raktima-opensignlabs@users.noreply.github.com> Date: Tue, 14 Nov 2023 20:09:51 +0530 Subject: [PATCH 1/5] fix: #172 - Location of requested signature placeholders shift to slight right on mobile view in "Request Signatures" flow (#185) --- .../src/Component/component/renderPdf.js | 1179 +++++++++-------- 1 file changed, 595 insertions(+), 584 deletions(-) diff --git a/microfrontends/SignDocuments/src/Component/component/renderPdf.js b/microfrontends/SignDocuments/src/Component/component/renderPdf.js index 07cade06e..815ce2cd5 100644 --- a/microfrontends/SignDocuments/src/Component/component/renderPdf.js +++ b/microfrontends/SignDocuments/src/Component/component/renderPdf.js @@ -42,8 +42,8 @@ function RenderPdf({ const isMobile = window.innerWidth < 767; const newWidth = window.innerWidth; const scale = isMobile ? pdfOriginalWidth / newWidth : 1; - //check isGuestSigner is present in local if yes than handle login flow header in mobile view - const isGuestSigner = localStorage.getItem("isGuestSigner"); + //check isGuestSigner is present in local if yes than handle login flow header in mobile view + const isGuestSigner = localStorage.getItem("isGuestSigner"); // handle signature block width and height according to screen const posWidth = (pos) => { let width; @@ -75,7 +75,6 @@ function RenderPdf({ return width; } }; - //function for render placeholder block over pdf document const checkSignedSignes = (data) => { @@ -90,7 +89,7 @@ function RenderPdf({ if (isMobile) { //if pos.isMobile false -- placeholder saved from desktop view then handle position in mobile view divided by scale if (!pos.isMobile) { - return pos.xPosition / scale - 20; + return pos.xPosition / scale + 32; } //pos.isMobile true -- placeholder save from mobile view(small device) handle position in mobile view(small screen) view divided by scale else { @@ -434,279 +433,144 @@ function RenderPdf({ ); }) : pdfRequest - ? signerPos.map((data, key) => { - return ( - - {checkSignedSignes(data)} - - ); - }) - : placeholder - ? signerPos.map((data, ind) => { - return ( - - {data.placeHolder.map((placeData, index) => { - return ( - - {placeData.pageNumber === pageNumber && - placeData.pos.map((pos) => { - return ( - - handleTabDrag(pos.key, data.signerObjId) - } - size={{ - width: pos.Width ? pos.Width : 150, - height: pos.Height ? pos.Height : 60 - }} - lockAspectRatio={ - pos.Width ? pos.Width / pos.Height : 2.5 - } - resizeHandleStyles={{ - bottom: { display: "none" }, - right: { display: "none" }, - bottomRight: { display: "block" } - }} - onDragStop={(event, dragElement) => - handleStop( - event, - dragElement, - data.signerObjId, - pos.key - ) - } - default={{ - x: pos.xPosition, - y: pos.yPosition - }} - onResize={( - e, - direction, - ref, - delta, - position - ) => { - handleImageResize( - ref, - pos.key, - data.signerObjId, - position - ); - }} - > -
{ - e.stopPropagation(); - handleDeleteSign( - pos.key, - data.signerObjId - ); - }} - style={{ - position: "absolute", - right: 0, - display: "inline-block", - background: themeColor(), - cursor: "pointer", - padding: "0px 10px", - zIndex: 10 - }} - > - x -
-
{ + return ( + + {checkSignedSignes(data)} + + ); + }) + : placeholder + ? signerPos.map((data, ind) => { + return ( + + {data.placeHolder.map((placeData, index) => { + return ( + + {placeData.pageNumber === pageNumber && + placeData.pos.map((pos) => { + return ( + + handleTabDrag( + pos.key, + data.signerObjId + ) + } + size={{ + width: pos.Width ? pos.Width : 150, + height: pos.Height ? pos.Height : 60 + }} + lockAspectRatio={ + pos.Width + ? pos.Width / pos.Height + : 2.5 + } + resizeHandleStyles={{ + bottom: { display: "none" }, + right: { display: "none" }, + bottomRight: { display: "block" } + }} + onDragStop={(event, dragElement) => + handleStop( + event, + dragElement, + data.signerObjId, + pos.key + ) + } + default={{ + x: pos.xPosition, + y: pos.yPosition + }} + onResize={( + e, + direction, + ref, + delta, + position + ) => { + handleImageResize( + ref, + pos.key, + data.signerObjId, + position + ); + }} + > +
{ + e.stopPropagation(); + handleDeleteSign( + pos.key, + data.signerObjId + ); + }} + style={{ + position: "absolute", + right: 0, + display: "inline-block", + background: themeColor(), + cursor: "pointer", + padding: "0px 10px", + zIndex: 10 + }} + > + x +
+
- {pos.isStamp ? "stamp" : "signature"} -
-
- ); - })} -
- ); - })} -
- ); - }) - : xyPostion.map((data, ind) => { - return ( - - {data.pageNumber === pageNumber && - data.pos.map((pos) => { - return pos && pos.SignUrl ? ( - handleTabDrag(pos.key)} - onDragStop={handleStop} - onResize={( - e, - direction, - ref, - delta, - position - ) => { - handleImageResize( - ref, - pos.key, - direction, - position - ); - }} - > - {" "} -
{ - if (!isDragging) { - setTimeout(() => { - e.stopPropagation(); - setIsSignPad(true); - setSignKey(pos.key); - setIsStamp(pos.isStamp); - }, 500); + marginTop: "0px" + }} + > + {pos.isStamp ? "stamp" : "signature"} +
+
+ ); + })} +
+ ); + })} + + ); + }) + : xyPostion.map((data, ind) => { + return ( + + {data.pageNumber === pageNumber && + data.pos.map((pos) => { + return pos && pos.SignUrl ? ( + -
{ - e.stopPropagation(); - handleDeleteSign(pos.key); - setIsStamp(false); - }} - style={{ - position: "absolute", - right: 0, - display: "inline-block", - background: themeColor(), - cursor: "pointer", - padding: "0px 10px" - }} - > - x -
-
- signimg { - setSignKey(pos.key); - setIsSignPad(true); - setIsStamp(pos.isStamp); - }} - src={pos.SignUrl} - style={{ - width: "100%", - height: "100%", - objectFit: "contain" - }} - /> -
-
-
- ) : ( - <> - { - handleTabDrag(pos.key, e); - }} - onDragStop={handleStop} - size={{ - width: pos.Width ? pos.Width : 150, - height: pos.Height ? pos.Height : 60 - }} - default={{ - x: pos.xPosition, - y: pos.yPosition - }} - > -
{ - if (!isDragging) { - setTimeout(() => { - setIsSignPad(true); - - setSignKey(pos.key); - setIsStamp(pos.isStamp); - }, 500); - } - }} - className="dragElm" + key={pos.key} style={{ padding: "0px", cursor: "all-scroll", - zIndex: 20, + zIndex: 1, position: "absolute", borderStyle: "dashed", width: "150px", @@ -716,50 +580,190 @@ function RenderPdf({ textAlign: "center", justifyContent: "center", borderWidth: "0.2px", - overflow: "hidden" + overflow: "hidden", + userSelect: "none" + }} + size={{ + width: pos.Width ? pos.Width : 151, + height: pos.Height ? pos.Height : 61 + }} + default={{ + x: pos.xPosition, + y: pos.yPosition + }} + onDrag={() => handleTabDrag(pos.key)} + onDragStop={handleStop} + onResize={( + e, + direction, + ref, + delta, + position + ) => { + handleImageResize( + ref, + pos.key, + direction, + position + ); }} > + {" "}
{ - e.stopPropagation(); - e.preventDefault(); - - handleDeleteSign(pos.key); - setIsStamp(false); - }} - onClick={(e) => { - e.stopPropagation(); // Prevent further event propagation + if (!isDragging) { + setTimeout(() => { + e.stopPropagation(); + setIsSignPad(true); + setSignKey(pos.key); + setIsStamp(pos.isStamp); + }, 500); + } }} + > +
{ + e.stopPropagation(); + handleDeleteSign(pos.key); + setIsStamp(false); + }} + style={{ + position: "absolute", + right: 0, + display: "inline-block", + background: themeColor(), + cursor: "pointer", + padding: "0px 10px" + }} + > + x +
+
+ signimg { + setSignKey(pos.key); + setIsSignPad(true); + setIsStamp(pos.isStamp); + }} + src={pos.SignUrl} + style={{ + width: "100%", + height: "100%", + objectFit: "contain" + }} + /> +
+
+ + ) : ( + <> + - x -
-
{ + handleTabDrag(pos.key, e); + }} + onDragStop={handleStop} + size={{ + width: pos.Width ? pos.Width : 150, + height: pos.Height ? pos.Height : 60 + }} + default={{ + x: pos.xPosition, + y: pos.yPosition }} > - {pos.isStamp ? "stamp" : "signature"} -
- -
- - ); - })} -
- ); - }))} +
{ + if (!isDragging) { + setTimeout(() => { + setIsSignPad(true); + + setSignKey(pos.key); + setIsStamp(pos.isStamp); + }, 500); + } + }} + className="dragElm" + style={{ + padding: "0px", + cursor: "all-scroll", + zIndex: 20, + position: "absolute", + borderStyle: "dashed", + width: "150px", + height: "60px", + borderColor: themeColor(), + background: "#daebe0", + textAlign: "center", + justifyContent: "center", + borderWidth: "0.2px", + overflow: "hidden" + }} + > +
{ + e.stopPropagation(); + e.preventDefault(); + + handleDeleteSign(pos.key); + setIsStamp(false); + }} + onClick={(e) => { + e.stopPropagation(); // Prevent further event propagation + }} + style={{ + position: "absolute", + right: 0, + display: "inline-block", + background: themeColor(), + cursor: "pointer", + padding: "0px 10px" + }} + > + x +
+
+ {pos.isStamp ? "stamp" : "signature"} +
+
+ + + ); + })} +
+ ); + }))} {/* this component for render pdf document is in middle of the component */}
{Array.from(new Array(numPages), (el, index) => ( @@ -980,89 +984,289 @@ function RenderPdf({ ); }) : pdfRequest - ? signerPos.map((data, key) => { - return ( - - {checkSignedSignes(data)} - - ); - }) - : placeholder - ? signerPos.map((data, ind) => { - return ( - - {data.placeHolder.map((placeData, index) => { - return ( - - {placeData.pageNumber === pageNumber && - placeData.pos.map((pos) => { - return ( - { + return ( + + {checkSignedSignes(data)} + + ); + }) + : placeholder + ? signerPos.map((data, ind) => { + return ( + + {data.placeHolder.map((placeData, index) => { + return ( + + {placeData.pageNumber === pageNumber && + placeData.pos.map((pos) => { + return ( + + handleTabDrag( + pos.key, + data.signerObjId + ) + } + size={{ + width: pos.Width ? pos.Width : 150, + height: pos.Height ? pos.Height : 60 + }} + lockAspectRatio={ + pos.Width + ? pos.Width / pos.Height + : 2.5 + } + resizeHandleStyles={{ + bottom: { display: "none" }, + right: { display: "none" }, + bottomRight: { display: "block" } + }} + onDragStop={(event, dragElement) => + handleStop( + event, + dragElement, + data.signerObjId, + pos.key + ) + } + default={{ + x: pos.xPosition, + y: pos.yPosition + }} + onResize={( + e, + direction, + ref, + delta, + position + ) => { + handleImageResize( + ref, + pos.key, + data.signerObjId, + position + ); + }} + > +
{ + e.stopPropagation(); + handleDeleteSign( + pos.key, + data.signerObjId + ); + }} + style={{ + position: "absolute", + right: 0, + display: "inline-block", + background: themeColor(), + cursor: "pointer", + padding: "0px 10px", + zIndex: 10 + }} + > + x +
+
+ {pos.isStamp + ? "stamp" + : "signature"} +
+
+ ); + })} +
+ ); + })} +
+ ); + }) + : xyPostion.map((data, ind) => { + return ( + + {data.pageNumber === pageNumber && + data.pos.map((pos) => { + return pos && pos.SignUrl ? ( + handleTabDrag(pos.key)} + size={{ + width: pos.Width ? pos.Width : 150, + height: pos.Height ? pos.Height : 60 + }} + onDragStop={handleStop} + default={{ + x: pos.xPosition, + y: pos.yPosition + }} + onResize={( + e, + direction, + ref, + delta, + position + ) => { + handleImageResize( + ref, + pos.key, + direction, + position + ); + }} + onClick={() => { + if (!isDragging) { + setIsSignPad(true); + setSignKey(pos.key); + setIsStamp(pos.isStamp); + } + }} + > +
{ + e.stopPropagation(); + handleDeleteSign(pos.key); + setIsStamp(false); + }} + style={{ + position: "absolute", + right: 0, + display: "inline-block", + background: themeColor(), + cursor: "pointer", + padding: "0px 10px" + }} + > + x +
+
+ signimg { + setSignKey(pos.key); + setIsSignPad(true); + setIsStamp(pos.isStamp); + }} + src={pos.SignUrl} + style={{ + width: "100%", + height: "100%", + objectFit: "contain" + }} + /> +
+
+ ) : ( + handleTabDrag(pos.key, e)} + size={{ + width: pos.Width ? pos.Width : 150, + height: pos.Height ? pos.Height : 60 + }} + onDragStop={handleStop} + default={{ + x: pos.xPosition, + y: pos.yPosition + }} + > +
{ + if (!isDragging) { + e.stopPropagation(); + setIsSignPad(true); + setSignKey(pos.key); + setIsStamp(pos.isStamp); + } + }} style={{ - padding: "0px", cursor: "all-scroll", - zIndex: 1, + zIndex: 10, position: "absolute", borderStyle: "dashed", - width: "200px", - height: "30px", + width: "150px", + height: "60px", borderColor: themeColor(), - background: data.blockColor, + background: "#daebe0", textAlign: "center", justifyContent: "center", + alignItems: "center", borderWidth: "0.2px" }} - onDrag={() => - handleTabDrag(pos.key, data.signerObjId) - } - size={{ - width: pos.Width ? pos.Width : 150, - height: pos.Height ? pos.Height : 60 - }} - lockAspectRatio={ - pos.Width ? pos.Width / pos.Height : 2.5 - } - resizeHandleStyles={{ - bottom: { display: "none" }, - right: { display: "none" }, - bottomRight: { display: "block" } - }} - onDragStop={(event, dragElement) => - handleStop( - event, - dragElement, - data.signerObjId, - pos.key - ) - } - default={{ - x: pos.xPosition, - y: pos.yPosition - }} - onResize={( - e, - direction, - ref, - delta, - position - ) => { - handleImageResize( - ref, - pos.key, - data.signerObjId, - position - ); - }} >
{ e.stopPropagation(); - handleDeleteSign( - pos.key, - data.signerObjId - ); + handleDeleteSign(pos.key); + setIsStamp(false); }} style={{ position: "absolute", @@ -1070,8 +1274,7 @@ function RenderPdf({ display: "inline-block", background: themeColor(), cursor: "pointer", - padding: "0px 10px", - zIndex: 10 + padding: "0px 10px" }} > x @@ -1079,212 +1282,20 @@ function RenderPdf({
{pos.isStamp ? "stamp" : "signature"}
- - ); - })} - - ); - })} - - ); - }) - : xyPostion.map((data, ind) => { - return ( - - {data.pageNumber === pageNumber && - data.pos.map((pos) => { - return pos && pos.SignUrl ? ( - handleTabDrag(pos.key)} - size={{ - width: pos.Width ? pos.Width : 150, - height: pos.Height ? pos.Height : 60 - }} - onDragStop={handleStop} - default={{ - x: pos.xPosition, - y: pos.yPosition - }} - onResize={( - e, - direction, - ref, - delta, - position - ) => { - handleImageResize( - ref, - pos.key, - direction, - position - ); - }} - onClick={() => { - if (!isDragging) { - setIsSignPad(true); - setSignKey(pos.key); - setIsStamp(pos.isStamp); - } - }} - > -
{ - e.stopPropagation(); - handleDeleteSign(pos.key); - setIsStamp(false); - }} - style={{ - position: "absolute", - right: 0, - display: "inline-block", - background: themeColor(), - cursor: "pointer", - padding: "0px 10px" - }} - > - x -
-
- signimg { - setSignKey(pos.key); - setIsSignPad(true); - setIsStamp(pos.isStamp); - }} - src={pos.SignUrl} - style={{ - width: "100%", - height: "100%", - objectFit: "contain" - }} - /> -
-
- ) : ( - handleTabDrag(pos.key, e)} - size={{ - width: pos.Width ? pos.Width : 150, - height: pos.Height ? pos.Height : 60 - }} - onDragStop={handleStop} - default={{ - x: pos.xPosition, - y: pos.yPosition - }} - > -
{ - if (!isDragging) { - e.stopPropagation(); - setIsSignPad(true); - setSignKey(pos.key); - setIsStamp(pos.isStamp); - } - }} - style={{ - cursor: "all-scroll", - zIndex: 10, - position: "absolute", - borderStyle: "dashed", - width: "150px", - height: "60px", - borderColor: themeColor(), - background: "#daebe0", - textAlign: "center", - justifyContent: "center", - alignItems: "center", - borderWidth: "0.2px" - }} - > -
{ - e.stopPropagation(); - handleDeleteSign(pos.key); - setIsStamp(false); - }} - style={{ - position: "absolute", - right: 0, - display: "inline-block", - background: themeColor(), - cursor: "pointer", - padding: "0px 10px" - }} - > - x -
-
- {pos.isStamp ? "stamp" : "signature"} -
-
-
- ); - })} -
- ); - }))} +
+ + ); + })} + + ); + }))} {/* this component for render pdf document is in middle of the component */} {Array.from(new Array(numPages), (el, index) => ( @@ -1326,4 +1337,4 @@ function RenderPdf({ ); } -export default RenderPdf; \ No newline at end of file +export default RenderPdf; From 0d8767ee98547bbccbda08d5a5ba0d48ea8fdd48 Mon Sep 17 00:00:00 2001 From: Amol Date: Tue, 14 Nov 2023 20:30:40 +0530 Subject: [PATCH 2/5] Revert "fix: #172 - Location of requested signature placeholders shift to slight right on mobile view in "Request Signatures" flow (#185)" (#186) This reverts commit f463dc7af7fa1696fa117021b205162c3b7474be. --- .../src/Component/component/renderPdf.js | 1181 ++++++++--------- 1 file changed, 585 insertions(+), 596 deletions(-) diff --git a/microfrontends/SignDocuments/src/Component/component/renderPdf.js b/microfrontends/SignDocuments/src/Component/component/renderPdf.js index 815ce2cd5..07cade06e 100644 --- a/microfrontends/SignDocuments/src/Component/component/renderPdf.js +++ b/microfrontends/SignDocuments/src/Component/component/renderPdf.js @@ -42,8 +42,8 @@ function RenderPdf({ const isMobile = window.innerWidth < 767; const newWidth = window.innerWidth; const scale = isMobile ? pdfOriginalWidth / newWidth : 1; - //check isGuestSigner is present in local if yes than handle login flow header in mobile view - const isGuestSigner = localStorage.getItem("isGuestSigner"); + //check isGuestSigner is present in local if yes than handle login flow header in mobile view + const isGuestSigner = localStorage.getItem("isGuestSigner"); // handle signature block width and height according to screen const posWidth = (pos) => { let width; @@ -75,6 +75,7 @@ function RenderPdf({ return width; } }; + //function for render placeholder block over pdf document const checkSignedSignes = (data) => { @@ -89,7 +90,7 @@ function RenderPdf({ if (isMobile) { //if pos.isMobile false -- placeholder saved from desktop view then handle position in mobile view divided by scale if (!pos.isMobile) { - return pos.xPosition / scale + 32; + return pos.xPosition / scale - 20; } //pos.isMobile true -- placeholder save from mobile view(small device) handle position in mobile view(small screen) view divided by scale else { @@ -433,144 +434,279 @@ function RenderPdf({ ); }) : pdfRequest - ? signerPos.map((data, key) => { - return ( - - {checkSignedSignes(data)} - - ); - }) - : placeholder - ? signerPos.map((data, ind) => { - return ( - - {data.placeHolder.map((placeData, index) => { - return ( - - {placeData.pageNumber === pageNumber && - placeData.pos.map((pos) => { - return ( - - handleTabDrag( - pos.key, - data.signerObjId - ) - } - size={{ - width: pos.Width ? pos.Width : 150, - height: pos.Height ? pos.Height : 60 - }} - lockAspectRatio={ - pos.Width - ? pos.Width / pos.Height - : 2.5 - } - resizeHandleStyles={{ - bottom: { display: "none" }, - right: { display: "none" }, - bottomRight: { display: "block" } - }} - onDragStop={(event, dragElement) => - handleStop( - event, - dragElement, - data.signerObjId, - pos.key - ) - } - default={{ - x: pos.xPosition, - y: pos.yPosition - }} - onResize={( - e, - direction, - ref, - delta, - position - ) => { - handleImageResize( - ref, - pos.key, - data.signerObjId, - position - ); - }} - > -
{ - e.stopPropagation(); - handleDeleteSign( - pos.key, - data.signerObjId - ); - }} - style={{ - position: "absolute", - right: 0, - display: "inline-block", - background: themeColor(), - cursor: "pointer", - padding: "0px 10px", - zIndex: 10 - }} - > - x -
-
{ + return ( + + {checkSignedSignes(data)} + + ); + }) + : placeholder + ? signerPos.map((data, ind) => { + return ( + + {data.placeHolder.map((placeData, index) => { + return ( + + {placeData.pageNumber === pageNumber && + placeData.pos.map((pos) => { + return ( + + handleTabDrag(pos.key, data.signerObjId) + } + size={{ + width: pos.Width ? pos.Width : 150, + height: pos.Height ? pos.Height : 60 + }} + lockAspectRatio={ + pos.Width ? pos.Width / pos.Height : 2.5 + } + resizeHandleStyles={{ + bottom: { display: "none" }, + right: { display: "none" }, + bottomRight: { display: "block" } + }} + onDragStop={(event, dragElement) => + handleStop( + event, + dragElement, + data.signerObjId, + pos.key + ) + } + default={{ + x: pos.xPosition, + y: pos.yPosition + }} + onResize={( + e, + direction, + ref, + delta, + position + ) => { + handleImageResize( + ref, + pos.key, + data.signerObjId, + position + ); + }} + > +
{ + e.stopPropagation(); + handleDeleteSign( + pos.key, + data.signerObjId + ); + }} + style={{ + position: "absolute", + right: 0, + display: "inline-block", + background: themeColor(), + cursor: "pointer", + padding: "0px 10px", + zIndex: 10 + }} + > + x +
+
- {pos.isStamp ? "stamp" : "signature"} -
-
- ); - })} -
- ); - })} -
- ); - }) - : xyPostion.map((data, ind) => { - return ( - - {data.pageNumber === pageNumber && - data.pos.map((pos) => { - return pos && pos.SignUrl ? ( - + {pos.isStamp ? "stamp" : "signature"} +
+
+ ); + })} +
+ ); + })} +
+ ); + }) + : xyPostion.map((data, ind) => { + return ( + + {data.pageNumber === pageNumber && + data.pos.map((pos) => { + return pos && pos.SignUrl ? ( + handleTabDrag(pos.key)} + onDragStop={handleStop} + onResize={( + e, + direction, + ref, + delta, + position + ) => { + handleImageResize( + ref, + pos.key, + direction, + position + ); + }} + > + {" "} +
{ + if (!isDragging) { + setTimeout(() => { + e.stopPropagation(); + setIsSignPad(true); + setSignKey(pos.key); + setIsStamp(pos.isStamp); + }, 500); } - bounds="parent" + }} + > +
{ + e.stopPropagation(); + handleDeleteSign(pos.key); + setIsStamp(false); + }} + style={{ + position: "absolute", + right: 0, + display: "inline-block", + background: themeColor(), + cursor: "pointer", + padding: "0px 10px" + }} + > + x +
+
+ signimg { + setSignKey(pos.key); + setIsSignPad(true); + setIsStamp(pos.isStamp); + }} + src={pos.SignUrl} + style={{ + width: "100%", + height: "100%", + objectFit: "contain" + }} + /> +
+
+
+ ) : ( + <> + { + handleTabDrag(pos.key, e); + }} + onDragStop={handleStop} + size={{ + width: pos.Width ? pos.Width : 150, + height: pos.Height ? pos.Height : 60 + }} + default={{ + x: pos.xPosition, + y: pos.yPosition + }} + > +
{ + if (!isDragging) { + setTimeout(() => { + setIsSignPad(true); + + setSignKey(pos.key); + setIsStamp(pos.isStamp); + }, 500); + } + }} + className="dragElm" style={{ padding: "0px", cursor: "all-scroll", - zIndex: 1, + zIndex: 20, position: "absolute", borderStyle: "dashed", width: "150px", @@ -580,190 +716,50 @@ function RenderPdf({ textAlign: "center", justifyContent: "center", borderWidth: "0.2px", - overflow: "hidden", - userSelect: "none" - }} - size={{ - width: pos.Width ? pos.Width : 151, - height: pos.Height ? pos.Height : 61 - }} - default={{ - x: pos.xPosition, - y: pos.yPosition - }} - onDrag={() => handleTabDrag(pos.key)} - onDragStop={handleStop} - onResize={( - e, - direction, - ref, - delta, - position - ) => { - handleImageResize( - ref, - pos.key, - direction, - position - ); + overflow: "hidden" }} > - {" "}
{ - if (!isDragging) { - setTimeout(() => { - e.stopPropagation(); - setIsSignPad(true); - setSignKey(pos.key); - setIsStamp(pos.isStamp); - }, 500); - } + e.stopPropagation(); + e.preventDefault(); + + handleDeleteSign(pos.key); + setIsStamp(false); + }} + onClick={(e) => { + e.stopPropagation(); // Prevent further event propagation }} - > -
{ - e.stopPropagation(); - handleDeleteSign(pos.key); - setIsStamp(false); - }} - style={{ - position: "absolute", - right: 0, - display: "inline-block", - background: themeColor(), - cursor: "pointer", - padding: "0px 10px" - }} - > - x -
-
- signimg { - setSignKey(pos.key); - setIsSignPad(true); - setIsStamp(pos.isStamp); - }} - src={pos.SignUrl} - style={{ - width: "100%", - height: "100%", - objectFit: "contain" - }} - /> -
-
- - ) : ( - <> - { - handleTabDrag(pos.key, e); - }} - onDragStop={handleStop} - size={{ - width: pos.Width ? pos.Width : 150, - height: pos.Height ? pos.Height : 60 - }} - default={{ - x: pos.xPosition, - y: pos.yPosition + right: 0, + display: "inline-block", + background: themeColor(), + cursor: "pointer", + padding: "0px 10px" }} > -
{ - if (!isDragging) { - setTimeout(() => { - setIsSignPad(true); - - setSignKey(pos.key); - setIsStamp(pos.isStamp); - }, 500); - } - }} - className="dragElm" - style={{ - padding: "0px", - cursor: "all-scroll", - zIndex: 20, - position: "absolute", - borderStyle: "dashed", - width: "150px", - height: "60px", - borderColor: themeColor(), - background: "#daebe0", - textAlign: "center", - justifyContent: "center", - borderWidth: "0.2px", - overflow: "hidden" - }} - > -
{ - e.stopPropagation(); - e.preventDefault(); - - handleDeleteSign(pos.key); - setIsStamp(false); - }} - onClick={(e) => { - e.stopPropagation(); // Prevent further event propagation - }} - style={{ - position: "absolute", - right: 0, - display: "inline-block", - background: themeColor(), - cursor: "pointer", - padding: "0px 10px" - }} - > - x -
-
- {pos.isStamp ? "stamp" : "signature"} -
-
-
- - ); - })} - - ); - }))} + x +
+
+ {pos.isStamp ? "stamp" : "signature"} +
+
+
+ + ); + })} +
+ ); + }))} {/* this component for render pdf document is in middle of the component */}
{Array.from(new Array(numPages), (el, index) => ( @@ -984,289 +980,89 @@ function RenderPdf({ ); }) : pdfRequest - ? signerPos.map((data, key) => { - return ( - - {checkSignedSignes(data)} - - ); - }) - : placeholder - ? signerPos.map((data, ind) => { - return ( - - {data.placeHolder.map((placeData, index) => { - return ( - - {placeData.pageNumber === pageNumber && - placeData.pos.map((pos) => { - return ( - - handleTabDrag( - pos.key, - data.signerObjId - ) - } - size={{ - width: pos.Width ? pos.Width : 150, - height: pos.Height ? pos.Height : 60 - }} - lockAspectRatio={ - pos.Width - ? pos.Width / pos.Height - : 2.5 - } - resizeHandleStyles={{ - bottom: { display: "none" }, - right: { display: "none" }, - bottomRight: { display: "block" } - }} - onDragStop={(event, dragElement) => - handleStop( - event, - dragElement, - data.signerObjId, - pos.key - ) - } - default={{ - x: pos.xPosition, - y: pos.yPosition - }} - onResize={( - e, - direction, - ref, - delta, - position - ) => { - handleImageResize( - ref, - pos.key, - data.signerObjId, - position - ); - }} - > -
{ - e.stopPropagation(); - handleDeleteSign( - pos.key, - data.signerObjId - ); - }} - style={{ - position: "absolute", - right: 0, - display: "inline-block", - background: themeColor(), - cursor: "pointer", - padding: "0px 10px", - zIndex: 10 - }} - > - x -
-
- {pos.isStamp - ? "stamp" - : "signature"} -
-
- ); - })} -
- ); - })} -
- ); - }) - : xyPostion.map((data, ind) => { - return ( - - {data.pageNumber === pageNumber && - data.pos.map((pos) => { - return pos && pos.SignUrl ? ( - handleTabDrag(pos.key)} - size={{ - width: pos.Width ? pos.Width : 150, - height: pos.Height ? pos.Height : 60 - }} - onDragStop={handleStop} - default={{ - x: pos.xPosition, - y: pos.yPosition - }} - onResize={( - e, - direction, - ref, - delta, - position - ) => { - handleImageResize( - ref, - pos.key, - direction, - position - ); - }} - onClick={() => { - if (!isDragging) { - setIsSignPad(true); - setSignKey(pos.key); - setIsStamp(pos.isStamp); - } - }} - > -
{ - e.stopPropagation(); - handleDeleteSign(pos.key); - setIsStamp(false); - }} - style={{ - position: "absolute", - right: 0, - display: "inline-block", - background: themeColor(), - cursor: "pointer", - padding: "0px 10px" - }} - > - x -
-
- signimg { - setSignKey(pos.key); - setIsSignPad(true); - setIsStamp(pos.isStamp); - }} - src={pos.SignUrl} - style={{ - width: "100%", - height: "100%", - objectFit: "contain" - }} - /> -
-
- ) : ( - handleTabDrag(pos.key, e)} - size={{ - width: pos.Width ? pos.Width : 150, - height: pos.Height ? pos.Height : 60 - }} - onDragStop={handleStop} - default={{ - x: pos.xPosition, - y: pos.yPosition - }} - > -
{ - if (!isDragging) { - e.stopPropagation(); - setIsSignPad(true); - setSignKey(pos.key); - setIsStamp(pos.isStamp); - } - }} + ? signerPos.map((data, key) => { + return ( + + {checkSignedSignes(data)} + + ); + }) + : placeholder + ? signerPos.map((data, ind) => { + return ( + + {data.placeHolder.map((placeData, index) => { + return ( + + {placeData.pageNumber === pageNumber && + placeData.pos.map((pos) => { + return ( + + handleTabDrag(pos.key, data.signerObjId) + } + size={{ + width: pos.Width ? pos.Width : 150, + height: pos.Height ? pos.Height : 60 + }} + lockAspectRatio={ + pos.Width ? pos.Width / pos.Height : 2.5 + } + resizeHandleStyles={{ + bottom: { display: "none" }, + right: { display: "none" }, + bottomRight: { display: "block" } + }} + onDragStop={(event, dragElement) => + handleStop( + event, + dragElement, + data.signerObjId, + pos.key + ) + } + default={{ + x: pos.xPosition, + y: pos.yPosition + }} + onResize={( + e, + direction, + ref, + delta, + position + ) => { + handleImageResize( + ref, + pos.key, + data.signerObjId, + position + ); + }} >
{ e.stopPropagation(); - handleDeleteSign(pos.key); - setIsStamp(false); + handleDeleteSign( + pos.key, + data.signerObjId + ); }} style={{ position: "absolute", @@ -1274,7 +1070,8 @@ function RenderPdf({ display: "inline-block", background: themeColor(), cursor: "pointer", - padding: "0px 10px" + padding: "0px 10px", + zIndex: 10 }} > x @@ -1282,20 +1079,212 @@ function RenderPdf({
{pos.isStamp ? "stamp" : "signature"}
-
-
- ); - })} -
- ); - }))} + + ); + })} +
+ ); + })} + + ); + }) + : xyPostion.map((data, ind) => { + return ( + + {data.pageNumber === pageNumber && + data.pos.map((pos) => { + return pos && pos.SignUrl ? ( + handleTabDrag(pos.key)} + size={{ + width: pos.Width ? pos.Width : 150, + height: pos.Height ? pos.Height : 60 + }} + onDragStop={handleStop} + default={{ + x: pos.xPosition, + y: pos.yPosition + }} + onResize={( + e, + direction, + ref, + delta, + position + ) => { + handleImageResize( + ref, + pos.key, + direction, + position + ); + }} + onClick={() => { + if (!isDragging) { + setIsSignPad(true); + setSignKey(pos.key); + setIsStamp(pos.isStamp); + } + }} + > +
{ + e.stopPropagation(); + handleDeleteSign(pos.key); + setIsStamp(false); + }} + style={{ + position: "absolute", + right: 0, + display: "inline-block", + background: themeColor(), + cursor: "pointer", + padding: "0px 10px" + }} + > + x +
+
+ signimg { + setSignKey(pos.key); + setIsSignPad(true); + setIsStamp(pos.isStamp); + }} + src={pos.SignUrl} + style={{ + width: "100%", + height: "100%", + objectFit: "contain" + }} + /> +
+
+ ) : ( + handleTabDrag(pos.key, e)} + size={{ + width: pos.Width ? pos.Width : 150, + height: pos.Height ? pos.Height : 60 + }} + onDragStop={handleStop} + default={{ + x: pos.xPosition, + y: pos.yPosition + }} + > +
{ + if (!isDragging) { + e.stopPropagation(); + setIsSignPad(true); + setSignKey(pos.key); + setIsStamp(pos.isStamp); + } + }} + style={{ + cursor: "all-scroll", + zIndex: 10, + position: "absolute", + borderStyle: "dashed", + width: "150px", + height: "60px", + borderColor: themeColor(), + background: "#daebe0", + textAlign: "center", + justifyContent: "center", + alignItems: "center", + borderWidth: "0.2px" + }} + > +
{ + e.stopPropagation(); + handleDeleteSign(pos.key); + setIsStamp(false); + }} + style={{ + position: "absolute", + right: 0, + display: "inline-block", + background: themeColor(), + cursor: "pointer", + padding: "0px 10px" + }} + > + x +
+
+ {pos.isStamp ? "stamp" : "signature"} +
+
+
+ ); + })} +
+ ); + }))} {/* this component for render pdf document is in middle of the component */} {Array.from(new Array(numPages), (el, index) => ( @@ -1337,4 +1326,4 @@ function RenderPdf({ ); } -export default RenderPdf; +export default RenderPdf; \ No newline at end of file From a14454227c26f512cb24712bf5d3585d2d1af759 Mon Sep 17 00:00:00 2001 From: Raktima <110812506+raktima-opensignlabs@users.noreply.github.com> Date: Tue, 14 Nov 2023 20:31:19 +0530 Subject: [PATCH 3/5] fix Completion certificate issues (#184) --- .../src/Component/Certificate/Certificate.js | 82 +++---- .../src/Component/SignYourselfPdf.js | 14 +- .../src/Component/component/header.js | 203 ++++++++---------- .../src/assests/open-sign-logo.png | Bin 0 -> 88554 bytes 4 files changed, 125 insertions(+), 174 deletions(-) create mode 100644 microfrontends/SignDocuments/src/assests/open-sign-logo.png diff --git a/microfrontends/SignDocuments/src/Component/Certificate/Certificate.js b/microfrontends/SignDocuments/src/Component/Certificate/Certificate.js index 5df07d5f5..37eee4fc3 100644 --- a/microfrontends/SignDocuments/src/Component/Certificate/Certificate.js +++ b/microfrontends/SignDocuments/src/Component/Certificate/Certificate.js @@ -1,7 +1,15 @@ import React, { useEffect, useState } from "react"; import "./certificate.css"; +import opensignLogo from "../../assests/open-sign-logo.png"; -import { Page, Text, View, Document, StyleSheet } from "@react-pdf/renderer"; +import { + Page, + Text, + View, + Document, + StyleSheet, + Image +} from "@react-pdf/renderer"; function Certificate({ pdfData }) { const [isMultiSigners, setIsMultiSigners] = useState(); @@ -49,70 +57,34 @@ function Certificate({ pdfData }) { fontSize: "11px", marginBottom: "10px", color: "gray" + }, + image: { + width: "71px", + height: "17px" } }); const generatedDate = () => { const newDate = new Date(); - const localExpireDate = newDate.toLocaleDateString("en-US", { - day: "numeric", - month: "long", - year: "numeric" - }); - - var currentOffset = newDate.getTimezoneOffset(); - - var ISTOffset = 330; // IST offset UTC +5:30 - - var ISTTime = new Date( - newDate.getTime() + (ISTOffset + currentOffset) * 60000 - ); - - // ISTTime now represents the time in IST coordinates - - var hoursIST = ISTTime.getHours(); - var minutesIST = ISTTime.getMinutes(); + const utcTime = newDate.toUTCString(); return ( - Generated On {localExpireDate} {hoursIST}:{minutesIST} IST + Generated On {utcTime} ); }; const changeCompletedDate = () => { const completedOn = pdfData[0].updatedAt; const newDate = new Date(completedOn); - const localExpireDate = newDate.toLocaleDateString("en-US", { - day: "numeric", - month: "long", - year: "numeric" - }); + const utcTime = newDate.toUTCString(); - var currentOffset = newDate.getTimezoneOffset(); - - var ISTOffset = 330; // IST offset UTC +5:30 - - var ISTTime = new Date( - newDate.getTime() + (ISTOffset + currentOffset) * 60000 - ); - - // ISTTime now represents the time in IST coordinates - - var hoursIST = ISTTime.getHours(); - var minutesIST = ISTTime.getMinutes(); - - return ( - - {localExpireDate} {hoursIST}:{minutesIST} IST - - ); + return {utcTime}; }; const signerName = (data) => { @@ -143,7 +115,19 @@ function Certificate({ pdfData }) { {/** Page defines a single page of content. */} - {generatedDate()} + + + {generatedDate()} + + Organization :   - __ + + {pdfData[0].ExtUserPtr.Company} + Completed on :  {changeCompletedDate()} diff --git a/microfrontends/SignDocuments/src/Component/SignYourselfPdf.js b/microfrontends/SignDocuments/src/Component/SignYourselfPdf.js index d4cb37df9..6591667bc 100644 --- a/microfrontends/SignDocuments/src/Component/SignYourselfPdf.js +++ b/microfrontends/SignDocuments/src/Component/SignYourselfPdf.js @@ -627,8 +627,8 @@ function SignYourSelf() { const bottomY = xyPosData.isDrag ? xyPosData.yBottom * scale - height : xyPosData.firstYPos - ? xyPosData.yBottom * scale - height + xyPosData.firstYPos - : xyPosData.yBottom * scale - height; + ? xyPosData.yBottom * scale - height + xyPosData.firstYPos + : xyPosData.yBottom * scale - height; singleSign = { pdfFile: pdfBase64Url, @@ -664,15 +664,7 @@ function SignYourSelf() { // console.log("json ", json); setPdfUrl(json.result.data); if (json.result.data) { - const docStatus = { - isCompleted: true - }; - - setDocumentStatus(docStatus); - const loadObj = { - isLoad: false - }; - setIsLoading(loadObj); + getDocumentDetails(); } }) .catch((err) => { diff --git a/microfrontends/SignDocuments/src/Component/component/header.js b/microfrontends/SignDocuments/src/Component/component/header.js index 4d971cfb4..d7f4724ed 100644 --- a/microfrontends/SignDocuments/src/Component/component/header.js +++ b/microfrontends/SignDocuments/src/Component/component/header.js @@ -82,13 +82,13 @@ function Header({ //handle download signed pdf const handleDownloadPdf = () => { const pdfName = pdfDetails[0] && pdfDetails[0].Name; - saveAs(pdfUrl, `${sanitizeFileName(pdfName)}_signed_by_OpenSign™.pdf`); + saveAs(pdfUrl, `${sanitizeFileName(pdfName)}_signed_by_OpenSign™.pdf`); }; - + const sanitizeFileName = (pdfName) => { // Replace spaces with underscore - return pdfName.replace(/ /g, '_'); - } + return pdfName.replace(/ /g, "_"); + }; //certificate generate and download component in mobile view const CertificateDropDown = () => { //after generate download certifcate pdf @@ -109,6 +109,7 @@ function Header({ window.URL.revokeObjectURL(url); } }; + return ( e.preventDefault()} @@ -118,7 +119,21 @@ function Header({ {({ blob, url, loading, error }) => ( <> {loading ? ( - "Loading document..." +
+ + Certificate +
) : (
); }; + const CertificateComponent = () => { + return ( + } + fileName={`completion certificate-${ + pdfDetails[0] && pdfDetails[0].Name + }.pdf`} + > + {({ blob, url, loading, error }) => + loading ? ( + + ) : ( + + ) + } + + ); + }; return (
@@ -255,10 +327,12 @@ function Header({ - ) :isSignYourself && ( - - - + ) : ( + isSignYourself && ( + + + + ) )} {pdfDetails[0] && pdfDetails.length > 0 && ( - } - fileName={`completion certificate-${ - pdfDetails[0] && pdfDetails[0].Name - }.pdf`} - > - {({ blob, url, loading, error }) => - loading ? ( - "Loading document..." - ) : ( - - ) - } - + )} - ) - } - - )} + {isCompleted.isCertificate && } - ) - } - +

" @@ -46,14 +62,60 @@ async function sendmail(req) { const from = req.params.from || ''; const messageParams = { - from: from + ' <' + process.env.MAILGUN_SENDER + '>', + from: + from + ' <' + process.env.SMTP_ENABLE + ? process.env.SMTP_USER_EMAIL + : process.env.MAILGUN_SENDER + '>', to: req.params.recipient, subject: req.params.subject, text: req.params.text || 'mail', html: req.params.html || '', - attachment: file, + attachments: process.env.SMTP_ENABLE ? [file] : undefined, + attachment: process.env.SMTP_ENABLE ? undefined : file, }; + if (transporterSMTP) { + const res = await transporterSMTP.sendMail(messageParams); + + console.log('Res ', res); + if (!res.err) { + return { + status: 'success', + }; + } + } else { + const res = await mailgunClient.messages.create(mailgunDomain, messageParams); + console.log('Res ', res); + if (res.status === 200) { + return { + status: 'success', + }; + } + } + } + } else { + const from = req.params.from || ''; + const messageParams = { + from: + from + ' <' + process.env.SMTP_ENABLE + ? process.env.SMTP_USER_EMAIL + : process.env.MAILGUN_SENDER + '>', + to: req.params.recipient, + subject: req.params.subject, + text: req.params.text || 'mail', + html: req.params.html || '', + }; + + if (transporterSMTP) { + const res = await transporterSMTP.sendMail(messageParams); + + console.log('Res ', res); + if (!res.err) { + return { + status: 'success', + }; + } + } else { const res = await mailgunClient.messages.create(mailgunDomain, messageParams); console.log('Res ', res); if (res.status === 200) { @@ -62,23 +124,6 @@ async function sendmail(req) { }; } } - } else { - const from = req.params.from || ''; - const messageParams = { - from: from + ' <' + process.env.MAILGUN_SENDER + '>', - to: req.params.recipient, - subject: req.params.subject, - text: req.params.text || 'mail', - html: req.params.html || '', - }; - - const res = await mailgunClient.messages.create(mailgunDomain, messageParams); - console.log('Res ', res); - if (res.status === 200) { - return { - status: 'success', - }; - } } } catch (err) { console.log('err ', err); diff --git a/apps/OpenSignServer/index.js b/apps/OpenSignServer/index.js index 814d9cf58..13814d3cc 100644 --- a/apps/OpenSignServer/index.js +++ b/apps/OpenSignServer/index.js @@ -17,10 +17,11 @@ import S3Adapter from 'parse-server-s3-adapter'; import FSFilesAdapter from 'parse-server-fs-adapter'; import AWS from 'aws-sdk'; import { app as customRoute } from './cloud/customRoute/customApp.js'; +import { createTransport } from 'nodemailer'; const spacesEndpoint = new AWS.Endpoint(process.env.DO_ENDPOINT); // console.log("configuration ", configuration); -if (process.env.USE_LOCAL !== "TRUE") { +if (process.env.USE_LOCAL !== 'TRUE') { const s3Options = { bucket: process.env.DO_SPACE, // globalConfig.S3FilesAdapter.bucket, baseUrl: process.env.DO_BASEURL, @@ -36,18 +37,31 @@ if (process.env.USE_LOCAL !== "TRUE") { var fsAdapter = new S3Adapter(s3Options); } else { var fsAdapter = new FSFilesAdapter({ - "filesSubDirectory": "files" // optional, defaults to ./files + filesSubDirectory: 'files', // optional, defaults to ./files }); } +let transporterMail; let mailgunClient; let mailgunDomain; -if (process.env.MAILGUN_API_KEY) { + +if (process.env.SMTP_ENABLE) { + transporterMail = createTransport({ + host: process.env.SMTP_HOST, + port: process.env.SMTP_PORT || 465, + secure: process.env.SMTP_SECURE || true, + auth: { + user: process.env.SMTP_USER_EMAIL, + pass: process.env.SMTP_PASS, + }, + }); +} else if (process.env.MAILGUN_API_KEY) { const mailgun = new Mailgun(formData); mailgunClient = mailgun.client({ username: 'api', key: process.env.MAILGUN_API_KEY, }); + mailgunDomain = process.env.MAILGUN_DOMAIN; } @@ -64,36 +78,39 @@ export const config = { // Your apps name. This will appear in the subject and body of the emails that are sent. appName: 'Open Sign', allowClientClassCreation: false, - emailAdapter: process.env.MAILGUN_API_KEY - ? { - module: 'parse-server-api-mail-adapter', - options: { - // The email address from which emails are sent. - sender: process.env.MAILGUN_SENDER, - // The email templates. - templates: { - // The template used by Parse Server to send an email for password - // reset; this is a reserved template name. - passwordResetEmail: { - subjectPath: './files/password_reset_email_subject.txt', - textPath: './files/password_reset_email.txt', - htmlPath: './files/password_reset_email.html', + emailAdapter: + process.env.SMTP_ENABLE || process.env.MAILGUN_API_KEY + ? { + module: 'parse-server-api-mail-adapter', + options: { + // The email address from which emails are sent. + sender: process.env.SMTP_ENABLE ? process.env.SMTP_USER_EMAIL : process.env.MAILGUN_SENDER, + // The email templates. + templates: { + // The template used by Parse Server to send an email for password + // reset; this is a reserved template name. + passwordResetEmail: { + subjectPath: './files/password_reset_email_subject.txt', + textPath: './files/password_reset_email.txt', + htmlPath: './files/password_reset_email.html', + }, + // The template used by Parse Server to send an email for email + // address verification; this is a reserved template name. + verificationEmail: { + subjectPath: './files/verification_email_subject.txt', + textPath: './files/verification_email.txt', + htmlPath: './files/verification_email.html', + }, }, - // The template used by Parse Server to send an email for email - // address verification; this is a reserved template name. - verificationEmail: { - subjectPath: './files/verification_email_subject.txt', - textPath: './files/verification_email.txt', - htmlPath: './files/verification_email.html', + apiCallback: async ({ payload, locale }) => { + if (mailgunClient) { + const mailgunPayload = ApiPayloadConverter.mailgun(payload); + await mailgunClient.messages.create(mailgunDomain, mailgunPayload); + } else if (transporterMail) await transporterMail.sendMail(payload); }, }, - apiCallback: async ({ payload, locale }) => { - const mailgunPayload = ApiPayloadConverter.mailgun(payload); - await mailgunClient.messages.create(mailgunDomain, mailgunPayload); - }, - }, - } - : null, + } + : null, filesAdapter: fsAdapter, auth: { google: { diff --git a/apps/OpenSignServer/package-lock.json b/apps/OpenSignServer/package-lock.json index 6b692e824..f7626012e 100644 --- a/apps/OpenSignServer/package-lock.json +++ b/apps/OpenSignServer/package-lock.json @@ -18,16 +18,18 @@ "express-sse": "^0.5.3", "form-data": "^4.0.0", "jsonschema": "^1.4.1", - "mailgun.js": "^9.0.1", + "mailgun.js": "^9.3.0", "mongoose": "^7.2.1", "multer": "^1.4.5-lts.1", "multer-s3": "^2.10.0", "node-forge": "^1.3.1", "node-signpdf": "^1.5.1", + "nodemailer": "^6.9.7", "openai": "^4.8.0", "parse": "4.1.0", "parse-server": "6.3.1", "parse-server-api-mail-adapter": "^3.0.0", + "parse-server-fs-adapter": "1.0.1", "parse-server-s3-adapter": "^1.2.0", "pdf-lib": "^1.16.0", "pdfkit": "^0.13.0", @@ -6016,9 +6018,9 @@ } }, "node_modules/mailgun.js": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/mailgun.js/-/mailgun.js-9.0.1.tgz", - "integrity": "sha512-bVZ1zGh5UfQcChqIwIAil99hzoTeB3aHqAUbqmIBLMLcKfx+FF2qvhbc00WtwrFhe5dBQqQw6zPj0QBlqV4nXg==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/mailgun.js/-/mailgun.js-9.3.0.tgz", + "integrity": "sha512-iRqCglCdi+Q5anFpeRKHiytT/i34E14p/WtTE57VSeq5bATK+zQ8UnpFgPRaqGGTJqyGjqcO9m5YDRRB4/qirw==", "dependencies": { "axios": "^1.3.3", "base-64": "^1.0.0", @@ -6799,6 +6801,14 @@ "node-forge": "^1.2.1" } }, + "node_modules/nodemailer": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.7.tgz", + "integrity": "sha512-rUtR77ksqex/eZRLmQ21LKVH5nAAsVicAtAYudK7JgwenEDZ0UIQ1adUGqErz7sMkWYxWTTU1aeP2Jga6WQyJw==", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/nodemon": { "version": "2.0.22", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", @@ -7403,6 +7413,12 @@ "node": ">=12" } }, + "node_modules/parse-server-fs-adapter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-server-fs-adapter/-/parse-server-fs-adapter-1.0.1.tgz", + "integrity": "sha512-5IRKAT2QkzHrYrBESY4E8jsV1sl+XVBTKGyUvBPgBR2QzsTTqiyU/lFZD8PAJavA+TH1BLyLTUMZbhZhswNVbQ==", + "deprecated": "use @parse/fs-files-adapter" + }, "node_modules/parse-server-s3-adapter": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/parse-server-s3-adapter/-/parse-server-s3-adapter-1.2.0.tgz", diff --git a/apps/OpenSignServer/package.json b/apps/OpenSignServer/package.json index 50292ad43..5049e7188 100644 --- a/apps/OpenSignServer/package.json +++ b/apps/OpenSignServer/package.json @@ -27,18 +27,19 @@ "express-sse": "^0.5.3", "form-data": "^4.0.0", "jsonschema": "^1.4.1", - "mailgun.js": "^9.0.1", + "mailgun.js": "^9.3.0", "mongoose": "^7.2.1", "multer": "^1.4.5-lts.1", "multer-s3": "^2.10.0", "node-forge": "^1.3.1", "node-signpdf": "^1.5.1", + "nodemailer": "^6.9.7", "openai": "^4.8.0", "parse": "4.1.0", "parse-server": "6.3.1", "parse-server-api-mail-adapter": "^3.0.0", - "parse-server-s3-adapter": "^1.2.0", "parse-server-fs-adapter": "1.0.1", + "parse-server-s3-adapter": "^1.2.0", "pdf-lib": "^1.16.0", "pdfkit": "^0.13.0", "razorpay": "^2.8.6", From 0a365509079c5e470a0d00003684ed33c8bf0fc3 Mon Sep 17 00:00:00 2001 From: Amol Date: Wed, 15 Nov 2023 02:21:26 +0530 Subject: [PATCH 5/5] Update README.md --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fe1f2b8e6..7a4d986c7 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ -

OpenSign™

- -
+

+

-The free and open source alternative to DocuSign +[The free and open source alternative to DocuSign](https://www.opensignlabs.com) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/opensignlabs/opensign.svg)](http://isitmaintained.com/project/opensignlabs/opensign "Average time to resolve an issue") [![All Contributors](https://img.shields.io/github/all-contributors/opensignlabs/opensign?color=ee8449&style=flat-square)](#contributors) @@ -23,7 +22,7 @@ The free and open source alternative to DocuSign LinkedIn -## An open-source document e-signing solution +## The open-source document e-signing solution ---