Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into validation

This commit is contained in:
prafull-opensignlabs
2024-11-07 18:59:10 +05:30
27 changed files with 1052 additions and 1114 deletions
+557 -577
View File
File diff suppressed because it is too large Load Diff
+8 -8
View File
@@ -25,8 +25,8 @@
"react": "^18.2.0",
"react-bootstrap": "^2.10.5",
"react-confetti": "^6.1.0",
"react-cookie": "^7.2.1",
"react-datepicker": "^7.4.0",
"react-cookie": "^7.2.2",
"react-datepicker": "^7.5.0",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dnd-multi-backend": "^8.0.3",
@@ -52,7 +52,7 @@
"redux": "^5.0.1",
"redux-thunk": "^3.1.0",
"regex-parser": "^2.3.0",
"serve": "^14.2.3",
"serve": "^14.2.4",
"styled-components": "^5.3.0",
"web-vitals": "^4.2.3",
"ws": "^8.18.0"
@@ -95,10 +95,10 @@
}
},
"devDependencies": {
"@babel/core": "^7.25.8",
"@babel/preset-env": "^7.25.8",
"@babel/preset-react": "^7.25.7",
"@babel/runtime-corejs2": "^7.25.7",
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.25.9",
"@babel/runtime-corejs2": "^7.26.0",
"autoprefixer": "^10.4.20",
"babel-loader": "^9.2.1",
"clean-webpack-plugin": "^4.0.0",
@@ -108,7 +108,7 @@
"daisyui": "^4.12.13",
"dotenv": "^16.4.5",
"dotenv-webpack": "^8.1.0",
"eslint": "^9.12.0",
"eslint": "^9.13.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.1",
"lint-staged": "^15.2.10",
@@ -292,7 +292,7 @@
"subject": "Subject",
"body": "Body",
"add-contact": "Add Contact",
"add-signer-alert": "Contact already exist!",
"add-signer-alert": "Contact already exist! Please select it from Signers dropdown",
"record-delete-alert": "Record deleted successfully!",
"record-revoke-alert": "Record revoked successfully!",
"mail-sent-alert": "Mail sent successfully.",
@@ -681,7 +681,7 @@
"p3":"Tip: If your signers are familiar with OpenSign and frequently use it, you may want to disable the guided tour for a more seamless experience. Choose the option that best fits your document signing needs."
},
"form-title-1":"Document Flow Setting",
"form-title-2":"Security Setting",
"form-title-2":"Security Settings",
"public-tour-message":"The template needs to be public before you can generate a shareable link.",
"add-user-template": "You need to add a role before you can add fields for it.",
"pdf-uncompatible": "This pdf is not compatible with opensign, please contact <support@opensignlabs.com>",
@@ -689,6 +689,7 @@
"attach-signer-tour":"You need to attach a Signer to every role. You can do that by clicking this icon. Once you select a Signer it will be attached to all the fields associated with that role which appear in the same colour.",
"allowed-signature-types": "Allowed signature types",
"at-least-one-signature-type": "At least one signature type should be enabled.",
"add-signer-note": "Note - This contact will be added to your contact list",
"allowed-signature-types-help": {
"p1": "This signature preference controls which signing options are available to your signers. Only the signature types you select will appear in the signature widget when a document is signed. For example, if you choose only the 'Draw' option in preferences, your signer will see only the 'Draw' option in the signature widget, while the other three options will not be available.",
"l1": "Create a handwritten signature directly on the screen using your finger or a stylus.",
@@ -292,7 +292,7 @@
"subject": "Asunto",
"body": "Cuerpo",
"add-contact": "Agregar contacto",
"add-signer-alert": "¡El contacto ya existe!",
"add-signer-alert": "¡El contacto ya existe! Selecciónelo en el menú desplegable 'Firmantes'",
"record-delete-alert": "¡Entrada eliminada exitosamente!",
"record-revoke-alert": "¡Entrada revocada exitosamente!",
"mail-sent-alert": "Correo enviado exitosamente.",
@@ -689,6 +689,7 @@
"attach-signer-tour" :"Debe adjuntar un firmante a cada función. Puede hacerlo haciendo clic en este icono. Una vez que seleccione un Firmante, se adjuntará a todos los campos asociados con ese rol que aparecen en el mismo color.",
"allowed-signature-types": "Tipos de firma permitidos",
"at-least-one-signature-type": "Se debe habilitar al menos un tipo de firma.",
"add-signer-note": "Nota - Este contacto se agregará a su lista de contactos",
"allowed-signature-types-help": {
"p1": "Esta preferencia de firma controla qué opciones de firma están disponibles para sus firmantes. Solo los tipos de firma que seleccione aparecerán en el widget de firma cuando se firme un documento. Por ejemplo, si elige sólo la opción 'Draw' en las preferencias, su firmante verá sólo la opción 'Draw' en el widget de firma, mientras que las otras tres opciones no estarán disponibles.",
"l1": "Cree una firma manuscrita directamente en la pantalla usando su dedo o un lápiz.",
@@ -291,7 +291,7 @@
"subject": "Sujet",
"body": "Corps",
"add-contact": "Ajouter le contact",
"add-signer-alert": "Le contact existe déjà !",
"add-signer-alert": "Le contact existe déjà ! Veuillez le sélectionner dans la liste déroulante 'Signataires'",
"record-delete-alert": "Enregistrement supprimé avec succès !",
"record-revoke-alert": " Enregistrement révoqué avec succès ! ",
"mail-sent-alert": "Courriel envoyé avec succès.",
@@ -688,6 +688,7 @@
"attach-signer-tour" :"Vous devez associer un signataire à chaque rôle. Vous pouvez le faire en cliquant sur cette icône. Une fois que vous avez sélectionné un signataire, il sera attaché à tous les champs associés à ce rôle qui apparaissent dans la même couleur.",
"allowed-signature-types": "Types de signature autorisés",
"at-least-one-signature-type": "Au moins un type de signature doit être activé.",
"add-signer-note": "Remarque - Ce contact sera ajouté à votre liste de contacts",
"allowed-signature-types-help": {
"p1": "Cette préférence de signature contrôle les options de signature disponibles pour vos signataires. Seuls les types de signature que vous sélectionnez apparaîtront dans le widget de signature lorsqu'un document est signé. Par exemple, si vous choisissez uniquement l'option 'Draw' dans les préférences, votre signataire ne verra que l'option 'Draw' dans le widget de signature, tandis que les trois autres options ne seront pas disponibles.",
"l1": "Créez une signature manuscrite directement sur l'écran à l'aide de votre doigt ou d'un stylet.",
@@ -206,6 +206,7 @@ const AddSigner = (props) => {
</div>
)}
<div className="w-full mx-auto p-2 text-base-content">
<p className="mb-3">{t("add-signer-note")}</p>
{isUserExist && (
<div className="mb-3 flex items-center">
<input
+2 -2
View File
@@ -16,7 +16,7 @@ import { useTranslation } from "react-i18next";
import ModalUi from "../primitives/ModalUi";
import QuotaCard from "../primitives/QuotaCard";
const Header = ({ showSidebar }) => {
const Header = ({ showSidebar, setIsMenu }) => {
const { t, i18n } = useTranslation();
const navigate = useNavigate();
const { width } = useWindowSize();
@@ -40,7 +40,7 @@ const Header = ({ showSidebar }) => {
const toggleDropdown = () => {
setIsOpen(!isOpen);
if (width <= 768) {
showSidebar();
setIsMenu(false);
}
};
useEffect(() => {
@@ -339,9 +339,9 @@ function DropdownWidgetOption(props) {
value={
props.fontSize ||
props.currWidgetsDetails?.options?.fontSize ||
"12"
12
}
onChange={(e) => props.setFontSize(e.target.value)}
onChange={(e) => props.setFontSize(parseInt(e.target.value))}
>
{fontsizeArr.map((size, ind) => {
return (
@@ -412,7 +412,7 @@ function Placeholder(props) {
data?.format,
null,
null,
props.fontSize || props.pos?.options?.fontSize || "12",
props.fontSize || props.pos?.options?.fontSize || 12,
props.fontColor || props.pos?.options?.fontColor || "black"
);
setSelectDate({ date: date, format: data?.format });
@@ -647,7 +647,7 @@ function Placeholder(props) {
const fontSize = (size || 12) * containerScale * props.scale;
//isMinHeight to set text box minimum height
if (isMinHeight) {
return fontSize * 1.5 + "px";
return fontSize * 1.2 + "px";
} else {
return fontSize + "px";
}
@@ -834,7 +834,7 @@ function Placeholder(props) {
)}
{isTabAndMobile ? (
<div
className="flex items-stretch"
className="flex items-stretch justify-center"
style={{
left: xPos(props.pos, props.isSignYourself),
top: yPos(props.pos, props.isSignYourself),
@@ -944,8 +944,8 @@ function Placeholder(props) {
<span>{t("font-size")} :</span>
<select
className="ml-[3px] md:ml:[7px] op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content text-xs"
value={props.fontSize || clickonWidget.options?.fontSize || "12"}
onChange={(e) => props.setFontSize(e.target.value)}
value={props.fontSize || clickonWidget.options?.fontSize || 12}
onChange={(e) => props.setFontSize(parseInt(e.target.value))}
>
{fontsizeArr.map((size, ind) => {
return (
@@ -21,9 +21,11 @@ function TextFontSetting(props) {
value={
props.fontSize ||
props.currWidgetsDetails?.options?.fontSize ||
"12"
12
}
onChange={(e) => props.setFontSize(e.target.value)}
onChange={(e) => {
props.setFontSize(parseInt(e.target.value));
}}
>
{fontsizeArr.map((size, ind) => {
return (
@@ -341,9 +341,9 @@ const WidgetNameModal = (props) => {
<select
className="ml-[7px] op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content text-xs"
value={
props.fontSize || props.defaultdata?.options?.fontSize || "12"
props.fontSize || props.defaultdata?.options?.fontSize || 12
}
onChange={(e) => props.setFontSize(e.target.value)}
onChange={(e) => props.setFontSize(parseInt(e.target.value))}
>
{fontsizeArr.map((size, ind) => {
return (
@@ -41,7 +41,7 @@ const SelectSigners = (props) => {
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
...token
};
const searchEmail = inputValue;
const searchEmail = inputValue ? inputValue : "";
const axiosRes = await axios.post(url, { searchEmail }, { headers });
const contactRes = axiosRes?.data?.result || [];
if (contactRes) {
@@ -54,11 +54,9 @@ const SelectSigners = (props) => {
!signerObj.find((item2) => item2.objectId === item1.objectId)
);
};
//get update signer's List if signersdata is present
const updateSignersList =
props?.signersData && compareArrays(res, props?.signersData);
const result = updateSignersList ? updateSignersList : res;
setUserList(result);
return await result.map((item) => ({
@@ -70,7 +68,6 @@ const SelectSigners = (props) => {
console.log("err", error);
}
};
return (
<div className="h-full px-[20px] py-[10px] text-base-content">
<div className="w-full mx-auto p-[8px]">
@@ -87,6 +84,7 @@ const SelectSigners = (props) => {
loadOptions={loadOptions}
onChange={handleOptions}
unstyled
onFocus={() => loadOptions()}
classNames={{
control: () =>
"op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full h-full text-[11px]",
+21 -41
View File
@@ -463,29 +463,29 @@ export const defaultWidthHeight = (type) => {
case "stamp":
return { width: 150, height: 60 };
case "checkbox":
return { width: 15, height: 15 };
return { width: 15, height: 19 };
case textInputWidget:
return { width: 150, height: 25 };
return { width: 150, height: 19 };
case "dropdown":
return { width: 120, height: 22 };
case "initials":
return { width: 50, height: 50 };
case "name":
return { width: 150, height: 25 };
return { width: 150, height: 19 };
case "company":
return { width: 150, height: 25 };
return { width: 150, height: 19 };
case "job title":
return { width: 150, height: 25 };
return { width: 150, height: 19 };
case "date":
return { width: 100, height: 20 };
case "image":
return { width: 70, height: 70 };
case "email":
return { width: 150, height: 20 };
return { width: 150, height: 19 };
case radioButtonWidget:
return { width: 5, height: 10 };
case textWidget:
return { width: 150, height: 25 };
return { width: 150, height: 19 };
default:
return { width: 150, height: 60 };
}
@@ -1016,7 +1016,7 @@ export const calculateInitialWidthHeight = (widgetData) => {
const intialText = widgetData;
const span = document.createElement("span");
span.textContent = intialText;
span.style.font = `14px`; // here put your text size and font family
span.style.font = `12px`; // here put your text size and font family
span.style.display = "hidden";
document.body.appendChild(span);
const width = span.offsetWidth;
@@ -1303,16 +1303,6 @@ export const changeImageWH = async (base64Image) => {
});
};
//function to calculate font size of text area widgets
const calculateFontSize = (position, containerScale, signyourself) => {
const font = position?.options?.fontSize || 12;
if (!signyourself && position?.isMobile && position?.scale) {
return font / position?.scale / containerScale;
} else {
return font / containerScale;
}
};
const getWidgetsFontColor = (type) => {
switch (type) {
case "red":
@@ -1328,14 +1318,7 @@ const getWidgetsFontColor = (type) => {
}
};
//function for embed multiple signature using pdf-lib
export const multiSignEmbed = async (
widgets,
pdfDoc,
signyourself,
scale,
pdfOriginalWH,
containerWH
) => {
export const multiSignEmbed = async (widgets, pdfDoc, signyourself, scale) => {
// `fontBytes` is used to embed custom font in pdf
const fontBytes = await fileasbytes(
"https://cdn.opensignlabs.com/webfonts/times.ttf"
@@ -1345,11 +1328,6 @@ export const multiSignEmbed = async (
let hasError = false;
for (let item of widgets) {
if (hasError) break; // Stop the outer loop if an error occurred
const containerScale = getContainerScale(
pdfOriginalWH,
item?.pageNumber,
containerWH
);
const typeExist = item.pos.some((data) => data?.type);
let updateItem;
@@ -1441,7 +1419,17 @@ export const multiSignEmbed = async (
return y;
}
} else {
return resizePos;
const WidgetsTypeTextExist = [
textWidget,
textInputWidget,
"name",
"company",
"job title",
"date",
"email"
].includes(position.type);
const yPosition = WidgetsTypeTextExist ? resizePos + 6 : resizePos;
return yPosition;
}
};
const color = position?.options?.fontColor;
@@ -1517,11 +1505,7 @@ export const multiSignEmbed = async (
});
}
} else if (widgetTypeExist) {
const fontSize = calculateFontSize(
position,
containerScale,
signyourself
);
const fontSize = position?.options?.fontSize || 12;
parseInt(fontSize);
let textContent;
if (position?.options?.response) {
@@ -1554,7 +1538,6 @@ export const multiSignEmbed = async (
lines.push(currentLine.trim());
return lines;
};
// Function to break text into lines based on when user go next line on press enter button
const breakTextIntoLines = (textContent, width) => {
const lines = [];
@@ -1575,7 +1558,6 @@ export const multiSignEmbed = async (
return lines;
};
//check if text content have `\n` string it means user press enter to go next line and handle condition
//else auto adjust text content according to container width
const lines = isNewOnEnterLineExist
@@ -1602,7 +1584,6 @@ export const multiSignEmbed = async (
}
} else if (position.type === "dropdown") {
const fontsize = parseInt(position?.options?.fontSize) || 12;
const dropdownRandomId = "dropdown" + randomId();
const dropdown = form.createDropdown(dropdownRandomId);
dropdown.addOptions(position?.options?.values);
@@ -1701,7 +1682,6 @@ export const multiSignEmbed = async (
}
if (!hasError) {
const pdfBytes = await pdfDoc.saveAsBase64({ useObjectStreams: false });
// console.log("pdf", pdfBytes);
return pdfBytes;
} else {
return {
+12 -4
View File
@@ -16,17 +16,18 @@ const plans = [
"Unlimited digital signatures",
"Sign documents yourself",
"Request signatures from others",
"Unlimited templates",
"14 field types",
"Automatic e-signatures",
"Completion certificates",
"Send in order",
"Organize docs in OpenSign™ Drive",
"Document templates",
"Import from Dropbox",
"Contact book",
"Document expiry support",
"Decline document support",
"Email notifications",
"Recipient authentication using OTP",
"Public profiles",
"And much more"
],
@@ -34,17 +35,18 @@ const plans = [
"Unlimited digital signatures",
"Sign documents yourself",
"Request signatures from others",
"Unlimited templates",
"14 field types",
"Automatic e-signatures",
"Completion certificates",
"Send in order",
"Organize docs in OpenSign™ Drive",
"Document templates",
"Import from Dropbox",
"Contact book",
"Document expiry support",
"Decline document support",
"Email notifications",
"Recipient authentication using OTP",
"Public profiles",
"And much more"
]
@@ -77,10 +79,12 @@ const plans = [
"API Access",
"upto 100 API signatures",
"Custom email templates",
"Connect your own Gmail or SMTP account for sending emails",
"Auto reminders",
"Bulk send (upto 100 docs)",
"Premium Public profile usernames",
"Embedding (coming soon)"
"Enforce email-based verification to confirm signer identity",
"Embedded signing"
],
yearlyBenefits: [
"Everything in OpenSign™ free",
@@ -92,10 +96,12 @@ const plans = [
"API Access",
"upto 240 API signatures",
"Custom email templates",
"Connect your own Gmail or SMTP account for sending emails",
"Auto reminders",
"Bulk send (upto 240 docs)",
"Premium Public profile usernames",
"Embedding (coming soon)"
"Enforce email-based verification to confirm signer identity",
"Embedded signing"
]
},
{
@@ -120,6 +126,7 @@ const plans = [
"Teams and Organizations",
"Share Templates with teams",
"Share Templates with individuals",
"BYOC - Store your documents in your own cloud storage",
"DocumentId removal from signed docs",
"Bulk send (upto 100 docs)",
"Request Payments (coming soon)",
@@ -131,6 +138,7 @@ const plans = [
"Teams and Organizations",
"Share Templates with teams",
"Share Templates with individuals",
"BYOC - Store your documents in your own cloud storage",
"DocumentId removal from signed docs",
"Bulk send (upto 500 docs)",
"Request Payments (coming soon)",
+3 -1
View File
@@ -255,7 +255,9 @@ const HomeLayout = () => {
return (
<div>
<div className="sticky top-0 z-[501]">
{!isLoader && <Header showSidebar={showSidebar} />}
{!isLoader && (
<Header showSidebar={showSidebar} setIsMenu={setIsOpen} />
)}
</div>
{isUserValid ? (
<>
+5 -5
View File
@@ -1079,7 +1079,7 @@ const DraftTemplate = () => {
isReadOnly: isReadOnly || false,
isHideLabel: isHideLabel || false,
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor ||
currWidgetsDetails?.options?.fontColor ||
@@ -1117,7 +1117,7 @@ const DraftTemplate = () => {
defaultValue: defaultValue,
isHideLabel: isHideLabel || false,
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor ||
currWidgetsDetails?.options?.fontColor ||
@@ -1135,7 +1135,7 @@ const DraftTemplate = () => {
values: dropdownOptions,
defaultValue: defaultValue,
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor ||
currWidgetsDetails?.options?.fontColor ||
@@ -1218,7 +1218,7 @@ const DraftTemplate = () => {
}
: {},
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor ||
currWidgetsDetails?.options?.fontColor ||
@@ -1234,7 +1234,7 @@ const DraftTemplate = () => {
status: defaultdata.status,
defaultValue: defaultdata.defaultValue,
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor ||
currWidgetsDetails?.options?.fontColor ||
+4 -4
View File
@@ -1394,20 +1394,20 @@ const Forms = (props) => {
)}
{isAdvanceOpt && props.title !== "Sign Yourself" ? (
<div
<span
onClick={() => setIsAdvanceOpt(!isAdvanceOpt)}
className={`mt-2.5 op-link op-link-primary text-sm`}
>
{t("hide-advanced-options")}
</div>
</span>
) : (
props.title !== "Sign Yourself" && (
<div
<span
onClick={() => setIsAdvanceOpt(!isAdvanceOpt)}
className={`mt-2.5 op-link op-link-primary text-sm`}
>
{t("advanced-options")}
</div>
</span>
)
)}
+1 -3
View File
@@ -955,9 +955,7 @@ function PdfRequestFiles(props) {
widgets,
pdfDoc,
isSignYourSelfFlow,
scale,
pdfOriginalWH,
containerWH
scale
);
// console.log("pdfte", pdfBytes);
//get ExistUserPtr object id of user class to get tenantDetails
+10 -10
View File
@@ -498,8 +498,10 @@ function PlaceHolderSign() {
let dropData = [];
let placeHolder;
const dragTypeValue = item?.text ? item.text : monitor.type;
const widgetWidth = defaultWidthHeight(dragTypeValue).width;
const widgetHeight = defaultWidthHeight(dragTypeValue).height;
const widgetWidth =
defaultWidthHeight(dragTypeValue).width * containerScale;
const widgetHeight =
defaultWidthHeight(dragTypeValue).height * containerScale;
//adding and updating drop position in array when user drop signature button in div
if (item === "onclick") {
const divHeight = divRef.current.getBoundingClientRect().height;
@@ -836,9 +838,7 @@ function PlaceHolderSign() {
placeholder,
pdfDoc,
isSignYourSelfFlow,
scale,
pdfOriginalWH,
containerWH
scale
);
const pdfUrl = await convertBase64ToFile(pdfDetails[0].Name, pdfBase64);
const tenantId = localStorage.getItem("TenantId");
@@ -1357,7 +1357,7 @@ function PlaceHolderSign() {
isHideLabel: isHideLabel || false,
defaultValue: defaultValue,
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor ||
currWidgetsDetails?.options?.fontColor ||
@@ -1395,7 +1395,7 @@ function PlaceHolderSign() {
isReadOnly: isReadOnly || false,
isHideLabel: isHideLabel || false,
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor ||
currWidgetsDetails?.options?.fontColor ||
@@ -1413,7 +1413,7 @@ function PlaceHolderSign() {
values: dropdownOptions,
defaultValue: defaultValue,
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor ||
currWidgetsDetails?.options?.fontColor ||
@@ -1494,7 +1494,7 @@ function PlaceHolderSign() {
}
: {},
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor ||
currWidgetsDetails?.options?.fontColor ||
@@ -1510,7 +1510,7 @@ function PlaceHolderSign() {
status: defaultdata.status,
defaultValue: defaultdata.defaultValue,
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor ||
currWidgetsDetails?.options?.fontColor ||
+5 -14
View File
@@ -425,9 +425,7 @@ function SignYourSelf() {
const getWidth = widgetTypeExist
? calculateInitialWidthHeight(dragTypeValue, widgetValue).getWidth
: defaultWidthHeight(dragTypeValue).width;
const getHeight = widgetTypeExist
? calculateInitialWidthHeight(dragTypeValue, widgetValue).getHeight
: defaultWidthHeight(dragTypeValue).height;
const getHeight = defaultWidthHeight(dragTypeValue).height;
dropObj = {
xPosition: getWidth / 2 + containerWH.width / 2,
@@ -458,9 +456,7 @@ function SignYourSelf() {
const getWidth = widgetTypeExist
? calculateInitialWidthHeight(widgetValue).getWidth
: defaultWidthHeight(dragTypeValue).width;
const getHeight = widgetTypeExist
? calculateInitialWidthHeight(widgetValue).getHeight
: defaultWidthHeight(dragTypeValue).height;
const getHeight = defaultWidthHeight(dragTypeValue).height;
dropObj = {
xPosition: getXPosition / (containerScale * scale),
yPosition: getYPosition / (containerScale * scale),
@@ -662,9 +658,7 @@ function SignYourSelf() {
xyPostion,
pdfDoc,
isSignYourSelfFlow,
scale,
pdfOriginalWH,
containerWH
scale
);
// console.log("pdf", pdfBytes);
//function for call to embed signature in pdf and get digital signature pdf
@@ -1029,7 +1023,6 @@ function SignYourSelf() {
const getPageNumer = xyPostion.filter(
(data) => data.pageNumber === pageNumber
);
if (getPageNumer.length > 0) {
const getXYdata = getPageNumer[0].pos;
const getPosData = getXYdata;
@@ -1059,7 +1052,7 @@ function SignYourSelf() {
isReadOnly: isReadOnly,
isHideLabel: isHideLabel || false,
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor || currWidgetsDetails?.options?.fontColor || "black"
}
@@ -1093,7 +1086,6 @@ function SignYourSelf() {
const getPageNumer = xyPostion.filter(
(data) => data.pageNumber === pageNumber
);
if (getPageNumer.length > 0) {
const getXYdata = getPageNumer[0].pos;
const getPosData = getXYdata;
@@ -1103,8 +1095,7 @@ function SignYourSelf() {
...position,
options: {
...position.options,
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize: fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor || currWidgetsDetails?.options?.fontColor || "black"
}
@@ -1123,7 +1123,7 @@ const TemplatePlaceholder = () => {
isReadOnly: isReadOnly || false,
isHideLabel: isHideLabel || false,
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor ||
currWidgetsDetails?.options?.fontColor ||
@@ -1161,7 +1161,7 @@ const TemplatePlaceholder = () => {
defaultValue: defaultValue,
isHideLabel: isHideLabel || false,
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor ||
currWidgetsDetails?.options?.fontColor ||
@@ -1179,7 +1179,7 @@ const TemplatePlaceholder = () => {
values: dropdownOptions,
defaultValue: defaultValue,
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor ||
currWidgetsDetails?.options?.fontColor ||
@@ -1262,7 +1262,7 @@ const TemplatePlaceholder = () => {
}
: {},
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor ||
currWidgetsDetails?.options?.fontColor ||
@@ -1278,7 +1278,7 @@ const TemplatePlaceholder = () => {
status: defaultdata.status,
defaultValue: defaultdata.defaultValue,
fontSize:
fontSize || currWidgetsDetails?.options?.fontSize || "12",
fontSize || currWidgetsDetails?.options?.fontSize || 12,
fontColor:
fontColor ||
currWidgetsDetails?.options?.fontColor ||
@@ -1539,13 +1539,13 @@ const ReportTable = (props) => {
}
className="op-btn op-btn-primary"
>
{t("submit")}
{t("yes")}
</button>
<button
onClick={() => handleClose(item)}
className="op-btn op-btn-secondary"
>
{t("cancel")}
{t("no")}
</button>
</div>
</div>
@@ -292,7 +292,7 @@
"subject": "Subject",
"body": "Body",
"add-contact": "Add Contact",
"add-signer-alert": "Contact already exist!",
"add-signer-alert": "Contact already exist! Please select it from Signers dropdown",
"record-delete-alert": "Record deleted successfully!",
"record-revoke-alert": "Record revoked successfully!",
"mail-sent-alert": "Mail sent successfully.",
@@ -681,7 +681,7 @@
"p3": "Tip: If your signers are familiar with OpenSign and frequently use it, you may want to disable the guided tour for a more seamless experience. Choose the option that best fits your document signing needs."
},
"form-title-1": "Document Flow Setting",
"form-title-2": "Security Setting",
"form-title-2": "Security Settings",
"public-tour-message": "The template needs to be public before you can generate a shareable link.",
"add-user-template": "You need to add a role before you can add fields for it.",
"pdf-uncompatible": "This pdf is not compatible with opensign, please contact <support@opensignlabs.com>",
@@ -689,6 +689,7 @@
"attach-signer-tour": "You need to attach a Signer to every role. You can do that by clicking this icon. Once you select a Signer it will be attached to all the fields associated with that role which appear in the same colour.",
"allowed-signature-types": "Allowed signature types",
"at-least-one-signature-type": "At least one signature type should be enabled.",
"add-signer-note": "Note - This contact will be added to your contact list",
"allowed-signature-types-help": {
"p1": "This signature preference controls which signing options are available to your signers. Only the signature types you select will appear in the signature widget when a document is signed. For example, if you choose only the 'Draw' option in preferences, your signer will see only the 'Draw' option in the signature widget, while the other three options will not be available.",
"l1": "Create a handwritten signature directly on the screen using your finger or a stylus.",
@@ -292,7 +292,7 @@
"subject": "Asunto",
"body": "Cuerpo",
"add-contact": "Agregar contacto",
"add-signer-alert": "¡El contacto ya existe!",
"add-signer-alert": "¡El contacto ya existe! Selecciónelo en el menú desplegable 'Firmantes'",
"record-delete-alert": "¡Entrada eliminada exitosamente!",
"record-revoke-alert": "¡Entrada revocada exitosamente!",
"mail-sent-alert": "Correo enviado exitosamente.",
@@ -689,6 +689,7 @@
"attach-signer-tour": "Debe adjuntar un firmante a cada función. Puede hacerlo haciendo clic en este icono. Una vez que seleccione un Firmante, se adjuntará a todos los campos asociados con ese rol que aparecen en el mismo color.",
"allowed-signature-types": "Tipos de firma permitidos",
"at-least-one-signature-type": "Se debe habilitar al menos un tipo de firma.",
"add-signer-note": "Nota - Este contacto se agregará a su lista de contactos",
"allowed-signature-types-help": {
"p1": "Esta preferencia de firma controla qué opciones de firma están disponibles para sus firmantes. Solo los tipos de firma que seleccione aparecerán en el widget de firma cuando se firme un documento. Por ejemplo, si elige sólo la opción 'Draw' en las preferencias, su firmante verá sólo la opción 'Draw' en el widget de firma, mientras que las otras tres opciones no estarán disponibles.",
"l1": "Cree una firma manuscrita directamente en la pantalla usando su dedo o un lápiz.",
@@ -291,7 +291,7 @@
"subject": "Sujet",
"body": "Corps",
"add-contact": "Ajouter le contact",
"add-signer-alert": "Le contact existe déjà !",
"add-signer-alert": "Le contact existe déjà ! Veuillez le sélectionner dans la liste déroulante 'Signataires'",
"record-delete-alert": "Enregistrement supprimé avec succès !",
"record-revoke-alert": " Enregistrement révoqué avec succès ! ",
"mail-sent-alert": "Courriel envoyé avec succès.",
@@ -688,6 +688,7 @@
"attach-signer-tour": "Vous devez associer un signataire à chaque rôle. Vous pouvez le faire en cliquant sur cette icône. Une fois que vous avez sélectionné un signataire, il sera attaché à tous les champs associés à ce rôle qui apparaissent dans la même couleur.",
"allowed-signature-types": "Types de signature autorisés",
"at-least-one-signature-type": "Au moins un type de signature doit être activé.",
"add-signer-note": "Remarque - Ce contact sera ajouté à votre liste de contacts",
"allowed-signature-types-help": {
"p1": "Cette préférence de signature contrôle les options de signature disponibles pour vos signataires. Seuls les types de signature que vous sélectionnez apparaîtront dans le widget de signature lorsqu'un document est signé. Par exemple, si vous choisissez uniquement l'option 'Draw' dans les préférences, votre signataire ne verra que l'option 'Draw' dans le widget de signature, tandis que les trois autres options ne seront pas disponibles.",
"l1": "Créez une signature manuscrite directement sur l'écran à l'aide de votre doigt ou d'un stylet.",
+382 -410
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -18,10 +18,10 @@
"watch": "nodemon index.js"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.675.0",
"@aws-sdk/s3-request-presigner": "^3.670.0",
"@aws-sdk/client-s3": "^3.685.0",
"@aws-sdk/s3-request-presigner": "^3.685.0",
"@parse/fs-files-adapter": "^3.0.0",
"@parse/s3-files-adapter": "^2.2.0",
"@parse/s3-files-adapter": "^3.0.0",
"@pdf-lib/fontkit": "^1.1.1",
"@signpdf/placeholder-pdf-lib": "^3.2.4",
"@signpdf/signer-p12": "^3.2.4",
@@ -35,7 +35,7 @@
"generate-api-key": "^1.0.2",
"googleapis": "^144.0.0",
"mailgun.js": "^10.2.3",
"mongoose": "^8.7.2",
"mongoose": "^8.8.0",
"multer": "^1.4.5-lts.1",
"multer-s3": "^3.0.1",
"node-forge": "^1.3.1",
@@ -43,7 +43,7 @@
"parse": "^5.3.0",
"parse-dbtool": "^1.2.0",
"parse-server": "^7.3.0",
"parse-server-api-mail-adapter": "^4.0.0",
"parse-server-api-mail-adapter": "^4.1.0",
"pdf-lib": "^1.17.1",
"posthog-node": "^4.2.1",
"ws": "^8.18.0"