@hubsync/esign-web-sdk 6.9.44 → 6.9.45
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/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-adopt-signature-dialog_8.cjs.entry.js +33 -6
- package/dist/cjs/verdocs-sign.cjs.entry.js +52 -2
- package/dist/cjs/verdocs-sign.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.js +87 -11
- package/dist/collection/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +54 -2
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/components/{p-DSzyP6KP.js → p-DFsjkMkI.js} +37 -8
- package/dist/components/p-DFsjkMkI.js.map +1 -0
- package/dist/components/verdocs-adopt-signature-dialog.js +1 -1
- package/dist/components/verdocs-sign.js +55 -3
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/custom-elements.json +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.js.map +1 -1
- package/dist/esm/verdocs-adopt-signature-dialog_8.entry.js +33 -6
- package/dist/esm/verdocs-sign.entry.js +52 -2
- package/dist/esm/verdocs-sign.entry.js.map +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog_8.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/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.d.ts +30 -3
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +13 -0
- package/dist/types/components.d.ts +35 -5
- package/dist/verdocs-web-sdk/p-3832868c.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-3832868c.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
- package/dist/verdocs-web-sdk/p-BEzGtFgy.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-CCpu7MXO.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-c67b23fc.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-c67b23fc.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-ec29782b.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-ec29782b.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-fe804f97.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-fe804f97.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.esm.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/components/p-DSzyP6KP.js.map +0 -1
- package/dist/verdocs-web-sdk/p-7a0f0515.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-7a0f0515.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-965a8331.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-965a8331.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-CSd2l4lv.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-cbae68bb.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-cbae68bb.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-dx3XIcHV.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-ff5f20c9.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-ff5f20c9.system.entry.js.map +0 -1
|
@@ -104,6 +104,8 @@ export class VerdocsSign {
|
|
|
104
104
|
this.signatureAdoptMode = 'type';
|
|
105
105
|
this.adoptedSignaturePreview = null;
|
|
106
106
|
this.adoptedInitialsPreview = null;
|
|
107
|
+
this.adoptedSignatureStrokes = null;
|
|
108
|
+
this.adoptedInitialsStrokes = null;
|
|
107
109
|
this.adoptedName = null;
|
|
108
110
|
this.skippedFields = [];
|
|
109
111
|
this.documentsSingularPlural = 'document';
|
|
@@ -259,6 +261,8 @@ export class VerdocsSign {
|
|
|
259
261
|
this.signatureAdoptMode = 'type';
|
|
260
262
|
this.adoptedSignaturePreview = null;
|
|
261
263
|
this.adoptedInitialsPreview = null;
|
|
264
|
+
this.adoptedSignatureStrokes = null;
|
|
265
|
+
this.adoptedInitialsStrokes = null;
|
|
262
266
|
this.adoptedName = null;
|
|
263
267
|
this.submitted = recipient.status === 'submitted';
|
|
264
268
|
this.loading = false;
|
|
@@ -439,6 +443,37 @@ export class VerdocsSign {
|
|
|
439
443
|
getAdoptNameStorageKey(signatureBlockId) {
|
|
440
444
|
return `verdocs-adopt-name:${signatureBlockId}`;
|
|
441
445
|
}
|
|
446
|
+
getAdoptStrokesStorageKey(signatureBlockId) {
|
|
447
|
+
return `verdocs-adopt-strokes:${signatureBlockId}`;
|
|
448
|
+
}
|
|
449
|
+
/** Save (or clear) the drawn strokes (normalized 0..1) for a signature/initial block so a later Edit can replay them. */
|
|
450
|
+
persistStrokes(signatureBlockId, strokes) {
|
|
451
|
+
const key = this.getAdoptStrokesStorageKey(signatureBlockId);
|
|
452
|
+
if (strokes && strokes.length > 0) {
|
|
453
|
+
sessionStorage.setItem(key, JSON.stringify(strokes));
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
456
|
+
// Typed signatures (or cleared drawings) have no strokes — make sure a stale entry doesn't linger.
|
|
457
|
+
sessionStorage.removeItem(key);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
/** Read previously saved drawn strokes (normalized 0..1) for a signature/initial block, if any. */
|
|
461
|
+
readStoredStrokes(signatureBlockId) {
|
|
462
|
+
if (!signatureBlockId) {
|
|
463
|
+
return null;
|
|
464
|
+
}
|
|
465
|
+
const raw = sessionStorage.getItem(this.getAdoptStrokesStorageKey(signatureBlockId));
|
|
466
|
+
if (!raw) {
|
|
467
|
+
return null;
|
|
468
|
+
}
|
|
469
|
+
try {
|
|
470
|
+
const parsed = JSON.parse(raw);
|
|
471
|
+
return Array.isArray(parsed) ? parsed : null;
|
|
472
|
+
}
|
|
473
|
+
catch (_a) {
|
|
474
|
+
return null;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
442
477
|
/**
|
|
443
478
|
* Restore adopted signature/initial previews and mode from applied fields or session storage.
|
|
444
479
|
* Clearing a field only removes the stamp from that field — the adopted block still exists.
|
|
@@ -462,6 +497,16 @@ export class VerdocsSign {
|
|
|
462
497
|
if ((_d = initialsField === null || initialsField === void 0 ? void 0 : initialsField.settings) === null || _d === void 0 ? void 0 : _d.initial_id) {
|
|
463
498
|
this.initialId = initialsField.settings.initial_id;
|
|
464
499
|
}
|
|
500
|
+
// Restore the editable stroke source (if previously saved this session) so re-opening the dialog replays the exact
|
|
501
|
+
// hand-drawn signature/initials instead of falling back to the rasterized bitmap.
|
|
502
|
+
const storedSignatureStrokes = this.readStoredStrokes(this.signatureId);
|
|
503
|
+
if (storedSignatureStrokes) {
|
|
504
|
+
this.adoptedSignatureStrokes = storedSignatureStrokes;
|
|
505
|
+
}
|
|
506
|
+
const storedInitialsStrokes = this.readStoredStrokes(this.initialId);
|
|
507
|
+
if (storedInitialsStrokes) {
|
|
508
|
+
this.adoptedInitialsStrokes = storedInitialsStrokes;
|
|
509
|
+
}
|
|
465
510
|
const modeSourceId = this.signatureId || ((_e = signatureField === null || signatureField === void 0 ? void 0 : signatureField.settings) === null || _e === void 0 ? void 0 : _e.signature_id);
|
|
466
511
|
if (modeSourceId && this.adoptedSignaturePreview) {
|
|
467
512
|
const storedMode = sessionStorage.getItem(this.getAdoptModeStorageKey(modeSourceId));
|
|
@@ -1103,7 +1148,7 @@ export class VerdocsSign {
|
|
|
1103
1148
|
});
|
|
1104
1149
|
}
|
|
1105
1150
|
render() {
|
|
1106
|
-
var _a, _b, _c, _d;
|
|
1151
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1107
1152
|
if (this.showLoadError) {
|
|
1108
1153
|
return (h(Host, null, h("verdocs-ok-dialog", { heading: "Unable to Start Signing", message: `Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.`, buttonLabel: "OK", onNext: () => {
|
|
1109
1154
|
window.location.reload();
|
|
@@ -1253,12 +1298,15 @@ export class VerdocsSign {
|
|
|
1253
1298
|
} })), this.showDone && (h("verdocs-ok-dialog", { heading: "You're Done!", message: `You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the completed document and certificate attached.`, hideCloseButton: true, onNext: () => {
|
|
1254
1299
|
this.showDone = false;
|
|
1255
1300
|
this.isDone = true;
|
|
1256
|
-
} })), this.adoptingSignature && (h("verdocs-adopt-signature-dialog", { name: formatFullName(this.recipient), nameLocked: !!((_a = this.recipient) === null || _a === void 0 ? void 0 : _a.name_locked), initialEnteredName: (_b = this.adoptedName) !== null && _b !== void 0 ? _b : undefined, initialMode: this.adoptedSignaturePreview ? this.signatureAdoptMode : undefined, initialSignature: (_c = this.adoptedSignaturePreview) !== null && _c !== void 0 ? _c : undefined, initialInitials: (_d = this.adoptedInitialsPreview) !== null && _d !== void 0 ? _d : undefined, onNext: async (e) => {
|
|
1301
|
+
} })), this.adoptingSignature && (h("verdocs-adopt-signature-dialog", { name: formatFullName(this.recipient), nameLocked: !!((_a = this.recipient) === null || _a === void 0 ? void 0 : _a.name_locked), initialEnteredName: (_b = this.adoptedName) !== null && _b !== void 0 ? _b : undefined, initialMode: this.adoptedSignaturePreview ? this.signatureAdoptMode : undefined, initialSignature: (_c = this.adoptedSignaturePreview) !== null && _c !== void 0 ? _c : undefined, initialInitials: (_d = this.adoptedInitialsPreview) !== null && _d !== void 0 ? _d : undefined, initialSignatureStrokes: (_e = this.adoptedSignatureStrokes) !== null && _e !== void 0 ? _e : undefined, initialInitialsStrokes: (_f = this.adoptedInitialsStrokes) !== null && _f !== void 0 ? _f : undefined, onNext: async (e) => {
|
|
1302
|
+
var _a, _b;
|
|
1257
1303
|
console.log('[SIGN] Adopting signature/initials block', e.detail);
|
|
1258
1304
|
this.showSpinner = true;
|
|
1259
1305
|
this.signatureAdoptMode = e.detail.mode;
|
|
1260
1306
|
this.adoptedSignaturePreview = e.detail.signature;
|
|
1261
1307
|
this.adoptedInitialsPreview = e.detail.initials;
|
|
1308
|
+
this.adoptedSignatureStrokes = ((_a = e.detail.signatureStrokes) === null || _a === void 0 ? void 0 : _a.length) ? e.detail.signatureStrokes : null;
|
|
1309
|
+
this.adoptedInitialsStrokes = ((_b = e.detail.initialsStrokes) === null || _b === void 0 ? void 0 : _b.length) ? e.detail.initialsStrokes : null;
|
|
1262
1310
|
this.adoptedName = e.detail.name;
|
|
1263
1311
|
// These arrive as base-64 encoded data URLs
|
|
1264
1312
|
const signatureBlob = await (await fetch(e.detail.signature)).blob();
|
|
@@ -1268,11 +1316,13 @@ export class VerdocsSign {
|
|
|
1268
1316
|
this.signatureId = sigResult.id;
|
|
1269
1317
|
sessionStorage.setItem(this.getAdoptModeStorageKey(sigResult.id), e.detail.mode);
|
|
1270
1318
|
sessionStorage.setItem(this.getAdoptNameStorageKey(sigResult.id), e.detail.name);
|
|
1319
|
+
this.persistStrokes(sigResult.id, e.detail.signatureStrokes);
|
|
1271
1320
|
const initResult = await createInitials(this.endpoint, 'initial', initialsBlob);
|
|
1272
1321
|
console.log('[SIGN] Created initials', initResult);
|
|
1273
1322
|
this.initialId = initResult.id;
|
|
1274
1323
|
sessionStorage.setItem(this.getAdoptModeStorageKey(initResult.id), e.detail.mode);
|
|
1275
1324
|
sessionStorage.setItem(this.getAdoptNameStorageKey(initResult.id), e.detail.name);
|
|
1325
|
+
this.persistStrokes(initResult.id, e.detail.initialsStrokes);
|
|
1276
1326
|
this.showSpinner = false;
|
|
1277
1327
|
this.adoptingSignature = false;
|
|
1278
1328
|
this.markEnvelopeStarted();
|
|
@@ -1540,6 +1590,8 @@ export class VerdocsSign {
|
|
|
1540
1590
|
"signatureAdoptMode": {},
|
|
1541
1591
|
"adoptedSignaturePreview": {},
|
|
1542
1592
|
"adoptedInitialsPreview": {},
|
|
1593
|
+
"adoptedSignatureStrokes": {},
|
|
1594
|
+
"adoptedInitialsStrokes": {},
|
|
1543
1595
|
"adoptedName": {},
|
|
1544
1596
|
"skippedFields": {},
|
|
1545
1597
|
"documentsSingularPlural": {},
|