@verdocs/web-sdk 5.4.1 → 6.0.2
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/Datastore-CIzsoGWH.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-view.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-delegate-dialog_5.cjs.entry.js +6 -2
- package/dist/cjs/verdocs-delegate-dialog_5.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-dialog_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +6 -6
- package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-menu-panel_2.cjs.entry.js +7 -7
- package/dist/cjs/verdocs-organization-card.verdocs-portal.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-organization-card_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-organization-card_2.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 +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-sign.entry.cjs.js.map +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/cjs/verdocs-toggle.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-toggle.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/controls/verdocs-organization-card/verdocs-organization-card.js +7 -3
- package/dist/collection/components/controls/verdocs-organization-card/verdocs-organization-card.js.map +1 -1
- package/dist/collection/components/controls/verdocs-toggle/verdocs-toggle.js +2 -1
- package/dist/collection/components/controls/verdocs-toggle/verdocs-toggle.js.map +1 -1
- package/dist/collection/components/dialogs/verdocs-disclosure-dialog/verdocs-disclosure-dialog.js +26 -2
- package/dist/collection/components/dialogs/verdocs-disclosure-dialog/verdocs-disclosure-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-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-sign/verdocs-sign.js +1 -1
- 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-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-DfHhHBGb.js → p-AQsHwZ27.js} +9 -9
- package/dist/components/{p-DfHhHBGb.js.map → p-AQsHwZ27.js.map} +1 -1
- package/dist/components/{p-CtdUBMXV.js → p-BR7qeKJV.js} +3 -3
- package/dist/components/{p-CtdUBMXV.js.map → p-BR7qeKJV.js.map} +1 -1
- package/dist/components/{p-CVTTgVZn.js → p-Bn-A1NMA.js} +9 -4
- package/dist/components/p-Bn-A1NMA.js.map +1 -0
- package/dist/components/{p-CjER1kvL.js → p-C1nftqjj.js} +3 -3
- package/dist/components/{p-CjER1kvL.js.map → p-C1nftqjj.js.map} +1 -1
- package/dist/components/{p-veD8T-Q9.js → p-CQ-UXlBO.js} +3 -3
- package/dist/components/{p-veD8T-Q9.js.map → p-CQ-UXlBO.js.map} +1 -1
- package/dist/components/{p-mh1GqHKh.js → p-CTzrE2_W.js} +4 -4
- package/dist/components/{p-mh1GqHKh.js.map → p-CTzrE2_W.js.map} +1 -1
- package/dist/components/{p-BThDnPcG.js → p-CcglHGeY.js} +4 -4
- package/dist/components/{p-BThDnPcG.js.map → p-CcglHGeY.js.map} +1 -1
- package/dist/components/{p-BPwf1M9U.js → p-Cmm_Efcd.js} +10 -10
- package/dist/components/{p-BPwf1M9U.js.map → p-Cmm_Efcd.js.map} +1 -1
- package/dist/components/{p-BEs2iroT.js → p-CozA58e8.js} +3 -3
- package/dist/components/{p-BEs2iroT.js.map → p-CozA58e8.js.map} +1 -1
- package/dist/components/{p-BRIaPsiT.js → p-D9UxTdE4.js} +4 -4
- package/dist/components/{p-BRIaPsiT.js.map → p-D9UxTdE4.js.map} +1 -1
- package/dist/components/{p-BjaqsRJ7.js → p-DCaVuows.js} +10 -10
- package/dist/components/{p-BjaqsRJ7.js.map → p-DCaVuows.js.map} +1 -1
- package/dist/components/{p-Dpsw5VfK.js → p-DepyvOoM.js} +3 -3
- package/dist/components/{p-Dpsw5VfK.js.map → p-DepyvOoM.js.map} +1 -1
- package/dist/components/p-DmsV595e.js.map +1 -1
- package/dist/components/{p-CCpSKeX1.js → p-DnAJsr7Q.js} +3 -3
- package/dist/components/{p-CCpSKeX1.js.map → p-DnAJsr7Q.js.map} +1 -1
- package/dist/components/{p-B85lx7qr.js → p-DoO2XAMG.js} +3 -3
- package/dist/components/{p-B85lx7qr.js.map → p-DoO2XAMG.js.map} +1 -1
- package/dist/components/{p-WvkbfsBD.js → p-Dt5I6d_s.js} +4 -4
- package/dist/components/{p-WvkbfsBD.js.map → p-Dt5I6d_s.js.map} +1 -1
- package/dist/components/{p-CXo2jCTk.js → p-OV-ZpJVv.js} +3 -3
- package/dist/components/{p-CXo2jCTk.js.map → p-OV-ZpJVv.js.map} +1 -1
- package/dist/components/{p-TKqTuY1V.js → p-Sk_71M_-.js} +3 -3
- package/dist/components/{p-TKqTuY1V.js.map → p-Sk_71M_-.js.map} +1 -1
- package/dist/components/{p-BGFhQ8wl.js → p-w7SkLcPj.js} +3 -3
- package/dist/components/{p-BGFhQ8wl.js.map → p-w7SkLcPj.js.map} +1 -1
- package/dist/components/{p-B5fnyMp7.js → p-zcZJDJyB.js} +9 -9
- package/dist/components/{p-B5fnyMp7.js.map → p-zcZJDJyB.js.map} +1 -1
- package/dist/components/verdocs-build.js +13 -13
- package/dist/components/verdocs-disclosure-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 +7 -7
- package/dist/components/verdocs-field-attachment.js +1 -1
- package/dist/components/verdocs-field-initial.js +1 -1
- package/dist/components/verdocs-field-signature.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-organization-card.js +1 -1
- package/dist/components/verdocs-organization-card.js.map +1 -1
- package/dist/components/verdocs-otp-dialog.js +1 -1
- package/dist/components/verdocs-preview.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-sign.js +6 -6
- 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 +2 -2
- package/dist/components/verdocs-toggle.js +2 -1
- package/dist/components/verdocs-toggle.js.map +1 -1
- package/dist/components/verdocs-upload-dialog.js +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/esm/Datastore-DmsV595e.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-view.entry.js.map +1 -1
- package/dist/esm/verdocs-delegate-dialog_5.entry.js +6 -2
- package/dist/esm/verdocs-delegate-dialog_5.entry.js.map +1 -1
- package/dist/esm/verdocs-dialog_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +6 -6
- package/dist/esm/verdocs-field-attachment_13.entry.js +3 -3
- package/dist/esm/verdocs-menu-panel_2.entry.js +7 -7
- package/dist/esm/verdocs-organization-card.verdocs-portal.entry.js.map +1 -1
- package/dist/esm/verdocs-organization-card_2.entry.js +1 -1
- package/dist/esm/verdocs-organization-card_2.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 +1 -1
- package/dist/esm/verdocs-sign.entry.js.map +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/verdocs-toggle.entry.js +2 -1
- package/dist/esm/verdocs-toggle.entry.js.map +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/Datastore-DmsV595e.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-view.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-delegate-dialog_5.entry.js +1 -1
- package/dist/esm-es5/verdocs-delegate-dialog_5.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-dialog_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
- package/dist/esm-es5/verdocs-menu-panel_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-organization-card.verdocs-portal.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-organization-card_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-organization-card_2.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-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/esm-es5/verdocs-toggle.entry.js +1 -1
- package/dist/esm-es5/verdocs-toggle.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/controls/verdocs-organization-card/verdocs-organization-card.d.ts +1 -1
- package/dist/types/components/dialogs/verdocs-disclosure-dialog/verdocs-disclosure-dialog.d.ts +4 -0
- package/dist/types/components.d.ts +12 -2
- package/dist/verdocs-web-sdk/{p-09739e9c.system.entry.js → p-00806fd6.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-1715ba0b.entry.js → p-0ba21663.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-7d20e56f.system.entry.js → p-1a6f8e15.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-86e61f1e.entry.js → p-1da2979c.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-73d15c2d.entry.js → p-1fece585.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-73d15c2d.entry.js.map → p-1fece585.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-df0d2ecf.system.entry.js → p-23d2bebc.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-f9f25d23.system.entry.js → p-29f142c7.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-f9f25d23.system.entry.js.map → p-29f142c7.system.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-746841e0.entry.js → p-31821b7f.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-53c7d3fa.system.entry.js → p-3f6a17d4.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-993f6f1e.system.entry.js → p-41bfb3b1.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-55c8f6e1.entry.js → p-4761e4b9.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-21cccfb7.system.entry.js → p-497b5c5d.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-75b145ad.entry.js → p-551e08c1.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-fb3f21c4.system.entry.js → p-6c4a8b93.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-af4b5497.entry.js → p-751beab0.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-2f1f78dc.system.entry.js → p-864f6c7e.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-4e1ca6a2.system.entry.js → p-8835c006.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-3411287e.system.entry.js → p-97a2843d.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-97a2843d.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-CiKvW9mY.system.js.map → p-B4iEf9n4.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-Cf3DnWn_.system.js.map → p-BVutGFrl.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-Bi4zuCYf.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-CW3sVhBH.system.js.map → p-BscsgV4o.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-C4Ying50.system.js.map → p-Bu5xpJsB.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-Bkf0vzuf.system.js.map → p-CcZnCyhK.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-CmnBGerV.system.js.map +1 -1
- package/dist/verdocs-web-sdk/{p-i1n3BAWn.system.js.map → p-Cts9LOkJ.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-CQcYKQmp.system.js.map → p-D7IFi8me.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-m45VPoeg.system.js.map → p-DNjMP8Na.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-DV-Ttvuy.system.js.map → p-DY0HrduN.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-DcCGkiJ-.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-B2Tj4fuc.system.js.map → p-DcKTmwEW.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-DmsV595e.js.map +1 -1
- package/dist/verdocs-web-sdk/p-RlE9Yh59.system.js +1 -1
- package/dist/verdocs-web-sdk/p-ZZD41CrO.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-83387f5b.entry.js → p-a94a6d45.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6c1c7149.entry.js → p-b4bfad4d.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-0fdf7355.system.entry.js → p-b72d1a5f.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6da12e5e.entry.js → p-b77076ae.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-23a1dfd4.entry.js → p-baaa811b.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-CIFyh5SW.system.js.map → p-c-HO8wJy.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-8e2cca1b.entry.js → p-d5f1bffb.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-8e2cca1b.entry.js.map → p-d5f1bffb.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-d946094f.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-d946094f.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-6658ff38.system.entry.js → p-e755e978.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6658ff38.system.entry.js.map → p-e755e978.system.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-f05f021e.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-f05f021e.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-c5ae0bf7.system.entry.js → p-f6598c9b.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-fc5c2c45.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-fc5c2c45.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-6de2d1e3.entry.js → p-fd1f2414.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-nr83qKQ0.system.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-view.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-organization-card.verdocs-portal.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-sign.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-toggle.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +12 -8
- package/dist/components/p-CVTTgVZn.js.map +0 -1
- package/dist/custom-elements.json +0 -2575
- package/dist/verdocs-web-sdk/p-09b7db37.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-09b7db37.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-3411287e.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-3CxpvGP7.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-9613e8fc.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-9613e8fc.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-BYZ-2MPe.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-CAo9BWy4.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-DE2U9Rfd.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-e70424c1.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-e70424c1.entry.js.map +0 -1
- /package/dist/verdocs-web-sdk/{p-09739e9c.system.entry.js.map → p-00806fd6.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-1715ba0b.entry.js.map → p-0ba21663.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-7d20e56f.system.entry.js.map → p-1a6f8e15.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-86e61f1e.entry.js.map → p-1da2979c.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-df0d2ecf.system.entry.js.map → p-23d2bebc.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-746841e0.entry.js.map → p-31821b7f.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-53c7d3fa.system.entry.js.map → p-3f6a17d4.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-993f6f1e.system.entry.js.map → p-41bfb3b1.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-55c8f6e1.entry.js.map → p-4761e4b9.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-21cccfb7.system.entry.js.map → p-497b5c5d.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-75b145ad.entry.js.map → p-551e08c1.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-fb3f21c4.system.entry.js.map → p-6c4a8b93.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-af4b5497.entry.js.map → p-751beab0.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-2f1f78dc.system.entry.js.map → p-864f6c7e.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-4e1ca6a2.system.entry.js.map → p-8835c006.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-83387f5b.entry.js.map → p-a94a6d45.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-6c1c7149.entry.js.map → p-b4bfad4d.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-0fdf7355.system.entry.js.map → p-b72d1a5f.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-6da12e5e.entry.js.map → p-b77076ae.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-23a1dfd4.entry.js.map → p-baaa811b.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-c5ae0bf7.system.entry.js.map → p-f6598c9b.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-6de2d1e3.entry.js.map → p-fd1f2414.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,o){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function n(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):r(e.value).then(n,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,r,s,n;return n={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function a(e){return function(t){return l([e,t])}}function l(a){if(o)throw new TypeError("Generator is already executing.");while(n&&(n=0,a[0]&&(i=0)),i)try{if(o=1,r&&(s=a[0]&2?r["return"]:a[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;if(r=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){i.label=a[1];break}if(a[0]===6&&i.label<s[1]){i.label=s[1];s=a;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(a);break}if(s[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];r=0}finally{o=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-6vpKbd31.js";import{VerdocsEndpoint,getTemplate,updateTemplateRole,deleteTemplateRole,isValidEmail}from"@verdocs/js-sdk";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-DmsV595e.js";var verdocsMenuPanelCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}#verdocs-menu-panel-overlay{top:0;left:0;width:100%;height:100%;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.4980392157)}#verdocs-menu-panel{opacity:0;z-index:10001;position:fixed;overflow-y:scroll;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-animation:showVerdocsMenuPanel 0.35s;-webkit-animation-fill-mode:forwards}@-webkit-keyframes showVerdocsMenuPanel{0%{opacity:0;right:-300px}100%{right:0;opacity:1}}';var VerdocsMenuPanel=function(){function e(e){registerInstance(this,e);this.close=createEvent(this,"close");this.moved=false;this.overlayId="verdocs-menu-panel-overlay";this.panelId="verdocs-menu-panel";this.side="right";this.overlay=true;this.width=300}e.prototype.handleClick=function(e){var t;if(!this.element.contains(e.target)){this.hide();(t=this.close)===null||t===void 0?void 0:t.emit()}};e.prototype.componentWillLoad=function(){this.hide();if(this.overlay){this.portal=document.createElement("div");this.portal.setAttribute("id",this.overlayId);document.body.append(this.portal)}this.portal=document.createElement("div");this.portal.setAttribute("id",this.panelId);this.portal.style.top="0px";this.portal.style.bottom="0px";this.portal.style.width="".concat(this.width,"px");if(this.side==="left"){this.portal.style.left="0px"}else{this.portal.style.right="0px"}document.body.append(this.portal)};e.prototype.componentDidLoad=function(){this.portal.appendChild(this.element)};e.prototype.disconnectedCallback=function(){this.moved?this.portal.remove():this.moved=true};e.prototype.hide=function(){var e,t;(e=document.getElementById(this.overlayId))===null||e===void 0?void 0:e.remove();(t=document.getElementById(this.panelId))===null||t===void 0?void 0:t.remove()};e.prototype.render=function(){var e=this;return h(Host,{key:"433d003e79f33ac91e6535b34a7857520eba52a9",ref:function(t){return e.element=t}},h("slot",{key:"349bf90ff34df330916d1aad0a40c79cce1c32bc"}))};return e}();VerdocsMenuPanel.style=verdocsMenuPanelCss;var verdocsTemplateRolePropertiesCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-role-properties{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form{gap:15px;padding:20px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-role-properties form .instructions{margin:7px 0 0 0;font-size:12px;font-style:italic}verdocs-template-role-properties form .input-label{display:block;font-size:14px;-ms-flex:0 0 100px;flex:0 0 100px;font-weight:700;margin:0 0 4px 0;color:#555570}verdocs-template-role-properties form .first-last{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form verdocs-help-icon{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-role-properties verdocs-select-input label{display:block}verdocs-template-role-properties verdocs-text-input{margin:0}verdocs-template-role-properties verdocs-text-input label{display:block}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;padding:0 6px;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}';var TrashIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var VerdocsTemplateRoleProperties=function(){function e(e){registerInstance(this,e);this.close=createEvent(this,"close");this.delete=createEvent(this,"delete");this.sdkError=createEvent(this,"sdkError");this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.roleName="";this.dirty=false;this.saving=false;this.name="";this.type="signer";this.first_name="";this.last_name="";this.email="";this.phone="";this.delegator=false;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;return __generator(this,(function(o){try{this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}this.listenToTemplate()}catch(o){console.log("[ROLES Error with preview session",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(i=o.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){console.log("[ROLES] Loading tempate",this.templateId);this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){var i;console.log("[BUILD] Template Updated",t);e.template=t;e.loading=false;var o=(i=e.template)===null||i===void 0?void 0:i.roles.find((function(t){return t.name===e.roleName}));if(o){e.name=o.name;e.type=o.type;e.first_name=o.first_name;e.last_name=o.last_name;e.email=o.email;e.phone=o.phone;e.delegator=o.delegator;console.log("[ROLES] Editing role",o)}}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.handleCancel=function(e){var t=this;var i,o;e.stopPropagation();var r=(i=this.template)===null||i===void 0?void 0:i.roles.find((function(e){return e.name===t.roleName}));if(r){this.name=r.name;this.type=r.type;this.first_name=r.first_name;this.last_name=r.last_name;this.email=r.email;this.phone=r.phone;this.delegator=r.delegator}this.dirty=false;(o=this.close)===null||o===void 0?void 0:o.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){e.stopPropagation();this.saving=true;updateTemplateRole(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,delegator:this.delegator}).then((function(e){return __awaiter(t,void 0,void 0,(function(){var t,i,o;var r=this;return __generator(this,(function(s){console.log("[ROLES] Update result",e);this.saving=false;this.dirty=false;i=JSON.parse(JSON.stringify(this.template));o=i.roles.findIndex((function(e){return e.name===r.roleName}));if(o>-1){i.roles[o]=e}Store.updateTemplate(this.templateId,i);(t=this.close)===null||t===void 0?void 0:t.emit();return[2]}))}))})).catch((function(e){console.log("[ROLES Update error",e);t.saving=false}));return[2]}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")){deleteTemplateRole(this.endpoint,this.templateId,this.roleName).then((function(){var e,i;var o=JSON.parse(JSON.stringify(t.template));o.roles=o.roles.filter((function(e){return e.name!==t.roleName}));Store.getTemplate(t.endpoint,t.templateId,true);(e=t.delete)===null||e===void 0?void 0:e.emit({templateId:t.templateId,roleName:t.roleName});(i=t.close)===null||i===void 0?void 0:i.emit()})).catch((function(e){console.log("[ROLES Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;var t;var i=(((t=this.template)===null||t===void 0?void 0:t.fields)||[]).some((function(t){return t.role_name===e.roleName}));var o=!this.email&&!this.first_name&&!this.last_name||isValidEmail(this.email)&&!!this.first_name&&!!this.last_name;return h(Host,{key:"d4c37fca9a9c22c9f3003ea2a2c1a070117c8501"},h("form",{key:"d28575d04fecc59fcc121361eabd5461e001f12a",onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("div",{key:"be7250c9e2ff836659df4cb0cb981157669e7e14"},h("verdocs-text-input",{key:"723db8c1d20939240cb8a9f84361b814beca6a17",id:"verdocs-role-name",label:"Role Name (Must be unique)",value:this.name,autocomplete:"off",disabled:i,placeholder:"Role Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}}),i&&h("div",{key:"332f5540e44ef06c92996bcb8950626557df8150",class:"instructions"},"This role has fields assigned and can no longer be renamed.")),h("div",{key:"56bf537b21242728085f77c24a41fb4a49213be5"},h("div",{key:"693f574ea0f0b425f82cb6edbb3c7783233c6696",class:"input-label"},"Type:"),h("verdocs-select-input",{key:"04ea33db6d24942f2a7c3b723c54b1336dac23ff",value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:function(t){e.type=t.target.value;e.dirty=true}})),h("div",{key:"3411058195a726713ebdba433be7c072cd2be5dd"},h("div",{key:"41b5f721eb1ff092ba566f64b6754bc5e90e005d",class:"input-label"},"Default Contact Info:"),h("div",{key:"5d408963fe123ecca0f887352851e249f58e0757",class:"first-last"},h("verdocs-text-input",{key:"fbb4d52f70d1d7eb3c3d6e90a7fb4d657e2832d8",id:"verdocs-recipient-first",value:this.first_name,autocomplete:"off",placeholder:"First...",onInput:function(t){e.first_name=t.target.value;e.dirty=true}}),h("verdocs-text-input",{key:"c90a3b9a7dc20341f927242ba1f07e74e385a0d6",id:"verdocs-recipient-first",value:this.last_name,autocomplete:"off",placeholder:"Last...",onInput:function(t){e.last_name=t.target.value;e.dirty=true}}))),h("div",{key:"8e2f1a1c777c056e8a5f0cd85752fcba307c97bf"},h("verdocs-text-input",{key:"ed96c96a0953fee944a4901179ce756c59c6d628",id:"verdocs-recipient-email",value:this.email,autocomplete:"off",placeholder:"Email Address...",onInput:function(t){e.email=t.target.value;e.dirty=true}}),h("div",{key:"57e9f058b09be51fb2fea5448db9fa0daf7dfb93",style:{height:"15px"}}),h("div",{key:"ac2b3ab57b35d263f7ac61b1f53b7232d646ccca"},h("verdocs-text-input",{key:"a50deda8d68c2092c762d3c38e3a6c891b4a14d3",id:"verdocs-recipient-phone",value:this.phone,autocomplete:"off",placeholder:"Phone Number...",onInput:function(t){e.phone=t.target.value;e.dirty=true}}))),h("div",{key:"186dee0aa79fb21f0df7dcc6068c35e908b3ce0a",class:"buttons"},h("button",{key:"12b015e64c80673eb3dd841289e957378e6623e9",class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:TrashIcon}),h("div",{key:"0f543abb38ae9d3737456ad8608a127b3832d1b7",style:{flex:"1"}}),h("verdocs-button",{key:"6469a66eaa588ef2555302f21af22cf70dcb4496",size:"small",label:"Save",disabled:!this.dirty||!o,onClick:function(t){return e.handleSave(t)}}))))};return e}();VerdocsTemplateRoleProperties.style=verdocsTemplateRolePropertiesCss;export{VerdocsMenuPanel as verdocs_menu_panel,VerdocsTemplateRoleProperties as verdocs_template_role_properties};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,o){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function n(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):r(e.value).then(n,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,r,s,n;return n={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function a(e){return function(t){return l([e,t])}}function l(a){if(o)throw new TypeError("Generator is already executing.");while(n&&(n=0,a[0]&&(i=0)),i)try{if(o=1,r&&(s=a[0]&2?r["return"]:a[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;if(r=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){i.label=a[1];break}if(a[0]===6&&i.label<s[1]){i.label=s[1];s=a;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(a);break}if(s[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];r=0}finally{o=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-6vpKbd31.js";import{VerdocsEndpoint,getTemplate,updateTemplateRole,deleteTemplateRole,isValidEmail}from"@verdocs/js-sdk";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-DmsV595e.js";var verdocsMenuPanelCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}#verdocs-menu-panel-overlay{top:0;left:0;width:100%;height:100%;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.4980392157)}#verdocs-menu-panel{opacity:0;z-index:10001;position:fixed;overflow-y:scroll;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-animation:showVerdocsMenuPanel 0.35s;-webkit-animation-fill-mode:forwards}@-webkit-keyframes showVerdocsMenuPanel{0%{opacity:0;right:-300px}100%{right:0;opacity:1}}';var VerdocsMenuPanel=function(){function e(e){registerInstance(this,e);this.close=createEvent(this,"close");this.moved=false;this.overlayId="verdocs-menu-panel-overlay";this.panelId="verdocs-menu-panel";this.side="right";this.overlay=true;this.width=300}e.prototype.handleClick=function(e){var t;if(!this.element.contains(e.target)){this.hide();(t=this.close)===null||t===void 0?void 0:t.emit()}};e.prototype.componentWillLoad=function(){this.hide();if(this.overlay){this.portal=document.createElement("div");this.portal.setAttribute("id",this.overlayId);document.body.append(this.portal)}this.portal=document.createElement("div");this.portal.setAttribute("id",this.panelId);this.portal.style.top="0px";this.portal.style.bottom="0px";this.portal.style.width="".concat(this.width,"px");if(this.side==="left"){this.portal.style.left="0px"}else{this.portal.style.right="0px"}document.body.append(this.portal)};e.prototype.componentDidLoad=function(){this.portal.appendChild(this.element)};e.prototype.disconnectedCallback=function(){this.moved?this.portal.remove():this.moved=true};e.prototype.hide=function(){var e,t;(e=document.getElementById(this.overlayId))===null||e===void 0?void 0:e.remove();(t=document.getElementById(this.panelId))===null||t===void 0?void 0:t.remove()};e.prototype.render=function(){var e=this;return h(Host,{key:"433d003e79f33ac91e6535b34a7857520eba52a9",ref:function(t){return e.element=t}},h("slot",{key:"349bf90ff34df330916d1aad0a40c79cce1c32bc"}))};return e}();VerdocsMenuPanel.style=verdocsMenuPanelCss;var verdocsTemplateRolePropertiesCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-role-properties{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form{gap:15px;padding:20px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-role-properties form .instructions{margin:7px 0 0 0;font-size:12px;font-style:italic}verdocs-template-role-properties form .input-label{display:block;font-size:14px;-ms-flex:0 0 100px;flex:0 0 100px;font-weight:700;margin:0 0 4px 0;color:#555570}verdocs-template-role-properties form .first-last{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form verdocs-help-icon{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-role-properties verdocs-select-input label{display:block}verdocs-template-role-properties verdocs-text-input{margin:0}verdocs-template-role-properties verdocs-text-input label{display:block}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;padding:0 6px;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}';var TrashIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var VerdocsTemplateRoleProperties=function(){function e(e){registerInstance(this,e);this.close=createEvent(this,"close");this.delete=createEvent(this,"delete");this.sdkError=createEvent(this,"sdkError");this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.roleName="";this.dirty=false;this.saving=false;this.name="";this.type="signer";this.first_name="";this.last_name="";this.email="";this.phone="";this.delegator=false;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;return __generator(this,(function(o){try{this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}this.listenToTemplate()}catch(o){console.log("[ROLES Error with preview session",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(i=o.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){console.log("[ROLES] Loading tempate",this.templateId);this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){var i;console.log("[BUILD] Template Updated",t);e.template=t;e.loading=false;var o=(i=e.template)===null||i===void 0?void 0:i.roles.find((function(t){return t.name===e.roleName}));if(o){e.name=o.name;e.type=o.type;e.first_name=o.first_name;e.last_name=o.last_name;e.email=o.email;e.phone=o.phone;e.delegator=o.delegator;console.log("[ROLES] Editing role",o)}}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.handleCancel=function(e){var t=this;var i,o;e.stopPropagation();var r=(i=this.template)===null||i===void 0?void 0:i.roles.find((function(e){return e.name===t.roleName}));if(r){this.name=r.name;this.type=r.type;this.first_name=r.first_name;this.last_name=r.last_name;this.email=r.email;this.phone=r.phone;this.delegator=r.delegator}this.dirty=false;(o=this.close)===null||o===void 0?void 0:o.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){e.stopPropagation();this.saving=true;updateTemplateRole(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,delegator:this.delegator}).then((function(e){return __awaiter(t,void 0,void 0,(function(){var t,i,o;var r=this;return __generator(this,(function(s){console.log("[ROLES] Update result",e);this.saving=false;this.dirty=false;i=JSON.parse(JSON.stringify(this.template));o=i.roles.findIndex((function(e){return e.name===r.roleName}));if(o>-1){i.roles[o]=e}Store.updateTemplate(this.templateId,i);(t=this.close)===null||t===void 0?void 0:t.emit();return[2]}))}))})).catch((function(e){console.log("[ROLES Update error",e);t.saving=false}));return[2]}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")){deleteTemplateRole(this.endpoint,this.templateId,this.roleName).then((function(){var e,i;var o=JSON.parse(JSON.stringify(t.template));o.roles=o.roles.filter((function(e){return e.name!==t.roleName}));Store.getTemplate(t.endpoint,t.templateId,true);(e=t.delete)===null||e===void 0?void 0:e.emit({templateId:t.templateId,roleName:t.roleName});(i=t.close)===null||i===void 0?void 0:i.emit()})).catch((function(e){console.log("[ROLES Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;var t;var i=(((t=this.template)===null||t===void 0?void 0:t.fields)||[]).some((function(t){return t.role_name===e.roleName}));var o=!this.email&&!this.first_name&&!this.last_name||isValidEmail(this.email)&&!!this.first_name&&!!this.last_name;return h(Host,{key:"ef1a6f482f86dcf3d56b43345215cc2f779fc446"},h("form",{key:"f4512fa3dbd01c2fbea4a69a8b0b0236bdbfcda0",onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("div",{key:"a2d311a4855ebb02fe1de42bb969c84fb1cc0717"},h("verdocs-text-input",{key:"7dd8b59c718c212955bb16676f7611d316b54c04",id:"verdocs-role-name",label:"Role Name (Must be unique)",value:this.name,autocomplete:"off",disabled:i,placeholder:"Role Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}}),i&&h("div",{key:"6ecf0487b63a2071b1ca744d94c181058f0a1139",class:"instructions"},"This role has fields assigned and can no longer be renamed.")),h("div",{key:"8fe258f4c29933d2537148ed0c7608ba732072cd"},h("div",{key:"618d0e019da19f5ad6edd70103d1bfba1c27913b",class:"input-label"},"Type:"),h("verdocs-select-input",{key:"bcbad60397ab11e3d63c1554614c9e2812f1dc32",value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:function(t){e.type=t.target.value;e.dirty=true}})),h("div",{key:"db08e5bf71c2a8c8977624c2f8f267ce17469ba5"},h("div",{key:"3a44478c5622304c1c415b0e852e93f510b469b0",class:"input-label"},"Default Contact Info:"),h("div",{key:"5c7a52862f68d91504b5c1ca60b450b500209d0a",class:"first-last"},h("verdocs-text-input",{key:"19d2054350ddc3002bca243012d96e2d18b595de",id:"verdocs-recipient-first",value:this.first_name,autocomplete:"off",placeholder:"First...",onInput:function(t){e.first_name=t.target.value;e.dirty=true}}),h("verdocs-text-input",{key:"546ed8e525780b14415f5d5f3df95a15b26e2e57",id:"verdocs-recipient-first",value:this.last_name,autocomplete:"off",placeholder:"Last...",onInput:function(t){e.last_name=t.target.value;e.dirty=true}}))),h("div",{key:"e6fecf5293af85c76c3df683be5b7d79810c4751"},h("verdocs-text-input",{key:"4bc9c2bc35422059c3ddf087845c627842898331",id:"verdocs-recipient-email",value:this.email,autocomplete:"off",placeholder:"Email Address...",onInput:function(t){e.email=t.target.value;e.dirty=true}}),h("div",{key:"541238e4a6fea49813aff4f7e43025ecdef3e4c3",style:{height:"15px"}}),h("div",{key:"e051610ac20359bd96bffb3a3a04242538f5d84f"},h("verdocs-text-input",{key:"a2c8be99e5fa5567949104be4b99eb6d814222a9",id:"verdocs-recipient-phone",value:this.phone,autocomplete:"off",placeholder:"Phone Number...",onInput:function(t){e.phone=t.target.value;e.dirty=true}}))),h("div",{key:"9883947b67755cd751179d19e375e2333dfa006b",class:"buttons"},h("button",{key:"2eb760aa3a16982ce169954fc8ba27a678b62c39",class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:TrashIcon}),h("div",{key:"465d2e2022084cbf1b94ba1f29210ea6a49a03ec",style:{flex:"1"}}),h("verdocs-button",{key:"a07f1d7ed1c2a7df57159daa66e99a8f6e513b6c",size:"small",label:"Save",disabled:!this.dirty||!o,onClick:function(t){return e.handleSave(t)}}))))};return e}();VerdocsTemplateRoleProperties.style=verdocsTemplateRolePropertiesCss;export{VerdocsMenuPanel as verdocs_menu_panel,VerdocsTemplateRoleProperties as verdocs_template_role_properties};
|
|
2
2
|
//# sourceMappingURL=verdocs-menu-panel_2.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdocs-organization-card.verdocs-portal.entry.js","sources":["src/components/controls/verdocs-organization-card/verdocs-organization-card.scss?tag=verdocs-organization-card","src/components/controls/verdocs-organization-card/verdocs-organization-card.tsx","src/components/controls/verdocs-portal/verdocs-portal.scss?tag=verdocs-portal","src/components/controls/verdocs-portal/verdocs-portal.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-organization-card {\n font-family: $primary-font;\n display: flex;\n flex-direction: row;\n align-items: center;\n border: 1px solid $light-border-color;\n background: #ffffff;\n border-radius: 8px;\n padding: 7px 15px;\n\n .icon {\n flex: 0;\n height: 24px;\n width: 24px;\n margin: 0 14px 0 0;\n\n svg {\n fill: $icon-color;\n height: 24px;\n width: 24px;\n }\n }\n\n .content {\n margin-top: 2px;\n }\n}\n\n.verdocs-org-card-popup {\n font-family: $primary-font;\n background: #ffffff;\n border-radius: 10px;\n width: 326px;\n padding: 20px 40px 0 40px;\n flex-direction: column;\n flex-wrap: nowrap;\n border: 1px solid $light-border-color;\n\n .popup-header-with-logo {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: column;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n\n img {\n max-width: 300px;\n max-height: 50px;\n }\n }\n\n .popup-header {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: row;\n align-items: flex-end;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n }\n\n .popup-body {\n display: flex;\n flex-direction: column;\n font-size: 14px;\n text-transform: uppercase;\n }\n\n .status {\n transform: scale(1.5);\n width: 24px;\n height: 24px;\n }\n\n .field {\n margin: 0 0 20px 0;\n\n strong {\n color: $label-color-very-light;\n display: block;\n margin: 0 0 5px 0;\n }\n\n a {\n color: $verdocs-purple;\n text-transform: uppercase;\n }\n }\n}\n","import {format} from 'date-fns';\nimport {Component, Prop, h, Host, Listen, State} from '@stencil/core';\nimport type {IOrganization} from '@verdocs/js-sdk';\n\n// TODO: See what was done in Storybook. Move all SVG icons to a common file that both projects can share\n// and reduce duplication between components for re-used icons. Also bring icons into Figma for reuse there.\n\nconst BusinessIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\" aria-hidden=\"true\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\"><path d=\"M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z\"></path></svg>';\n\n/**\n * Display a small summary card describing an organization.\n *\n * ```ts\n * <verdocs-organization-card organization={organization} />\n * ```\n */\n@Component({\n tag: 'verdocs-organization-card',\n styleUrl: 'verdocs-organization-card.scss',\n})\nexport class VerdocsOrganizationCard {\n /**\n * The organization to display\n */\n @Prop() organization: IOrganization;\n\n @State()\n hovered: boolean = false;\n\n @Listen('mouseover')\n onMouseOver() {\n this.hovered = true;\n }\n\n @Listen('mouseout')\n onMouseOut() {\n this.hovered = false;\n }\n\n render() {\n console.log('Rendering org card', this.organization.thumbnail_url, this.organization);\n const fallbackIcon = BusinessIcon;\n const portalId = `verdocs-org-card-${this.organization.id}`;\n\n return (\n <Host id={portalId}>\n {this.organization.thumbnail_url ? <img class=\"icon\" src={this.organization.thumbnail_url} alt=\"Logo\" /> : <span class=\"icon\" innerHTML={fallbackIcon} />}\n\n <span class=\"content\">{this.organization?.name}</span>\n\n <verdocs-portal anchor={portalId}>\n <div class=\"verdocs-org-card-popup\" style={{display: this.hovered ? 'block' : 'none'}}>\n {this.organization.full_logo_url ? (\n <div class=\"popup-header-with-logo\">\n <img src={this.organization.full_logo_url} alt=\"Logo\" />\n <div class=\"title\">{this.organization?.name}</div>\n </div>\n ) : (\n <div class=\"popup-header\">\n <span class=\"status\">\n <span class=\"icon\" innerHTML={fallbackIcon} />\n </span>\n <span class=\"title\">{this.organization?.name}</span>\n </div>\n )}\n\n <div class=\"popup-body\">\n <div class=\"field\">\n <strong>Joined</strong>\n {format(new Date(this.organization?.created_at || undefined), 'LLL d, Y')}\n </div>\n {this.organization.url && (\n <div class=\"field\">\n <strong>Website</strong>\n <a href={this.organization?.url} target=\"_blank\" rel=\"nofollow\">\n {this.organization?.url}\n </a>\n </div>\n )}\n </div>\n </div>\n </verdocs-portal>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-portal {\n}\n","import {Component, EventEmitter, h, Host, Listen, Prop, Event} from '@stencil/core';\n\nconst Z_INDEX = '10001';\n\n/**\n * Display a child component in a \"portal\", popping it out of the main DOM tree\n * to allow it to escape the bounds set by its parent.\n * @credit https://github.com/tomas-teston/stencil-portal for the basic\n * technique. This has been altered in a few ways to make it more friendly\n * to cases where there may be multiple portals on the page and provide more\n * alignment options for the child to be displayed.\n *\n * ```ts\n * <div style=\"padding: 40px\">\n * <div id=\"sample-tooltip\" style=\"border: 1px solid green; padding: 3px 10px;\">\n * Tooltip Anchor\n * <verdocs-portal anchor=\"sample-tooltip\" .align=${align} .voffset=${voffset}>\n * <div style=\"border: 1px solid red; padding: 3px 10px;\">Tooltip</div>\n * </verdocs-portal>\n * </div>\n * </div>\n * ```\n */\n@Component({\n tag: 'verdocs-portal',\n styleUrl: 'verdocs-portal.scss',\n shadow: false,\n})\nexport class VerdocsPortal {\n private portal: HTMLElement;\n private element: HTMLElement;\n private moved: boolean = false;\n\n /**\n * Unique ID of the parent element to anchor to.\n */\n @Prop() anchor: string;\n\n /**\n * Vertical offset from the parent.\n */\n @Prop() voffset: number = 0;\n\n @Event() clickAway: EventEmitter<void>;\n\n @Listen('scroll', {target: 'window', capture: true})\n handleScroll() {\n this.calculatePosition();\n }\n\n @Listen('resize', {target: 'window'})\n handleResize() {\n this.calculatePosition();\n }\n\n @Listen('click', {target: 'document'})\n handleClick(e) {\n const closest = e.target.closest('.verdocs-portal');\n if (!this.element.contains(e.target) && !closest) {\n this.clickAway?.emit();\n }\n\n // Temporary hack to dismiss portals-in-portals, which right now is pretty much just\n // multiselect.\n document.querySelectorAll('.verdocs-multiselect-dropdown').forEach(el => el.remove());\n }\n\n private calculateLeft() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const rightOfViewportWithScroll = document.documentElement.clientWidth + document.documentElement.scrollLeft;\n const leftOfPopup = Math.max(anchorRect.left, 0);\n // Old centering logic, disabled temporarily\n // Math.max(anchorRect.left - this.portal.offsetWidth / 2 + anchorRect.width / 2, 0);\n // Old right-align logic, disabled temporarily\n // Math.max(anchorRect.left + anchorRect.width - this.portal.offsetWidth, 0);\n const popupWidth = this.element?.offsetWidth || 400;\n const offRightEdge = leftOfPopup + popupWidth > rightOfViewportWithScroll;\n\n return offRightEdge ? rightOfViewportWithScroll - popupWidth - 20 : leftOfPopup;\n }\n\n private calculateTop() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const bottomOfViewportWithScroll = document.documentElement.clientHeight + document.documentElement.scrollTop;\n const topOfPopup = anchorRect.bottom + this.voffset + document.documentElement.scrollTop;\n const popupHeight = this.element?.offsetHeight || 300;\n const offBottomEdge = topOfPopup + popupHeight > bottomOfViewportWithScroll;\n\n return offBottomEdge ? topOfPopup - popupHeight - anchorRect.height : topOfPopup;\n }\n\n private calculatePosition() {\n this.portal.style.top = `${this.calculateTop()}px`;\n this.portal.style.left = `${this.calculateLeft()}px`;\n }\n\n componentWillLoad() {\n const id = `${this.anchor}-portal`;\n document.getElementById(id)?.remove();\n\n this.portal = document.createElement('div');\n this.portal.setAttribute('id', id);\n this.portal.style.zIndex = Z_INDEX;\n this.portal.style.position = 'absolute';\n this.portal.className = 'verdocs-portal-wrapper';\n document.body.append(this.portal);\n }\n\n componentDidLoad() {\n this.portal.appendChild(this.element);\n this.calculatePosition();\n }\n\n disconnectedCallback() {\n this.moved ? this.portal.remove() : (this.moved = true);\n }\n\n render() {\n return (\n <Host ref={el => (this.element = el)} class=\"verdocs-portal\">\n <slot />\n </Host>\n );\n }\n}\n"],"names":["format"],"mappings":";;;AAAA,MAAM,0BAA0B,GAAG,ghEAAghE;;ACInjE;AACA;AAEA,MAAM,YAAY,GAChB,gWAAgW;MAarV,uBAAuB,GAAA,MAAA;AAJpC,IAAA,WAAA,CAAA,OAAA,EAAA;;AAWE,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AA0DzB;IAvDC,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;;IAIrB,UAAU,GAAA;AACR,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;;IAGtB,MAAM,GAAA;;AACJ,QAAA,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC;QACrF,MAAM,YAAY,GAAG,YAAY;QACjC,MAAM,QAAQ,GAAG,CAAoB,iBAAA,EAAA,IAAI,CAAC,YAAY,CAAC,EAAE,CAAA,CAAE;QAE3D,QACE,CAAC,CAAA,IAAI,EAAC,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAE,EAAE,QAAQ,EAAA,EACf,IAAI,CAAC,YAAY,CAAC,aAAa,GAAG,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,MAAM,E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A,EAAG,IAAI,CAAC,MAAM,SAAS;AAClC,QAAA,CAAA,EAAA,GAAA,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,MAAM,EAAE;QAErC,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC;QAClC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO;QAClC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU;AACvC,QAAA,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,wBAAwB;QAChD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;;IAGnC,gBAAgB,GAAA;QACd,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC;QACrC,IAAI,CAAC,iBAAiB,EAAE;;IAG1B,oBAAoB,GAAA;QAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;;IAGzD,MAAM,GAAA;AACJ,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,EAAE,KAAK,EAAC,gBAAgB,EAAA,EAC1D,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACH;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"verdocs-organization-card.verdocs-portal.entry.js","sources":["src/components/controls/verdocs-organization-card/verdocs-organization-card.scss?tag=verdocs-organization-card","src/components/controls/verdocs-organization-card/verdocs-organization-card.tsx","src/components/controls/verdocs-portal/verdocs-portal.scss?tag=verdocs-portal","src/components/controls/verdocs-portal/verdocs-portal.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-organization-card {\n font-family: $primary-font;\n display: flex;\n flex-direction: row;\n align-items: center;\n border: 1px solid $light-border-color;\n background: #ffffff;\n border-radius: 8px;\n padding: 7px 15px;\n\n .icon {\n flex: 0;\n height: 24px;\n width: 24px;\n margin: 0 14px 0 0;\n\n svg {\n fill: $icon-color;\n height: 24px;\n width: 24px;\n }\n }\n\n .content {\n margin-top: 2px;\n }\n}\n\n.verdocs-org-card-popup {\n font-family: $primary-font;\n background: #ffffff;\n border-radius: 10px;\n width: 326px;\n padding: 20px 40px 0 40px;\n flex-direction: column;\n flex-wrap: nowrap;\n border: 1px solid $light-border-color;\n\n .popup-header-with-logo {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: column;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n\n img {\n max-width: 300px;\n max-height: 50px;\n }\n }\n\n .popup-header {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: row;\n align-items: flex-end;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n }\n\n .popup-body {\n display: flex;\n flex-direction: column;\n font-size: 14px;\n text-transform: uppercase;\n }\n\n .status {\n transform: scale(1.5);\n width: 24px;\n height: 24px;\n }\n\n .field {\n margin: 0 0 20px 0;\n\n strong {\n color: $label-color-very-light;\n display: block;\n margin: 0 0 5px 0;\n }\n\n a {\n color: $verdocs-purple;\n text-transform: uppercase;\n }\n }\n}\n","import {format} from 'date-fns';\nimport {Component, Prop, h, Host, Listen, State} from '@stencil/core';\nimport type {IOrganization} from '@verdocs/js-sdk';\n\n// TODO: See what was done in Storybook. Move all SVG icons to a common file that both projects can share\n// and reduce duplication between components for re-used icons. Also bring icons into Figma for reuse there.\n\nconst BusinessIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\" aria-hidden=\"true\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\"><path d=\"M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z\"></path></svg>';\n\n/**\n * Display a small summary card describing an organization.\n *\n * ```ts\n * <verdocs-organization-card organization={organization} />\n * ```\n */\n@Component({\n tag: 'verdocs-organization-card',\n styleUrl: 'verdocs-organization-card.scss',\n})\nexport class VerdocsOrganizationCard {\n /**\n * The organization to display\n */\n @Prop() organization: Partial<IOrganization>;\n\n @State()\n hovered: boolean = false;\n\n @Listen('mouseover')\n onMouseOver() {\n this.hovered = true;\n }\n\n @Listen('mouseout')\n onMouseOut() {\n this.hovered = false;\n }\n\n render() {\n console.log('Rendering org card', this.organization.thumbnail_url, this.organization);\n const fallbackIcon = BusinessIcon;\n const portalId = `verdocs-org-card-${this.organization.id}`;\n\n return (\n <Host id={portalId}>\n {this.organization.thumbnail_url ? <img class=\"icon\" src={this.organization.thumbnail_url} alt=\"Logo\" /> : <span class=\"icon\" innerHTML={fallbackIcon} />}\n\n <span class=\"content\">{this.organization?.name}</span>\n\n <verdocs-portal anchor={portalId}>\n <div class=\"verdocs-org-card-popup\" style={{display: this.hovered ? 'block' : 'none'}}>\n {this.organization.full_logo_url ? (\n <div class=\"popup-header-with-logo\">\n <img src={this.organization.full_logo_url} alt=\"Logo\" />\n <div class=\"title\">{this.organization?.name}</div>\n </div>\n ) : (\n <div class=\"popup-header\">\n <span class=\"status\">\n <span class=\"icon\" innerHTML={fallbackIcon} />\n </span>\n <span class=\"title\">{this.organization?.name}</span>\n </div>\n )}\n\n <div class=\"popup-body\">\n <div class=\"field\">\n <strong>Joined</strong>\n {format(new Date(this.organization?.created_at || undefined), 'LLL d, Y')}\n </div>\n {this.organization.url && (\n <div class=\"field\">\n <strong>Website</strong>\n <a href={this.organization?.url} target=\"_blank\" rel=\"nofollow\">\n {this.organization?.url}\n </a>\n </div>\n )}\n </div>\n </div>\n </verdocs-portal>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-portal {\n}\n","import {Component, EventEmitter, h, Host, Listen, Prop, Event} from '@stencil/core';\n\nconst Z_INDEX = '10001';\n\n/**\n * Display a child component in a \"portal\", popping it out of the main DOM tree\n * to allow it to escape the bounds set by its parent.\n * @credit https://github.com/tomas-teston/stencil-portal for the basic\n * technique. This has been altered in a few ways to make it more friendly\n * to cases where there may be multiple portals on the page and provide more\n * alignment options for the child to be displayed.\n *\n * ```ts\n * <div style=\"padding: 40px\">\n * <div id=\"sample-tooltip\" style=\"border: 1px solid green; padding: 3px 10px;\">\n * Tooltip Anchor\n * <verdocs-portal anchor=\"sample-tooltip\" .align=${align} .voffset=${voffset}>\n * <div style=\"border: 1px solid red; padding: 3px 10px;\">Tooltip</div>\n * </verdocs-portal>\n * </div>\n * </div>\n * ```\n */\n@Component({\n tag: 'verdocs-portal',\n styleUrl: 'verdocs-portal.scss',\n shadow: false,\n})\nexport class VerdocsPortal {\n private portal: HTMLElement;\n private element: HTMLElement;\n private moved: boolean = false;\n\n /**\n * Unique ID of the parent element to anchor to.\n */\n @Prop() anchor: string;\n\n /**\n * Vertical offset from the parent.\n */\n @Prop() voffset: number = 0;\n\n @Event() clickAway: EventEmitter<void>;\n\n @Listen('scroll', {target: 'window', capture: true})\n handleScroll() {\n this.calculatePosition();\n }\n\n @Listen('resize', {target: 'window'})\n handleResize() {\n this.calculatePosition();\n }\n\n @Listen('click', {target: 'document'})\n handleClick(e) {\n const closest = e.target.closest('.verdocs-portal');\n if (!this.element.contains(e.target) && !closest) {\n this.clickAway?.emit();\n }\n\n // Temporary hack to dismiss portals-in-portals, which right now is pretty much just\n // multiselect.\n document.querySelectorAll('.verdocs-multiselect-dropdown').forEach(el => el.remove());\n }\n\n private calculateLeft() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const rightOfViewportWithScroll = document.documentElement.clientWidth + document.documentElement.scrollLeft;\n const leftOfPopup = Math.max(anchorRect.left, 0);\n // Old centering logic, disabled temporarily\n // Math.max(anchorRect.left - this.portal.offsetWidth / 2 + anchorRect.width / 2, 0);\n // Old right-align logic, disabled temporarily\n // Math.max(anchorRect.left + anchorRect.width - this.portal.offsetWidth, 0);\n const popupWidth = this.element?.offsetWidth || 400;\n const offRightEdge = leftOfPopup + popupWidth > rightOfViewportWithScroll;\n\n return offRightEdge ? rightOfViewportWithScroll - popupWidth - 20 : leftOfPopup;\n }\n\n private calculateTop() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const bottomOfViewportWithScroll = document.documentElement.clientHeight + document.documentElement.scrollTop;\n const topOfPopup = anchorRect.bottom + this.voffset + document.documentElement.scrollTop;\n const popupHeight = this.element?.offsetHeight || 300;\n const offBottomEdge = topOfPopup + popupHeight > bottomOfViewportWithScroll;\n\n return offBottomEdge ? topOfPopup - popupHeight - anchorRect.height : topOfPopup;\n }\n\n private calculatePosition() {\n this.portal.style.top = `${this.calculateTop()}px`;\n this.portal.style.left = `${this.calculateLeft()}px`;\n }\n\n componentWillLoad() {\n const id = `${this.anchor}-portal`;\n document.getElementById(id)?.remove();\n\n this.portal = document.createElement('div');\n this.portal.setAttribute('id', id);\n this.portal.style.zIndex = Z_INDEX;\n this.portal.style.position = 'absolute';\n this.portal.className = 'verdocs-portal-wrapper';\n document.body.append(this.portal);\n }\n\n componentDidLoad() {\n this.portal.appendChild(this.element);\n this.calculatePosition();\n }\n\n disconnectedCallback() {\n this.moved ? this.portal.remove() : (this.moved = true);\n }\n\n render() {\n return (\n <Host ref={el => (this.element = el)} class=\"verdocs-portal\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AU;AACvC,QAAA,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,wBAAwB;QAChD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;;IAGnC,gBAAgB,GAAA;QACd,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC;QACrC,IAAI,CAAC,iBAAiB,EAAE;;IAG1B,oBAAoB,GAAA;QAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;;IAGzD,MAAM,GAAA;AACJ,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,EAAE,KAAK,EAAC,gBAAgB,EAAA,EAC1D,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACH;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host,c as createEvent}from"./index-6vpKbd31.js";import{d as dateFnsExports}from"./index-dzBXqXlK.js";var verdocsOrganizationCardCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-organization-card{font-family:"Inter", "Barlow", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#ffffff;border-radius:8px;padding:7px 15px}verdocs-organization-card .icon{-ms-flex:0;flex:0;height:24px;width:24px;margin:0 14px 0 0}verdocs-organization-card .icon svg{fill:#aeb4bf;height:24px;width:24px}verdocs-organization-card .content{margin-top:2px}.verdocs-org-card-popup{font-family:"Inter", "Barlow", sans-serif;background:#ffffff;border-radius:10px;width:326px;padding:20px 40px 0 40px;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border:1px solid #cccccc}.verdocs-org-card-popup .popup-header-with-logo{display:-ms-flexbox;display:flex;-ms-flex:0;flex:0;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:0 0 20px 0;font-size:21px;line-height:16px;color:#4c56cb}.verdocs-org-card-popup .popup-header-with-logo img{max-width:300px;max-height:50px}.verdocs-org-card-popup .popup-header{display:-ms-flexbox;display:flex;-ms-flex:0;flex:0;gap:20px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end;margin:0 0 20px 0;font-size:21px;line-height:16px;color:#4c56cb}.verdocs-org-card-popup .popup-body{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:14px;text-transform:uppercase}.verdocs-org-card-popup .status{-webkit-transform:scale(1.5);transform:scale(1.5);width:24px;height:24px}.verdocs-org-card-popup .field{margin:0 0 20px 0}.verdocs-org-card-popup .field strong{color:#7b7b9a;display:block;margin:0 0 5px 0}.verdocs-org-card-popup .field a{color:#654dcb;text-transform:uppercase}';var BusinessIcon='<svg xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true" height="24px" viewBox="0 0 24 24" width="24px"><path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"></path></svg>';var VerdocsOrganizationCard=function(){function o(o){registerInstance(this,o);this.hovered=false}o.prototype.onMouseOver=function(){this.hovered=true};o.prototype.onMouseOut=function(){this.hovered=false};o.prototype.render=function(){var o,r,e,a,i,s;console.log("Rendering org card",this.organization.thumbnail_url,this.organization);var c=BusinessIcon;var d="verdocs-org-card-".concat(this.organization.id);return h(Host,{key:"
|
|
1
|
+
import{r as registerInstance,h,H as Host,c as createEvent}from"./index-6vpKbd31.js";import{d as dateFnsExports}from"./index-dzBXqXlK.js";var verdocsOrganizationCardCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-organization-card{font-family:"Inter", "Barlow", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#ffffff;border-radius:8px;padding:7px 15px}verdocs-organization-card .icon{-ms-flex:0;flex:0;height:24px;width:24px;margin:0 14px 0 0}verdocs-organization-card .icon svg{fill:#aeb4bf;height:24px;width:24px}verdocs-organization-card .content{margin-top:2px}.verdocs-org-card-popup{font-family:"Inter", "Barlow", sans-serif;background:#ffffff;border-radius:10px;width:326px;padding:20px 40px 0 40px;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border:1px solid #cccccc}.verdocs-org-card-popup .popup-header-with-logo{display:-ms-flexbox;display:flex;-ms-flex:0;flex:0;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:0 0 20px 0;font-size:21px;line-height:16px;color:#4c56cb}.verdocs-org-card-popup .popup-header-with-logo img{max-width:300px;max-height:50px}.verdocs-org-card-popup .popup-header{display:-ms-flexbox;display:flex;-ms-flex:0;flex:0;gap:20px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end;margin:0 0 20px 0;font-size:21px;line-height:16px;color:#4c56cb}.verdocs-org-card-popup .popup-body{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:14px;text-transform:uppercase}.verdocs-org-card-popup .status{-webkit-transform:scale(1.5);transform:scale(1.5);width:24px;height:24px}.verdocs-org-card-popup .field{margin:0 0 20px 0}.verdocs-org-card-popup .field strong{color:#7b7b9a;display:block;margin:0 0 5px 0}.verdocs-org-card-popup .field a{color:#654dcb;text-transform:uppercase}';var BusinessIcon='<svg xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true" height="24px" viewBox="0 0 24 24" width="24px"><path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"></path></svg>';var VerdocsOrganizationCard=function(){function o(o){registerInstance(this,o);this.hovered=false}o.prototype.onMouseOver=function(){this.hovered=true};o.prototype.onMouseOut=function(){this.hovered=false};o.prototype.render=function(){var o,r,e,a,i,s;console.log("Rendering org card",this.organization.thumbnail_url,this.organization);var c=BusinessIcon;var d="verdocs-org-card-".concat(this.organization.id);return h(Host,{key:"f714963eac994c9af17b768ceb22c66f90319bd6",id:d},this.organization.thumbnail_url?h("img",{class:"icon",src:this.organization.thumbnail_url,alt:"Logo"}):h("span",{class:"icon",innerHTML:c}),h("span",{key:"641f1eb3669bce8066eb52974b490bf2f33480d3",class:"content"},(o=this.organization)===null||o===void 0?void 0:o.name),h("verdocs-portal",{key:"57d1f15ad28798b414d6c7b0b9187d489501aae9",anchor:d},h("div",{key:"3324ae37c0d8b818d5dab21b11693306d1dce6b3",class:"verdocs-org-card-popup",style:{display:this.hovered?"block":"none"}},this.organization.full_logo_url?h("div",{class:"popup-header-with-logo"},h("img",{src:this.organization.full_logo_url,alt:"Logo"}),h("div",{class:"title"},(r=this.organization)===null||r===void 0?void 0:r.name)):h("div",{class:"popup-header"},h("span",{class:"status"},h("span",{class:"icon",innerHTML:c})),h("span",{class:"title"},(e=this.organization)===null||e===void 0?void 0:e.name)),h("div",{key:"9fe15a204516ddfcc7f35cb7ee33bbb80b163260",class:"popup-body"},h("div",{key:"a7b6c6041e09759545403613b5388ba90f789acc",class:"field"},h("strong",{key:"e558409769026901dfc17a67f2d7d59582cd960e"},"Joined"),dateFnsExports.format(new Date(((a=this.organization)===null||a===void 0?void 0:a.created_at)||undefined),"LLL d, Y")),this.organization.url&&h("div",{key:"94e6ce975794db4f3c5201af902a93fe886c416e",class:"field"},h("strong",{key:"3ec6bd5272f762065ab6c0b95301b77539e514ff"},"Website"),h("a",{key:"44be7da94d554d4c75575e23d56143c2346637b9",href:(i=this.organization)===null||i===void 0?void 0:i.url,target:"_blank",rel:"nofollow"},(s=this.organization)===null||s===void 0?void 0:s.url))))))};return o}();VerdocsOrganizationCard.style=verdocsOrganizationCardCss;var verdocsPortalCss="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}";var Z_INDEX="10001";var VerdocsPortal=function(){function o(o){registerInstance(this,o);this.clickAway=createEvent(this,"clickAway");this.moved=false;this.voffset=0}o.prototype.handleScroll=function(){this.calculatePosition()};o.prototype.handleResize=function(){this.calculatePosition()};o.prototype.handleClick=function(o){var r;var e=o.target.closest(".verdocs-portal");if(!this.element.contains(o.target)&&!e){(r=this.clickAway)===null||r===void 0?void 0:r.emit()}document.querySelectorAll(".verdocs-multiselect-dropdown").forEach((function(o){return o.remove()}))};o.prototype.calculateLeft=function(){var o;var r=document.getElementById(this.anchor);if(!r)return 0;var e=r.getBoundingClientRect();var a=document.documentElement.clientWidth+document.documentElement.scrollLeft;var i=Math.max(e.left,0);var s=((o=this.element)===null||o===void 0?void 0:o.offsetWidth)||400;var c=i+s>a;return c?a-s-20:i};o.prototype.calculateTop=function(){var o;var r=document.getElementById(this.anchor);if(!r)return 0;var e=r.getBoundingClientRect();var a=document.documentElement.clientHeight+document.documentElement.scrollTop;var i=e.bottom+this.voffset+document.documentElement.scrollTop;var s=((o=this.element)===null||o===void 0?void 0:o.offsetHeight)||300;var c=i+s>a;return c?i-s-e.height:i};o.prototype.calculatePosition=function(){this.portal.style.top="".concat(this.calculateTop(),"px");this.portal.style.left="".concat(this.calculateLeft(),"px")};o.prototype.componentWillLoad=function(){var o;var r="".concat(this.anchor,"-portal");(o=document.getElementById(r))===null||o===void 0?void 0:o.remove();this.portal=document.createElement("div");this.portal.setAttribute("id",r);this.portal.style.zIndex=Z_INDEX;this.portal.style.position="absolute";this.portal.className="verdocs-portal-wrapper";document.body.append(this.portal)};o.prototype.componentDidLoad=function(){this.portal.appendChild(this.element);this.calculatePosition()};o.prototype.disconnectedCallback=function(){this.moved?this.portal.remove():this.moved=true};o.prototype.render=function(){var o=this;return h(Host,{key:"eeb176eb22239e9bd1859d87e50d9dba08a36c5a",ref:function(r){return o.element=r},class:"verdocs-portal"},h("slot",{key:"0cc38913adf3b2d41e9d635a7c6bafac3e71fd8f"}))};return o}();VerdocsPortal.style=verdocsPortalCss;export{VerdocsOrganizationCard as verdocs_organization_card,VerdocsPortal as verdocs_portal};
|
|
2
2
|
//# sourceMappingURL=verdocs-organization-card_2.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["verdocsOrganizationCardCss","BusinessIcon","VerdocsOrganizationCard","hostRef","this","hovered","prototype","onMouseOver","onMouseOut","render","console","log","organization","thumbnail_url","fallbackIcon","portalId","concat","id","h","Host","key","class","src","alt","innerHTML","_a","name","anchor","style","display","full_logo_url","_b","_c","format","Date","_d","created_at","undefined","url","href","_e","target","rel","_f","verdocsPortalCss","Z_INDEX","VerdocsPortal","moved","voffset","handleScroll","calculatePosition","handleResize","handleClick","e","closest","element","contains","clickAway","emit","document","querySelectorAll","forEach","el","remove","calculateLeft","anchorEl","getElementById","anchorRect","getBoundingClientRect","rightOfViewportWithScroll","documentElement","clientWidth","scrollLeft","leftOfPopup","Math","max","left","popupWidth","offsetWidth","offRightEdge","calculateTop","bottomOfViewportWithScroll","clientHeight","scrollTop","topOfPopup","bottom","popupHeight","offsetHeight","offBottomEdge","height","portal","top","componentWillLoad","createElement","setAttribute","zIndex","position","className","body","append","componentDidLoad","appendChild","disconnectedCallback","_this","ref"],"sources":["src/components/controls/verdocs-organization-card/verdocs-organization-card.scss?tag=verdocs-organization-card","src/components/controls/verdocs-organization-card/verdocs-organization-card.tsx","src/components/controls/verdocs-portal/verdocs-portal.scss?tag=verdocs-portal","src/components/controls/verdocs-portal/verdocs-portal.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-organization-card {\n font-family: $primary-font;\n display: flex;\n flex-direction: row;\n align-items: center;\n border: 1px solid $light-border-color;\n background: #ffffff;\n border-radius: 8px;\n padding: 7px 15px;\n\n .icon {\n flex: 0;\n height: 24px;\n width: 24px;\n margin: 0 14px 0 0;\n\n svg {\n fill: $icon-color;\n height: 24px;\n width: 24px;\n }\n }\n\n .content {\n margin-top: 2px;\n }\n}\n\n.verdocs-org-card-popup {\n font-family: $primary-font;\n background: #ffffff;\n border-radius: 10px;\n width: 326px;\n padding: 20px 40px 0 40px;\n flex-direction: column;\n flex-wrap: nowrap;\n border: 1px solid $light-border-color;\n\n .popup-header-with-logo {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: column;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n\n img {\n max-width: 300px;\n max-height: 50px;\n }\n }\n\n .popup-header {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: row;\n align-items: flex-end;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n }\n\n .popup-body {\n display: flex;\n flex-direction: column;\n font-size: 14px;\n text-transform: uppercase;\n }\n\n .status {\n transform: scale(1.5);\n width: 24px;\n height: 24px;\n }\n\n .field {\n margin: 0 0 20px 0;\n\n strong {\n color: $label-color-very-light;\n display: block;\n margin: 0 0 5px 0;\n }\n\n a {\n color: $verdocs-purple;\n text-transform: uppercase;\n }\n }\n}\n","import {format} from 'date-fns';\nimport {Component, Prop, h, Host, Listen, State} from '@stencil/core';\nimport type {IOrganization} from '@verdocs/js-sdk';\n\n// TODO: See what was done in Storybook. Move all SVG icons to a common file that both projects can share\n// and reduce duplication between components for re-used icons. Also bring icons into Figma for reuse there.\n\nconst BusinessIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\" aria-hidden=\"true\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\"><path d=\"M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z\"></path></svg>';\n\n/**\n * Display a small summary card describing an organization.\n *\n * ```ts\n * <verdocs-organization-card organization={organization} />\n * ```\n */\n@Component({\n tag: 'verdocs-organization-card',\n styleUrl: 'verdocs-organization-card.scss',\n})\nexport class VerdocsOrganizationCard {\n /**\n * The organization to display\n */\n @Prop() organization: IOrganization;\n\n @State()\n hovered: boolean = false;\n\n @Listen('mouseover')\n onMouseOver() {\n this.hovered = true;\n }\n\n @Listen('mouseout')\n onMouseOut() {\n this.hovered = false;\n }\n\n render() {\n console.log('Rendering org card', this.organization.thumbnail_url, this.organization);\n const fallbackIcon = BusinessIcon;\n const portalId = `verdocs-org-card-${this.organization.id}`;\n\n return (\n <Host id={portalId}>\n {this.organization.thumbnail_url ? <img class=\"icon\" src={this.organization.thumbnail_url} alt=\"Logo\" /> : <span class=\"icon\" innerHTML={fallbackIcon} />}\n\n <span class=\"content\">{this.organization?.name}</span>\n\n <verdocs-portal anchor={portalId}>\n <div class=\"verdocs-org-card-popup\" style={{display: this.hovered ? 'block' : 'none'}}>\n {this.organization.full_logo_url ? (\n <div class=\"popup-header-with-logo\">\n <img src={this.organization.full_logo_url} alt=\"Logo\" />\n <div class=\"title\">{this.organization?.name}</div>\n </div>\n ) : (\n <div class=\"popup-header\">\n <span class=\"status\">\n <span class=\"icon\" innerHTML={fallbackIcon} />\n </span>\n <span class=\"title\">{this.organization?.name}</span>\n </div>\n )}\n\n <div class=\"popup-body\">\n <div class=\"field\">\n <strong>Joined</strong>\n {format(new Date(this.organization?.created_at || undefined), 'LLL d, Y')}\n </div>\n {this.organization.url && (\n <div class=\"field\">\n <strong>Website</strong>\n <a href={this.organization?.url} target=\"_blank\" rel=\"nofollow\">\n {this.organization?.url}\n </a>\n </div>\n )}\n </div>\n </div>\n </verdocs-portal>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-portal {\n}\n","import {Component, EventEmitter, h, Host, Listen, Prop, Event} from '@stencil/core';\n\nconst Z_INDEX = '10001';\n\n/**\n * Display a child component in a \"portal\", popping it out of the main DOM tree\n * to allow it to escape the bounds set by its parent.\n * @credit https://github.com/tomas-teston/stencil-portal for the basic\n * technique. This has been altered in a few ways to make it more friendly\n * to cases where there may be multiple portals on the page and provide more\n * alignment options for the child to be displayed.\n *\n * ```ts\n * <div style=\"padding: 40px\">\n * <div id=\"sample-tooltip\" style=\"border: 1px solid green; padding: 3px 10px;\">\n * Tooltip Anchor\n * <verdocs-portal anchor=\"sample-tooltip\" .align=${align} .voffset=${voffset}>\n * <div style=\"border: 1px solid red; padding: 3px 10px;\">Tooltip</div>\n * </verdocs-portal>\n * </div>\n * </div>\n * ```\n */\n@Component({\n tag: 'verdocs-portal',\n styleUrl: 'verdocs-portal.scss',\n shadow: false,\n})\nexport class VerdocsPortal {\n private portal: HTMLElement;\n private element: HTMLElement;\n private moved: boolean = false;\n\n /**\n * Unique ID of the parent element to anchor to.\n */\n @Prop() anchor: string;\n\n /**\n * Vertical offset from the parent.\n */\n @Prop() voffset: number = 0;\n\n @Event() clickAway: EventEmitter<void>;\n\n @Listen('scroll', {target: 'window', capture: true})\n handleScroll() {\n this.calculatePosition();\n }\n\n @Listen('resize', {target: 'window'})\n handleResize() {\n this.calculatePosition();\n }\n\n @Listen('click', {target: 'document'})\n handleClick(e) {\n const closest = e.target.closest('.verdocs-portal');\n if (!this.element.contains(e.target) && !closest) {\n this.clickAway?.emit();\n }\n\n // Temporary hack to dismiss portals-in-portals, which right now is pretty much just\n // multiselect.\n document.querySelectorAll('.verdocs-multiselect-dropdown').forEach(el => el.remove());\n }\n\n private calculateLeft() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const rightOfViewportWithScroll = document.documentElement.clientWidth + document.documentElement.scrollLeft;\n const leftOfPopup = Math.max(anchorRect.left, 0);\n // Old centering logic, disabled temporarily\n // Math.max(anchorRect.left - this.portal.offsetWidth / 2 + anchorRect.width / 2, 0);\n // Old right-align logic, disabled temporarily\n // Math.max(anchorRect.left + anchorRect.width - this.portal.offsetWidth, 0);\n const popupWidth = this.element?.offsetWidth || 400;\n const offRightEdge = leftOfPopup + popupWidth > rightOfViewportWithScroll;\n\n return offRightEdge ? rightOfViewportWithScroll - popupWidth - 20 : leftOfPopup;\n }\n\n private calculateTop() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const bottomOfViewportWithScroll = document.documentElement.clientHeight + document.documentElement.scrollTop;\n const topOfPopup = anchorRect.bottom + this.voffset + document.documentElement.scrollTop;\n const popupHeight = this.element?.offsetHeight || 300;\n const offBottomEdge = topOfPopup + popupHeight > bottomOfViewportWithScroll;\n\n return offBottomEdge ? topOfPopup - popupHeight - anchorRect.height : topOfPopup;\n }\n\n private calculatePosition() {\n this.portal.style.top = `${this.calculateTop()}px`;\n this.portal.style.left = `${this.calculateLeft()}px`;\n }\n\n componentWillLoad() {\n const id = `${this.anchor}-portal`;\n document.getElementById(id)?.remove();\n\n this.portal = document.createElement('div');\n this.portal.setAttribute('id', id);\n this.portal.style.zIndex = Z_INDEX;\n this.portal.style.position = 'absolute';\n this.portal.className = 'verdocs-portal-wrapper';\n document.body.append(this.portal);\n }\n\n componentDidLoad() {\n this.portal.appendChild(this.element);\n this.calculatePosition();\n }\n\n disconnectedCallback() {\n this.moved ? this.portal.remove() : (this.moved = true);\n }\n\n render() {\n return (\n <Host ref={el => (this.element = el)} class=\"verdocs-portal\">\n <slot />\n </Host>\n );\n }\n}\n"],"mappings":"yIAAA,IAAMA,2BAA6B,ygECOnC,IAAMC,aACJ,iW,IAaWC,wBAAuB,WAJpC,SAAAA,EAAAC,G,yBAWEC,KAAOC,QAAY,KA0DpB,CAvDCH,EAAAI,UAAAC,YAAA,WACEH,KAAKC,QAAU,I,EAIjBH,EAAAI,UAAAE,WAAA,WACEJ,KAAKC,QAAU,K,EAGjBH,EAAAI,UAAAG,OAAA,W,gBACEC,QAAQC,IAAI,qBAAsBP,KAAKQ,aAAaC,cAAeT,KAAKQ,cACxE,IAAME,EAAeb,aACrB,IAAMc,EAAW,oBAAAC,OAAoBZ,KAAKQ,aAAaK,IAEvD,OACEC,EAACC,KAAK,CAAAC,IAAA,2CAAAH,GAAIF,GACPX,KAAKQ,aAAaC,cAAgBK,EAAK,OAAAG,MAAM,OAAOC,IAAKlB,KAAKQ,aAAaC,cAAeU,IAAI,SAAYL,EAAM,QAAAG,MAAM,OAAOG,UAAWV,IAEzII,EAAM,QAAAE,IAAA,2CAAAC,MAAM,YAAWI,EAAArB,KAAKQ,gBAAc,MAAAa,SAAA,SAAAA,EAAAC,MAE1CR,EAAgB,kBAA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9C5E,KAAKsF,OAAO9D,MAAMgD,KAAO,GAAA5D,OAAGZ,KAAK4D,gBAAe,K,EAGlDlB,EAAAxC,UAAAsF,kBAAA,W,MACE,IAAM3E,EAAK,GAAAD,OAAGZ,KAAKuB,OAAM,YACzBF,EAAAkC,SAASO,eAAejD,MAAG,MAAAQ,SAAA,SAAAA,EAAEsC,SAE7B3D,KAAKsF,OAAS/B,SAASkC,cAAc,OACrCzF,KAAKsF,OAAOI,aAAa,KAAM7E,GAC/Bb,KAAKsF,OAAO9D,MAAMmE,OAASlD,QAC3BzC,KAAKsF,OAAO9D,MAAMoE,SAAW,WAC7B5F,KAAKsF,OAAOO,UAAY,yBACxBtC,SAASuC,KAAKC,OAAO/F,KAAKsF,O,EAG5B5C,EAAAxC,UAAA8F,iBAAA,WACEhG,KAAKsF,OAAOW,YAAYjG,KAAKmD,SAC7BnD,KAAK8C,mB,EAGPJ,EAAAxC,UAAAgG,qBAAA,WACElG,KAAK2C,MAAQ3C,KAAKsF,OAAO3B,SAAY3D,KAAK2C,MAAQ,I,EAGpDD,EAAAxC,UAAAG,OAAA,eAAA8F,EAAAnG,KACE,OACEc,EAACC,KAAI,CAAAC,IAAA,2CAACoF,IAAK,SAAA1C,GAAE,OAAKyC,EAAKhD,QAAUO,CAApB,EAAyBzC,MAAM,kBAC1CH,EAAQ,QAAAE,IAAA,6C,WApGU,G","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["verdocsOrganizationCardCss","BusinessIcon","VerdocsOrganizationCard","hostRef","this","hovered","prototype","onMouseOver","onMouseOut","render","console","log","organization","thumbnail_url","fallbackIcon","portalId","concat","id","h","Host","key","class","src","alt","innerHTML","_a","name","anchor","style","display","full_logo_url","_b","_c","format","Date","_d","created_at","undefined","url","href","_e","target","rel","_f","verdocsPortalCss","Z_INDEX","VerdocsPortal","moved","voffset","handleScroll","calculatePosition","handleResize","handleClick","e","closest","element","contains","clickAway","emit","document","querySelectorAll","forEach","el","remove","calculateLeft","anchorEl","getElementById","anchorRect","getBoundingClientRect","rightOfViewportWithScroll","documentElement","clientWidth","scrollLeft","leftOfPopup","Math","max","left","popupWidth","offsetWidth","offRightEdge","calculateTop","bottomOfViewportWithScroll","clientHeight","scrollTop","topOfPopup","bottom","popupHeight","offsetHeight","offBottomEdge","height","portal","top","componentWillLoad","createElement","setAttribute","zIndex","position","className","body","append","componentDidLoad","appendChild","disconnectedCallback","_this","ref"],"sources":["src/components/controls/verdocs-organization-card/verdocs-organization-card.scss?tag=verdocs-organization-card","src/components/controls/verdocs-organization-card/verdocs-organization-card.tsx","src/components/controls/verdocs-portal/verdocs-portal.scss?tag=verdocs-portal","src/components/controls/verdocs-portal/verdocs-portal.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-organization-card {\n font-family: $primary-font;\n display: flex;\n flex-direction: row;\n align-items: center;\n border: 1px solid $light-border-color;\n background: #ffffff;\n border-radius: 8px;\n padding: 7px 15px;\n\n .icon {\n flex: 0;\n height: 24px;\n width: 24px;\n margin: 0 14px 0 0;\n\n svg {\n fill: $icon-color;\n height: 24px;\n width: 24px;\n }\n }\n\n .content {\n margin-top: 2px;\n }\n}\n\n.verdocs-org-card-popup {\n font-family: $primary-font;\n background: #ffffff;\n border-radius: 10px;\n width: 326px;\n padding: 20px 40px 0 40px;\n flex-direction: column;\n flex-wrap: nowrap;\n border: 1px solid $light-border-color;\n\n .popup-header-with-logo {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: column;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n\n img {\n max-width: 300px;\n max-height: 50px;\n }\n }\n\n .popup-header {\n display: flex;\n flex: 0;\n gap: 20px;\n flex-direction: row;\n align-items: flex-end;\n margin: 0 0 20px 0;\n font-size: 21px;\n line-height: 16px;\n color: $secondary-color;\n }\n\n .popup-body {\n display: flex;\n flex-direction: column;\n font-size: 14px;\n text-transform: uppercase;\n }\n\n .status {\n transform: scale(1.5);\n width: 24px;\n height: 24px;\n }\n\n .field {\n margin: 0 0 20px 0;\n\n strong {\n color: $label-color-very-light;\n display: block;\n margin: 0 0 5px 0;\n }\n\n a {\n color: $verdocs-purple;\n text-transform: uppercase;\n }\n }\n}\n","import {format} from 'date-fns';\nimport {Component, Prop, h, Host, Listen, State} from '@stencil/core';\nimport type {IOrganization} from '@verdocs/js-sdk';\n\n// TODO: See what was done in Storybook. Move all SVG icons to a common file that both projects can share\n// and reduce duplication between components for re-used icons. Also bring icons into Figma for reuse there.\n\nconst BusinessIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\" aria-hidden=\"true\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\"><path d=\"M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z\"></path></svg>';\n\n/**\n * Display a small summary card describing an organization.\n *\n * ```ts\n * <verdocs-organization-card organization={organization} />\n * ```\n */\n@Component({\n tag: 'verdocs-organization-card',\n styleUrl: 'verdocs-organization-card.scss',\n})\nexport class VerdocsOrganizationCard {\n /**\n * The organization to display\n */\n @Prop() organization: Partial<IOrganization>;\n\n @State()\n hovered: boolean = false;\n\n @Listen('mouseover')\n onMouseOver() {\n this.hovered = true;\n }\n\n @Listen('mouseout')\n onMouseOut() {\n this.hovered = false;\n }\n\n render() {\n console.log('Rendering org card', this.organization.thumbnail_url, this.organization);\n const fallbackIcon = BusinessIcon;\n const portalId = `verdocs-org-card-${this.organization.id}`;\n\n return (\n <Host id={portalId}>\n {this.organization.thumbnail_url ? <img class=\"icon\" src={this.organization.thumbnail_url} alt=\"Logo\" /> : <span class=\"icon\" innerHTML={fallbackIcon} />}\n\n <span class=\"content\">{this.organization?.name}</span>\n\n <verdocs-portal anchor={portalId}>\n <div class=\"verdocs-org-card-popup\" style={{display: this.hovered ? 'block' : 'none'}}>\n {this.organization.full_logo_url ? (\n <div class=\"popup-header-with-logo\">\n <img src={this.organization.full_logo_url} alt=\"Logo\" />\n <div class=\"title\">{this.organization?.name}</div>\n </div>\n ) : (\n <div class=\"popup-header\">\n <span class=\"status\">\n <span class=\"icon\" innerHTML={fallbackIcon} />\n </span>\n <span class=\"title\">{this.organization?.name}</span>\n </div>\n )}\n\n <div class=\"popup-body\">\n <div class=\"field\">\n <strong>Joined</strong>\n {format(new Date(this.organization?.created_at || undefined), 'LLL d, Y')}\n </div>\n {this.organization.url && (\n <div class=\"field\">\n <strong>Website</strong>\n <a href={this.organization?.url} target=\"_blank\" rel=\"nofollow\">\n {this.organization?.url}\n </a>\n </div>\n )}\n </div>\n </div>\n </verdocs-portal>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-portal {\n}\n","import {Component, EventEmitter, h, Host, Listen, Prop, Event} from '@stencil/core';\n\nconst Z_INDEX = '10001';\n\n/**\n * Display a child component in a \"portal\", popping it out of the main DOM tree\n * to allow it to escape the bounds set by its parent.\n * @credit https://github.com/tomas-teston/stencil-portal for the basic\n * technique. This has been altered in a few ways to make it more friendly\n * to cases where there may be multiple portals on the page and provide more\n * alignment options for the child to be displayed.\n *\n * ```ts\n * <div style=\"padding: 40px\">\n * <div id=\"sample-tooltip\" style=\"border: 1px solid green; padding: 3px 10px;\">\n * Tooltip Anchor\n * <verdocs-portal anchor=\"sample-tooltip\" .align=${align} .voffset=${voffset}>\n * <div style=\"border: 1px solid red; padding: 3px 10px;\">Tooltip</div>\n * </verdocs-portal>\n * </div>\n * </div>\n * ```\n */\n@Component({\n tag: 'verdocs-portal',\n styleUrl: 'verdocs-portal.scss',\n shadow: false,\n})\nexport class VerdocsPortal {\n private portal: HTMLElement;\n private element: HTMLElement;\n private moved: boolean = false;\n\n /**\n * Unique ID of the parent element to anchor to.\n */\n @Prop() anchor: string;\n\n /**\n * Vertical offset from the parent.\n */\n @Prop() voffset: number = 0;\n\n @Event() clickAway: EventEmitter<void>;\n\n @Listen('scroll', {target: 'window', capture: true})\n handleScroll() {\n this.calculatePosition();\n }\n\n @Listen('resize', {target: 'window'})\n handleResize() {\n this.calculatePosition();\n }\n\n @Listen('click', {target: 'document'})\n handleClick(e) {\n const closest = e.target.closest('.verdocs-portal');\n if (!this.element.contains(e.target) && !closest) {\n this.clickAway?.emit();\n }\n\n // Temporary hack to dismiss portals-in-portals, which right now is pretty much just\n // multiselect.\n document.querySelectorAll('.verdocs-multiselect-dropdown').forEach(el => el.remove());\n }\n\n private calculateLeft() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const rightOfViewportWithScroll = document.documentElement.clientWidth + document.documentElement.scrollLeft;\n const leftOfPopup = Math.max(anchorRect.left, 0);\n // Old centering logic, disabled temporarily\n // Math.max(anchorRect.left - this.portal.offsetWidth / 2 + anchorRect.width / 2, 0);\n // Old right-align logic, disabled temporarily\n // Math.max(anchorRect.left + anchorRect.width - this.portal.offsetWidth, 0);\n const popupWidth = this.element?.offsetWidth || 400;\n const offRightEdge = leftOfPopup + popupWidth > rightOfViewportWithScroll;\n\n return offRightEdge ? rightOfViewportWithScroll - popupWidth - 20 : leftOfPopup;\n }\n\n private calculateTop() {\n const anchorEl = document.getElementById(this.anchor);\n if (!anchorEl) return 0;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n\n const bottomOfViewportWithScroll = document.documentElement.clientHeight + document.documentElement.scrollTop;\n const topOfPopup = anchorRect.bottom + this.voffset + document.documentElement.scrollTop;\n const popupHeight = this.element?.offsetHeight || 300;\n const offBottomEdge = topOfPopup + popupHeight > bottomOfViewportWithScroll;\n\n return offBottomEdge ? topOfPopup - popupHeight - anchorRect.height : topOfPopup;\n }\n\n private calculatePosition() {\n this.portal.style.top = `${this.calculateTop()}px`;\n this.portal.style.left = `${this.calculateLeft()}px`;\n }\n\n componentWillLoad() {\n const id = `${this.anchor}-portal`;\n document.getElementById(id)?.remove();\n\n this.portal = document.createElement('div');\n this.portal.setAttribute('id', id);\n this.portal.style.zIndex = Z_INDEX;\n this.portal.style.position = 'absolute';\n this.portal.className = 'verdocs-portal-wrapper';\n document.body.append(this.portal);\n }\n\n componentDidLoad() {\n this.portal.appendChild(this.element);\n this.calculatePosition();\n }\n\n disconnectedCallback() {\n this.moved ? this.portal.remove() : (this.moved = true);\n }\n\n render() {\n return (\n <Host ref={el => (this.element = el)} class=\"verdocs-portal\">\n <slot />\n </Host>\n );\n }\n}\n"],"mappings":"yIAAA,IAAMA,2BAA6B,ygECOnC,IAAMC,aACJ,iW,IAaWC,wBAAuB,WAJpC,SAAAA,EAAAC,G,yBAWEC,KAAOC,QAAY,KA0DpB,CAvDCH,EAAAI,UAAAC,YAAA,WACEH,KAAKC,QAAU,I,EAIjBH,EAAAI,UAAAE,WAAA,WACEJ,KAAKC,QAAU,K,EAGjBH,EAAAI,UAAAG,OAAA,W,gBACEC,QAAQC,IAAI,qBAAsBP,KAAKQ,aAAaC,cAAeT,KAAKQ,cACxE,IAAME,EAAeb,aACrB,IAAMc,EAAW,oBAAAC,OAAoBZ,KAAKQ,aAAaK,IAEvD,OACEC,EAACC,KAAK,CAAAC,IAAA,2CAAAH,GAAIF,GACPX,KAAKQ,aAAaC,cAAgBK,EAAK,OAAAG,MAAM,OAAOC,IAAKlB,KAAKQ,aAAaC,cAAeU,IAAI,SAAYL,EAAM,QAAAG,MAAM,OAAOG,UAAWV,IAEzII,EAAM,QAAAE,IAAA,2CAAAC,MAAM,YAAWI,EAAArB,KAAKQ,gBAAc,MAAAa,SAAA,SAAAA,EAAAC,MAE1CR,EAAgB,kBAAAE,IAAA,2CAAAO,OAAQZ,GACtBG,EAAK,OAAAE,IAAA,2CAAAC,MAAM,yBAAyBO,MAAO,CAACC,QAASzB,KAAKC,QAAU,QAAU,SAC3ED,KAAKQ,aA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OAAGZ,KAAKuB,OAAM,YACzBF,EAAAkC,SAASO,eAAejD,MAAG,MAAAQ,SAAA,SAAAA,EAAEsC,SAE7B3D,KAAKsF,OAAS/B,SAASkC,cAAc,OACrCzF,KAAKsF,OAAOI,aAAa,KAAM7E,GAC/Bb,KAAKsF,OAAO9D,MAAMmE,OAASlD,QAC3BzC,KAAKsF,OAAO9D,MAAMoE,SAAW,WAC7B5F,KAAKsF,OAAOO,UAAY,yBACxBtC,SAASuC,KAAKC,OAAO/F,KAAKsF,O,EAG5B5C,EAAAxC,UAAA8F,iBAAA,WACEhG,KAAKsF,OAAOW,YAAYjG,KAAKmD,SAC7BnD,KAAK8C,mB,EAGPJ,EAAAxC,UAAAgG,qBAAA,WACElG,KAAK2C,MAAQ3C,KAAKsF,OAAO3B,SAAY3D,KAAK2C,MAAQ,I,EAGpDD,EAAAxC,UAAAG,OAAA,eAAA8F,EAAAnG,KACE,OACEc,EAACC,KAAI,CAAAC,IAAA,2CAACoF,IAAK,SAAA1C,GAAE,OAAKyC,EAAKhD,QAAUO,CAApB,EAAyBzC,MAAM,kBAC1CH,EAAQ,QAAAE,IAAA,6C,WApGU,G","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h}from"./index-6vpKbd31.js";import{VerdocsEndpoint}from"@verdocs/js-sdk";var verdocsQuickFunctionsCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}';var DocumentIcon='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>';var TemplateIcon='<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>';var VerdocsQuickFunctions=function(){function e(e){registerInstance(this,e);this.createTemplate=createEvent(this,"createTemplate");this.createDocument=createEvent(this,"createDocument");this.endpoint=VerdocsEndpoint.getDefault()}e.prototype.handleCreateTemplate=function(){this.createTemplate.emit()};e.prototype.handleCreateDocument=function(){this.createDocument.emit()};e.prototype.render=function(){var e=this;return h("div",{key:"
|
|
1
|
+
import{r as registerInstance,c as createEvent,h}from"./index-6vpKbd31.js";import{VerdocsEndpoint}from"@verdocs/js-sdk";var verdocsQuickFunctionsCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}';var DocumentIcon='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>';var TemplateIcon='<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>';var VerdocsQuickFunctions=function(){function e(e){registerInstance(this,e);this.createTemplate=createEvent(this,"createTemplate");this.createDocument=createEvent(this,"createDocument");this.endpoint=VerdocsEndpoint.getDefault()}e.prototype.handleCreateTemplate=function(){this.createTemplate.emit()};e.prototype.handleCreateDocument=function(){this.createDocument.emit()};e.prototype.render=function(){var e=this;return h("div",{key:"7dd9dce6581d753291d7557ee0c103d146161a81",class:"container"},h("p",{key:"3638938038fd78372a485e0fb592ea6e25b71df1",class:"title"},"Quick Create"),h("button",{key:"8777b5b43b3286d71c3f1bced57721815daccfd0",onClick:function(){return e.handleCreateTemplate()},innerHTML:TemplateIcon},"Template"),h("button",{key:"a22a1821be9f54a4e46a0886e3dcada06805cb89",onClick:function(){return e.handleCreateDocument()},innerHTML:DocumentIcon},"Document"))};return e}();VerdocsQuickFunctions.style=verdocsQuickFunctionsCss;export{VerdocsQuickFunctions as verdocs_quick_functions};
|
|
2
2
|
//# sourceMappingURL=verdocs-quick-functions.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as registerInstance,h}from"./index-6vpKbd31.js";var verdocsSearchTabsCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-search-tabs{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:block}';var VerdocsSearchTabs=function(){function r(r){registerInstance(this,r);this.selected="all"}r.prototype.render=function(){return h("div",{key:"
|
|
1
|
+
import{r as registerInstance,h}from"./index-6vpKbd31.js";var verdocsSearchTabsCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-search-tabs{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:block}';var VerdocsSearchTabs=function(){function r(r){registerInstance(this,r);this.selected="all"}r.prototype.render=function(){return h("div",{key:"208d52a84bfa8455fcd867e27138f4686c4c08c8"}," ")};return r}();VerdocsSearchTabs.style=verdocsSearchTabsCss;export{VerdocsSearchTabs as verdocs_search_tabs};
|
|
2
2
|
//# sourceMappingURL=verdocs-search-tabs.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):s(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(i=0)),i)try{if(n=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];s=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,s=t.length,r;n<s;n++){if(r||!(n in t)){if(!r)r=Array.prototype.slice.call(t,0,n);r[n]=t[n]}}return e.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment}from"./index-6vpKbd31.js";import{VerdocsEndpoint,startSigningSession,envelopeRecipientAgree,updateEnvelopeField,createSignature,updateEnvelopeFieldSignature,createInitials,updateEnvelopeFieldInitials,isValidPhone,isValidEmail,sortFields,envelopeRecipientSubmit,uploadEnvelopeFieldAttachment,deleteEnvelopeFieldAttachment,formatFullName,fullNameToInitials,verifySigner,delegateRecipient,envelopeRecipientDecline,integerSequence}from"@verdocs/js-sdk";import{a as saveAttachment,u as updateDocumentFieldValue,g as getFieldId,r as renderDocumentField}from"./utils-DmfOx9Ey.js";import{D as DefaultEndpoint}from"./Environment-C_Xku1v2.js";import{V as VerdocsToast}from"./Toast-CyvDgtoV.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-DmsV595e.js";import"./_commonjsHelpers-BFTU3MAI.js";import"./index-dzBXqXlK.js";import"./Types-Dl7Xw8F0.js";var verdocsSignCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}verdocs-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);margin-top:15px}verdocs-sign .fatal-error .message{max-width:360px;width:50%;font-size:16px;background:white;-webkit-box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235);box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235)}verdocs-sign .fatal-error .header{color:white;font-size:18px;font-weight:500;padding:5px 10px;margin:0 0 10px 0;background:#4c56cb}verdocs-sign .fatal-error p{margin:1rem;font-size:14px;font-weight:400;padding:0 10px}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}';var DEFAULT_DISCLOSURES='\n<ul>\n <li>\n Agree to use electronic records and signatures, and confirm you have read the\n <a href="https://verdocs.com/en/electronic-record-signature-disclosure/" target="_blank">\n Electronic Record and Signatures Disclosure</a>.</li>\n <li>\n Agree to Verdocs\'\n <a href="https://verdocs.com/en/eula" target="_blank">\n End User License Agreement</a>\n and confirm you have read Verdocs\'\n <a href="https://verdocs.com/en/privacy-policy/" target="_blank">\n Privacy Policy</a>.\n </li>\n</ul>';var VerdocsSign=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError");this.envelopeLoaded=createEvent(this,"envelopeLoaded");this.envelopeUpdated=createEvent(this,"envelopeUpdated");this.endpoint=DefaultEndpoint;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosures=DEFAULT_DISCLOSURES;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.kbaQuestions=null;this.showSpinner=false;this.declining=false;this.delegating=false;this.delegated=false;this.kbaChoices=[];this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){if(!this.endpoint){console.log("[SIGN] Creating signing endpoint");this.endpoint=new VerdocsEndpoint({sessionType:"signing"})}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s,r,o,a;return __generator(this,(function(l){switch(l.label){case 0:if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new SDKError("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new SDKError("[SIGN] Missing required inviteCode",500,""));return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,startSigningSession(this.endpoint,this.envelopeId,this.roleId,this.inviteCode)];case 2:o=l.sent();this.processAuthResponse(o);return[3,4];case 3:a=l.sent();console.log("[SIGN] Error with signing session",a);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new SDKError(a.message,(s=a.response)===null||s===void 0?void 0:s.status,(r=a.response)===null||r===void 0?void 0:r.data));this.showLoadError=true;return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var t=document.getElementById("verdocs-sign-header");if(e&&t){console.log("[SIGN] Moving header");t.remove();e.append(t)}};e.prototype.processAuthResponse=function(e){var t,i,n;var s=e.envelope,r=e.recipient;var o=r.auth_step;this.recipient=r;this.envelope=s;this.disclosures=((i=(t=this.envelope)===null||t===void 0?void 0:t.organization)===null||i===void 0?void 0:i.disclaimer)||DEFAULT_DISCLOSURES;this.authStep=o;this.delegated=!!r.delegated_to;this.agreed=r.agreed;this.submitted=r.status==="submitted";this.isDone=this.submitted;this.showDone=this.submitted;Store.updateEnvelope(this.envelopeId,s);if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.authMethodStates=r.auth_method_states||{};this.kbaQuestions=r.kba_questions;if(Object.values(this.authMethodStates).includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}if(this.envelope.status==="canceled"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="This envelope has been canceled. The sender has been notified."}else if(r.status==="declined"){this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this request. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(n=this.envelopeLoaded)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope})};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;console.log("[SIGN] Accepting disclosures",this.disclosures);envelopeRecipientAgree(this.endpoint,this.envelopeId,this.roleId,this.disclosures).then((function(){var t;e.nextButtonLabel="Next";e.recipient.agreed=true;e.submitting=false;e.agreed=true;(t=e.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:e.envelope,event:"agreed"})})).catch((function(t){var i,n,s;console.log("[SIGN] Unable to accept disclosures",t);VerdocsToast("Unable to accept disclosures, please try again later",{style:"error"});e.submitting=false;(i=e.sdkError)===null||i===void 0?void 0:i.emit(new SDKError(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(s=t.response)===null||s===void 0?void 0:s.data))}))};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,s;return __generator(this,(function(r){switch(e.detail.id){case"later":this.finishLater=true;this.showFinishLater=true;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"delegate":this.delegating=true;break;case"decline":this.declining=true;break;case"print":window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":{s=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(s){saveAttachment(this.endpoint,this.envelope,s.id).catch((function(e){VerdocsToast("Unable to download PDF, please try again later",{style:"error"});console.log("[SIGN] Error downloading PDF",e)}));(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}break}return[2]}))}))};e.prototype.updateRecipientFieldValue=function(e,t){var i=this;console.log("[SIGN] updateRecipientFieldValue",e,t);this.getRecipientFields().forEach((function(n){if(n.name===e){n.value=t.value;n.settings=t.settings;updateDocumentFieldValue(n);i.checkRecipientFields()}}))};e.prototype.saveFieldChange=function(e,t){var i=this;console.log("[SIGN] saveFieldChange",e,t);updateEnvelopeField(this.endpoint,this.envelopeId,e,t).then((function(t){return i.updateRecipientFieldValue(e,t)})).catch((function(e){var t,n,s,r,o,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((s=(n=e.response)===null||n===void 0?void 0:n.data)===null||s===void 0?void 0:s.error)==="jwt expired"){console.log("[SIGN] Signing session expired");i.fatalErrorHeader="Signing Session Expired";i.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e);VerdocsToast("Unable to save change, please try again later",{style:"error"})}(r=i.sdkError)===null||r===void 0?void 0:r.emit(new SDKError(e.message,(o=e.response)===null||o===void 0?void 0:o.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,n,s,r,o,a,l;var d=this;return __generator(this,(function(c){switch(c.label){case 0:i=t.target,n=i.value,s=i.checked;r=e.type;switch(r){case"textarea":return[3,1];case"textbox":return[3,1];case"checkbox":return[3,2];case"radio":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,8];case"date":return[3,11];case"timestamp":return[3,12]}return[3,13];case 1:return[2,this.saveFieldChange(e.name,{prepared:false,value:n})];case 2:{return[2,this.saveFieldChange(e.name,{prepared:false,value:String(t.target.checked)})]}c.label=3;case 3:{return[2,this.saveFieldChange(e.name,{prepared:false,value:String(t.target.checked)})]}c.label=4;case 4:console.log("Saving dropdown",e.name,t.detail);return[2,this.saveFieldChange(e.name,{prepared:false,value:t.detail})];case 5:if(!t.detail){return[2]}this.showSpinner=true;return[4,fetch(t.detail)];case 6:return[4,c.sent().blob()];case 7:o=c.sent();return[2,createInitials(this.endpoint,"initial",o).then((function(t){return __awaiter(d,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:return[4,updateEnvelopeFieldInitials(this.endpoint,this.envelopeId,e.name,t.id)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.log("Error updating initials",e);VerdocsToast("Unable to save initials, please try again later",{style:"error"});d.showSpinner=false}))];case 8:if(!t.detail){return[2]}this.showSpinner=true;return[4,fetch(t.detail)];case 9:return[4,c.sent().blob()];case 10:a=c.sent();return[2,createSignature(this.endpoint,"signature",a).then((function(t){return __awaiter(d,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:console.log("Signature update result",t);return[4,updateEnvelopeFieldSignature(this.endpoint,this.envelopeId,e.name,t.id)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.warn("[SIGN] Error updating signature",e);VerdocsToast("Unable to save signature, please try again later",{style:"error"});d.showSpinner=false}))];case 11:l=t.detail.formattedDate;if(l){return[2,this.saveFieldChange(e.name,{prepared:false,value:l})]}return[3,14];case 12:console.log("[SIGN] Updating timestamp",{value:n,ts:t.target.getAttribute("timestamp")});return[3,14];case 13:console.log("[SIGN] Unhandled field update",{value:n,checked:s},e);return[3,14];case 14:return[2]}}))}))};e.prototype.isFieldFilled=function(e){var t=e.value,i=t===void 0?"":t;switch(e.type){case"textarea":case"textbox":switch(e.validator||""){case"email":return isValidEmail(i);case"phone":return isValidPhone(i);default:return(i||"").trim()!==""}case"signature":return i==="signed";case"initial":return i==="initialed";case"timestamp":return true;case"date":return!!i;case"attachment":return i==="attached";case"dropdown":return i!=="";case"checkbox":return i==="true";case"radio":if(!!e.group){return this.getRecipientFields().filter((function(t){return t.group===e.group})).some((function(e){return e.value==="true"}))}return e.value==="true";default:return false}};e.prototype.isFieldValid=function(e){return!e.required||this.isFieldFilled(e)};e.prototype.getSortedFillableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"}));sortFields(e);return e};e.prototype.handleNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s,r,o,a,l,d;var c=this;return __generator(this,(function(u){switch(u.label){case 0:if(!this.nextSubmits)return[3,5];u.label=1;case 1:u.trys.push([1,3,,4]);(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;return[4,envelopeRecipientSubmit(this.endpoint,this.envelopeId,this.roleId)];case 2:t=u.sent();console.log("[SIGN] Submitted successfully",t);window.location.reload();return[3,4];case 3:i=u.sent();console.log("[SIGN] Error submitting",i);return[3,4];case 4:return[2];case 5:n=this.getSortedFillableFields().filter((function(e){return e.required&&!c.isFieldFilled(e)}));sortFields(n);s=n.findIndex((function(e){return e.name===c.focusedField}));r=s+1;if(r>=n.length){r=0}o=n[r];a=0;if(a<n.length&&["signature","initial"].includes(o.type)&&["initialed","signed"].includes(o.value)){a++;r++;if(r>=n.length){r=0}o=n[r]}if(a>=n.length){o=null}if(o){l=getFieldId(o);d=document.getElementById(l);d===null||d===void 0?void 0:d.scrollIntoView({behavior:"smooth"});d===null||d===void 0?void 0:d.focusField();this.focusedField=o.name}return[2]}}))}))};e.prototype.getRecipientFields=function(){var e=this;return this.envelope.fields.filter((function(t){return t.role_name===e.recipient.role_name}))};e.prototype.checkRecipientFields=function(){var e=this;var t=this.getRecipientFields().filter((function(t){return!e.isFieldValid(t)}));if(t.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{this.nextButtonLabel="Next";this.nextSubmits=false}};e.prototype.attachFieldAttributes=function(e,t,i){var n=this;if(i.getAttribute("attached")==="1"){return}i.setAttribute("attached","1");i.addEventListener("input",(function(e){if(e.target.type==="radio"||e.target.type==="checkbox"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}else{n.checkRecipientFields()}}));i.addEventListener("attached",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,s,r;return __generator(this,(function(o){switch(o.label){case 0:console.log("[SIGN] onAttached",i.detail,i.target.value);this.showSpinner=true;o.label=1;case 1:o.trys.push([1,3,,4]);return[4,uploadEnvelopeFieldAttachment(this.endpoint,this.envelopeId,t.name,i.detail)];case 2:n=o.sent();this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();s=renderDocumentField("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,s);this.showSpinner=false;return[3,4];case 3:r=o.sent();console.log("Error uploading attachment",r);VerdocsToast("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("deleted",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,s,r;return __generator(this,(function(o){switch(o.label){case 0:console.log("[SIGN] onDeleted",i.detail,i.target.value);this.showSpinner=true;o.label=1;case 1:o.trys.push([1,3,,4]);return[4,deleteEnvelopeFieldAttachment(this.endpoint,this.envelopeId,t.name)];case 2:n=o.sent();console.log("[SIGN] Deleted attachment",n);this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();s=renderDocumentField("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,s);this.showSpinner=false;return[3,4];case 3:r=o.sent();console.log("Error uploading attachment",r);VerdocsToast("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("focusout",(function(e){if(t.type!=="dropdown"&&t.type!=="attachment"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}}));i.addEventListener("fieldChange",(function(e){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}));i.setAttribute("templateid",this.envelope.template_id);i.setAttribute("fieldname",t.name);i.setAttribute("page",e.pageNumber);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);var s=formatFullName(this.recipient);i.setAttribute("initials",fullNameToInitials(s));i.setAttribute("name",s)};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;var n=this.getSortedFillableFields();console.log("[SIGN] Rendering fields for page",i.pageNumber,n);n.forEach((function(e,n){if(e.page!==i.pageNumber){return}var s=renderDocumentField("envelope",e,i,{disabled:false,editable:false,draggable:false,done:t.isDone},n);if(!s){return}if(Array.isArray(s)){s.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,s)}}));this.envelope.recipients.filter((function(e){return e.role_name!==t.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending")})).forEach((function(){t.getRecipientFields().filter((function(e){return e.page===i.pageNumber})).forEach((function(e){var n=renderDocumentField("envelope",e,i,{disabled:true,editable:false,draggable:false,done:t.isDone});if(!n){return}if(Array.isArray(n)){n.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,n)}}))}));this.checkRecipientFields()};e.prototype.handleAuthenticateSigner=function(e){var t=this;console.log("[SIGN] Submitting authentication step",e);verifySigner(this.endpoint,e).then((function(e){console.log("[SIGN] Verification successful",e);t.processAuthResponse(e)})).catch((function(e){var i,n,s,r,o;console.log("[SIGN] Error submitting authentication step",e);if((s=(n=(i=e.response)===null||i===void 0?void 0:i.data)===null||n===void 0?void 0:n.error)===null||s===void 0?void 0:s.includes("failed")){t.fatalErrorHeader="Recipient Verification Failed";t.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";t.isDone=true}else{VerdocsToast(((o=(r=e.response)===null||r===void 0?void 0:r.data)===null||o===void 0?void 0:o.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))};e.prototype.render=function(){var e=this;if(this.showLoadError){return h(Host,null,h("verdocs-ok-dialog",{heading:"Unable to Start Signing",message:"Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.",buttonLabel:"OK",onNext:function(){window.location.reload()}}))}if(!this.envelope){return h(Host,null,h("verdocs-loader",null))}if(this.fatalErrorMessage){return h(Host,{class:{agreed:this.agreed}},h("div",{class:"fatal-error"},h("div",{class:"message"},h("div",{class:"header"},this.fatalErrorHeader),h("p",null,this.fatalErrorMessage))))}if(this.delegated){return h(Host,{class:{agreed:false}},h("div",{class:"fatal-error"},h("div",{class:"message"},h("div",{class:"header"},"Delegated Signing Request"),h("p",null,"You have delegated signing to another recipient. You will not be able to sign this request again."))))}if(this.isDone){return h(Host,{class:{agreed:this.agreed}},h("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(t){var i;return(i=e.sdkError)===null||i===void 0?void 0:i.emit(t.detail)}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(t){t.preventDefault();t.stopPropagation();e.showDone=false;e.isDone=true}}),this.submitting&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))}if(this.delegating){return h(Host,{class:"agreed"},h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("verdocs-delegate-dialog",{endpoint:this.endpoint,envelope:this.envelope,onExit:function(){return e.delegating=false},onNext:function(t){delegateRecipient(e.endpoint,e.envelopeId,e.roleId,t.detail).then((function(t){VerdocsToast("Delegation request submitted.",{style:"success"});console.log("[SIGN] Delegated successfully",t);e.delegated=true;e.delegating=false})).catch((function(e){console.log("[SIGN] Error delegating request",e);VerdocsToast("Unable to process delegation request. Please try again later.",{style:"error"})}))}}))}if(this.declining){return h("verdocs-ok-dialog",{heading:"Decline Signing Request",message:"If you decline to sign this request, you will not be able to sign again in the future. The envelope sender will be notified.",buttonLabel:"OK",showCancel:true,onExit:function(){return e.declining=false},onNext:function(){envelopeRecipientDecline(e.endpoint,e.envelopeId,e.roleId).then((function(e){console.log("[SIGN] Decline result",e);window.location.reload()})).catch((function(e){console.warn("[SIGN] Error declining signing session",e);VerdocsToast("Unable to decline, please try again later",{style:"error"})}))}})}if(!this.agreed){return h(Host,{class:"agreed"},h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("verdocs-disclosure-dialog",{disclosures:this.disclosures,onDelegate:function(){return e.delegating=true},onDecline:function(){return e.declining=true},onAccept:function(){return e.handleClickAgree()}}))}if(this.authStep==="passcode"){return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("div",{class:"cover"},h("div",{class:"kba"},h("verdocs-kba-dialog",{mode:"text",step:1,steps:1,placeholder:"Enter your passcode...",helptitle:"Document is protected by a Passcode",helptext:"Please enter your Passcode to proceed. If you do not have one, please contact the sender.",label:"Passcode",onNext:function(t){return e.handleAuthenticateSigner({auth_method:"passcode",code:t.detail})}}))))}if(this.authStep==="email"){return h("verdocs-otp-dialog",{endpoint:this.endpoint,method:"email",onNext:function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){this.processAuthResponse(t.detail.response);return[2]}))}))}})}if(this.authStep==="kba"&&!this.authMethodStates.kba){return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("div",{class:"cover"},h("div",{class:"kba"},h("verdocs-kba-dialog",{mode:"identity",helptitle:"Document requires identity verification",helptext:"Please complete your contact details to proceed.",recipient:this.recipient,onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(i){e=t.detail;this.handleAuthenticateSigner({auth_method:"kba",first_name:e.first_name,last_name:e.last_name,address:e.address,city:e.city,state:e.state,zip:e.zip,dob:e.dob});return[2]}))}))}}))))}if(this.authStep==="kba"&&this.authMethodStates.kba==="questions"){var t=this.kbaChoices.length;var i=this.kbaQuestions[t];return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("div",{class:"cover"},h("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?h("verdocs-spinner",null):h("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(i===null||i===void 0?void 0:i.prompt)||"Please select one of the options below.",choices:(i===null||i===void 0?void 0:i.answer)||["Skip Question"],step:t+1,steps:this.kbaQuestions.length,onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i;var n=this;return __generator(this,(function(s){e=t.detail;this.kbaChoices=__spreadArray(__spreadArray([],this.kbaChoices,true),[e],false);if(this.kbaChoices.length>=this.kbaQuestions.length){i=this.kbaQuestions.map((function(e,t){return{type:e.type,answer:n.kbaChoices[t]}}));console.log("Submitting KBA responses",this.kbaChoices,i);this.handleAuthenticateSigner({auth_method:"kba",responses:i})}return[2]}))}))}}))))}var n=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var s=[{id:"print",label:"Print"},{id:"download",label:"Download"}];if(this.recipient.delegator){n.unshift({id:"delegate",label:"Delegate"})}var r=this.getRecipientFields().filter((function(t){return!e.isFieldValid(t)}));r.length>0?console.log("[SIGN] Invalid fields remaining",r.map((function(e){return e.name}))):console.log("[SIGN] All field valid");return h(Host,null,h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),!this.finishLater&&h("verdocs-button",{size:"xsmall",label:this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?n:s,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),h("div",{class:"document",style:{paddingTop:"15px"}},(this.envelope.documents||[]).map((function(t){var i=integerSequence(1,t.pages);return h(Fragment,null,i.map((function(i){var n;var s=((n=t.page_sizes)===null||n===void 0?void 0:n[i])||{width:612,height:792};return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,virtualWidth:s.width,virtualHeight:s.height,pageNumber:i,onPageRendered:function(t){return e.handlePageRendered(t)},type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&h("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the ".concat(this.documentsSingularPlural,", use the link in the original email notification inviting you to review and finish the document."),onNext:function(){return e.showFinishLater=false}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){e.showDone=false;e.isDone=true}}),(this.submitting||this.showSpinner)&&h("verdocs-portal",null,h("div",{class:"spinner-overlay"},h("verdocs-spinner",null))))};return e}();VerdocsSign.style=verdocsSignCss;export{VerdocsSign as verdocs_sign};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):s(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(i=0)),i)try{if(n=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];s=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,s=t.length,r;n<s;n++){if(r||!(n in t)){if(!r)r=Array.prototype.slice.call(t,0,n);r[n]=t[n]}}return e.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment}from"./index-6vpKbd31.js";import{VerdocsEndpoint,startSigningSession,envelopeRecipientAgree,updateEnvelopeField,createSignature,updateEnvelopeFieldSignature,createInitials,updateEnvelopeFieldInitials,isValidPhone,isValidEmail,sortFields,envelopeRecipientSubmit,uploadEnvelopeFieldAttachment,deleteEnvelopeFieldAttachment,formatFullName,fullNameToInitials,verifySigner,delegateRecipient,envelopeRecipientDecline,integerSequence}from"@verdocs/js-sdk";import{a as saveAttachment,u as updateDocumentFieldValue,g as getFieldId,r as renderDocumentField}from"./utils-DmfOx9Ey.js";import{D as DefaultEndpoint}from"./Environment-C_Xku1v2.js";import{V as VerdocsToast}from"./Toast-CyvDgtoV.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-DmsV595e.js";import"./_commonjsHelpers-BFTU3MAI.js";import"./index-dzBXqXlK.js";import"./Types-Dl7Xw8F0.js";var verdocsSignCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}verdocs-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);margin-top:15px}verdocs-sign .fatal-error .message{max-width:360px;width:50%;font-size:16px;background:white;-webkit-box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235);box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235)}verdocs-sign .fatal-error .header{color:white;font-size:18px;font-weight:500;padding:5px 10px;margin:0 0 10px 0;background:#4c56cb}verdocs-sign .fatal-error p{margin:1rem;font-size:14px;font-weight:400;padding:0 10px}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}';var DEFAULT_DISCLOSURES='\n<ul>\n <li>\n Agree to use electronic records and signatures, and confirm you have read the\n <a href="https://verdocs.com/en/electronic-record-signature-disclosure/" target="_blank">\n Electronic Record and Signatures Disclosure</a>.</li>\n <li>\n Agree to Verdocs\'\n <a href="https://verdocs.com/en/eula" target="_blank">\n End User License Agreement</a>\n and confirm you have read Verdocs\'\n <a href="https://verdocs.com/en/privacy-policy/" target="_blank">\n Privacy Policy</a>.\n </li>\n</ul>';var VerdocsSign=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError");this.envelopeLoaded=createEvent(this,"envelopeLoaded");this.envelopeUpdated=createEvent(this,"envelopeUpdated");this.endpoint=DefaultEndpoint;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosures=DEFAULT_DISCLOSURES;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.kbaQuestions=null;this.showSpinner=false;this.declining=false;this.delegating=false;this.delegated=false;this.kbaChoices=[];this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){if(!this.endpoint){console.log("[SIGN] Creating signing endpoint");this.endpoint=new VerdocsEndpoint({sessionType:"signing"})}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s,r,o,a;return __generator(this,(function(l){switch(l.label){case 0:if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new SDKError("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new SDKError("[SIGN] Missing required inviteCode",500,""));return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,startSigningSession(this.endpoint,this.envelopeId,this.roleId,this.inviteCode)];case 2:o=l.sent();this.processAuthResponse(o);return[3,4];case 3:a=l.sent();console.log("[SIGN] Error with signing session",a);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new SDKError(a.message,(s=a.response)===null||s===void 0?void 0:s.status,(r=a.response)===null||r===void 0?void 0:r.data));this.showLoadError=true;return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var t=document.getElementById("verdocs-sign-header");if(e&&t){console.log("[SIGN] Moving header");t.remove();e.append(t)}};e.prototype.processAuthResponse=function(e){var t,i,n;var s=e.envelope,r=e.recipient;var o=r.auth_step;this.recipient=r;this.envelope=s;this.disclosures=((i=(t=this.envelope)===null||t===void 0?void 0:t.organization)===null||i===void 0?void 0:i.disclaimer)||DEFAULT_DISCLOSURES;this.authStep=o;this.delegated=!!r.delegated_to;this.agreed=r.agreed;this.submitted=r.status==="submitted";this.isDone=this.submitted;this.showDone=this.submitted;Store.updateEnvelope(this.envelopeId,s);if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.authMethodStates=r.auth_method_states||{};this.kbaQuestions=r.kba_questions;if(Object.values(this.authMethodStates).includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}if(this.envelope.status==="canceled"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="This envelope has been canceled. The sender has been notified."}else if(r.status==="declined"){this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this request. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(n=this.envelopeLoaded)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope})};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;console.log("[SIGN] Accepting disclosures",this.disclosures);envelopeRecipientAgree(this.endpoint,this.envelopeId,this.roleId,this.disclosures).then((function(){var t;e.nextButtonLabel="Next";e.recipient.agreed=true;e.submitting=false;e.agreed=true;(t=e.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:e.envelope,event:"agreed"})})).catch((function(t){var i,n,s;console.log("[SIGN] Unable to accept disclosures",t);VerdocsToast("Unable to accept disclosures, please try again later",{style:"error"});e.submitting=false;(i=e.sdkError)===null||i===void 0?void 0:i.emit(new SDKError(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(s=t.response)===null||s===void 0?void 0:s.data))}))};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,s;return __generator(this,(function(r){switch(e.detail.id){case"later":this.finishLater=true;this.showFinishLater=true;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"delegate":this.delegating=true;break;case"decline":this.declining=true;break;case"print":window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":{s=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(s){saveAttachment(this.endpoint,this.envelope,s.id).catch((function(e){VerdocsToast("Unable to download PDF, please try again later",{style:"error"});console.log("[SIGN] Error downloading PDF",e)}));(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}break}return[2]}))}))};e.prototype.updateRecipientFieldValue=function(e,t){var i=this;console.log("[SIGN] updateRecipientFieldValue",e,t);this.getRecipientFields().forEach((function(n){if(n.name===e){n.value=t.value;n.settings=t.settings;updateDocumentFieldValue(n);i.checkRecipientFields()}}))};e.prototype.saveFieldChange=function(e,t){var i=this;console.log("[SIGN] saveFieldChange",e,t);updateEnvelopeField(this.endpoint,this.envelopeId,e,t).then((function(t){return i.updateRecipientFieldValue(e,t)})).catch((function(e){var t,n,s,r,o,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((s=(n=e.response)===null||n===void 0?void 0:n.data)===null||s===void 0?void 0:s.error)==="jwt expired"){console.log("[SIGN] Signing session expired");i.fatalErrorHeader="Signing Session Expired";i.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e);VerdocsToast("Unable to save change, please try again later",{style:"error"})}(r=i.sdkError)===null||r===void 0?void 0:r.emit(new SDKError(e.message,(o=e.response)===null||o===void 0?void 0:o.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,n,s,r,o,a,l;var d=this;return __generator(this,(function(c){switch(c.label){case 0:i=t.target,n=i.value,s=i.checked;r=e.type;switch(r){case"textarea":return[3,1];case"textbox":return[3,1];case"checkbox":return[3,2];case"radio":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,8];case"date":return[3,11];case"timestamp":return[3,12]}return[3,13];case 1:return[2,this.saveFieldChange(e.name,{prepared:false,value:n})];case 2:{return[2,this.saveFieldChange(e.name,{prepared:false,value:String(t.target.checked)})]}c.label=3;case 3:{return[2,this.saveFieldChange(e.name,{prepared:false,value:String(t.target.checked)})]}c.label=4;case 4:console.log("Saving dropdown",e.name,t.detail);return[2,this.saveFieldChange(e.name,{prepared:false,value:t.detail})];case 5:if(!t.detail){return[2]}this.showSpinner=true;return[4,fetch(t.detail)];case 6:return[4,c.sent().blob()];case 7:o=c.sent();return[2,createInitials(this.endpoint,"initial",o).then((function(t){return __awaiter(d,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:return[4,updateEnvelopeFieldInitials(this.endpoint,this.envelopeId,e.name,t.id)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.log("Error updating initials",e);VerdocsToast("Unable to save initials, please try again later",{style:"error"});d.showSpinner=false}))];case 8:if(!t.detail){return[2]}this.showSpinner=true;return[4,fetch(t.detail)];case 9:return[4,c.sent().blob()];case 10:a=c.sent();return[2,createSignature(this.endpoint,"signature",a).then((function(t){return __awaiter(d,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:console.log("Signature update result",t);return[4,updateEnvelopeFieldSignature(this.endpoint,this.envelopeId,e.name,t.id)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.warn("[SIGN] Error updating signature",e);VerdocsToast("Unable to save signature, please try again later",{style:"error"});d.showSpinner=false}))];case 11:l=t.detail.formattedDate;if(l){return[2,this.saveFieldChange(e.name,{prepared:false,value:l})]}return[3,14];case 12:console.log("[SIGN] Updating timestamp",{value:n,ts:t.target.getAttribute("timestamp")});return[3,14];case 13:console.log("[SIGN] Unhandled field update",{value:n,checked:s},e);return[3,14];case 14:return[2]}}))}))};e.prototype.isFieldFilled=function(e){var t=e.value,i=t===void 0?"":t;switch(e.type){case"textarea":case"textbox":switch(e.validator||""){case"email":return isValidEmail(i);case"phone":return isValidPhone(i);default:return(i||"").trim()!==""}case"signature":return i==="signed";case"initial":return i==="initialed";case"timestamp":return true;case"date":return!!i;case"attachment":return i==="attached";case"dropdown":return i!=="";case"checkbox":return i==="true";case"radio":if(!!e.group){return this.getRecipientFields().filter((function(t){return t.group===e.group})).some((function(e){return e.value==="true"}))}return e.value==="true";default:return false}};e.prototype.isFieldValid=function(e){return!e.required||this.isFieldFilled(e)};e.prototype.getSortedFillableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"}));sortFields(e);return e};e.prototype.handleNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s,r,o,a,l,d;var c=this;return __generator(this,(function(u){switch(u.label){case 0:if(!this.nextSubmits)return[3,5];u.label=1;case 1:u.trys.push([1,3,,4]);(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;return[4,envelopeRecipientSubmit(this.endpoint,this.envelopeId,this.roleId)];case 2:t=u.sent();console.log("[SIGN] Submitted successfully",t);window.location.reload();return[3,4];case 3:i=u.sent();console.log("[SIGN] Error submitting",i);return[3,4];case 4:return[2];case 5:n=this.getSortedFillableFields().filter((function(e){return e.required&&!c.isFieldFilled(e)}));sortFields(n);s=n.findIndex((function(e){return e.name===c.focusedField}));r=s+1;if(r>=n.length){r=0}o=n[r];a=0;if(a<n.length&&["signature","initial"].includes(o.type)&&["initialed","signed"].includes(o.value)){a++;r++;if(r>=n.length){r=0}o=n[r]}if(a>=n.length){o=null}if(o){l=getFieldId(o);d=document.getElementById(l);d===null||d===void 0?void 0:d.scrollIntoView({behavior:"smooth"});d===null||d===void 0?void 0:d.focusField();this.focusedField=o.name}return[2]}}))}))};e.prototype.getRecipientFields=function(){var e=this;return this.envelope.fields.filter((function(t){return t.role_name===e.recipient.role_name}))};e.prototype.checkRecipientFields=function(){var e=this;var t=this.getRecipientFields().filter((function(t){return!e.isFieldValid(t)}));if(t.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{this.nextButtonLabel="Next";this.nextSubmits=false}};e.prototype.attachFieldAttributes=function(e,t,i){var n=this;if(i.getAttribute("attached")==="1"){return}i.setAttribute("attached","1");i.addEventListener("input",(function(e){if(e.target.type==="radio"||e.target.type==="checkbox"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}else{n.checkRecipientFields()}}));i.addEventListener("attached",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,s,r;return __generator(this,(function(o){switch(o.label){case 0:console.log("[SIGN] onAttached",i.detail,i.target.value);this.showSpinner=true;o.label=1;case 1:o.trys.push([1,3,,4]);return[4,uploadEnvelopeFieldAttachment(this.endpoint,this.envelopeId,t.name,i.detail)];case 2:n=o.sent();this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();s=renderDocumentField("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,s);this.showSpinner=false;return[3,4];case 3:r=o.sent();console.log("Error uploading attachment",r);VerdocsToast("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("deleted",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,s,r;return __generator(this,(function(o){switch(o.label){case 0:console.log("[SIGN] onDeleted",i.detail,i.target.value);this.showSpinner=true;o.label=1;case 1:o.trys.push([1,3,,4]);return[4,deleteEnvelopeFieldAttachment(this.endpoint,this.envelopeId,t.name)];case 2:n=o.sent();console.log("[SIGN] Deleted attachment",n);this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();s=renderDocumentField("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,s);this.showSpinner=false;return[3,4];case 3:r=o.sent();console.log("Error uploading attachment",r);VerdocsToast("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("focusout",(function(e){if(t.type!=="dropdown"&&t.type!=="attachment"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}}));i.addEventListener("fieldChange",(function(e){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}));i.setAttribute("templateid",this.envelope.template_id);i.setAttribute("fieldname",t.name);i.setAttribute("page",e.pageNumber);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);var s=formatFullName(this.recipient);i.setAttribute("initials",fullNameToInitials(s));i.setAttribute("name",s)};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;var n=this.getSortedFillableFields();console.log("[SIGN] Rendering fields for page",i.pageNumber,n);n.forEach((function(e,n){if(e.page!==i.pageNumber){return}var s=renderDocumentField("envelope",e,i,{disabled:false,editable:false,draggable:false,done:t.isDone},n);if(!s){return}if(Array.isArray(s)){s.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,s)}}));this.envelope.recipients.filter((function(e){return e.role_name!==t.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending")})).forEach((function(){t.getRecipientFields().filter((function(e){return e.page===i.pageNumber})).forEach((function(e){var n=renderDocumentField("envelope",e,i,{disabled:true,editable:false,draggable:false,done:t.isDone});if(!n){return}if(Array.isArray(n)){n.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,n)}}))}));this.checkRecipientFields()};e.prototype.handleAuthenticateSigner=function(e){var t=this;console.log("[SIGN] Submitting authentication step",e);verifySigner(this.endpoint,e).then((function(e){console.log("[SIGN] Verification successful",e);t.processAuthResponse(e)})).catch((function(e){var i,n,s,r,o;console.log("[SIGN] Error submitting authentication step",e);if((s=(n=(i=e.response)===null||i===void 0?void 0:i.data)===null||n===void 0?void 0:n.error)===null||s===void 0?void 0:s.includes("failed")){t.fatalErrorHeader="Recipient Verification Failed";t.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";t.isDone=true}else{VerdocsToast(((o=(r=e.response)===null||r===void 0?void 0:r.data)===null||o===void 0?void 0:o.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))};e.prototype.render=function(){var e=this;if(this.showLoadError){return h(Host,null,h("verdocs-ok-dialog",{heading:"Unable to Start Signing",message:"Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.",buttonLabel:"OK",onNext:function(){window.location.reload()}}))}if(!this.envelope){return h(Host,null,h("verdocs-loader",null))}if(this.fatalErrorMessage){return h(Host,{class:{agreed:this.agreed}},h("div",{class:"fatal-error"},h("div",{class:"message"},h("div",{class:"header"},this.fatalErrorHeader),h("p",null,this.fatalErrorMessage))))}if(this.delegated){return h(Host,{class:{agreed:false}},h("div",{class:"fatal-error"},h("div",{class:"message"},h("div",{class:"header"},"Delegated Signing Request"),h("p",null,"You have delegated signing to another recipient. You will not be able to sign this request again."))))}if(this.isDone){return h(Host,{class:{agreed:this.agreed}},h("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(t){var i;return(i=e.sdkError)===null||i===void 0?void 0:i.emit(t.detail)}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(t){t.preventDefault();t.stopPropagation();e.showDone=false;e.isDone=true}}),this.submitting&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))}if(this.delegating){return h(Host,{class:"agreed"},h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("verdocs-delegate-dialog",{endpoint:this.endpoint,envelope:this.envelope,onExit:function(){return e.delegating=false},onNext:function(t){delegateRecipient(e.endpoint,e.envelopeId,e.roleId,t.detail).then((function(t){VerdocsToast("Delegation request submitted.",{style:"success"});console.log("[SIGN] Delegated successfully",t);e.delegated=true;e.delegating=false})).catch((function(e){console.log("[SIGN] Error delegating request",e);VerdocsToast("Unable to process delegation request. Please try again later.",{style:"error"})}))}}))}if(this.declining){return h("verdocs-ok-dialog",{heading:"Decline Signing Request",message:"If you decline to sign this request, you will not be able to sign again in the future. The envelope sender will be notified.",buttonLabel:"OK",showCancel:true,onExit:function(){return e.declining=false},onNext:function(){envelopeRecipientDecline(e.endpoint,e.envelopeId,e.roleId).then((function(e){console.log("[SIGN] Decline result",e);window.location.reload()})).catch((function(e){console.warn("[SIGN] Error declining signing session",e);VerdocsToast("Unable to decline, please try again later",{style:"error"})}))}})}if(!this.agreed){return h(Host,{class:"agreed"},h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("verdocs-disclosure-dialog",{disclosures:this.disclosures,delegator:this.recipient.delegator,onDelegate:function(){return e.delegating=true},onDecline:function(){return e.declining=true},onAccept:function(){return e.handleClickAgree()}}))}if(this.authStep==="passcode"){return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("div",{class:"cover"},h("div",{class:"kba"},h("verdocs-kba-dialog",{mode:"text",step:1,steps:1,placeholder:"Enter your passcode...",helptitle:"Document is protected by a Passcode",helptext:"Please enter your Passcode to proceed. If you do not have one, please contact the sender.",label:"Passcode",onNext:function(t){return e.handleAuthenticateSigner({auth_method:"passcode",code:t.detail})}}))))}if(this.authStep==="email"){return h("verdocs-otp-dialog",{endpoint:this.endpoint,method:"email",onNext:function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){this.processAuthResponse(t.detail.response);return[2]}))}))}})}if(this.authStep==="kba"&&!this.authMethodStates.kba){return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("div",{class:"cover"},h("div",{class:"kba"},h("verdocs-kba-dialog",{mode:"identity",helptitle:"Document requires identity verification",helptext:"Please complete your contact details to proceed.",recipient:this.recipient,onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(i){e=t.detail;this.handleAuthenticateSigner({auth_method:"kba",first_name:e.first_name,last_name:e.last_name,address:e.address,city:e.city,state:e.state,zip:e.zip,dob:e.dob});return[2]}))}))}}))))}if(this.authStep==="kba"&&this.authMethodStates.kba==="questions"){var t=this.kbaChoices.length;var i=this.kbaQuestions[t];return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("div",{class:"cover"},h("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?h("verdocs-spinner",null):h("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(i===null||i===void 0?void 0:i.prompt)||"Please select one of the options below.",choices:(i===null||i===void 0?void 0:i.answer)||["Skip Question"],step:t+1,steps:this.kbaQuestions.length,onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i;var n=this;return __generator(this,(function(s){e=t.detail;this.kbaChoices=__spreadArray(__spreadArray([],this.kbaChoices,true),[e],false);if(this.kbaChoices.length>=this.kbaQuestions.length){i=this.kbaQuestions.map((function(e,t){return{type:e.type,answer:n.kbaChoices[t]}}));console.log("Submitting KBA responses",this.kbaChoices,i);this.handleAuthenticateSigner({auth_method:"kba",responses:i})}return[2]}))}))}}))))}var n=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var s=[{id:"print",label:"Print"},{id:"download",label:"Download"}];if(this.recipient.delegator){n.unshift({id:"delegate",label:"Delegate"})}var r=this.getRecipientFields().filter((function(t){return!e.isFieldValid(t)}));r.length>0?console.log("[SIGN] Invalid fields remaining",r.map((function(e){return e.name}))):console.log("[SIGN] All field valid");return h(Host,null,h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),!this.finishLater&&h("verdocs-button",{size:"xsmall",label:this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?n:s,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),h("div",{class:"document",style:{paddingTop:"15px"}},(this.envelope.documents||[]).map((function(t){var i=integerSequence(1,t.pages);return h(Fragment,null,i.map((function(i){var n;var s=((n=t.page_sizes)===null||n===void 0?void 0:n[i])||{width:612,height:792};return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,virtualWidth:s.width,virtualHeight:s.height,pageNumber:i,onPageRendered:function(t){return e.handlePageRendered(t)},type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&h("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the ".concat(this.documentsSingularPlural,", use the link in the original email notification inviting you to review and finish the document."),onNext:function(){return e.showFinishLater=false}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){e.showDone=false;e.isDone=true}}),(this.submitting||this.showSpinner)&&h("verdocs-portal",null,h("div",{class:"spinner-overlay"},h("verdocs-spinner",null))))};return e}();VerdocsSign.style=verdocsSignCss;export{VerdocsSign as verdocs_sign};
|
|
2
2
|
//# sourceMappingURL=verdocs-sign.entry.js.map
|