@hubsync/esign-web-sdk 6.9.42 → 6.9.44
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 +79 -18
- package/dist/cjs/verdocs-sign.cjs.entry.js +65 -3
- 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 +157 -20
- 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 +69 -3
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/components/{p-Dpuy1yah.js → p-DSzyP6KP.js} +85 -20
- package/dist/components/p-DSzyP6KP.js.map +1 -0
- package/dist/components/verdocs-adopt-signature-dialog.js +1 -1
- package/dist/components/verdocs-sign.js +70 -4
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/custom-elements.json +24 -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 +79 -18
- package/dist/esm/verdocs-sign.entry.js +65 -3
- 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 +22 -0
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +12 -0
- package/dist/types/components.d.ts +34 -2
- package/dist/verdocs-web-sdk/p-7a0f0515.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-7a0f0515.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-965a8331.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-965a8331.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
- package/dist/verdocs-web-sdk/p-CSd2l4lv.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-cbae68bb.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-cbae68bb.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-dx3XIcHV.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-ff5f20c9.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-ff5f20c9.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
|
@@ -166,8 +166,11 @@ const VerdocsAdoptSignatureDialog = /*@__PURE__*/ proxyCustomElement(class Verdo
|
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
168
|
componentWillLoad() {
|
|
169
|
-
this.enteredName = this.name;
|
|
170
|
-
this.computeEnteredInitials(this.
|
|
169
|
+
this.enteredName = this.initialEnteredName || this.name;
|
|
170
|
+
this.computeEnteredInitials(this.enteredName);
|
|
171
|
+
if (this.initialMode) {
|
|
172
|
+
this.mode = this.initialMode;
|
|
173
|
+
}
|
|
171
174
|
const ds = new FontFace('Dancing Script', 'url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)');
|
|
172
175
|
ds.load().then(font => {
|
|
173
176
|
document.fonts.add(font);
|
|
@@ -175,24 +178,82 @@ const VerdocsAdoptSignatureDialog = /*@__PURE__*/ proxyCustomElement(class Verdo
|
|
|
175
178
|
});
|
|
176
179
|
}
|
|
177
180
|
componentDidLoad() {
|
|
178
|
-
this.drawSignatureText();
|
|
179
|
-
this.drawInitialsText();
|
|
180
181
|
this.setupSignatureCanvas();
|
|
181
182
|
this.setupInitialsCanvas();
|
|
183
|
+
void this.loadExistingPreviews();
|
|
182
184
|
}
|
|
183
185
|
componentDidUpdate() {
|
|
184
|
-
this.drawSignatureText();
|
|
185
|
-
this.drawInitialsText();
|
|
186
186
|
this.setupSignatureCanvas();
|
|
187
187
|
this.setupInitialsCanvas();
|
|
188
|
+
if (this.mode === 'type') {
|
|
189
|
+
this.drawSignatureText();
|
|
190
|
+
this.drawInitialsText();
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
188
193
|
// Redraw drawn signature when in draw mode
|
|
189
|
-
if (this.
|
|
194
|
+
if (this.allSigStrokes.length > 0) {
|
|
190
195
|
this.redrawDrawnSignature();
|
|
191
196
|
}
|
|
192
|
-
if (this.
|
|
197
|
+
if (this.allInitialsStrokes.length > 0) {
|
|
193
198
|
this.redrawDrawnInitials();
|
|
194
199
|
}
|
|
195
200
|
}
|
|
201
|
+
drawImageOnCanvas(canvas, dataUrl) {
|
|
202
|
+
return new Promise((resolve, reject) => {
|
|
203
|
+
const image = new Image();
|
|
204
|
+
image.onload = () => {
|
|
205
|
+
const context = canvas.getContext('2d');
|
|
206
|
+
context.clearRect(0, 0, canvas.width, canvas.height);
|
|
207
|
+
const padding = 24;
|
|
208
|
+
const scale = Math.min((canvas.width - padding) / image.width, (canvas.height - padding) / image.height, 1);
|
|
209
|
+
const width = image.width * scale;
|
|
210
|
+
const height = image.height * scale;
|
|
211
|
+
const x = (canvas.width - width) / 2;
|
|
212
|
+
const y = (canvas.height - height) / 2;
|
|
213
|
+
context.drawImage(image, x, y, width, height);
|
|
214
|
+
resolve();
|
|
215
|
+
};
|
|
216
|
+
image.onerror = () => reject(new Error('Unable to load signature preview'));
|
|
217
|
+
image.src = dataUrl;
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
async loadExistingPreviews() {
|
|
221
|
+
if (this.mode === 'draw') {
|
|
222
|
+
await this.restoreDrawnPreviewsIfNeeded();
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
this.drawSignatureText();
|
|
226
|
+
this.drawInitialsText();
|
|
227
|
+
}
|
|
228
|
+
setMode(mode) {
|
|
229
|
+
this.mode = mode;
|
|
230
|
+
if (mode === 'draw') {
|
|
231
|
+
void this.restoreDrawnPreviewsIfNeeded();
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
async restoreDrawnPreviewsIfNeeded() {
|
|
235
|
+
// Preserve in-session stroke edits; only restore saved previews when there are no strokes yet.
|
|
236
|
+
if (this.allSigStrokes.length > 0 || this.allInitialsStrokes.length > 0) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
const tasks = [];
|
|
240
|
+
if (this.initialSignature && this.signatureElement) {
|
|
241
|
+
tasks.push(this.drawImageOnCanvas(this.signatureElement, this.initialSignature).then(() => {
|
|
242
|
+
this.hasDrawnSignature = true;
|
|
243
|
+
}));
|
|
244
|
+
}
|
|
245
|
+
if (this.initialInitials && this.initialsElement) {
|
|
246
|
+
tasks.push(this.drawImageOnCanvas(this.initialsElement, this.initialInitials).then(() => {
|
|
247
|
+
this.hasDrawnInitials = true;
|
|
248
|
+
}));
|
|
249
|
+
}
|
|
250
|
+
if (tasks.length === 0) {
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
await Promise.all(tasks);
|
|
254
|
+
this.setupSignatureCanvas();
|
|
255
|
+
this.setupInitialsCanvas();
|
|
256
|
+
}
|
|
196
257
|
drawSignatureText() {
|
|
197
258
|
if (!this.signatureElement || this.mode !== 'type') {
|
|
198
259
|
return;
|
|
@@ -320,7 +381,7 @@ const VerdocsAdoptSignatureDialog = /*@__PURE__*/ proxyCustomElement(class Verdo
|
|
|
320
381
|
e.preventDefault();
|
|
321
382
|
const signature = this.signatureElement.toDataURL('image/png');
|
|
322
383
|
const initials = this.initialsElement.toDataURL('image/png');
|
|
323
|
-
this.next.emit({ signature, initials });
|
|
384
|
+
this.next.emit({ signature, initials, mode: this.mode, name: this.enteredName });
|
|
324
385
|
}
|
|
325
386
|
isAdoptButtonDisabled() {
|
|
326
387
|
switch (this.mode) {
|
|
@@ -328,8 +389,8 @@ const VerdocsAdoptSignatureDialog = /*@__PURE__*/ proxyCustomElement(class Verdo
|
|
|
328
389
|
// Disable if no name has been entered
|
|
329
390
|
return !this.enteredName || this.enteredName.trim().length === 0;
|
|
330
391
|
case 'draw':
|
|
331
|
-
// Disable if nothing has been drawn
|
|
332
|
-
return
|
|
392
|
+
// Disable if nothing has been drawn or restored from a previous adoption
|
|
393
|
+
return !this.hasDrawnSignature || !this.hasDrawnInitials;
|
|
333
394
|
default:
|
|
334
395
|
return true;
|
|
335
396
|
}
|
|
@@ -350,8 +411,8 @@ const VerdocsAdoptSignatureDialog = /*@__PURE__*/ proxyCustomElement(class Verdo
|
|
|
350
411
|
this.sigDrawingContext.lineWidth = 2;
|
|
351
412
|
this.sigDrawingContext.lineCap = 'round';
|
|
352
413
|
this.sigDrawingContext.lineJoin = 'round';
|
|
353
|
-
// Clear canvas only if there are no existing strokes
|
|
354
|
-
if (this.allSigStrokes.length === 0) {
|
|
414
|
+
// Clear canvas only if there are no existing strokes or restored previews
|
|
415
|
+
if (this.allSigStrokes.length === 0 && !this.hasDrawnSignature) {
|
|
355
416
|
this.sigDrawingContext.clearRect(0, 0, this.signatureElement.width, this.signatureElement.height);
|
|
356
417
|
}
|
|
357
418
|
}
|
|
@@ -380,8 +441,8 @@ const VerdocsAdoptSignatureDialog = /*@__PURE__*/ proxyCustomElement(class Verdo
|
|
|
380
441
|
this.initialsDrawingContext.lineWidth = 2;
|
|
381
442
|
this.initialsDrawingContext.lineCap = 'round';
|
|
382
443
|
this.initialsDrawingContext.lineJoin = 'round';
|
|
383
|
-
// Clear canvas only if there are no existing strokes
|
|
384
|
-
if (this.allInitialsStrokes.length === 0) {
|
|
444
|
+
// Clear canvas only if there are no existing strokes or restored previews
|
|
445
|
+
if (this.allInitialsStrokes.length === 0 && !this.hasDrawnInitials) {
|
|
385
446
|
this.initialsDrawingContext.clearRect(0, 0, this.initialsElement.width, this.initialsElement.height);
|
|
386
447
|
}
|
|
387
448
|
}
|
|
@@ -449,16 +510,20 @@ const VerdocsAdoptSignatureDialog = /*@__PURE__*/ proxyCustomElement(class Verdo
|
|
|
449
510
|
};
|
|
450
511
|
}
|
|
451
512
|
render() {
|
|
452
|
-
return (h("verdocs-dialog", { key: '
|
|
513
|
+
return (h("verdocs-dialog", { key: '3bf57218c88709dcb904ed197ac37551c26c8c37', persistent: true, onExit: () => this.exit.emit() }, h("div", { key: '26bf968eb7e6169e29c11c96806c387fc2891df2', slot: "heading", class: "heading" }, "Adopt Your Signature"), h("div", { key: 'dd9cb18b25d3055cf98a79fca2fe12a7a0f756da', slot: "content", class: "content" }, h("div", { key: 'ff7520ccf2d8e15a72b12aabeba11f785c33a4b1', style: { fontWeight: '300', color: '#242424', fontSize: '13px' } }, "Confirm your name, initials, and signature."), h("div", { key: '428c77e16cfcddf1a202cc9155220fe7899f12e3', class: { type: true, active: this.mode === 'type' } }, h("verdocs-text-input", { key: '3df310a9c55c581350fc5ee5847e768764283ee6', label: "Full Name", value: this.enteredName, disabled: this.nameLocked, onInput: e => this.handleNameChange(e), onClick: e => e.stopPropagation() }), this.nameLocked && h("div", { key: '060c1edd0986a6be98f9ce68f7b94d562782a3ae', class: "name-locked-hint" }, "Your name has been set by the sender and cannot be changed.")), h("div", { key: '95b80e7b68150ba7e912176834686b769c1ad74e', style: { fontWeight: '400', color: '#242424', fontSize: '13px' } }, "Select a signature style"), h("div", { key: '8567f38208d1c2130ecacb21a6f09eaa089f6fb4', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, h("verdocs-radio-button", { key: '278fa39a73863c07512b297cdc13d2ad6bc18320', checked: this.mode === 'type', value: "type", name: "mode", onClick: () => this.setMode('type') }), h("label", { key: '20ebbd899fa095783e0b9b307e7c5bc6c73585c8' }, "Typed with a keyboard")), h("div", { key: '2aa96af7da2dbff4437f76d3be8c25660a5ae5ec', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, h("verdocs-radio-button", { key: 'e72c8a7350e6a368748746622dfc8382c94bbd7d', checked: this.mode === 'draw', value: "draw", name: "mode", onClick: () => this.setMode('draw') }), h("label", { key: '423eff813da06377c1c5d66f8ea813564f40478c' }, "Drawn with touch, mouse, or stylus")), h("div", { key: '013b7108cd626c5ef736520c4e93374205d62ea1', class: "preview-header" }, h("div", { key: '9af65f41a953990c2412b02176e921a60ef191ca', style: { fontSize: '13px', fontWeight: '400' } }, "Signature Preview"), this.mode === 'draw' && (h("button", { key: '5e422b7f7ef72fdf50eb7c5e102b9062a6f10e1c', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'signature'), disabled: !this.hasDrawnSignature }, "Clear"))), h("div", { key: '220cdf4f321aa3a388c9c4f9340d130cb207e7cf', class: "canvas-container signature-container" }, h("div", { key: '0ffa2c39b216ecd3ef76a36122b8d51f6e5a59bb', class: "signing-indicator" }, h("div", { key: 'c295f652022004645377620a49b9314330bbca7c', class: "x-icon", innerHTML: SignatureXIcon }), h("div", { key: '0b24b19acd68f1e9ab9588f7b0aa3412e571a12d', class: "signing-line" })), h("canvas", { key: '72134d2f592c8f60fab5a90290f15b21e0b3e6aa', ref: el => (this.signatureElement = el),
|
|
453
514
|
// width="300"
|
|
454
|
-
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: '
|
|
515
|
+
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: '847d54a8a55652ab67a3909d6510a4d587fb9bd8', class: "preview-header" }, h("div", { key: 'e270bb3dc8971ecc816db09ec6d91eb1a6613786', style: { fontSize: '13px', fontWeight: '400' } }, "Initials Preview"), this.mode === 'draw' && (h("button", { key: 'be4a46390d14a90f9705f40ff90a920174d58d85', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'initials'), disabled: !this.hasDrawnInitials }, "Clear"))), h("div", { key: 'a8c2ace5575bf6b95e18e08febbd2dd3876d53c6', class: "canvas-container initials-container" }, h("div", { key: '1cab75d06695c2458452b4adc039f1078959c740', class: "signing-indicator" }, h("div", { key: 'e925e1f10a180aa65953dba5c007f294daf52ad2', class: "x-icon", innerHTML: SignatureXIcon }), h("div", { key: 'ecd9548ff69aa7ac7241433c1e88e5d66ceb2486', class: "signing-line" })), h("canvas", { key: '46c776d1efcee7e3d5bf5bd4a01db517eb638481', ref: el => (this.initialsElement = el),
|
|
455
516
|
// width="300"
|
|
456
|
-
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: '
|
|
517
|
+
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: '7039cf8e45f20d2c659937b9b637be9ee236b2d7', 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: '93030327757e8dbb438a9f7c0aa36829e54d1725', class: "footer", slot: "footer" }, h("div", { key: '7138105a5cd87dc3a85058fbfa0bd999a8ff68c5', class: "buttons" }, h("button", { key: '6051baa6bade91f491530b955710ceb672a45547', class: "cancel", onClick: e => this.handleCancel(e) }, "Cancel"), h("button", { key: 'cf3d5ff3b39f6c2b32c29306ca9a1656edb17e29', class: "proceed", onClick: e => this.handleAdopt(e), disabled: this.isAdoptButtonDisabled() }, "Adopt & Sign")))));
|
|
457
518
|
}
|
|
458
519
|
static get style() { return verdocsAdoptSignatureDialogCss; }
|
|
459
520
|
}, [256, "verdocs-adopt-signature-dialog", {
|
|
460
521
|
"name": [1],
|
|
461
522
|
"nameLocked": [4, "name-locked"],
|
|
523
|
+
"initialEnteredName": [1, "initial-entered-name"],
|
|
524
|
+
"initialMode": [1, "initial-mode"],
|
|
525
|
+
"initialSignature": [1, "initial-signature"],
|
|
526
|
+
"initialInitials": [1, "initial-initials"],
|
|
462
527
|
"fontLoaded": [32],
|
|
463
528
|
"enteredName": [32],
|
|
464
529
|
"enteredInitials": [32],
|
|
@@ -502,6 +567,6 @@ function defineCustomElement() {
|
|
|
502
567
|
}
|
|
503
568
|
|
|
504
569
|
export { VerdocsAdoptSignatureDialog as V, defineCustomElement as d };
|
|
505
|
-
//# sourceMappingURL=p-
|
|
570
|
+
//# sourceMappingURL=p-DSzyP6KP.js.map
|
|
506
571
|
|
|
507
|
-
//# sourceMappingURL=p-
|
|
572
|
+
//# sourceMappingURL=p-DSzyP6KP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-DSzyP6KP.js","mappings":";;;;;;;AAAA,MAAM,8BAA8B,GAAG,yhOAAyhO;;MCWnjO,2BAA2B,iBAAAA,kBAAA,CAAA,MAAA,2BAAA,SAAAC,CAAA,CAAA;AAJxC,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AAUE;;AAEG;AACK,QAAA,IAAI,CAAA,IAAA,GAAW,EAAE;AAEzB;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AAiC1B,QAAA,IAAU,CAAA,UAAA,GAAG,KAAK;AAClB,QAAA,IAAW,CAAA,WAAA,GAAW,EAAE;AACxB,QAAA,IAAe,CA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AA,0CAAA,EAAQ,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAEhD,EAAA,QAAA,CAAA,EACT,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,qBAAqB,EAAE,EAAA,EAAA,cAAA,CAExF,CACL,CACF,CACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.scss?tag=verdocs-adopt-signature-dialog","src/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-adopt-signature-dialog {\n font-family: $primary-font;\n box-sizing: border-box;\n\n verdocs-dialog {\n border-radius: 4px;\n }\n\n .heading {\n color: #201f1e;\n font-weight: 400;\n padding-bottom: 0;\n border-bottom: none;\n }\n\n .content {\n display: flex;\n padding: 12px 24px 0;\n flex-direction: column;\n }\n\n .name-locked-hint {\n font-size: 12px;\n color: #6b7280;\n margin-top: 4px;\n }\n\n verdocs-text-input .input-label {\n color: #242424;\n font-size: 13px;\n font-weight: 400;\n }\n\n verdocs-text-input .input-element {\n border: 1px solid #e0e0e0;\n }\n\n verdocs-radio-button {\n transform: scale(0.9);\n }\n\n .canvas-container {\n position: relative;\n width: 100%;\n margin: 10px 0;\n border-radius: 4px;\n background: #fafafa;\n border: 1px solid #d1d1d1;\n box-sizing: border-box;\n\n &.initials-container {\n max-width: 50%;\n }\n\n canvas {\n width: 100%;\n height: 79px;\n border-radius: 4px;\n /* Background must be transparent to show the guide */\n background: transparent;\n box-sizing: border-box;\n /* Border is handled by container */\n border: none;\n position: relative;\n z-index: 2;\n }\n\n .signing-indicator {\n position: absolute;\n bottom: 9px;\n left: 9px;\n right: 9px;\n height: 28px;\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n gap: 2px;\n z-index: 1;\n pointer-events: none;\n\n .x-icon {\n width: 25px;\n height: 28px;\n display: flex;\n\n svg {\n width: 100%;\n height: 100%;\n }\n }\n\n .signing-line {\n flex: 1;\n /* \"The line is a 1px dashed (8px dash 8px space) #d1d1d1 line\". This works in SOME browsers. */\n border-bottom: 1px dashed #d1d1d1;\n background-position: bottom;\n background-size: 16px 1px;\n /* 8px dash + 8px space = 16px repeat */\n background-repeat: repeat-x;\n margin-bottom: 0;\n /* Since standard border-style: dashed doesn't allow custom spacing, we use a background gradient\n trick or just rely on standard dashed if acceptable.\n */\n height: 1px;\n border: none;\n background-image: linear-gradient(to right, #d1d1d1 50%, transparent 50%);\n }\n }\n }\n\n .disclaimer {\n padding: 8px 0;\n font-size: 11px;\n line-height: 14px;\n text-align: justify;\n color: rgba(0, 0, 0, 0.54);\n }\n\n .tabs {\n display: flex;\n flex-direction: row;\n margin: -20px -20px 0 -20px;\n border-bottom: 1px solid #eeeeee;\n\n .tab {\n flex: 1;\n gap: 4px;\n display: flex;\n cursor: pointer;\n font-size: 12px;\n font-weight: 500;\n padding: 6px 10px;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n\n &.active {\n background: #f9f5fe;\n border-bottom: 2px solid $border-color;\n }\n\n &:hover {\n color: $primary-color;\n }\n\n .icon {\n width: 16px;\n height: 16px;\n }\n }\n }\n\n // We use fixed heights for these sections to avoid layout shifts when switching tabs.\n .type {\n display: none;\n flex-direction: column;\n\n &.active {\n display: flex;\n }\n }\n\n .draw {\n height: 100px;\n display: none;\n margin-top: 20px;\n flex-direction: column;\n\n &.active {\n display: flex;\n }\n\n .draw-instructions {\n font-size: 13px;\n color: rgba(0, 0, 0, 0.6);\n margin-bottom: 8px;\n text-align: center;\n }\n\n canvas {\n cursor: crosshair;\n touch-action: none;\n }\n }\n\n .preview-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 10px;\n\n .clear-button-text {\n background: none;\n border: none;\n color: var(--verdocs-primary-color, #{$verdocs-green});\n cursor: pointer;\n font-size: 13px;\n padding: 0;\n font-weight: 500;\n\n &:hover {\n text-decoration: underline;\n }\n\n &:disabled {\n color: #9ca3af;\n text-decoration: none;\n cursor: not-allowed;\n }\n }\n }\n\n .upload {\n height: 100px;\n display: none;\n margin-top: 20px;\n flex-direction: column;\n\n &.active {\n display: flex;\n }\n\n .upload-instructions {\n font-size: 13px;\n color: rgba(0, 0, 0, 0.6);\n margin-bottom: 8px;\n text-align: center;\n }\n\n .upload-actions {\n display: flex;\n justify-content: center;\n gap: 12px;\n margin-top: 8px;\n\n .upload-button {\n border: 1px solid var(--verdocs-primary-color, #{$verdocs-green});\n background-color: var(--verdocs-primary-color, #{$verdocs-green});\n color: #ffffff;\n padding: 8px 20px;\n font-size: 13px;\n cursor: pointer;\n border-radius: var(--verdocs-button-radius, 4px);\n transition: all 0.2s ease;\n\n &:hover {\n filter: brightness(0.9);\n }\n }\n\n .clear-button {\n border: 1px solid #d0d0d0;\n background-color: #ffffff;\n color: #333333;\n padding: 8px 16px;\n font-size: 13px;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.2s ease;\n\n &:hover:not(:disabled) {\n background-color: #f5f5f5;\n border-color: #b0b0b0;\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n }\n\n .upload-filename {\n font-size: 12px;\n color: rgba(0, 0, 0, 0.6);\n text-align: center;\n margin-top: 8px;\n font-style: italic;\n }\n }\n\n /* TODO: We're getting positive feedback. Add this as a formal button variant. */\n .buttons {\n gap: 20px;\n display: flex;\n margin-top: 14px;\n flex-direction: row;\n justify-content: flex-end;\n\n button {\n flex: 1;\n border: 0;\n height: 38px;\n display: flex;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n align-items: center;\n border-radius: var(--verdocs-button-radius, 6px);\n justify-content: center;\n transition: all 0.2s ease;\n\n &.cancel {\n background-color: transparent;\n border: 1px solid #d1d5db;\n color: #374151;\n\n &:hover {\n background-color: #f9fafb;\n }\n }\n\n &.proceed {\n background-color: var(--verdocs-primary-color, #{$verdocs-green});\n border: 1px solid transparent;\n color: #ffffff;\n\n &:hover {\n background-color: var(--verdocs-primary-color-hover, #{$verdocs-green-shade});\n filter: brightness(0.95);\n }\n }\n\n &:disabled {\n background-color: #e5e7eb;\n color: #9ca3af;\n cursor: not-allowed;\n }\n }\n }\n}\n","import {Component, Prop, h, Event, EventEmitter, State} from '@stencil/core';\nimport {SignatureXIcon} from '../../../utils/Icons';\n\n/**\n * Display a dialog that allows the user to specify a signature image, either by using a signature-font-generated image\n * based on their full name, or by hand-drawing their signature with a mouse or tablet.\n */\n@Component({\n tag: 'verdocs-adopt-signature-dialog',\n styleUrl: 'verdocs-adopt-signature-dialog.scss',\n})\nexport class VerdocsAdoptSignatureDialog {\n private signatureElement?: HTMLCanvasElement;\n private initialsElement?: HTMLCanvasElement;\n private sigDrawingContext?: CanvasRenderingContext2D;\n private initialsDrawingContext?: CanvasRenderingContext2D;\n\n /**\n * Initial signature text\n */\n @Prop() name: string = '';\n\n /**\n * If true, the name fields will be read-only. Used when the sender has locked the recipient's name.\n */\n @Prop() nameLocked: boolean = false;\n\n /**\n * If set, restores the name last used when adopting (e.g. after Edit).\n */\n @Prop() initialEnteredName?: string;\n\n /**\n * If set, restores the signature style tab when reopening the dialog (e.g. after Edit).\n */\n @Prop() initialMode?: 'type' | 'draw';\n\n /**\n * If set, restores the previously adopted signature preview (base64 data URL).\n */\n @Prop() initialSignature?: string;\n\n /**\n * If set, restores the previously adopted initials preview (base64 data URL).\n */\n @Prop() initialInitials?: string;\n\n /**\n * Fired when the user completes the dialog and clicks Adopt. The event detail will contain a base64-encoded string\n * representation of the signature adopted.\n */\n @Event({composed: true}) next: EventEmitter<{signature: string; initials: string; mode: 'type' | 'draw'; name: string}>;\n\n /**\n * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n @State() fontLoaded = false;\n @State() enteredName: string = '';\n @State() enteredInitials: string = '';\n @State() mode: 'type' | 'draw' = 'type';\n @State() isDrawing = false;\n @State() hasDrawnSignature = false;\n @State() hasDrawnInitials = false;\n\n private currentSigStroke: Array<{x: number; y: number}> = [];\n private allSigStrokes: Array<Array<{x: number; y: number}>> = [];\n private lastSigPoint: {x: number; y: number} | null = null;\n\n private currentInitialsStroke: Array<{x: number; y: number}> = [];\n private allInitialsStrokes: Array<Array<{x: number; y: number}>> = [];\n private lastInitialsPoint: {x: number; y: number} | null = null;\n\n componentWillLoad() {\n this.enteredName = this.initialEnteredName || this.name;\n this.computeEnteredInitials(this.enteredName);\n\n if (this.initialMode) {\n this.mode = this.initialMode;\n }\n\n const ds = new FontFace('Dancing Script', 'url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)');\n ds.load().then(font => {\n document.fonts.add(font);\n this.fontLoaded = true;\n });\n }\n\n componentDidLoad() {\n this.setupSignatureCanvas();\n this.setupInitialsCanvas();\n void this.loadExistingPreviews();\n }\n\n componentDidUpdate() {\n this.setupSignatureCanvas();\n this.setupInitialsCanvas();\n\n if (this.mode === 'type') {\n this.drawSignatureText();\n this.drawInitialsText();\n return;\n }\n\n // Redraw drawn signature when in draw mode\n if (this.allSigStrokes.length > 0) {\n this.redrawDrawnSignature();\n }\n if (this.allInitialsStrokes.length > 0) {\n this.redrawDrawnInitials();\n }\n }\n\n private drawImageOnCanvas(canvas: HTMLCanvasElement, dataUrl: string): Promise<void> {\n return new Promise((resolve, reject) => {\n const image = new Image();\n image.onload = () => {\n const context = canvas.getContext('2d');\n context.clearRect(0, 0, canvas.width, canvas.height);\n\n const padding = 24;\n const scale = Math.min((canvas.width - padding) / image.width, (canvas.height - padding) / image.height, 1);\n const width = image.width * scale;\n const height = image.height * scale;\n const x = (canvas.width - width) / 2;\n const y = (canvas.height - height) / 2;\n\n context.drawImage(image, x, y, width, height);\n resolve();\n };\n image.onerror = () => reject(new Error('Unable to load signature preview'));\n image.src = dataUrl;\n });\n }\n\n private async loadExistingPreviews() {\n if (this.mode === 'draw') {\n await this.restoreDrawnPreviewsIfNeeded();\n return;\n }\n\n this.drawSignatureText();\n this.drawInitialsText();\n }\n\n private setMode(mode: 'type' | 'draw') {\n this.mode = mode;\n\n if (mode === 'draw') {\n void this.restoreDrawnPreviewsIfNeeded();\n }\n }\n\n private async restoreDrawnPreviewsIfNeeded() {\n // Preserve in-session stroke edits; only restore saved previews when there are no strokes yet.\n if (this.allSigStrokes.length > 0 || this.allInitialsStrokes.length > 0) {\n return;\n }\n\n const tasks: Promise<void>[] = [];\n\n if (this.initialSignature && this.signatureElement) {\n tasks.push(\n this.drawImageOnCanvas(this.signatureElement, this.initialSignature).then(() => {\n this.hasDrawnSignature = true;\n }),\n );\n }\n\n if (this.initialInitials && this.initialsElement) {\n tasks.push(\n this.drawImageOnCanvas(this.initialsElement, this.initialInitials).then(() => {\n this.hasDrawnInitials = true;\n }),\n );\n }\n\n if (tasks.length === 0) {\n return;\n }\n\n await Promise.all(tasks);\n this.setupSignatureCanvas();\n this.setupInitialsCanvas();\n }\n\n drawSignatureText() {\n if (!this.signatureElement || this.mode !== 'type') {\n return;\n }\n\n const sigCanvasWidth = this.signatureElement.width;\n const sigCanvasHeight = this.signatureElement.height;\n const sigContext = this.signatureElement.getContext('2d');\n sigContext.clearRect(0, 0, this.signatureElement.width, this.signatureElement.height);\n\n let fontSize = 100;\n let metrics: TextMetrics = sigContext.measureText(this.enteredName);\n do {\n fontSize -= 2;\n sigContext.font = `${fontSize}px Dancing Script`;\n metrics = sigContext.measureText(this.enteredName);\n } while (metrics.width > sigCanvasWidth - 24 || metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent + 24 > sigCanvasHeight);\n\n sigContext.textAlign = 'center';\n sigContext.textBaseline = 'middle';\n sigContext.font = `${fontSize}px Dancing Script`;\n sigContext.fillText(this.enteredName, this.signatureElement.width / 2, this.signatureElement.height / 2);\n }\n\n drawInitialsText() {\n if (!this.initialsElement || this.mode !== 'type') {\n return;\n }\n\n const initialsCanvasWidth = this.initialsElement.width;\n const initialsCanvasHeight = this.initialsElement.height;\n const context = this.initialsElement.getContext('2d');\n context.clearRect(0, 0, this.initialsElement.width, this.initialsElement.height);\n\n let fontSize = 100;\n let metrics: TextMetrics = context.measureText(this.enteredInitials);\n do {\n fontSize -= 2;\n context.font = `${fontSize}px Dancing Script`;\n metrics = context.measureText(this.enteredInitials);\n } while (metrics.width > initialsCanvasWidth - 24 || metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent + 24 > initialsCanvasHeight);\n\n context.textAlign = 'center';\n context.textBaseline = 'middle';\n context.font = `${fontSize}px Dancing Script`;\n context.fillText(this.enteredInitials, this.initialsElement.width / 2, this.initialsElement.height / 2);\n }\n\n redrawDrawnSignature() {\n if (!this.signatureElement || !this.sigDrawingContext || this.allSigStrokes.length === 0) {\n return;\n }\n\n // Clear the canvas first\n this.sigDrawingContext.clearRect(0, 0, this.signatureElement.width, this.signatureElement.height);\n\n // Redraw all strokes\n for (const stroke of this.allSigStrokes) {\n if (stroke.length === 0) {\n continue;\n }\n\n // Start the path at the first point\n this.sigDrawingContext.beginPath();\n this.sigDrawingContext.moveTo(stroke[0].x, stroke[0].y);\n\n // Draw smooth curves through all points in the stroke\n for (let i = 1; i < stroke.length; i++) {\n const currentPoint = stroke[i];\n const previousPoint = stroke[i - 1];\n\n // Use quadratic curves for smooth lines\n const midPoint = {\n x: (previousPoint.x + currentPoint.x) / 2,\n y: (previousPoint.y + currentPoint.y) / 2,\n };\n\n this.sigDrawingContext.quadraticCurveTo(previousPoint.x, previousPoint.y, midPoint.x, midPoint.y);\n }\n\n // Draw to the last point\n if (stroke.length > 1) {\n const lastPoint = stroke[stroke.length - 1];\n this.sigDrawingContext.lineTo(lastPoint.x, lastPoint.y);\n }\n\n this.sigDrawingContext.stroke();\n }\n }\n\n redrawDrawnInitials() {\n if (!this.initialsElement || !this.initialsDrawingContext || this.allInitialsStrokes.length === 0) {\n return;\n }\n\n // Clear the canvas first\n this.initialsDrawingContext.clearRect(0, 0, this.initialsElement.width, this.initialsElement.height);\n\n // Redraw all strokes\n for (const stroke of this.allInitialsStrokes) {\n if (stroke.length === 0) {\n continue;\n }\n\n // Start the path at the first point\n this.initialsDrawingContext.beginPath();\n this.initialsDrawingContext.moveTo(stroke[0].x, stroke[0].y);\n\n // Draw smooth curves through all points in the stroke\n for (let i = 1; i < stroke.length; i++) {\n const currentPoint = stroke[i];\n const previousPoint = stroke[i - 1];\n\n // Use quadratic curves for smooth lines\n const midPoint = {\n x: (previousPoint.x + currentPoint.x) / 2,\n y: (previousPoint.y + currentPoint.y) / 2,\n };\n\n this.initialsDrawingContext.quadraticCurveTo(previousPoint.x, previousPoint.y, midPoint.x, midPoint.y);\n }\n\n // Draw to the last point\n if (stroke.length > 1) {\n const lastPoint = stroke[stroke.length - 1];\n this.initialsDrawingContext.lineTo(lastPoint.x, lastPoint.y);\n }\n\n this.initialsDrawingContext.stroke();\n }\n }\n\n handleNameChange(e: any) {\n this.enteredName = e.target.value;\n this.computeEnteredInitials(e.target.value);\n }\n\n computeEnteredInitials(name: string) {\n const nameComponents = name\n .trim()\n .split(' ')\n .filter(part => part.length > 0);\n\n this.enteredInitials = nameComponents.length > 1 ? nameComponents.map(word => word.charAt(0).toUpperCase()).join('') : nameComponents[0].toUpperCase();\n }\n\n handleCancel(e: any) {\n e.stopPropagation();\n e.preventDefault();\n this.exit.emit();\n }\n\n handleAdopt(e: any) {\n e.stopPropagation();\n e.preventDefault();\n const signature = this.signatureElement.toDataURL('image/png');\n const initials = this.initialsElement.toDataURL('image/png');\n this.next.emit({signature, initials, mode: this.mode, name: this.enteredName});\n }\n\n isAdoptButtonDisabled(): boolean {\n switch (this.mode) {\n case 'type':\n // Disable if no name has been entered\n return !this.enteredName || this.enteredName.trim().length === 0;\n case 'draw':\n // Disable if nothing has been drawn or restored from a previous adoption\n return !this.hasDrawnSignature || !this.hasDrawnInitials;\n default:\n return true;\n }\n }\n\n setupSignatureCanvas() {\n if (!this.signatureElement) {\n return;\n }\n\n // Set up drawing context when in draw mode\n if (this.mode === 'draw') {\n // Always get fresh context from the current canvas element\n const sigContext = this.signatureElement.getContext('2d');\n\n // Only initialize if we don't have a context or it's different\n if (sigContext && sigContext !== this.sigDrawingContext) {\n this.sigDrawingContext = sigContext;\n\n // Configure drawing style for smooth signatures\n this.sigDrawingContext.strokeStyle = '#000000';\n this.sigDrawingContext.lineWidth = 2;\n this.sigDrawingContext.lineCap = 'round';\n this.sigDrawingContext.lineJoin = 'round';\n\n // Clear canvas only if there are no existing strokes or restored previews\n if (this.allSigStrokes.length === 0 && !this.hasDrawnSignature) {\n this.sigDrawingContext.clearRect(0, 0, this.signatureElement.width, this.signatureElement.height);\n }\n }\n }\n\n // Reset drawing context when switching away from draw mode\n // NOTE: We don't clear allStrokes here so drawing persists when returning to draw mode\n if (this.mode !== 'draw' && this.sigDrawingContext) {\n this.sigDrawingContext = null;\n this.currentSigStroke = [];\n this.lastSigPoint = null;\n }\n }\n\n setupInitialsCanvas() {\n if (!this.initialsElement) {\n return;\n }\n\n // Set up drawing context when in draw mode\n if (this.mode === 'draw') {\n // Always get fresh context from the current canvas element\n const initialsContext = this.initialsElement.getContext('2d');\n\n // Only initialize if we don't have a context or it's different\n if (initialsContext && initialsContext !== this.initialsDrawingContext) {\n this.initialsDrawingContext = initialsContext;\n\n // Configure drawing style for smooth signatures\n this.initialsDrawingContext.strokeStyle = '#000000';\n this.initialsDrawingContext.lineWidth = 2;\n this.initialsDrawingContext.lineCap = 'round';\n this.initialsDrawingContext.lineJoin = 'round';\n\n // Clear canvas only if there are no existing strokes or restored previews\n if (this.allInitialsStrokes.length === 0 && !this.hasDrawnInitials) {\n this.initialsDrawingContext.clearRect(0, 0, this.initialsElement.width, this.initialsElement.height);\n }\n }\n }\n\n // Reset drawing context when switching away from draw mode\n // NOTE: We don't clear allStrokes here so drawing persists when returning to draw mode\n if (this.mode !== 'draw' && this.initialsDrawingContext) {\n this.initialsDrawingContext = null;\n this.currentInitialsStroke = [];\n this.lastInitialsPoint = null;\n }\n }\n\n clearSignatureCanvas() {\n if (!this.signatureElement || !this.sigDrawingContext) {\n return;\n }\n\n this.sigDrawingContext.clearRect(0, 0, this.signatureElement.width, this.signatureElement.height);\n this.currentSigStroke = [];\n this.allSigStrokes = [];\n this.lastSigPoint = null;\n this.hasDrawnSignature = false;\n }\n\n clearInitialsCanvas() {\n if (!this.initialsElement || !this.initialsDrawingContext) {\n return;\n }\n\n this.initialsDrawingContext.clearRect(0, 0, this.initialsElement.width, this.initialsElement.height);\n this.currentInitialsStroke = [];\n this.allInitialsStrokes = [];\n this.lastInitialsPoint = null;\n this.hasDrawnInitials = false;\n }\n\n handleClearDrawing(e: any, type: 'signature' | 'initials' | 'all' = 'all') {\n e.stopPropagation();\n e.preventDefault();\n if (type === 'all' || type === 'signature') this.clearSignatureCanvas();\n if (type === 'all' || type === 'initials') this.clearInitialsCanvas();\n }\n\n getSigCanvasCoordinates(e: PointerEvent): {x: number; y: number} {\n if (!this.signatureElement) {\n return {x: 0, y: 0};\n }\n\n const rect = this.signatureElement.getBoundingClientRect();\n\n // Calculate the scale factor between canvas size and display size\n const scaleX = this.signatureElement.width / rect.width;\n const scaleY = this.signatureElement.height / rect.height;\n\n return {\n x: (e.clientX - rect.left) * scaleX,\n y: (e.clientY - rect.top) * scaleY,\n };\n }\n\n getInitialsCanvasCoordinates(e: PointerEvent): {x: number; y: number} {\n if (!this.initialsElement) {\n return {x: 0, y: 0};\n }\n\n const rect = this.initialsElement.getBoundingClientRect();\n\n // Calculate the scale factor between canvas size and display size\n const scaleX = this.initialsElement.width / rect.width;\n const scaleY = this.initialsElement.height / rect.height;\n\n return {\n x: (e.clientX - rect.left) * scaleX,\n y: (e.clientY - rect.top) * scaleY,\n };\n }\n\n handleSigPointerDown = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.signatureElement || !this.sigDrawingContext) {\n return;\n }\n\n this.isDrawing = true;\n this.hasDrawnSignature = true;\n\n const point = this.getSigCanvasCoordinates(e);\n this.currentSigStroke = [point];\n this.lastSigPoint = point;\n\n // Start a new path\n this.sigDrawingContext.beginPath();\n this.sigDrawingContext.moveTo(point.x, point.y);\n\n // Capture pointer to ensure we get all events even if pointer leaves canvas\n this.signatureElement.setPointerCapture(e.pointerId);\n };\n\n handleSigPointerMove = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.isDrawing || !this.sigDrawingContext || !this.lastSigPoint) {\n return;\n }\n\n const point = this.getSigCanvasCoordinates(e);\n this.currentSigStroke.push(point);\n\n // Use quadratic curves for smooth drawing\n // The control point is the last point, and we draw to the midpoint\n const midPoint = {\n x: (this.lastSigPoint.x + point.x) / 2,\n y: (this.lastSigPoint.y + point.y) / 2,\n };\n\n this.sigDrawingContext.quadraticCurveTo(this.lastSigPoint.x, this.lastSigPoint.y, midPoint.x, midPoint.y);\n this.sigDrawingContext.stroke();\n\n this.lastSigPoint = point;\n };\n\n handleSigPointerUp = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.isDrawing || !this.sigDrawingContext) {\n return;\n }\n\n // Complete the stroke\n if (this.lastSigPoint && this.currentSigStroke.length > 0) {\n this.sigDrawingContext.lineTo(this.lastSigPoint.x, this.lastSigPoint.y);\n this.sigDrawingContext.stroke();\n }\n\n // Save the completed stroke\n if (this.currentSigStroke.length > 0) {\n this.allSigStrokes.push([...this.currentSigStroke]);\n }\n\n this.isDrawing = false;\n this.currentSigStroke = [];\n this.lastSigPoint = null;\n\n // Release pointer capture\n if (this.signatureElement) {\n this.signatureElement.releasePointerCapture(e.pointerId);\n }\n };\n\n handleSigPointerCancel = (e: PointerEvent) => {\n // Handle cases where drawing is interrupted (e.g., phone call, notification)\n this.isDrawing = false;\n this.currentSigStroke = [];\n this.lastSigPoint = null;\n\n if (this.signatureElement) {\n this.signatureElement.releasePointerCapture(e.pointerId);\n }\n };\n\n handleInitialsPointerDown = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.initialsElement || !this.initialsDrawingContext) {\n return;\n }\n\n this.isDrawing = true;\n this.hasDrawnInitials = true;\n\n const point = this.getInitialsCanvasCoordinates(e);\n this.currentInitialsStroke = [point];\n this.lastInitialsPoint = point;\n\n // Start a new path\n this.initialsDrawingContext.beginPath();\n this.initialsDrawingContext.moveTo(point.x, point.y);\n\n // Capture pointer to ensure we get all events even if pointer leaves canvas\n this.initialsElement.setPointerCapture(e.pointerId);\n };\n\n handleInitialsPointerMove = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.isDrawing || !this.initialsDrawingContext || !this.lastInitialsPoint) {\n return;\n }\n\n const point = this.getInitialsCanvasCoordinates(e);\n this.currentInitialsStroke.push(point);\n\n // Use quadratic curves for smooth drawing\n // The control point is the last point, and we draw to the midpoint\n const midPoint = {\n x: (this.lastInitialsPoint.x + point.x) / 2,\n y: (this.lastInitialsPoint.y + point.y) / 2,\n };\n\n this.initialsDrawingContext.quadraticCurveTo(this.lastInitialsPoint.x, this.lastInitialsPoint.y, midPoint.x, midPoint.y);\n this.initialsDrawingContext.stroke();\n\n this.lastInitialsPoint = point;\n };\n\n handleInitialsPointerUp = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.isDrawing || !this.initialsDrawingContext) {\n return;\n }\n\n // Complete the stroke\n if (this.lastInitialsPoint && this.currentInitialsStroke.length > 0) {\n this.initialsDrawingContext.lineTo(this.lastInitialsPoint.x, this.lastInitialsPoint.y);\n this.initialsDrawingContext.stroke();\n }\n\n // Save the completed stroke\n if (this.currentInitialsStroke.length > 0) {\n this.allInitialsStrokes.push([...this.currentInitialsStroke]);\n }\n\n this.isDrawing = false;\n this.currentInitialsStroke = [];\n this.lastInitialsPoint = null;\n\n // Release pointer capture\n if (this.initialsElement) {\n this.initialsElement.releasePointerCapture(e.pointerId);\n }\n };\n\n handleInitialsPointerCancel = (e: PointerEvent) => {\n // Handle cases where drawing is interrupted (e.g., phone call, notification)\n this.isDrawing = false;\n this.currentInitialsStroke = [];\n this.lastInitialsPoint = null;\n\n if (this.initialsElement) {\n this.initialsElement.releasePointerCapture(e.pointerId);\n }\n };\n\n render() {\n return (\n <verdocs-dialog persistent onExit={() => this.exit.emit()}>\n <div slot=\"heading\" class=\"heading\">\n Adopt Your Signature\n </div>\n\n <div slot=\"content\" class=\"content\">\n <div style={{fontWeight: '300', color: '#242424', fontSize: '13px'}}>Confirm your name, initials, and signature.</div>\n\n <div class={{type: true, active: this.mode === 'type'}}>\n <verdocs-text-input\n label=\"Full Name\"\n value={this.enteredName}\n disabled={this.nameLocked}\n onInput={e => this.handleNameChange(e)}\n onClick={e => e.stopPropagation()}\n />\n {this.nameLocked && <div class=\"name-locked-hint\">Your name has been set by the sender and cannot be changed.</div>}\n </div>\n\n <div style={{fontWeight: '400', color: '#242424', fontSize: '13px'}}>Select a signature style</div>\n\n <div style={{display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px'}}>\n <verdocs-radio-button checked={this.mode === 'type'} value=\"type\" name=\"mode\" onClick={() => this.setMode('type')} />\n <label>Typed with a keyboard</label>\n </div>\n <div style={{display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px'}}>\n <verdocs-radio-button checked={this.mode === 'draw'} value=\"draw\" name=\"mode\" onClick={() => this.setMode('draw')} />\n <label>Drawn with touch, mouse, or stylus</label>\n </div>\n\n <div class=\"preview-header\">\n <div style={{fontSize: '13px', fontWeight: '400'}}>Signature Preview</div>\n {this.mode === 'draw' && (\n <button class=\"clear-button-text\" onClick={e => this.handleClearDrawing(e, 'signature')} disabled={!this.hasDrawnSignature}>\n Clear\n </button>\n )}\n </div>\n <div class=\"canvas-container signature-container\">\n <div class=\"signing-indicator\">\n <div class=\"x-icon\" innerHTML={SignatureXIcon}></div>\n <div class=\"signing-line\"></div>\n </div>\n <canvas\n ref={el => (this.signatureElement = el as HTMLCanvasElement)}\n // width=\"300\"\n height=\"79\"\n class=\"signature-canvas\"\n onPointerDown={this.handleSigPointerDown}\n onPointerMove={this.handleSigPointerMove}\n onPointerUp={this.handleSigPointerUp}\n onPointerCancel={this.handleSigPointerCancel}\n style={{touchAction: 'none', cursor: 'crosshair'}}\n />\n </div>\n\n <div class=\"preview-header\">\n <div style={{fontSize: '13px', fontWeight: '400'}}>Initials Preview</div>\n {this.mode === 'draw' && (\n <button class=\"clear-button-text\" onClick={e => this.handleClearDrawing(e, 'initials')} disabled={!this.hasDrawnInitials}>\n Clear\n </button>\n )}\n </div>\n <div class=\"canvas-container initials-container\">\n <div class=\"signing-indicator\">\n <div class=\"x-icon\" innerHTML={SignatureXIcon}></div>\n <div class=\"signing-line\"></div>\n </div>\n <canvas\n ref={el => (this.initialsElement = el as HTMLCanvasElement)}\n // width=\"300\"\n height=\"79\"\n class=\"initials-canvas\"\n onPointerDown={this.handleInitialsPointerDown}\n onPointerMove={this.handleInitialsPointerMove}\n onPointerUp={this.handleInitialsPointerUp}\n onPointerCancel={this.handleInitialsPointerCancel}\n style={{touchAction: 'none', cursor: 'crosshair'}}\n />\n </div>\n\n <div class=\"disclaimer\">\n By clicking «Adopt Signature», I agree that the signature and initials above will be the electronic representation of my signature and initials for all purposes when I\n use them to sign documents. Applying them to a document is legally equivalent to signing with a pen on paper.\n </div>\n </div>\n\n <div class=\"footer\" slot=\"footer\">\n <div class=\"buttons\">\n <button class=\"cancel\" onClick={e => this.handleCancel(e)}>\n Cancel\n </button>\n <button class=\"proceed\" onClick={e => this.handleAdopt(e)} disabled={this.isAdoptButtonDisabled()}>\n Adopt & Sign\n </button>\n </div>\n </div>\n </verdocs-dialog>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VerdocsAdoptSignatureDialog$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { V as VerdocsAdoptSignatureDialog$1, d as defineCustomElement$1 } from './p-DSzyP6KP.js';
|
|
2
2
|
|
|
3
3
|
const VerdocsAdoptSignatureDialog = VerdocsAdoptSignatureDialog$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -6,7 +6,7 @@ import { D as DocumentPageIcon, C as CheckCircleIcon } from './p-BDv5kBUR.js';
|
|
|
6
6
|
import { V as VerdocsToast } from './p-D97GxsI-.js';
|
|
7
7
|
import { S as SDKError } from './p-C1sRVZWv.js';
|
|
8
8
|
import { S as Store } from './p-C7hFgM52.js';
|
|
9
|
-
import { d as defineCustomElement$q } from './p-
|
|
9
|
+
import { d as defineCustomElement$q } from './p-DSzyP6KP.js';
|
|
10
10
|
import { d as defineCustomElement$p } from './p-C_yyK5xE.js';
|
|
11
11
|
import { d as defineCustomElement$o } from './p-BvV9rOTP.js';
|
|
12
12
|
import { d as defineCustomElement$n } from './p-BzspxU-o.js';
|
|
@@ -102,6 +102,10 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
|
102
102
|
this.agreed = false;
|
|
103
103
|
this.signatureId = null;
|
|
104
104
|
this.initialId = null;
|
|
105
|
+
this.signatureAdoptMode = 'type';
|
|
106
|
+
this.adoptedSignaturePreview = null;
|
|
107
|
+
this.adoptedInitialsPreview = null;
|
|
108
|
+
this.adoptedName = null;
|
|
105
109
|
this.skippedFields = [];
|
|
106
110
|
this.documentsSingularPlural = 'document';
|
|
107
111
|
this.authStep = null;
|
|
@@ -253,6 +257,10 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
|
253
257
|
// to adopt at least once per session so the signing flow is explicit after removing the up-front progress dialog.
|
|
254
258
|
this.signatureId = null;
|
|
255
259
|
this.initialId = null;
|
|
260
|
+
this.signatureAdoptMode = 'type';
|
|
261
|
+
this.adoptedSignaturePreview = null;
|
|
262
|
+
this.adoptedInitialsPreview = null;
|
|
263
|
+
this.adoptedName = null;
|
|
256
264
|
this.submitted = recipient.status === 'submitted';
|
|
257
265
|
this.loading = false;
|
|
258
266
|
this.isDone = this.submitted;
|
|
@@ -423,6 +431,50 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
|
423
431
|
}
|
|
424
432
|
});
|
|
425
433
|
}
|
|
434
|
+
toDataUrl(value) {
|
|
435
|
+
return value.startsWith('data:') ? value : `data:image/png;base64,${value}`;
|
|
436
|
+
}
|
|
437
|
+
getAdoptModeStorageKey(signatureBlockId) {
|
|
438
|
+
return `verdocs-adopt-mode:${signatureBlockId}`;
|
|
439
|
+
}
|
|
440
|
+
getAdoptNameStorageKey(signatureBlockId) {
|
|
441
|
+
return `verdocs-adopt-name:${signatureBlockId}`;
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Restore adopted signature/initial previews and mode from applied fields or session storage.
|
|
445
|
+
* Clearing a field only removes the stamp from that field — the adopted block still exists.
|
|
446
|
+
*/
|
|
447
|
+
hydrateAdoptedSignatureState(triggerField) {
|
|
448
|
+
var _a, _b, _c, _d, _e;
|
|
449
|
+
const fields = this.getRecipientFields();
|
|
450
|
+
const signatureField = (triggerField === null || triggerField === void 0 ? void 0 : triggerField.type) === 'signature'
|
|
451
|
+
? triggerField
|
|
452
|
+
: fields.find(f => { var _a, _b; return f.type === 'signature' && ((_a = f.settings) === null || _a === void 0 ? void 0 : _a.base64) && ((_b = f.settings) === null || _b === void 0 ? void 0 : _b.signature_id); });
|
|
453
|
+
const initialsField = fields.find(f => { var _a, _b; return f.type === 'initial' && ((_a = f.settings) === null || _a === void 0 ? void 0 : _a.base64) && ((_b = f.settings) === null || _b === void 0 ? void 0 : _b.initial_id); });
|
|
454
|
+
if ((_a = signatureField === null || signatureField === void 0 ? void 0 : signatureField.settings) === null || _a === void 0 ? void 0 : _a.base64) {
|
|
455
|
+
this.adoptedSignaturePreview = this.toDataUrl(signatureField.settings.base64);
|
|
456
|
+
}
|
|
457
|
+
if ((_b = initialsField === null || initialsField === void 0 ? void 0 : initialsField.settings) === null || _b === void 0 ? void 0 : _b.base64) {
|
|
458
|
+
this.adoptedInitialsPreview = this.toDataUrl(initialsField.settings.base64);
|
|
459
|
+
}
|
|
460
|
+
if ((_c = signatureField === null || signatureField === void 0 ? void 0 : signatureField.settings) === null || _c === void 0 ? void 0 : _c.signature_id) {
|
|
461
|
+
this.signatureId = signatureField.settings.signature_id;
|
|
462
|
+
}
|
|
463
|
+
if ((_d = initialsField === null || initialsField === void 0 ? void 0 : initialsField.settings) === null || _d === void 0 ? void 0 : _d.initial_id) {
|
|
464
|
+
this.initialId = initialsField.settings.initial_id;
|
|
465
|
+
}
|
|
466
|
+
const modeSourceId = this.signatureId || ((_e = signatureField === null || signatureField === void 0 ? void 0 : signatureField.settings) === null || _e === void 0 ? void 0 : _e.signature_id);
|
|
467
|
+
if (modeSourceId && this.adoptedSignaturePreview) {
|
|
468
|
+
const storedMode = sessionStorage.getItem(this.getAdoptModeStorageKey(modeSourceId));
|
|
469
|
+
if (storedMode === 'draw' || storedMode === 'type') {
|
|
470
|
+
this.signatureAdoptMode = storedMode;
|
|
471
|
+
}
|
|
472
|
+
const storedName = sessionStorage.getItem(this.getAdoptNameStorageKey(modeSourceId));
|
|
473
|
+
if (storedName) {
|
|
474
|
+
this.adoptedName = storedName;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
426
478
|
getStartedKey() {
|
|
427
479
|
var _a;
|
|
428
480
|
return `${this.envelopeId}:${((_a = this.recipient) === null || _a === void 0 ? void 0 : _a.role_name) || ''}`;
|
|
@@ -587,7 +639,6 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
|
587
639
|
}
|
|
588
640
|
if (e.detail === null) {
|
|
589
641
|
console.log('[SIGN] Clearing signature');
|
|
590
|
-
this.signatureId = null;
|
|
591
642
|
const updateResult = await updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, field.name, null, false);
|
|
592
643
|
this.updateRecipientFieldValue(field.name, updateResult);
|
|
593
644
|
if (field.required)
|
|
@@ -599,6 +650,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
|
599
650
|
console.log('[SIGN] Reusing signature', this.signatureId);
|
|
600
651
|
const updateResult = await updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, field.name, this.signatureId, false);
|
|
601
652
|
this.updateRecipientFieldValue(field.name, updateResult);
|
|
653
|
+
this.hydrateAdoptedSignatureState(field);
|
|
602
654
|
this.focusNextFieldAfter(field);
|
|
603
655
|
return;
|
|
604
656
|
}
|
|
@@ -608,6 +660,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
|
608
660
|
const updateResult = await updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, field.name, e.detail, false);
|
|
609
661
|
this.signatureId = e.detail;
|
|
610
662
|
this.updateRecipientFieldValue(field.name, updateResult);
|
|
663
|
+
this.hydrateAdoptedSignatureState(field);
|
|
611
664
|
this.focusNextFieldAfter(field);
|
|
612
665
|
return;
|
|
613
666
|
}
|
|
@@ -965,6 +1018,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
|
965
1018
|
});
|
|
966
1019
|
el.addEventListener('adopt', () => {
|
|
967
1020
|
this.focusedField = field.name;
|
|
1021
|
+
this.hydrateAdoptedSignatureState(field);
|
|
968
1022
|
this.updateAllFlags();
|
|
969
1023
|
this.adoptingSignature = true;
|
|
970
1024
|
});
|
|
@@ -1050,7 +1104,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
|
1050
1104
|
});
|
|
1051
1105
|
}
|
|
1052
1106
|
render() {
|
|
1053
|
-
var _a;
|
|
1107
|
+
var _a, _b, _c, _d;
|
|
1054
1108
|
if (this.showLoadError) {
|
|
1055
1109
|
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: () => {
|
|
1056
1110
|
window.location.reload();
|
|
@@ -1200,18 +1254,26 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
|
1200
1254
|
} })), 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: () => {
|
|
1201
1255
|
this.showDone = false;
|
|
1202
1256
|
this.isDone = true;
|
|
1203
|
-
} })), 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) => {
|
|
1257
|
+
} })), 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) => {
|
|
1204
1258
|
console.log('[SIGN] Adopting signature/initials block', e.detail);
|
|
1205
1259
|
this.showSpinner = true;
|
|
1260
|
+
this.signatureAdoptMode = e.detail.mode;
|
|
1261
|
+
this.adoptedSignaturePreview = e.detail.signature;
|
|
1262
|
+
this.adoptedInitialsPreview = e.detail.initials;
|
|
1263
|
+
this.adoptedName = e.detail.name;
|
|
1206
1264
|
// These arrive as base-64 encoded data URLs
|
|
1207
1265
|
const signatureBlob = await (await fetch(e.detail.signature)).blob();
|
|
1208
1266
|
const initialsBlob = await (await fetch(e.detail.initials)).blob();
|
|
1209
1267
|
const sigResult = await createSignature(this.endpoint, 'signature', signatureBlob);
|
|
1210
1268
|
console.log('[SIGN] Created signature', sigResult);
|
|
1211
1269
|
this.signatureId = sigResult.id;
|
|
1270
|
+
sessionStorage.setItem(this.getAdoptModeStorageKey(sigResult.id), e.detail.mode);
|
|
1271
|
+
sessionStorage.setItem(this.getAdoptNameStorageKey(sigResult.id), e.detail.name);
|
|
1212
1272
|
const initResult = await createInitials(this.endpoint, 'initial', initialsBlob);
|
|
1213
1273
|
console.log('[SIGN] Created initials', initResult);
|
|
1214
1274
|
this.initialId = initResult.id;
|
|
1275
|
+
sessionStorage.setItem(this.getAdoptModeStorageKey(initResult.id), e.detail.mode);
|
|
1276
|
+
sessionStorage.setItem(this.getAdoptNameStorageKey(initResult.id), e.detail.name);
|
|
1215
1277
|
this.showSpinner = false;
|
|
1216
1278
|
this.adoptingSignature = false;
|
|
1217
1279
|
this.markEnvelopeStarted();
|
|
@@ -1325,6 +1387,10 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
|
1325
1387
|
"agreed": [32],
|
|
1326
1388
|
"signatureId": [32],
|
|
1327
1389
|
"initialId": [32],
|
|
1390
|
+
"signatureAdoptMode": [32],
|
|
1391
|
+
"adoptedSignaturePreview": [32],
|
|
1392
|
+
"adoptedInitialsPreview": [32],
|
|
1393
|
+
"adoptedName": [32],
|
|
1328
1394
|
"skippedFields": [32],
|
|
1329
1395
|
"documentsSingularPlural": [32],
|
|
1330
1396
|
"authStep": [32],
|