@verdocs/web-sdk 6.10.6 → 6.12.1
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/Environment-C3P2cz0J.js +14 -0
- package/dist/cjs/Environment-C3P2cz0J.js.map +1 -0
- package/dist/cjs/{Icons-TVvtZ5iL.js → Icons-Zdy_DFce.js} +16 -2
- package/dist/cjs/{Icons-TVvtZ5iL.js.map → Icons-Zdy_DFce.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-adopt-signature-dialog_7.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-auth.cjs.entry.js +271 -15
- package/dist/cjs/verdocs-auth.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +12 -14
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-field-attachment_11.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_6.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.css +2 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.css +45 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +302 -19
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js.map +1 -1
- package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +12 -14
- package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js.map +1 -1
- package/dist/collection/utils/Environment.js +4 -7
- package/dist/collection/utils/Environment.js.map +1 -1
- package/dist/collection/utils/Icons.js +12 -0
- package/dist/collection/utils/Icons.js.map +1 -1
- package/dist/components/{p-DCZz2B7h.js → p-6RWROB9R.js} +2 -2
- package/dist/components/p-6RWROB9R.js.map +1 -0
- package/dist/components/{p-i3o08M2d.js → p-B1UVXqFA.js} +2 -2
- package/dist/components/{p-bPe0_Dsn.js → p-B8R4luxA.js} +2 -2
- package/dist/components/{p-D-TexkaT.js → p-BXaR1BSS.js} +2 -2
- package/dist/components/{p-DL4-aTsZ.js → p-BYLm9aol.js} +2 -2
- package/dist/components/{p-DiYuPnJJ.js → p-Bp88Loqg.js} +2 -2
- package/dist/components/{p-C43B3SP_.js → p-C7JN32A9.js} +2 -2
- package/dist/components/{p-BDv5kBUR.js → p-C7k2AOsW.js} +2 -2
- package/dist/components/p-C7k2AOsW.js.map +1 -0
- package/dist/components/{p-DKKsPZnz.js → p-CCr_gliS.js} +2 -2
- package/dist/components/{p-BELGzhZw.js → p-CFau7OiC.js} +2 -2
- package/dist/components/{p-zTcSNwsp.js → p-Ck4pdoyc.js} +2 -2
- package/dist/components/{p-DZa0rMk2.js → p-CsF979IT.js} +2 -2
- package/dist/components/{p-CYvB5bYX.js → p-CtNpZzq1.js} +2 -2
- package/dist/components/{p-B6aUlIQe.js → p-CzKj8wD_.js} +2 -2
- package/dist/components/{p-DiwfOWXt.js → p-DJMr11ue.js} +2 -2
- package/dist/components/{p-CZwyK_uo.js → p-DLo5dMNn.js} +2 -2
- package/dist/components/{p-D1cSgqut.js → p-D_FNSGtS.js} +2 -2
- package/dist/components/p-DavVixMP.js +2 -0
- package/dist/components/p-DavVixMP.js.map +1 -0
- package/dist/components/{p-K_PKw6bs.js → p-DmxiVavg.js} +2 -2
- package/dist/components/{p-D7oMWhqM.js → p-DrNmI7Wz.js} +2 -2
- package/dist/components/{p-DfIxVX8-.js → p-DubfX0n1.js} +2 -2
- package/dist/components/{p-Dy2CRiH8.js → p-b2u0_wDk.js} +1 -1
- package/dist/components/p-b2u0_wDk.js.map +1 -0
- package/dist/components/{p-CAGp0qKc.js → p-hxWwaOcD.js} +2 -2
- package/dist/components/{p-BQUZjuoP.js → p-vcHtLpWY.js} +2 -2
- package/dist/components/verdocs-adopt-signature-dialog.js +1 -1
- package/dist/components/verdocs-auth.js +1 -1
- package/dist/components/verdocs-auth.js.map +1 -1
- package/dist/components/verdocs-build.js +1 -1
- package/dist/components/verdocs-contact-picker.js +1 -1
- package/dist/components/verdocs-delegate-dialog.js +1 -1
- package/dist/components/verdocs-field-attachment.js +1 -1
- package/dist/components/verdocs-field-checkbox.js +1 -1
- package/dist/components/verdocs-field-date.js +1 -1
- package/dist/components/verdocs-field-dropdown.js +1 -1
- package/dist/components/verdocs-field-initial.js +1 -1
- package/dist/components/verdocs-field-payment.js +1 -1
- package/dist/components/verdocs-field-radio.js +1 -1
- package/dist/components/verdocs-field-signature.js +1 -1
- package/dist/components/verdocs-field-textarea.js +1 -1
- package/dist/components/verdocs-field-textbox.js +1 -1
- package/dist/components/verdocs-field-timestamp.js +1 -1
- package/dist/components/verdocs-file-chooser.js +1 -1
- package/dist/components/verdocs-otp-dialog.js +1 -1
- package/dist/components/verdocs-passcode-dialog.js +1 -1
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-sign.js +1 -1
- package/dist/components/verdocs-template-attachments.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-toolbar-icon.js +1 -1
- package/dist/custom-elements.json +2508 -0
- package/dist/esm/Environment-b2u0_wDk.js +12 -0
- package/dist/esm/Environment-b2u0_wDk.js.map +1 -0
- package/dist/esm/{Icons-BU5rnXp2.js → Icons-DobS6Y7w.js} +15 -3
- package/dist/esm/{Icons-BU5rnXp2.js.map → Icons-DobS6Y7w.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js +2 -2
- package/dist/esm/verdocs-auth.entry.js +273 -17
- package/dist/esm/verdocs-auth.entry.js.map +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +12 -14
- package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm/verdocs-field-attachment_11.entry.js +1 -1
- package/dist/esm/verdocs-field-payment.entry.js +1 -1
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_6.entry.js +2 -2
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm/verdocs-template-document-page_2.entry.js.map +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/{Environment-Dy2CRiH8.js → Environment-b2u0_wDk.js} +1 -1
- package/dist/esm-es5/Environment-b2u0_wDk.js.map +1 -0
- package/dist/esm-es5/{Icons-BU5rnXp2.js → Icons-DobS6Y7w.js} +2 -2
- package/dist/esm-es5/{Icons-BU5rnXp2.js.map → Icons-DobS6Y7w.js.map} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-field-attachment_11.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +31 -3
- package/dist/types/components.d.ts +18 -7
- package/dist/types/utils/Icons.d.ts +2 -0
- package/dist/verdocs-web-sdk/{p-869024e0.system.entry.js → p-09f5670e.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-0fb8e6e0.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-0fb8e6e0.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-e87a29a3.system.entry.js → p-298d799f.system.entry.js} +3 -3
- package/dist/verdocs-web-sdk/{p-734c8a8b.entry.js → p-2a6a3bc6.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-46e52384.system.entry.js → p-39c54b65.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-39c54b65.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-62464041.system.entry.js → p-439d36b0.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-d95705c6.entry.js → p-4930b31d.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-255e1915.entry.js → p-4e0788f9.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-4e0788f9.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-c6f52cd7.entry.js → p-4ea0632f.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-c6f52cd7.entry.js.map → p-4ea0632f.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-c86111fd.system.entry.js → p-5404f6bf.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-10d47bbd.entry.js → p-5cad2422.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-4aee15e6.entry.js → p-932e8b9b.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6e8ce989.system.entry.js → p-99f7a0fa.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-GqS1qR-V.system.js → p-BHF3ByWV.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-GqS1qR-V.system.js.map → p-BHF3ByWV.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-BdZ5Ghsa.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-C96xjMgt.system.js → p-COHG5J4h.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-COHG5J4h.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-BU5rnXp2.js → p-DobS6Y7w.js} +2 -2
- package/dist/verdocs-web-sdk/{p-BU5rnXp2.js.map → p-DobS6Y7w.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-Dy2CRiH8.js → p-b2u0_wDk.js} +1 -1
- package/dist/verdocs-web-sdk/p-b2u0_wDk.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-098b3852.system.entry.js → p-ba0d4ff5.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-098b3852.system.entry.js.map → p-ba0d4ff5.system.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-c3e9634c.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-c3e9634c.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-7e1f895c.entry.js → p-dd59aa9a.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-c3527f3e.system.entry.js → p-f7b14409.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-1df29abb.entry.js → p-fe404347.entry.js} +2 -2
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +4 -4
- package/dist/cjs/Environment-CUCX3aWX.js +0 -17
- package/dist/cjs/Environment-CUCX3aWX.js.map +0 -1
- package/dist/components/p-BDv5kBUR.js.map +0 -1
- package/dist/components/p-CYqVJ_kJ.js +0 -2
- package/dist/components/p-CYqVJ_kJ.js.map +0 -1
- package/dist/components/p-DCZz2B7h.js.map +0 -1
- package/dist/components/p-Dy2CRiH8.js.map +0 -1
- package/dist/esm/Environment-Dy2CRiH8.js +0 -15
- package/dist/esm/Environment-Dy2CRiH8.js.map +0 -1
- package/dist/esm-es5/Environment-Dy2CRiH8.js.map +0 -1
- package/dist/verdocs-web-sdk/p-16d655d4.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-16d655d4.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-255e1915.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-43ee0267.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-43ee0267.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-46e52384.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-C96xjMgt.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-Dy2CRiH8.js.map +0 -1
- /package/dist/components/{p-i3o08M2d.js.map → p-B1UVXqFA.js.map} +0 -0
- /package/dist/components/{p-bPe0_Dsn.js.map → p-B8R4luxA.js.map} +0 -0
- /package/dist/components/{p-D-TexkaT.js.map → p-BXaR1BSS.js.map} +0 -0
- /package/dist/components/{p-DL4-aTsZ.js.map → p-BYLm9aol.js.map} +0 -0
- /package/dist/components/{p-DiYuPnJJ.js.map → p-Bp88Loqg.js.map} +0 -0
- /package/dist/components/{p-C43B3SP_.js.map → p-C7JN32A9.js.map} +0 -0
- /package/dist/components/{p-DKKsPZnz.js.map → p-CCr_gliS.js.map} +0 -0
- /package/dist/components/{p-BELGzhZw.js.map → p-CFau7OiC.js.map} +0 -0
- /package/dist/components/{p-zTcSNwsp.js.map → p-Ck4pdoyc.js.map} +0 -0
- /package/dist/components/{p-DZa0rMk2.js.map → p-CsF979IT.js.map} +0 -0
- /package/dist/components/{p-CYvB5bYX.js.map → p-CtNpZzq1.js.map} +0 -0
- /package/dist/components/{p-B6aUlIQe.js.map → p-CzKj8wD_.js.map} +0 -0
- /package/dist/components/{p-DiwfOWXt.js.map → p-DJMr11ue.js.map} +0 -0
- /package/dist/components/{p-CZwyK_uo.js.map → p-DLo5dMNn.js.map} +0 -0
- /package/dist/components/{p-D1cSgqut.js.map → p-D_FNSGtS.js.map} +0 -0
- /package/dist/components/{p-K_PKw6bs.js.map → p-DmxiVavg.js.map} +0 -0
- /package/dist/components/{p-D7oMWhqM.js.map → p-DrNmI7Wz.js.map} +0 -0
- /package/dist/components/{p-DfIxVX8-.js.map → p-DubfX0n1.js.map} +0 -0
- /package/dist/components/{p-CAGp0qKc.js.map → p-hxWwaOcD.js.map} +0 -0
- /package/dist/components/{p-BQUZjuoP.js.map → p-vcHtLpWY.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-869024e0.system.entry.js.map → p-09f5670e.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-e87a29a3.system.entry.js.map → p-298d799f.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-734c8a8b.entry.js.map → p-2a6a3bc6.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-62464041.system.entry.js.map → p-439d36b0.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-d95705c6.entry.js.map → p-4930b31d.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-c86111fd.system.entry.js.map → p-5404f6bf.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-10d47bbd.entry.js.map → p-5cad2422.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-4aee15e6.entry.js.map → p-932e8b9b.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-6e8ce989.system.entry.js.map → p-99f7a0fa.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-7e1f895c.entry.js.map → p-dd59aa9a.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-c3527f3e.system.entry.js.map → p-f7b14409.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-1df29abb.entry.js.map → p-fe404347.entry.js.map} +0 -0
|
@@ -1,10 +1,53 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-CjTHbolG.js';
|
|
2
|
-
import { VerdocsEndpoint, convertToE164, createProfile, verifyEmail, authenticate,
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-CjTHbolG.js';
|
|
2
|
+
import { VerdocsEndpoint, getSocialProviders, convertToE164, createProfile, verifyEmail, getMyUser, authenticate, isMFARequired, createCodeVerifier, createCodeChallenge, getSocialLoginUrl, resendVerification, resetPassword } from '@verdocs/js-sdk';
|
|
3
|
+
import { M as MicrosoftIcon, G as GoogleIcon } from './Icons-DobS6Y7w.js';
|
|
3
4
|
import { V as VerdocsToast } from './Toast-D97GxsI-.js';
|
|
4
5
|
import { S as SDKError } from './errors-C1sRVZWv.js';
|
|
5
6
|
|
|
6
|
-
const verdocsAuthCss = () => `verdocs-auth{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}verdocs-auth .form{width:350px;display:-ms-flexbox;display:flex;padding:20px;max-width:90%;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;background:#ffffff}verdocs-auth .logo{width:128px;max-width:100%;margin:20px 0 30px}verdocs-auth h3{color:#092c4c;text-align:center;font-weight:400;font-size:18px;line-height:1.75;margin:0}verdocs-auth em{font-size:14px;margin:15px 0}verdocs-auth .buttons{gap:20px;margin:20px 0 0 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-auth p{color:#092c4c;margin:1em 0;font-size:14px}verdocs-auth p+p{margin-top:0}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}verdocs-auth .already-have{color:#092c4c;margin:0.5em 0;font-size:14px;text-align:center}verdocs-auth .service-agreement{font-size:12px;color:#777}verdocs-auth .service-agreement a{color:#092c4c}`;
|
|
7
|
+
const verdocsAuthCss = () => `verdocs-auth{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}verdocs-auth .form{width:350px;display:-ms-flexbox;display:flex;padding:20px;max-width:90%;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;background:#ffffff}verdocs-auth .logo{width:128px;max-width:100%;margin:20px 0 30px}verdocs-auth h3{color:#092c4c;text-align:center;font-weight:400;font-size:18px;line-height:1.75;margin:0 0 20px 0}verdocs-auth em{font-size:14px;margin:15px 0}verdocs-auth .buttons{gap:20px;margin:20px 0 0 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-auth p{color:#092c4c;margin:1em 0;font-size:14px}verdocs-auth p+p{margin-top:0}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}verdocs-auth .already-have{color:#092c4c;margin:0.5em 0;font-size:14px;text-align:center}verdocs-auth .service-agreement{font-size:12px;color:#777}verdocs-auth .service-agreement a{color:#092c4c}verdocs-auth .providers{width:100%}verdocs-auth .providers verdocs-button{display:block;margin-bottom:10px}verdocs-auth .providers verdocs-button button.outline{position:relative;border-color:#aeb4bf}verdocs-auth .providers verdocs-button button.outline:disabled{border-color:#aeb4bf}verdocs-auth .providers verdocs-button .icon.start{position:absolute;left:16px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}verdocs-auth .providers verdocs-button .icon.start svg{width:18px;height:18px}verdocs-auth .divider{gap:8px;color:#777;display:-ms-flexbox;display:flex;font-size:12px;margin:28px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-auth .divider .divider-line{-ms-flex:1;flex:1;height:1px;background:#aeb4bf}verdocs-auth .mfa-error{color:#cc0000;font-size:14px;margin:0 0 8px}`;
|
|
7
8
|
|
|
9
|
+
const MFA_CODE_ERROR = 'Invalid code. Please try again.';
|
|
10
|
+
const SOCIAL_START_ERROR = 'Unable to start sign-in sequence. Please try again.';
|
|
11
|
+
const SOCIAL_LOGIN_KEY = 'vdocs-social-login';
|
|
12
|
+
const SOCIAL_ERROR_MESSAGES = {
|
|
13
|
+
email_unverified: 'That account does not have a verified email address.',
|
|
14
|
+
corporate_email_required: 'Please use your corporate email address to create an account.',
|
|
15
|
+
account_locked: 'That account is locked. Please contact support@verdocs.com.',
|
|
16
|
+
provider_error: 'That provider could not sign you in. Please try again.',
|
|
17
|
+
access_denied: 'Sign-in was canceled.',
|
|
18
|
+
};
|
|
19
|
+
const socialErrorMessage = (code) => SOCIAL_ERROR_MESSAGES[code] || 'Unable to sign in. Please try again.';
|
|
20
|
+
const readSocialLoginAttempt = () => {
|
|
21
|
+
try {
|
|
22
|
+
const stored = window.sessionStorage.getItem(SOCIAL_LOGIN_KEY);
|
|
23
|
+
return stored ? JSON.parse(stored) : null;
|
|
24
|
+
}
|
|
25
|
+
catch (_a) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const clearSocialLoginAttempt = () => {
|
|
30
|
+
try {
|
|
31
|
+
window.sessionStorage.removeItem(SOCIAL_LOGIN_KEY);
|
|
32
|
+
}
|
|
33
|
+
catch (_a) {
|
|
34
|
+
// Third-party embeds may block sessionStorage. It's OK.
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
// Prevent replays on a reload
|
|
38
|
+
const cleanSocialLoginParams = (names) => {
|
|
39
|
+
const url = new URL(window.location.href);
|
|
40
|
+
names.forEach(name => url.searchParams.delete(name));
|
|
41
|
+
window.history.replaceState({}, '', `${url.pathname}${url.search}${url.hash}`);
|
|
42
|
+
};
|
|
43
|
+
const currentReturnUri = () => `${window.location.origin}${window.location.pathname}`;
|
|
44
|
+
const formatRecoveryCode = (value) => {
|
|
45
|
+
const cleaned = value
|
|
46
|
+
.toLowerCase()
|
|
47
|
+
.replace(/[^a-z0-9]/g, '')
|
|
48
|
+
.slice(0, 8);
|
|
49
|
+
return cleaned.length > 4 ? `${cleaned.slice(0, 4)}-${cleaned.slice(4)}` : cleaned;
|
|
50
|
+
};
|
|
8
51
|
const VerdocsAuth = class {
|
|
9
52
|
constructor(hostRef) {
|
|
10
53
|
registerInstance(this, hostRef);
|
|
@@ -30,6 +73,12 @@ const VerdocsAuth = class {
|
|
|
30
73
|
* The display mode to start in.
|
|
31
74
|
*/
|
|
32
75
|
this.displayMode = 'login';
|
|
76
|
+
/**
|
|
77
|
+
* Social auth is disabled by default because these are redirect flows that require allowable redirect_uri
|
|
78
|
+
* destinations be pre-registered. These will only work on Verdocs sites/apps, so third-party developers
|
|
79
|
+
* should not turn this on unless instructed to by Verdocs Support.
|
|
80
|
+
*/
|
|
81
|
+
this.showSocialLogins = false;
|
|
33
82
|
this.org_name = '';
|
|
34
83
|
this.first_name = '';
|
|
35
84
|
this.last_name = '';
|
|
@@ -43,7 +92,14 @@ const VerdocsAuth = class {
|
|
|
43
92
|
this.resendDisabled = false;
|
|
44
93
|
this.session = null;
|
|
45
94
|
this.profile = null;
|
|
95
|
+
this.providers = { google: false, microsoft: false };
|
|
96
|
+
this.mfaToken = '';
|
|
97
|
+
this.mfaCode = '';
|
|
98
|
+
this.recoveryCode = '';
|
|
99
|
+
this.useRecoveryCode = false;
|
|
100
|
+
this.mfaError = '';
|
|
46
101
|
this.resendDisabledTimer = null;
|
|
102
|
+
this.mfaFocusPending = false;
|
|
47
103
|
// We can't instantly log in on the default endpoint because other listeners might see
|
|
48
104
|
// its events and incorrectly trigger before we're done. So we manage our own temp
|
|
49
105
|
// endpoint and pass the final tokens to the default once we're ready.
|
|
@@ -73,6 +129,33 @@ const VerdocsAuth = class {
|
|
|
73
129
|
(_b = this.authenticated) === null || _b === void 0 ? void 0 : _b.emit({ authenticated: false, session, profile });
|
|
74
130
|
}
|
|
75
131
|
});
|
|
132
|
+
if (this.showSocialLogins) {
|
|
133
|
+
getSocialProviders(this.endpoint)
|
|
134
|
+
.then(providers => {
|
|
135
|
+
this.providers = providers;
|
|
136
|
+
})
|
|
137
|
+
.catch(() => undefined);
|
|
138
|
+
}
|
|
139
|
+
this.handleSocialLoginReturn();
|
|
140
|
+
}
|
|
141
|
+
componentDidRender() {
|
|
142
|
+
if (this.displayMode !== 'mfa') {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const input = this.el.querySelector('.mfa-input input');
|
|
146
|
+
if (!input) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
if (!this.useRecoveryCode) {
|
|
150
|
+
input.setAttribute('inputmode', 'numeric');
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
input.removeAttribute('inputmode');
|
|
154
|
+
}
|
|
155
|
+
if (this.mfaFocusPending) {
|
|
156
|
+
this.mfaFocusPending = false;
|
|
157
|
+
input.focus();
|
|
158
|
+
}
|
|
76
159
|
}
|
|
77
160
|
disconnectedCallback() {
|
|
78
161
|
if (typeof window !== 'undefined') {
|
|
@@ -164,9 +247,24 @@ const VerdocsAuth = class {
|
|
|
164
247
|
}
|
|
165
248
|
completeLogin(result) {
|
|
166
249
|
this.clearForms();
|
|
250
|
+
this.displayMode = 'login';
|
|
167
251
|
this.tempAuthEndpoint.clearSession();
|
|
168
252
|
this.endpoint.setToken(result.access_token);
|
|
169
253
|
}
|
|
254
|
+
async finishLogin(authResult) {
|
|
255
|
+
console.log('[AUTH] Authenticated, checking email verification');
|
|
256
|
+
this.tempAuthEndpoint.setToken(authResult.access_token);
|
|
257
|
+
const user = await getMyUser(this.tempAuthEndpoint);
|
|
258
|
+
this.submitting = false;
|
|
259
|
+
if (!user.email_verified) {
|
|
260
|
+
console.log('[AUTH] Logged in, pending email address verification');
|
|
261
|
+
this.displayMode = 'verify';
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
console.log('[AUTH] Email address is verified, completing login');
|
|
265
|
+
this.completeLogin(authResult);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
170
268
|
async loginAndCheckVerification() {
|
|
171
269
|
var _a;
|
|
172
270
|
if (this.submitting) {
|
|
@@ -175,29 +273,170 @@ const VerdocsAuth = class {
|
|
|
175
273
|
this.submitting = true;
|
|
176
274
|
this.tempAuthEndpoint.clearSession();
|
|
177
275
|
try {
|
|
178
|
-
this.submitting = false;
|
|
179
276
|
const authResult = await authenticate(this.tempAuthEndpoint, { username: this.email.trim(), password: this.password, grant_type: 'password' });
|
|
180
|
-
|
|
181
|
-
this.tempAuthEndpoint.setToken(authResult.access_token);
|
|
182
|
-
const user = await getMyUser(this.tempAuthEndpoint);
|
|
183
|
-
if (!user.email_verified) {
|
|
184
|
-
console.log('[AUTH] Logged in, pending email address verification');
|
|
185
|
-
this.displayMode = 'verify';
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
console.log('[AUTH] Email address is verified, completing login');
|
|
189
|
-
this.completeLogin(authResult);
|
|
190
|
-
}
|
|
277
|
+
await this.finishLogin(authResult);
|
|
191
278
|
}
|
|
192
279
|
catch (e) {
|
|
280
|
+
if (isMFARequired(e)) {
|
|
281
|
+
this.startMFA(e.response.data.mfa_token);
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
193
284
|
this.submitting = false;
|
|
194
285
|
console.log('[AUTH] Auth failure', ((_a = e.response) === null || _a === void 0 ? void 0 : _a.data) || e);
|
|
195
286
|
VerdocsToast('Login failed. Please check your credentials and try again.', { style: 'error' });
|
|
196
287
|
}
|
|
197
288
|
}
|
|
289
|
+
startMFA(token) {
|
|
290
|
+
this.mfaToken = token;
|
|
291
|
+
this.mfaCode = '';
|
|
292
|
+
this.recoveryCode = '';
|
|
293
|
+
this.useRecoveryCode = false;
|
|
294
|
+
this.mfaError = '';
|
|
295
|
+
this.submitting = false;
|
|
296
|
+
this.mfaFocusPending = true;
|
|
297
|
+
this.displayMode = 'mfa';
|
|
298
|
+
}
|
|
299
|
+
returnToLogin() {
|
|
300
|
+
this.mfaToken = '';
|
|
301
|
+
this.mfaCode = '';
|
|
302
|
+
this.recoveryCode = '';
|
|
303
|
+
this.useRecoveryCode = false;
|
|
304
|
+
this.mfaError = '';
|
|
305
|
+
this.password = '';
|
|
306
|
+
this.submitting = false;
|
|
307
|
+
this.displayMode = 'login';
|
|
308
|
+
}
|
|
309
|
+
handleMFAFailure(e) {
|
|
310
|
+
var _a;
|
|
311
|
+
this.submitting = false;
|
|
312
|
+
this.mfaCode = '';
|
|
313
|
+
this.recoveryCode = '';
|
|
314
|
+
// Failed attempts require a fresh token
|
|
315
|
+
if (isMFARequired(e)) {
|
|
316
|
+
this.mfaToken = e.response.data.mfa_token;
|
|
317
|
+
this.mfaError = MFA_CODE_ERROR;
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
if (((_a = e === null || e === void 0 ? void 0 : e.response) === null || _a === void 0 ? void 0 : _a.status) === 401) {
|
|
321
|
+
this.returnToLogin();
|
|
322
|
+
VerdocsToast('Your sign-in timed out. Enter your password again.', { style: 'error' });
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
this.mfaError = MFA_CODE_ERROR;
|
|
326
|
+
}
|
|
327
|
+
async submitMFA(code, isRecoveryCode) {
|
|
328
|
+
if (this.submitting || !code) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
this.submitting = true;
|
|
332
|
+
this.mfaError = '';
|
|
333
|
+
this.tempAuthEndpoint.clearSession();
|
|
334
|
+
try {
|
|
335
|
+
const authResult = await authenticate(this.tempAuthEndpoint, isRecoveryCode
|
|
336
|
+
? { grant_type: 'urn:verdocs:params:oauth:grant-type:mfa-recovery-code', mfa_token: this.mfaToken, recovery_code: code }
|
|
337
|
+
: { grant_type: 'urn:verdocs:params:oauth:grant-type:mfa-otp', mfa_token: this.mfaToken, otp: code });
|
|
338
|
+
await this.finishLogin(authResult);
|
|
339
|
+
}
|
|
340
|
+
catch (e) {
|
|
341
|
+
this.handleMFAFailure(e);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
handleVerifyMFA() {
|
|
345
|
+
this.submitMFA(this.useRecoveryCode ? this.recoveryCode : this.mfaCode, this.useRecoveryCode).catch(() => undefined);
|
|
346
|
+
}
|
|
347
|
+
handleMFACodeInput(target) {
|
|
348
|
+
const digits = (target.value || '').replace(/\D/g, '').slice(0, 6);
|
|
349
|
+
if (target.value !== digits) {
|
|
350
|
+
target.value = digits;
|
|
351
|
+
}
|
|
352
|
+
this.mfaCode = digits;
|
|
353
|
+
// Auto-submit once 6 digits are entered
|
|
354
|
+
if (digits.length === 6) {
|
|
355
|
+
this.submitMFA(digits, false).catch(() => undefined);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
handleRecoveryCodeInput(target) {
|
|
359
|
+
const formatted = formatRecoveryCode(target.value || '');
|
|
360
|
+
if (target.value !== formatted) {
|
|
361
|
+
target.value = formatted;
|
|
362
|
+
}
|
|
363
|
+
this.recoveryCode = formatted;
|
|
364
|
+
}
|
|
365
|
+
toggleRecoveryCode() {
|
|
366
|
+
this.useRecoveryCode = !this.useRecoveryCode;
|
|
367
|
+
this.mfaCode = '';
|
|
368
|
+
this.recoveryCode = '';
|
|
369
|
+
this.mfaError = '';
|
|
370
|
+
this.mfaFocusPending = true;
|
|
371
|
+
}
|
|
372
|
+
handleSocialLogin(provider) {
|
|
373
|
+
try {
|
|
374
|
+
const verifier = createCodeVerifier();
|
|
375
|
+
const state = createCodeVerifier();
|
|
376
|
+
createCodeChallenge(verifier)
|
|
377
|
+
.then(codeChallenge => {
|
|
378
|
+
const attempt = { verifier, state, provider };
|
|
379
|
+
window.sessionStorage.setItem(SOCIAL_LOGIN_KEY, JSON.stringify(attempt));
|
|
380
|
+
window.location.assign(getSocialLoginUrl(this.endpoint, provider, { returnUri: currentReturnUri(), codeChallenge, state }));
|
|
381
|
+
})
|
|
382
|
+
.catch(() => VerdocsToast(SOCIAL_START_ERROR, { style: 'error' }));
|
|
383
|
+
}
|
|
384
|
+
catch (_a) {
|
|
385
|
+
VerdocsToast(SOCIAL_START_ERROR, { style: 'error' });
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
handleSocialLoginReturn() {
|
|
389
|
+
if (typeof window === 'undefined') {
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
const params = new URLSearchParams(window.location.search);
|
|
393
|
+
const loginCode = params.get('login_code');
|
|
394
|
+
const state = params.get('state');
|
|
395
|
+
const error = params.get('error');
|
|
396
|
+
if (!loginCode && !error) {
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
const attempt = readSocialLoginAttempt();
|
|
400
|
+
// `error` doesn't give us the whole picture
|
|
401
|
+
if (!loginCode && !attempt) {
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
clearSocialLoginAttempt();
|
|
405
|
+
cleanSocialLoginParams(loginCode ? ['login_code', 'state'] : ['error']);
|
|
406
|
+
if (error) {
|
|
407
|
+
VerdocsToast(socialErrorMessage(error), { style: 'error' });
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
if (!attempt || attempt.state !== state) {
|
|
411
|
+
VerdocsToast('Sign-in could not be verified. Try again.', { style: 'error' });
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
this.exchangeLoginCode(loginCode, attempt.verifier);
|
|
415
|
+
}
|
|
416
|
+
exchangeLoginCode(loginCode, codeVerifier) {
|
|
417
|
+
this.submitting = true;
|
|
418
|
+
this.tempAuthEndpoint.clearSession();
|
|
419
|
+
authenticate(this.tempAuthEndpoint, { grant_type: 'urn:verdocs:params:oauth:grant-type:login-code', login_code: loginCode, code_verifier: codeVerifier })
|
|
420
|
+
.then(authResult => this.finishLogin(authResult))
|
|
421
|
+
.catch(e => {
|
|
422
|
+
var _a;
|
|
423
|
+
if (isMFARequired(e)) {
|
|
424
|
+
this.startMFA(e.response.data.mfa_token);
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
this.submitting = false;
|
|
428
|
+
console.log('[AUTH] Social login failure', ((_a = e.response) === null || _a === void 0 ? void 0 : _a.data) || e);
|
|
429
|
+
VerdocsToast('Sign-in failed. Please try again.', { style: 'error' });
|
|
430
|
+
});
|
|
431
|
+
}
|
|
198
432
|
clearForms() {
|
|
199
433
|
this.submitting = false;
|
|
200
434
|
this.resendDisabled = false;
|
|
435
|
+
this.mfaToken = '';
|
|
436
|
+
this.mfaCode = '';
|
|
437
|
+
this.recoveryCode = '';
|
|
438
|
+
this.useRecoveryCode = false;
|
|
439
|
+
this.mfaError = '';
|
|
201
440
|
this.email = '';
|
|
202
441
|
this.phone = '';
|
|
203
442
|
this.password = '';
|
|
@@ -313,6 +552,12 @@ const VerdocsAuth = class {
|
|
|
313
552
|
VerdocsToast('Unable to reset password. Please check your email address and try again.', { style: 'error' });
|
|
314
553
|
}
|
|
315
554
|
}
|
|
555
|
+
renderProviderButtons() {
|
|
556
|
+
if (!this.showSocialLogins || (!this.providers.google && !this.providers.microsoft)) {
|
|
557
|
+
return null;
|
|
558
|
+
}
|
|
559
|
+
return (h("div", { class: "providers" }, this.providers.google && (h("verdocs-button", { label: "Continue with Google", variant: "outline", class: "provider-google", startIcon: GoogleIcon, disabled: this.submitting, onClick: () => this.handleSocialLogin('google') })), this.providers.microsoft && (h("verdocs-button", { label: "Continue with Microsoft", variant: "outline", class: "provider-microsoft", startIcon: MicrosoftIcon, disabled: this.submitting, onClick: () => this.handleSocialLogin('microsoft') })), h("div", { class: "divider" }, h("div", { class: "divider-line" }), "or", h("div", { class: "divider-line" }))));
|
|
560
|
+
}
|
|
316
561
|
render() {
|
|
317
562
|
if (!this.visible) {
|
|
318
563
|
return h("div", { style: { display: 'none' } }, "Authenticated");
|
|
@@ -320,9 +565,19 @@ const VerdocsAuth = class {
|
|
|
320
565
|
if (this.session) {
|
|
321
566
|
return (h("verdocs-button", { label: "Sign Out", disabled: this.submitting, onClick: () => this.handleLogout(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }));
|
|
322
567
|
}
|
|
568
|
+
if (this.displayMode === 'mfa') {
|
|
569
|
+
const enteredCode = this.useRecoveryCode ? this.recoveryCode : this.mfaCode;
|
|
570
|
+
const codeComplete = this.useRecoveryCode ? this.recoveryCode.replace('-', '').length === 8 : this.mfaCode.length === 6;
|
|
571
|
+
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Two-factor authentication"), h("p", null, this.useRecoveryCode
|
|
572
|
+
? 'Enter one of the backup codes you saved when you turned on multi-factor authentication.'
|
|
573
|
+
: 'Enter the six-digit code from your authenticator app.'), h("form", { onSubmit: (e) => {
|
|
574
|
+
e.preventDefault();
|
|
575
|
+
this.handleVerifyMFA();
|
|
576
|
+
} }, this.useRecoveryCode ? (h("verdocs-text-input", { class: "mfa-input", label: "Backup code", placeholder: "xxxx-xxxx", autocomplete: "one-time-code", value: this.recoveryCode, onInput: (e) => this.handleRecoveryCodeInput(e.target), disabled: this.submitting })) : (h("verdocs-text-input", { class: "mfa-input", label: "Authentication code", autocomplete: "one-time-code", value: this.mfaCode, onInput: (e) => this.handleMFACodeInput(e.target), disabled: this.submitting })), this.mfaError && (h("div", { role: "alert", class: "mfa-error" }, this.mfaError)), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => this.returnToLogin() }), h("verdocs-button", { label: "Verify", disabled: this.submitting || !codeComplete || !enteredCode, onClick: () => this.handleVerifyMFA() })), h("div", { class: "buttons" }, h("verdocs-button", { variant: "text", size: "small", label: this.useRecoveryCode ? 'Use your authenticator app instead' : 'Use a backup code instead', disabled: this.submitting, onClick: () => this.toggleRecoveryCode() })))));
|
|
577
|
+
}
|
|
323
578
|
if (this.displayMode === 'signup') {
|
|
324
579
|
const invalid = this.submitting || !this.first_name || !this.last_name || !this.email || !this.password || !this.confirmpass || !this.org_name;
|
|
325
|
-
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Sign up for a free account"), h("div", { class: "already-have" }, "Already have an account?", h("verdocs-button", { label: "Log In", variant: "text", onClick: () => (this.displayMode = 'login'), disabled: this.submitting })), h("form", { onSubmit: () => this.handleSignup() }, h("div", { style: { display: 'flex', flexDirection: 'row', columnGap: '20px' } }, h("verdocs-text-input", { label: "First Name", autocomplete: "first", required: true, value: this.first_name, onInput: (e) => (this.first_name = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Last Name", autocomplete: "last", required: true, value: this.last_name, onInput: (e) => (this.last_name = e.target.value), disabled: this.submitting })), h("verdocs-text-input", { label: "Email Address", autocomplete: "email", required: true, value: this.email, onInput: (e) => (this.email = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Password", type: "password", required: true, autocomplete: "new-password", value: this.password, onInput: (e) => (this.password = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Confirm Password", type: "password", required: true, autocomplete: "off", value: this.confirmpass, onInput: (e) => (this.confirmpass = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Phone Number", type: "tel", required: true, autocomplete: "phone", value: this.phone, onInput: (e) => (this.phone = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Organization Name", autocomplete: "org", required: true, value: this.org_name, onInput: (e) => (this.org_name = e.target.value), disabled: this.submitting, style: { flex: '1' } }), h("div", { class: "service-agreement" }, "By clicking the Create Account button, you agree to the", ' ', h("a", { href: "https://verdocs.com/eula", target: "_blank" }, "End User License Agreement"), ". Learn about how we use and protect your data and how you can opt-out in our", ' ', h("a", { href: "https://verdocs.com/privacy-policy", target: "_blank" }, "Privacy Policy"), "."), h("div", { style: { marginTop: '30px' } }), h("verdocs-button", { label: "Next", disabled: invalid, onClick: invalid ? () => { } : () => this.handleSignup(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))));
|
|
580
|
+
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Sign up for a free account"), h("div", { class: "already-have" }, "Already have an account?", h("verdocs-button", { label: "Log In", variant: "text", onClick: () => (this.displayMode = 'login'), disabled: this.submitting })), this.renderProviderButtons(), h("form", { onSubmit: () => this.handleSignup() }, h("div", { style: { display: 'flex', flexDirection: 'row', columnGap: '20px' } }, h("verdocs-text-input", { label: "First Name", autocomplete: "first", required: true, value: this.first_name, onInput: (e) => (this.first_name = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Last Name", autocomplete: "last", required: true, value: this.last_name, onInput: (e) => (this.last_name = e.target.value), disabled: this.submitting })), h("verdocs-text-input", { label: "Email Address", autocomplete: "email", required: true, value: this.email, onInput: (e) => (this.email = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Password", type: "password", required: true, autocomplete: "new-password", value: this.password, onInput: (e) => (this.password = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Confirm Password", type: "password", required: true, autocomplete: "off", value: this.confirmpass, onInput: (e) => (this.confirmpass = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Phone Number", type: "tel", required: true, autocomplete: "phone", value: this.phone, onInput: (e) => (this.phone = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Organization Name", autocomplete: "org", required: true, value: this.org_name, onInput: (e) => (this.org_name = e.target.value), disabled: this.submitting, style: { flex: '1' } }), h("div", { class: "service-agreement" }, "By clicking the Create Account button, you agree to the", ' ', h("a", { href: "https://verdocs.com/eula", target: "_blank" }, "End User License Agreement"), ". Learn about how we use and protect your data and how you can opt-out in our", ' ', h("a", { href: "https://verdocs.com/privacy-policy", target: "_blank" }, "Privacy Policy"), "."), h("div", { style: { marginTop: '30px' } }), h("verdocs-button", { label: "Next", disabled: invalid, onClick: invalid ? () => { } : () => this.handleSignup(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))));
|
|
326
581
|
}
|
|
327
582
|
if (this.displayMode === 'verify') {
|
|
328
583
|
return (h("div", { class: "form" }, h("form", { onSubmit: () => this.handleVerification() }, h("p", null, "Please check your e-mail inbox for a verification code and enter it below."), h("verdocs-text-input", { label: "Verification Code", required: true, value: this.verificationCode, onInput: (e) => (this.verificationCode = e.target.value), disabled: this.submitting }), h("div", { class: "buttons" }, h("verdocs-button", { label: "Sign Out", variant: "outline", disabled: this.submitting, onClick: () => this.handleLogout() }), h("verdocs-button", { label: "Verify", disabled: this.submitting || !this.verificationCode || this.verificationCode.length !== 6, onClick: () => this.handleVerification() })), h("div", { class: "buttons" }, h("verdocs-button", { variant: "text", label: "Resend Code", disabled: this.resendDisabled || this.submitting, onClick: () => this.handleResendVerification() })))));
|
|
@@ -333,8 +588,9 @@ const VerdocsAuth = class {
|
|
|
333
588
|
if (this.displayMode === 'reset') {
|
|
334
589
|
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Forgot your password?"), h("p", null, "Enter your e-mail address below, and reset instructions will be sent to your Inbox. Please allow up to 15 minutes to arrive. Check your spam folder if you do not receive the message."), h("form", { onSubmit: () => this.handleResetPassword() }, h("verdocs-text-input", { label: "Verification Code", required: true, value: this.verificationCode, onInput: (e) => (this.verificationCode = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Password", type: "password", required: true, autocomplete: "off", value: this.newPassword, onInput: (e) => (this.newPassword = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Confirm Password", type: "password", required: true, autocomplete: "off", value: this.confirmpass, onInput: (e) => (this.confirmpass = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), h("verdocs-button", { label: "Reset", disabled: this.submitting, onClick: () => this.handleResetPassword() })), h("div", { class: "buttons" }, h("verdocs-button", { variant: "text", label: "Resend Code", disabled: this.resendDisabled || this.submitting, onClick: () => this.handleResendReset() })))));
|
|
335
590
|
}
|
|
336
|
-
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Log in to your account"),
|
|
591
|
+
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Log in to your account"), this.renderProviderButtons(), h("form", { onSubmit: () => this.loginAndCheckVerification() }, h("verdocs-text-input", { label: "Email", autocomplete: "username", value: this.email, onInput: (e) => (this.email = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Password", type: "password", autocomplete: "current-password", value: this.password, onInput: (e) => (this.password = e.target.value), disabled: this.submitting }), h("verdocs-button", { label: "Forgot Your Password?", variant: "text", onClick: () => (this.displayMode = 'forgot'), disabled: this.submitting, style: { display: 'flex', justifyContent: 'center', margin: '0 auto 20px' } }), h("verdocs-button", { label: "Login", disabled: this.submitting, onClick: () => this.loginAndCheckVerification(), style: { display: 'flex', justifyContent: 'center', margin: '10px auto 0' } }), h("verdocs-button", { label: "Sign Up", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'signup'), style: { display: 'flex', justifyContent: 'center', margin: '10px auto 0' } }))));
|
|
337
592
|
}
|
|
593
|
+
get el() { return getElement(this); }
|
|
338
594
|
};
|
|
339
595
|
VerdocsAuth.style = verdocsAuthCss();
|
|
340
596
|
|