@hubsync/esign-web-sdk 6.9.42 → 6.9.43
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 +77 -16
- package/dist/cjs/verdocs-sign.cjs.entry.js +14 -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 +136 -18
- 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 +17 -2
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/components/{p-Dpuy1yah.js → p-BUE7R0tf.js} +82 -18
- package/dist/components/p-BUE7R0tf.js.map +1 -0
- package/dist/components/verdocs-adopt-signature-dialog.js +1 -1
- package/dist/components/verdocs-sign.js +18 -3
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/custom-elements.json +20 -0
- 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 +77 -16
- package/dist/esm/verdocs-sign.entry.js +14 -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 +17 -0
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +3 -0
- package/dist/types/components.d.ts +26 -2
- package/dist/verdocs-web-sdk/p-32af0c78.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-32af0c78.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-64c0f4e1.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-64c0f4e1.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
- package/dist/verdocs-web-sdk/p-DL_q7a6L.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-DyUrM6Ex.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-b8966f51.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-b8966f51.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-e13491c4.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-e13491c4.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-Dpuy1yah.js.map +0 -1
- package/dist/verdocs-web-sdk/p-3c6e0a1f.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-3c6e0a1f.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-521b0c66.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-521b0c66.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-6f4a8d69.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-6f4a8d69.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-7c5d6848.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-7c5d6848.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-B0Zty-s5.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-TlalAeRR.system.js.map +0 -1
|
@@ -170,6 +170,9 @@ const VerdocsAdoptSignatureDialog = class {
|
|
|
170
170
|
componentWillLoad() {
|
|
171
171
|
this.enteredName = this.name;
|
|
172
172
|
this.computeEnteredInitials(this.name);
|
|
173
|
+
if (this.initialMode) {
|
|
174
|
+
this.mode = this.initialMode;
|
|
175
|
+
}
|
|
173
176
|
const ds = new FontFace('Dancing Script', 'url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)');
|
|
174
177
|
ds.load().then(font => {
|
|
175
178
|
document.fonts.add(font);
|
|
@@ -177,24 +180,82 @@ const VerdocsAdoptSignatureDialog = class {
|
|
|
177
180
|
});
|
|
178
181
|
}
|
|
179
182
|
componentDidLoad() {
|
|
180
|
-
this.drawSignatureText();
|
|
181
|
-
this.drawInitialsText();
|
|
182
183
|
this.setupSignatureCanvas();
|
|
183
184
|
this.setupInitialsCanvas();
|
|
185
|
+
void this.loadExistingPreviews();
|
|
184
186
|
}
|
|
185
187
|
componentDidUpdate() {
|
|
186
|
-
this.drawSignatureText();
|
|
187
|
-
this.drawInitialsText();
|
|
188
188
|
this.setupSignatureCanvas();
|
|
189
189
|
this.setupInitialsCanvas();
|
|
190
|
+
if (this.mode === 'type') {
|
|
191
|
+
this.drawSignatureText();
|
|
192
|
+
this.drawInitialsText();
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
190
195
|
// Redraw drawn signature when in draw mode
|
|
191
|
-
if (this.
|
|
196
|
+
if (this.allSigStrokes.length > 0) {
|
|
192
197
|
this.redrawDrawnSignature();
|
|
193
198
|
}
|
|
194
|
-
if (this.
|
|
199
|
+
if (this.allInitialsStrokes.length > 0) {
|
|
195
200
|
this.redrawDrawnInitials();
|
|
196
201
|
}
|
|
197
202
|
}
|
|
203
|
+
drawImageOnCanvas(canvas, dataUrl) {
|
|
204
|
+
return new Promise((resolve, reject) => {
|
|
205
|
+
const image = new Image();
|
|
206
|
+
image.onload = () => {
|
|
207
|
+
const context = canvas.getContext('2d');
|
|
208
|
+
context.clearRect(0, 0, canvas.width, canvas.height);
|
|
209
|
+
const padding = 24;
|
|
210
|
+
const scale = Math.min((canvas.width - padding) / image.width, (canvas.height - padding) / image.height, 1);
|
|
211
|
+
const width = image.width * scale;
|
|
212
|
+
const height = image.height * scale;
|
|
213
|
+
const x = (canvas.width - width) / 2;
|
|
214
|
+
const y = (canvas.height - height) / 2;
|
|
215
|
+
context.drawImage(image, x, y, width, height);
|
|
216
|
+
resolve();
|
|
217
|
+
};
|
|
218
|
+
image.onerror = () => reject(new Error('Unable to load signature preview'));
|
|
219
|
+
image.src = dataUrl;
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
async loadExistingPreviews() {
|
|
223
|
+
if (this.mode === 'draw') {
|
|
224
|
+
await this.restoreDrawnPreviewsIfNeeded();
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
this.drawSignatureText();
|
|
228
|
+
this.drawInitialsText();
|
|
229
|
+
}
|
|
230
|
+
setMode(mode) {
|
|
231
|
+
this.mode = mode;
|
|
232
|
+
if (mode === 'draw') {
|
|
233
|
+
void this.restoreDrawnPreviewsIfNeeded();
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
async restoreDrawnPreviewsIfNeeded() {
|
|
237
|
+
// Preserve in-session stroke edits; only restore saved previews when there are no strokes yet.
|
|
238
|
+
if (this.allSigStrokes.length > 0 || this.allInitialsStrokes.length > 0) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
const tasks = [];
|
|
242
|
+
if (this.initialSignature && this.signatureElement) {
|
|
243
|
+
tasks.push(this.drawImageOnCanvas(this.signatureElement, this.initialSignature).then(() => {
|
|
244
|
+
this.hasDrawnSignature = true;
|
|
245
|
+
}));
|
|
246
|
+
}
|
|
247
|
+
if (this.initialInitials && this.initialsElement) {
|
|
248
|
+
tasks.push(this.drawImageOnCanvas(this.initialsElement, this.initialInitials).then(() => {
|
|
249
|
+
this.hasDrawnInitials = true;
|
|
250
|
+
}));
|
|
251
|
+
}
|
|
252
|
+
if (tasks.length === 0) {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
await Promise.all(tasks);
|
|
256
|
+
this.setupSignatureCanvas();
|
|
257
|
+
this.setupInitialsCanvas();
|
|
258
|
+
}
|
|
198
259
|
drawSignatureText() {
|
|
199
260
|
if (!this.signatureElement || this.mode !== 'type') {
|
|
200
261
|
return;
|
|
@@ -322,7 +383,7 @@ const VerdocsAdoptSignatureDialog = class {
|
|
|
322
383
|
e.preventDefault();
|
|
323
384
|
const signature = this.signatureElement.toDataURL('image/png');
|
|
324
385
|
const initials = this.initialsElement.toDataURL('image/png');
|
|
325
|
-
this.next.emit({ signature, initials });
|
|
386
|
+
this.next.emit({ signature, initials, mode: this.mode });
|
|
326
387
|
}
|
|
327
388
|
isAdoptButtonDisabled() {
|
|
328
389
|
switch (this.mode) {
|
|
@@ -330,8 +391,8 @@ const VerdocsAdoptSignatureDialog = class {
|
|
|
330
391
|
// Disable if no name has been entered
|
|
331
392
|
return !this.enteredName || this.enteredName.trim().length === 0;
|
|
332
393
|
case 'draw':
|
|
333
|
-
// Disable if nothing has been drawn
|
|
334
|
-
return
|
|
394
|
+
// Disable if nothing has been drawn or restored from a previous adoption
|
|
395
|
+
return !this.hasDrawnSignature || !this.hasDrawnInitials;
|
|
335
396
|
default:
|
|
336
397
|
return true;
|
|
337
398
|
}
|
|
@@ -352,8 +413,8 @@ const VerdocsAdoptSignatureDialog = class {
|
|
|
352
413
|
this.sigDrawingContext.lineWidth = 2;
|
|
353
414
|
this.sigDrawingContext.lineCap = 'round';
|
|
354
415
|
this.sigDrawingContext.lineJoin = 'round';
|
|
355
|
-
// Clear canvas only if there are no existing strokes
|
|
356
|
-
if (this.allSigStrokes.length === 0) {
|
|
416
|
+
// Clear canvas only if there are no existing strokes or restored previews
|
|
417
|
+
if (this.allSigStrokes.length === 0 && !this.hasDrawnSignature) {
|
|
357
418
|
this.sigDrawingContext.clearRect(0, 0, this.signatureElement.width, this.signatureElement.height);
|
|
358
419
|
}
|
|
359
420
|
}
|
|
@@ -382,8 +443,8 @@ const VerdocsAdoptSignatureDialog = class {
|
|
|
382
443
|
this.initialsDrawingContext.lineWidth = 2;
|
|
383
444
|
this.initialsDrawingContext.lineCap = 'round';
|
|
384
445
|
this.initialsDrawingContext.lineJoin = 'round';
|
|
385
|
-
// Clear canvas only if there are no existing strokes
|
|
386
|
-
if (this.allInitialsStrokes.length === 0) {
|
|
446
|
+
// Clear canvas only if there are no existing strokes or restored previews
|
|
447
|
+
if (this.allInitialsStrokes.length === 0 && !this.hasDrawnInitials) {
|
|
387
448
|
this.initialsDrawingContext.clearRect(0, 0, this.initialsElement.width, this.initialsElement.height);
|
|
388
449
|
}
|
|
389
450
|
}
|
|
@@ -451,11 +512,11 @@ const VerdocsAdoptSignatureDialog = class {
|
|
|
451
512
|
};
|
|
452
513
|
}
|
|
453
514
|
render() {
|
|
454
|
-
return (h("verdocs-dialog", { key: '
|
|
515
|
+
return (h("verdocs-dialog", { key: '43e4a40803e7cf511bed41328fd48a54da571f23', persistent: true, onExit: () => this.exit.emit() }, h("div", { key: '462e271fe1390006727a0daa1a47de9b359af39c', slot: "heading", class: "heading" }, "Adopt Your Signature"), h("div", { key: '3617b310cba6e6defdd6a01bb3c16dd08db81c29', slot: "content", class: "content" }, h("div", { key: '4365227155f52f36c6421b1ff1cc6dcb2ea4fa6e', style: { fontWeight: '300', color: '#242424', fontSize: '13px' } }, "Confirm your name, initials, and signature."), h("div", { key: 'a768ae444c23e06b58a477e7f3654d128e5d1a6a', class: { type: true, active: this.mode === 'type' } }, h("verdocs-text-input", { key: 'dd3ba8e3b0994ed84148d890b6fba81c8554f70e', label: "Full Name", value: this.enteredName, disabled: this.nameLocked, onInput: e => this.handleNameChange(e), onClick: e => e.stopPropagation() }), this.nameLocked && h("div", { key: '45875c35eeaf050b2de2cc313f6275460fd96e0a', class: "name-locked-hint" }, "Your name has been set by the sender and cannot be changed.")), h("div", { key: 'cc6b9a9072ab0069fbf58ff0395311c93283fb7e', style: { fontWeight: '400', color: '#242424', fontSize: '13px' } }, "Select a signature style"), h("div", { key: '19034c3e2232c832ad4b0032d47e0940fa52c8d2', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, h("verdocs-radio-button", { key: 'c2f084d61633dbbd8aed7b6e3b941e19a953ccab', checked: this.mode === 'type', value: "type", name: "mode", onClick: () => this.setMode('type') }), h("label", { key: 'e1f22d03c316ad2c9fae0d80f81965557c0fbce6' }, "Typed with a keyboard")), h("div", { key: '9c343a3b9a3a551806d86f7c33496f856e50fe99', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, h("verdocs-radio-button", { key: '7e411e25456464390b028237cce9dcace361b7cf', checked: this.mode === 'draw', value: "draw", name: "mode", onClick: () => this.setMode('draw') }), h("label", { key: '9a707c87cf4229a6a8831adfeced815ce098180b' }, "Drawn with touch, mouse, or stylus")), h("div", { key: 'aa35cc9591db961dbff6cd26127ccfff96f225d0', class: "preview-header" }, h("div", { key: '4144d977477a558f1785d8f77072d83e8832841b', style: { fontSize: '13px', fontWeight: '400' } }, "Signature Preview"), this.mode === 'draw' && (h("button", { key: '3b687ce578839aefc9447357f61c46ecf783500a', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'signature'), disabled: !this.hasDrawnSignature }, "Clear"))), h("div", { key: '306bad99deb8abf8c071d45146f6bbb63c8ca8f4', class: "canvas-container signature-container" }, h("div", { key: 'e5538c0694e4c32d63d0d2169938aa55f0a282c1', class: "signing-indicator" }, h("div", { key: 'd1b5f38019d723b90d95c5ad23219ed4f38a4248', class: "x-icon", innerHTML: SignatureXIcon }), h("div", { key: 'd2f2693b3fdd9feeb6ce7ab8ef006ede715217ab', class: "signing-line" })), h("canvas", { key: '59aa5a8bc5a588bd7fe08bafd43f06394ed35128', ref: el => (this.signatureElement = el),
|
|
455
516
|
// width="300"
|
|
456
|
-
height: "79", class: "signature-canvas", onPointerDown: this.handleSigPointerDown, onPointerMove: this.handleSigPointerMove, onPointerUp: this.handleSigPointerUp, onPointerCancel: this.handleSigPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), h("div", { key: '
|
|
517
|
+
height: "79", class: "signature-canvas", onPointerDown: this.handleSigPointerDown, onPointerMove: this.handleSigPointerMove, onPointerUp: this.handleSigPointerUp, onPointerCancel: this.handleSigPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), h("div", { key: '86a97be28c467678bd34e455412877ff55de26c2', class: "preview-header" }, h("div", { key: '0a605a59765dbb1f7ee15aa17bc3b4547983c747', style: { fontSize: '13px', fontWeight: '400' } }, "Initials Preview"), this.mode === 'draw' && (h("button", { key: '2426ed63c75312a999a9c12653dd75afe844fa07', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'initials'), disabled: !this.hasDrawnInitials }, "Clear"))), h("div", { key: 'fa2c72403a43dfdd6a5f237fa3a21f048ceb517b', class: "canvas-container initials-container" }, h("div", { key: '4e1fbf7d941fcb46c363a35cd238c03d5cc75491', class: "signing-indicator" }, h("div", { key: 'c52486f29337d6b9027b32ea103e86c45904749e', class: "x-icon", innerHTML: SignatureXIcon }), h("div", { key: '6fa97d0d887d543f696de750db82b1a034bcb2b6', class: "signing-line" })), h("canvas", { key: '062e4e8da832b9d0f1a5af24a76188d3a9164ad4', ref: el => (this.initialsElement = el),
|
|
457
518
|
// width="300"
|
|
458
|
-
height: "79", class: "initials-canvas", onPointerDown: this.handleInitialsPointerDown, onPointerMove: this.handleInitialsPointerMove, onPointerUp: this.handleInitialsPointerUp, onPointerCancel: this.handleInitialsPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), h("div", { key: '
|
|
519
|
+
height: "79", class: "initials-canvas", onPointerDown: this.handleInitialsPointerDown, onPointerMove: this.handleInitialsPointerMove, onPointerUp: this.handleInitialsPointerUp, onPointerCancel: this.handleInitialsPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), h("div", { key: 'f589d9624ff808b4179c55fad6ca1ef27b79f553', class: "disclaimer" }, "By clicking \u00ABAdopt Signature\u00BB, I agree that the signature and initials above will be the electronic representation of my signature and initials for all purposes when I use them to sign documents. Applying them to a document is legally equivalent to signing with a pen on paper.")), h("div", { key: '33058008d0000a073a43abae0246effa3970a52d', class: "footer", slot: "footer" }, h("div", { key: '3f6ea8bbca9a5eb9fab950a2a4d3d2e135698f56', class: "buttons" }, h("button", { key: '94512ed74ce791505f8e949f818ab7cac907271f', class: "cancel", onClick: e => this.handleCancel(e) }, "Cancel"), h("button", { key: '085af06c8d1671b0533a6f2b49891fcefe3697a9', class: "proceed", onClick: e => this.handleAdopt(e), disabled: this.isAdoptButtonDisabled() }, "Adopt & Sign")))));
|
|
459
520
|
}
|
|
460
521
|
};
|
|
461
522
|
VerdocsAdoptSignatureDialog.style = verdocsAdoptSignatureDialogCss;
|
|
@@ -76,6 +76,9 @@ const VerdocsSign = class {
|
|
|
76
76
|
this.agreed = false;
|
|
77
77
|
this.signatureId = null;
|
|
78
78
|
this.initialId = null;
|
|
79
|
+
this.signatureAdoptMode = 'type';
|
|
80
|
+
this.adoptedSignaturePreview = null;
|
|
81
|
+
this.adoptedInitialsPreview = null;
|
|
79
82
|
this.skippedFields = [];
|
|
80
83
|
this.documentsSingularPlural = 'document';
|
|
81
84
|
this.authStep = null;
|
|
@@ -227,6 +230,9 @@ const VerdocsSign = class {
|
|
|
227
230
|
// to adopt at least once per session so the signing flow is explicit after removing the up-front progress dialog.
|
|
228
231
|
this.signatureId = null;
|
|
229
232
|
this.initialId = null;
|
|
233
|
+
this.signatureAdoptMode = 'type';
|
|
234
|
+
this.adoptedSignaturePreview = null;
|
|
235
|
+
this.adoptedInitialsPreview = null;
|
|
230
236
|
this.submitted = recipient.status === 'submitted';
|
|
231
237
|
this.loading = false;
|
|
232
238
|
this.isDone = this.submitted;
|
|
@@ -562,6 +568,9 @@ const VerdocsSign = class {
|
|
|
562
568
|
if (e.detail === null) {
|
|
563
569
|
console.log('[SIGN] Clearing signature');
|
|
564
570
|
this.signatureId = null;
|
|
571
|
+
this.adoptedSignaturePreview = null;
|
|
572
|
+
this.adoptedInitialsPreview = null;
|
|
573
|
+
this.signatureAdoptMode = 'type';
|
|
565
574
|
const updateResult = await updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, field.name, null, false);
|
|
566
575
|
this.updateRecipientFieldValue(field.name, updateResult);
|
|
567
576
|
if (field.required)
|
|
@@ -1024,7 +1033,7 @@ const VerdocsSign = class {
|
|
|
1024
1033
|
});
|
|
1025
1034
|
}
|
|
1026
1035
|
render() {
|
|
1027
|
-
var _a;
|
|
1036
|
+
var _a, _b, _c;
|
|
1028
1037
|
if (this.showLoadError) {
|
|
1029
1038
|
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: () => {
|
|
1030
1039
|
window.location.reload();
|
|
@@ -1174,9 +1183,12 @@ const VerdocsSign = class {
|
|
|
1174
1183
|
} })), 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: () => {
|
|
1175
1184
|
this.showDone = false;
|
|
1176
1185
|
this.isDone = true;
|
|
1177
|
-
} })), this.adoptingSignature && (h("verdocs-adopt-signature-dialog", { name: formatFullName(this.recipient), nameLocked: !!((_a = this.recipient) === null || _a === void 0 ? void 0 : _a.name_locked), onNext: async (e) => {
|
|
1186
|
+
} })), this.adoptingSignature && (h("verdocs-adopt-signature-dialog", { name: formatFullName(this.recipient), nameLocked: !!((_a = this.recipient) === null || _a === void 0 ? void 0 : _a.name_locked), initialMode: this.adoptedSignaturePreview ? this.signatureAdoptMode : undefined, initialSignature: (_b = this.adoptedSignaturePreview) !== null && _b !== void 0 ? _b : undefined, initialInitials: (_c = this.adoptedInitialsPreview) !== null && _c !== void 0 ? _c : undefined, onNext: async (e) => {
|
|
1178
1187
|
console.log('[SIGN] Adopting signature/initials block', e.detail);
|
|
1179
1188
|
this.showSpinner = true;
|
|
1189
|
+
this.signatureAdoptMode = e.detail.mode;
|
|
1190
|
+
this.adoptedSignaturePreview = e.detail.signature;
|
|
1191
|
+
this.adoptedInitialsPreview = e.detail.initials;
|
|
1180
1192
|
// These arrive as base-64 encoded data URLs
|
|
1181
1193
|
const signatureBlob = await (await fetch(e.detail.signature)).blob();
|
|
1182
1194
|
const initialsBlob = await (await fetch(e.detail.initials)).blob();
|