Skip to content

Commit b0e0b38

Browse files
Merge pull request #1789 from OpenSignLabs/updates-15483575034
v2.24.1
2 parents da4b604 + 49c23fb commit b0e0b38

File tree

15 files changed

+3825
-4784
lines changed

15 files changed

+3825
-4784
lines changed

apps/OpenSign/package-lock.json

Lines changed: 314 additions & 272 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/OpenSign/package.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"dependencies": {
66
"@formkit/auto-animate": "^0.8.2",
77
"@imgly/background-removal": "^1.6.0",
8-
"@lottiefiles/dotlottie-react": "^0.13.5",
8+
"@lottiefiles/dotlottie-react": "^0.14.0",
99
"@pdf-lib/fontkit": "^1.1.1",
1010
"@radix-ui/themes": "^3.2.1",
1111
"@reduxjs/toolkit": "^2.8.2",
@@ -27,21 +27,21 @@
2727
"react": "^18.3.1",
2828
"react-bootstrap": "^2.10.10",
2929
"react-confetti": "^6.4.0",
30-
"react-datepicker": "^8.3.0",
30+
"react-datepicker": "^8.4.0",
3131
"react-dnd": "^16.0.1",
3232
"react-dnd-html5-backend": "^16.0.1",
3333
"react-dnd-multi-backend": "^9.0.0",
3434
"react-dnd-touch-backend": "^16.0.1",
3535
"react-dom": "^18.3.1",
3636
"react-gtm-module": "^2.0.11",
3737
"react-helmet": "^6.1.0",
38-
"react-i18next": "^15.5.1",
38+
"react-i18next": "^15.5.2",
3939
"react-konva": "^18.2.10",
4040
"react-pdf": "^9.2.1",
4141
"react-quill-new": "^3.4.6",
4242
"react-redux": "^9.2.0",
4343
"react-rnd": "^10.5.2",
44-
"react-router": "^7.6.0",
44+
"react-router": "^7.6.1",
4545
"react-scrollbars-custom": "^4.1.1",
4646
"react-select": "^5.10.1",
4747
"react-signature-canvas": "^1.1.0-alpha.2",
@@ -52,7 +52,7 @@
5252
"regex-parser": "^2.3.1",
5353
"serve": "^14.2.4",
5454
"styled-components": "^5.3.11",
55-
"web-vitals": "^5.0.1",
55+
"web-vitals": "^5.0.2",
5656
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
5757
},
5858
"scripts": {
@@ -93,36 +93,38 @@
9393
}
9494
},
9595
"devDependencies": {
96-
"@babel/core": "^7.27.1",
96+
"@babel/core": "^7.27.4",
9797
"@babel/preset-env": "^7.27.2",
9898
"@babel/preset-react": "^7.27.1",
99-
"@babel/runtime-corejs2": "^7.27.1",
99+
"@babel/runtime-corejs2": "^7.27.4",
100100
"@testing-library/jest-dom": "^6.6.3",
101101
"@testing-library/react": "^16.3.0",
102102
"@testing-library/user-event": "^14.6.1",
103-
"@types/react": "^18.3.22",
104-
"@vitejs/plugin-react": "^4.4.1",
105-
"@vitejs/plugin-react-swc": "^3.9.0",
103+
"@types/react": "^18.3.23",
104+
"@vitejs/plugin-react": "^4.5.1",
105+
"@vitejs/plugin-react-swc": "^3.10.1",
106+
"@vitest/ui": "^3.2.0",
106107
"autoprefixer": "^10.4.21",
107108
"babel-loader": "^10.0.0",
108109
"commitizen": "^4.3.1",
109110
"concurrently": "^9.1.2",
110111
"css-loader": "^7.1.2",
111112
"daisyui": "^4.12.24",
112113
"dotenv": "^16.5.0",
113-
"eslint": "^9.27.0",
114-
"eslint-plugin-prettier": "^5.4.0",
114+
"eslint": "^9.28.0",
115+
"eslint-plugin-prettier": "^5.4.1",
115116
"eslint-plugin-react": "^7.37.5",
116-
"lint-staged": "^16.0.0",
117-
"postcss": "^8.5.3",
117+
"jsdom": "^26.1.0",
118+
"lint-staged": "^16.1.0",
119+
"postcss": "^8.5.4",
118120
"prettier": "^3.5.3",
119-
"pretty-quick": "^4.1.1",
121+
"pretty-quick": "^4.2.2",
120122
"rollup-plugin-node-polyfills": "^0.2.1",
121123
"tailwindcss": "^3.4.17",
122124
"vite": "^6.3.5",
123125
"vite-plugin-svgr": "^4.3.0",
124126
"vite-tsconfig-paths": "^5.1.4",
125-
"vitest": "^3.1.4"
127+
"vitest": "^3.2.0"
126128
},
127129
"engines": {
128130
"node": "18 || 20 || 22"

apps/OpenSign/public/locales/de/translation.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,5 +1022,8 @@
10221022
"no-signer-info-in-pkcs7": "Keine Signaturinformationen in PKCS#7",
10231023
"could-not-parse-signer-info": "Signaturinformationen konnten nicht analysiert werden",
10241024
"not-calculated": "Nicht berechnet",
1025-
"not-found-in-signature": "Nicht in Signatur gefunden"
1025+
"not-found-in-signature": "Nicht in Signatur gefunden",
1026+
"readonly-textinput-error": "Schreibgeschütztes Text-Widget muss einen Standardwert haben oder optional sein.",
1027+
"readonly-dropdown-error": "Schreibgeschütztes Dropdown-Widget muss einen Standardwert haben oder optional sein.",
1028+
"readonly-radiobtn-error": "Schreibgeschütztes Optionsfeld-Widget muss einen Standardwert haben oder optional sein."
10261029
}

apps/OpenSign/public/locales/en/translation.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,5 +1022,8 @@
10221022
"no-signer-info-in-pkcs7": "No signer info in PKCS#7",
10231023
"could-not-parse-signer-info": "Could not parse signer info",
10241024
"not-calculated": "Not calculated",
1025-
"not-found-in-signature": "Not found in signature"
1025+
"not-found-in-signature": "Not found in signature",
1026+
"readonly-textinput-error": "Read-only text widget must have a default value or you can make it optional.",
1027+
"readonly-dropdown-error": "Read-only dropdown widget must have a default value or you can make it optional.",
1028+
"readonly-radiobtn-error": "Read-only radio button widget must have a default value or you can make it optional."
10261029
}

apps/OpenSign/public/locales/es/translation.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,5 +1022,8 @@
10221022
"no-signer-info-in-pkcs7": "No hay información del firmante en PKCS#7",
10231023
"could-not-parse-signer-info": "No se pudo analizar la información del firmante",
10241024
"not-calculated": "No calculado",
1025-
"not-found-in-signature": "No encontrado en la firma"
1025+
"not-found-in-signature": "No encontrado en la firma",
1026+
"readonly-textinput-error": "El widget de texto de solo lectura debe tener un valor predeterminado o puede hacerse opcional.",
1027+
"readonly-dropdown-error": "El widget desplegable de solo lectura debe tener un valor predeterminado o puede hacerse opcional.",
1028+
"readonly-radiobtn-error": "El widget de botón de opción de solo lectura debe tener un valor predeterminado o puede hacerse opcional."
10261029
}

apps/OpenSign/public/locales/fr/translation.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,5 +1022,8 @@
10221022
"no-signer-info-in-pkcs7": "Aucune information sur le signataire dans PKCS#7",
10231023
"could-not-parse-signer-info": "Impossible d'analyser les informations sur le signataire",
10241024
"not-calculated": "Non calculé",
1025-
"not-found-in-signature": "Introuvable dans la signature"
1025+
"not-found-in-signature": "Introuvable dans la signature",
1026+
"readonly-textinput-error": "Le widget de texte en lecture seule doit avoir une valeur par défaut ou être rendu optionnel.",
1027+
"readonly-dropdown-error": "Le widget déroulant en lecture seule doit avoir une valeur par défaut ou être rendu optionnel.",
1028+
"readonly-radiobtn-error": "Le widget bouton radio en lecture seule doit avoir une valeur par défaut ou être rendu optionnel."
10261029
}

apps/OpenSign/public/locales/hi/translation.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,5 +1022,8 @@
10221022
"no-signer-info-in-pkcs7": "PKCS#7 में कोई हस्ताक्षरकर्ता जानकारी नहीं है",
10231023
"could-not-parse-signer-info": "हस्ताक्षरकर्ता जानकारी पार्स नहीं की जा सकी",
10241024
"not-calculated": "गणना नहीं की गई",
1025-
"not-found-in-signature": "हस्ताक्षर में नहीं मिला"
1025+
"not-found-in-signature": "हस्ताक्षर में नहीं मिला",
1026+
"readonly-textinput-error": "रीड-ओनली टेक्स्ट विजेट में एक डिफ़ॉल्ट मान होना चाहिए या आप इसे वैकल्पिक बना सकते हैं।",
1027+
"readonly-dropdown-error": "रीड-ओनली ड्रॉपडाउन विजेट में एक डिफ़ॉल्ट मान होना चाहिए या आप इसे वैकल्पिक बना सकते हैं।",
1028+
"readonly-radiobtn-error": "रीड-ओनली रेडियो बटन विजेट में एक डिफ़ॉल्ट मान होना चाहिए या आप इसे वैकल्पिक बना सकते हैं।"
10261029
}

apps/OpenSign/public/locales/it/translation.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,5 +1022,8 @@
10221022
"no-signer-info-in-pkcs7": "Nessuna informazione firmatario in PKCS#7",
10231023
"could-not-parse-signer-info": "Impossibile analizzare le informazioni del firmatario",
10241024
"not-calculated": "Non calcolato",
1025-
"not-found-in-signature": "Non trovato nella firma"
1025+
"not-found-in-signature": "Non trovato nella firma",
1026+
"readonly-textinput-error": "Il widget di testo di sola lettura deve avere un valore predefinito oppure può essere reso opzionale.",
1027+
"readonly-dropdown-error": "Il widget a discesa di sola lettura deve avere un valore predefinito oppure può essere reso opzionale.",
1028+
"readonly-radiobtn-error": "Il widget pulsante di opzione di sola lettura deve avere un valore predefinito oppure può essere reso opzionale."
10261029
}

apps/OpenSign/src/components/pdf/DropdownWidgetOption.jsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,22 @@ function DropdownWidgetOption(props) {
103103
? defaultCheckbox
104104
: defaultValue;
105105

106+
const isDropdownOrRadio =
107+
props?.type === "dropdown" || props?.type === radioButtonWidget;
108+
const readOnlyWithoutValue =
109+
isReadOnly && !defaultValue && status !== "optional";
110+
111+
// If it’s a dropdown and it’s read-only without a value (nor marked optional), stop here.
112+
if (isDropdownOrRadio && readOnlyWithoutValue) {
113+
alert(
114+
props?.type === "dropdown"
115+
? t("readonly-dropdown-error")
116+
: t("readonly-radiobtn-error")
117+
);
118+
return;
119+
}
120+
121+
// Otherwise (either not a dropdown, or a valid dropdown), do the save + reset exactly once.
106122
props.handleSaveWidgetsOptions(
107123
dropdownName,
108124
dropdownOptionList,
@@ -228,7 +244,7 @@ function DropdownWidgetOption(props) {
228244
</select>
229245
</>
230246
)}
231-
{props.type !== "checkbox" && props.type !== radioButtonWidget && (
247+
{props.type !== "checkbox" && (
232248
<>
233249
<div className="flex flex-row gap-[10px] mt-[0.5rem]">
234250
{statusArr.map((data, ind) => {

apps/OpenSign/src/components/pdf/WidgetNameModal.jsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,19 @@ const WidgetNameModal = (props) => {
8383
props.handleData(data, props.defaultdata?.type);
8484
}
8585
} else {
86+
const isTextInput = props.defaultdata?.type === textInputWidget;
87+
const { isReadOnly, defaultValue, status } = formdata;
88+
// If it’s a text‐input widget, enforce that read-only fields have
89+
// either a defaultValue or an "optional" status.
90+
if (isTextInput) {
91+
const readOnlyWithoutValue =
92+
isReadOnly && !defaultValue && status !== "optional";
93+
94+
if (readOnlyWithoutValue) {
95+
alert(t("readonly-textinput-error"));
96+
return;
97+
}
98+
}
8699
props.handleData(formdata);
87100
}
88101
setFormdata({

apps/OpenSign/src/pages/PlaceHolderSign.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function PlaceHolderSign() {
193193
);
194194
if (user) {
195195
try {
196-
const defaultRequestBody = `<p>Hi {{receiver_name}},</p><br><p>We hope this email finds you well. {{sender_name}}&nbsp;has requested you to review and sign&nbsp;{{document_title}}.</p><p>Your signature is crucial to proceed with the next steps as it signifies your agreement and authorization.</p><br><p>{{signing_url}}</p><br><p>If you have any questions or need further clarification regarding the document or the signing process, please contact the sender.</p><br><p>Thanks</p><p> Team ${appName}</p><br>`;
196+
const defaultRequestBody = `<p>Hi {{receiver_name}},</p><br><p>We hope this email finds you well. {{sender_name}}&nbsp;has requested you to review and sign&nbsp;{{document_title}}.</p><p>Your signature is crucial to proceed with the next steps as it signifies your agreement and authorization.</p><br><p><a href='{{signing_url}}' rel='noopener noreferrer' target='_blank'>Sign here</a></p><br><br><p>If you have any questions or need further clarification regarding the document or the signing process, please contact the sender.</p><br><p>Thanks</p><p> Team ${appName}</p><br>`;
197197
const defaultSubject = `{{sender_name}} has requested you to sign {{document_title}}`;
198198
setDefaultBody(defaultRequestBody);
199199
setDefaultSubject(defaultSubject);
@@ -1452,6 +1452,7 @@ function PlaceHolderSign() {
14521452
...position.options,
14531453
name: dropdownName,
14541454
values: dropdownOptions,
1455+
status: status,
14551456
isReadOnly: isReadOnly || false,
14561457
isHideLabel: isHideLabel || false,
14571458
defaultValue: defaultValue,

apps/OpenSign/src/pages/Preferences.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ const Preferences = () => {
218218
setIsLoader(true);
219219
const updateRes = tenantRes;
220220
setTenantId(updateRes?.objectId);
221-
const defaultRequestBody = `<p>Hi {{receiver_name}},</p><br><p>We hope this email finds you well. {{sender_name}}&nbsp;has requested you to review and sign&nbsp;{{document_title}}.</p><p>Your signature is crucial to proceed with the next steps as it signifies your agreement and authorization.</p><br><p>{{signing_url}}</p><br><p>If you have any questions or need further clarification regarding the document or the signing process, please contact the sender.</p><br><p>Thanks</p><p> Team ${appName}</p><br>`;
221+
const defaultRequestBody = `<p>Hi {{receiver_name}},</p><br><p>We hope this email finds you well. {{sender_name}}&nbsp;has requested you to review and sign&nbsp;{{document_title}}.</p><p>Your signature is crucial to proceed with the next steps as it signifies your agreement and authorization.</p><br><p><a href='{{signing_url}}' rel='noopener noreferrer' target='_blank'>Sign here</a></p><br><br><p>If you have any questions or need further clarification regarding the document or the signing process, please contact the sender.</p><br><p>Thanks</p><p> Team ${appName}</p><br>`;
222222
if (updateRes?.RequestBody) {
223223
setRequestBody(updateRes?.RequestBody);
224224
setRequestSubject(updateRes?.RequestSubject);

apps/OpenSign/src/primitives/GetReportDisplay.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ const ReportTable = (props) => {
763763
const body =
764764
doc?.RequestBody ||
765765
doc?.ExtUserPtr?.TenantId?.RequestBody ||
766-
`<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /></head><body><p>Hi {{receiver_name}},</p><br><p>We hope this email finds you well. {{sender_name}} has requested you to review and sign <b>"{{document_title}}"</b>.</p><p>Your signature is crucial to proceed with the next steps as it signifies your agreement and authorization.</p><br><p>{{signing_url}}</p><br><p>If you have any questions or need further clarification regarding the document or the signing process, please contact the sender.</p><br><p>Thanks</p><p> Team ${appName}</p><br></body> </html>`;
766+
`<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /></head><body><p>Hi {{receiver_name}},</p><br><p>We hope this email finds you well. {{sender_name}} has requested you to review and sign <b>"{{document_title}}"</b>.</p><p>Your signature is crucial to proceed with the next steps as it signifies your agreement and authorization.</p><br><p><a href='{{signing_url}}' rel='noopener noreferrer' target='_blank'>Sign here</a></p><br><br><p>If you have any questions or need further clarification regarding the document or the signing process, please contact the sender.</p><br><p>Thanks</p><p> Team ${appName}</p><br></body> </html>`;
767767
const res = replaceMailVaribles(subject, body, variables);
768768
setMail((prev) => ({ ...prev, subject: res.subject, body: res.body }));
769769
setIsNextStep({ [user.Id]: true });

0 commit comments

Comments
 (0)