@hubsync/esign-web-sdk 6.9.20 → 6.9.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/verdocs-sign.cjs.entry.js +24 -4
- package/dist/cjs/verdocs-sign.entry.cjs.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +24 -4
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-sign.js +24 -4
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/esm/verdocs-sign.entry.js +24 -4
- package/dist/esm/verdocs-sign.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
- package/dist/verdocs-web-sdk/p-4a48c099.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-4a48c099.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
- package/dist/verdocs-web-sdk/p-BAkWhq53.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-e6659ac9.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-e6659ac9.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-sign.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/verdocs-web-sdk/p-99366a30.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-99366a30.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-BhPGtG0O.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-ceda5116.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-ceda5116.entry.js.map +0 -1
|
@@ -411,8 +411,10 @@ export class VerdocsSign {
|
|
|
411
411
|
updateDocumentFieldValue(oldField);
|
|
412
412
|
this.fieldUpdateCounter++;
|
|
413
413
|
this.markEnvelopeStarted();
|
|
414
|
-
//
|
|
415
|
-
|
|
414
|
+
// Only unmark as skipped when the field is actually filled with a real value.
|
|
415
|
+
// An empty-string save (e.g. focusout when navigating away from a skipped textbox)
|
|
416
|
+
// must not remove the field from skippedFields or the skip loop re-triggers.
|
|
417
|
+
if (this.skippedFields.includes(fieldName) && this.isFieldActuallyFilled(oldField)) {
|
|
416
418
|
this.skippedFields = this.skippedFields.filter(n => n !== fieldName);
|
|
417
419
|
}
|
|
418
420
|
this.checkRecipientFields();
|
|
@@ -442,6 +444,12 @@ export class VerdocsSign {
|
|
|
442
444
|
if (field === null || field === void 0 ? void 0 : field.readonly) {
|
|
443
445
|
return Promise.resolve();
|
|
444
446
|
}
|
|
447
|
+
// Don't persist focusout-triggered saves for skipped fields — navigating away from
|
|
448
|
+
// a skipped textbox fires focusout with an empty value which would cause a pointless
|
|
449
|
+
// API call and trigger the skip loop via updateRecipientFieldValue.
|
|
450
|
+
if (this.skippedFields.includes(fieldName)) {
|
|
451
|
+
return Promise.resolve();
|
|
452
|
+
}
|
|
445
453
|
console.log('[SIGN] saveFieldChange', fieldName, { value, prepared });
|
|
446
454
|
return updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, fieldName, value, prepared)
|
|
447
455
|
.then(updateResult => this.updateRecipientFieldValue(fieldName, updateResult))
|
|
@@ -516,7 +524,10 @@ export class VerdocsSign {
|
|
|
516
524
|
console.log('[SIGN] Clearing initial');
|
|
517
525
|
this.initialId = null;
|
|
518
526
|
const updateResult = await updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, field.name, null, false);
|
|
519
|
-
|
|
527
|
+
this.updateRecipientFieldValue(field.name, updateResult);
|
|
528
|
+
if (field.required)
|
|
529
|
+
this.focusFieldElement(field);
|
|
530
|
+
return;
|
|
520
531
|
}
|
|
521
532
|
// If we already have an initials block, apply it
|
|
522
533
|
if (this.initialId) {
|
|
@@ -562,7 +573,10 @@ export class VerdocsSign {
|
|
|
562
573
|
console.log('[SIGN] Clearing signature');
|
|
563
574
|
this.signatureId = null;
|
|
564
575
|
const updateResult = await updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, field.name, null, false);
|
|
565
|
-
|
|
576
|
+
this.updateRecipientFieldValue(field.name, updateResult);
|
|
577
|
+
if (field.required)
|
|
578
|
+
this.focusFieldElement(field);
|
|
579
|
+
return;
|
|
566
580
|
}
|
|
567
581
|
// If we already have a signature block, apply it
|
|
568
582
|
if (this.signatureId) {
|
|
@@ -723,6 +737,12 @@ export class VerdocsSign {
|
|
|
723
737
|
}
|
|
724
738
|
}
|
|
725
739
|
isFieldActuallyFilled(field) {
|
|
740
|
+
var _a;
|
|
741
|
+
// The server keeps value="signed" even after a signature/initial is cleared;
|
|
742
|
+
// settings.signature_id is the authoritative indicator of whether it's actually signed.
|
|
743
|
+
if (field.type === 'signature' || field.type === 'initial') {
|
|
744
|
+
return !!((_a = field.settings) === null || _a === void 0 ? void 0 : _a.signature_id);
|
|
745
|
+
}
|
|
726
746
|
if (field.type === 'radio' && field.group) {
|
|
727
747
|
const groupFilled = this.getRecipientFields().some(f => f.group === field.group && f.value === 'true');
|
|
728
748
|
if (groupFilled) {
|