@hubsync/esign-web-sdk 6.9.9 → 6.9.10
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 +14 -22
- package/dist/cjs/verdocs-sign.entry.cjs.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +14 -22
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-sign.js +14 -22
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/esm/verdocs-sign.entry.js +14 -22
- 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-14fe7e20.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-14fe7e20.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
- package/dist/verdocs-web-sdk/p-BrNyYDMo.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-c8f4042f.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-c8f4042f.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-12212211.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-12212211.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-4bcc9901.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-4bcc9901.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-Cpnmaxo0.system.js.map +0 -1
|
@@ -471,6 +471,7 @@ export class VerdocsSign {
|
|
|
471
471
|
el === null || el === void 0 ? void 0 : el.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' });
|
|
472
472
|
(_a = el === null || el === void 0 ? void 0 : el.focusField) === null || _a === void 0 ? void 0 : _a.call(el);
|
|
473
473
|
this.focusedField = field.name;
|
|
474
|
+
this.updateAllFlags();
|
|
474
475
|
}
|
|
475
476
|
async handleFieldChange(field, e) {
|
|
476
477
|
if (!e.target) {
|
|
@@ -634,22 +635,14 @@ export class VerdocsSign {
|
|
|
634
635
|
const allUnfilled = this.getSortedFillableFields().filter(f => !this.isFieldActuallyFilled(f));
|
|
635
636
|
const nextUnfilled = this.getNextFieldFromList(allUnfilled);
|
|
636
637
|
if (nextUnfilled) {
|
|
637
|
-
|
|
638
|
-
const el = document.getElementById(id);
|
|
639
|
-
el === null || el === void 0 ? void 0 : el.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' });
|
|
640
|
-
el === null || el === void 0 ? void 0 : el.focusField();
|
|
641
|
-
this.focusedField = nextUnfilled.name;
|
|
638
|
+
this.focusFieldElement(nextUnfilled);
|
|
642
639
|
}
|
|
643
640
|
}
|
|
644
641
|
handleNextOptional() {
|
|
645
642
|
const unfilledOptional = this.getSortedFillableFields().filter(f => !f.required && !this.isFieldActuallyFilled(f));
|
|
646
643
|
const next = this.getNextFieldFromList(unfilledOptional);
|
|
647
644
|
if (next) {
|
|
648
|
-
|
|
649
|
-
const el = document.getElementById(id);
|
|
650
|
-
el === null || el === void 0 ? void 0 : el.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' });
|
|
651
|
-
el === null || el === void 0 ? void 0 : el.focusField();
|
|
652
|
-
this.focusedField = next.name;
|
|
645
|
+
this.focusFieldElement(next);
|
|
653
646
|
}
|
|
654
647
|
}
|
|
655
648
|
getRecipientFields() {
|
|
@@ -737,16 +730,11 @@ export class VerdocsSign {
|
|
|
737
730
|
return fields[nextFocusedIndex];
|
|
738
731
|
}
|
|
739
732
|
handlePrev() {
|
|
740
|
-
var _a;
|
|
741
733
|
const allFields = this.getSortedFillableFields();
|
|
742
734
|
const focusedIndex = allFields.findIndex(f => f.name === this.focusedField);
|
|
743
735
|
if (focusedIndex > 0) {
|
|
744
736
|
const prevField = allFields[focusedIndex - 1];
|
|
745
|
-
|
|
746
|
-
const el = document.getElementById(id);
|
|
747
|
-
el === null || el === void 0 ? void 0 : el.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
748
|
-
(_a = el === null || el === void 0 ? void 0 : el.focusField) === null || _a === void 0 ? void 0 : _a.call(el);
|
|
749
|
-
this.focusedField = prevField.name;
|
|
737
|
+
this.focusFieldElement(prevField);
|
|
750
738
|
}
|
|
751
739
|
}
|
|
752
740
|
updateAllFlags() {
|
|
@@ -768,7 +756,7 @@ export class VerdocsSign {
|
|
|
768
756
|
// If the currently focused field is unfilled, we should point the flag to IT, not the next one.
|
|
769
757
|
// getNextRequiredField() is designed for the "Next" button (skipping current), but the visual flag
|
|
770
758
|
// should guide the user to the current task if it's incomplete.
|
|
771
|
-
if (focusedFieldObj && !
|
|
759
|
+
if (focusedFieldObj && !this.isFieldActuallyFilled(focusedFieldObj)) {
|
|
772
760
|
nextField = focusedFieldObj;
|
|
773
761
|
}
|
|
774
762
|
if (nextField && nextField.page === pageInfo.pageNumber && nextField.document_id === pageInfo.documentId) {
|
|
@@ -810,14 +798,11 @@ export class VerdocsSign {
|
|
|
810
798
|
label,
|
|
811
799
|
showSkip,
|
|
812
800
|
onSkip: () => {
|
|
801
|
+
this.focusedField = nextField.name;
|
|
813
802
|
this.handleNext();
|
|
814
803
|
},
|
|
815
804
|
onClick: () => {
|
|
816
|
-
|
|
817
|
-
const id = getFieldId(nextField);
|
|
818
|
-
const el = document.getElementById(id);
|
|
819
|
-
el === null || el === void 0 ? void 0 : el.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
820
|
-
(_a = el === null || el === void 0 ? void 0 : el.focusField) === null || _a === void 0 ? void 0 : _a.call(el);
|
|
805
|
+
this.focusFieldElement(nextField);
|
|
821
806
|
},
|
|
822
807
|
});
|
|
823
808
|
}
|
|
@@ -833,6 +818,12 @@ export class VerdocsSign {
|
|
|
833
818
|
return;
|
|
834
819
|
}
|
|
835
820
|
el.setAttribute('attached', '1');
|
|
821
|
+
el.addEventListener('focusin', () => {
|
|
822
|
+
if (this.focusedField !== field.name) {
|
|
823
|
+
this.focusedField = field.name;
|
|
824
|
+
this.updateAllFlags();
|
|
825
|
+
}
|
|
826
|
+
});
|
|
836
827
|
el.addEventListener('input', (e) => {
|
|
837
828
|
// console.log('[SIGN] onfieldInput', e.detail, e.target.value);
|
|
838
829
|
// These field types don't emit fieldChange. Should we standardize on that? We don't tap "input" for fields like
|
|
@@ -897,6 +888,7 @@ export class VerdocsSign {
|
|
|
897
888
|
});
|
|
898
889
|
el.addEventListener('adopt', () => {
|
|
899
890
|
this.focusedField = field.name;
|
|
891
|
+
this.updateAllFlags();
|
|
900
892
|
this.adoptingSignature = true;
|
|
901
893
|
});
|
|
902
894
|
el.setAttribute('templateid', this.envelope.template_id);
|