@verdocs/web-sdk 6.5.0-beta.2 → 6.5.0-beta.3
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/{utils-4rWXSNpE.js → utils-LPO6l9nR.js} +2 -3
- package/dist/{components/p-Btmt1DxH.js.map → cjs/utils-LPO6l9nR.js.map} +1 -1
- package/dist/cjs/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-signing-progress.verdocs-view.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-adopt-signature-dialog_7.cjs.entry.js +11 -10
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +39 -2
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_7.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +76 -17
- package/dist/cjs/verdocs-sign.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +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 +11 -10
- 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.css +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +77 -17
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +38 -1
- package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js +39 -1
- package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js.map +1 -1
- package/dist/collection/utils/utils.js +0 -1
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/{p-kbW0me2Y.js → p-0lrmfxFN.js} +3 -3
- package/dist/components/{p-kbW0me2Y.js.map → p-0lrmfxFN.js.map} +1 -1
- package/dist/components/{p-Btmt1DxH.js → p-B3TbYvlU.js} +2 -3
- package/dist/components/p-B3TbYvlU.js.map +1 -0
- package/dist/components/{p-0p8NaKpS.js → p-B9DM7wD0.js} +23 -3
- package/dist/components/p-B9DM7wD0.js.map +1 -0
- package/dist/components/{p-C5xpynM2.js → p-BXwiCpEb.js} +3 -3
- package/dist/components/{p-C5xpynM2.js.map → p-BXwiCpEb.js.map} +1 -1
- package/dist/components/{p-QjwQw9ZJ.js → p-C7xRBNX9.js} +3 -3
- package/dist/components/{p-QjwQw9ZJ.js.map → p-C7xRBNX9.js.map} +1 -1
- package/dist/components/{p-DqqO4T0y.js → p-DCXdeiPc.js} +13 -12
- package/dist/components/p-DCXdeiPc.js.map +1 -0
- package/dist/components/{p-C1KzzI_w.js → p-DNGq3wZS.js} +3 -3
- package/dist/components/{p-C1KzzI_w.js.map → p-DNGq3wZS.js.map} +1 -1
- package/dist/components/{p-Z1wZ6-IT.js → p-DZv79sQs.js} +5 -5
- package/dist/components/{p-Z1wZ6-IT.js.map → p-DZv79sQs.js.map} +1 -1
- package/dist/components/{p-BToCx2ri.js → p-Dl45UNf-.js} +22 -3
- package/dist/components/p-Dl45UNf-.js.map +1 -0
- package/dist/components/{p-Dr4C7GlH.js → p-DzLB0MYu.js} +6 -6
- package/dist/components/{p-Dr4C7GlH.js.map → p-DzLB0MYu.js.map} +1 -1
- package/dist/components/{p-IcDkT207.js → p-INlr_V_p.js} +5 -5
- package/dist/components/{p-IcDkT207.js.map → p-INlr_V_p.js.map} +1 -1
- package/dist/components/{p-_CWDgKqX.js → p-rWeRsA_5.js} +3 -3
- package/dist/components/{p-_CWDgKqX.js.map → p-rWeRsA_5.js.map} +1 -1
- package/dist/components/verdocs-adopt-signature-dialog.js +1 -1
- package/dist/components/verdocs-build.js +7 -7
- package/dist/components/verdocs-contact-picker.js +1 -1
- package/dist/components/verdocs-envelope-document-page.js +1 -1
- package/dist/components/verdocs-envelopes-list.js +2 -2
- package/dist/components/verdocs-field-initial.js +1 -1
- package/dist/components/verdocs-field-signature.js +1 -1
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-quick-filter.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-sign.js +82 -22
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-template-document-page.js +1 -1
- package/dist/components/verdocs-template-fields.js +1 -1
- package/dist/components/verdocs-templates-list.js +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/custom-elements.json +2422 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-NHDsmnv8.js → utils-UeubfAI_.js} +2 -3
- package/dist/{esm-es5/utils-NHDsmnv8.js.map → esm/utils-UeubfAI_.js.map} +1 -1
- package/dist/esm/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-signing-progress.verdocs-view.entry.js.map +1 -1
- package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js +11 -10
- package/dist/esm/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page_3.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-attachment_13.entry.js +39 -2
- package/dist/esm/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_7.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +76 -17
- package/dist/esm/verdocs-sign.entry.js.map +1 -1
- package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-NHDsmnv8.js → utils-UeubfAI_.js} +2 -2
- package/dist/{esm/utils-NHDsmnv8.js.map → esm-es5/utils-UeubfAI_.js.map} +1 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-signing-progress.verdocs-view.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js +1 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_13.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_7.entry.js +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-template-document-page_2.entry.js +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 +1 -0
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +3 -2
- package/dist/types/components/fields/verdocs-field-initial/verdocs-field-initial.d.ts +5 -0
- package/dist/types/components/fields/verdocs-field-signature/verdocs-field-signature.d.ts +5 -0
- package/dist/types/components.d.ts +16 -0
- package/dist/verdocs-web-sdk/p-0029decb.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-0029decb.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-2439e530.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-2439e530.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-7e580691.entry.js → p-2898f573.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-94e4d921.system.entry.js → p-2ecec6ed.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-2adc75a7.system.entry.js → p-415fa16f.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-0c567c7d.entry.js → p-464ef358.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-fe64576a.system.entry.js → p-46991fe7.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-9a7a9d7b.system.entry.js → p-4a19fbe3.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-0b57c1ef.system.entry.js → p-605b48fa.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-64d8ea72.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-64d8ea72.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-64e896e9.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-64e896e9.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-0709e936.system.entry.js → p-78e8e398.system.entry.js} +3 -3
- package/dist/verdocs-web-sdk/p-99ba5e3b.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-99ba5e3b.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-303ed47f.entry.js → p-9cdc0980.entry.js} +3 -3
- package/dist/verdocs-web-sdk/{p-BRVQ3Epx.system.js.map → p-B0XOGp0Z.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-BU5y2rcs.system.js → p-BAU98X36.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-BU5y2rcs.system.js.map → p-BAU98X36.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-BgTW-H9_.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-CAlOUHPb.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-nK4J4UFK.js → p-CmnR51jO.js} +2 -2
- package/dist/verdocs-web-sdk/{p-nK4J4UFK.js.map → p-CmnR51jO.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-CogJ52UV.system.js.map → p-D-LZAEE-.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-Dj3cajbH.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-B_fwtKg3.system.js.map → p-O_JBau3u.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-B8lqLcUJ.system.js.map → p-XPySISfx.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-831ff4eb.entry.js → p-ab8ba727.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-d06e0bce.entry.js → p-ae75565d.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-acc245e6.entry.js → p-d5fc15ee.entry.js} +3 -3
- package/dist/verdocs-web-sdk/p-db5c9ec4.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-db5c9ec4.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-CyjSP4tG.system.js.map → p-k2jmkyZp.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-C9hmmFhm.system.js.map → p-xFl_XV91.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-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 +2 -2
- package/dist/cjs/utils-4rWXSNpE.js.map +0 -1
- package/dist/components/p-0p8NaKpS.js.map +0 -1
- package/dist/components/p-BToCx2ri.js.map +0 -1
- package/dist/components/p-DqqO4T0y.js.map +0 -1
- package/dist/verdocs-web-sdk/p-0dfacde9.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-0dfacde9.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-3c45dd79.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-3c45dd79.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-8ad09d97.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-8ad09d97.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-BcrrIlhF.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-DZW111-z.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-c676d027.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-c676d027.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-dc1eaf38.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-dc1eaf38.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-fef8b6b5.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-fef8b6b5.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-gCoMHihf.system.js.map +0 -1
- /package/dist/verdocs-web-sdk/{p-7e580691.entry.js.map → p-2898f573.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-94e4d921.system.entry.js.map → p-2ecec6ed.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-2adc75a7.system.entry.js.map → p-415fa16f.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-0c567c7d.entry.js.map → p-464ef358.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-fe64576a.system.entry.js.map → p-46991fe7.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-9a7a9d7b.system.entry.js.map → p-4a19fbe3.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-0b57c1ef.system.entry.js.map → p-605b48fa.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-0709e936.system.entry.js.map → p-78e8e398.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-303ed47f.entry.js.map → p-9cdc0980.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-831ff4eb.entry.js.map → p-ab8ba727.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-d06e0bce.entry.js.map → p-ae75565d.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-acc245e6.entry.js.map → p-d5fc15ee.entry.js.map} +0 -0
|
@@ -159,10 +159,7 @@ const VerdocsAdoptSignatureDialog = class {
|
|
|
159
159
|
}
|
|
160
160
|
componentWillLoad() {
|
|
161
161
|
this.enteredName = this.name;
|
|
162
|
-
this.
|
|
163
|
-
.split(' ')
|
|
164
|
-
.map(word => word.charAt(0).toUpperCase())
|
|
165
|
-
.join('');
|
|
162
|
+
this.computeEnteredInitials(this.name);
|
|
166
163
|
const ds = new FontFace('Dancing Script', 'url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)');
|
|
167
164
|
ds.load().then(font => {
|
|
168
165
|
document.fonts.add(font);
|
|
@@ -202,7 +199,7 @@ const VerdocsAdoptSignatureDialog = class {
|
|
|
202
199
|
fontSize -= 2;
|
|
203
200
|
sigContext.font = `${fontSize}px Dancing Script`;
|
|
204
201
|
metrics = sigContext.measureText(this.enteredName);
|
|
205
|
-
} while (metrics.width > sigCanvasWidth -
|
|
202
|
+
} while (metrics.width > sigCanvasWidth - 24 || metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent + 24 > sigCanvasHeight);
|
|
206
203
|
sigContext.textAlign = 'center';
|
|
207
204
|
sigContext.textBaseline = 'middle';
|
|
208
205
|
sigContext.font = `${fontSize}px Dancing Script`;
|
|
@@ -222,7 +219,7 @@ const VerdocsAdoptSignatureDialog = class {
|
|
|
222
219
|
fontSize -= 2;
|
|
223
220
|
context.font = `${fontSize}px Dancing Script`;
|
|
224
221
|
metrics = context.measureText(this.enteredInitials);
|
|
225
|
-
} while (metrics.width > initialsCanvasWidth -
|
|
222
|
+
} while (metrics.width > initialsCanvasWidth - 24 || metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent + 24 > initialsCanvasHeight);
|
|
226
223
|
context.textAlign = 'center';
|
|
227
224
|
context.textBaseline = 'middle';
|
|
228
225
|
context.font = `${fontSize}px Dancing Script`;
|
|
@@ -296,10 +293,14 @@ const VerdocsAdoptSignatureDialog = class {
|
|
|
296
293
|
}
|
|
297
294
|
handleNameChange(e) {
|
|
298
295
|
this.enteredName = e.target.value;
|
|
299
|
-
this.
|
|
296
|
+
this.computeEnteredInitials(e.target.value);
|
|
297
|
+
}
|
|
298
|
+
computeEnteredInitials(name) {
|
|
299
|
+
const nameComponents = name
|
|
300
|
+
.trim()
|
|
300
301
|
.split(' ')
|
|
301
|
-
.
|
|
302
|
-
|
|
302
|
+
.filter(part => part.length > 0);
|
|
303
|
+
this.enteredInitials = nameComponents.length > 1 ? nameComponents.map(word => word.charAt(0).toUpperCase()).join('') : nameComponents[0].toUpperCase();
|
|
303
304
|
}
|
|
304
305
|
handleCancel(e) {
|
|
305
306
|
e.stopPropagation();
|
|
@@ -438,7 +439,7 @@ const VerdocsAdoptSignatureDialog = class {
|
|
|
438
439
|
};
|
|
439
440
|
}
|
|
440
441
|
render() {
|
|
441
|
-
return (h("verdocs-dialog", { key: '
|
|
442
|
+
return (h("verdocs-dialog", { key: 'cd7e4e12870c3e5c6e3ecae99ca18a2e517cc5d7' }, h("div", { key: 'e0361f91ecde016a44a9df467989e59b9c7dac78', slot: "heading", class: "heading" }, "Adopt Your Signature"), h("div", { key: '871467dcc778eea921fc9f7c43a6f4f00020a716', slot: "content", class: "content" }, h("div", { key: 'bfa75ff9630b434b3498dd4b5858a48f4c5d34b1', style: { fontWeight: '300', color: '#242424', fontSize: '13px' } }, "Confirm your name, initials, and signature."), h("div", { key: '1c35c5deb3062f9d15c12601fcfdf1b2c141cf40', class: { type: true, active: this.mode === 'type' } }, h("verdocs-text-input", { key: '52ab06b5039e3b01bb778380282a2f9209ce2c09', label: "Full Name", value: this.enteredName, onInput: e => this.handleNameChange(e), onClick: e => e.stopPropagation() })), h("div", { key: '2ca4dd8dbf1a15f37fc1d746d660601ba0e7744a', style: { fontWeight: '400', color: '#242424', fontSize: '13px' } }, "Select a signature style"), h("div", { key: '028510ba0e54e67d8c0e0580b2c39ad741be66b3', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, h("verdocs-radio-button", { key: 'aae39fd918af8f4d3c6938507d8acfca0a50cad7', checked: this.mode === 'type', value: "type", name: "mode", onClick: () => (this.mode = 'type') }), h("label", { key: '3ef1416e35982cb0741aba43f531373235688cb8' }, "Typed with a keyboard")), h("div", { key: '1b858ad50908df8f52cd46257fa62d5f6238b46a', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, h("verdocs-radio-button", { key: 'b28fd02ddba1e50d95e71daebadcbe4692cc07bf', checked: this.mode === 'draw', value: "draw", name: "mode", onClick: () => (this.mode = 'draw') }), h("label", { key: 'f1ec506edace3f839be3e60a833a7078388511c6' }, "Drawn with touch, mouse, or stylus")), h("div", { key: '7ba7b888718f4d36cb6c3dff4766c7d4a4aa8588', class: "draw-actions" }, h("button", { key: '5aa570c6bd0a7919df717f57cd126ce693901614', class: "clear-button", onClick: e => this.handleClearDrawing(e), disabled: !this.hasDrawnSignature }, "Clear")), h("div", { key: 'da02332f59f07b62abd19d424ee2026594614681', style: { fontSize: '13px', fontWeight: '400', marginTop: '8px' } }, "Signature Preview"), h("canvas", { key: 'f06947bf19e21ca9d55242616ff6203f1511f035', ref: el => (this.signatureElement = el), width: "300", height: "79", onPointerDown: this.handleSigPointerDown, onPointerMove: this.handleSigPointerMove, onPointerUp: this.handleSigPointerUp, onPointerCancel: this.handleSigPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } }), h("div", { key: 'e4253e4a1b0ae0ae2dbe12cbf5044ea19a55ffd1', style: { fontSize: '13px', fontWeight: '400', marginTop: '8px' } }, "Initials Preview"), h("canvas", { key: 'b5ffe09caca8e36d3b7645baaa9c49ac534ae2ab', ref: el => (this.initialsElement = el), width: "300", height: "79", onPointerDown: this.handleInitialsPointerDown, onPointerMove: this.handleInitialsPointerMove, onPointerUp: this.handleInitialsPointerUp, onPointerCancel: this.handleInitialsPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } }), h("div", { key: '2794cb9a0e09956c421436bf7d07b7ff5b05b877', 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: 'c162a5d0fb4e827097d386be1598f5687a1f0f9d', class: "footer", slot: "footer" }, h("div", { key: '784cabdfd41901b0082ed995f8da6f9d929d5bd6', class: "buttons" }, h("button", { key: 'e7a853d282ca868c6ad8f16c32a5295b91ad0027', class: "cancel", onClick: e => this.handleCancel(e) }, "Cancel"), h("button", { key: '5db215d9fbca44bd0b8b864cb34b9e9cb89e7cef', class: "proceed", onClick: e => this.handleAdopt(e), disabled: this.isAdoptButtonDisabled() }, "Adopt & Sign")))));
|
|
442
443
|
}
|
|
443
444
|
};
|
|
444
445
|
VerdocsAdoptSignatureDialog.style = verdocsAdoptSignatureDialogCss;
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, F as Fragment } from './ind
|
|
|
2
2
|
import { VerdocsEndpoint, formatFullName, getActiveEntitlements, isValidEmail } from '@verdocs/js-sdk';
|
|
3
3
|
import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-BFTU3MAI.js';
|
|
4
4
|
import { B as BETA_ORIGINS } from './Environment-C_Xku1v2.js';
|
|
5
|
-
import { f as convertToE164 } from './utils-
|
|
5
|
+
import { f as convertToE164 } from './utils-UeubfAI_.js';
|
|
6
6
|
import './index-dzBXqXlK.js';
|
|
7
7
|
import './Types-dqxNbm_b.js';
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-BIRwgFLv.js';
|
|
2
2
|
import { VerdocsEndpoint, getEnvelopeDocumentPageDisplayUri, getEnvelope } from '@verdocs/js-sdk';
|
|
3
|
-
import { t as throttle } from './utils-
|
|
3
|
+
import { t as throttle } from './utils-UeubfAI_.js';
|
|
4
4
|
import { S as SDKError } from './errors-C1sRVZWv.js';
|
|
5
5
|
import { S as Store } from './Datastore-DmsV595e.js';
|
|
6
6
|
import './index-dzBXqXlK.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-BIRwgFLv.js';
|
|
2
2
|
import { VerdocsEndpoint, getEnvelopes, integerSequence, getRecipientsWithActions, userCanCancelEnvelope, userCanAct, formatFullName, cancelEnvelope } from '@verdocs/js-sdk';
|
|
3
|
-
import { s as saveEnvelopesAsZip } from './utils-
|
|
3
|
+
import { s as saveEnvelopesAsZip } from './utils-UeubfAI_.js';
|
|
4
4
|
import { V as VerdocsToast } from './Toast-CyvDgtoV.js';
|
|
5
5
|
import { S as SDKError } from './errors-C1sRVZWv.js';
|
|
6
6
|
import './index-dzBXqXlK.js';
|
|
@@ -651,7 +651,25 @@ const VerdocsFieldInitial = class {
|
|
|
651
651
|
if (done) {
|
|
652
652
|
return h(Host, { class: { done } }, value && h("img", { src: value, alt: "Initial" }));
|
|
653
653
|
}
|
|
654
|
-
return (h(Host, { class: { required, disabled, done, focused, filled: !!base64, [signerClass]: true } }, editable && h("div", { class: "edge-right" }), editable && h("div", { class: "edge-left" }), editable && h("div", { class: "edge-top" }), editable && h("div", { class: "edge-bottom" }), label && h("label", null, label), base64 ? h("img", { src: base64, alt: "Initial"
|
|
654
|
+
return (h(Host, { class: { required, disabled, done, focused, filled: !!base64, [signerClass]: true } }, editable && h("div", { class: "edge-right" }), editable && h("div", { class: "edge-left" }), editable && h("div", { class: "edge-top" }), editable && h("div", { class: "edge-bottom" }), label && h("label", null, label), base64 ? (h("img", { src: base64, alt: "Initial", onClick: () => {
|
|
655
|
+
var _a;
|
|
656
|
+
if (disabled)
|
|
657
|
+
return;
|
|
658
|
+
console.log('[INITIAL] Clearing initials');
|
|
659
|
+
(_a = this.fieldChange) === null || _a === void 0 ? void 0 : _a.emit(null);
|
|
660
|
+
} })) : (h("button", { onClick: () => {
|
|
661
|
+
var _a;
|
|
662
|
+
if (disabled)
|
|
663
|
+
return;
|
|
664
|
+
// If we already have an initial ID, use it immediately
|
|
665
|
+
if (this.initialid) {
|
|
666
|
+
console.log('[INITIAL] Reusing existing initials', this.initialid);
|
|
667
|
+
(_a = this.fieldChange) === null || _a === void 0 ? void 0 : _a.emit(this.initialid);
|
|
668
|
+
}
|
|
669
|
+
else {
|
|
670
|
+
this.handleShow();
|
|
671
|
+
}
|
|
672
|
+
} }, "Initial")), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
|
655
673
|
e.stopPropagation();
|
|
656
674
|
this.showingProperties = !this.showingProperties;
|
|
657
675
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${fieldname}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: sourceid, fieldName: fieldname, onClose: () => (this.showingProperties = false), onDelete: () => {
|
|
@@ -954,7 +972,26 @@ const VerdocsFieldSignature = class {
|
|
|
954
972
|
if (done) {
|
|
955
973
|
return h(Host, { class: { done } }, value && h("img", { src: base64, alt: "" }));
|
|
956
974
|
}
|
|
957
|
-
|
|
975
|
+
console.log('sid', this.signatureid);
|
|
976
|
+
return (h(Host, { class: { required, disabled, done, focused, filled: !!base64, [signerClass]: true } }, editable && h("div", { class: "edge-right" }), editable && h("div", { class: "edge-left" }), editable && h("div", { class: "edge-top" }), editable && h("div", { class: "edge-bottom" }), label && h("label", null, label), base64 ? (h("img", { src: base64, alt: "", onClick: () => {
|
|
977
|
+
var _a;
|
|
978
|
+
if (disabled)
|
|
979
|
+
return;
|
|
980
|
+
console.log('[SIGNATURE] Clearing signature');
|
|
981
|
+
(_a = this.fieldChange) === null || _a === void 0 ? void 0 : _a.emit(null);
|
|
982
|
+
} })) : (h("button", { onClick: () => {
|
|
983
|
+
var _a;
|
|
984
|
+
if (disabled)
|
|
985
|
+
return;
|
|
986
|
+
// If we already have a signature ID, use it immediately
|
|
987
|
+
if (this.signatureid) {
|
|
988
|
+
console.log('[SIGNATURE] Reusing existing signature', this.signatureid);
|
|
989
|
+
(_a = this.fieldChange) === null || _a === void 0 ? void 0 : _a.emit(this.signatureid);
|
|
990
|
+
}
|
|
991
|
+
else {
|
|
992
|
+
this.handleShow();
|
|
993
|
+
}
|
|
994
|
+
} }, "Signature")), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
|
958
995
|
e.stopPropagation();
|
|
959
996
|
this.showingProperties = !this.showingProperties;
|
|
960
997
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${fieldname}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: sourceid, fieldName: fieldname, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-BIRwgFLv.js';
|
|
2
2
|
import { integerSequence } from '@verdocs/js-sdk';
|
|
3
|
-
import { c as renderedTextWidth } from './utils-
|
|
3
|
+
import { c as renderedTextWidth } from './utils-UeubfAI_.js';
|
|
4
4
|
import { c as createPopper } from './popper-BfP9ezJQ.js';
|
|
5
5
|
import './index-dzBXqXlK.js';
|
|
6
6
|
import './Types-dqxNbm_b.js';
|
|
@@ -7,7 +7,7 @@ import { V as VerdocsToast } from './Toast-CyvDgtoV.js';
|
|
|
7
7
|
import { D as DocIcon, P as PngIcon, J as JpgIcon, a as PdfIcon, F as FileIcon, b as PageCountIcon, T as TrashIcon } from './Icons-7LXbcjVz.js';
|
|
8
8
|
import { d as dateFnsExports } from './index-dzBXqXlK.js';
|
|
9
9
|
import { i as interact } from './interact.min-BepJAdBZ.js';
|
|
10
|
-
import { g as getFieldId, h as updateCssTransform, i as removeCssTransform, j as setControlStyles, d as defaultHeight, k as defaultWidth } from './utils-
|
|
10
|
+
import { g as getFieldId, h as updateCssTransform, i as removeCssTransform, j as setControlStyles, d as defaultHeight, k as defaultWidth } from './utils-UeubfAI_.js';
|
|
11
11
|
import './_commonjsHelpers-BFTU3MAI.js';
|
|
12
12
|
import './Types-dqxNbm_b.js';
|
|
13
13
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment } from './index-BIRwgFLv.js';
|
|
2
2
|
import { VerdocsEndpoint, DEFAULT_DISCLOSURES, startSigningSession, envelopeRecipientAgree, updateEnvelopeField, createSignature, createInitials, sortFields, envelopeRecipientSubmit, isFieldFilled, isFieldValid, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, formatFullName, fullNameToInitials, verifySigner, delegateRecipient, envelopeRecipientDecline, askQuestion, integerSequence } from '@verdocs/js-sdk';
|
|
3
|
-
import { a as saveAttachment, u as updateDocumentFieldValue, g as getFieldId, r as renderDocumentFlag, b as renderDocumentField, d as defaultHeight } from './utils-
|
|
3
|
+
import { a as saveAttachment, u as updateDocumentFieldValue, g as getFieldId, r as renderDocumentFlag, b as renderDocumentField, d as defaultHeight } from './utils-UeubfAI_.js';
|
|
4
4
|
import { V as VerdocsToast } from './Toast-CyvDgtoV.js';
|
|
5
5
|
import { S as SDKError } from './errors-C1sRVZWv.js';
|
|
6
6
|
import { S as Store } from './Datastore-DmsV595e.js';
|
|
7
7
|
import './index-dzBXqXlK.js';
|
|
8
8
|
import './Types-dqxNbm_b.js';
|
|
9
9
|
|
|
10
|
-
const verdocsSignCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;
|
|
10
|
+
const verdocsSignCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;min-height:700px;position:relative;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#f5f5f5;font-family:var(--verdocs-primary-font, \"Inter\", \"Barlow\", sans-serif)}verdocs-sign verdocs-button>button.standard{background:#2a63f6}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;padding-right:140px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}verdocs-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);margin-top:15px}verdocs-sign .fatal-error .message{max-width:360px;width:50%;font-size:16px;background:white;-webkit-box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235);box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235)}verdocs-sign .fatal-error .header{color:white;font-size:18px;font-weight:500;padding:5px 10px;margin:0 0 10px 0;background:#4c56cb}verdocs-sign .fatal-error p{margin:1rem;font-size:14px;font-weight:400;padding:0 10px}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}";
|
|
11
11
|
|
|
12
12
|
const VerdocsSign = class {
|
|
13
13
|
constructor(hostRef) {
|
|
@@ -55,11 +55,13 @@ const VerdocsSign = class {
|
|
|
55
55
|
this.submitted = false;
|
|
56
56
|
this.isDone = false;
|
|
57
57
|
this.showDone = false;
|
|
58
|
-
this.
|
|
58
|
+
this.adoptingSignature = false;
|
|
59
59
|
this.showLoadError = false;
|
|
60
60
|
this.finishLater = false;
|
|
61
61
|
this.showFinishLater = false;
|
|
62
62
|
this.agreed = false;
|
|
63
|
+
this.signatureId = null;
|
|
64
|
+
this.initialId = null;
|
|
63
65
|
this.documentsSingularPlural = 'document';
|
|
64
66
|
this.authStep = null;
|
|
65
67
|
this.authMethodStates = {};
|
|
@@ -68,7 +70,6 @@ const VerdocsSign = class {
|
|
|
68
70
|
this.declining = false;
|
|
69
71
|
this.delegating = false;
|
|
70
72
|
this.delegated = false;
|
|
71
|
-
this.startedSigning = false;
|
|
72
73
|
this.kbaChoices = [];
|
|
73
74
|
this.loading = true;
|
|
74
75
|
this.envelope = null;
|
|
@@ -111,7 +112,7 @@ const VerdocsSign = class {
|
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
processAuthResponse(response) {
|
|
114
|
-
var _a, _b, _c;
|
|
115
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
115
116
|
const { envelope, recipient } = response;
|
|
116
117
|
const { auth_step } = recipient;
|
|
117
118
|
this.recipient = recipient;
|
|
@@ -120,6 +121,8 @@ const VerdocsSign = class {
|
|
|
120
121
|
this.authStep = auth_step;
|
|
121
122
|
this.delegated = !!recipient.delegated_to;
|
|
122
123
|
this.agreed = recipient.agreed;
|
|
124
|
+
this.signatureId = ((_d = (_c = response.signatures) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.id) || null;
|
|
125
|
+
this.initialId = ((_f = (_e = response.initials) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.id) || null;
|
|
123
126
|
this.submitted = recipient.status === 'submitted';
|
|
124
127
|
this.loading = false;
|
|
125
128
|
this.isDone = this.submitted;
|
|
@@ -149,7 +152,7 @@ const VerdocsSign = class {
|
|
|
149
152
|
this.nextButtonLabel = 'Next';
|
|
150
153
|
}
|
|
151
154
|
this.checkRecipientFields();
|
|
152
|
-
(
|
|
155
|
+
(_g = this.envelopeLoaded) === null || _g === void 0 ? void 0 : _g.emit({ endpoint: this.endpoint, envelope: this.envelope });
|
|
153
156
|
}
|
|
154
157
|
handleClickAgree() {
|
|
155
158
|
this.submitting = true;
|
|
@@ -261,15 +264,35 @@ const VerdocsSign = class {
|
|
|
261
264
|
// This can be caused by a focus-out event if the user clicks the field
|
|
262
265
|
// after it's already filled in, then clicks something else like a textbox.
|
|
263
266
|
// We don't visually indicate the focus, but it's still there.
|
|
264
|
-
|
|
267
|
+
// NOTE: We now allow null to clear the field
|
|
268
|
+
if (e.detail === undefined) {
|
|
265
269
|
return;
|
|
266
270
|
}
|
|
271
|
+
if (e.detail === null) {
|
|
272
|
+
console.log('[SIGN] Clearing initial');
|
|
273
|
+
const updateResult = await updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, field.name, null, false);
|
|
274
|
+
return this.updateRecipientFieldValue(field.name, updateResult);
|
|
275
|
+
}
|
|
276
|
+
// If we already have an initials block, apply it
|
|
277
|
+
if (this.initialId) {
|
|
278
|
+
console.log('[SIGN] Reusing initial', this.initialId);
|
|
279
|
+
const updateResult = await updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, field.name, this.initialId, false);
|
|
280
|
+
return this.updateRecipientFieldValue(field.name, updateResult);
|
|
281
|
+
}
|
|
282
|
+
// If it's a UUID, it's an existing initial ID we can just reuse
|
|
283
|
+
if (typeof e.detail === 'string' && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e.detail)) {
|
|
284
|
+
console.log('[SIGN] Reusing initial', e.detail);
|
|
285
|
+
const updateResult = await updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, field.name, e.detail, false);
|
|
286
|
+
this.initialId = e.detail;
|
|
287
|
+
return this.updateRecipientFieldValue(field.name, updateResult);
|
|
288
|
+
}
|
|
267
289
|
this.showSpinner = true;
|
|
268
290
|
const initialsBlob = await (await fetch(e.detail)).blob();
|
|
269
291
|
return createInitials(this.endpoint, 'initial', initialsBlob) //
|
|
270
292
|
.then(async (newInitials) => {
|
|
271
293
|
const updateResult = await updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, field.name, newInitials.id, false);
|
|
272
294
|
this.updateRecipientFieldValue(field.name, updateResult);
|
|
295
|
+
this.initialId = newInitials.id;
|
|
273
296
|
this.showSpinner = false;
|
|
274
297
|
})
|
|
275
298
|
.catch(e => {
|
|
@@ -281,16 +304,37 @@ const VerdocsSign = class {
|
|
|
281
304
|
// This can be caused by a focus-out event if the user clicks the field
|
|
282
305
|
// after it's already filled in, then clicks something else like a textbox.
|
|
283
306
|
// We don't visually indicate the focus, but it's still there.
|
|
284
|
-
|
|
307
|
+
// NOTE: We now allow null to clear the field
|
|
308
|
+
if (e.detail === undefined) {
|
|
285
309
|
return;
|
|
286
310
|
}
|
|
311
|
+
if (e.detail === null) {
|
|
312
|
+
console.log('[SIGN] Clearing signature');
|
|
313
|
+
const updateResult = await updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, field.name, null, false);
|
|
314
|
+
return this.updateRecipientFieldValue(field.name, updateResult);
|
|
315
|
+
}
|
|
316
|
+
// If we already have a signature block, apply it
|
|
317
|
+
if (this.signatureId) {
|
|
318
|
+
console.log('[SIGN] Reusing signature', this.signatureId);
|
|
319
|
+
const updateResult = await updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, field.name, this.signatureId, false);
|
|
320
|
+
return this.updateRecipientFieldValue(field.name, updateResult);
|
|
321
|
+
}
|
|
322
|
+
// If it's a UUID, it's an existing signature ID we can just reuse
|
|
323
|
+
if (typeof e.detail === 'string' && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e.detail)) {
|
|
324
|
+
console.log('[SIGN] Reusing signature', e.detail);
|
|
325
|
+
const updateResult = await updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, field.name, e.detail, false);
|
|
326
|
+
this.signatureId = e.detail;
|
|
327
|
+
return this.updateRecipientFieldValue(field.name, updateResult);
|
|
328
|
+
}
|
|
287
329
|
this.showSpinner = true;
|
|
288
330
|
const signatureBlob = await (await fetch(e.detail)).blob();
|
|
331
|
+
console.log('[SIGN] Creating new signature');
|
|
289
332
|
return createSignature(this.endpoint, 'signature', signatureBlob) //
|
|
290
333
|
.then(async (newSignature) => {
|
|
291
334
|
console.log('Signature update result', newSignature);
|
|
292
335
|
const updateResult = await updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, field.name, newSignature.id, false);
|
|
293
336
|
this.updateRecipientFieldValue(field.name, updateResult);
|
|
337
|
+
this.signatureId = newSignature.id;
|
|
294
338
|
this.showSpinner = false;
|
|
295
339
|
})
|
|
296
340
|
.catch(e => {
|
|
@@ -502,7 +546,6 @@ const VerdocsSign = class {
|
|
|
502
546
|
showSkip = true;
|
|
503
547
|
}
|
|
504
548
|
}
|
|
505
|
-
console.log('[SIGN] Render flag', winner.name, winner.y, winner.height);
|
|
506
549
|
renderDocumentFlag(pageInfo, winner.y, winner.height || defaultHeight(winner.type), {
|
|
507
550
|
variant,
|
|
508
551
|
label,
|
|
@@ -596,6 +639,12 @@ const VerdocsSign = class {
|
|
|
596
639
|
const fullName = formatFullName(this.recipient);
|
|
597
640
|
el.setAttribute('initials', fullNameToInitials(fullName));
|
|
598
641
|
el.setAttribute('name', fullName);
|
|
642
|
+
if (this.signatureId) {
|
|
643
|
+
el.setAttribute('signatureid', this.signatureId);
|
|
644
|
+
}
|
|
645
|
+
if (this.initialId) {
|
|
646
|
+
el.setAttribute('initialid', this.initialId);
|
|
647
|
+
}
|
|
599
648
|
}
|
|
600
649
|
handlePageRendered(e) {
|
|
601
650
|
const pageInfo = e.detail;
|
|
@@ -772,9 +821,9 @@ const VerdocsSign = class {
|
|
|
772
821
|
: console.log('[SIGN] All field valid');
|
|
773
822
|
return (h(Host, null, h("div", { id: "verdocs-sign-header" }, h("div", { class: "inner" }, h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), h("div", { class: "title" }, this.envelope.name), h("div", { style: { flex: '1' } }), !this.finishLater && h("verdocs-button", { size: "xsmall", label: this.nextButtonLabel, disabled: !this.agreed || this.submitting, onClick: () => this.handleNext() }), h("div", { style: { marginLeft: '10px' } }), h("verdocs-dropdown", { options: !this.isDone && !this.finishLater ? inProgressMenuOptions : doneMenuOptions, onOptionSelected: e => this.handleOptionSelected(e) }))), (() => {
|
|
774
823
|
const focusedFieldObj = this.getSortedFillableFields().find(f => f.name === this.focusedField);
|
|
775
|
-
return (h("verdocs-signing-progress", { mode: this.nextSubmits ? 'completed' :
|
|
776
|
-
this.
|
|
777
|
-
this.handleNext();
|
|
824
|
+
return (h("verdocs-signing-progress", { mode: this.nextSubmits ? 'completed' : 'start', current: Math.max(1, this.getSortedFillableFields().findIndex(f => f.name === this.focusedField) + 1), total: this.getSortedFillableFields().length, fieldLabel: (focusedFieldObj === null || focusedFieldObj === void 0 ? void 0 : focusedFieldObj.label) || (focusedFieldObj === null || focusedFieldObj === void 0 ? void 0 : focusedFieldObj.name) || '', fieldCompleted: focusedFieldObj ? !!isFieldFilled(focusedFieldObj, this.getRecipientFields()) : false, onStarted: () => {
|
|
825
|
+
this.adoptingSignature = true;
|
|
826
|
+
// this.handleNext();
|
|
778
827
|
}, onNext: () => this.handleNext(), onPrevious: () => this.handlePrev(), onExit: () => this.handleNext() }));
|
|
779
828
|
})(), h("div", { class: "document", style: { width: '64%', marginLeft: '260px' } }, (this.envelope.documents || []).map(envelopeDocument => {
|
|
780
829
|
const pageNumbers = integerSequence(1, envelopeDocument.pages);
|
|
@@ -799,11 +848,21 @@ const VerdocsSign = class {
|
|
|
799
848
|
} })), 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 document and envelope certificate attached.`, onNext: () => {
|
|
800
849
|
this.showDone = false;
|
|
801
850
|
this.isDone = true;
|
|
802
|
-
} })), this.
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
851
|
+
} })), this.adoptingSignature && (h("verdocs-adopt-signature-dialog", { name: formatFullName(this.recipient), onNext: async (e) => {
|
|
852
|
+
console.log('[SIGN] Adopting signature/initials block', e.detail);
|
|
853
|
+
this.showSpinner = true;
|
|
854
|
+
// These arrive as base-64 encoded data URLs
|
|
855
|
+
const signatureBlob = await (await fetch(e.detail.signature)).blob();
|
|
856
|
+
const initialsBlob = await (await fetch(e.detail.initials)).blob();
|
|
857
|
+
const sigResult = await createSignature(this.endpoint, 'signature', signatureBlob);
|
|
858
|
+
console.log('[SIGN] Created signature', sigResult);
|
|
859
|
+
this.signatureId = sigResult.id;
|
|
860
|
+
const initResult = await createInitials(this.endpoint, 'initial', initialsBlob);
|
|
861
|
+
console.log('[SIGN] Created initials', initResult);
|
|
862
|
+
this.initialId = initResult.id;
|
|
863
|
+
this.showSpinner = false;
|
|
864
|
+
this.adoptingSignature = false;
|
|
865
|
+
}, onExit: () => (this.adoptingSignature = false) })), (this.submitting || this.showSpinner) && (h("verdocs-portal", null, h("div", { class: "spinner-overlay" }, h("verdocs-spinner", null)))), !this.loading && !this.isDone && (h("verdocs-sign-footer", { endpoint: this.endpoint, envelopeId: this.envelopeId, isDone: this.isDone, onAskQuestion: (e) => {
|
|
807
866
|
askQuestion(this.endpoint, this.envelopeId, this.roleId, { question: e.detail.question })
|
|
808
867
|
.then(() => VerdocsToast('Your question has been sent.', { style: 'success' }))
|
|
809
868
|
.catch(e => {
|