@verdocs/web-sdk 6.5.0-beta.23 → 6.5.0-beta.25
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 +20 -5
- package/dist/cjs/verdocs-sign.entry.cjs.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +20 -5
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-sign.js +20 -5
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/esm/verdocs-sign.entry.js +20 -5
- 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-ee6e6a57.entry.js → p-0dcdcdb4.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-0dcdcdb4.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-23e32520.system.entry.js → p-4f622891.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-4f622891.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-C1iWtskR.system.js.map → p-BayI_PF4.system.js.map} +1 -1
- 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-23e32520.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-ee6e6a57.entry.js.map +0 -1
|
@@ -939,18 +939,25 @@ export class VerdocsSign {
|
|
|
939
939
|
filledFields: recipientFields.filter(f => isFilled(f)).map(f => ({ name: f.name, type: f.type, val: f.value })),
|
|
940
940
|
});
|
|
941
941
|
let mode = 'start';
|
|
942
|
-
// We
|
|
943
|
-
//
|
|
944
|
-
|
|
942
|
+
// We need a way to know if the user has started signing. But after trying two
|
|
943
|
+
// obvious ways (has the user adopted a signature? are any fields filled in yet?)
|
|
944
|
+
// they both had flaws (we could be carrying over a sig from a previous session,
|
|
945
|
+
// and things like defaults and auto-filled fields make the filled-field approach
|
|
946
|
+
// tricky to maintain).
|
|
947
|
+
// This is sort of a Hail Mary but it works well for now. We just keep a variable
|
|
948
|
+
// in localStorage that tracks the last 10 envelopes the user has "started".
|
|
949
|
+
// We never get a chance to clean them up but 10 GUIDs is tiny compared to what
|
|
950
|
+
// many apps store in a user's browser.
|
|
951
|
+
const startedEnvelopes = JSON.parse(localStorage.getItem('startedEnvelopes') || '[]');
|
|
952
|
+
const hasStarted = startedEnvelopes.includes(this.envelopeId);
|
|
945
953
|
if (this.nextSubmits) {
|
|
946
954
|
mode = 'completed';
|
|
947
955
|
}
|
|
948
|
-
else if (
|
|
956
|
+
else if (hasStarted) {
|
|
949
957
|
mode = 'signing';
|
|
950
958
|
}
|
|
951
959
|
return (h("verdocs-signing-progress", { mode: mode, current: Math.max(1, currentIndex), total: totalFields, remainingFields: remainingFields, progress: progress, fieldLabel: getFieldLabel(focusedFieldObj), fieldCompleted: focusedFieldObj ? !!isFilled(focusedFieldObj) : false, onStarted: () => {
|
|
952
960
|
this.adoptingSignature = true;
|
|
953
|
-
// this.handleNext();
|
|
954
961
|
}, onNext: () => this.handleNext(), onPrevious: () => this.handlePrev(), onExit: () => this.handleNext() }));
|
|
955
962
|
})(), h("div", { class: `document signed-document-container zoom-${this.zoomLevel}` }, (this.envelope.documents || []).map(envelopeDocument => {
|
|
956
963
|
const pageNumbers = integerSequence(1, envelopeDocument.pages);
|
|
@@ -990,6 +997,14 @@ export class VerdocsSign {
|
|
|
990
997
|
this.initialId = initResult.id;
|
|
991
998
|
this.showSpinner = false;
|
|
992
999
|
this.adoptingSignature = false;
|
|
1000
|
+
const startedEnvelopes = JSON.parse(localStorage.getItem('startedEnvelopes') || '[]');
|
|
1001
|
+
if (!startedEnvelopes.includes(this.envelopeId)) {
|
|
1002
|
+
startedEnvelopes.push(this.envelopeId);
|
|
1003
|
+
while (startedEnvelopes.length > 10) {
|
|
1004
|
+
startedEnvelopes.shift();
|
|
1005
|
+
}
|
|
1006
|
+
localStorage.setItem('startedEnvelopes', JSON.stringify(startedEnvelopes));
|
|
1007
|
+
}
|
|
993
1008
|
}, onExit: () => (this.adoptingSignature = false) })), (this.submitting || this.showSpinner) && (h("verdocs-portal", null, h("div", { class: "spinner-overlay" }, h("verdocs-spinner", null)))), this.showDownloadDialog && (h("verdocs-download-dialog", { hasCertificate: (_b = (_a = this.envelope) === null || _a === void 0 ? void 0 : _a.documents) === null || _b === void 0 ? void 0 : _b.some(d => d.type === 'certificate'), onExit: () => (this.showDownloadDialog = false), onNext: async (e) => {
|
|
994
1009
|
this.showDownloadDialog = false;
|
|
995
1010
|
const { action } = e.detail;
|