@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
|
@@ -43,13 +43,13 @@ export class VerdocsFieldInitial {
|
|
|
43
43
|
render() {
|
|
44
44
|
var _a, _b;
|
|
45
45
|
const settings = getFieldSettings(this.field);
|
|
46
|
-
const value =
|
|
46
|
+
const value = settings.base64 || this.tempInitials;
|
|
47
47
|
const disabled = (_b = (_a = this.disabled) !== null && _a !== void 0 ? _a : settings.disabled) !== null && _b !== void 0 ? _b : false;
|
|
48
48
|
const backgroundColor = this.field['rgba'] || getRGBA(this.roleindex);
|
|
49
49
|
if (this.done) {
|
|
50
|
-
return h(Host, { class: { done: this.done } }, value && h("img", { src:
|
|
50
|
+
return h(Host, { class: { done: this.done } }, value && h("img", { src: value, alt: "Initials" }));
|
|
51
51
|
}
|
|
52
|
-
return (h(Host, { class: { required: settings.required, disabled }, style: { backgroundColor } }, value ? (h("img", { src:
|
|
52
|
+
return (h(Host, { class: { required: settings.required, disabled }, style: { backgroundColor } }, value ? (h("img", { src: value, alt: "Initials" })) : (h("button", { class: {}, onClick: () => !disabled && this.handleShow() }, "Initials")), this.editable && (h("verdocs-button-panel", { icon: settingsIcon }, h("h6", null, "Field Settings"), h("form", null, h("verdocs-select-input", { label: "Recipient", options: [
|
|
53
53
|
{ label: 'Buyer', value: 'Buyer' },
|
|
54
54
|
{ label: 'Seller', value: 'Seller' },
|
|
55
55
|
] }), h("verdocs-text-input", { label: "Field Name", value: "", placeholder: "Stored field name...", onInput: e => console.log('ipt', e) }), h("verdocs-text-input", { label: "Placeholder", value: "", placeholder: "Placeholder text...", onInput: e => console.log('ipt', e) }))))));
|
package/dist/collection/components/elements/verdocs-field-initial/verdocs-field-initial.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdocs-field-initial.js","sourceRoot":"","sources":["../../../../src/components/elements/verdocs-field-initial/verdocs-field-initial.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,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,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/D,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;EACpC,CAAC;EAED,MAAM;;IACJ,MAAM,QAAQ,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"verdocs-field-initial.js","sourceRoot":"","sources":["../../../../src/components/elements/verdocs-field-initial/verdocs-field-initial.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,8BAA8B,CAAC;AAGrD,OAAO,EAAC,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAEtD,MAAM,YAAY,GAChB,wrCAAwrC,CAAC;AAE3rC;;;GAGG;AAMH,MAAM,OAAO,mBAAmB;;iBAI0B,IAAI;oBAK/B,KAAK;oBAKP,EAAE;oBAMA,KAAK;oBAKL,KAAK;gBAKT,KAAK;qBAKD,CAAC;wBA6BP,EAAE;;EALf,KAAK,CAAC,UAAU;IACxB,IAAI,CAAC,UAAU,EAAE,CAAC;EACpB,CAAC;EAOD,UAAU;;IACR,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,EAAE,CAAC;IACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;EACrB,CAAC;EAED,WAAW,CAAC,CAAM;;IAChB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAC1C,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {getRGBA} from '@verdocs/js-sdk/Utils/Colors';\nimport {ITemplateField} from '@verdocs/js-sdk/Templates/Types';\nimport {IDocumentField} from '@verdocs/js-sdk/Envelopes/Types';\nimport {Component, Event, EventEmitter, h, Host, Method, Prop, State} from '@stencil/core';\nimport {getFieldSettings} from '../../../utils/utils';\n\nconst settingsIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20\" width=\"20\"><path d=\"m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z\"/></svg>';\n\n/**\n * Displays an initial field. If an initial already exists, it will be displayed and the field will be disabled. Otherwise, a placeholder\n * button will be shown. Clicking the button will show a dialog to adopt an initial.\n */\n@Component({\n tag: 'verdocs-field-initial',\n styleUrl: 'verdocs-field-initial.scss',\n shadow: false,\n})\nexport class VerdocsFieldInitial {\n /**\n * The document or template field to display.\n */\n @Prop() field: IDocumentField | ITemplateField | null = null;\n\n /**\n * If set, overrides the field's settings object. Primarily used to support \"preview\" modes where all fields are disabled.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * The document or template field to display.\n */\n @Prop() initials: string = '';\n\n /**\n * If set, a settings icon will be displayed on hover. The settings shown allow the field's recipient and other settings to be\n * changed, so it should typically only be enabled in the Builder.\n */\n @Prop() editable?: boolean = false;\n\n /**\n * If set, the field may be dragged to a new location. This should only be enabled in the Builder, or for self-placed fields.\n */\n @Prop() moveable?: boolean = false;\n\n /**\n * If set, the field is considered \"done\" and is drawn in a display-final-value state.\n */\n @Prop() done?: boolean = false;\n\n /**\n * If set, the field will be colored using this index value to select the background color.\n */\n @Prop() roleindex?: number = 0;\n\n /**\n * Event emitted when an initial block is adopted by the user. The event detail will contain the base64 string of the initial image.\n */\n @Event({composed: true}) adopt: EventEmitter<string>;\n\n /**\n * Event emitted when the user cancels the process.\n */\n @Event({composed: true}) cancel: EventEmitter;\n\n /**\n * Event fired when the input field value changes. Note that this will only be fired on blur, tab-out, ENTER key press, etc.\n * It is generally the best event to subscribe to than `input` for most cases EXCEPT autocomplete fields that need to see every\n * keypress.\n */\n @Event({composed: true}) fieldChange: EventEmitter<string>;\n\n /**\n * Event fired on every character entered into / deleted from the field.\n */\n @Event({composed: true}) settingsPress: EventEmitter;\n\n @Method() async focusField() {\n this.handleShow();\n }\n\n @State()\n tempInitials: string = '';\n\n private dialog?: any;\n\n hideDialog() {\n this.dialog?.remove();\n this.dialog = null;\n }\n\n handleAdopt(e: any) {\n console.log('[INITIAL] Adopted initials');\n this.tempInitials = e.detail;\n this.fieldChange?.emit(this.tempInitials);\n this.hideDialog();\n }\n\n handleShow() {\n this.dialog = document.createElement('verdocs-initial-dialog');\n this.dialog.setAttribute('initials', this.initials);\n this.dialog.setAttribute('roleindex', this.roleindex);\n this.dialog.addEventListener('cancel', () => this.hideDialog());\n this.dialog.addEventListener('next', e => this.handleAdopt(e));\n document.body.append(this.dialog);\n }\n\n render() {\n const settings = getFieldSettings(this.field);\n const value = settings.base64 || this.tempInitials;\n const disabled = this.disabled ?? settings.disabled ?? false;\n const backgroundColor = this.field['rgba'] || getRGBA(this.roleindex);\n\n if (this.done) {\n return <Host class={{done: this.done}}>{value && <img src={value} alt=\"Initials\" />}</Host>;\n }\n\n return (\n <Host class={{required: settings.required, disabled}} style={{backgroundColor}}>\n {value ? (\n <img src={value} alt=\"Initials\" />\n ) : (\n <button class={{}} onClick={() => !disabled && this.handleShow()}>\n Initials\n </button>\n )}\n\n {this.editable && (\n <verdocs-button-panel icon={settingsIcon}>\n <h6>Field Settings</h6>\n <form>\n <verdocs-select-input\n label=\"Recipient\"\n options={[\n {label: 'Buyer', value: 'Buyer'},\n {label: 'Seller', value: 'Seller'},\n ]}\n />\n\n <verdocs-text-input label=\"Field Name\" value=\"\" placeholder=\"Stored field name...\" onInput={e => console.log('ipt', e)} />\n <verdocs-text-input label=\"Placeholder\" value=\"\" placeholder=\"Placeholder text...\" onInput={e => console.log('ipt', e)} />\n </form>\n </verdocs-button-panel>\n )}\n </Host>\n );\n }\n}\n"]}
|
package/dist/collection/components/elements/verdocs-field-signature/verdocs-field-signature.js
CHANGED
|
@@ -44,13 +44,13 @@ export class VerdocsFieldSignature {
|
|
|
44
44
|
render() {
|
|
45
45
|
var _a, _b, _c;
|
|
46
46
|
const settings = getFieldSettings(this.field);
|
|
47
|
-
const value =
|
|
47
|
+
const value = settings.base64 || this.tempSignature;
|
|
48
48
|
const disabled = (_b = (_a = this.disabled) !== null && _a !== void 0 ? _a : settings.disabled) !== null && _b !== void 0 ? _b : false;
|
|
49
49
|
const backgroundColor = this.field['rgba'] || getRGBA(this.roleindex);
|
|
50
50
|
if (this.done) {
|
|
51
|
-
return h(Host, { class: { done: this.done } }, value && h("img", { src:
|
|
51
|
+
return h(Host, { class: { done: this.done } }, value && h("img", { src: value, alt: "Signature" }));
|
|
52
52
|
}
|
|
53
|
-
return (h(Host, { class: { required: (_c = this.field) === null || _c === void 0 ? void 0 : _c.required, disabled }, style: { backgroundColor } }, value ? h("img", { src:
|
|
53
|
+
return (h(Host, { class: { required: (_c = this.field) === null || _c === void 0 ? void 0 : _c.required, disabled }, style: { backgroundColor } }, value ? h("img", { src: value, alt: "Signature" }) : h("button", { onClick: () => !disabled && this.handleShow() }, "Signature"), this.editable && (h("verdocs-button-panel", { icon: settingsIcon }, h("h6", null, "Field Settings"), h("form", null, h("verdocs-select-input", { label: "Recipient", options: [
|
|
54
54
|
{ label: 'Buyer', value: 'Buyer' },
|
|
55
55
|
{ label: 'Seller', value: 'Seller' },
|
|
56
56
|
] }), h("verdocs-text-input", { label: "Field Name", value: "", placeholder: "Stored field name...", onInput: e => console.log('ipt', e) }), h("verdocs-text-input", { label: "Placeholder", value: "", placeholder: "Placeholder text...", onInput: e => console.log('ipt', e) }))))));
|
package/dist/collection/components/elements/verdocs-field-signature/verdocs-field-signature.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdocs-field-signature.js","sourceRoot":"","sources":["../../../../src/components/elements/verdocs-field-signature/verdocs-field-signature.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,8BAA8B,CAAC;AAGrD,OAAO,EAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAEtD,MAAM,YAAY,GAChB,wrCAAwrC,CAAC;AAE3rC;;;GAG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AAC;EAED,MAAM;;IACJ,MAAM,QAAQ,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"verdocs-field-signature.js","sourceRoot":"","sources":["../../../../src/components/elements/verdocs-field-signature/verdocs-field-signature.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,8BAA8B,CAAC;AAGrD,OAAO,EAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAEtD,MAAM,YAAY,GAChB,wrCAAwrC,CAAC;AAE3rC;;;GAGG;AAMH,MAAM,OAAO,qBAAqB;;iBAIwB,IAAI;gBAKpC,EAAE;oBAKG,KAAK;oBAML,KAAK;oBAKL,KAAK;gBAKT,KAAK;qBAKD,CAAC;yBAkBN,EAAE;;EANhB,KAAK,CAAC,UAAU;IACxB,IAAI,CAAC,UAAU,EAAE,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;EAC/B,CAAC;EAOD,UAAU;;IACR,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,EAAE,CAAC;IACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;EACrB,CAAC;EAED,WAAW,CAAC,CAAM;;IAChB,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;IAC7C,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3C,IAAI,CAAC,UAAU,EAAE,CAAC;EACpB,CAAC;EAED,UAAU;IACR,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,0BAA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-sdk/Envelopes/Types';\nimport {Component, h, Host, Prop, Event, EventEmitter, Method, State} from '@stencil/core';\nimport {getFieldSettings} from '../../../utils/utils';\n\nconst settingsIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20\" width=\"20\"><path d=\"m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z\"/></svg>';\n\n/**\n * Displays a signature field. If a signature already exists, it will be displayed and the field will be disabled. Otherwise, a placeholder\n * button will be shown. Clicking the button will show a dialog to adopt a signature.\n */\n@Component({\n tag: 'verdocs-field-signature',\n styleUrl: 'verdocs-field-signature.scss',\n shadow: false,\n})\nexport class VerdocsFieldSignature {\n /**\n * The document or template field to display.\n */\n @Prop() field: IDocumentField | ITemplateField | null = null;\n\n /**\n * If set, the signature creation dialog will be initialized with this text.\n */\n @Prop() name?: string = '';\n\n /**\n * If set, overrides the field's settings object. Primarily used to support \"preview\" modes where all fields are disabled.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If set, a settings icon will be displayed on hover. The settings shown allow the field's recipient and other settings to be\n * changed, so it should typically only be enabled in the Builder.\n */\n @Prop() editable?: boolean = false;\n\n /**\n * If set, the field may be dragged to a new location. This should only be enabled in the Builder, or for self-placed fields.\n */\n @Prop() moveable?: boolean = false;\n\n /**\n * If set, the field is considered \"done\" and is drawn in a display-final-value state.\n */\n @Prop() done?: boolean = false;\n\n /**\n * If set, the field will be colored using this index value to select the background color.\n */\n @Prop() roleindex?: number = 0;\n\n /**\n * Event emitted when the field has changed.\n */\n @Event({composed: true}) fieldChange: EventEmitter<string>;\n\n /**\n * Event fired on every character entered into / deleted from the field.\n */\n @Event({composed: true}) settingsPress: EventEmitter;\n\n @Method() async focusField() {\n this.handleShow();\n console.log('focused', this);\n }\n\n @State()\n tempSignature: string = '';\n\n private dialog?: any;\n\n hideDialog() {\n this.dialog?.remove();\n this.dialog = null;\n }\n\n handleAdopt(e: any) {\n console.log('[SIGNATURE] Adopted signature');\n this.tempSignature = e.detail;\n this.fieldChange?.emit(this.tempSignature);\n this.hideDialog();\n }\n\n handleShow() {\n this.dialog = document.createElement('verdocs-signature-dialog');\n this.dialog.setAttribute('name', this.name);\n this.dialog.setAttribute('roleindex', this.roleindex);\n this.dialog.addEventListener('cancel', () => this.hideDialog());\n this.dialog.addEventListener('next', e => this.handleAdopt(e));\n document.body.append(this.dialog);\n }\n\n render() {\n const settings = getFieldSettings(this.field);\n const value = settings.base64 || this.tempSignature;\n const disabled = this.disabled ?? settings.disabled ?? false;\n const backgroundColor = this.field['rgba'] || getRGBA(this.roleindex);\n\n if (this.done) {\n return <Host class={{done: this.done}}>{value && <img src={value} alt=\"Signature\" />}</Host>;\n }\n\n return (\n <Host class={{required: this.field?.required, disabled}} style={{backgroundColor}}>\n {value ? <img src={value} alt=\"Signature\" /> : <button onClick={() => !disabled && this.handleShow()}>Signature</button>}\n\n {this.editable && (\n <verdocs-button-panel icon={settingsIcon}>\n <h6>Field Settings</h6>\n <form>\n <verdocs-select-input\n label=\"Recipient\"\n options={[\n {label: 'Buyer', value: 'Buyer'},\n {label: 'Seller', value: 'Seller'},\n ]}\n />\n\n <verdocs-text-input label=\"Field Name\" value=\"\" placeholder=\"Stored field name...\" onInput={e => console.log('ipt', e)} />\n <verdocs-text-input label=\"Placeholder\" value=\"\" placeholder=\"Placeholder text...\" onInput={e => console.log('ipt', e)} />\n </form>\n </verdocs-button-panel>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -6,7 +6,7 @@ import { envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubm
|
|
|
6
6
|
import { isValidEmail, isValidPhone } from '@verdocs/js-sdk/Templates/Validators';
|
|
7
7
|
import { Host, Fragment, h } from '@stencil/core';
|
|
8
8
|
import { updateEnvelopeFieldInitials, updateEnvelopeFieldSignature } from '@verdocs/js-sdk/Envelopes/Envelopes';
|
|
9
|
-
import { fullNameToInitials, getFieldId, getRoleIndex, renderDocumentField, savePDF } from '../../../utils/utils';
|
|
9
|
+
import { fullNameToInitials, getFieldId, getRoleIndex, renderDocumentField, savePDF, updateDocumentFieldValue } from '../../../utils/utils';
|
|
10
10
|
import { getEnvelopeById } from '../../../utils/Envelopes';
|
|
11
11
|
import EnvelopeStore from '../../../utils/envelopeStore';
|
|
12
12
|
import { SDKError } from '../../../utils/errors';
|
|
@@ -75,22 +75,23 @@ export class VerdocsSign {
|
|
|
75
75
|
});
|
|
76
76
|
console.log(`[SIGN] Loaded signing session ${session.email} / ${session.profile_id}`);
|
|
77
77
|
this.recipient = recipient;
|
|
78
|
+
console.log('[SIGN] We are recipient', this.recipient);
|
|
78
79
|
this.signerToken = signerToken;
|
|
79
80
|
this.endpoint.setToken(signerToken);
|
|
80
81
|
if (this.recipient.agreed) {
|
|
81
82
|
this.nextButtonLabel = 'Next';
|
|
82
83
|
}
|
|
83
84
|
await getEnvelopeById(this.endpoint, this.envelopeId);
|
|
84
|
-
// const envelope = await Envelopes.getEnvelope(this.endpoint, this.envelopeId);
|
|
85
|
-
// this.envelope = envelope;
|
|
86
|
-
// console.log('[SIGN] Loaded envelope', envelope);
|
|
87
85
|
this.recipientIndex = EnvelopeStore.envelope.recipients.findIndex(recipient => recipient.role_name == this.roleId);
|
|
88
86
|
if (this.recipientIndex > -1) {
|
|
89
87
|
this.recipient = EnvelopeStore.envelope.recipients[this.recipientIndex];
|
|
90
88
|
this.fields = this.recipient.fields;
|
|
89
|
+
console.log('[SIGN] Found our recipient in the envelope', this.recipientIndex, this.recipient, this.fields);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
console.log('[SIGN] Could not find our recipient record', this.roleId, EnvelopeStore.envelope.recipients);
|
|
91
93
|
}
|
|
92
94
|
this.isDone = ['submitted', 'canceled', 'declined'].includes(this.recipient.status);
|
|
93
|
-
console.log('Done', this.isDone);
|
|
94
95
|
// TODO: Fix service to allow this?
|
|
95
96
|
// const sigs = await getSignatures();
|
|
96
97
|
// console.log('sigs', sigs);
|
|
@@ -142,8 +143,21 @@ export class VerdocsSign {
|
|
|
142
143
|
break;
|
|
143
144
|
}
|
|
144
145
|
}
|
|
146
|
+
updateRecipientFieldValue(fieldName, updateResult) {
|
|
147
|
+
this.recipient.fields.forEach(oldField => {
|
|
148
|
+
if (oldField.name === fieldName) {
|
|
149
|
+
console.log('New settings', fieldName, updateResult.settings);
|
|
150
|
+
oldField.settings = updateResult.settings;
|
|
151
|
+
// TODO: When we break out other fields like value, update them here too
|
|
152
|
+
updateDocumentFieldValue(oldField);
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}
|
|
145
156
|
saveFieldChange(fieldName, fields) {
|
|
146
157
|
Envelopes.updateEnvelopeField(this.endpoint, this.envelopeId, fieldName, fields) //
|
|
158
|
+
.then(updateResult => {
|
|
159
|
+
this.updateRecipientFieldValue(fieldName, updateResult);
|
|
160
|
+
})
|
|
147
161
|
.catch(e => {
|
|
148
162
|
var _a, _b, _c, _d, _e, _f;
|
|
149
163
|
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') {
|
|
@@ -175,16 +189,16 @@ export class VerdocsSign {
|
|
|
175
189
|
case 'initial':
|
|
176
190
|
const initialsBlob = await (await fetch(e.detail)).blob();
|
|
177
191
|
return createInitials(this.endpoint, 'initial', initialsBlob) //
|
|
178
|
-
.then(newInitials => {
|
|
179
|
-
|
|
180
|
-
|
|
192
|
+
.then(async (newInitials) => {
|
|
193
|
+
const updateResult = await updateEnvelopeFieldInitials(this.endpoint, this.envelopeId, field.name, newInitials.id);
|
|
194
|
+
this.updateRecipientFieldValue(field.name, updateResult);
|
|
181
195
|
});
|
|
182
196
|
case 'signature':
|
|
183
197
|
const signatureBlob = await (await fetch(e.detail)).blob();
|
|
184
198
|
return createSignature(this.endpoint, 'signature', signatureBlob) //
|
|
185
|
-
.then(newSignature => {
|
|
186
|
-
|
|
187
|
-
|
|
199
|
+
.then(async (newSignature) => {
|
|
200
|
+
const updateResult = await updateEnvelopeFieldSignature(this.endpoint, this.envelopeId, field.name, newSignature.id);
|
|
201
|
+
this.updateRecipientFieldValue(field.name, updateResult);
|
|
188
202
|
});
|
|
189
203
|
case 'date':
|
|
190
204
|
const iso = e.target.getAttribute('iso');
|
|
@@ -213,6 +227,7 @@ export class VerdocsSign {
|
|
|
213
227
|
}
|
|
214
228
|
case 'signature':
|
|
215
229
|
case 'initial':
|
|
230
|
+
console.log('Evaluating initial field', field);
|
|
216
231
|
return !required || base64 !== '';
|
|
217
232
|
// Timestamp fields get automatically filled when the envelope is submitted.
|
|
218
233
|
case 'timestamp':
|
|
@@ -245,19 +260,11 @@ export class VerdocsSign {
|
|
|
245
260
|
console.log('[SIGN] Submitted successfully', result);
|
|
246
261
|
this.showDone = true;
|
|
247
262
|
this.isDone = true;
|
|
248
|
-
// updateRecipientStatus()
|
|
249
263
|
}
|
|
250
264
|
catch (e) {
|
|
251
265
|
console.log('Error submitting', e);
|
|
252
266
|
}
|
|
253
267
|
return;
|
|
254
|
-
// You're done.
|
|
255
|
-
// You can access the Verdoc at any time by clicking on the link from invitation email.
|
|
256
|
-
//
|
|
257
|
-
// After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.
|
|
258
|
-
//
|
|
259
|
-
// Thank you for using Verdocs.
|
|
260
|
-
// Got it, thanks
|
|
261
268
|
}
|
|
262
269
|
// Find and focus the next incomplete required field
|
|
263
270
|
const requiredFields = this.fields.filter(field => field.required);
|
|
@@ -296,12 +303,14 @@ export class VerdocsSign {
|
|
|
296
303
|
}
|
|
297
304
|
else {
|
|
298
305
|
console.log('[SIGN] Remaining invalid fields', invalidFields);
|
|
306
|
+
this.nextButtonLabel = 'Next';
|
|
299
307
|
this.nextSubmits = false;
|
|
300
308
|
}
|
|
301
309
|
}
|
|
302
310
|
attachFieldAttributes(pageInfo, field, roleIndex, el) {
|
|
303
311
|
var _a;
|
|
304
312
|
el.addEventListener('input', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));
|
|
313
|
+
el.addEventListener('blur', () => this.checkRecipientFields());
|
|
305
314
|
el.addEventListener('fieldChange', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));
|
|
306
315
|
el.setAttribute('roleindex', roleIndex);
|
|
307
316
|
el.setAttribute('xScale', pageInfo.xScale);
|
|
@@ -353,19 +362,34 @@ export class VerdocsSign {
|
|
|
353
362
|
// Render fields for "the other" recipients
|
|
354
363
|
EnvelopeStore.envelope.recipients
|
|
355
364
|
.filter(recipient => recipient.role_name !== this.recipient.role_name)
|
|
356
|
-
.
|
|
365
|
+
.forEach(otherRecipient => {
|
|
357
366
|
const otherRoleIndex = getRoleIndex(EnvelopeStore.roleNames, otherRecipient.role_name);
|
|
358
367
|
const recipientFields = otherRecipient.fields.filter(field => field.page === pageInfo.pageNumber);
|
|
359
|
-
//
|
|
368
|
+
// We don't render other recipients' fields if they've already acted, because those values are now stamped into the document page.
|
|
369
|
+
// TODO: Do we want to render alternate treatments for recipients who have declined (red boxes?) and/or if the envelope is cancelled?
|
|
370
|
+
// TODO: When doing server-side rendering we probably want to "stamp" values into the rendered PDF only once the recipient is done
|
|
371
|
+
// acting. Do this once vSign is in Production.
|
|
372
|
+
// TODO: Changed tacks here. During signing we show the template PDFs and everybody's fields, filled in or no. When done, we switch
|
|
373
|
+
// to showing the envelope PDFs with stamped-in values. Confirm this is a good approach.
|
|
374
|
+
// if (!['submitted', 'signed'].includes(otherRecipient.status)) {
|
|
360
375
|
recipientFields.forEach(field => {
|
|
361
|
-
const el = renderDocumentField(field, pageInfo, otherRoleIndex, {
|
|
376
|
+
const el = renderDocumentField(field, pageInfo, otherRoleIndex, {
|
|
377
|
+
disabled: true,
|
|
378
|
+
editable: false,
|
|
379
|
+
draggable: false,
|
|
380
|
+
done: this.isDone,
|
|
381
|
+
});
|
|
362
382
|
if (!el) {
|
|
363
383
|
return;
|
|
364
384
|
}
|
|
365
|
-
el.setAttribute
|
|
366
|
-
el.setAttribute
|
|
367
|
-
|
|
385
|
+
// TODO: Research why this occurs. There are cases when we're getting "el.setAttribute is not a function"
|
|
386
|
+
if (el.setAttribute) {
|
|
387
|
+
el.setAttribute('roleindex', otherRoleIndex);
|
|
388
|
+
el.setAttribute('xScale', pageInfo.xScale);
|
|
389
|
+
el.setAttribute('yScale', pageInfo.yScale);
|
|
390
|
+
}
|
|
368
391
|
});
|
|
392
|
+
// }
|
|
369
393
|
});
|
|
370
394
|
this.checkRecipientFields();
|
|
371
395
|
}
|
|
@@ -381,14 +405,27 @@ export class VerdocsSign {
|
|
|
381
405
|
{ id: 'print', label: 'Print Without Signing', disabled: true },
|
|
382
406
|
{ id: 'download', label: 'Download' },
|
|
383
407
|
];
|
|
384
|
-
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" }, EnvelopeStore.envelope.name), h("div", { style: { flex: '1' } }), h("div", { innerHTML: PrintIcon, style: { width: '24px', height: '24px', fill: '#
|
|
408
|
+
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" }, EnvelopeStore.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, EnvelopeStore.envelope, EnvelopeStore.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 ? (
|
|
409
|
+
// <div>test</div>
|
|
410
|
+
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" }, (EnvelopeStore.envelope.documents || []).map(envelopeDocument => {
|
|
385
411
|
const pages = [...((envelopeDocument === null || envelopeDocument === void 0 ? void 0 : envelopeDocument.pages) || [])];
|
|
386
412
|
pages.sort((a, b) => a.sequence - b.sequence);
|
|
387
|
-
return (h(Fragment, null, pages.map(page =>
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
413
|
+
return (h(Fragment, null, pages.map(page => {
|
|
414
|
+
var _a;
|
|
415
|
+
// In signing mode we show the original template page with all the recipient fields so we can show source formatting and
|
|
416
|
+
// where everything went. This is also a visual indicator when optional fields weren't filled in by previous actors, or
|
|
417
|
+
// future signers still need to act. Once we're "done" we flip to showing the envelope's documents which have the final
|
|
418
|
+
// field vales (so far) stamped into them.
|
|
419
|
+
const templatePage = (_a = EnvelopeStore.template) === null || _a === void 0 ? void 0 : _a.pages.find(p => p.sequence === page.sequence);
|
|
420
|
+
// TODO: Confirm that a pure page-number match is good enough to find the matching template page. We need to make sure
|
|
421
|
+
// we either don't reset our page numbers for additional attachments, or add match-on identifiers to work around that.
|
|
422
|
+
// console.log('tp', templatePage, page);
|
|
423
|
+
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: [
|
|
424
|
+
{ name: 'page', type: 'canvas' },
|
|
425
|
+
{ name: 'controls', type: 'div' },
|
|
426
|
+
] }));
|
|
427
|
+
})));
|
|
428
|
+
}))), 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) }))));
|
|
392
429
|
}
|
|
393
430
|
static get is() { return "verdocs-sign"; }
|
|
394
431
|
static get originalStyleUrls() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdocs-sign.js","sourceRoot":"","sources":["../../../../src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAC,cAAc,EAAC,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAC,eAAe,EAAC,MAAM,sCAAsC,CAAC;AAErE,OAAO,EAAC,sBAAsB,EAAE,wBAAwB,EAAE,uBAAuB,EAAC,MAAM,sCAAsC,CAAC;AAC/H,OAAO,EAAC,YAAY,EAAE,YAAY,EAAC,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAC,KAAK,EAAgB,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAC,2BAA2B,EAAE,4BAA4B,EAAC,MAAM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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
1
|
+
{"version":3,"file":"verdocs-sign.js","sourceRoot":"","sources":["../../../../src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAC,cAAc,EAAC,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAC,eAAe,EAAC,MAAM,sCAAsC,CAAC;AAErE,OAAO,EAAC,sBAAsB,EAAE,wBAAwB,EAAE,uBAAuB,EAAC,MAAM,sCAAsC,CAAC;AAC/H,OAAO,E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E,IAAI,EAAE,KAAK,EAAC;aAChC,GACD,CACH,CAAC;QACJ,CAAC,CAAC,CACO,CACZ,CAAC;MACJ,CAAC,CAAC,CACE,CACP;MAEA,IAAI,CAAC,eAAe,IAAI,CACvB,yBACE,OAAO,EAAC,6CAA6C,EACrD,OAAO,EAAC,2HAA2H,EACnI,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,GAC5C,CACH;MAEA,IAAI,CAAC,YAAY,IAAI,yBAAmB,OAAO,EAAC,eAAe,EAAC,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,GAAI;MACtI,IAAI,CAAC,QAAQ,IAAI,CAChB,yBACE,OAAO,EAAC,cAAc,EACtB,OAAO,EAAC,uOAAuO,EAC/O,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,GACrC,CACH,CACI,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
@@ -3,9 +3,10 @@ export default {
|
|
|
3
3
|
title: 'Embeds/Sign',
|
|
4
4
|
component: 'verdocs-sign',
|
|
5
5
|
args: {
|
|
6
|
-
|
|
6
|
+
// https://verdocs.com/view/sign/42158c4b-8520-4e30-bbcc-65cd4590cdde/roleName/Seller/invitation/50d97f77ace9d8c87e2e9c40d2bd10fd
|
|
7
|
+
envelopeId: '42158c4b-8520-4e30-bbcc-65cd4590cdde',
|
|
7
8
|
roleId: 'Seller',
|
|
8
|
-
inviteCode: '
|
|
9
|
+
inviteCode: '50d97f77ace9d8c87e2e9c40d2bd10fd',
|
|
9
10
|
},
|
|
10
11
|
argTypes: {},
|
|
11
12
|
parameters: {
|