@verdocs/web-sdk 1.9.25 → 1.9.30
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/{Envelopes-a9646e09.js → Envelopes-5c4569c8.js} +12 -3
- package/dist/cjs/Envelopes-5c4569c8.js.map +1 -0
- package/dist/cjs/{Templates-805e8ffa.js → Templates-7d9dda98.js} +2 -2
- package/dist/cjs/{Templates-805e8ffa.js.map → Templates-7d9dda98.js.map} +1 -1
- package/dist/cjs/{VerdocsEndpoint-a9bf9d59.js → VerdocsEndpoint-257ebdb3.js} +7 -5
- package/dist/cjs/VerdocsEndpoint-257ebdb3.js.map +1 -0
- package/dist/cjs/index-1329d89c.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{templateStore-a1ccccdb.js → templateStore-0d394f32.js} +2 -2
- package/dist/cjs/{templateStore-a1ccccdb.js.map → templateStore-0d394f32.js.map} +1 -1
- package/dist/cjs/{utils-aa1285cc.js → utils-0666fb5d.js} +13 -1
- package/dist/cjs/utils-0666fb5d.js.map +1 -0
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-document-page_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-document-page_2.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +155 -0
- package/dist/cjs/verdocs-dropdown_2.cjs.entry.js.map +1 -0
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-field-date.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-date.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-field-initial.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-field-signature_3.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-field-signature_3.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-preview.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js +71 -33
- package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-template-create_4.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.css +1 -0
- package/dist/collection/components/elements/verdocs-document-page/verdocs-document-page.js +1 -1
- package/dist/collection/components/elements/verdocs-document-page/verdocs-document-page.js.map +1 -1
- package/dist/collection/components/elements/verdocs-field-checkbox/verdocs-field-checkbox.css +1 -1
- package/dist/collection/components/elements/verdocs-field-date/verdocs-field-date.css +903 -0
- package/dist/collection/components/elements/verdocs-field-initial/verdocs-field-initial.js +3 -3
- package/dist/collection/components/elements/verdocs-field-initial/verdocs-field-initial.js.map +1 -1
- package/dist/collection/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.css +3 -0
- package/dist/collection/components/elements/verdocs-field-signature/verdocs-field-signature.js +3 -3
- package/dist/collection/components/elements/verdocs-field-signature/verdocs-field-signature.js.map +1 -1
- package/dist/collection/components/elements/verdocs-field-textbox/verdocs-field-textbox.css +1 -0
- package/dist/collection/components/elements/verdocs-field-timestamp/verdocs-field-timestamp.css +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +68 -31
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js +3 -2
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +2 -170
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js.map +1 -1
- package/dist/collection/utils/Envelopes.js +9 -1
- package/dist/collection/utils/Envelopes.js.map +1 -1
- package/dist/collection/utils/envelopeStore.js +1 -0
- package/dist/collection/utils/envelopeStore.js.map +1 -1
- package/dist/collection/utils/utils.js +11 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/VerdocsEndpoint.js +6 -4
- package/dist/components/VerdocsEndpoint.js.map +1 -1
- package/dist/components/templateStore.js +1 -1
- package/dist/components/utils.js +12 -1
- package/dist/components/utils.js.map +1 -1
- package/dist/components/verdocs-document-page2.js +1 -1
- package/dist/components/verdocs-document-page2.js.map +1 -1
- package/dist/components/verdocs-field-checkbox.js +1 -1
- package/dist/components/verdocs-field-checkbox.js.map +1 -1
- package/dist/components/verdocs-field-date.js +1 -1
- package/dist/components/verdocs-field-date.js.map +1 -1
- package/dist/components/verdocs-field-initial.js +3 -3
- package/dist/components/verdocs-field-initial.js.map +1 -1
- package/dist/components/verdocs-field-radio-button.js +1 -1
- package/dist/components/verdocs-field-radio-button.js.map +1 -1
- package/dist/components/verdocs-field-signature2.js +3 -3
- package/dist/components/verdocs-field-signature2.js.map +1 -1
- package/dist/components/verdocs-field-textbox.js +1 -1
- package/dist/components/verdocs-field-textbox.js.map +1 -1
- package/dist/components/verdocs-field-timestamp.js +1 -1
- package/dist/components/verdocs-field-timestamp.js.map +1 -1
- package/dist/components/verdocs-ok-dialog2.js +1 -1
- package/dist/components/verdocs-ok-dialog2.js.map +1 -1
- package/dist/components/verdocs-sign.js +86 -44
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-template-fields2.js +1 -1
- package/dist/components/verdocs-view.js +1 -259
- package/dist/components/verdocs-view.js.map +1 -1
- package/dist/components/verdocs-view2.js +160 -0
- package/dist/components/verdocs-view2.js.map +1 -0
- package/dist/docs.json +14 -3
- package/dist/esm/{Envelopes-bd915f3e.js → Envelopes-b87b1909.js} +12 -3
- package/dist/esm/Envelopes-b87b1909.js.map +1 -0
- package/dist/esm/{Templates-653648bb.js → Templates-452173e6.js} +2 -2
- package/dist/esm/{Templates-653648bb.js.map → Templates-452173e6.js.map} +1 -1
- package/dist/esm/{VerdocsEndpoint-76dbf9b9.js → VerdocsEndpoint-28ba21cc.js} +7 -5
- package/dist/esm/VerdocsEndpoint-28ba21cc.js.map +1 -0
- package/dist/esm/index-f78d163d.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{templateStore-8585145f.js → templateStore-d6995852.js} +2 -2
- package/dist/esm/{templateStore-8585145f.js.map → templateStore-d6995852.js.map} +1 -1
- package/dist/esm/{utils-c666adcf.js → utils-5cddd371.js} +13 -2
- package/dist/esm/utils-5cddd371.js.map +1 -0
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +4 -4
- package/dist/esm/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm/verdocs-document-page_2.entry.js +1 -1
- package/dist/esm/verdocs-document-page_2.entry.js.map +1 -1
- package/dist/esm/verdocs-dropdown_2.entry.js +150 -0
- package/dist/esm/verdocs-dropdown_2.entry.js.map +1 -0
- package/dist/esm/verdocs-field-checkbox.entry.js +2 -2
- package/dist/esm/verdocs-field-checkbox.entry.js.map +1 -1
- package/dist/esm/verdocs-field-date.entry.js +2 -2
- package/dist/esm/verdocs-field-date.entry.js.map +1 -1
- package/dist/esm/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm/verdocs-field-initial.entry.js +4 -4
- package/dist/esm/verdocs-field-initial.entry.js.map +1 -1
- package/dist/esm/verdocs-field-payment.entry.js +1 -1
- package/dist/esm/verdocs-field-radio-button.entry.js +2 -2
- package/dist/esm/verdocs-field-radio-button.entry.js.map +1 -1
- package/dist/esm/verdocs-field-signature_3.entry.js +4 -4
- package/dist/esm/verdocs-field-signature_3.entry.js.map +1 -1
- package/dist/esm/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm/verdocs-field-textbox.entry.js +3 -3
- package/dist/esm/verdocs-field-textbox.entry.js.map +1 -1
- package/dist/esm/verdocs-field-timestamp.entry.js +2 -2
- package/dist/esm/verdocs-field-timestamp.entry.js.map +1 -1
- package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm/verdocs-ok-dialog.entry.js.map +1 -1
- package/dist/esm/verdocs-preview.entry.js +4 -4
- package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-send.entry.js +2 -2
- package/dist/esm/verdocs-sign.entry.js +71 -33
- package/dist/esm/verdocs-sign.entry.js.map +1 -1
- package/dist/esm/verdocs-template-create_4.entry.js +4 -4
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/Envelopes-b87b1909.js +2 -0
- package/dist/esm-es5/Envelopes-b87b1909.js.map +1 -0
- package/dist/esm-es5/{Templates-653648bb.js → Templates-452173e6.js} +2 -2
- package/dist/esm-es5/{Templates-653648bb.js.map → Templates-452173e6.js.map} +0 -0
- package/dist/esm-es5/{VerdocsEndpoint-76dbf9b9.js → VerdocsEndpoint-28ba21cc.js} +2 -2
- package/dist/esm-es5/{VerdocsEndpoint-76dbf9b9.js.map → VerdocsEndpoint-28ba21cc.js.map} +1 -1
- package/dist/esm-es5/index-f78d163d.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/{templateStore-8585145f.js → templateStore-d6995852.js} +2 -2
- package/dist/esm-es5/{templateStore-8585145f.js.map → templateStore-d6995852.js.map} +0 -0
- package/dist/esm-es5/utils-5cddd371.js +2 -0
- package/dist/esm-es5/utils-5cddd371.js.map +1 -0
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-document-page_2.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-dropdown_2.entry.js +2 -0
- package/dist/esm-es5/verdocs-dropdown_2.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-checkbox.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-field-signature_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature_3.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.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-create_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js.map +1 -1
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -0
- package/dist/types/components/embeds/verdocs-view/verdocs-view.d.ts +0 -1
- package/dist/types/utils/envelopeStore.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/verdocs-web-sdk/{p-6524809d.entry.js → p-0105b271.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6524809d.entry.js.map → p-0105b271.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-5b7a5deb.js → p-01a88d6f.js} +2 -2
- package/dist/verdocs-web-sdk/{p-5b7a5deb.js.map → p-01a88d6f.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-06652374.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-06652374.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-d86dc6d1.system.entry.js → p-0e5b8a3c.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-d86dc6d1.system.entry.js.map → p-0e5b8a3c.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-7421e32e.entry.js → p-1c035886.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-1c035886.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-08110f98.entry.js → p-1d96d8e2.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-08110f98.entry.js.map → p-1d96d8e2.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-2557ce63.system.entry.js → p-1ee79c76.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-2557ce63.system.entry.js.map → p-1ee79c76.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-93ada77f.system.entry.js → p-1f18d214.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-93ada77f.system.entry.js.map → p-1f18d214.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-8251b9eb.entry.js → p-23e0d562.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-8251b9eb.entry.js.map → p-23e0d562.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-19435eaf.entry.js → p-26409bd3.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-19435eaf.entry.js.map → p-26409bd3.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-2c00bfe5.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-2c00bfe5.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-92e526a0.system.entry.js → p-2ce6d16e.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-2ce6d16e.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-9e5fcf92.system.entry.js → p-30e6ba76.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-9e5fcf92.system.entry.js.map → p-30e6ba76.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-75f6a179.system.entry.js → p-3397509c.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-75f6a179.system.entry.js.map → p-3397509c.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-41758626.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-41758626.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-4363499a.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-4363499a.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-4a6d038d.js +2 -0
- package/dist/verdocs-web-sdk/p-4a6d038d.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-474155b8.system.entry.js → p-4b5c0516.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-474155b8.system.entry.js.map → p-4b5c0516.system.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-075025ab.system.js → p-4dfd765a.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-075025ab.system.js.map → p-4dfd765a.system.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-61e0f6dd.system.entry.js → p-529b7da3.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-61e0f6dd.system.entry.js.map → p-529b7da3.system.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-f7a56f6c.entry.js → p-534f0a97.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-534f0a97.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-a0259b33.system.entry.js → p-5597170d.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-a0259b33.system.entry.js.map → p-5597170d.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-71de4718.entry.js → p-577d46e3.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-71de4718.entry.js.map → p-577d46e3.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-584d8151.js +2 -0
- package/dist/verdocs-web-sdk/{p-a51bb6bf.js.map → p-584d8151.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-1fc3f986.system.entry.js → p-58e850fe.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-58e850fe.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-1f1127dd.js → p-5e67c42f.js} +2 -2
- package/dist/verdocs-web-sdk/{p-1f1127dd.js.map → p-5e67c42f.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-da9f0046.system.entry.js → p-5fd49bc3.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-da9f0046.system.entry.js.map → p-5fd49bc3.system.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-27f3e394.entry.js → p-619a388e.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-27f3e394.entry.js.map → p-619a388e.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-625b1c62.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-625b1c62.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-fcc3041d.js → p-72984b2f.js} +2 -2
- package/dist/verdocs-web-sdk/p-72984b2f.js.map +1 -0
- package/dist/verdocs-web-sdk/p-74401f2e.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-74401f2e.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-cf1ed6b8.system.js → p-7a6c829f.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-cf1ed6b8.system.js.map → p-7a6c829f.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-4f3b1c7c.entry.js → p-822f510f.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-4f3b1c7c.entry.js.map → p-822f510f.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-a9413269.entry.js → p-87a424a0.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-a9413269.entry.js.map → p-87a424a0.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-38d5bc9e.entry.js → p-8917f698.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-38d5bc9e.entry.js.map → p-8917f698.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-a6781789.system.entry.js → p-8945bf3c.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-a6781789.system.entry.js.map → p-8945bf3c.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-8ba71030.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-8ba71030.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-0126c601.entry.js → p-8d5a6ec9.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-0126c601.entry.js.map → p-8d5a6ec9.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-95518265.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-95518265.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-97329951.system.js.map +1 -1
- package/dist/verdocs-web-sdk/{p-78f5c8ad.system.js → p-9ff3e906.system.js} +2 -2
- package/dist/verdocs-web-sdk/p-9ff3e906.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-958a833f.entry.js → p-a2702bfa.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-958a833f.entry.js.map → p-a2702bfa.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-a3fff56c.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-a3fff56c.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-d2c1dcf9.system.entry.js → p-a42a5853.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-d2c1dcf9.system.entry.js.map → p-a42a5853.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-d9b9a354.system.entry.js → p-ba6c3671.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-d9b9a354.system.entry.js.map → p-ba6c3671.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
- package/dist/verdocs-web-sdk/p-c16b6ca4.system.js.map +1 -1
- package/dist/verdocs-web-sdk/p-c7a4ccd5.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-c7a4ccd5.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-d0d56c55.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-d0d56c55.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-d5af4c62.entry.js → p-d93d1b8d.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-d5af4c62.entry.js.map → p-d93d1b8d.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-dcd4f1c9.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-dcd4f1c9.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-decfd8b1.system.js +2 -0
- package/dist/verdocs-web-sdk/p-decfd8b1.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-d4afe7a5.entry.js → p-dfd06a67.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-d4afe7a5.entry.js.map → p-dfd06a67.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-7937a240.system.entry.js → p-eb74df9e.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-7937a240.system.entry.js.map → p-eb74df9e.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-f4193d8f.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-f4193d8f.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-a526fa66.system.entry.js → p-f4451ad4.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-a526fa66.system.entry.js.map → p-f4451ad4.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-2bc68d06.system.js → p-fcedb50f.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-2bc68d06.system.js.map → p-fcedb50f.system.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-ff1278ed.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/dist/cjs/Envelopes-a9646e09.js.map +0 -1
- package/dist/cjs/VerdocsEndpoint-a9bf9d59.js.map +0 -1
- package/dist/cjs/utils-aa1285cc.js.map +0 -1
- package/dist/cjs/verdocs-dropdown.cjs.entry.js +0 -91
- package/dist/cjs/verdocs-dropdown.cjs.entry.js.map +0 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +0 -239
- package/dist/cjs/verdocs-view.cjs.entry.js.map +0 -1
- package/dist/components/Envelopes.js +0 -62
- package/dist/components/Envelopes.js.map +0 -1
- package/dist/esm/Envelopes-bd915f3e.js.map +0 -1
- package/dist/esm/VerdocsEndpoint-76dbf9b9.js.map +0 -1
- package/dist/esm/utils-c666adcf.js.map +0 -1
- package/dist/esm/verdocs-dropdown.entry.js +0 -87
- package/dist/esm/verdocs-dropdown.entry.js.map +0 -1
- package/dist/esm/verdocs-view.entry.js +0 -235
- package/dist/esm/verdocs-view.entry.js.map +0 -1
- package/dist/esm-es5/Envelopes-bd915f3e.js +0 -2
- package/dist/esm-es5/Envelopes-bd915f3e.js.map +0 -1
- package/dist/esm-es5/utils-c666adcf.js +0 -2
- package/dist/esm-es5/utils-c666adcf.js.map +0 -1
- package/dist/esm-es5/verdocs-dropdown.entry.js +0 -2
- package/dist/esm-es5/verdocs-dropdown.entry.js.map +0 -1
- package/dist/esm-es5/verdocs-view.entry.js +0 -2
- package/dist/esm-es5/verdocs-view.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-05433ef8.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-05433ef8.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-0a92a141.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-0a92a141.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-1fc3f986.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-3622cb3c.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-3622cb3c.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-4e1fc08d.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-4e1fc08d.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-4e775928.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-4e775928.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-7421e32e.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-78f5c8ad.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-7e140c6b.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-7e140c6b.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-89641895.system.js +0 -2
- package/dist/verdocs-web-sdk/p-89641895.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-92e526a0.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-a51bb6bf.js +0 -2
- package/dist/verdocs-web-sdk/p-be67bcbf.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-be67bcbf.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-c314c231.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-c314c231.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-c7a22e57.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-c7a22e57.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-d5c00a37.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-d5c00a37.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-d774ad24.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-d774ad24.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-d942510c.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-d942510c.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-dbb4398c.js +0 -2
- package/dist/verdocs-web-sdk/p-dbb4398c.js.map +0 -1
- package/dist/verdocs-web-sdk/p-e3811c48.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-e3811c48.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-e7295a17.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-e7295a17.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-f7a56f6c.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-fa25cd77.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-fa25cd77.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-fcc3041d.js.map +0 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment } from './index-f78d163d.js';
|
|
2
|
-
import { b as getSigningSession, s as savePDF, u as
|
|
2
|
+
import { b as getSigningSession, s as savePDF, u as updateDocumentFieldValue, c as updateEnvelopeField, d as updateEnvelopeFieldSignature, e as updateEnvelopeFieldInitials, f as fullNameToInitials, a as getRoleIndex, r as renderDocumentField, h as getFieldId } from './utils-5cddd371.js';
|
|
3
3
|
import './Types-ab9f6af8.js';
|
|
4
4
|
import { a as isValidPhone, i as isValidEmail } from './Validators-f110bae2.js';
|
|
5
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
|
6
|
-
import { g as getEnvelopeById, s as state } from './Envelopes-
|
|
5
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-28ba21cc.js';
|
|
6
|
+
import { g as getEnvelopeById, s as state } from './Envelopes-b87b1909.js';
|
|
7
7
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
8
8
|
import './Token-54690789.js';
|
|
9
9
|
import './index-fd7b8a34.js';
|
|
10
|
+
import './Templates-0638b1e4.js';
|
|
10
11
|
|
|
11
12
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
13
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -155,22 +156,23 @@ const VerdocsSign = class {
|
|
|
155
156
|
});
|
|
156
157
|
console.log(`[SIGN] Loaded signing session ${session.email} / ${session.profile_id}`);
|
|
157
158
|
this.recipient = recipient;
|
|
159
|
+
console.log('[SIGN] We are recipient', this.recipient);
|
|
158
160
|
this.signerToken = signerToken;
|
|
159
161
|
this.endpoint.setToken(signerToken);
|
|
160
162
|
if (this.recipient.agreed) {
|
|
161
163
|
this.nextButtonLabel = 'Next';
|
|
162
164
|
}
|
|
163
165
|
await getEnvelopeById(this.endpoint, this.envelopeId);
|
|
164
|
-
// const envelope = await Envelopes.getEnvelope(this.endpoint, this.envelopeId);
|
|
165
|
-
// this.envelope = envelope;
|
|
166
|
-
// console.log('[SIGN] Loaded envelope', envelope);
|
|
167
166
|
this.recipientIndex = state.envelope.recipients.findIndex(recipient => recipient.role_name == this.roleId);
|
|
168
167
|
if (this.recipientIndex > -1) {
|
|
169
168
|
this.recipient = state.envelope.recipients[this.recipientIndex];
|
|
170
169
|
this.fields = this.recipient.fields;
|
|
170
|
+
console.log('[SIGN] Found our recipient in the envelope', this.recipientIndex, this.recipient, this.fields);
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
console.log('[SIGN] Could not find our recipient record', this.roleId, state.envelope.recipients);
|
|
171
174
|
}
|
|
172
175
|
this.isDone = ['submitted', 'canceled', 'declined'].includes(this.recipient.status);
|
|
173
|
-
console.log('Done', this.isDone);
|
|
174
176
|
// TODO: Fix service to allow this?
|
|
175
177
|
// const sigs = await getSignatures();
|
|
176
178
|
// console.log('sigs', sigs);
|
|
@@ -222,8 +224,21 @@ const VerdocsSign = class {
|
|
|
222
224
|
break;
|
|
223
225
|
}
|
|
224
226
|
}
|
|
227
|
+
updateRecipientFieldValue(fieldName, updateResult) {
|
|
228
|
+
this.recipient.fields.forEach(oldField => {
|
|
229
|
+
if (oldField.name === fieldName) {
|
|
230
|
+
console.log('New settings', fieldName, updateResult.settings);
|
|
231
|
+
oldField.settings = updateResult.settings;
|
|
232
|
+
// TODO: When we break out other fields like value, update them here too
|
|
233
|
+
updateDocumentFieldValue(oldField);
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
}
|
|
225
237
|
saveFieldChange(fieldName, fields) {
|
|
226
238
|
updateEnvelopeField(this.endpoint, this.envelopeId, fieldName, fields) //
|
|
239
|
+
.then(updateResult => {
|
|
240
|
+
this.updateRecipientFieldValue(fieldName, updateResult);
|
|
241
|
+
})
|
|
227
242
|
.catch(e => {
|
|
228
243
|
var _a, _b, _c, _d, _e, _f;
|
|
229
244
|
if (((_a = e.response) === null || _a === void 0 ? void 0 : _a.status) === 401 && ((_c = (_b = e.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.error) === 'jwt expired') {
|
|
@@ -255,16 +270,16 @@ const VerdocsSign = class {
|
|
|
255
270
|
case 'initial':
|
|
256
271
|
const initialsBlob = await (await fetch(e.detail)).blob();
|
|
257
272
|
return createInitials(this.endpoint, 'initial', initialsBlob) //
|
|
258
|
-
.then(newInitials => {
|
|
259
|
-
|
|
260
|
-
|
|
273
|
+
.then(async (newInitials) => {
|
|
274
|
+
const updateResult = await updateEnvelopeFieldInitials(this.endpoint, this.envelopeId, field.name, newInitials.id);
|
|
275
|
+
this.updateRecipientFieldValue(field.name, updateResult);
|
|
261
276
|
});
|
|
262
277
|
case 'signature':
|
|
263
278
|
const signatureBlob = await (await fetch(e.detail)).blob();
|
|
264
279
|
return createSignature(this.endpoint, 'signature', signatureBlob) //
|
|
265
|
-
.then(newSignature => {
|
|
266
|
-
|
|
267
|
-
|
|
280
|
+
.then(async (newSignature) => {
|
|
281
|
+
const updateResult = await updateEnvelopeFieldSignature(this.endpoint, this.envelopeId, field.name, newSignature.id);
|
|
282
|
+
this.updateRecipientFieldValue(field.name, updateResult);
|
|
268
283
|
});
|
|
269
284
|
case 'date':
|
|
270
285
|
const iso = e.target.getAttribute('iso');
|
|
@@ -293,6 +308,7 @@ const VerdocsSign = class {
|
|
|
293
308
|
}
|
|
294
309
|
case 'signature':
|
|
295
310
|
case 'initial':
|
|
311
|
+
console.log('Evaluating initial field', field);
|
|
296
312
|
return !required || base64 !== '';
|
|
297
313
|
// Timestamp fields get automatically filled when the envelope is submitted.
|
|
298
314
|
case 'timestamp':
|
|
@@ -325,19 +341,11 @@ const VerdocsSign = class {
|
|
|
325
341
|
console.log('[SIGN] Submitted successfully', result);
|
|
326
342
|
this.showDone = true;
|
|
327
343
|
this.isDone = true;
|
|
328
|
-
// updateRecipientStatus()
|
|
329
344
|
}
|
|
330
345
|
catch (e) {
|
|
331
346
|
console.log('Error submitting', e);
|
|
332
347
|
}
|
|
333
348
|
return;
|
|
334
|
-
// You're done.
|
|
335
|
-
// You can access the Verdoc at any time by clicking on the link from invitation email.
|
|
336
|
-
//
|
|
337
|
-
// After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.
|
|
338
|
-
//
|
|
339
|
-
// Thank you for using Verdocs.
|
|
340
|
-
// Got it, thanks
|
|
341
349
|
}
|
|
342
350
|
// Find and focus the next incomplete required field
|
|
343
351
|
const requiredFields = this.fields.filter(field => field.required);
|
|
@@ -376,12 +384,14 @@ const VerdocsSign = class {
|
|
|
376
384
|
}
|
|
377
385
|
else {
|
|
378
386
|
console.log('[SIGN] Remaining invalid fields', invalidFields);
|
|
387
|
+
this.nextButtonLabel = 'Next';
|
|
379
388
|
this.nextSubmits = false;
|
|
380
389
|
}
|
|
381
390
|
}
|
|
382
391
|
attachFieldAttributes(pageInfo, field, roleIndex, el) {
|
|
383
392
|
var _a;
|
|
384
393
|
el.addEventListener('input', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));
|
|
394
|
+
el.addEventListener('blur', () => this.checkRecipientFields());
|
|
385
395
|
el.addEventListener('fieldChange', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));
|
|
386
396
|
el.setAttribute('roleindex', roleIndex);
|
|
387
397
|
el.setAttribute('xScale', pageInfo.xScale);
|
|
@@ -433,19 +443,34 @@ const VerdocsSign = class {
|
|
|
433
443
|
// Render fields for "the other" recipients
|
|
434
444
|
state.envelope.recipients
|
|
435
445
|
.filter(recipient => recipient.role_name !== this.recipient.role_name)
|
|
436
|
-
.
|
|
446
|
+
.forEach(otherRecipient => {
|
|
437
447
|
const otherRoleIndex = getRoleIndex(state.roleNames, otherRecipient.role_name);
|
|
438
448
|
const recipientFields = otherRecipient.fields.filter(field => field.page === pageInfo.pageNumber);
|
|
439
|
-
//
|
|
449
|
+
// We don't render other recipients' fields if they've already acted, because those values are now stamped into the document page.
|
|
450
|
+
// TODO: Do we want to render alternate treatments for recipients who have declined (red boxes?) and/or if the envelope is cancelled?
|
|
451
|
+
// TODO: When doing server-side rendering we probably want to "stamp" values into the rendered PDF only once the recipient is done
|
|
452
|
+
// acting. Do this once vSign is in Production.
|
|
453
|
+
// TODO: Changed tacks here. During signing we show the template PDFs and everybody's fields, filled in or no. When done, we switch
|
|
454
|
+
// to showing the envelope PDFs with stamped-in values. Confirm this is a good approach.
|
|
455
|
+
// if (!['submitted', 'signed'].includes(otherRecipient.status)) {
|
|
440
456
|
recipientFields.forEach(field => {
|
|
441
|
-
const el = renderDocumentField(field, pageInfo, otherRoleIndex, {
|
|
457
|
+
const el = renderDocumentField(field, pageInfo, otherRoleIndex, {
|
|
458
|
+
disabled: true,
|
|
459
|
+
editable: false,
|
|
460
|
+
draggable: false,
|
|
461
|
+
done: this.isDone,
|
|
462
|
+
});
|
|
442
463
|
if (!el) {
|
|
443
464
|
return;
|
|
444
465
|
}
|
|
445
|
-
el.setAttribute
|
|
446
|
-
el.setAttribute
|
|
447
|
-
|
|
466
|
+
// TODO: Research why this occurs. There are cases when we're getting "el.setAttribute is not a function"
|
|
467
|
+
if (el.setAttribute) {
|
|
468
|
+
el.setAttribute('roleindex', otherRoleIndex);
|
|
469
|
+
el.setAttribute('xScale', pageInfo.xScale);
|
|
470
|
+
el.setAttribute('yScale', pageInfo.yScale);
|
|
471
|
+
}
|
|
448
472
|
});
|
|
473
|
+
// }
|
|
449
474
|
});
|
|
450
475
|
this.checkRecipientFields();
|
|
451
476
|
}
|
|
@@ -461,14 +486,27 @@ const VerdocsSign = class {
|
|
|
461
486
|
{ id: 'print', label: 'Print Without Signing', disabled: true },
|
|
462
487
|
{ id: 'download', label: 'Download' },
|
|
463
488
|
];
|
|
464
|
-
return (h(Host, { class: { agreed: (_a = this.recipient) === null || _a === void 0 ? void 0 : _a.agreed } }, !this.isDone && !this.finishLater && h("div", { class: "intro" }, "Please review and act on these documents."), h("div", { class: "header" }, !this.isDone && !this.finishLater && h("verdocs-dropdown", { options: menuOptions, onOptionSelected: e => this.handleOptionSelected(e) }), !((_b = this.recipient) === null || _b === void 0 ? void 0 : _b.agreed) ? (h("div", { class: "agree" }, h("verdocs-checkbox", { name: "agree", label: "I agree to use electronic records and signatures.", onInput: () => this.handleClickAgree() }))) : (h(Fragment, null, h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), h("div", { class: "title" }, state.envelope.name), h("div", { style: { flex: '1' } }), h("div", { innerHTML: PrintIcon, style: { width: '24px', height: '24px', fill: '#
|
|
489
|
+
return (h(Host, { class: { agreed: (_a = this.recipient) === null || _a === void 0 ? void 0 : _a.agreed } }, !this.isDone && !this.finishLater && h("div", { class: "intro" }, "Please review and act on these documents."), !this.isDone && (h("div", { class: "header" }, !this.isDone && !this.finishLater && h("verdocs-dropdown", { options: menuOptions, onOptionSelected: e => this.handleOptionSelected(e) }), !((_b = this.recipient) === null || _b === void 0 ? void 0 : _b.agreed) ? (h("div", { class: "agree" }, h("verdocs-checkbox", { name: "agree", label: "I agree to use electronic records and signatures.", onInput: () => this.handleClickAgree() }))) : (h(Fragment, null, h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), h("div", { class: "title" }, state.envelope.name), h("div", { style: { flex: '1' } }), h("div", { innerHTML: PrintIcon, style: { width: '24px', height: '24px', fill: '#fff', cursor: 'pointer' }, onClick: () => window.print() }), h("div", { innerHTML: DownloadIcon, style: { width: '24px', height: '24px', fill: '#fff', cursor: 'pointer', margin: '0 16px', maginRight: '30px' }, onClick: () => savePDF(this.endpoint, state.envelope, state.envelope.envelope_document_id).catch(() => { }) }))), !this.isDone && !this.finishLater && h("verdocs-button", { size: "small", label: this.nextButtonLabel, disabled: !((_c = this.recipient) === null || _c === void 0 ? void 0 : _c.agreed), onClick: () => this.handleNext() }))), !this.isDone && !((_d = this.recipient) === null || _d === void 0 ? void 0 : _d.agreed) ? h("div", { class: "cover" }) : h("div", { style: { display: 'none' } }), this.isDone ? (
|
|
490
|
+
// <div>test</div>
|
|
491
|
+
h("verdocs-view", { endpoint: this.endpoint, envelopeId: this.envelopeId, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } })) : (h("div", { class: "document" }, (state.envelope.documents || []).map(envelopeDocument => {
|
|
465
492
|
const pages = [...((envelopeDocument === null || envelopeDocument === void 0 ? void 0 : envelopeDocument.pages) || [])];
|
|
466
493
|
pages.sort((a, b) => a.sequence - b.sequence);
|
|
467
|
-
return (h(Fragment, null, pages.map(page =>
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
494
|
+
return (h(Fragment, null, pages.map(page => {
|
|
495
|
+
var _a;
|
|
496
|
+
// In signing mode we show the original template page with all the recipient fields so we can show source formatting and
|
|
497
|
+
// where everything went. This is also a visual indicator when optional fields weren't filled in by previous actors, or
|
|
498
|
+
// future signers still need to act. Once we're "done" we flip to showing the envelope's documents which have the final
|
|
499
|
+
// field vales (so far) stamped into them.
|
|
500
|
+
const templatePage = (_a = state.template) === null || _a === void 0 ? void 0 : _a.pages.find(p => p.sequence === page.sequence);
|
|
501
|
+
// TODO: Confirm that a pure page-number match is good enough to find the matching template page. We need to make sure
|
|
502
|
+
// we either don't reset our page numbers for additional attachments, or add match-on identifiers to work around that.
|
|
503
|
+
// console.log('tp', templatePage, page);
|
|
504
|
+
return (h("verdocs-document-page", { pageImageUri: (templatePage === null || templatePage === void 0 ? void 0 : templatePage.display_uri) || page.display_uri, virtualWidth: 612, virtualHeight: 792, pageNumber: page.sequence, onPageRendered: e => this.handlePageRendered(e), layers: [
|
|
505
|
+
{ name: 'page', type: 'canvas' },
|
|
506
|
+
{ name: 'controls', type: 'div' },
|
|
507
|
+
] }));
|
|
508
|
+
})));
|
|
509
|
+
}))), this.showFinishLater && (h("verdocs-ok-dialog", { heading: "You've saved your document to finish later.", message: "To complete the document, use the link in the original email notification inviting you to review and finish the document.", onNext: () => (this.showFinishLater = false) })), this.errorMessage && h("verdocs-ok-dialog", { heading: "Network Error", message: this.errorMessage, onNext: () => (this.errorMessage = '') }), this.showDone && (h("verdocs-ok-dialog", { heading: "You're Done!", message: "You can access the Verdoc 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: () => (this.showDone = false) }))));
|
|
472
510
|
}
|
|
473
511
|
};
|
|
474
512
|
VerdocsSign.style = verdocsSignCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"verdocs-sign.entry.js","mappings":";;;;;;;;;;AAAA,IAAI,SAAS,GAAG,CAACA,SAAI,IAAIA,SAAI,CAAC,SAAS,KAAK,UAAU,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AACzF,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;AAChH,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;AAC/D,QAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;AACnG,QAAQ,SAAS,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;AACtG,QA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E,IAAI,CAAC,WAAW,EAC9B,YAAY,EAAE,GAAG,EACjB,aAAa,EAAE,GAAG,EAClB,UAAU,EAAE,IAAI,CAAC,QAAQ,EACzB,cAAc,EAAE,CAAC,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAC/C,MAAM,EAAE;UACN,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAC;UAC9B,EAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAC;SAChC,GACD,CACH,CAAC,CACO,EACX;KACH,CAAC,CACE,EAEL,IAAI,CAAC,eAAe,KACnB,yBACE,OAAO,EAAC,6CAA6C,EACrD,OAAO,EAAC,2HAA2H,EACnI,MAAM,EAAE,OAAO,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,GAC5C,CACH,EAEA,IAAI,CAAC,YAAY,IAAI,yBAAmB,OAAO,EAAC,eAAe,EAAC,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,GAAI,EACtI,IAAI,CAAC,QAAQ,KACZ,yBACE,OAAO,EAAC,cAAc,EACtB,OAAO,EAAC,uOAAuO,EAC/O,MAAM,EAAE,OAAO,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,GACrC,CACH,CACI,EACP;GACH;;;;;;","names":["this","Envelopes.getSigningSession","EnvelopeStore","Envelopes.updateEnvelopeField"],"sources":["./node_modules/@verdocs/js-sdk/Envelopes/Recipients.js","./node_modules/@verdocs/js-sdk/Envelopes/Signatures.js","./node_modules/@verdocs/js-sdk/Envelopes/Initials.js","./src/components/embeds/verdocs-sign/verdocs-sign.scss?tag=verdocs-sign","./src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"sourcesContent":["var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n/**\n * Update a recipient's status block\n */\nexport var updateRecipient = function (endpoint, envelopeId, roleName, params) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .put(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(roleName), params)\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Submit an envelope (signing is finished). Note that all fields must be valid/completed for this to succeed.\n */\nexport var envelopeRecipientSubmit = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'submit' });\n};\n/**\n * Decline to complete an envelope (signing will not terminated).\n */\nexport var envelopeRecipientDecline = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'decline' });\n};\n/**\n * Claim / change ownership of an envelope. This is a special-case operation only available in certain workflows.\n */\nexport var envelopeRecipientChangeOwner = function (endpoint, envelopeId, roleName, email, fullName) { return updateRecipient(endpoint, envelopeId, roleName, { action: 'owner_update', email: email, full_name: fullName }); };\n/**\n * Agree to electronic signing.\n */\nexport var envelopeRecipientAgree = function (endpoint, envelopeId, roleName, agreed) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', agreed: agreed });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientUpdateName = function (endpoint, envelopeId, roleName, fullName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', new_full_name: fullName });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientPrepare = function (endpoint, envelopeId, roleName, recipients) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'prepare', recipients: recipients });\n};\nexport var getSignerToken = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"/signer-token\"))\n .then(function (r) { return r.data; });\n};\nexport var getInPersonLink = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"?in_person_link=true\"))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create a signature block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * a signature block to be used for all signature fields in the document. Thus, this is typically called one time to\n * create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field\n * to be \"stamped\" by the user.\n */\nexport var createSignature = function (endpoint, name, signature) {\n var data = new FormData();\n data.append('signature', signature, name);\n return endpoint.api //\n .post(\"/signatures\", data)\n .then(function (r) { return r.data; });\n};\n/**\n * Get the availbable signatures for a user.\n */\nexport var getSignatures = function (endpoint) {\n return endpoint.api //\n .get('/signatures')\n .then(function (r) { return r.data; });\n};\n/**\n * Get a user's signature by ID.\n */\nexport var getSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .get(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n/**\n * Delete a user's signature.\n */\nexport var deleteSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .delete(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create an initials block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * an initials block to be used for all initials fields in the document. Thus, this is typically called one time to\n * create and store an initials block. Thereafter, the ID of the initials block may be re-used for each initials field\n * to be \"stamped\" by the user.\n */\nexport var createInitials = function (endpoint, name, initials) {\n var data = new FormData();\n data.append('initial', initials, name);\n return endpoint.api //\n .post(\"/initials\", data)\n .then(function (r) { return r.data; });\n};\n","@import '../../../theme.scss';\n\nverdocs-sign {\n display: flex;\n overflow: hidden;\n position: relative;\n min-height: 600px;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n\n div {\n display: block;\n box-sizing: border-box;\n }\n\n input {\n vertical-align: top;\n }\n\n .header {\n color: #fff;\n display: flex;\n z-index: 1000;\n flex: 0 0 56px;\n padding: 0 15px;\n font-size: 12px;\n align-items: center;\n flex-direction: row;\n transition: all 0.25s;\n background-color: $medium-bg;\n box-shadow: 0 4px 4px 0 rgb(0 0 0 / 24%), 0 0 4px 0 rgb(0 0 0 / 12%);\n\n .logo {\n width: 80px;\n margin: -6px 0 0 10px;\n }\n\n .title {\n padding-left: 16px;\n font-size: 18px;\n font-weight: 500;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n\n .intro {\n width: 100%;\n display: flex;\n flex: 0 0 60px;\n color: #111111;\n padding: 0 15px;\n font-size: 18px;\n font-weight: 500;\n line-height: 28px;\n flex-direction: row;\n background: #ffffff;\n align-items: center;\n }\n\n .cover {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 999;\n position: absolute;\n background: rgba(0, 0, 0, 0.5);\n }\n\n .document {\n flex: 1;\n height: 100%;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n min-height: 200px;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n justify-content: center;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .agree {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0 15px;\n\n .intro {\n display: none;\n }\n\n .header {\n flex: 0 0 56px;\n }\n }\n}\n\n@media print {\n verdocs-sign .header {\n display: none;\n }\n}\n","import {VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Envelopes} from '@verdocs/js-sdk/Envelopes';\nimport {createInitials} from '@verdocs/js-sdk/Envelopes/Initials';\nimport {createSignature} from '@verdocs/js-sdk/Envelopes/Signatures';\nimport {IDocumentField, IEnvelope, IRecipient} from '@verdocs/js-sdk/Envelopes/Types';\nimport {envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit} from '@verdocs/js-sdk/Envelopes/Recipients';\nimport {isValidEmail, isValidPhone} from '@verdocs/js-sdk/Templates/Validators';\nimport {Event, EventEmitter, Host, Fragment, Component, Prop, State, h} from '@stencil/core';\nimport {updateEnvelopeFieldInitials, updateEnvelopeFieldSignature} from '@verdocs/js-sdk/Envelopes/Envelopes';\nimport {fullNameToInitials, getFieldId, getRoleIndex, renderDocumentField, savePDF} from '../../../utils/utils';\nimport {getEnvelopeById} from '../../../utils/Envelopes';\nimport EnvelopeStore from '../../../utils/envelopeStore';\nimport {IDocumentPageInfo} from '../../../utils/Types';\nimport {SDKError} from '../../../utils/errors';\n\nconst PrintIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z\"></path></svg>`;\n\nconst DownloadIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z\"></path></svg>`;\n\n/**\n * Display an envelope signing experience. This will display the envelope's attached\n * documents with signing fields overlaid on each page.\n *\n * The component will attempt to initiate a signing session and load the specified\n * envelope. If successful, the recipient's fields will be enabled and the user will\n * be able to sign the envelope's attached documents. If not, an `sdkError` will be\n * thrown and the component will be blank/empty. To provide the best user experience,\n * applications should capture and handle this error to provide the user with\n * instructions/options for next steps based on the application's design and workflow.\n *\n * Unlike other components, this will always create its own endpoint to manage the\n * session session. This endpoint will be included in event callbacks for the\n * convenience of host applications that may wish to make server calls using the\n * signer's credentials once signing is complete (e.g. to obtain copies of\n * the signed attachments.)\n */\n@Component({\n tag: 'verdocs-sign',\n styleUrl: 'verdocs-sign.scss',\n shadow: false,\n})\nexport class VerdocsSign {\n endpoint: VerdocsEndpoint = null;\n\n /**\n * The ID of the envelope to sign.\n */\n @Prop() envelopeId: string | null = null;\n\n /**\n * The ID of the role that will be signing e.g. 'Recipient 1'\n */\n @Prop() roleId: string | null = null;\n\n /**\n * The invite code for the signer.\n */\n @Prop() inviteCode: string | null = null;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeLoaded: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope}>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() recipient: IRecipient | null = null;\n @State() signerToken = null;\n // @State() envelope: IEnvelope | null = null;\n // @State() fields: IDocumentField[] = [];\n @State() hasSignature = false;\n @State() nextButtonLabel = 'Start';\n @State() nextSubmits = false;\n @State() errorMessage = '';\n @State() focusedField = '';\n @State() isDone = false;\n @State() showDone = false;\n\n @State() finishLater = false;\n @State() showFinishLater = false;\n\n recipientIndex: number = -1;\n fields: IDocumentField[] = [];\n\n componentWillLoad() {\n this.endpoint = new VerdocsEndpoint({sessionType: 'signing'});\n }\n\n async componentDidLoad() {\n if (!this.envelopeId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required envelopId', 500, ''));\n return;\n }\n\n if (!this.roleId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required roleId', 500, ''));\n return;\n }\n\n if (!this.inviteCode) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required inviteCode', 500, ''));\n return;\n }\n\n try {\n console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);\n const {session, recipient, signerToken} = await Envelopes.getSigningSession(this.endpoint, {\n envelopeId: this.envelopeId,\n roleId: this.roleId,\n inviteCode: this.inviteCode,\n });\n\n console.log(`[SIGN] Loaded signing session ${session.email} / ${session.profile_id}`);\n\n this.recipient = recipient;\n this.signerToken = signerToken;\n this.endpoint.setToken(signerToken);\n\n if (this.recipient.agreed) {\n this.nextButtonLabel = 'Next';\n }\n\n await getEnvelopeById(this.endpoint, this.envelopeId);\n // const envelope = await Envelopes.getEnvelope(this.endpoint, this.envelopeId);\n // this.envelope = envelope;\n // console.log('[SIGN] Loaded envelope', envelope);\n\n this.recipientIndex = EnvelopeStore.envelope.recipients.findIndex(recipient => recipient.role_name == this.roleId);\n if (this.recipientIndex > -1) {\n this.recipient = EnvelopeStore.envelope.recipients[this.recipientIndex];\n this.fields = this.recipient.fields;\n }\n\n this.isDone = ['submitted', 'canceled', 'declined'].includes(this.recipient.status);\n console.log('Done', this.isDone);\n\n // TODO: Fix service to allow this?\n // const sigs = await getSignatures();\n // console.log('sigs', sigs);\n\n this.envelopeLoaded?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope});\n } catch (e) {\n console.log('Error with signing session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handleClickAgree() {\n envelopeRecipientAgree(this.endpoint, this.envelopeId, this.roleId, true)\n .then(r => {\n this.nextButtonLabel = 'Next';\n this.recipient = r;\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope, event: 'agreed'});\n })\n .catch(e => {\n console.log('Update failure', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleOptionSelected(e) {\n switch (e.detail.id) {\n case 'later':\n this.finishLater = true;\n this.showFinishLater = true;\n // this.router.navigate([`view/sign/${this.envelopeId}/role/${this.roleName}/saved`]);\n // if (!window?.['STORYBOOK_ENV']) {\n // window.alert('User intends to sign later.');\n // }\n break;\n case 'claim':\n break;\n case 'decline':\n {\n const declineResult = await envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId);\n console.log('Decline result', declineResult);\n this.isDone = true;\n }\n break;\n case 'print':\n window.print();\n break;\n case 'download':\n savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(() => {});\n break;\n }\n }\n\n saveFieldChange(fieldName: string, fields: Record<string, any>) {\n Envelopes.updateEnvelopeField(this.endpoint, this.envelopeId, fieldName, fields) //\n .catch(e => {\n if (e.response?.status === 401 && e.response?.data?.error === 'jwt expired') {\n // TODO: Do we want to improve the instructions here?\n console.log('[SIGN] Signing session expired');\n this.errorMessage = 'Signing session expired.';\n } else {\n console.log('[SIGN] Server error', e);\n }\n\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleFieldChange(field: IDocumentField, e: any) {\n const {value, checked} = e.target;\n\n switch (field.type) {\n case 'textbox':\n return this.saveFieldChange(field.name, {prepared: false, value});\n\n case 'checkbox_group': {\n const options = field.settings.options.map(option => ({id: option.id, checked: e.target.checked}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'radio_button_group': {\n const options = field.settings.options.map(option => ({id: option.id, selected: e.target.value === option.id}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'dropdown':\n return this.saveFieldChange(field.name, {prepared: false, value: e.detail});\n\n case 'initial':\n const initialsBlob = await (await fetch(e.detail)).blob();\n return createInitials(this.endpoint, 'initial', initialsBlob) //\n .then(newInitials => {\n console.log('New initials', field.name, newInitials);\n updateEnvelopeFieldInitials(this.endpoint, this.envelopeId, field.name, newInitials.id);\n });\n\n case 'signature':\n const signatureBlob = await (await fetch(e.detail)).blob();\n return createSignature(this.endpoint, 'signature', signatureBlob) //\n .then(newSignature => {\n console.log('New sign', field.name, newSignature);\n updateEnvelopeFieldSignature(this.endpoint, this.envelopeId, field.name, newSignature.id);\n });\n\n case 'date':\n const iso = e.target.getAttribute('iso');\n return this.saveFieldChange(field.name, {prepared: false, value: iso});\n\n case 'timestamp':\n console.log('Updating timestamp', {value, ts: e.target.getAttribute('timestamp')});\n break;\n\n default:\n console.log('Unhandled field update', {value, checked}, field);\n break;\n }\n }\n\n isFieldValid(field: IDocumentField) {\n const {required = false} = field;\n const {result = '', value = '', base64 = ''} = field.settings || {};\n switch (field.type) {\n case 'textbox':\n switch (field.settings?.validator || '') {\n case 'email':\n return isValidEmail(result);\n case 'phone':\n return isValidPhone(result);\n default:\n return !required || result !== '';\n }\n\n case 'signature':\n case 'initial':\n return !required || base64 !== '';\n\n // Timestamp fields get automatically filled when the envelope is submitted.\n case 'timestamp':\n return true;\n\n case 'textarea':\n case 'date':\n case 'attachment':\n return !required || result !== '';\n\n case 'dropdown':\n return !required || value !== '';\n\n case 'checkbox_group':\n const checkedCount = (field.settings?.options?.filter(option => option.checked) || []).length;\n return !required || (checkedCount >= (field.settings?.minimum_checked || 0) && checkedCount <= (field.settings?.maximum_checked || 999));\n\n case 'radio_button_group':\n return !required || (field.settings?.options?.filter(option => option.selected) || []).length > 0;\n // TODO\n // case 'checkbox':\n // return <verdocs-field-checkbox style={style} value={result || ''} id={id} />;\n // case 'payment':\n // return <verdocs-field-payment style={style} field={field} id={id} />;\n default:\n return false;\n }\n }\n\n async handleNext() {\n if (this.nextSubmits) {\n try {\n const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Submitted successfully', result);\n this.showDone = true;\n this.isDone = true;\n // updateRecipientStatus()\n } catch (e) {\n console.log('Error submitting', e);\n }\n return;\n // You're done.\n // You can access the Verdoc at any time by clicking on the link from invitation email.\n //\n // After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.\n //\n // Thank you for using Verdocs.\n // Got it, thanks\n }\n\n // Find and focus the next incomplete required field\n const requiredFields = this.fields.filter(field => field.required);\n const focusedIndex = requiredFields.findIndex(field => field.name === this.focusedField);\n\n let nextFocusedIndex = focusedIndex + 1;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n\n let nextRequiredField = requiredFields[nextFocusedIndex];\n\n // Skip signature and initial fields that are already filled in. We have to count our \"skips\" just in case, to avoid infinite loops.\n let skips = 0;\n if (skips < requiredFields.length && ['signature', 'initial'].includes(nextRequiredField.type) && nextRequiredField.settings?.result === 'signed') {\n skips++;\n nextFocusedIndex++;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n nextRequiredField = requiredFields[nextFocusedIndex];\n }\n\n if (skips >= requiredFields.length) {\n nextRequiredField = null;\n }\n\n if (nextRequiredField) {\n const id = getFieldId(nextRequiredField);\n const el = document.getElementById(id) as any;\n el?.focusField();\n this.focusedField = nextRequiredField.name;\n }\n }\n\n // See if everything that \"needs to be\" filled in is, and all \"fillable fields\" are valid\n checkRecipientFields() {\n const invalidFields = this.recipient.fields.filter(field => !this.isFieldValid(field));\n if (invalidFields.length < 1) {\n this.nextButtonLabel = 'Finish';\n this.nextSubmits = true;\n } else {\n console.log('[SIGN] Remaining invalid fields', invalidFields);\n this.nextSubmits = false;\n }\n }\n\n attachFieldAttributes(pageInfo, field, roleIndex, el) {\n el.addEventListener('input', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n el.addEventListener('fieldChange', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n\n el.setAttribute('roleindex', roleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n el.setAttribute('initials', this.recipient ? fullNameToInitials(this.recipient.full_name) : '');\n el.setAttribute('name', this.recipient?.full_name || '');\n }\n\n handlePageRendered(e) {\n const pageInfo = e.detail as IDocumentPageInfo;\n const roleIndex = getRoleIndex(EnvelopeStore.roleNames, this.recipient.role_name);\n const recipientFields = this.recipient.fields.filter(field => field.page === pageInfo.pageNumber);\n console.log('[SIGN] Page rendered, updating fields', {pageInfo, roleIndex, recipientFields});\n\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, roleIndex, {disabled: false, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, roleIndex, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, roleIndex, el);\n }\n\n // interact(el).draggable({\n // listeners: {\n // start(event) {\n // console.log('[FIELDS] Drag started', event.type, event.target);\n // },\n // move(event) {\n // const oldX = +(event.target.getAttribute('posX') || 0);\n // const oldY = +(event.target.getAttribute('posY') || 0);\n // const xScale = +(event.target.getAttribute('xScale') || 1);\n // const yScale = +(event.target.getAttribute('yScale') || 1);\n // const newX = event.dx / xScale + oldX;\n // const newY = event.dy / yScale + oldY;\n // event.target.setAttribute('posX', newX);\n // event.target.setAttribute('posy', newY);\n // updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);\n // },\n // end(event) {\n // console.log('[FIELDS] Drag ended', event);\n // // event.target.setAttribute('posX', 0);\n // // event.target.setAttribute('posy', 0);\n // // updateCssTransform(event.target, 'translate', `${0}px, ${0}px`);\n // },\n // },\n // });\n });\n\n // Render fields for \"the other\" recipients\n EnvelopeStore.envelope.recipients\n .filter(recipient => recipient.role_name !== this.recipient.role_name)\n .map(otherRecipient => {\n const otherRoleIndex = getRoleIndex(EnvelopeStore.roleNames, otherRecipient.role_name);\n const recipientFields = otherRecipient.fields.filter(field => field.page === pageInfo.pageNumber);\n // const fields = this.fields.filter(field => field.page_sequence === pageInfo.renderedPage.pageNumber);\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, otherRoleIndex, {disabled: true, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n el.setAttribute('roleindex', otherRoleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n });\n });\n\n this.checkRecipientFields();\n }\n\n render() {\n if (EnvelopeStore.loading || !EnvelopeStore.envelope) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n const menuOptions = [\n {id: 'later', label: 'Finish Later'}, //\n // {id: 'claim', label: 'Claim the Document', disabled: true},\n {id: 'decline', label: 'Decline to Sign'},\n {id: 'print', label: 'Print Without Signing', disabled: true},\n {id: 'download', label: 'Download'},\n ];\n\n return (\n <Host class={{agreed: this.recipient?.agreed}}>\n {!this.isDone && !this.finishLater && <div class=\"intro\">Please review and act on these documents.</div>}\n\n <div class=\"header\">\n {!this.isDone && !this.finishLater && <verdocs-dropdown options={menuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />}\n\n {!this.recipient?.agreed ? (\n <div class=\"agree\">\n <verdocs-checkbox name=\"agree\" label=\"I agree to use electronic records and signatures.\" onInput={() => this.handleClickAgree()} />\n </div>\n ) : (\n <Fragment>\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{EnvelopeStore.envelope.name}</div>\n <div style={{flex: '1'}} />\n <div innerHTML={PrintIcon} style={{width: '24px', height: '24px', fill: '#ffffff', cursor: 'pointer'}} onClick={() => window.print()} />\n <div\n innerHTML={DownloadIcon}\n style={{width: '24px', height: '24px', fill: '#ffffff', cursor: 'pointer', margin: '0 16px', maginRight: '30px'}}\n onClick={() => savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(() => {})}\n />\n </Fragment>\n )}\n\n {!this.isDone && !this.finishLater && <verdocs-button size=\"small\" label={this.nextButtonLabel} disabled={!this.recipient?.agreed} onClick={() => this.handleNext()} />}\n </div>\n\n {!this.isDone && !this.recipient?.agreed ? <div class=\"cover\" /> : <div style={{display: 'none'}} />}\n\n <div class=\"document\">\n {(EnvelopeStore.envelope.documents || []).map(envelopeDocument => {\n const pages = [...(envelopeDocument?.pages || [])];\n pages.sort((a, b) => a.sequence - b.sequence);\n\n return (\n <Fragment>\n {pages.map(page => (\n <verdocs-document-page\n pageImageUri={page.display_uri}\n virtualWidth={612}\n virtualHeight={792}\n pageNumber={page.sequence}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n ))}\n </Fragment>\n );\n })}\n </div>\n\n {this.showFinishLater && (\n <verdocs-ok-dialog\n heading=\"You've saved your document to finish later.\"\n message=\"To complete the document, use the link in the original email notification inviting you to review and finish the document.\"\n onNext={() => (this.showFinishLater = false)}\n />\n )}\n\n {this.errorMessage && <verdocs-ok-dialog heading=\"Network Error\" message={this.errorMessage} onNext={() => (this.errorMessage = '')} />}\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n message=\"You can access the Verdoc 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.\"\n onNext={() => (this.showDone = false)}\n />\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"verdocs-sign.entry.js","mappings":";;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,CAACA,SAAI,IAAIA,SAAI,CAAC,SAAS,KAAK,UAAU,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AACzF,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;AAChH,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;AAC/D,QAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;AACnG,QAAQ,SAAS,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;AACtG,QAAQ,SAAS,IAAI,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,EAAE;AACtH,QA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Y,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,KAAI,IAAI,CAAC,WAAW,EAC3D,YAAY,EAAE,GAAG,EACjB,aAAa,EAAE,GAAG,EAClB,UAAU,EAAE,IAAI,CAAC,QAAQ,EACzB,cAAc,EAAE,CAAC,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAC/C,MAAM,EAAE;YACN,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAC;YAC9B,EAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAC;WAChC,GACD,EACF;OACH,CAAC,CACO,EACX;KACH,CAAC,CACE,CACP,EAEA,IAAI,CAAC,eAAe,KACnB,yBACE,OAAO,EAAC,6CAA6C,EACrD,OAAO,EAAC,2HAA2H,EACnI,MAAM,EAAE,OAAO,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,GAC5C,CACH,EAEA,IAAI,CAAC,YAAY,IAAI,yBAAmB,OAAO,EAAC,eAAe,EAAC,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,GAAI,EACtI,IAAI,CAAC,QAAQ,KACZ,yBACE,OAAO,EAAC,cAAc,EACtB,OAAO,EAAC,uOAAuO,EAC/O,MAAM,EAAE,OAAO,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,GACrC,CACH,CACI,EACP;GACH;;;;;;","names":["this","Envelopes.getSigningSession","EnvelopeStore","Envelopes.updateEnvelopeField"],"sources":["./node_modules/@verdocs/js-sdk/Envelopes/Recipients.js","./node_modules/@verdocs/js-sdk/Envelopes/Signatures.js","./node_modules/@verdocs/js-sdk/Envelopes/Initials.js","./src/components/embeds/verdocs-sign/verdocs-sign.scss?tag=verdocs-sign","./src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"sourcesContent":["var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n/**\n * Update a recipient's status block\n */\nexport var updateRecipient = function (endpoint, envelopeId, roleName, params) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .put(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(roleName), params)\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Submit an envelope (signing is finished). Note that all fields must be valid/completed for this to succeed.\n */\nexport var envelopeRecipientSubmit = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'submit' });\n};\n/**\n * Decline to complete an envelope (signing will not terminated).\n */\nexport var envelopeRecipientDecline = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'decline' });\n};\n/**\n * Claim / change ownership of an envelope. This is a special-case operation only available in certain workflows.\n */\nexport var envelopeRecipientChangeOwner = function (endpoint, envelopeId, roleName, email, fullName) { return updateRecipient(endpoint, envelopeId, roleName, { action: 'owner_update', email: email, full_name: fullName }); };\n/**\n * Agree to electronic signing.\n */\nexport var envelopeRecipientAgree = function (endpoint, envelopeId, roleName, agreed) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', agreed: agreed });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientUpdateName = function (endpoint, envelopeId, roleName, fullName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', new_full_name: fullName });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientPrepare = function (endpoint, envelopeId, roleName, recipients) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'prepare', recipients: recipients });\n};\nexport var getSignerToken = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"/signer-token\"))\n .then(function (r) { return r.data; });\n};\nexport var getInPersonLink = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"?in_person_link=true\"))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create a signature block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * a signature block to be used for all signature fields in the document. Thus, this is typically called one time to\n * create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field\n * to be \"stamped\" by the user.\n */\nexport var createSignature = function (endpoint, name, signature) {\n var data = new FormData();\n data.append('signature', signature, name);\n return endpoint.api //\n .post(\"/signatures\", data)\n .then(function (r) { return r.data; });\n};\n/**\n * Get the availbable signatures for a user.\n */\nexport var getSignatures = function (endpoint) {\n return endpoint.api //\n .get('/signatures')\n .then(function (r) { return r.data; });\n};\n/**\n * Get a user's signature by ID.\n */\nexport var getSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .get(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n/**\n * Delete a user's signature.\n */\nexport var deleteSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .delete(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create an initials block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * an initials block to be used for all initials fields in the document. Thus, this is typically called one time to\n * create and store an initials block. Thereafter, the ID of the initials block may be re-used for each initials field\n * to be \"stamped\" by the user.\n */\nexport var createInitials = function (endpoint, name, initials) {\n var data = new FormData();\n data.append('initial', initials, name);\n return endpoint.api //\n .post(\"/initials\", data)\n .then(function (r) { return r.data; });\n};\n","@import '../../../theme.scss';\n\nverdocs-sign {\n display: flex;\n overflow: hidden;\n position: relative;\n min-height: 600px;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n\n div {\n display: block;\n box-sizing: border-box;\n }\n\n input {\n vertical-align: top;\n }\n\n .header {\n color: #fff;\n display: flex;\n z-index: 1000;\n flex: 0 0 56px;\n padding: 0 15px;\n font-size: 12px;\n align-items: center;\n flex-direction: row;\n transition: all 0.25s;\n background-color: $medium-bg;\n box-shadow: 0 4px 4px 0 rgb(0 0 0 / 24%), 0 0 4px 0 rgb(0 0 0 / 12%);\n\n .logo {\n width: 80px;\n margin: -6px 0 0 10px;\n }\n\n .title {\n padding-left: 16px;\n font-size: 18px;\n font-weight: 500;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n\n .intro {\n width: 100%;\n display: flex;\n flex: 0 0 60px;\n color: #111111;\n padding: 0 15px;\n font-size: 18px;\n font-weight: 500;\n line-height: 28px;\n flex-direction: row;\n background: #ffffff;\n align-items: center;\n }\n\n .cover {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 999;\n position: absolute;\n background: rgba(0, 0, 0, 0.5);\n }\n\n .document {\n flex: 1;\n height: 100%;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n min-height: 200px;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n justify-content: center;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .agree {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0 15px;\n\n .intro {\n display: none;\n }\n\n .header {\n flex: 0 0 56px;\n }\n }\n}\n\n@media print {\n verdocs-sign .header {\n display: none;\n }\n}\n","import {VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Envelopes} from '@verdocs/js-sdk/Envelopes';\nimport {createInitials} from '@verdocs/js-sdk/Envelopes/Initials';\nimport {createSignature} from '@verdocs/js-sdk/Envelopes/Signatures';\nimport {IDocumentField, IEnvelope, IRecipient} from '@verdocs/js-sdk/Envelopes/Types';\nimport {envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit} from '@verdocs/js-sdk/Envelopes/Recipients';\nimport {isValidEmail, isValidPhone} from '@verdocs/js-sdk/Templates/Validators';\nimport {Event, EventEmitter, Host, Fragment, Component, Prop, State, h} from '@stencil/core';\nimport {updateEnvelopeFieldInitials, updateEnvelopeFieldSignature} from '@verdocs/js-sdk/Envelopes/Envelopes';\nimport {fullNameToInitials, getFieldId, getRoleIndex, renderDocumentField, savePDF, updateDocumentFieldValue} from '../../../utils/utils';\nimport {getEnvelopeById} from '../../../utils/Envelopes';\nimport EnvelopeStore from '../../../utils/envelopeStore';\nimport {IDocumentPageInfo} from '../../../utils/Types';\nimport {SDKError} from '../../../utils/errors';\n\nconst PrintIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z\"></path></svg>`;\n\nconst DownloadIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z\"></path></svg>`;\n\n/**\n * Display an envelope signing experience. This will display the envelope's attached\n * documents with signing fields overlaid on each page.\n *\n * The component will attempt to initiate a signing session and load the specified\n * envelope. If successful, the recipient's fields will be enabled and the user will\n * be able to sign the envelope's attached documents. If not, an `sdkError` will be\n * thrown and the component will be blank/empty. To provide the best user experience,\n * applications should capture and handle this error to provide the user with\n * instructions/options for next steps based on the application's design and workflow.\n *\n * Unlike other components, this will always create its own endpoint to manage the\n * session session. This endpoint will be included in event callbacks for the\n * convenience of host applications that may wish to make server calls using the\n * signer's credentials once signing is complete (e.g. to obtain copies of\n * the signed attachments.)\n */\n@Component({\n tag: 'verdocs-sign',\n styleUrl: 'verdocs-sign.scss',\n shadow: false,\n})\nexport class VerdocsSign {\n endpoint: VerdocsEndpoint = null;\n\n /**\n * The ID of the envelope to sign.\n */\n @Prop() envelopeId: string | null = null;\n\n /**\n * The ID of the role that will be signing e.g. 'Recipient 1'\n */\n @Prop() roleId: string | null = null;\n\n /**\n * The invite code for the signer.\n */\n @Prop() inviteCode: string | null = null;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeLoaded: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope}>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() recipient: IRecipient | null = null;\n @State() signerToken = null;\n // @State() envelope: IEnvelope | null = null;\n // @State() fields: IDocumentField[] = [];\n @State() hasSignature = false;\n @State() nextButtonLabel = 'Start';\n @State() nextSubmits = false;\n @State() errorMessage = '';\n @State() focusedField = '';\n @State() isDone = false;\n @State() showDone = false;\n\n @State() finishLater = false;\n @State() showFinishLater = false;\n\n recipientIndex: number = -1;\n fields: IDocumentField[] = [];\n\n componentWillLoad() {\n this.endpoint = new VerdocsEndpoint({sessionType: 'signing'});\n }\n\n async componentDidLoad() {\n if (!this.envelopeId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required envelopId', 500, ''));\n return;\n }\n\n if (!this.roleId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required roleId', 500, ''));\n return;\n }\n\n if (!this.inviteCode) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required inviteCode', 500, ''));\n return;\n }\n\n try {\n console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);\n const {session, recipient, signerToken} = await Envelopes.getSigningSession(this.endpoint, {\n envelopeId: this.envelopeId,\n roleId: this.roleId,\n inviteCode: this.inviteCode,\n });\n\n console.log(`[SIGN] Loaded signing session ${session.email} / ${session.profile_id}`);\n\n this.recipient = recipient;\n console.log('[SIGN] We are recipient', this.recipient);\n this.signerToken = signerToken;\n this.endpoint.setToken(signerToken);\n\n if (this.recipient.agreed) {\n this.nextButtonLabel = 'Next';\n }\n\n await getEnvelopeById(this.endpoint, this.envelopeId);\n\n this.recipientIndex = EnvelopeStore.envelope.recipients.findIndex(recipient => recipient.role_name == this.roleId);\n if (this.recipientIndex > -1) {\n this.recipient = EnvelopeStore.envelope.recipients[this.recipientIndex];\n this.fields = this.recipient.fields;\n console.log('[SIGN] Found our recipient in the envelope', this.recipientIndex, this.recipient, this.fields);\n } else {\n console.log('[SIGN] Could not find our recipient record', this.roleId, EnvelopeStore.envelope.recipients);\n }\n\n this.isDone = ['submitted', 'canceled', 'declined'].includes(this.recipient.status);\n\n // TODO: Fix service to allow this?\n // const sigs = await getSignatures();\n // console.log('sigs', sigs);\n\n this.envelopeLoaded?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope});\n } catch (e) {\n console.log('Error with signing session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handleClickAgree() {\n envelopeRecipientAgree(this.endpoint, this.envelopeId, this.roleId, true)\n .then(r => {\n this.nextButtonLabel = 'Next';\n this.recipient = r;\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope, event: 'agreed'});\n })\n .catch(e => {\n console.log('Update failure', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleOptionSelected(e) {\n switch (e.detail.id) {\n case 'later':\n this.finishLater = true;\n this.showFinishLater = true;\n // this.router.navigate([`view/sign/${this.envelopeId}/role/${this.roleName}/saved`]);\n // if (!window?.['STORYBOOK_ENV']) {\n // window.alert('User intends to sign later.');\n // }\n break;\n case 'claim':\n break;\n case 'decline':\n {\n const declineResult = await envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId);\n console.log('Decline result', declineResult);\n this.isDone = true;\n }\n break;\n case 'print':\n window.print();\n break;\n case 'download':\n savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(() => {});\n break;\n }\n }\n\n updateRecipientFieldValue(fieldName: string, updateResult: any) {\n this.recipient.fields.forEach(oldField => {\n if (oldField.name === fieldName) {\n console.log('New settings', fieldName, updateResult.settings);\n oldField.settings = updateResult.settings;\n // TODO: When we break out other fields like value, update them here too\n updateDocumentFieldValue(oldField);\n }\n });\n }\n\n saveFieldChange(fieldName: string, fields: Record<string, any>) {\n Envelopes.updateEnvelopeField(this.endpoint, this.envelopeId, fieldName, fields) //\n .then(updateResult => {\n this.updateRecipientFieldValue(fieldName, updateResult);\n })\n .catch(e => {\n if (e.response?.status === 401 && e.response?.data?.error === 'jwt expired') {\n // TODO: Do we want to improve the instructions here?\n console.log('[SIGN] Signing session expired');\n this.errorMessage = 'Signing session expired.';\n } else {\n console.log('[SIGN] Server error', e);\n }\n\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleFieldChange(field: IDocumentField, e: any) {\n const {value, checked} = e.target;\n\n switch (field.type) {\n case 'textbox':\n return this.saveFieldChange(field.name, {prepared: false, value});\n\n case 'checkbox_group': {\n const options = field.settings.options.map(option => ({id: option.id, checked: e.target.checked}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'radio_button_group': {\n const options = field.settings.options.map(option => ({id: option.id, selected: e.target.value === option.id}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'dropdown':\n return this.saveFieldChange(field.name, {prepared: false, value: e.detail});\n\n case 'initial':\n const initialsBlob = await (await fetch(e.detail)).blob();\n return createInitials(this.endpoint, 'initial', initialsBlob) //\n .then(async newInitials => {\n const updateResult = await updateEnvelopeFieldInitials(this.endpoint, this.envelopeId, field.name, newInitials.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n });\n\n case 'signature':\n const signatureBlob = await (await fetch(e.detail)).blob();\n return createSignature(this.endpoint, 'signature', signatureBlob) //\n .then(async newSignature => {\n const updateResult = await updateEnvelopeFieldSignature(this.endpoint, this.envelopeId, field.name, newSignature.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n });\n\n case 'date':\n const iso = e.target.getAttribute('iso');\n return this.saveFieldChange(field.name, {prepared: false, value: iso});\n\n case 'timestamp':\n console.log('Updating timestamp', {value, ts: e.target.getAttribute('timestamp')});\n break;\n\n default:\n console.log('Unhandled field update', {value, checked}, field);\n break;\n }\n }\n\n isFieldValid(field: IDocumentField) {\n const {required = false} = field;\n const {result = '', value = '', base64 = ''} = field.settings || {};\n switch (field.type) {\n case 'textbox':\n switch (field.settings?.validator || '') {\n case 'email':\n return isValidEmail(result);\n case 'phone':\n return isValidPhone(result);\n default:\n return !required || result !== '';\n }\n\n case 'signature':\n case 'initial':\n console.log('Evaluating initial field', field);\n return !required || base64 !== '';\n\n // Timestamp fields get automatically filled when the envelope is submitted.\n case 'timestamp':\n return true;\n\n case 'textarea':\n case 'date':\n case 'attachment':\n return !required || result !== '';\n\n case 'dropdown':\n return !required || value !== '';\n\n case 'checkbox_group':\n const checkedCount = (field.settings?.options?.filter(option => option.checked) || []).length;\n return !required || (checkedCount >= (field.settings?.minimum_checked || 0) && checkedCount <= (field.settings?.maximum_checked || 999));\n\n case 'radio_button_group':\n return !required || (field.settings?.options?.filter(option => option.selected) || []).length > 0;\n // TODO\n // case 'checkbox':\n // return <verdocs-field-checkbox style={style} value={result || ''} id={id} />;\n // case 'payment':\n // return <verdocs-field-payment style={style} field={field} id={id} />;\n default:\n return false;\n }\n }\n\n async handleNext() {\n if (this.nextSubmits) {\n try {\n const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Submitted successfully', result);\n this.showDone = true;\n this.isDone = true;\n } catch (e) {\n console.log('Error submitting', e);\n }\n\n return;\n }\n\n // Find and focus the next incomplete required field\n const requiredFields = this.fields.filter(field => field.required);\n const focusedIndex = requiredFields.findIndex(field => field.name === this.focusedField);\n\n let nextFocusedIndex = focusedIndex + 1;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n\n let nextRequiredField = requiredFields[nextFocusedIndex];\n\n // Skip signature and initial fields that are already filled in. We have to count our \"skips\" just in case, to avoid infinite loops.\n let skips = 0;\n if (skips < requiredFields.length && ['signature', 'initial'].includes(nextRequiredField.type) && nextRequiredField.settings?.result === 'signed') {\n skips++;\n nextFocusedIndex++;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n nextRequiredField = requiredFields[nextFocusedIndex];\n }\n\n if (skips >= requiredFields.length) {\n nextRequiredField = null;\n }\n\n if (nextRequiredField) {\n const id = getFieldId(nextRequiredField);\n const el = document.getElementById(id) as any;\n el?.focusField();\n this.focusedField = nextRequiredField.name;\n }\n }\n\n // See if everything that \"needs to be\" filled in is, and all \"fillable fields\" are valid\n checkRecipientFields() {\n const invalidFields = this.recipient.fields.filter(field => !this.isFieldValid(field));\n if (invalidFields.length < 1) {\n this.nextButtonLabel = 'Finish';\n this.nextSubmits = true;\n } else {\n console.log('[SIGN] Remaining invalid fields', invalidFields);\n this.nextButtonLabel = 'Next';\n this.nextSubmits = false;\n }\n }\n\n attachFieldAttributes(pageInfo, field, roleIndex, el) {\n el.addEventListener('input', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n el.addEventListener('blur', () => this.checkRecipientFields());\n el.addEventListener('fieldChange', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n\n el.setAttribute('roleindex', roleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n el.setAttribute('initials', this.recipient ? fullNameToInitials(this.recipient.full_name) : '');\n el.setAttribute('name', this.recipient?.full_name || '');\n }\n\n handlePageRendered(e) {\n const pageInfo = e.detail as IDocumentPageInfo;\n const roleIndex = getRoleIndex(EnvelopeStore.roleNames, this.recipient.role_name);\n const recipientFields = this.recipient.fields.filter(field => field.page === pageInfo.pageNumber);\n console.log('[SIGN] Page rendered, updating fields', {pageInfo, roleIndex, recipientFields});\n\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, roleIndex, {disabled: false, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, roleIndex, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, roleIndex, el);\n }\n\n // interact(el).draggable({\n // listeners: {\n // start(event) {\n // console.log('[FIELDS] Drag started', event.type, event.target);\n // },\n // move(event) {\n // const oldX = +(event.target.getAttribute('posX') || 0);\n // const oldY = +(event.target.getAttribute('posY') || 0);\n // const xScale = +(event.target.getAttribute('xScale') || 1);\n // const yScale = +(event.target.getAttribute('yScale') || 1);\n // const newX = event.dx / xScale + oldX;\n // const newY = event.dy / yScale + oldY;\n // event.target.setAttribute('posX', newX);\n // event.target.setAttribute('posy', newY);\n // updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);\n // },\n // end(event) {\n // console.log('[FIELDS] Drag ended', event);\n // // event.target.setAttribute('posX', 0);\n // // event.target.setAttribute('posy', 0);\n // // updateCssTransform(event.target, 'translate', `${0}px, ${0}px`);\n // },\n // },\n // });\n });\n\n // Render fields for \"the other\" recipients\n EnvelopeStore.envelope.recipients\n .filter(recipient => recipient.role_name !== this.recipient.role_name)\n .forEach(otherRecipient => {\n const otherRoleIndex = getRoleIndex(EnvelopeStore.roleNames, otherRecipient.role_name);\n const recipientFields = otherRecipient.fields.filter(field => field.page === pageInfo.pageNumber);\n\n // We don't render other recipients' fields if they've already acted, because those values are now stamped into the document page.\n // TODO: Do we want to render alternate treatments for recipients who have declined (red boxes?) and/or if the envelope is cancelled?\n // TODO: When doing server-side rendering we probably want to \"stamp\" values into the rendered PDF only once the recipient is done\n // acting. Do this once vSign is in Production.\n // TODO: Changed tacks here. During signing we show the template PDFs and everybody's fields, filled in or no. When done, we switch\n // to showing the envelope PDFs with stamped-in values. Confirm this is a good approach.\n // if (!['submitted', 'signed'].includes(otherRecipient.status)) {\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, otherRoleIndex, {\n disabled: true,\n editable: false,\n draggable: false,\n done: this.isDone,\n });\n if (!el) {\n return;\n }\n\n // TODO: Research why this occurs. There are cases when we're getting \"el.setAttribute is not a function\"\n if (el.setAttribute) {\n el.setAttribute('roleindex', otherRoleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n }\n });\n // }\n });\n\n this.checkRecipientFields();\n }\n\n render() {\n if (EnvelopeStore.loading || !EnvelopeStore.envelope) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n const menuOptions = [\n {id: 'later', label: 'Finish Later'}, //\n // {id: 'claim', label: 'Claim the Document', disabled: true},\n {id: 'decline', label: 'Decline to Sign'},\n {id: 'print', label: 'Print Without Signing', disabled: true},\n {id: 'download', label: 'Download'},\n ];\n\n return (\n <Host class={{agreed: this.recipient?.agreed}}>\n {!this.isDone && !this.finishLater && <div class=\"intro\">Please review and act on these documents.</div>}\n\n {!this.isDone && (\n <div class=\"header\">\n {!this.isDone && !this.finishLater && <verdocs-dropdown options={menuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />}\n\n {!this.recipient?.agreed ? (\n <div class=\"agree\">\n <verdocs-checkbox name=\"agree\" label=\"I agree to use electronic records and signatures.\" onInput={() => this.handleClickAgree()} />\n </div>\n ) : (\n <Fragment>\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{EnvelopeStore.envelope.name}</div>\n <div style={{flex: '1'}} />\n <div innerHTML={PrintIcon} style={{width: '24px', height: '24px', fill: '#fff', cursor: 'pointer'}} onClick={() => window.print()} />\n <div\n innerHTML={DownloadIcon}\n style={{width: '24px', height: '24px', fill: '#fff', cursor: 'pointer', margin: '0 16px', maginRight: '30px'}}\n onClick={() => savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(() => {})}\n />\n </Fragment>\n )}\n\n {!this.isDone && !this.finishLater && <verdocs-button size=\"small\" label={this.nextButtonLabel} disabled={!this.recipient?.agreed} onClick={() => this.handleNext()} />}\n </div>\n )}\n\n {!this.isDone && !this.recipient?.agreed ? <div class=\"cover\" /> : <div style={{display: 'none'}} />}\n\n {this.isDone ? (\n // <div>test</div>\n <verdocs-view endpoint={this.endpoint} envelopeId={this.envelopeId} onSdkError={e => this.sdkError?.emit(e.detail)} />\n ) : (\n <div class=\"document\">\n {(EnvelopeStore.envelope.documents || []).map(envelopeDocument => {\n const pages = [...(envelopeDocument?.pages || [])];\n pages.sort((a, b) => a.sequence - b.sequence);\n\n return (\n <Fragment>\n {pages.map(page => {\n // In signing mode we show the original template page with all the recipient fields so we can show source formatting and\n // where everything went. This is also a visual indicator when optional fields weren't filled in by previous actors, or\n // future signers still need to act. Once we're \"done\" we flip to showing the envelope's documents which have the final\n // field vales (so far) stamped into them.\n const templatePage = EnvelopeStore.template?.pages.find(p => p.sequence === page.sequence);\n // TODO: Confirm that a pure page-number match is good enough to find the matching template page. We need to make sure\n // we either don't reset our page numbers for additional attachments, or add match-on identifiers to work around that.\n // console.log('tp', templatePage, page);\n return (\n <verdocs-document-page\n pageImageUri={templatePage?.display_uri || page.display_uri}\n virtualWidth={612}\n virtualHeight={792}\n pageNumber={page.sequence}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n );\n })}\n </Fragment>\n );\n })}\n </div>\n )}\n\n {this.showFinishLater && (\n <verdocs-ok-dialog\n heading=\"You've saved your document to finish later.\"\n message=\"To complete the document, use the link in the original email notification inviting you to review and finish the document.\"\n onNext={() => (this.showFinishLater = false)}\n />\n )}\n\n {this.errorMessage && <verdocs-ok-dialog heading=\"Network Error\" message={this.errorMessage} onNext={() => (this.errorMessage = '')} />}\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n message=\"You can access the Verdoc 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.\"\n onNext={() => (this.showDone = false)}\n />\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment } from './index-f78d163d.js';
|
|
2
2
|
import { c as createTemplate, g as getTemplate } from './Templates-0638b1e4.js';
|
|
3
3
|
import { T as TemplateSenderTypes } from './Types-ab9f6af8.js';
|
|
4
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
|
4
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-28ba21cc.js';
|
|
5
5
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
6
6
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
7
|
-
import { r as renderDocumentField, a as getRoleIndex,
|
|
8
|
-
import { s as state } from './templateStore-
|
|
9
|
-
import { l as loadTemplate } from './Templates-
|
|
7
|
+
import { r as renderDocumentField, a as getRoleIndex, k as updateCssTransform } from './utils-5cddd371.js';
|
|
8
|
+
import { s as state } from './templateStore-d6995852.js';
|
|
9
|
+
import { l as loadTemplate } from './Templates-452173e6.js';
|
|
10
10
|
import './Token-54690789.js';
|
|
11
11
|
import './index-fd7b8a34.js';
|
|
12
12
|
|
|
@@ -13,7 +13,7 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-sign",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"isDone":[32],"showDone":[32],"finishLater":[32],"showFinishLater":[32]}]]],["verdocs-field-initial",[[0,"verdocs-field-initial",{"field":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"tempInitials":[32],"focusField":[64]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["verdocs-field-date",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"containerId":[32],"focusField":[64]}]]],["verdocs-field-textarea",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64]}]]],["verdocs-field-textbox",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64]}]]],["verdocs-field-timestamp",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64]}]]],["verdocs-search",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-send",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"pdfUrl":[32],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"recipientsAssigned":[32]}]]],["verdocs-field-attachment",[[0,"verdocs-field-attachment",{"field":[16],"disabled":[4],"roleIndex":[2,"role-index"],"focusField":[64]}]]],["verdocs-preview",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["verdocs-
|
|
16
|
+
return bootstrapLazy([["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-sign",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"isDone":[32],"showDone":[32],"finishLater":[32],"showFinishLater":[32]}]]],["verdocs-field-initial",[[0,"verdocs-field-initial",{"field":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"tempInitials":[32],"focusField":[64]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["verdocs-field-date",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"containerId":[32],"focusField":[64]}]]],["verdocs-field-textarea",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64]}]]],["verdocs-field-textbox",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64]}]]],["verdocs-field-timestamp",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64]}]]],["verdocs-search",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-send",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"pdfUrl":[32],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"recipientsAssigned":[32]}]]],["verdocs-field-attachment",[[0,"verdocs-field-attachment",{"field":[16],"disabled":[4],"roleIndex":[2,"role-index"],"focusField":[64]}]]],["verdocs-preview",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["verdocs-kba-dialog",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["verdocs-field-checkbox",[[0,"verdocs-field-checkbox",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2]}]]],["verdocs-field-dropdown",[[0,"verdocs-field-dropdown",{"field":[16],"disabled":[4],"roleindex":[2],"focusField":[64]}]]],["verdocs-field-payment",[[0,"verdocs-field-payment",{"field":[16],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32]}]]],["verdocs-field-radio-button",[[0,"verdocs-field-radio-button",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2]}]]],["verdocs-organization-card",[[0,"verdocs-organization-card",{"organization":[16]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-button",[[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-contact-picker",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32]}]]],["verdocs-initial-dialog",[[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}]]],["verdocs-upload-dialog",[[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["verdocs-document-page_2",[[0,"verdocs-document-page",{"pageImageUri":[1,"page-image-uri"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32]}],[0,"verdocs-loader"]]],["verdocs-dropdown_2",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"]}],[0,"verdocs-dropdown",{"options":[16],"open":[32]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"showCancel":[4,"show-cancel"]}]]],["verdocs-toggle-button",[[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-quick-functions_3",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-activity",{"endpoint":[16],"type":[1],"options":[8],"emptyMessage":[32],"authFailure":[32],"title":[32],"recent":[32],"saved":[32],"starred":[32]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-checkbox",[[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}]]],["verdocs-radio-button",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-help-icon_2",[[0,"verdocs-template-sender-dialog",{"value":[1],"newValue":[32]}],[0,"verdocs-help-icon",{"text":[1],"containerId":[32]}]]],["verdocs-button-panel_3",[[4,"verdocs-button-panel",{"icon":[1]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}],[0,"verdocs-text-input",{"value":[1],"label":[1],"placeholder":[1],"autocomplete":[1],"type":[1],"disabled":[4]}]]],["verdocs-field-signature_3",[[0,"verdocs-field-signature",{"field":[16],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"tempSignature":[32],"focusField":[64]}],[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}]]],["verdocs-template-create_4",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"]}],[0,"verdocs-template-properties",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"name":[32],"visibility":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32]}],[0,"verdocs-template-recipients",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"sender":[32],"showingSenderDialog":[32],"orderedRoles":[32]}],[0,"verdocs-template-create",{"endpoint":[16],"file":[32]}]]]], options);
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
//# sourceMappingURL=verdocs-web-sdk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function l(e){try{i(o.next(e))}catch(e){a(e)}}function s(e){try{i(o["throw"](e))}catch(e){a(e)}}function i(e){e.done?n(e.value):r(e.value).then(l,s)}i((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,r,a,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(t){return i([e,t])}}function i(l){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,r&&(a=l[0]&2?r["return"]:l[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;if(r=0,a)l=[l[0]&2,a.value];switch(l[0]){case 0:case 1:a=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;r=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1];a=l;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(l);break}if(a[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];r=0}finally{o=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{j as getEnvelope}from"./utils-5cddd371.js";import{c as createStore}from"./index-fd7b8a34.js";import{g as getTemplate}from"./Templates-0638b1e4.js";var _c=createStore({envelope:null,template:null,loadProgress:0,loading:true,error:"",roleNames:[],dirty:false}),state=_c.state,onChange=_c.onChange;onChange("envelope",(function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){if(!e){console.log("[ENVELOPESTORE] Clearing envelope");state.roleNames=[];state.dirty=false;state.loading=false;state.error="";state.loadProgress=0;return[2]}console.log("[ENVELOPESTORE] Loaded envelope",e);state.roleNames=e.recipients.map((function(e){return e.role_name}));console.log("[ENVELOPESTORE] Loaded roles",state.roleNames);return[2]}))}))}));var getEnvelopeById=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var n,o,r,a,l;return __generator(this,(function(s){switch(s.label){case 0:if(!t){console.log("[ENVELOPES] Missing required envelope ID");return[2]}if(((n=state.envelope)===null||n===void 0?void 0:n.id)===t){console.log("[ENVELOPES] Skipping load for already-loaded envelope ID");return[2]}state.error="";state.loading=true;state.envelope=null;s.label=1;case 1:s.trys.push([1,4,,5]);console.log("[ENVELOPES] Loading envelope ".concat(t));return[4,getEnvelope(e,t,true)];case 2:r=s.sent();if(!r){console.log("[ENVELOPES] Unable to load envelope");return[2]}state.envelope=r;return[4,getTemplate(e,r.template_id,true)];case 3:a=s.sent();if(!r){console.log("[ENVELOPES] Unable to load template");return[2]}state.template=a;state.loading=false;return[3,5];case 4:l=s.sent();state.loading=false;state.error=((o=l===null||l===void 0?void 0:l.response)===null||o===void 0?void 0:o.status)===401?"Authentication required":l.message;console.log("[ENVELOPES] Error loading envelope",l);throw l;case 5:return[2]}}))}))};export{getEnvelopeById as g,state as s};
|
|
2
|
+
//# sourceMappingURL=Envelopes-b87b1909.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["src/utils/envelopeStore.ts","src/utils/Envelopes.ts"],"names":["_c","createStore","envelope","template","loadProgress","loading","error","roleNames","dirty","state","onChange","newEnvelope","__awaiter","console","log","recipients","map","recipient","role_name","getEnvelopeById","endpoint","envelopeId","_a","EnvelopeStore","id","concat","getEnvelope","sent","getTemplate","template_id","_b","e_1","response","status","message"],"mappings":"mlDAOM,IAAAA,GAAoBC,YAAY,CACpCC,SAAU,KACVC,SAAU,KACVC,aAAc,EACdC,QAAS,KACTC,MAAO,GAEPC,UAAW,GACXC,MAAO,QARFC,MAAKT,GAAAS,MAAEC,SAAQV,GAAAU,SAWtBA,SAAS,YAAY,SAAMC,GAAW,OAAAC,eAAA,OAAA,OAAA,GAAA,gDACpC,IAAKD,EAAa,CAChBE,QAAQC,IAAI,qCACZL,MAAMF,UAAY,GAClBE,MAAMD,MAAQ,MACdC,MAAMJ,QAAU,MAChBI,MAAMH,MAAQ,GACdG,MAAML,aAAe,EACrB,MAAA,CAAA,GAGFS,QAAQC,IAAI,kCAAmCH,GAE/CF,MAAMF,UAAYI,EAAYI,WAAWC,KAAI,SAAAC,GAAa,OAAAA,EAAUC,aAEpEL,QAAQC,IAAI,+BAAgCL,MAAMF,kCC1BvCY,gBAAkB,SAAOC,EAA2BC,GAAkB,OAAAT,eAAA,OAAA,OAAA,GAAA,qFACjF,IAAKS,EAAY,CACfR,QAAQC,IAAI,4CACZ,MAAA,CAAA,GAGF,KAAIQ,EAAAC,MAAcrB,YAAQ,MAAAoB,SAAA,OAAA,EAAAA,EAAEE,MAAOH,EAAY,CAC7CR,QAAQC,IAAI,4DACZ,MAAA,CAAA,GAGFS,MAAcjB,MAAQ,GACtBiB,MAAclB,QAAU,KACxBkB,MAAcrB,SAAW,4CAGvBW,QAAQC,IAAI,gCAAAW,OAAgCJ,IAC3B,MAAA,CAAA,EAAMK,YAAYN,EAAUC,EAAY,cAAnDnB,EAAWF,EAAA2B,OACjB,IAAKzB,EAAU,CACbW,QAAQC,IAAI,uCACZ,MAAA,CAAA,GAGFS,MAAcrB,SAAWA,EAER,MAAA,CAAA,EAAM0B,YAAYR,EAAUlB,EAAS2B,YAAa,cAA7D1B,EAAWH,EAAA2B,OACjB,IAAKzB,EAAU,CACbW,QAAQC,IAAI,uCACZ,MAAA,CAAA,GAGFS,MAAcpB,SAAWA,EACzBoB,MAAclB,QAAU,oCAExBkB,MAAclB,QAAU,MACxBkB,MAAcjB,QAAQwB,EAAAC,IAAC,MAADA,SAAC,OAAA,EAADA,EAAGC,YAAQ,MAAAF,SAAA,OAAA,EAAAA,EAAEG,UAAW,IAAM,0BAA4BF,EAAEG,QAClFrB,QAAQC,IAAI,qCAAsCiB,GAClD,MAAMA","sourcesContent":["// NOTE: Do not attempt to convert this to a named-export module. It triggers compilation issues in Rollup that I spent days trying to\n// resolve. This needs to export a single default value of the store's state. Any helper functions should go in Templates.ts here.\n\nimport {createStore} from '@stencil/store';\nimport {IEnvelope} from '@verdocs/js-sdk/Envelopes/Types';\nimport {ITemplate} from '@verdocs/js-sdk/Templates/Types';\n\nconst {state, onChange} = createStore({\n envelope: null as IEnvelope | null,\n template: null as ITemplate | null,\n loadProgress: 0,\n loading: true,\n error: '',\n\n roleNames: [] as string[],\n dirty: false,\n});\n\nonChange('envelope', async newEnvelope => {\n if (!newEnvelope) {\n console.log('[ENVELOPESTORE] Clearing envelope');\n state.roleNames = [];\n state.dirty = false;\n state.loading = false;\n state.error = '';\n state.loadProgress = 0;\n return;\n }\n\n console.log('[ENVELOPESTORE] Loaded envelope', newEnvelope);\n\n state.roleNames = newEnvelope.recipients.map(recipient => recipient.role_name);\n newEnvelope.recipients;\n console.log('[ENVELOPESTORE] Loaded roles', state.roleNames);\n});\n\nexport default state;\n","import {VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {getEnvelope} from '@verdocs/js-sdk/Envelopes/Envelopes';\nimport EnvelopeStore from './envelopeStore';\nimport {getTemplate} from '@verdocs/js-sdk/Templates/Templates';\n\n// Allows envelope data to be cached for reuse between components, without parent components having to prop-drill entire envelopes into\n// child elements.\nexport const getEnvelopeById = async (endpoint: VerdocsEndpoint, envelopeId: string) => {\n if (!envelopeId) {\n console.log(`[ENVELOPES] Missing required envelope ID`);\n return;\n }\n\n if (EnvelopeStore.envelope?.id === envelopeId) {\n console.log(`[ENVELOPES] Skipping load for already-loaded envelope ID`);\n return;\n }\n\n EnvelopeStore.error = '';\n EnvelopeStore.loading = true;\n EnvelopeStore.envelope = null;\n\n try {\n console.log(`[ENVELOPES] Loading envelope ${envelopeId}`);\n const envelope = await getEnvelope(endpoint, envelopeId, true);\n if (!envelope) {\n console.log('[ENVELOPES] Unable to load envelope');\n return;\n }\n\n EnvelopeStore.envelope = envelope;\n\n const template = await getTemplate(endpoint, envelope.template_id, true);\n if (!envelope) {\n console.log('[ENVELOPES] Unable to load template');\n return;\n }\n\n EnvelopeStore.template = template;\n EnvelopeStore.loading = false;\n } catch (e) {\n EnvelopeStore.loading = false;\n EnvelopeStore.error = e?.response?.status === 401 ? 'Authentication required' : e.message;\n console.log('[ENVELOPES] Error loading envelope', e);\n throw e;\n }\n};\n"]}
|