@verdocs/web-sdk 6.9.13 → 6.10.0
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/verdocs-adopt-signature-dialog_7.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-auth.cjs.entry.js +0 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +422 -115
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js +6 -6
- package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +6 -6
- package/dist/cjs/verdocs-field-attachment_11.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-menu-panel_2.cjs.entry.js +7 -7
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_6.cjs.entry.js +0 -1
- package/dist/cjs/verdocs-preview_6.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-quick-functions.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +75 -20
- package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
- package/dist/collection/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.js +3 -3
- package/dist/collection/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.js.map +1 -1
- package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-otp-dialog/verdocs-otp-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-passcode-dialog/verdocs-passcode-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +1 -1
- package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.js +1 -1
- package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.js +1 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +0 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +0 -1
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +75 -20
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/collection/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.js +1 -1
- package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.js +6 -6
- package/dist/collection/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.js +1 -1
- package/dist/collection/components/envelopes/verdocs-status-indicator/verdocs-status-indicator.js +2 -2
- package/dist/collection/components/templates/verdocs-template-card/verdocs-template-card.js +1 -1
- package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +7 -7
- package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +1 -1
- package/dist/collection/components/templates/verdocs-template-tags/verdocs-template-tags.js +1 -1
- package/dist/components/{p-DSK9z7EN.js → p-BT8wzCXz.js} +2 -2
- package/dist/components/{p-CGt7KiUu.js → p-BvtSJusb.js} +2 -2
- package/dist/components/{p-BIc5CIpg.js → p-BxOEoXie.js} +2 -2
- package/dist/components/{p-DClinO5r.js → p-C-V6jrel.js} +2 -2
- package/dist/components/{p-Bkae9I4G.js → p-CBKrl6B7.js} +2 -2
- package/dist/components/{p-qDQgyl7L.js → p-CDMCVJys.js} +2 -2
- package/dist/components/{p-sPseFic3.js → p-CFEw4Xbi.js} +2 -2
- package/dist/components/p-CPYFXW2q.js +3 -0
- package/dist/components/p-CPYFXW2q.js.map +1 -0
- package/dist/components/{p-DGws2Zgt.js → p-CnoHN1S8.js} +2 -2
- package/dist/components/{p-DGws2Zgt.js.map → p-CnoHN1S8.js.map} +1 -1
- package/dist/components/{p-BwUTiBud.js → p-D3qUITiS.js} +2 -2
- package/dist/components/{p-DyhyfLyV.js → p-DIOVejyL.js} +2 -2
- package/dist/components/{p-DRgoGiAA.js → p-DVGumEtx.js} +2 -2
- package/dist/components/{p-C8r3qDBh.js → p-DfaM_cug.js} +2 -2
- package/dist/components/p-DfaM_cug.js.map +1 -0
- package/dist/components/{p-BcQsqsDy.js → p-DjOTs59Z.js} +2 -2
- package/dist/components/{p-CSIVZcVx.js → p-Dmw-lE3L.js} +2 -2
- package/dist/components/{p-CGWVITS0.js → p-DsEO0-XR.js} +2 -2
- package/dist/components/{p-BfKv6ivN.js → p-Dtndevf4.js} +2 -2
- package/dist/components/{p-db6IAGB0.js → p-Yxa93LOl.js} +2 -2
- package/dist/components/{p-DXbBz25U.js → p-tub_01MP.js} +2 -2
- package/dist/components/{p-CQUV5gMT.js → p-u16vefxk.js} +2 -2
- package/dist/components/verdocs-auth.js.map +1 -1
- package/dist/components/verdocs-build.js +1 -1
- package/dist/components/verdocs-contact-picker.js +1 -1
- package/dist/components/verdocs-download-dialog.js +1 -1
- package/dist/components/verdocs-envelope-document-page.js +1 -1
- package/dist/components/verdocs-envelope-sidebar.js +1 -1
- package/dist/components/verdocs-envelopes-list.js +1 -1
- package/dist/components/verdocs-field-attachment.js +1 -1
- package/dist/components/verdocs-initial-dialog.js +1 -1
- package/dist/components/verdocs-ok-dialog.js +1 -1
- package/dist/components/verdocs-otp-dialog.js +1 -1
- package/dist/components/verdocs-passcode-dialog.js +1 -1
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-question-dialog.js +1 -1
- package/dist/components/verdocs-quick-functions.js +1 -1
- package/dist/components/verdocs-search-tabs.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-sign-footer.js +1 -1
- package/dist/components/verdocs-sign.js +1 -1
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-signature-dialog.js +1 -1
- package/dist/components/verdocs-status-indicator.js +1 -1
- package/dist/components/verdocs-template-attachments.js +1 -1
- package/dist/components/verdocs-template-card.js +1 -1
- package/dist/components/verdocs-template-document-page.js +1 -1
- package/dist/components/verdocs-template-fields.js +1 -1
- package/dist/components/verdocs-template-role-properties.js +1 -1
- package/dist/components/verdocs-template-roles.js +1 -1
- package/dist/components/verdocs-template-star.js +1 -1
- package/dist/components/verdocs-template-tags.js +1 -1
- package/dist/components/verdocs-templates-list.js +1 -1
- package/dist/components/verdocs-upload-dialog.js +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js +2 -2
- package/dist/esm/verdocs-auth.entry.js +0 -1
- package/dist/esm/verdocs-auth.entry.js.map +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +422 -115
- package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm/verdocs-download-dialog_4.entry.js +6 -6
- package/dist/esm/verdocs-download-dialog_4.entry.js.map +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +6 -6
- package/dist/esm/verdocs-field-attachment_11.entry.js +1 -1
- package/dist/esm/verdocs-initial-dialog.entry.js +1 -1
- package/dist/esm/verdocs-menu-panel_2.entry.js +7 -7
- package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm/verdocs-preview_6.entry.js +0 -1
- package/dist/esm/verdocs-preview_6.entry.js.map +1 -1
- package/dist/esm/verdocs-quick-functions.entry.js +1 -1
- package/dist/esm/verdocs-search-tabs.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +76 -21
- package/dist/esm/verdocs-sign.entry.js.map +1 -1
- package/dist/esm/verdocs-signature-dialog.entry.js +1 -1
- package/dist/esm/verdocs-status-indicator.entry.js +2 -2
- package/dist/esm/verdocs-template-card.entry.js +1 -1
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-template-tags.entry.js +1 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +2 -2
- package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-download-dialog_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-download-dialog_4.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_11.entry.js +1 -1
- package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-menu-panel_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_6.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
- package/dist/esm-es5/verdocs-search-tabs.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-signature-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +5 -0
- package/dist/verdocs-web-sdk/{p-b1146326.system.entry.js → p-04d2fa80.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-11c3e5bb.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-11c3e5bb.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-15a1b8b5.system.entry.js → p-16d655d4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-16d655d4.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-b6390a11.system.entry.js → p-1827477d.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-b2aa0637.system.entry.js → p-1929a794.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-1ce27c81.system.entry.js +4 -0
- package/dist/verdocs-web-sdk/p-1ce27c81.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-82d0e009.entry.js → p-1f1fc6d7.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-2d72560a.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-2d72560a.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-0625e073.system.entry.js → p-2f96e7c9.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-33cfc977.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-33cfc977.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-07a07c6b.system.entry.js → p-40f5ecf3.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-cbfc895c.entry.js → p-421c231a.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-ed5c3f2d.entry.js → p-43ee0267.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-43ee0267.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-36aa8081.system.entry.js → p-4798c2a5.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-bd17bff7.system.entry.js → p-495ed75e.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-4e84a5b6.entry.js +3 -0
- package/dist/verdocs-web-sdk/p-4e84a5b6.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-62b6402f.entry.js +2 -0
- package/dist/verdocs-web-sdk/{p-4d8bf603.system.entry.js → p-6754dfcf.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-682c5a5c.entry.js +2 -0
- package/dist/verdocs-web-sdk/{p-5678acd8.entry.js → p-810e09ca.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-e207c469.entry.js → p-842c345c.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-BdZ5Ghsa.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-3c9a2290.system.entry.js → p-c5b70927.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-c3660cce.system.entry.js → p-ca03555a.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-609527c7.entry.js → p-cfb275c5.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-4934f908.entry.js → p-d09a4bb9.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-ae92881f.entry.js → p-d0e8419b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-d0e8419b.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-e991121e.system.entry.js → p-d3b798ae.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-ba39a8ce.system.entry.js → p-d3d177d0.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-98adcb3a.entry.js → p-d4f72da9.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-b35a1ea8.system.entry.js → p-d60cfa3e.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-e608d2bc.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-e608d2bc.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-c2b70cb9.entry.js → p-e632e92c.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-1f898c53.entry.js → p-e95723ac.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-996cc1f6.entry.js → p-ed953cca.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-d5cfbdac.system.entry.js → p-edab1fed.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-edab1fed.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-fff5d042.entry.js → p-f97ca49e.entry.js} +2 -2
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/components/p-C8r3qDBh.js.map +0 -1
- package/dist/components/p-DeQsR41s.js +0 -3
- package/dist/components/p-DeQsR41s.js.map +0 -1
- package/dist/verdocs-web-sdk/p-15a1b8b5.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-2fa4010a.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-2fa4010a.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-3a542ed0.system.entry.js +0 -4
- package/dist/verdocs-web-sdk/p-3a542ed0.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-48e2baa9.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-48e2baa9.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-4fe507ee.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-90400330.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-ae4290c6.entry.js +0 -3
- package/dist/verdocs-web-sdk/p-ae4290c6.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-ae92881f.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-b81c87ee.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-b81c87ee.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-d5cfbdac.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-e679a32a.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-e679a32a.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-ed5c3f2d.entry.js.map +0 -1
- /package/dist/components/{p-DSK9z7EN.js.map → p-BT8wzCXz.js.map} +0 -0
- /package/dist/components/{p-CGt7KiUu.js.map → p-BvtSJusb.js.map} +0 -0
- /package/dist/components/{p-BIc5CIpg.js.map → p-BxOEoXie.js.map} +0 -0
- /package/dist/components/{p-DClinO5r.js.map → p-C-V6jrel.js.map} +0 -0
- /package/dist/components/{p-Bkae9I4G.js.map → p-CBKrl6B7.js.map} +0 -0
- /package/dist/components/{p-qDQgyl7L.js.map → p-CDMCVJys.js.map} +0 -0
- /package/dist/components/{p-sPseFic3.js.map → p-CFEw4Xbi.js.map} +0 -0
- /package/dist/components/{p-BwUTiBud.js.map → p-D3qUITiS.js.map} +0 -0
- /package/dist/components/{p-DyhyfLyV.js.map → p-DIOVejyL.js.map} +0 -0
- /package/dist/components/{p-DRgoGiAA.js.map → p-DVGumEtx.js.map} +0 -0
- /package/dist/components/{p-BcQsqsDy.js.map → p-DjOTs59Z.js.map} +0 -0
- /package/dist/components/{p-CSIVZcVx.js.map → p-Dmw-lE3L.js.map} +0 -0
- /package/dist/components/{p-CGWVITS0.js.map → p-DsEO0-XR.js.map} +0 -0
- /package/dist/components/{p-BfKv6ivN.js.map → p-Dtndevf4.js.map} +0 -0
- /package/dist/components/{p-db6IAGB0.js.map → p-Yxa93LOl.js.map} +0 -0
- /package/dist/components/{p-DXbBz25U.js.map → p-tub_01MP.js.map} +0 -0
- /package/dist/components/{p-CQUV5gMT.js.map → p-u16vefxk.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-b1146326.system.entry.js.map → p-04d2fa80.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-b6390a11.system.entry.js.map → p-1827477d.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-b2aa0637.system.entry.js.map → p-1929a794.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-82d0e009.entry.js.map → p-1f1fc6d7.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-0625e073.system.entry.js.map → p-2f96e7c9.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-07a07c6b.system.entry.js.map → p-40f5ecf3.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-cbfc895c.entry.js.map → p-421c231a.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-36aa8081.system.entry.js.map → p-4798c2a5.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-bd17bff7.system.entry.js.map → p-495ed75e.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-4fe507ee.entry.js.map → p-62b6402f.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-4d8bf603.system.entry.js.map → p-6754dfcf.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-90400330.entry.js.map → p-682c5a5c.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-5678acd8.entry.js.map → p-810e09ca.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-e207c469.entry.js.map → p-842c345c.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-3c9a2290.system.entry.js.map → p-c5b70927.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-c3660cce.system.entry.js.map → p-ca03555a.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-609527c7.entry.js.map → p-cfb275c5.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-4934f908.entry.js.map → p-d09a4bb9.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-e991121e.system.entry.js.map → p-d3b798ae.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-ba39a8ce.system.entry.js.map → p-d3d177d0.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-98adcb3a.entry.js.map → p-d4f72da9.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-b35a1ea8.system.entry.js.map → p-d60cfa3e.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-c2b70cb9.entry.js.map → p-e632e92c.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-1f898c53.entry.js.map → p-e95723ac.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-996cc1f6.entry.js.map → p-ed953cca.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-fff5d042.entry.js.map → p-f97ca49e.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as s,c as t,h as i,d as o,t as n}from"./p-yZBlG3YQ.js";import{getTemplate as l,getOrganizationContacts as r,isValidEmail as d,createEnvelope as a,formatFullName as c,getRGBA as p}from"@verdocs/js-sdk";import{D as h}from"./p-C_Xku1v2.js";import{V as v}from"./p-D97GxsI-.js";import{S as m}from"./p-C1sRVZWv.js";import{S as f}from"./p-C7hFgM52.js";import{d as u}from"./p-Bdf8pPWm.js";import{d as x}from"./p-REnrt0JM.js";import{d as b}from"./p-CyDWJAOZ.js";import{d as g}from"./p-DeQsR41s.js";import{d as w}from"./p-wUsR0Dpa.js";import{d as k}from"./p-B-_kYJtC.js";import{d as E}from"./p-DQTI8vRX.js";import{d as S}from"./p-BXQO5Vza.js";const C=e=>((e===null||e===void 0?void 0:e.roles)||[]).map((e=>e.name));const y=(e,s)=>Math.max(C(e).findIndex((e=>e===s)),0);const D=()=>`verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid rgba(151, 151, 151, 0.2666666667)}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:rgba(0, 0, 0, 0.537254902)}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-send .buttons .error-message{width:100%;color:#cc0000;font-size:13px;margin-bottom:10px}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}`;const z='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';const N='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';const j='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';const _='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';const I=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.beforeSend=t(this,"beforeSend");this.send=t(this,"send");this.exit=t(this,"exit");this.sdkError=t(this,"sdkError");this.searchContacts=t(this,"searchContacts");this.templateListenerId=null;this.endpoint=h;this.templateId=null;this.environment="";this.showCancel=true;this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`;this.showPickerForId="";this.sessionContacts=[];this.sending=false;this.rolesCompleted={};this.loading=true;this.template=null}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){console.log("[SEND] Loading template",this.templateId);this.unlistenToTemplate();f.subscribe("templates",this.templateId,(()=>l(this.endpoint,this.templateId)),true,(e=>{console.log("[SEND] Got new template",e);this.template=e;this.loading=false;this.rolesCompleted={};this.recomputeRolesCompleted()}))}unlistenToTemplate(){if(this.templateListenerId){f.store.delListener(this.templateListenerId);this.templateListenerId=null}}async reset(){this.rolesCompleted={}}onTemplateIdChanged(e){console.log("[SEND] Template ID changed",e);this.listenToTemplate()}async componentWillLoad(){var e,s,t;try{this.endpoint.onSessionChanged(((e,s,t)=>{if(!t){return}const i={id:t.id,first_name:t.first_name,last_name:t.last_name,email:t.email,phone:t.phone};if(t){this.sessionContacts=[i];r(this.endpoint).then((e=>{console.log("[SEND] Got contacts",e);this.sessionContacts=[...e,i]})).catch((e=>{console.log("[SEND] Error getting contacts",e)}))}}));this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SEND] Unable to start Send operation, must be authenticated");return}if(!this.templateId){console.log(`[SEND] Missing required template ID ${this.templateId}`);return}this.listenToTemplate()}catch(i){console.log("[SEND] Error with send session",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new m(i.message,(s=i.response)===null||s===void 0?void 0:s.status,(t=i.response)===null||t===void 0?void 0:t.data))}}recomputeRolesCompleted(){var e;this.rolesCompleted={};const s={};(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).forEach((e=>{const t=e.sequence;s[t]||(s[t]=[]);const i=`r-${t}-${s[t].length}`;s[t].push({...e,id:i,role_name:e.name,first_name:e.first_name,last_name:e.last_name});if(e.first_name&&d(e.email)){this.rolesCompleted[i]={...e,id:i,role_name:e.name,first_name:e.first_name,last_name:e.last_name}}}))}getSequenceNumbers(){var e;const s={};(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).forEach((e=>{s[e.sequence]=true}));return Object.keys(s).map((e=>+e)).sort(((e,s)=>e-s))}getRolesAtLevel(e){var s;const t=(((s=this.template)===null||s===void 0?void 0:s.roles)||[]).filter((s=>s.sequence===e)).map(((s,t)=>({...s,id:`r-${e}-${t}`,role_name:s.name,first_name:s.first_name,last_name:s.last_name})));return t}getLevelIcon(e){if(e==="start"){return i("div",{class:"level-icon",innerHTML:N})}else if(e==="end"){return i("div",{class:"level-icon",innerHTML:_})}else{return i("div",{class:"level-icon",innerHTML:j})}}handleSelectContact(e,s){e.preventDefault();this.rolesCompleted[s.id]={...s,...e.detail};this.showPickerForId=""}handleClickRole(e,s){e.stopPropagation();this.showPickerForId=s.id}handleSend(e){var s;if(this.sending){console.log("[SEND] Skipping duplicate send",e);return}console.log("[SEND] Sending",e);e.preventDefault();e.stopPropagation();this.sending=true;const t=Intl.DateTimeFormat().resolvedOptions();const i={template_id:this.templateId,name:((s=this.template)===null||s===void 0?void 0:s.name)||"New Envelope",environment:this.environment,initial_reminder:0,followup_reminders:0,recipients:Object.values(this.rolesCompleted),timezone:t.timeZone,locale:t.locale};const o=this.beforeSend.emit({...i,name:i.name,template:this.template});if(o.defaultPrevented){console.log("[SEND] Send cancelled by parent",i);this.sending=false;return}console.log("[SEND] Creating envelope",i);a(this.endpoint,i).then((e=>{var s;console.log("[SEND] Send envelope",e);this.reset().catch((e=>console.log("Unknown Error",e)));this.sending=false;(s=this.send)===null||s===void 0?void 0:s.emit({...i,name:i.name,envelope_id:e.id,envelope:e})})).catch((e=>{var s,t,i;console.log("[SEND] Send error",e);v(((t=(s=e.response)===null||s===void 0?void 0:s.data)===null||t===void 0?void 0:t.error)||"Error creating envelope, please try again later.");this.sending=false;(i=this.sdkError)===null||i===void 0?void 0:i.emit(e)}))}handleCancel(e){var s;e.stopPropagation();(s=this.exit)===null||s===void 0?void 0:s.emit()}render(){var e;if(this.loading){return i(o,null,i("verdocs-loader",null))}if(!this.endpoint.session){return i(o,{style:{display:"flex"}},i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}const s=this.getSequenceNumbers();const t=Object.values(this.rolesCompleted).filter((e=>d(e.email)&&e.first_name&&e.last_name));const n=t.length>=C(this.template).length;const l=t.map((e=>e.email.toLowerCase()));const r=new Set(l).size<l.length;return i(o,{class:{sendable:(e=this.template)===null||e===void 0?void 0:e.is_sendable}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:`level level-start`},this.getLevelIcon("start"),i("div",{class:"complete"},"Send Envelope")),s.map((e=>i("div",{class:`level level-${e}`},this.getLevelIcon("sequence"),this.getRolesAtLevel(e).map((e=>{var s,o,n;const l=!e.email||!e.first_name||!e.last_name;const r=((s=this.rolesCompleted[e.id])===null||s===void 0?void 0:s.first_name)?c(this.rolesCompleted[e.id]):l?e.role_name:c(e);const d=`verdocs-send-recipient-${e.role_name}`;const a=y(this.template,e.role_name);const h=p(a);const v=t.findIndex((s=>s.role_name===e.role_name))>-1;const m={backgroundColor:h,border:v?"2px solid #55bc81":"2px solid #dddddd"};return l?i("div",{class:"recipient","data-ri":a,"data-rn":e.role_name,style:m,onClick:s=>this.handleClickRole(s,e),id:d},r,i("div",{class:"icon",innerHTML:z}),this.showPickerForId===e.id&&i("verdocs-portal",{anchor:d,onClickAway:()=>this.showPickerForId=""},i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:s=>this.handleSelectContact(s,e),contactSuggestions:this.sessionContacts,templateRole:(o=this.rolesCompleted[e.id])!==null&&o!==void 0?o:e,onSearchContacts:e=>{var s;return(s=this.searchContacts)===null||s===void 0?void 0:s.emit(e.detail)}}))):i("div",{class:"recipient","data-ri":a,"data-rn":e.role_name,style:m,onClick:s=>this.handleClickRole(s,e),id:d},r,i("div",{class:"icon",innerHTML:z}),this.showPickerForId===e.id&&i("verdocs-portal",{anchor:d,onClickAway:()=>this.showPickerForId=""},i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:s=>this.handleSelectContact(s,e),contactSuggestions:this.sessionContacts,templateRole:(n=this.rolesCompleted[e.id])!==null&&n!==void 0?n:e,onSearchContacts:e=>{var s;return(s=this.searchContacts)===null||s===void 0?void 0:s.emit(e.detail)}})))}))))),i("div",{class:`level level-done`},this.getLevelIcon("end"),i("div",{class:"complete"},"Signing Complete"))),i("div",{class:"buttons"},r&&i("div",{class:"error-message"},"Recipients cannot share the same email."),this.showCancel&&i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e),disabled:this.sending}),i("verdocs-button",{label:"Send",size:"small",disabled:!n||this.sending||r,onClick:e=>this.handleSend(e)}),this.sending&&i("verdocs-spinner",null)))}static get watchers(){return{templateId:[{onTemplateIdChanged:0}]}}static get style(){return D()}},[0,"verdocs-send",{endpoint:[16],templateId:[513,"template-id"],environment:[1],showCancel:[4,"show-cancel"],containerId:[32],showPickerForId:[32],sessionContacts:[32],sending:[32],rolesCompleted:[32],loading:[32],template:[32],reset:[64]},undefined,{templateId:[{onTemplateIdChanged:0}]}]);function L(){if(typeof customElements==="undefined"){return}const e=["verdocs-send","verdocs-button","verdocs-checkbox","verdocs-component-error","verdocs-contact-picker","verdocs-flag","verdocs-loader","verdocs-portal","verdocs-spinner"];e.forEach((e=>{switch(e){case"verdocs-send":if(!customElements.get(n(e))){customElements.define(n(e),I)}break;case"verdocs-button":if(!customElements.get(n(e))){u()}break;case"verdocs-checkbox":if(!customElements.get(n(e))){x()}break;case"verdocs-component-error":if(!customElements.get(n(e))){b()}break;case"verdocs-contact-picker":if(!customElements.get(n(e))){g()}break;case"verdocs-flag":if(!customElements.get(n(e))){w()}break;case"verdocs-loader":if(!customElements.get(n(e))){k()}break;case"verdocs-portal":if(!customElements.get(n(e))){E()}break;case"verdocs-spinner":if(!customElements.get(n(e))){S()}break}}))}export{I as V,L as d};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as s,c as t,h as i,d as o,t as n}from"./p-yZBlG3YQ.js";import{getTemplate as l,getOrganizationContacts as r,isValidEmail as d,createEnvelope as a,formatFullName as c,getRGBA as p}from"@verdocs/js-sdk";import{D as h}from"./p-C_Xku1v2.js";import{V as v}from"./p-D97GxsI-.js";import{S as m}from"./p-C1sRVZWv.js";import{S as f}from"./p-C7hFgM52.js";import{d as u}from"./p-Bdf8pPWm.js";import{d as x}from"./p-REnrt0JM.js";import{d as b}from"./p-CyDWJAOZ.js";import{d as g}from"./p-CPYFXW2q.js";import{d as w}from"./p-wUsR0Dpa.js";import{d as k}from"./p-B-_kYJtC.js";import{d as E}from"./p-DQTI8vRX.js";import{d as S}from"./p-BXQO5Vza.js";const C=e=>((e===null||e===void 0?void 0:e.roles)||[]).map((e=>e.name));const y=(e,s)=>Math.max(C(e).findIndex((e=>e===s)),0);const z=()=>`verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid rgba(151, 151, 151, 0.2666666667)}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:rgba(0, 0, 0, 0.537254902)}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-send .buttons .error-message{width:100%;color:#cc0000;font-size:13px;margin-bottom:10px}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}`;const D='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';const N='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';const j='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';const _='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';const I=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.beforeSend=t(this,"beforeSend");this.send=t(this,"send");this.exit=t(this,"exit");this.sdkError=t(this,"sdkError");this.searchContacts=t(this,"searchContacts");this.templateListenerId=null;this.endpoint=h;this.templateId=null;this.environment="";this.showCancel=true;this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`;this.showPickerForId="";this.sessionContacts=[];this.sending=false;this.rolesCompleted={};this.loading=true;this.template=null}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){console.log("[SEND] Loading template",this.templateId);this.unlistenToTemplate();f.subscribe("templates",this.templateId,(()=>l(this.endpoint,this.templateId)),true,(e=>{console.log("[SEND] Got new template",e);this.template=e;this.loading=false;this.rolesCompleted={};this.recomputeRolesCompleted()}))}unlistenToTemplate(){if(this.templateListenerId){f.store.delListener(this.templateListenerId);this.templateListenerId=null}}async reset(){this.rolesCompleted={}}onTemplateIdChanged(e){console.log("[SEND] Template ID changed",e);this.listenToTemplate()}async componentWillLoad(){var e,s,t;try{this.endpoint.onSessionChanged(((e,s,t)=>{if(!t){return}const i={id:t.id,first_name:t.first_name,last_name:t.last_name,email:t.email,phone:t.phone};if(t){this.sessionContacts=[i];r(this.endpoint).then((e=>{console.log("[SEND] Got contacts",e);this.sessionContacts=[...e,i]})).catch((e=>{console.log("[SEND] Error getting contacts",e)}))}}));this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SEND] Unable to start Send operation, must be authenticated");return}if(!this.templateId){console.log(`[SEND] Missing required template ID ${this.templateId}`);return}this.listenToTemplate()}catch(i){console.log("[SEND] Error with send session",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new m(i.message,(s=i.response)===null||s===void 0?void 0:s.status,(t=i.response)===null||t===void 0?void 0:t.data))}}recomputeRolesCompleted(){var e;this.rolesCompleted={};const s={};(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).forEach((e=>{const t=e.sequence;s[t]||(s[t]=[]);const i=`r-${t}-${s[t].length}`;s[t].push({...e,id:i,role_name:e.name,first_name:e.first_name,last_name:e.last_name});if(e.first_name&&d(e.email)){this.rolesCompleted[i]={...e,id:i,role_name:e.name,first_name:e.first_name,last_name:e.last_name}}}))}getSequenceNumbers(){var e;const s={};(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).forEach((e=>{s[e.sequence]=true}));return Object.keys(s).map((e=>+e)).sort(((e,s)=>e-s))}getRolesAtLevel(e){var s;const t=(((s=this.template)===null||s===void 0?void 0:s.roles)||[]).filter((s=>s.sequence===e)).map(((s,t)=>({...s,id:`r-${e}-${t}`,role_name:s.name,first_name:s.first_name,last_name:s.last_name})));return t}getLevelIcon(e){if(e==="start"){return i("div",{class:"level-icon",innerHTML:N})}else if(e==="end"){return i("div",{class:"level-icon",innerHTML:_})}else{return i("div",{class:"level-icon",innerHTML:j})}}handleSelectContact(e,s){e.preventDefault();this.rolesCompleted[s.id]={...s,...e.detail};this.showPickerForId=""}handleClickRole(e,s){e.stopPropagation();this.showPickerForId=s.id}handleSend(e){var s;if(this.sending){console.log("[SEND] Skipping duplicate send",e);return}console.log("[SEND] Sending",e);e.preventDefault();e.stopPropagation();this.sending=true;const t=Intl.DateTimeFormat().resolvedOptions();const i={template_id:this.templateId,name:((s=this.template)===null||s===void 0?void 0:s.name)||"New Envelope",environment:this.environment,initial_reminder:0,followup_reminders:0,recipients:Object.values(this.rolesCompleted),timezone:t.timeZone,locale:t.locale};const o=this.beforeSend.emit({...i,name:i.name,template:this.template});if(o.defaultPrevented){console.log("[SEND] Send cancelled by parent",i);this.sending=false;return}console.log("[SEND] Creating envelope",i);a(this.endpoint,i).then((e=>{var s;console.log("[SEND] Send envelope",e);this.reset().catch((e=>console.log("Unknown Error",e)));this.sending=false;(s=this.send)===null||s===void 0?void 0:s.emit({...i,name:i.name,envelope_id:e.id,envelope:e})})).catch((e=>{var s,t,i;console.log("[SEND] Send error",e);v(((t=(s=e.response)===null||s===void 0?void 0:s.data)===null||t===void 0?void 0:t.error)||"Error creating envelope, please try again later.");this.sending=false;(i=this.sdkError)===null||i===void 0?void 0:i.emit(e)}))}handleCancel(e){var s;e.stopPropagation();(s=this.exit)===null||s===void 0?void 0:s.emit()}render(){var e;if(this.loading){return i(o,null,i("verdocs-loader",null))}if(!this.endpoint.session){return i(o,{style:{display:"flex"}},i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}const s=this.getSequenceNumbers();const t=Object.values(this.rolesCompleted).filter((e=>d(e.email)&&e.first_name&&e.last_name));const n=t.length>=C(this.template).length;const l=t.map((e=>e.email.toLowerCase()));const r=new Set(l).size<l.length;return i(o,{class:{sendable:(e=this.template)===null||e===void 0?void 0:e.is_sendable}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:`level level-start`},this.getLevelIcon("start"),i("div",{class:"complete"},"Send Envelope")),s.map((e=>i("div",{class:`level level-${e}`},this.getLevelIcon("sequence"),this.getRolesAtLevel(e).map((e=>{var s,o,n;const l=!e.email||!e.first_name||!e.last_name;const r=((s=this.rolesCompleted[e.id])===null||s===void 0?void 0:s.first_name)?c(this.rolesCompleted[e.id]):l?e.role_name:c(e);const d=`verdocs-send-recipient-${e.role_name}`;const a=y(this.template,e.role_name);const h=p(a);const v=t.findIndex((s=>s.role_name===e.role_name))>-1;const m={backgroundColor:h,border:v?"2px solid #55bc81":"2px solid #dddddd"};return l?i("div",{class:"recipient","data-ri":a,"data-rn":e.role_name,style:m,onClick:s=>this.handleClickRole(s,e),id:d},r,i("div",{class:"icon",innerHTML:D}),this.showPickerForId===e.id&&i("verdocs-portal",{anchor:d,onClickAway:()=>this.showPickerForId=""},i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:s=>this.handleSelectContact(s,e),contactSuggestions:this.sessionContacts,templateRole:(o=this.rolesCompleted[e.id])!==null&&o!==void 0?o:e,onSearchContacts:e=>{var s;return(s=this.searchContacts)===null||s===void 0?void 0:s.emit(e.detail)}}))):i("div",{class:"recipient","data-ri":a,"data-rn":e.role_name,style:m,onClick:s=>this.handleClickRole(s,e),id:d},r,i("div",{class:"icon",innerHTML:D}),this.showPickerForId===e.id&&i("verdocs-portal",{anchor:d,onClickAway:()=>this.showPickerForId=""},i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:s=>this.handleSelectContact(s,e),contactSuggestions:this.sessionContacts,templateRole:(n=this.rolesCompleted[e.id])!==null&&n!==void 0?n:e,onSearchContacts:e=>{var s;return(s=this.searchContacts)===null||s===void 0?void 0:s.emit(e.detail)}})))}))))),i("div",{class:`level level-done`},this.getLevelIcon("end"),i("div",{class:"complete"},"Signing Complete"))),i("div",{class:"buttons"},r&&i("div",{class:"error-message"},"Recipients cannot share the same email."),this.showCancel&&i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e),disabled:this.sending}),i("verdocs-button",{label:"Send",size:"small",disabled:!n||this.sending||r,onClick:e=>this.handleSend(e)}),this.sending&&i("verdocs-spinner",null)))}static get watchers(){return{templateId:[{onTemplateIdChanged:0}]}}static get style(){return z()}},[0,"verdocs-send",{endpoint:[16],templateId:[513,"template-id"],environment:[1],showCancel:[4,"show-cancel"],containerId:[32],showPickerForId:[32],sessionContacts:[32],sending:[32],rolesCompleted:[32],loading:[32],template:[32],reset:[64]},undefined,{templateId:[{onTemplateIdChanged:0}]}]);function L(){if(typeof customElements==="undefined"){return}const e=["verdocs-send","verdocs-button","verdocs-checkbox","verdocs-component-error","verdocs-contact-picker","verdocs-flag","verdocs-loader","verdocs-portal","verdocs-spinner"];e.forEach((e=>{switch(e){case"verdocs-send":if(!customElements.get(n(e))){customElements.define(n(e),I)}break;case"verdocs-button":if(!customElements.get(n(e))){u()}break;case"verdocs-checkbox":if(!customElements.get(n(e))){x()}break;case"verdocs-component-error":if(!customElements.get(n(e))){b()}break;case"verdocs-contact-picker":if(!customElements.get(n(e))){g()}break;case"verdocs-flag":if(!customElements.get(n(e))){w()}break;case"verdocs-loader":if(!customElements.get(n(e))){k()}break;case"verdocs-portal":if(!customElements.get(n(e))){E()}break;case"verdocs-spinner":if(!customElements.get(n(e))){S()}break}}))}export{I as V,L as d};
|
|
2
|
+
//# sourceMappingURL=p-CnoHN1S8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getRoleNames","template","roles","map","role","name","getRoleIndex","role_name","Math","max","findIndex","verdocsSendCss","editIcon","startIcon","stepIcon","doneIcon","VerdocsSend","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","templateListenerId","endpoint","DefaultEndpoint","templateId","environment","showCancel","containerId","random","toString","substring","showPickerForId","sessionContacts","sending","rolesCompleted","loading","disconnectedCallback","unlistenToTemplate","listenToTemplate","console","log","Store","subscribe","getTemplate","recomputeRolesCompleted","store","delListener","reset","onTemplateIdChanged","newTemplateId","componentWillLoad","onSessionChanged","_endpoint","_session","profile","me","id","first_name","last_name","email","phone","getOrganizationContacts","then","contacts","catch","e","loadSession","session","_a","sdkError","emit","SDKError","message","_b","response","status","_c","data","rolesAtLevel","forEach","level","sequence","length","push","isValidEmail","getSequenceNumbers","sequences","Object","keys","s","sort","a","b","getRolesAtLevel","filter","index","getLevelIcon","h","class","innerHTML","handleSelectContact","preventDefault","detail","handleClickRole","stopPropagation","handleSend","localeData","Intl","DateTimeFormat","resolvedOptions","details","template_id","initial_reminder","followup_reminders","recipients","values","timezone","timeZone","locale","beforeSendResult","beforeSend","defaultPrevented","createEnvelope","r","send","envelope_id","envelope","VerdocsToast","error","handleCancel","exit","render","Host","style","display","levels","rolesAssigned","recipient","allRolesAssigned","assignedEmails","toLowerCase","hasDuplicateEmails","Set","size","sendable","is_sendable","unknown","roleName","formatFullName","elId","roleIndex","rgba","getRGBA","completed","backgroundColor","border","onClick","anchor","onClickAway","onExit","onNext","contactSuggestions","templateRole","onSearchContacts","searchContacts","label","variant","disabled"],"sources":["src/utils/Templates.ts","src/components/embeds/verdocs-send/verdocs-send.scss?tag=verdocs-send","src/components/embeds/verdocs-send/verdocs-send.tsx"],"sourcesContent":["import {ITemplate} from '@verdocs/js-sdk';\n\nexport const getRoleNames = (template: ITemplate | null) => (template?.roles || []).map(role => role.name);\n\nexport const getRoleIndex = (template: ITemplate | null, role_name: string) =>\n Math.max(\n getRoleNames(template).findIndex(name => name === role_name),\n 0,\n );\n","@import '../../../theme.scss';\n\nverdocs-send {\n padding: 10px;\n position: relative;\n background: #ffffff;\n flex-direction: column;\n font-family: $verdocs-primary-font;\n\n &.sendable {\n display: flex;\n }\n\n .recipients {\n position: relative;\n }\n\n // To avoid the need to compute things like heights, this layer is simply displayed \"on top\" of all the level rows. Its\n // background obscures the horizontal lines.\n .left-line {\n top: 32px;\n left: 20px;\n z-index: 1;\n width: 12px;\n bottom: 30px;\n position: absolute;\n background: #ffffff;\n border-left: 3px dotted #9b9b9b;\n }\n\n .level {\n display: flex;\n column-gap: 10px;\n margin-left: 50px;\n position: relative;\n flex-direction: row;\n padding: 8px 0 4px 0;\n border-bottom: 1px solid #97979744;\n\n .level-icon {\n top: 14px;\n z-index: 2;\n left: -40px;\n width: 24px;\n height: 24px;\n position: absolute;\n background: #ffffff;\n\n svg {\n fill: #00000089;\n }\n }\n\n .recipient {\n height: 30px;\n display: flex;\n flex: 0 0 30px;\n color: #000000;\n cursor: pointer;\n font-size: 14px;\n align-items: center;\n border-radius: 30px;\n flex-direction: row;\n background: #dddddd;\n white-space: nowrap;\n border: 2px solid #dddddd;\n padding: 2px 10px 2px 14px;\n\n .icon {\n width: 22px;\n height: 22px;\n flex: 0 0 22px;\n margin: 0 0 0 10px;\n\n svg {\n width: 22px;\n height: 22px;\n fill: #333333;\n outline: none;\n }\n }\n }\n\n .complete {\n flex: 1;\n height: 30px;\n display: flex;\n color: #000000;\n font-size: 14px;\n align-items: center;\n flex-direction: row;\n padding: 3px 10px 3px 2px;\n }\n }\n\n .buttons {\n display: flex;\n margin-top: 10px;\n column-gap: 15px;\n flex-wrap: wrap;\n flex-direction: row;\n align-items: center;\n\n .error-message {\n width: 100%;\n color: #cc0000;\n font-size: 13px;\n margin-bottom: 10px;\n }\n }\n\n verdocs-contact-picker {\n left: 0;\n top: 41px;\n z-index: 10;\n position: absolute;\n border: 1px solid #dddddd;\n box-shadow: 0 0 6px 3px rgb(0 0 0 / 10%);\n }\n}\n","import {Component, Prop, State, h, Event, EventEmitter, Host, Method, Watch} from '@stencil/core';\nimport {createEnvelope, formatFullName, getTemplate, getOrganizationContacts, getRGBA, isValidEmail, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport type {ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeRecipientFromTemplate, IEnvelope, IRecipient, ITemplate} from '@verdocs/js-sdk';\nimport {IContactSearchEvent} from '../../envelopes/verdocs-contact-picker/verdocs-contact-picker';\nimport {getRoleIndex, getRoleNames} from '../../../utils/Templates';\nimport {DefaultEndpoint} from '../../../utils/Environment';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst editIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" tabindex=\"-1\"><path d=\"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z\"></path></svg>';\n\nconst startIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" tabindex=\"-1\"><path d=\"M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z\"></path></svg>';\n\nconst stepIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" tabindex=\"-1\"><path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"></path></svg>';\n\nconst doneIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" tabindex=\"-1\"><path d=\"m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z\"></path></svg>';\n\n/**\n * Display a form to send a template to one or more recipients in an envelope for signing.\n * Host applications should ensure the template is \"sendable\" before displaying this component.\n * To be sendable, a template must have at least one document attached, at least one participant\n * defined, and at least one field assigned to every \"signer\" participant. This component will\n * hide itself if the template is not sendable.\n *\n * ```ts\n * <verdocs-send\n * templateId={TEMPLATE_ID}\n * onBeforeSend={({ detail })) => { console.log('Sending... Show a spinner...', detail) }\n * onSend={({ detail }) => { console.log('Sent! Hide the spinner...', detail) }\n * onExit={({ detail }) => { console.log('Send cancelled.', detail) }\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-send',\n styleUrl: 'verdocs-send.scss',\n shadow: false,\n})\nexport class VerdocsSend {\n private templateListenerId = null;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = DefaultEndpoint;\n\n /**\n * The ID of the template to create the document from.\n */\n @Prop({reflect: true}) templateId: string | null = null;\n\n /**\n * The environment the control is being called from, e.g. 'web'. This has an impact on how certain\n * operations such as email communications are handled to ensure users receive the correct URLs for\n * their invitations. Setting this to unknown values may produce unexpected/incorrect behaviors.\n * If environment is not known, do this set this property.\n */\n @Prop() environment: string = '';\n\n /**\n * Whether to show the cancel button. It may be useful to disable this in environments where\n * the embed is shown in a non-wizard flow with its own navigation for the user to exit.\n */\n @Prop() showCancel = true;\n\n /**\n * The user is sending an envelope the form and clicked send.\n */\n @Event({composed: true}) beforeSend: EventEmitter<{recipients: ICreateEnvelopeRecipientFromTemplate[]; name: string; template_id: string; template: ITemplate}>;\n\n /**\n * The user completed the form and clicked send.\n */\n @Event({composed: true}) send: EventEmitter<{recipients: ICreateEnvelopeRecipientFromTemplate[]; name: string; template_id: string; envelope_id: string; envelope: IEnvelope}>;\n\n /**\n * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n /**\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 user enters text in a search field. The parent application may use this to update\n * the `contactSuggestions` property.\n */\n @Event({composed: true}) searchContacts: EventEmitter<IContactSearchEvent>;\n\n @State() containerId = `verdocs-send-${Math.random().toString(36).substring(2, 11)}`;\n @State() showPickerForId = '';\n @State() sessionContacts = [];\n @State() sending = false;\n @State() rolesCompleted: Record<string, Partial<IRecipient>> = {};\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n disconnectedCallback() {\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n console.log('[SEND] Loading template', this.templateId);\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n true,\n (template: ITemplate) => {\n console.log('[SEND] Got new template', template);\n this.template = template;\n this.loading = false;\n this.rolesCompleted = {};\n this.recomputeRolesCompleted();\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n @Method() async reset() {\n this.rolesCompleted = {};\n }\n\n @Watch('templateId')\n onTemplateIdChanged(newTemplateId: string) {\n console.log('[SEND] Template ID changed', newTemplateId);\n this.listenToTemplate();\n }\n\n async componentWillLoad() {\n try {\n this.endpoint.onSessionChanged((_endpoint, _session, profile) => {\n if (!profile) {\n return;\n }\n\n const me = {\n id: profile.id,\n first_name: profile.first_name,\n last_name: profile.last_name,\n email: profile.email,\n phone: profile.phone,\n };\n\n if (profile) {\n this.sessionContacts = [me];\n\n getOrganizationContacts(this.endpoint)\n .then(contacts => {\n console.log('[SEND] Got contacts', contacts);\n this.sessionContacts = [...contacts, me];\n })\n .catch(e => {\n console.log('[SEND] Error getting contacts', e);\n });\n }\n });\n\n this.endpoint.loadSession();\n\n if (!this.endpoint.session) {\n console.log('[SEND] Unable to start Send operation, must be authenticated');\n return;\n }\n\n if (!this.templateId) {\n console.log(`[SEND] Missing required template ID ${this.templateId}`);\n return;\n }\n\n this.listenToTemplate();\n } catch (e) {\n console.log('[SEND] Error with send session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n recomputeRolesCompleted() {\n this.rolesCompleted = {};\n\n const rolesAtLevel: Record<number, Partial<IRecipient>[]> = {};\n (this.template?.roles || []).forEach(role => {\n const level = role.sequence;\n rolesAtLevel[level] ||= [];\n const id = `r-${level}-${rolesAtLevel[level].length}`;\n rolesAtLevel[level].push({...role, id, role_name: role.name, first_name: role.first_name, last_name: role.last_name});\n\n // if (role.first_name && (isValidEmail(role.email) || isValidPhone(role.phone))) {\n if (role.first_name && isValidEmail(role.email)) {\n this.rolesCompleted[id] = {...role, id, role_name: role.name, first_name: role.first_name, last_name: role.last_name};\n }\n });\n }\n\n getSequenceNumbers() {\n // This is cleaner with a Set but we found a regression in some target environments where\n // this breaks down. Reverting to an older technique while we diagnose it.\n const sequences: Record<number, boolean> = {};\n (this.template?.roles || []).forEach(role => {\n sequences[role.sequence] = true;\n });\n return Object.keys(sequences)\n .map(s => +s)\n .sort((a, b) => a - b);\n }\n\n getRolesAtLevel(level: number) {\n const rolesAtLevel = (this.template?.roles || [])\n .filter(role => role.sequence === level)\n .map((role, index) => ({\n ...role,\n id: `r-${level}-${index}`,\n role_name: role.name,\n first_name: role.first_name,\n last_name: role.last_name,\n }));\n return rolesAtLevel as Partial<IRecipient>[];\n }\n\n getLevelIcon(level: 'start' | 'end' | 'sequence') {\n if (level === 'start') {\n return <div class=\"level-icon\" innerHTML={startIcon} />;\n } else if (level === 'end') {\n return <div class=\"level-icon\" innerHTML={doneIcon} />;\n } else {\n return <div class=\"level-icon\" innerHTML={stepIcon} />;\n }\n }\n\n handleSelectContact(e: any, role: Partial<IRecipient>) {\n e.preventDefault();\n this.rolesCompleted[role.id] = {...role, ...e.detail};\n this.showPickerForId = '';\n }\n\n handleClickRole(e: any, role: Partial<IRecipient>) {\n e.stopPropagation();\n this.showPickerForId = role.id;\n }\n\n handleSend(e: any) {\n if (this.sending) {\n console.log('[SEND] Skipping duplicate send', e);\n return;\n }\n\n console.log('[SEND] Sending', e);\n e.preventDefault();\n e.stopPropagation();\n\n this.sending = true;\n const localeData = Intl.DateTimeFormat().resolvedOptions();\n\n const details: ICreateEnvelopeFromTemplateRequest = {\n template_id: this.templateId,\n name: this.template?.name || 'New Envelope',\n environment: this.environment,\n initial_reminder: 0,\n followup_reminders: 0,\n recipients: Object.values(this.rolesCompleted) as ICreateEnvelopeRecipientFromTemplate[],\n // @ts-expect-error - v6.9.13\n timezone: localeData.timeZone,\n locale: localeData.locale,\n };\n\n const beforeSendResult = this.beforeSend.emit({...details, name: details.name!, template: this.template});\n if (beforeSendResult.defaultPrevented) {\n console.log('[SEND] Send cancelled by parent', details);\n this.sending = false;\n return;\n }\n\n console.log('[SEND] Creating envelope', details);\n createEnvelope(this.endpoint, details)\n .then(r => {\n console.log('[SEND] Send envelope', r);\n this.reset().catch((e: any) => console.log('Unknown Error', e));\n this.sending = false;\n this.send?.emit({...details, name: details.name!, envelope_id: r.id, envelope: r});\n })\n .catch(e => {\n console.log('[SEND] Send error', e);\n VerdocsToast(e.response?.data?.error || 'Error creating envelope, please try again later.');\n this.sending = false;\n this.sdkError?.emit(e);\n });\n }\n\n handleCancel(e: any) {\n e.stopPropagation();\n this.exit?.emit();\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (!this.endpoint.session) {\n return (\n <Host style={{display: 'flex'}}>\n <verdocs-component-error message=\"You must be authenticated to use this module.\" />\n </Host>\n );\n }\n\n const levels = this.getSequenceNumbers();\n const rolesAssigned = Object.values(this.rolesCompleted).filter(recipient => isValidEmail(recipient.email) && recipient.first_name && recipient.last_name);\n const allRolesAssigned = rolesAssigned.length >= getRoleNames(this.template).length;\n const assignedEmails = rolesAssigned.map(r => r.email.toLowerCase());\n const hasDuplicateEmails = new Set(assignedEmails).size < assignedEmails.length;\n\n return (\n <Host class={{sendable: this.template?.is_sendable}}>\n <div class=\"recipients\">\n <div class=\"left-line\" />\n <div class={`level level-start`}>\n {this.getLevelIcon('start')}\n <div class=\"complete\">Send Envelope</div>\n </div>\n\n {levels.map(level => (\n <div class={`level level-${level}`}>\n {this.getLevelIcon('sequence')}\n\n {this.getRolesAtLevel(level).map(role => {\n const unknown = !role.email || !role.first_name || !role.last_name;\n const roleName = this.rolesCompleted[role.id]?.first_name ? formatFullName(this.rolesCompleted[role.id]) : unknown ? role.role_name : formatFullName(role);\n const elId = `verdocs-send-recipient-${role.role_name}`;\n const roleIndex = getRoleIndex(this.template, role.role_name);\n const rgba = getRGBA(roleIndex);\n const completed = rolesAssigned.findIndex(r => r.role_name === role.role_name) > -1;\n\n const style = {\n backgroundColor: rgba,\n border: completed ? '2px solid #55bc81' : '2px solid #dddddd',\n };\n\n return unknown ? (\n <div class=\"recipient\" data-ri={roleIndex} data-rn={role.role_name} style={style} onClick={e => this.handleClickRole(e, role)} id={elId}>\n {roleName}\n <div class=\"icon\" innerHTML={editIcon} />\n {this.showPickerForId === role.id && (\n <verdocs-portal anchor={elId} onClickAway={() => (this.showPickerForId = '')}>\n <verdocs-contact-picker\n onExit={() => (this.showPickerForId = '')}\n onNext={e => this.handleSelectContact(e, role)}\n contactSuggestions={this.sessionContacts}\n templateRole={this.rolesCompleted[role.id] ?? role}\n onSearchContacts={e => this.searchContacts?.emit(e.detail)}\n />\n </verdocs-portal>\n )}\n </div>\n ) : (\n <div class=\"recipient\" data-ri={roleIndex} data-rn={role.role_name} style={style} onClick={e => this.handleClickRole(e, role)} id={elId}>\n {/*<div class=\"recipient\" data-ri={roleIndex} data-rn={role.role_name} style={{borderColor: rgba}} onClick={e => this.handleClickRole(e, role)} id={elId}>*/}\n {roleName}\n <div class=\"icon\" innerHTML={editIcon} />\n {this.showPickerForId === role.id && (\n <verdocs-portal anchor={elId} onClickAway={() => (this.showPickerForId = '')}>\n <verdocs-contact-picker\n onExit={() => (this.showPickerForId = '')}\n onNext={e => this.handleSelectContact(e, role)}\n contactSuggestions={this.sessionContacts}\n templateRole={(this.rolesCompleted[role.id] ?? role) as IRecipient}\n onSearchContacts={e => this.searchContacts?.emit(e.detail)}\n />\n </verdocs-portal>\n )}\n </div>\n );\n })}\n </div>\n ))}\n\n <div class={`level level-done`}>\n {this.getLevelIcon('end')}\n <div class=\"complete\">Signing Complete</div>\n </div>\n </div>\n\n <div class=\"buttons\">\n {hasDuplicateEmails && <div class=\"error-message\">Recipients cannot share the same email.</div>}\n {this.showCancel && <verdocs-button label=\"Cancel\" size=\"small\" variant=\"outline\" onClick={e => this.handleCancel(e)} disabled={this.sending} />}\n <verdocs-button label=\"Send\" size=\"small\" disabled={!allRolesAssigned || this.sending || hasDuplicateEmails} onClick={e => this.handleSend(e)} />\n {this.sending && <verdocs-spinner />}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"yoBAEO,MAAMA,EAAgBC,KAAgCA,IAAQ,MAARA,SAAQ,SAARA,EAAUC,QAAS,IAAIC,KAAIC,GAAQA,EAAKC,OAE9F,MAAMC,EAAe,CAACL,EAA4BM,IACvDC,KAAKC,IACHT,EAAaC,GAAUS,WAAUL,GAAQA,IAASE,IAClD,GCPJ,MAAMI,EAAiB,IAAM,0pECU7B,MAAMC,EACJ,2PAEF,MAAMC,EACJ,mOAEF,MAAMC,EACJ,iQAEF,MAAMC,EACJ,+P,MAwBWC,EAAWC,EAAA,MAAAD,UAAAE,EALxB,WAAAC,CAAAC,G,iNAMUC,KAAAC,mBAAqB,KAKrBD,KAAAE,SAA4BC,EAKbH,KAAAI,WAA4B,KAQ3CJ,KAAAK,YAAsB,GAMtBL,KAAAM,WAAa,KA6BZN,KAAAO,YAAc,gBAAgBpB,KAAKqB,SAASC,SAAS,IAAIC,UAAU,EAAG,MACtEV,KAAAW,gBAAkB,GAClBX,KAAAY,gBAAkB,GAClBZ,KAAAa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,iBAAe,2CAChD9E,KAAKM,YAAcuE,EAAA,kBAAgBoE,MAAM,SAAStB,KAAK,QAAQuB,QAAQ,UAAUV,QAAS3F,GAAK7C,KAAK6G,aAAahE,GAAIsG,SAAUnJ,KAAKa,UACrIgE,EAAA,kBAAgBoE,MAAM,OAAOtB,KAAK,QAAQwB,UAAW7B,GAAoBtH,KAAKa,SAAW4G,EAAoBe,QAAS3F,GAAK7C,KAAKqF,WAAWxC,KAC1I7C,KAAKa,SAAWgE,EAAA,yB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["getRoleNames","template","roles","map","role","name","getRoleIndex","role_name","Math","max","findIndex","verdocsSendCss","editIcon","startIcon","stepIcon","doneIcon","VerdocsSend","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","templateListenerId","endpoint","DefaultEndpoint","templateId","environment","showCancel","containerId","random","toString","substring","showPickerForId","sessionContacts","sending","rolesCompleted","loading","disconnectedCallback","unlistenToTemplate","listenToTemplate","console","log","Store","subscribe","getTemplate","recomputeRolesCompleted","store","delListener","reset","onTemplateIdChanged","newTemplateId","componentWillLoad","onSessionChanged","_endpoint","_session","profile","me","id","first_name","last_name","email","phone","getOrganizationContacts","then","contacts","catch","e","loadSession","session","_a","sdkError","emit","SDKError","message","_b","response","status","_c","data","rolesAtLevel","forEach","level","sequence","length","push","isValidEmail","getSequenceNumbers","sequences","Object","keys","s","sort","a","b","getRolesAtLevel","filter","index","getLevelIcon","h","class","innerHTML","handleSelectContact","preventDefault","detail","handleClickRole","stopPropagation","handleSend","localeData","Intl","DateTimeFormat","resolvedOptions","details","template_id","initial_reminder","followup_reminders","recipients","values","timezone","timeZone","locale","beforeSendResult","beforeSend","defaultPrevented","createEnvelope","r","send","envelope_id","envelope","VerdocsToast","error","handleCancel","exit","render","Host","style","display","levels","rolesAssigned","recipient","allRolesAssigned","assignedEmails","toLowerCase","hasDuplicateEmails","Set","size","sendable","is_sendable","unknown","roleName","formatFullName","elId","roleIndex","rgba","getRGBA","completed","backgroundColor","border","onClick","anchor","onClickAway","onExit","onNext","contactSuggestions","templateRole","onSearchContacts","searchContacts","label","variant","disabled"],"sources":["src/utils/Templates.ts","src/components/embeds/verdocs-send/verdocs-send.scss?tag=verdocs-send","src/components/embeds/verdocs-send/verdocs-send.tsx"],"sourcesContent":["import {ITemplate} from '@verdocs/js-sdk';\n\nexport const getRoleNames = (template: ITemplate | null) => (template?.roles || []).map(role => role.name);\n\nexport const getRoleIndex = (template: ITemplate | null, role_name: string) =>\n Math.max(\n getRoleNames(template).findIndex(name => name === role_name),\n 0,\n );\n","@import '../../../theme.scss';\n\nverdocs-send {\n padding: 10px;\n position: relative;\n background: #ffffff;\n flex-direction: column;\n font-family: $verdocs-primary-font;\n\n &.sendable {\n display: flex;\n }\n\n .recipients {\n position: relative;\n }\n\n // To avoid the need to compute things like heights, this layer is simply displayed \"on top\" of all the level rows. Its\n // background obscures the horizontal lines.\n .left-line {\n top: 32px;\n left: 20px;\n z-index: 1;\n width: 12px;\n bottom: 30px;\n position: absolute;\n background: #ffffff;\n border-left: 3px dotted #9b9b9b;\n }\n\n .level {\n display: flex;\n column-gap: 10px;\n margin-left: 50px;\n position: relative;\n flex-direction: row;\n padding: 8px 0 4px 0;\n border-bottom: 1px solid #97979744;\n\n .level-icon {\n top: 14px;\n z-index: 2;\n left: -40px;\n width: 24px;\n height: 24px;\n position: absolute;\n background: #ffffff;\n\n svg {\n fill: #00000089;\n }\n }\n\n .recipient {\n height: 30px;\n display: flex;\n flex: 0 0 30px;\n color: #000000;\n cursor: pointer;\n font-size: 14px;\n align-items: center;\n border-radius: 30px;\n flex-direction: row;\n background: #dddddd;\n white-space: nowrap;\n border: 2px solid #dddddd;\n padding: 2px 10px 2px 14px;\n\n .icon {\n width: 22px;\n height: 22px;\n flex: 0 0 22px;\n margin: 0 0 0 10px;\n\n svg {\n width: 22px;\n height: 22px;\n fill: #333333;\n outline: none;\n }\n }\n }\n\n .complete {\n flex: 1;\n height: 30px;\n display: flex;\n color: #000000;\n font-size: 14px;\n align-items: center;\n flex-direction: row;\n padding: 3px 10px 3px 2px;\n }\n }\n\n .buttons {\n display: flex;\n margin-top: 10px;\n column-gap: 15px;\n flex-wrap: wrap;\n flex-direction: row;\n align-items: center;\n\n .error-message {\n width: 100%;\n color: #cc0000;\n font-size: 13px;\n margin-bottom: 10px;\n }\n }\n\n verdocs-contact-picker {\n left: 0;\n top: 41px;\n z-index: 10;\n position: absolute;\n border: 1px solid #dddddd;\n box-shadow: 0 0 6px 3px rgb(0 0 0 / 10%);\n }\n}\n","import {Component, Prop, State, h, Event, EventEmitter, Host, Method, Watch} from '@stencil/core';\nimport {createEnvelope, formatFullName, getTemplate, getOrganizationContacts, getRGBA, isValidEmail, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport type {ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeRecipientFromTemplate, IEnvelope, IRecipient, ITemplate} from '@verdocs/js-sdk';\nimport {IContactSearchEvent} from '../../envelopes/verdocs-contact-picker/verdocs-contact-picker';\nimport {getRoleIndex, getRoleNames} from '../../../utils/Templates';\nimport {DefaultEndpoint} from '../../../utils/Environment';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst editIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" tabindex=\"-1\"><path d=\"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z\"></path></svg>';\n\nconst startIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" tabindex=\"-1\"><path d=\"M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z\"></path></svg>';\n\nconst stepIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" tabindex=\"-1\"><path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"></path></svg>';\n\nconst doneIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" tabindex=\"-1\"><path d=\"m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z\"></path></svg>';\n\n/**\n * Display a form to send a template to one or more recipients in an envelope for signing.\n * Host applications should ensure the template is \"sendable\" before displaying this component.\n * To be sendable, a template must have at least one document attached, at least one participant\n * defined, and at least one field assigned to every \"signer\" participant. This component will\n * hide itself if the template is not sendable.\n *\n * ```ts\n * <verdocs-send\n * templateId={TEMPLATE_ID}\n * onBeforeSend={({ detail })) => { console.log('Sending... Show a spinner...', detail) }\n * onSend={({ detail }) => { console.log('Sent! Hide the spinner...', detail) }\n * onExit={({ detail }) => { console.log('Send cancelled.', detail) }\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-send',\n styleUrl: 'verdocs-send.scss',\n shadow: false,\n})\nexport class VerdocsSend {\n private templateListenerId = null;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = DefaultEndpoint;\n\n /**\n * The ID of the template to create the document from.\n */\n @Prop({reflect: true}) templateId: string | null = null;\n\n /**\n * The environment the control is being called from, e.g. 'web'. This has an impact on how certain\n * operations such as email communications are handled to ensure users receive the correct URLs for\n * their invitations. Setting this to unknown values may produce unexpected/incorrect behaviors.\n * If environment is not known, do this set this property.\n */\n @Prop() environment: string = '';\n\n /**\n * Whether to show the cancel button. It may be useful to disable this in environments where\n * the embed is shown in a non-wizard flow with its own navigation for the user to exit.\n */\n @Prop() showCancel = true;\n\n /**\n * The user is sending an envelope the form and clicked send.\n */\n @Event({composed: true}) beforeSend: EventEmitter<{recipients: ICreateEnvelopeRecipientFromTemplate[]; name: string; template_id: string; template: ITemplate}>;\n\n /**\n * The user completed the form and clicked send.\n */\n @Event({composed: true}) send: EventEmitter<{recipients: ICreateEnvelopeRecipientFromTemplate[]; name: string; template_id: string; envelope_id: string; envelope: IEnvelope}>;\n\n /**\n * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n /**\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 user enters text in a search field. The parent application may use this to update\n * the `contactSuggestions` property.\n */\n @Event({composed: true}) searchContacts: EventEmitter<IContactSearchEvent>;\n\n @State() containerId = `verdocs-send-${Math.random().toString(36).substring(2, 11)}`;\n @State() showPickerForId = '';\n @State() sessionContacts = [];\n @State() sending = false;\n @State() rolesCompleted: Record<string, Partial<IRecipient>> = {};\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n disconnectedCallback() {\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n console.log('[SEND] Loading template', this.templateId);\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n true,\n (template: ITemplate) => {\n console.log('[SEND] Got new template', template);\n this.template = template;\n this.loading = false;\n this.rolesCompleted = {};\n this.recomputeRolesCompleted();\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n @Method() async reset() {\n this.rolesCompleted = {};\n }\n\n @Watch('templateId')\n onTemplateIdChanged(newTemplateId: string) {\n console.log('[SEND] Template ID changed', newTemplateId);\n this.listenToTemplate();\n }\n\n async componentWillLoad() {\n try {\n this.endpoint.onSessionChanged((_endpoint, _session, profile) => {\n if (!profile) {\n return;\n }\n\n const me = {\n id: profile.id,\n first_name: profile.first_name,\n last_name: profile.last_name,\n email: profile.email,\n phone: profile.phone,\n };\n\n if (profile) {\n this.sessionContacts = [me];\n\n getOrganizationContacts(this.endpoint)\n .then(contacts => {\n console.log('[SEND] Got contacts', contacts);\n this.sessionContacts = [...contacts, me];\n })\n .catch(e => {\n console.log('[SEND] Error getting contacts', e);\n });\n }\n });\n\n this.endpoint.loadSession();\n\n if (!this.endpoint.session) {\n console.log('[SEND] Unable to start Send operation, must be authenticated');\n return;\n }\n\n if (!this.templateId) {\n console.log(`[SEND] Missing required template ID ${this.templateId}`);\n return;\n }\n\n this.listenToTemplate();\n } catch (e) {\n console.log('[SEND] Error with send session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n recomputeRolesCompleted() {\n this.rolesCompleted = {};\n\n const rolesAtLevel: Record<number, Partial<IRecipient>[]> = {};\n (this.template?.roles || []).forEach(role => {\n const level = role.sequence;\n rolesAtLevel[level] ||= [];\n const id = `r-${level}-${rolesAtLevel[level].length}`;\n rolesAtLevel[level].push({...role, id, role_name: role.name, first_name: role.first_name, last_name: role.last_name});\n\n // if (role.first_name && (isValidEmail(role.email) || isValidPhone(role.phone))) {\n if (role.first_name && isValidEmail(role.email)) {\n this.rolesCompleted[id] = {...role, id, role_name: role.name, first_name: role.first_name, last_name: role.last_name};\n }\n });\n }\n\n getSequenceNumbers() {\n // This is cleaner with a Set but we found a regression in some target environments where\n // this breaks down. Reverting to an older technique while we diagnose it.\n const sequences: Record<number, boolean> = {};\n (this.template?.roles || []).forEach(role => {\n sequences[role.sequence] = true;\n });\n return Object.keys(sequences)\n .map(s => +s)\n .sort((a, b) => a - b);\n }\n\n getRolesAtLevel(level: number) {\n const rolesAtLevel = (this.template?.roles || [])\n .filter(role => role.sequence === level)\n .map((role, index) => ({\n ...role,\n id: `r-${level}-${index}`,\n role_name: role.name,\n first_name: role.first_name,\n last_name: role.last_name,\n }));\n return rolesAtLevel as Partial<IRecipient>[];\n }\n\n getLevelIcon(level: 'start' | 'end' | 'sequence') {\n if (level === 'start') {\n return <div class=\"level-icon\" innerHTML={startIcon} />;\n } else if (level === 'end') {\n return <div class=\"level-icon\" innerHTML={doneIcon} />;\n } else {\n return <div class=\"level-icon\" innerHTML={stepIcon} />;\n }\n }\n\n handleSelectContact(e: any, role: Partial<IRecipient>) {\n e.preventDefault();\n this.rolesCompleted[role.id] = {...role, ...e.detail};\n this.showPickerForId = '';\n }\n\n handleClickRole(e: any, role: Partial<IRecipient>) {\n e.stopPropagation();\n this.showPickerForId = role.id;\n }\n\n handleSend(e: any) {\n if (this.sending) {\n console.log('[SEND] Skipping duplicate send', e);\n return;\n }\n\n console.log('[SEND] Sending', e);\n e.preventDefault();\n e.stopPropagation();\n\n this.sending = true;\n const localeData = Intl.DateTimeFormat().resolvedOptions();\n\n const details: ICreateEnvelopeFromTemplateRequest = {\n template_id: this.templateId,\n name: this.template?.name || 'New Envelope',\n environment: this.environment,\n initial_reminder: 0,\n followup_reminders: 0,\n recipients: Object.values(this.rolesCompleted) as ICreateEnvelopeRecipientFromTemplate[],\n timezone: localeData.timeZone,\n locale: localeData.locale,\n };\n\n const beforeSendResult = this.beforeSend.emit({...details, name: details.name!, template: this.template});\n if (beforeSendResult.defaultPrevented) {\n console.log('[SEND] Send cancelled by parent', details);\n this.sending = false;\n return;\n }\n\n console.log('[SEND] Creating envelope', details);\n createEnvelope(this.endpoint, details)\n .then(r => {\n console.log('[SEND] Send envelope', r);\n this.reset().catch((e: any) => console.log('Unknown Error', e));\n this.sending = false;\n this.send?.emit({...details, name: details.name!, envelope_id: r.id, envelope: r});\n })\n .catch(e => {\n console.log('[SEND] Send error', e);\n VerdocsToast(e.response?.data?.error || 'Error creating envelope, please try again later.');\n this.sending = false;\n this.sdkError?.emit(e);\n });\n }\n\n handleCancel(e: any) {\n e.stopPropagation();\n this.exit?.emit();\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (!this.endpoint.session) {\n return (\n <Host style={{display: 'flex'}}>\n <verdocs-component-error message=\"You must be authenticated to use this module.\" />\n </Host>\n );\n }\n\n const levels = this.getSequenceNumbers();\n const rolesAssigned = Object.values(this.rolesCompleted).filter(recipient => isValidEmail(recipient.email) && recipient.first_name && recipient.last_name);\n const allRolesAssigned = rolesAssigned.length >= getRoleNames(this.template).length;\n const assignedEmails = rolesAssigned.map(r => r.email.toLowerCase());\n const hasDuplicateEmails = new Set(assignedEmails).size < assignedEmails.length;\n\n return (\n <Host class={{sendable: this.template?.is_sendable}}>\n <div class=\"recipients\">\n <div class=\"left-line\" />\n <div class={`level level-start`}>\n {this.getLevelIcon('start')}\n <div class=\"complete\">Send Envelope</div>\n </div>\n\n {levels.map(level => (\n <div class={`level level-${level}`}>\n {this.getLevelIcon('sequence')}\n\n {this.getRolesAtLevel(level).map(role => {\n const unknown = !role.email || !role.first_name || !role.last_name;\n const roleName = this.rolesCompleted[role.id]?.first_name ? formatFullName(this.rolesCompleted[role.id]) : unknown ? role.role_name : formatFullName(role);\n const elId = `verdocs-send-recipient-${role.role_name}`;\n const roleIndex = getRoleIndex(this.template, role.role_name);\n const rgba = getRGBA(roleIndex);\n const completed = rolesAssigned.findIndex(r => r.role_name === role.role_name) > -1;\n\n const style = {\n backgroundColor: rgba,\n border: completed ? '2px solid #55bc81' : '2px solid #dddddd',\n };\n\n return unknown ? (\n <div class=\"recipient\" data-ri={roleIndex} data-rn={role.role_name} style={style} onClick={e => this.handleClickRole(e, role)} id={elId}>\n {roleName}\n <div class=\"icon\" innerHTML={editIcon} />\n {this.showPickerForId === role.id && (\n <verdocs-portal anchor={elId} onClickAway={() => (this.showPickerForId = '')}>\n <verdocs-contact-picker\n onExit={() => (this.showPickerForId = '')}\n onNext={e => this.handleSelectContact(e, role)}\n contactSuggestions={this.sessionContacts}\n templateRole={this.rolesCompleted[role.id] ?? role}\n onSearchContacts={e => this.searchContacts?.emit(e.detail)}\n />\n </verdocs-portal>\n )}\n </div>\n ) : (\n <div class=\"recipient\" data-ri={roleIndex} data-rn={role.role_name} style={style} onClick={e => this.handleClickRole(e, role)} id={elId}>\n {/*<div class=\"recipient\" data-ri={roleIndex} data-rn={role.role_name} style={{borderColor: rgba}} onClick={e => this.handleClickRole(e, role)} id={elId}>*/}\n {roleName}\n <div class=\"icon\" innerHTML={editIcon} />\n {this.showPickerForId === role.id && (\n <verdocs-portal anchor={elId} onClickAway={() => (this.showPickerForId = '')}>\n <verdocs-contact-picker\n onExit={() => (this.showPickerForId = '')}\n onNext={e => this.handleSelectContact(e, role)}\n contactSuggestions={this.sessionContacts}\n templateRole={(this.rolesCompleted[role.id] ?? role) as IRecipient}\n onSearchContacts={e => this.searchContacts?.emit(e.detail)}\n />\n </verdocs-portal>\n )}\n </div>\n );\n })}\n </div>\n ))}\n\n <div class={`level level-done`}>\n {this.getLevelIcon('end')}\n <div class=\"complete\">Signing Complete</div>\n </div>\n </div>\n\n <div class=\"buttons\">\n {hasDuplicateEmails && <div class=\"error-message\">Recipients cannot share the same email.</div>}\n {this.showCancel && <verdocs-button label=\"Cancel\" size=\"small\" variant=\"outline\" onClick={e => this.handleCancel(e)} disabled={this.sending} />}\n <verdocs-button label=\"Send\" size=\"small\" disabled={!allRolesAssigned || this.sending || hasDuplicateEmails} onClick={e => this.handleSend(e)} />\n {this.sending && <verdocs-spinner />}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"yoBAEO,MAAMA,EAAgBC,KAAgCA,IAAQ,MAARA,SAAQ,SAARA,EAAUC,QAAS,IAAIC,KAAIC,GAAQA,EAAKC,OAE9F,MAAMC,EAAe,CAACL,E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kE,EAAA,0BACE8D,OAAQ,IAAO3I,KAAKW,gBAAkB,GACtCiI,OAAQ/F,GAAK7C,KAAKgF,oBAAoBnC,EAAG9D,GACzC8J,mBAAoB7I,KAAKY,gBACzBkI,cAAetF,EAAAxD,KAAKc,eAAe/B,EAAKqD,OAAG,MAAAoB,SAAA,EAAAA,EAAIzE,EAC/CgK,iBAAkBlG,IAAI,IAAAG,EAAC,OAAAA,EAAAhD,KAAKgJ,kBAAc,MAAAhG,SAAA,SAAAA,EAAEE,KAAKL,EAAEqC,OAAO,KAKnE,OAKPL,EAAA,OAAKC,MAAO,oBACT9E,KAAK4E,aAAa,OACnBC,EAAA,OAAKC,MAAM,YAAU,sBAIzBD,EAAA,OAAKC,MAAM,WACR2C,GAAsB5C,EAAA,OAAKC,MAAM,iBAAe,2CAChD9E,KAAKM,YAAcuE,EAAA,kBAAgBoE,MAAM,SAAStB,KAAK,QAAQuB,QAAQ,UAAUV,QAAS3F,GAAK7C,KAAK6G,aAAahE,GAAIsG,SAAUnJ,KAAKa,UACrIgE,EAAA,kBAAgBoE,MAAM,OAAOtB,KAAK,QAAQwB,UAAW7B,GAAoBtH,KAAKa,SAAW4G,EAAoBe,QAAS3F,GAAK7C,KAAKqF,WAAWxC,KAC1I7C,KAAKa,SAAWgE,EAAA,yB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as o,c as s,h as a,t}from"./p-yZBlG3YQ.js";import{d}from"./p-DT0LGcPi.js";const c=()=>`verdocs-ok-dialog{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-ok-dialog.closed{display:none}verdocs-ok-dialog .buttons{gap:12px;display:-ms-flexbox;display:flex;margin-top:0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-ok-dialog .buttons button{padding:8px 16px;height:40px;display:-ms-flexbox;display:flex;font-size:14px;font-weight:400;cursor:pointer;-ms-flex-align:center;align-items:center;border-radius:var(--verdocs-button-radius, 4px);-ms-flex-pack:center;justify-content:center;-webkit-transition:all 0.2s ease;transition:all 0.2s ease}verdocs-ok-dialog .buttons button.cancel{background-color:transparent;border:var(--verdocs-button-secondary-border, 1px solid #d1d5db);color:var(--verdocs-button-secondary-color, #374151)}verdocs-ok-dialog .buttons button.ok{background-color:var(--verdocs-primary-color, #55bc81);border:1px solid transparent;color:#ffffff}verdocs-ok-dialog .buttons button.ok:hover{background-color:var(--verdocs-primary-color-hover, #2b995b)}verdocs-ok-dialog .buttons button:disabled{background-color:var(--verdocs-button-disabled-bg, #e5e7eb);color:var(--verdocs-button-disabled-color, #9ca3af);cursor:not-allowed}`;const i=e(class e extends o{constructor(e){super();if(e!==false){this.__registerHost()}this.next=s(this,"next");this.exit=s(this,"exit");this.heading="";this.message="";this.buttonLabel="OK";this.showCancel=false;this.closed=false}handleOk(){this.next.emit()}handleCancel(){this.exit.emit()}handleDismiss(e){this.closed=true;if(e.target.className==="background-overlay"){e.preventDefault();this.exit.emit()}}render(){return a("verdocs-dialog",{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as o,c as s,h as a,t}from"./p-yZBlG3YQ.js";import{d}from"./p-DT0LGcPi.js";const c=()=>`verdocs-ok-dialog{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-ok-dialog.closed{display:none}verdocs-ok-dialog .buttons{gap:12px;display:-ms-flexbox;display:flex;margin-top:0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-ok-dialog .buttons button{padding:8px 16px;height:40px;display:-ms-flexbox;display:flex;font-size:14px;font-weight:400;cursor:pointer;-ms-flex-align:center;align-items:center;border-radius:var(--verdocs-button-radius, 4px);-ms-flex-pack:center;justify-content:center;-webkit-transition:all 0.2s ease;transition:all 0.2s ease}verdocs-ok-dialog .buttons button.cancel{background-color:transparent;border:var(--verdocs-button-secondary-border, 1px solid #d1d5db);color:var(--verdocs-button-secondary-color, #374151)}verdocs-ok-dialog .buttons button.ok{background-color:var(--verdocs-primary-color, #55bc81);border:1px solid transparent;color:#ffffff}verdocs-ok-dialog .buttons button.ok:hover{background-color:var(--verdocs-primary-color-hover, #2b995b)}verdocs-ok-dialog .buttons button:disabled{background-color:var(--verdocs-button-disabled-bg, #e5e7eb);color:var(--verdocs-button-disabled-color, #9ca3af);cursor:not-allowed}`;const i=e(class e extends o{constructor(e){super();if(e!==false){this.__registerHost()}this.next=s(this,"next");this.exit=s(this,"exit");this.heading="";this.message="";this.buttonLabel="OK";this.showCancel=false;this.closed=false}handleOk(){this.next.emit()}handleCancel(){this.exit.emit()}handleDismiss(e){this.closed=true;if(e.target.className==="background-overlay"){e.preventDefault();this.exit.emit()}}render(){return a("verdocs-dialog",{key:"52d54a8b4aab2a5aea4d8d23d120c56e321f6a6a",onExit:e=>this.handleDismiss(e)},a("div",{key:"d8f199c5b67778bb75c443b9ac479a874ef441a8",slot:"heading",class:"heading"},a("div",{key:"0c1d47e80319595dab3be44df92d35c187205a93",class:"icon"},a("svg",{key:"0a09d7fd4758db5083b4b08139f80ceffde3ea7e",width:"22",height:"19",viewBox:"0 0 22 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("g",{key:"edba4957787067d3776d8eeb563e9e30b231fddb","clip-path":"url(#clip0_34208_4881)"},a("path",{key:"5afcfa6fe4b39a553c210931b3cbea6a3d0d0cee",d:"M3.125 0.75C1.88398 0.75 0.875 1.75898 0.875 3V16.5C0.875 17.741 1.88398 18.75 3.125 18.75H12.125C13.366 18.75 14.375 17.741 14.375 16.5V15.8215C14.2801 15.8602 14.1852 15.8918 14.0867 15.9164L11.9738 16.4437C11.8684 16.4684 11.7629 16.4859 11.6574 16.493C11.6258 16.4965 11.5941 16.5 11.5625 16.5H9.3125C9.09805 16.5 8.90469 16.3805 8.80977 16.1906L8.50039 15.5684C8.44062 15.4488 8.32109 15.375 8.19102 15.375C8.06094 15.375 7.93789 15.4488 7.88164 15.5684L7.57227 16.1906C7.47031 16.398 7.24883 16.5211 7.02031 16.5C6.7918 16.4789 6.59492 16.3207 6.53164 16.1027L5.9375 14.1445L5.59297 15.2977C5.37852 16.0113 4.72109 16.5 3.97578 16.5H3.6875C3.37812 16.5 3.125 16.2469 3.125 15.9375C3.125 15.6281 3.37812 15.375 3.6875 15.375H3.97578C4.22539 15.375 4.44336 15.2133 4.51367 14.9742L5.0375 13.234C5.15703 12.8367 5.52266 12.5625 5.9375 12.5625C6.35234 12.5625 6.71797 12.8367 6.8375 13.234L7.24531 14.591C7.50547 14.373 7.83594 14.25 8.1875 14.25C8.74648 14.25 9.25625 14.5664 9.50586 15.0656L9.66055 15.375H9.97344C9.86445 15.0656 9.84336 14.7281 9.92422 14.3977L10.4516 12.2848C10.55 11.8875 10.7539 11.5289 11.0422 11.2406L14.375 7.90781V6.375H9.875C9.25273 6.375 8.75 5.87227 8.75 5.25V0.75H3.125ZM9.875 0.75V5.25H14.375L9.875 0.75ZM20.2039 5.66133C19.6555 5.11289 18.766 5.11289 18.2141 5.66133L17.1805 6.69492L19.6766 9.19102L20.7102 8.15742C21.2586 7.60898 21.2586 6.71953 20.7102 6.16758L20.2039 5.66133ZM11.8402 12.0352C11.6961 12.1793 11.5941 12.3586 11.5449 12.559L11.0176 14.6719C10.9684 14.8652 11.0246 15.0656 11.1652 15.2063C11.3059 15.3469 11.5062 15.4031 11.6996 15.3539L13.8125 14.8266C14.0094 14.7773 14.1922 14.6754 14.3363 14.5312L18.8785 9.98555L16.3824 7.48945L11.8402 12.0352Z",fill:"white"})),a("defs",{key:"c29cda7d2f7a162a77e30fa522e26475124044d8"},a("clipPath",{key:"b9ac256bf4e3066c8eeeb7978244ee402cf57bf9",id:"clip0_34208_4881"},a("path",{key:"8667df36852d878425aa718daad47314be8b7879",d:"M0.875 0.75H21.125V18.75H0.875V0.75Z",fill:"white"}))))),a("div",{key:"452081aa3d26f586ca33837ff2091cc75798b003",class:"title"}," ",this.heading)),a("div",{key:"d0e86791df8ef3f60896956c18308136890092f9",slot:"content",class:"content",innerHTML:this.message}),a("div",{key:"4de420a8d24123545b136725da294612bb2291bb",class:"footer",slot:"footer"},a("div",{key:"10667da2ea1b8660be353b50ff5cb131f73abaa4",class:"buttons"},this.showCancel&&a("button",{key:"b1404f986abc21aadf3214188741b08578cbf47c",class:"cancel",onClick:()=>this.handleCancel()},"Cancel"),a("button",{key:"bd9426471a8729eb4d1a8580badfed86850fbf0e",class:!this.showCancel?"ok single":"ok",onClick:()=>this.handleOk()},"OK"))))}static get style(){return c()}},[0,"verdocs-ok-dialog",{heading:[1],message:[1],buttonLabel:[1,"button-label"],showCancel:[4,"show-cancel"],closed:[32]}]);function r(){if(typeof customElements==="undefined"){return}const e=["verdocs-ok-dialog","verdocs-dialog"];e.forEach((e=>{switch(e){case"verdocs-ok-dialog":if(!customElements.get(t(e))){customElements.define(t(e),i)}break;case"verdocs-dialog":if(!customElements.get(t(e))){d()}break}}))}export{i as V,r as d};
|
|
2
|
+
//# sourceMappingURL=p-D3qUITiS.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as t,c as i,h as s,d as o,t as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as t,c as i,h as s,d as o,t as a}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as h,getEnvelopeDocumentPageDisplayUri as d}from"@verdocs/js-sdk";import{t as n}from"./p-BCwFpXpV.js";import{d as r}from"./p-wUsR0Dpa.js";const c=()=>`verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}`;const l=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.pageRendered=i(this,"pageRendered");this.endpoint=h.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId=`verdocs-envelope-document-page-${Math.random().toString(36).substring(2,11)}`;this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}async componentWillLoad(){this.pageDisplayUri=await d(this.endpoint,this.documentId,this.pageNumber,this.type)}componentDidLoad(){this.resizeObserver=new ResizeObserver(n((e=>{for(const t of e){const e=t.contentRect.width;this.renderedWidth=e;this.renderedHeight=this.virtualHeight*(e/this.virtualWidth)}this.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)}disconnectedCallback(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()}notifyRenderedSize(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})}render(){const e=`${this.renderedHeight}px`;return s(o,{key:"7ed2187dfb4ef248411d777ad2837ba18a85ec45",id:`${this.containerId}`,style:{height:e,flex:`0 0 ${e}`}},this.layers.map((t=>t.type==="div"?s("div",{class:"verdocs-envelope-document-page-layer",id:`${this.containerId}-${t.name}`,style:{height:e}}):this.pageDisplayUri?s("img",{class:"verdocs-envelope-document-page-layer img",id:`${this.containerId}-${t.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":true,loading:"lazy",onLoad:e=>{this.naturalWidth=e.target.naturalWidth;this.naturalHeight=e.target.naturalHeight;this.aspectRatio=this.naturalWidth/this.naturalHeight;this.virtualHeight=this.virtualWidth/this.aspectRatio;this.renderedHeight=e.target.offsetWidth/this.aspectRatio}}):s("div",null))))}get container(){return this}static get style(){return c()}},[0,"verdocs-envelope-document-page",{endpoint:[16],envelopeId:[1,"envelope-id"],documentId:[1,"document-id"],pageNumber:[2,"page-number"],virtualWidth:[2,"virtual-width"],virtualHeight:[1026,"virtual-height"],layers:[16],type:[1],containerId:[32],renderedWidth:[32],renderedHeight:[32],naturalWidth:[32],naturalHeight:[32],aspectRatio:[32],skipFirstNotification:[32],pageDisplayUri:[32]}]);function p(){if(typeof customElements==="undefined"){return}const e=["verdocs-envelope-document-page","verdocs-flag"];e.forEach((e=>{switch(e){case"verdocs-envelope-document-page":if(!customElements.get(a(e))){customElements.define(a(e),l)}break;case"verdocs-flag":if(!customElements.get(a(e))){r()}break}}))}export{l as V,p as d};
|
|
2
|
+
//# sourceMappingURL=p-DIOVejyL.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as t,c as s,h as i,d as a,F as r,t as d}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as o,getTemplateDocumentPageDisplayUri as l,getTemplate as c}from"@verdocs/js-sdk";import{t as m,f as n,g as p}from"./p-BCwFpXpV.js";import{S as h}from"./p-C7hFgM52.js";import{d as u}from"./p-Bdf8pPWm.js";import{d as f}from"./p-REnrt0JM.js";import{d as v}from"./p-CyDWJAOZ.js";import{d as b}from"./p-DT0LGcPi.js";import{d as g}from"./p-DSK9z7EN.js";import{d as x}from"./p-BasWFMeN.js";import{d as y}from"./p-DwPH0TQ4.js";import{d as k}from"./p-BwEGkh_6.js";import{d as w}from"./p-DXLcCG08.js";import{d as E}from"./p-B845hxhl.js";import{d as j}from"./p-5E7bNT3k.js";import{d as P}from"./p-Cfiprngx.js";import{d as D}from"./p-pyA5cdVX.js";import{d as B}from"./p-DhO1wfh-.js";import{d as S}from"./p-wUsR0Dpa.js";import{d as W}from"./p-CioaaWeS.js";import{d as T}from"./p-B-_kYJtC.js";import{d as C}from"./p-BwUTiBud.js";import{d as $}from"./p-DQTI8vRX.js";import{d as N}from"./p-BXGNkmyr.js";import{d as R}from"./p-D3ohABOv.js";import{d as H}from"./p-DYtSnUj9.js";import{d as I}from"./p-CQUV5gMT.js";const U=()=>`verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}`;const F=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.pageRendered=s(this,"pageRendered");this.templateListenerId=null;this.endpoint=o.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId=`verdocs-document-page-${Math.random().toString(36).substring(2,11)}`;this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}async componentWillLoad(){this.pageDisplayUri=await l(this.endpoint,this.documentId,this.pageNumber);this.listenToTemplate()}componentDidLoad(){this.resizeObserver=new ResizeObserver(m((e=>{for(const t of e){const e=t.contentRect.width;this.renderedWidth=e;this.renderedHeight=this.virtualHeight*(e/this.virtualWidth)}this.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)}componentDidUpdate(){this.notifyRenderedSize()}disconnectedCallback(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()}async listenToTemplate(){this.unlistenToTemplate();h.subscribe("templates",this.templateId,(()=>c(this.endpoint,this.templateId)),false,(e=>{this.template=e;this.loading=false}))}unlistenToTemplate(){if(this.templateListenerId){h.store.delListener(this.templateListenerId);this.templateListenerId=null}}notifyRenderedSize(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}const e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}const t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:e,yScale:t})}render(){if(this.loading){return i(a,null,i("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}const e=`${this.renderedHeight}px`;return i(a,{id:`${this.containerId}`,style:{height:e,flex:`0 0 ${e}`}},this.layers.map((t=>{var s;return t.type==="div"?i("div",{class:"verdocs-template-document-page-layer",id:`${this.containerId}-${t.name}`,style:{height:e}},t.name==="controls"&&(((s=this.template)===null||s===void 0?void 0:s.fields)||[]).filter((e=>e&&e.document_id===this.documentId&&e.page===this.pageNumber)).map((e=>{var t,s;const a=p(e);let{name:d,type:o,multiline:l}=e;const{xScale:c,yScale:m,templateId:h,editable:u,disabled:f,done:v,pageNumber:b}=this;if(((t=e["setting"])===null||t===void 0?void 0:t.leading)>0||((s=e["settings"])===null||s===void 0?void 0:s.leading)>0){o="textarea";l=true}switch(o){case"textbox":return i("verdocs-field-textbox",{id:a,fieldname:d,source:"template",sourceid:h,editable:u,multiline:l,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"textarea":return i("verdocs-field-textarea",{id:a,fieldname:d,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"date":return i("verdocs-field-date",{id:a,fieldname:d,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"attachment":return i("verdocs-field-attachment",{id:a,fieldname:d,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"dropdown":return i("verdocs-field-dropdown",{id:a,fieldname:d,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"initial":return i("verdocs-field-initial",{id:a,fieldname:d,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"signature":return i("verdocs-field-signature",{id:a,fieldname:d,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,this.xScale,this.yScale)});case"timestamp":return i("verdocs-field-timestamp",{id:a,fieldname:d,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"checkbox":return i("verdocs-field-checkbox",{id:a,fieldname:d,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"radio":return i("verdocs-field-radio",{id:a,fieldname:d,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});default:return i(r,null,d)}}))):this.pageDisplayUri?i("img",{class:"verdocs-template-document-page-layer img",id:`${this.containerId}-${t.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":true,loading:"lazy",onLoad:e=>{this.naturalWidth=e.target.naturalWidth;this.naturalHeight=e.target.naturalHeight;this.aspectRatio=this.naturalWidth/this.naturalHeight;this.virtualHeight=this.virtualWidth/this.aspectRatio;this.renderedHeight=e.target.offsetWidth/this.aspectRatio}}):i("div",null)})))}get container(){return this}static get style(){return U()}},[0,"verdocs-template-document-page",{endpoint:[16],editable:[4],disabled:[4],done:[4],templateId:[513,"template-id"],documentId:[513,"document-id"],pageNumber:[514,"page-number"],virtualWidth:[2,"virtual-width"],virtualHeight:[1026,"virtual-height"],layers:[16],containerId:[32],renderedWidth:[32],renderedHeight:[32],naturalWidth:[32],naturalHeight:[32],aspectRatio:[32],skipFirstNotification:[32],pageDisplayUri:[32],xScale:[32],yScale:[32],loading:[32],template:[32]}]);function G(){if(typeof customElements==="undefined"){return}const e=["verdocs-template-document-page","verdocs-button","verdocs-checkbox","verdocs-component-error","verdocs-dialog","verdocs-field-attachment","verdocs-field-checkbox","verdocs-field-date","verdocs-field-dropdown","verdocs-field-initial","verdocs-field-radio","verdocs-field-signature","verdocs-field-textarea","verdocs-field-textbox","verdocs-field-timestamp","verdocs-flag","verdocs-help-icon","verdocs-loader","verdocs-ok-dialog","verdocs-portal","verdocs-select-input","verdocs-template-field-properties","verdocs-text-input","verdocs-upload-dialog"];e.forEach((e=>{switch(e){case"verdocs-template-document-page":if(!customElements.get(d(e))){customElements.define(d(e),F)}break;case"verdocs-button":if(!customElements.get(d(e))){u()}break;case"verdocs-checkbox":if(!customElements.get(d(e))){f()}break;case"verdocs-component-error":if(!customElements.get(d(e))){v()}break;case"verdocs-dialog":if(!customElements.get(d(e))){b()}break;case"verdocs-field-attachment":if(!customElements.get(d(e))){g()}break;case"verdocs-field-checkbox":if(!customElements.get(d(e))){x()}break;case"verdocs-field-date":if(!customElements.get(d(e))){y()}break;case"verdocs-field-dropdown":if(!customElements.get(d(e))){k()}break;case"verdocs-field-initial":if(!customElements.get(d(e))){w()}break;case"verdocs-field-radio":if(!customElements.get(d(e))){E()}break;case"verdocs-field-signature":if(!customElements.get(d(e))){j()}break;case"verdocs-field-textarea":if(!customElements.get(d(e))){P()}break;case"verdocs-field-textbox":if(!customElements.get(d(e))){D()}break;case"verdocs-field-timestamp":if(!customElements.get(d(e))){B()}break;case"verdocs-flag":if(!customElements.get(d(e))){S()}break;case"verdocs-help-icon":if(!customElements.get(d(e))){W()}break;case"verdocs-loader":if(!customElements.get(d(e))){T()}break;case"verdocs-ok-dialog":if(!customElements.get(d(e))){C()}break;case"verdocs-portal":if(!customElements.get(d(e))){$()}break;case"verdocs-select-input":if(!customElements.get(d(e))){N()}break;case"verdocs-template-field-properties":if(!customElements.get(d(e))){R()}break;case"verdocs-text-input":if(!customElements.get(d(e))){H()}break;case"verdocs-upload-dialog":if(!customElements.get(d(e))){I()}break}}))}export{F as V,G as d};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as t,c as s,h as i,d as a,F as r,t as o}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as d,getTemplateDocumentPageDisplayUri as l,getTemplate as c}from"@verdocs/js-sdk";import{t as m,f as n,g as p}from"./p-BCwFpXpV.js";import{S as h}from"./p-C7hFgM52.js";import{d as u}from"./p-Bdf8pPWm.js";import{d as f}from"./p-REnrt0JM.js";import{d as v}from"./p-CyDWJAOZ.js";import{d as b}from"./p-DT0LGcPi.js";import{d as g}from"./p-BT8wzCXz.js";import{d as x}from"./p-BasWFMeN.js";import{d as y}from"./p-DwPH0TQ4.js";import{d as k}from"./p-BwEGkh_6.js";import{d as w}from"./p-DXLcCG08.js";import{d as E}from"./p-B845hxhl.js";import{d as j}from"./p-5E7bNT3k.js";import{d as P}from"./p-Cfiprngx.js";import{d as D}from"./p-pyA5cdVX.js";import{d as S}from"./p-DhO1wfh-.js";import{d as W}from"./p-wUsR0Dpa.js";import{d as B}from"./p-CioaaWeS.js";import{d as T}from"./p-B-_kYJtC.js";import{d as C}from"./p-D3qUITiS.js";import{d as $}from"./p-DQTI8vRX.js";import{d as I}from"./p-BXGNkmyr.js";import{d as R}from"./p-D3ohABOv.js";import{d as H}from"./p-DYtSnUj9.js";import{d as N}from"./p-u16vefxk.js";const X=()=>`verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}`;const z=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.pageRendered=s(this,"pageRendered");this.templateListenerId=null;this.endpoint=d.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId=`verdocs-document-page-${Math.random().toString(36).substring(2,11)}`;this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}async componentWillLoad(){this.pageDisplayUri=await l(this.endpoint,this.documentId,this.pageNumber);this.listenToTemplate()}componentDidLoad(){this.resizeObserver=new ResizeObserver(m((e=>{for(const t of e){const e=t.contentRect.width;this.renderedWidth=e;this.renderedHeight=this.virtualHeight*(e/this.virtualWidth)}this.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)}componentDidUpdate(){this.notifyRenderedSize()}disconnectedCallback(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()}async listenToTemplate(){this.unlistenToTemplate();h.subscribe("templates",this.templateId,(()=>c(this.endpoint,this.templateId)),false,(e=>{this.template=e;this.loading=false}))}unlistenToTemplate(){if(this.templateListenerId){h.store.delListener(this.templateListenerId);this.templateListenerId=null}}notifyRenderedSize(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}const e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}const t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:e,yScale:t})}render(){if(this.loading){return i(a,null,i("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}const e=`${this.renderedHeight}px`;return i(a,{id:`${this.containerId}`,style:{height:e,flex:`0 0 ${e}`}},this.layers.map((t=>{var s;return t.type==="div"?i("div",{class:"verdocs-template-document-page-layer",id:`${this.containerId}-${t.name}`,style:{height:e}},t.name==="controls"&&(((s=this.template)===null||s===void 0?void 0:s.fields)||[]).filter((e=>e&&e.document_id===this.documentId&&e.page===this.pageNumber)).map((e=>{var t,s;const a=p(e);let{name:o,type:d,multiline:l}=e;const{xScale:c,yScale:m,templateId:h,editable:u,disabled:f,done:v,pageNumber:b}=this;if(((t=e["setting"])===null||t===void 0?void 0:t.leading)>0||((s=e["settings"])===null||s===void 0?void 0:s.leading)>0){d="textarea";l=true}switch(d){case"textbox":return i("verdocs-field-textbox",{id:a,fieldname:o,source:"template",sourceid:h,editable:u,multiline:l,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"textarea":return i("verdocs-field-textarea",{id:a,fieldname:o,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"date":return i("verdocs-field-date",{id:a,fieldname:o,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"attachment":return i("verdocs-field-attachment",{id:a,fieldname:o,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"dropdown":return i("verdocs-field-dropdown",{id:a,fieldname:o,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"initial":return i("verdocs-field-initial",{id:a,fieldname:o,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"signature":return i("verdocs-field-signature",{id:a,fieldname:o,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,this.xScale,this.yScale)});case"timestamp":return i("verdocs-field-timestamp",{id:a,fieldname:o,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"checkbox":return i("verdocs-field-checkbox",{id:a,fieldname:o,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});case"radio":return i("verdocs-field-radio",{id:a,fieldname:o,source:"template",sourceid:h,editable:u,disabled:f,done:v,xscale:c,yscale:m,pagenumber:b,isPreview:true,style:n(e,c,m)});default:return i(r,null,o)}}))):this.pageDisplayUri?i("img",{class:"verdocs-template-document-page-layer img",id:`${this.containerId}-${t.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":true,loading:"lazy",onLoad:e=>{this.naturalWidth=e.target.naturalWidth;this.naturalHeight=e.target.naturalHeight;this.aspectRatio=this.naturalWidth/this.naturalHeight;this.virtualHeight=this.virtualWidth/this.aspectRatio;this.renderedHeight=e.target.offsetWidth/this.aspectRatio}}):i("div",null)})))}get container(){return this}static get style(){return X()}},[0,"verdocs-template-document-page",{endpoint:[16],editable:[4],disabled:[4],done:[4],templateId:[513,"template-id"],documentId:[513,"document-id"],pageNumber:[514,"page-number"],virtualWidth:[2,"virtual-width"],virtualHeight:[1026,"virtual-height"],layers:[16],containerId:[32],renderedWidth:[32],renderedHeight:[32],naturalWidth:[32],naturalHeight:[32],aspectRatio:[32],skipFirstNotification:[32],pageDisplayUri:[32],xScale:[32],yScale:[32],loading:[32],template:[32]}]);function F(){if(typeof customElements==="undefined"){return}const e=["verdocs-template-document-page","verdocs-button","verdocs-checkbox","verdocs-component-error","verdocs-dialog","verdocs-field-attachment","verdocs-field-checkbox","verdocs-field-date","verdocs-field-dropdown","verdocs-field-initial","verdocs-field-radio","verdocs-field-signature","verdocs-field-textarea","verdocs-field-textbox","verdocs-field-timestamp","verdocs-flag","verdocs-help-icon","verdocs-loader","verdocs-ok-dialog","verdocs-portal","verdocs-select-input","verdocs-template-field-properties","verdocs-text-input","verdocs-upload-dialog"];e.forEach((e=>{switch(e){case"verdocs-template-document-page":if(!customElements.get(o(e))){customElements.define(o(e),z)}break;case"verdocs-button":if(!customElements.get(o(e))){u()}break;case"verdocs-checkbox":if(!customElements.get(o(e))){f()}break;case"verdocs-component-error":if(!customElements.get(o(e))){v()}break;case"verdocs-dialog":if(!customElements.get(o(e))){b()}break;case"verdocs-field-attachment":if(!customElements.get(o(e))){g()}break;case"verdocs-field-checkbox":if(!customElements.get(o(e))){x()}break;case"verdocs-field-date":if(!customElements.get(o(e))){y()}break;case"verdocs-field-dropdown":if(!customElements.get(o(e))){k()}break;case"verdocs-field-initial":if(!customElements.get(o(e))){w()}break;case"verdocs-field-radio":if(!customElements.get(o(e))){E()}break;case"verdocs-field-signature":if(!customElements.get(o(e))){j()}break;case"verdocs-field-textarea":if(!customElements.get(o(e))){P()}break;case"verdocs-field-textbox":if(!customElements.get(o(e))){D()}break;case"verdocs-field-timestamp":if(!customElements.get(o(e))){S()}break;case"verdocs-flag":if(!customElements.get(o(e))){W()}break;case"verdocs-help-icon":if(!customElements.get(o(e))){B()}break;case"verdocs-loader":if(!customElements.get(o(e))){T()}break;case"verdocs-ok-dialog":if(!customElements.get(o(e))){C()}break;case"verdocs-portal":if(!customElements.get(o(e))){$()}break;case"verdocs-select-input":if(!customElements.get(o(e))){I()}break;case"verdocs-template-field-properties":if(!customElements.get(o(e))){R()}break;case"verdocs-text-input":if(!customElements.get(o(e))){H()}break;case"verdocs-upload-dialog":if(!customElements.get(o(e))){N()}break}}))}export{z as V,F as d};
|
|
2
|
+
//# sourceMappingURL=p-DVGumEtx.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as o,c as t,h as i,t as n}from"./p-yZBlG3YQ.js";import{D as s}from"./p-17OorOnH.js";import{d as a}from"./p-DT0LGcPi.js";const d=()=>`verdocs-download-dialog{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-download-dialog .heading-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}verdocs-download-dialog .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:15px;padding:0 24px 20px 24px}verdocs-download-dialog .download-option{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:12px 15px;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;-webkit-transition:all 0.2s ease;transition:all 0.2s ease;gap:15px;background:white}verdocs-download-dialog .download-option.disabled{opacity:0.5;cursor:not-allowed}verdocs-download-dialog .download-option.disabled:hover{background-color:white;border-color:#e5e7eb}verdocs-download-dialog .download-option:hover{border-color:#654dcb;background-color:#f9fafb}verdocs-download-dialog .icon-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:36px;height:36px;background-color:#f3f4f6;border-radius:50%;color:#4b5563;-ms-flex-negative:0;flex-shrink:0}verdocs-download-dialog .icon-container svg{width:18px;height:18px}verdocs-download-dialog .text-container{-ms-flex:1;flex:1}verdocs-download-dialog .text-container .label{font-weight:500;color:#111827;margin-bottom:2px}verdocs-download-dialog .text-container .description{font-size:13px;color:#6b7280}verdocs-download-dialog .status-indicator{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:2px;font-size:11px;color:#9ca3af;min-width:50px}verdocs-download-dialog .status-indicator .signed{color:#10b981}verdocs-download-dialog .status-indicator .spinner-inline{display:-ms-flexbox;display:flex;color:#9ca3af;-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}verdocs-download-dialog .status-indicator svg{width:16px;height:16px}verdocs-download-dialog .info-message{font-size:13px;color:#6b7280;font-style:italic;padding:0 4px}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}`;const r=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V9L13 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M13 2V9H20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;const l=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 15C15.866 15 19 11.866 19 8C19 4.13401 15.866 1 12 1C8.13401 1 5 4.13401 5 8C5 11.866 8.13401 15 12 15Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.21 13.89L7 23L12 20L17 23L15.79 13.88" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;const c=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 16V22H14V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 16H18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 22H4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 10L12 16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 12L12 16L16 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 16V4H20V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;const f=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;const p=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23 4V10H17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20.49 15A9 9 0 1 1 21.23 8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;const b=e(class e extends o{constructor(e){super();if(e!==false){this.__registerHost()}this.download=t(this,"download");this.exit=t(this,"exit");this.signed=false;this.polling=false;this.documents=[];this.hasCertificate=false}handleOptionClick(e,o){const t=this.documents.some((e=>e.type==="certificate"))||this.hasCertificate;const i=this.signed&&t;const n=e===s.certificate&&!i;const a=e===s.zip&&(this.polling||!i);const d=e===s.combined&&(this.polling||!i||!o);if(n||a||d)return;this.download.emit({action:e,documentId:o})}render(){const e=this.documents.filter((e=>e.type==="attachment")).sort(((e,o)=>e.order!==o.order?e.order-o.order:e.created_at.localeCompare(o.created_at)));const o=this.documents.find((e=>e.type==="certificate"));const t=!!o||this.hasCertificate;const n=this.signed&&t;const a=!this.polling&&n;const d=a&&!!(o===null||o===void 0?void 0:o.id);const b=!this.signed;return i("verdocs-dialog",{key:"09670a45a18cf110462390fd0ef2f705b3577f31",onExit:()=>this.exit.emit()},i("div",{key:"2b01ee1c71aa51f80d9ecf1ec16a62af146342cd",slot:"heading",class:"heading-container"},i("h3",{key:"1ddb9cf369621aeafebc0ce3511f1e59579ee471",style:{margin:"0",fontSize:"1.25rem",fontWeight:"600",padding:"16px 24px"}},"Download")),i("div",{key:"c62c72d8eeb5bc7cde8791370bcc2f5a46978dd1",slot:"content",class:"content"},e.length<=2&&e.map((e=>i("div",{class:"download-option",onClick:()=>this.handleOptionClick(s.document,e.id)},i("div",{class:"icon-container",innerHTML:r}),i("div",{class:"text-container"},i("div",{class:"label"},e.name),i("div",{class:"description"},"Download the document")),b?i("div",{class:"status-indicator"},i("div",{class:"spinner-inline",innerHTML:p})):i("div",{class:"status-indicator"},i("div",{class:"signed",innerHTML:f}),i("span",null,"Signed"))))),e.length>2&&i("div",{key:"10f6f2b1a7197533e5ad1d8b00cdfb14b465eec1",class:"info-message"},"Multiple documents attached. Please use the ZIP option below to download all files."),i("div",{key:"8a0c4c5a3e7c5f99626b2f2ece050b3c66f53006",class:{"download-option":true,disabled:!n},onClick:()=>this.handleOptionClick(s.certificate),title:!n?"Certificate not yet available":""},i("div",{key:"f44f22a0655603d2af1785fd306aea4b99e168a9",class:"icon-container",innerHTML:l}),i("div",{key:"fa99982c36808621b10dd30a72412be02b2ac0c7",class:"text-container"},i("div",{key:"66d6d8d832ca66f17d2b6074fe80f0a573539aa7",class:"label"},"Certificate"),i("div",{key:"a7c6c02afdf06fb59622f41e80946e9ad0feb231",class:"description"},"Download the certificate")),n?i("div",{class:"status-indicator"},i("div",{class:"signed",innerHTML:f}),i("span",null,"Ready")):i("div",{class:"status-indicator"},i("div",{class:"spinner-inline",innerHTML:p}))),i("div",{key:"d6c7a9d4ffa660869730292e8981b7fca9ec2d7a",class:{"download-option":true,disabled:!d},onClick:()=>this.handleOptionClick(s.combined,o===null||o===void 0?void 0:o.id),title:!d?"Waiting for all documents to be ready":""},i("div",{key:"c49585f9f2995bf90a6a7a7f1006ff62e1c4ff75",class:"icon-container",innerHTML:c}),i("div",{key:"c886fb02b282f9e3e8bbc932652e85acadba3620",class:"text-container"},i("div",{key:"cd321c5acde3b28048549f8dfb4ae576e21b0b71",class:"label"},"Combined"),i("div",{key:"cbb9b3280585382ad606611fd07ab040b9176d69",class:"description"},"Merge envelopes & certificate into a single PDF")),d?i("div",{class:"status-indicator"},i("div",{class:"signed",innerHTML:f}),i("span",null,"Ready")):i("div",{class:"status-indicator"},i("div",{class:"spinner-inline",innerHTML:p}))),i("div",{key:"33e022ea22d4aa4b9e4169ec8709243d143c9320",class:{"download-option":true,disabled:!a},onClick:()=>this.handleOptionClick(s.zip),title:!a?"Waiting for all documents to be ready":""},i("div",{key:"96af105f93ed2cf4903466df246d9be3eeebbbdc",class:"icon-container",innerHTML:c}),i("div",{key:"f4ca89d84a10444d9db3b3745779a5eee05cf73d",class:"text-container"},i("div",{key:"c48b2b5a6184162b59123981ac2bdbe2d358f8b9",class:"label"},"All Files"),i("div",{key:"72620fada50c48437eaa40983f7b6e8c84e4f35a",class:"description"},"Download everything as a ZIP file")),a?i("div",{class:"status-indicator"},i("div",{class:"signed",innerHTML:f}),i("span",null,"Ready")):i("div",{class:"status-indicator"},i("div",{class:"spinner-inline",innerHTML:p})))),i("div",{key:"0f10d2c47891ad31a70d5ef412377a35c58f840d",slot:"footer",style:{display:"none"}}))}static get style(){return d()}},[0,"verdocs-download-dialog",{signed:[4],polling:[4],documents:[16],hasCertificate:[4,"has-certificate"]}]);function g(){if(typeof customElements==="undefined"){return}const e=["verdocs-download-dialog","verdocs-dialog"];e.forEach((e=>{switch(e){case"verdocs-download-dialog":if(!customElements.get(n(e))){customElements.define(n(e),b)}break;case"verdocs-dialog":if(!customElements.get(n(e))){a()}break}}))}export{b as V,g as d};
|
|
2
|
+
//# sourceMappingURL=p-DfaM_cug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["verdocsDownloadDialogCss","DocumentIcon","CertificateIcon","ZipIcon","CheckIcon","RefreshIcon","VerdocsDownloadDialog","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","signed","polling","documents","hasCertificate","handleOptionClick","action","documentId","hasCert","some","d","type","isCertReady","isCertificateDisabled","DownloadAction","certificate","isZipDisabled","zip","isCombinedDisabled","combined","download","emit","render","attachments","filter","sort","a","b","order","created_at","localeCompare","certificateDocument","find","hasCertificateDoc","certReady","allDone","isCombinedReady","id","attachmentBusy","h","key","onExit","exit","slot","class","style","margin","fontSize","fontWeight","padding","length","map","doc","onClick","document","innerHTML","name","disabled","title","display"],"sources":["src/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.scss?tag=verdocs-download-dialog","src/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-download-dialog {\n box-sizing: border-box;\n font-family: $primary-font;\n\n .heading-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .content {\n display: flex;\n flex-direction: column;\n gap: 15px;\n padding: 0 24px 20px 24px;\n }\n\n .download-option {\n display: flex;\n align-items: center;\n padding: 12px 15px;\n border: 1px solid #e5e7eb;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s ease;\n gap: 15px;\n background: white;\n\n &.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n\n &:hover {\n background-color: white;\n border-color: #e5e7eb;\n }\n }\n\n &:hover {\n border-color: $verdocs-primary-color;\n background-color: #f9fafb;\n }\n }\n\n .icon-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n background-color: #f3f4f6;\n border-radius: 50%;\n color: #4b5563;\n flex-shrink: 0;\n\n svg {\n width: 18px;\n height: 18px;\n }\n }\n\n .text-container {\n flex: 1;\n\n .label {\n font-weight: 500;\n color: #111827;\n margin-bottom: 2px;\n }\n\n .description {\n font-size: 13px;\n color: #6b7280;\n }\n }\n\n .status-indicator {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 2px;\n font-size: 11px;\n color: #9ca3af;\n min-width: 50px;\n\n .signed {\n color: #10b981;\n }\n\n .spinner-inline {\n display: flex;\n color: #9ca3af;\n animation: rotate 2s linear infinite;\n }\n\n svg {\n width: 16px;\n height: 16px;\n }\n }\n\n .info-message {\n font-size: 13px;\n color: #6b7280;\n font-style: italic;\n padding: 0 4px;\n }\n}\n\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n}\n","import {Component, h, Event, EventEmitter, Prop} from '@stencil/core';\nimport {DownloadAction} from '../../../utils/Types';\n\nconst DocumentIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V9L13 2Z\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M13 2V9H20\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\nconst CertificateIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 15C15.866 15 19 11.866 19 8C19 4.13401 15.866 1 12 1C8.13401 1 5 4.13401 5 8C5 11.866 8.13401 15 12 15Z\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M8.21 13.89L7 23L12 20L17 23L15.79 13.88\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\nconst ZipIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10 16V22H14V16\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M6 16H18\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M20 22H4\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M12 10L12 16\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M8 12L12 16L16 12\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M4 16V4H20V16\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\nconst CheckIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M20 6L9 17L4 12\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\nconst RefreshIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M23 4V10H17\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M20.49 15A9 9 0 1 1 21.23 8\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\n\n@Component({\n tag: 'verdocs-download-dialog',\n styleUrl: 'verdocs-download-dialog.scss',\n shadow: false,\n})\nexport class VerdocsDownloadDialog {\n /**\n * Event fired when an option is selected.\n */\n /**\n * Event fired when an option is selected.\n */\n @Event({composed: true}) download: EventEmitter<{action: DownloadAction; documentId?: string}>;\n\n /**\n * Event fired when Cancel is pressed or background is clicked.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n /**\n * If true, the envelope is considered signed.\n */\n @Prop() signed = false;\n\n /**\n * If true, we are currently polling the server for updates.\n */\n @Prop() polling = false;\n\n /**\n * The list of documents in the envelope.\n */\n @Prop() documents: any[] = [];\n\n /**\n * If true, the envelope has a certificate available for download.\n */\n @Prop() hasCertificate = false;\n\n handleOptionClick(action: DownloadAction, documentId?: string) {\n const hasCert = this.documents.some(d => d.type === 'certificate') || this.hasCertificate;\n const isCertReady = this.signed && hasCert;\n const isCertificateDisabled = action === DownloadAction.certificate && !isCertReady;\n const isZipDisabled = action === DownloadAction.zip && (this.polling || !isCertReady);\n const isCombinedDisabled = action === DownloadAction.combined && (this.polling || !isCertReady || !documentId);\n\n if (isCertificateDisabled || isZipDisabled || isCombinedDisabled) return;\n this.download.emit({action, documentId});\n }\n\n render() {\n const attachments = this.documents.filter(d => d.type === 'attachment').sort((a, b) => (a.order !== b.order ? a.order - b.order : a.created_at.localeCompare(b.created_at)));\n const certificateDocument = this.documents.find(d => d.type === 'certificate');\n const hasCertificateDoc = !!certificateDocument || this.hasCertificate;\n const certReady = this.signed && hasCertificateDoc;\n const allDone = !this.polling && certReady;\n const isCombinedReady = allDone && !!certificateDocument?.id;\n const attachmentBusy = !this.signed;\n\n return (\n <verdocs-dialog onExit={() => this.exit.emit()}>\n <div slot=\"heading\" class=\"heading-container\">\n <h3 style={{margin: '0', fontSize: '1.25rem', fontWeight: '600', padding: '16px 24px'}}>Download</h3>\n </div>\n\n <div slot=\"content\" class=\"content\">\n {attachments.length <= 2 &&\n attachments.map(doc => (\n <div class=\"download-option\" onClick={() => this.handleOptionClick(DownloadAction.document, doc.id)}>\n <div class=\"icon-container\" innerHTML={DocumentIcon}></div>\n <div class=\"text-container\">\n <div class=\"label\">{doc.name}</div>\n <div class=\"description\">Download the document</div>\n </div>\n {attachmentBusy ? (\n <div class=\"status-indicator\">\n <div class=\"spinner-inline\" innerHTML={RefreshIcon}></div>\n </div>\n ) : (\n <div class=\"status-indicator\">\n <div class=\"signed\" innerHTML={CheckIcon}></div>\n <span>Signed</span>\n </div>\n )}\n </div>\n ))}\n\n {attachments.length > 2 && <div class=\"info-message\">Multiple documents attached. Please use the ZIP option below to download all files.</div>}\n\n <div\n class={{'download-option': true, 'disabled': !certReady}}\n onClick={() => this.handleOptionClick(DownloadAction.certificate)}\n title={!certReady ? 'Certificate not yet available' : ''}\n >\n <div class=\"icon-container\" innerHTML={CertificateIcon}></div>\n <div class=\"text-container\">\n <div class=\"label\">Certificate</div>\n <div class=\"description\">Download the certificate</div>\n </div>\n {certReady ? (\n <div class=\"status-indicator\">\n <div class=\"signed\" innerHTML={CheckIcon}></div>\n <span>Ready</span>\n </div>\n ) : (\n <div class=\"status-indicator\">\n <div class=\"spinner-inline\" innerHTML={RefreshIcon}></div>\n </div>\n )}\n </div>\n\n <div\n class={{'download-option': true, 'disabled': !isCombinedReady}}\n onClick={() => this.handleOptionClick(DownloadAction.combined, certificateDocument?.id)}\n title={!isCombinedReady ? 'Waiting for all documents to be ready' : ''}\n >\n <div class=\"icon-container\" innerHTML={ZipIcon}></div>\n <div class=\"text-container\">\n <div class=\"label\">Combined</div>\n <div class=\"description\">Merge envelopes & certificate into a single PDF</div>\n </div>\n {isCombinedReady ? (\n <div class=\"status-indicator\">\n <div class=\"signed\" innerHTML={CheckIcon}></div>\n <span>Ready</span>\n </div>\n ) : (\n <div class=\"status-indicator\">\n <div class=\"spinner-inline\" innerHTML={RefreshIcon}></div>\n </div>\n )}\n </div>\n\n <div\n class={{'download-option': true, 'disabled': !allDone}}\n onClick={() => this.handleOptionClick(DownloadAction.zip)}\n title={!allDone ? 'Waiting for all documents to be ready' : ''}\n >\n <div class=\"icon-container\" innerHTML={ZipIcon}></div>\n <div class=\"text-container\">\n <div class=\"label\">All Files</div>\n <div class=\"description\">Download everything as a ZIP file</div>\n </div>\n {allDone ? (\n <div class=\"status-indicator\">\n <div class=\"signed\" innerHTML={CheckIcon}></div>\n <span>Ready</span>\n </div>\n ) : (\n <div class=\"status-indicator\">\n <div class=\"spinner-inline\" innerHTML={RefreshIcon}></div>\n </div>\n )}\n </div>\n </div>\n\n <div slot=\"footer\" style={{display: 'none'}} />\n </verdocs-dialog>\n );\n }\n}\n"],"mappings":"wIAAA,MAAMA,EAA2B,IAAM,g7ECGvC,MAAMC,EAAe,khBACrB,MAAMC,EAAkB,waACxB,MAAMC,EAAU,suBAChB,MAAMC,EAAY,kMAClB,MAAMC,EAAc,2T,MAOPC,EAAqBC,EAAA,MAAAD,UAAAE,EALlC,WAAAC,CAAAC,G,sGAsBUC,KAAAC,OAAS,MAKTD,KAAAE,QAAU,MAKVF,KAAAG,UAAmB,GAKnBH,KAAAI,eAAiB,KA2H1B,CAzHC,iBAAAC,CAAkBC,EAAwBC,GACxC,MAAMC,EAAUR,KAAKG,UAAUM,MAAKC,GAAKA,EAAEC,OAAS,iBAAkBX,KAAKI,eAC3E,MAAMQ,EAAcZ,KAAKC,QAAUO,EACnC,MAAMK,EAAwBP,IAAWQ,EAAeC,cAAgBH,EACxE,MAAMI,EAAgBV,IAAWQ,EAAeG,MAAQjB,KAAKE,UAAYU,GACzE,MAAMM,EAAqBZ,IAAWQ,EAAeK,WAAanB,KAAKE,UAAYU,IAAgBL,GAEnG,GAAIM,GAAyBG,GAAiBE,EAAoB,OAClElB,KAAKoB,SAASC,KAAK,CAACf,SAAQC,c,CAG9B,MAAAe,GACE,MAAMC,EAAcvB,KAAKG,UAAUqB,QAAOd,GAAKA,EAAEC,OAAS,eAAcc,MAAK,CAACC,EAAGC,IAAOD,EAAEE,QAAUD,EAAEC,MAAQF,EAAEE,MAAQD,EAAEC,MAAQF,EAAEG,WAAWC,cAAcH,EAAEE,cAC/J,MAAME,EAAsB/B,KAAKG,UAAU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AAa,sCAEzBT,EACCI,EAAA,OAAKK,MAAM,oBACTL,EAAA,OAAKK,MAAM,SAASW,UAAW9D,IAC/B8C,EAAA,sBAGFA,EAAA,OAAKK,MAAM,oBACTL,EAAA,OAAKK,MAAM,iBAAiBW,UAAW7D,OAM/C6C,EAAA,OAAAC,IAAA,2CAAKG,KAAK,SAASE,MAAO,CAACc,QAAS,U","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as s,c as t,h as o,d as r,F as i,t as a}from"./p-yZBlG3YQ.js";import{i as d}from"./p-CGNX5HqF.js";import{VerdocsEndpoint as c,getTemplate as l,integerSequence as m}from"@verdocs/js-sdk";import{a as n}from"./p-BCwFpXpV.js";import{S as p}from"./p-C1sRVZWv.js";import{S as f}from"./p-C7hFgM52.js";import{d as v}from"./p-Bdf8pPWm.js";import{d as u}from"./p-REnrt0JM.js";import{d as h}from"./p-CyDWJAOZ.js";import{d as b}from"./p-DT0LGcPi.js";import{d as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as s,c as t,h as o,d as r,F as i,t as a}from"./p-yZBlG3YQ.js";import{i as d}from"./p-CGNX5HqF.js";import{VerdocsEndpoint as c,getTemplate as l,integerSequence as m}from"@verdocs/js-sdk";import{a as n}from"./p-BCwFpXpV.js";import{S as p}from"./p-C1sRVZWv.js";import{S as f}from"./p-C7hFgM52.js";import{d as v}from"./p-Bdf8pPWm.js";import{d as u}from"./p-REnrt0JM.js";import{d as h}from"./p-CyDWJAOZ.js";import{d as b}from"./p-DT0LGcPi.js";import{d as E}from"./p-BT8wzCXz.js";import{d as g}from"./p-BasWFMeN.js";import{d as k}from"./p-DwPH0TQ4.js";import{d as x}from"./p-BwEGkh_6.js";import{d as j}from"./p-DXLcCG08.js";import{d as w}from"./p-B845hxhl.js";import{d as I}from"./p-5E7bNT3k.js";import{d as y}from"./p-Cfiprngx.js";import{d as C}from"./p-pyA5cdVX.js";import{d as D}from"./p-DhO1wfh-.js";import{d as T}from"./p-wUsR0Dpa.js";import{d as B}from"./p-CioaaWeS.js";import{d as R}from"./p-B-_kYJtC.js";import{d as W}from"./p-D3qUITiS.js";import{d as P}from"./p-DQTI8vRX.js";import{d as V}from"./p-BXGNkmyr.js";import{d as G}from"./p-DVGumEtx.js";import{d as X}from"./p-D3ohABOv.js";import{d as z}from"./p-DYtSnUj9.js";import{d as F}from"./p-u16vefxk.js";const N=()=>`verdocs-preview{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}`;const S=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.sdkError=t(this,"sdkError");this.templateListenerId=null;this.renderedPages={};this.endpoint=c.getDefault();this.templateId=null;this.loading=true;this.template=null}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){this.unlistenToTemplate();f.subscribe("templates",this.templateId,(()=>l(this.endpoint,this.templateId)),false,(e=>{this.template=e;this.loading=false}))}unlistenToTemplate(){if(this.templateListenerId){f.store.delListener(this.templateListenerId);this.templateListenerId=null}}onTemplateIdChanged(e){console.log("[PREVIEW] Template ID changed",e);this.listenToTemplate()}async componentWillLoad(){var e,s,t;try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[PREVIEW] Unable to start builder session, must be authenticated");return}if(!this.templateId){console.log(`[PREVIEW] Missing required template ID ${this.templateId}`);return}this.listenToTemplate()}catch(o){console.log("[PREVIEW] Error with preview session",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(o.message,(s=o.response)===null||s===void 0?void 0:s.status,(t=o.response)===null||t===void 0?void 0:t.data))}}componentDidRender(){var e;(e=this.hostEl)===null||e===void 0?void 0:e.querySelectorAll(".verdocs-field").forEach((e=>{d(e).unset()}))}handlePageRendered(e){var s;const t=e.detail;this.renderedPages[`${t.documentId}:${t.pageNumber}`]=t;const o=(((s=this.template)===null||s===void 0?void 0:s.fields)||[]).filter((e=>{if(e["document_id"]){return e["document_id"]===t.documentId&&e.page===t.pageNumber}return e.page===t.pageNumber}));o.forEach((e=>n("template",e,t,{disabled:true,editable:false,draggable:false})))}render(){var e;if(this.loading){return o(r,null,o("verdocs-loader",null))}return o(r,null,(((e=this.template)===null||e===void 0?void 0:e.documents)||[]).map((e=>{const s=m(1,e.pages);return o(i,null,s.map((s=>{var t;const r=((t=e.page_sizes)===null||t===void 0?void 0:t[s])||{width:612,height:792};return o("verdocs-template-document-page",{templateId:e.template_id,documentId:e.id,pageNumber:s,disabled:true,editable:false,done:false,virtualWidth:r.width,virtualHeight:r.height,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))})))}get hostEl(){return this}static get watchers(){return{templateId:[{onTemplateIdChanged:0}]}}static get style(){return N()}},[0,"verdocs-preview",{endpoint:[16],templateId:[1,"template-id"],loading:[32],template:[32]},undefined,{templateId:[{onTemplateIdChanged:0}]}]);function M(){if(typeof customElements==="undefined"){return}const e=["verdocs-preview","verdocs-button","verdocs-checkbox","verdocs-component-error","verdocs-dialog","verdocs-field-attachment","verdocs-field-checkbox","verdocs-field-date","verdocs-field-dropdown","verdocs-field-initial","verdocs-field-radio","verdocs-field-signature","verdocs-field-textarea","verdocs-field-textbox","verdocs-field-timestamp","verdocs-flag","verdocs-help-icon","verdocs-loader","verdocs-ok-dialog","verdocs-portal","verdocs-select-input","verdocs-template-document-page","verdocs-template-field-properties","verdocs-text-input","verdocs-upload-dialog"];e.forEach((e=>{switch(e){case"verdocs-preview":if(!customElements.get(a(e))){customElements.define(a(e),S)}break;case"verdocs-button":if(!customElements.get(a(e))){v()}break;case"verdocs-checkbox":if(!customElements.get(a(e))){u()}break;case"verdocs-component-error":if(!customElements.get(a(e))){h()}break;case"verdocs-dialog":if(!customElements.get(a(e))){b()}break;case"verdocs-field-attachment":if(!customElements.get(a(e))){E()}break;case"verdocs-field-checkbox":if(!customElements.get(a(e))){g()}break;case"verdocs-field-date":if(!customElements.get(a(e))){k()}break;case"verdocs-field-dropdown":if(!customElements.get(a(e))){x()}break;case"verdocs-field-initial":if(!customElements.get(a(e))){j()}break;case"verdocs-field-radio":if(!customElements.get(a(e))){w()}break;case"verdocs-field-signature":if(!customElements.get(a(e))){I()}break;case"verdocs-field-textarea":if(!customElements.get(a(e))){y()}break;case"verdocs-field-textbox":if(!customElements.get(a(e))){C()}break;case"verdocs-field-timestamp":if(!customElements.get(a(e))){D()}break;case"verdocs-flag":if(!customElements.get(a(e))){T()}break;case"verdocs-help-icon":if(!customElements.get(a(e))){B()}break;case"verdocs-loader":if(!customElements.get(a(e))){R()}break;case"verdocs-ok-dialog":if(!customElements.get(a(e))){W()}break;case"verdocs-portal":if(!customElements.get(a(e))){P()}break;case"verdocs-select-input":if(!customElements.get(a(e))){V()}break;case"verdocs-template-document-page":if(!customElements.get(a(e))){G()}break;case"verdocs-template-field-properties":if(!customElements.get(a(e))){X()}break;case"verdocs-text-input":if(!customElements.get(a(e))){z()}break;case"verdocs-upload-dialog":if(!customElements.get(a(e))){F()}break}}))}export{S as V,M as d};
|
|
2
|
+
//# sourceMappingURL=p-DjOTs59Z.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as t,c as o,h as s,d as i,t as d}from"./p-yZBlG3YQ.js";import{verifySigner as a}from"@verdocs/js-sdk";import{D as c}from"./p-C_Xku1v2.js";import{V as n}from"./p-D97GxsI-.js";import{d as l}from"./p-Bdf8pPWm.js";import{d as r}from"./p-DT0LGcPi.js";import{d as f}from"./p-CioaaWeS.js";import{d as b}from"./p-DYtSnUj9.js";const p=()=>`verdocs-otp-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-otp-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-otp-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}verdocs-otp-dialog .heading .title{font-size:20px;font-weight:500}verdocs-otp-dialog .step{margin-left:6px;color:#666}verdocs-otp-dialog .help-box{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:0;-ms-flex-align:center;align-items:center;color:black;margin-bottom:20px}verdocs-otp-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:0;font-size:14px;gap:5px}verdocs-otp-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-otp-dialog .help-text{font-weight:400}verdocs-otp-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;width:100%}verdocs-otp-dialog .buttons verdocs-button{margin-left:16px}`;const h=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.exit=o(this,"exit");this.next=o(this,"next");this.resendTimeout=null;this.endpoint=c;this.method="email";this.resendDisabled=true;this.response=""}componentDidLoad(){this.startResendTimeout();setTimeout((()=>{a(this.endpoint,{auth_method:this.method,code:"",resend:true}).then((e=>{console.log("Resend result",e);this.response=""})).catch((e=>console.log("Error resending code",e)))}),1e3)}disconnectedCallback(){if(this.resendTimeout){clearTimeout(this.resendTimeout);this.resendTimeout=null}}handleCancel(){this.exit.emit()}startResendTimeout(){this.resendDisabled=true;if(this.resendTimeout){clearTimeout(this.resendTimeout)}this.resendTimeout=setTimeout((()=>{this.resendDisabled=false}),3e4)}handleResend(){this.startResendTimeout();a(this.endpoint,{auth_method:this.method,code:"",resend:true}).then((e=>{console.log("Resend result",e);this.response="";n("A new code has been sent.")})).catch((e=>console.log("Error resending code",e)))}handleSubmit(){this.startResendTimeout();a(this.endpoint,{auth_method:this.method,code:this.response}).then((e=>{console.log("Verification completed",e);this.next.emit({response:e});n("Thank you. Your verification was successful.")})).catch((e=>{n("Invalid verification code. Please try again.");console.log("Invalid code",e)}));this.response=""}render(){return s(i,{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as t,c as o,h as s,d as i,t as d}from"./p-yZBlG3YQ.js";import{verifySigner as a}from"@verdocs/js-sdk";import{D as c}from"./p-C_Xku1v2.js";import{V as n}from"./p-D97GxsI-.js";import{d as l}from"./p-Bdf8pPWm.js";import{d as r}from"./p-DT0LGcPi.js";import{d as f}from"./p-CioaaWeS.js";import{d as b}from"./p-DYtSnUj9.js";const p=()=>`verdocs-otp-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-otp-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-otp-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}verdocs-otp-dialog .heading .title{font-size:20px;font-weight:500}verdocs-otp-dialog .step{margin-left:6px;color:#666}verdocs-otp-dialog .help-box{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:0;-ms-flex-align:center;align-items:center;color:black;margin-bottom:20px}verdocs-otp-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:0;font-size:14px;gap:5px}verdocs-otp-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-otp-dialog .help-text{font-weight:400}verdocs-otp-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;width:100%}verdocs-otp-dialog .buttons verdocs-button{margin-left:16px}`;const h=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.exit=o(this,"exit");this.next=o(this,"next");this.resendTimeout=null;this.endpoint=c;this.method="email";this.resendDisabled=true;this.response=""}componentDidLoad(){this.startResendTimeout();setTimeout((()=>{a(this.endpoint,{auth_method:this.method,code:"",resend:true}).then((e=>{console.log("Resend result",e);this.response=""})).catch((e=>console.log("Error resending code",e)))}),1e3)}disconnectedCallback(){if(this.resendTimeout){clearTimeout(this.resendTimeout);this.resendTimeout=null}}handleCancel(){this.exit.emit()}startResendTimeout(){this.resendDisabled=true;if(this.resendTimeout){clearTimeout(this.resendTimeout)}this.resendTimeout=setTimeout((()=>{this.resendDisabled=false}),3e4)}handleResend(){this.startResendTimeout();a(this.endpoint,{auth_method:this.method,code:"",resend:true}).then((e=>{console.log("Resend result",e);this.response="";n("A new code has been sent.")})).catch((e=>console.log("Error resending code",e)))}handleSubmit(){this.startResendTimeout();a(this.endpoint,{auth_method:this.method,code:this.response}).then((e=>{console.log("Verification completed",e);this.next.emit({response:e});n("Thank you. Your verification was successful.")})).catch((e=>{n("Invalid verification code. Please try again.");console.log("Invalid code",e)}));this.response=""}render(){return s(i,{key:"023b116ed7c27778ea10fe686ec7d7e8acbc469c"},s("verdocs-dialog",{key:"afa04b7f3fa6fef3b84d5b72e350a3f8df0bb869",persistent:true,onExit:()=>this.handleCancel()},s("div",{key:"9a3a47beae7443f5e2eaa674890f63b5720d7174",slot:"heading",class:"heading"},s("div",{key:"d674ef94306a3f8f236fd5e8410dc3450bc6ef3e",class:"title"},"Verification Required")),s("div",{key:"7d56dcdca5d2cf1ab700049c603950cbe927539d",slot:"content",class:"content"},s("div",{key:"83e0fa5e37cb319dc3623420b4a721d1b695651f",class:"help-box"},s("div",{key:"d20b15f97cf1d25acc32679bfac11b7dc1da4ee2",class:"help-details"},s("div",{key:"83d1e2592612f37a6654eb40a8adda0946341ad8",class:"help-text"},"Please check your messages for a one-time code. If you did not receive it, be sure to check your Spam/Junk folder."))),s("verdocs-text-input",{key:"849de4a9aec3b6c5de95da02012d76c6df9afd58",id:"verdocs-otp-input",value:this.response,onClick:e=>e.stopPropagation(),placeholder:"Enter your one-time code...",onInput:e=>this.response=e.target.value})),s("div",{key:"bd907f037eb48b6df2bcc01eb7bf12037d8ff6e1",slot:"footer",class:"buttons footer"},s("verdocs-button",{key:"480878ab4ac42ea4a52422ab66b48167086eae7e",label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),s("verdocs-button",{key:"d51b1fb3b14910035933eb8c963a5bd1b67e26fd",label:"Resend",onClick:()=>this.handleResend(),disabled:this.resendDisabled}),s("verdocs-button",{key:"64fdd8807c2464897de4f147aa3274fd09a200de",label:"Submit",onClick:()=>this.handleSubmit(),disabled:!this.response}))))}static get style(){return p()}},[0,"verdocs-otp-dialog",{endpoint:[1040],method:[1],resendDisabled:[32],response:[32]}]);function m(){if(typeof customElements==="undefined"){return}const e=["verdocs-otp-dialog","verdocs-button","verdocs-dialog","verdocs-help-icon","verdocs-text-input"];e.forEach((e=>{switch(e){case"verdocs-otp-dialog":if(!customElements.get(d(e))){customElements.define(d(e),h)}break;case"verdocs-button":if(!customElements.get(d(e))){l()}break;case"verdocs-dialog":if(!customElements.get(d(e))){r()}break;case"verdocs-help-icon":if(!customElements.get(d(e))){f()}break;case"verdocs-text-input":if(!customElements.get(d(e))){b()}break}}))}export{h as V,m as d};
|
|
2
|
+
//# sourceMappingURL=p-Dmw-lE3L.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as o,c as t,h as s,t as i}from"./p-yZBlG3YQ.js";import{d}from"./p-DT0LGcPi.js";const n=()=>`verdocs-question-dialog{top:0;left:0;right:0;bottom:0;position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-question-dialog.closed{display:none}verdocs-question-dialog textarea{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:14px;padding:9px;outline:none}verdocs-question-dialog .heading .title{font-size:18px}verdocs-question-dialog .buttons{gap:20px;display:-ms-flexbox;display:flex;margin-top:24px;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button{-ms-flex:1;flex:1;border:0;height:38px;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;cursor:pointer;border-radius:6px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button.cancel{background-color:#654dcb}verdocs-question-dialog .buttons button.ok{background-color:#55bc81}verdocs-question-dialog .buttons button.ok.single{max-width:150px}verdocs-question-dialog .buttons button:disabled{background-color:#6c727f}`;const c=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#ffffff"/></svg>`;const a=e(class e extends o{constructor(e){super();if(e!==false){this.__registerHost()}this.next=t(this,"next");this.exit=t(this,"exit");this.question="";this.closed=false}handleOk(){this.next.emit({question:this.question})}handleCancel(){this.exit.emit()}handleDismiss(e){this.closed=true;if(e.target.className==="background-overlay"){e.preventDefault();this.exit.emit()}}render(){return s("verdocs-dialog",{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as o,c as t,h as s,t as i}from"./p-yZBlG3YQ.js";import{d}from"./p-DT0LGcPi.js";const n=()=>`verdocs-question-dialog{top:0;left:0;right:0;bottom:0;position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-question-dialog.closed{display:none}verdocs-question-dialog textarea{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:14px;padding:9px;outline:none}verdocs-question-dialog .heading .title{font-size:18px}verdocs-question-dialog .buttons{gap:20px;display:-ms-flexbox;display:flex;margin-top:24px;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button{-ms-flex:1;flex:1;border:0;height:38px;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;cursor:pointer;border-radius:6px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button.cancel{background-color:#654dcb}verdocs-question-dialog .buttons button.ok{background-color:#55bc81}verdocs-question-dialog .buttons button.ok.single{max-width:150px}verdocs-question-dialog .buttons button:disabled{background-color:#6c727f}`;const c=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#ffffff"/></svg>`;const a=e(class e extends o{constructor(e){super();if(e!==false){this.__registerHost()}this.next=t(this,"next");this.exit=t(this,"exit");this.question="";this.closed=false}handleOk(){this.next.emit({question:this.question})}handleCancel(){this.exit.emit()}handleDismiss(e){this.closed=true;if(e.target.className==="background-overlay"){e.preventDefault();this.exit.emit()}}render(){return s("verdocs-dialog",{key:"2697b58a7c65243705c15993e5a967894b725196",onExit:e=>this.handleDismiss(e)},s("div",{key:"0c6d340d05717b4580e001e8cff4d544f3dac072",slot:"heading",class:"heading"},s("div",{key:"e5e3c323b48a90431f2593a062715d316608dc71",class:"icon",innerHTML:c}),s("div",{key:"8ebc86de76b84cf255efbf6bc8db8876142e858d",class:"title"},"Ask the Sender a Question")),s("div",{key:"c3f96587257dbd2e0ce98eba44a8ef7c3bba7c88",slot:"content",class:"content"},s("textarea",{key:"22c2c8dd80e41e77e0bed92f0b48a81f85466532",name:"question",rows:6,placeholder:"Enter your question...",onInput:e=>this.question=e.target.value},this.question)),s("div",{key:"11a32d726ead166b7b9bfa994a31de4c4998fdec",class:"footer",slot:"footer"},s("div",{key:"3fa336237b33537b9154c1eb7dfcd6b929a28e1e",class:"buttons"},s("button",{key:"aedcec8fc3948515d93adce69f15eb048bdd824e",class:"cancel",onClick:()=>this.handleCancel()},"Cancel"),s("button",{key:"2bd012fe2e6866922edde4a4abadb943c78f44ef",class:"ok",onClick:()=>this.handleOk()},"OK"))))}static get style(){return n()}},[0,"verdocs-question-dialog",{question:[1025],closed:[32]}]);function r(){if(typeof customElements==="undefined"){return}const e=["verdocs-question-dialog","verdocs-dialog"];e.forEach((e=>{switch(e){case"verdocs-question-dialog":if(!customElements.get(i(e))){customElements.define(i(e),a)}break;case"verdocs-dialog":if(!customElements.get(i(e))){d()}break}}))}export{a as V,r as d};
|
|
2
|
+
//# sourceMappingURL=p-DsEO0-XR.js.map
|