@verdocs/web-sdk 5.0.20 → 5.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.css +3 -0
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +2 -2
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +1 -1
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js.map +1 -1
- package/dist/components/{p-1f0f5448.js → p-bfed2f8d.js} +2 -2
- package/dist/components/{p-1f0f5448.js.map → p-bfed2f8d.js.map} +1 -1
- package/dist/components/verdocs-auth.js +1 -1
- package/dist/components/verdocs-auth.js.map +1 -1
- package/dist/components/verdocs-sign.js +3 -3
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/custom-elements.json +2156 -0
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-auth.entry.js.map +1 -1
- package/dist/esm/verdocs-kba-dialog_2.entry.js +1 -1
- package/dist/esm/verdocs-kba-dialog_2.entry.js.map +1 -1
- package/dist/esm/verdocs-sign.entry.js +2 -2
- package/dist/esm/verdocs-sign.entry.js.map +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-kba-dialog_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-kba-dialog_2.entry.js.map +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/verdocs-web-sdk/p-0bfebc86.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-0bfebc86.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-376c3d9d.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-376c3d9d.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-6b2fc4bd.system.entry.js → p-407c0725.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6b2fc4bd.system.entry.js.map → p-407c0725.system.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-ccdc9c5b.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-ccdc9c5b.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-e2b70dfb.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-c59aa521.entry.js → p-fc29a754.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-c59aa521.entry.js.map → p-fc29a754.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-fe4c5a36.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-fe4c5a36.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -1
- package/dist/verdocs-web-sdk/p-471fd78e.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-471fd78e.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-4e9e154f.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-4e9e154f.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-53ed63e9.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-53ed63e9.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-ff048639.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-ff048639.system.entry.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"file":"p-1f0f5448.js","mappings":";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ocs-view/verdocs-view.scss?tag=verdocs-view","src/components/embeds/verdocs-view/verdocs-view.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-view {\n display: flex;\n overflow: hidden;\n min-height: 600px;\n position: relative;\n align-items: center;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n\n div,\n canvas {\n box-sizing: border-box;\n }\n\n .document {\n flex: 1;\n width: 100%;\n height: 100%;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n min-height: 200px;\n max-width: 1200px;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n //justify-content: center;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .loading-indicator {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n z-index: 10000;\n position: fixed;\n background-color: rgba(0, 0, 0, 0.7);\n }\n}\n\n// Styled separately because the header is often re-parented\n#verdocs-view-header {\n width: 100%;\n color: #fff;\n display: flex;\n z-index: 1000;\n flex: 0 0 56px;\n padding: 0 20px;\n font-size: 12px;\n column-gap: 15px;\n align-items: center;\n flex-direction: row;\n transition: all 0.25s;\n background-color: $medium-bg;\n box-shadow:\n 0 4px 4px 0 rgb(0 0 0 / 24%),\n 0 0 4px 0 rgb(0 0 0 / 12%);\n\n @media all and (max-width: 500px) {\n padding: 0 10px;\n }\n\n .inner {\n width: 100%;\n display: flex;\n margin: 0 auto;\n padding: 0 20px;\n max-width: 1200px;\n align-items: center;\n flex-direction: row;\n\n @media all and (max-width: 500px) {\n padding: 0 10px;\n }\n }\n\n .logo {\n width: 80px;\n display: none;\n margin: -6px 0 0 0;\n }\n\n .title {\n font-size: 18px;\n font-weight: 500;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n}\n","import {cancelEnvelope, getDocumentDownloadLink, getEnvelope, IEnvelope, integerSequence, userCanCancelEnvelope, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Element, Event, Host, Prop, EventEmitter, Fragment, State} from '@stencil/core';\nimport {saveEnvelopesAsZip} from '../../../utils/utils';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Render the documents attached to an envelope in read-only (view) mode. All documents are\n * displayed in order.\n *\n * ```ts\n * <verdocs-view\n * envelopeId={envelopeId}\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-view',\n styleUrl: 'verdocs-view.scss',\n shadow: false,\n})\nexport class VerdocsView {\n private envelopeListenerId = null;\n\n @Element() component: HTMLElement;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint | null = null;\n\n /**\n * The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this\n * component renders, the header will be removed from its default location and placed in the target element.\n * This allows the parent application to more easily control its placement and scroll effects (e.g. \"fixed\").\n *\n * The movement of the header to the target container is not dynamic - it is performed only on the initial\n * render. Host applications should not conditionally render this container. If the header's visibility must\n * be externally controlled, use CSS display options to hide/show it instead.\n */\n @Prop() headerTargetId: string | null = null;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n /**\n * Event fired when the user clicks Send Another to proceed. It is up to the host application\n * to redirect the user to the appropriate next workflow step.\n */\n @Event({composed: true}) another: EventEmitter;\n\n /**\n * Event fired when the user clicks Send Another to proceed. It is up to the host application\n * to redirect the user to the appropriate next workflow step.\n */\n @Event({composed: true}) view: EventEmitter;\n\n /**\n * Event fired when the user clicks Done to proceed. It is up to the host application\n * to redirect the user to the appropriate next workflow step.\n */\n @Event({composed: true}) next: EventEmitter;\n @State() canceling = false;\n @State() showCancelDone = false;\n @State() showLoadError = false;\n\n @State() loading = true;\n @State() envelope: IEnvelope | null = null;\n\n async componentWillLoad() {\n if (!this.endpoint) {\n this.endpoint = VerdocsEndpoint.getDefault();\n this.endpoint.loadSession();\n }\n\n if (!this.envelopeId) {\n console.error(`[VIEW] Missing required envelopeId`);\n return;\n }\n\n this.listenToEnvelope();\n if (!this.envelope) {\n try {\n console.log('[VIEW] Loading envelope...');\n this.envelope = await getEnvelope(this.endpoint, this.envelopeId);\n console.log('[VIEW] Loaded envelope', this.envelope);\n } catch (e) {\n this.showLoadError = true;\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n }\n\n componentDidRender() {\n const headerTarget = this.headerTargetId ? document.getElementById(this.headerTargetId) : null;\n const headerEl = document.getElementById('verdocs-view-header');\n if (headerTarget && headerEl) {\n console.log('[VIEW] Moving header');\n headerEl.remove();\n headerTarget.append(headerEl);\n }\n }\n\n disconnectedCallback() {\n this.unlistenToEnvelope();\n }\n\n async listenToEnvelope() {\n console.log('[SIDEBAR] Loading envelope', this.envelopeId);\n this.unlistenToEnvelope();\n Store.subscribe(\n 'envelopes',\n this.envelopeId,\n () => getEnvelope(this.endpoint, this.envelopeId),\n false,\n (envelope: IEnvelope) => {\n this.envelope = envelope;\n this.loading = false;\n },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n handlePageRendered(_e: any) {\n // const pageInfo = e.detail as IDocumentPageInfo;\n // console.log('[VIEW] Page rendered', pageInfo);\n }\n\n async handleOptionSelected(e: any) {\n switch (e.detail.id) {\n case 'cancel':\n // TODO: Better option for inline-flow confirmation and alert dialogs.\n if (confirm('Are you sure you wish to cancel this envelope? This action cannot be undone.')) {\n this.canceling = true;\n cancelEnvelope(this.endpoint, this.envelopeId)\n .then(r => {\n this.canceling = false;\n console.log('[VIEW] Envelope canceled', r);\n return getEnvelope(this.endpoint, this.envelopeId);\n })\n .then(env => {\n console.log('[VIEW] Loaded new envelope details', env);\n this.envelope = env;\n })\n .catch(e => {\n this.canceling = false;\n console.log('[VIEW] Error canceling envelope', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n this.showCancelDone = true;\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'canceled'});\n }\n break;\n\n case 'print':\n window.print();\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'printed'});\n break;\n\n case 'download-attachments':\n // TODO: Multiple document support\n {\n const firstDoc = this.envelope.documents.find(doc => doc.type === 'attachment');\n if (firstDoc) {\n const url = await getDocumentDownloadLink(this.endpoint, this.envelopeId, firstDoc.id);\n window.open(url, '_blank');\n }\n }\n break;\n\n case 'download-certificate':\n // TODO: Multiple certificate support\n {\n const firstCert = this.envelope.documents.find(doc => doc.type === 'certificate');\n if (firstCert) {\n const url = await getDocumentDownloadLink(this.endpoint, this.envelopeId, firstCert.id);\n window.open(url, '_blank');\n }\n }\n // saveCertificate(this.endpoint, this.envelope, this.envelope.certificate_document_id)\n // .then(() => {\n // this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'downloaded'});\n // })\n // .catch(e => {\n // console.log('Error downloading PDF', e);\n // });\n break;\n\n case 'download-all':\n saveEnvelopesAsZip(this.endpoint, [this.envelope])\n .then(() => {\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'downloaded'});\n })\n .catch(e => {\n console.log('Error downloading Zip', e);\n });\n break;\n }\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (this.showLoadError) {\n return (\n <Host>\n <verdocs-ok-dialog\n heading=\"Unable to View Envelope\"\n message={`Sorry, that envelope is not valid.`}\n buttonLabel=\"OK\"\n onNext={() => {\n this.showLoadError = false;\n }}\n />\n </Host>\n );\n }\n\n if (!this.envelope) {\n return (\n <Host>\n <img\n src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n alt=\"Placeholder page\"\n />\n </Host>\n );\n }\n\n const menuOptions: any[] = [{id: 'print', label: 'Print'}];\n\n if (userCanCancelEnvelope(this.endpoint.profile, this.envelope)) {\n menuOptions.push({id: 'cancel', label: 'Cancel'});\n }\n\n // Add download options to the menu\n const hasAttachments = this.envelope.documents.length > 0;\n const normalDocCount = this.envelope.documents.filter(doc => doc.type === 'attachment').length;\n const hasCertificate = this.envelope.documents.find(doc => doc.type === 'certificate') !== undefined;\n if (hasAttachments || hasCertificate) {\n menuOptions.push({label: ''});\n if (hasAttachments) {\n menuOptions.push({id: 'download-attachments', label: normalDocCount > 1 ? 'Download Documents' : 'Download Document'});\n }\n if (hasCertificate) {\n menuOptions.push({id: 'download-certificate', label: 'Download Certificate'});\n }\n if (hasAttachments && hasCertificate) {\n menuOptions.push({id: 'download-all', label: 'Download All Files'});\n }\n }\n\n return (\n <Host>\n <div id=\"verdocs-view-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n <div style={{flex: '1'}} />\n <div style={{marginLeft: '10px'}} />\n <verdocs-dropdown options={menuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: this.headerTargetId ? '70px' : '15px'}}>\n {(this.envelope?.documents || [])\n .filter(document => document.type !== 'certificate')\n .map(envelopeDocument => {\n const pageNumbers = integerSequence(1, envelopeDocument.pages);\n\n return (\n <Fragment>\n {pageNumbers.map(pageNumber => {\n const pageSize = envelopeDocument.page_sizes?.[pageNumber] || {width: 612, height: 792};\n\n return (\n <verdocs-envelope-document-page\n envelopeId={this.envelopeId}\n documentId={envelopeDocument.id}\n endpoint={this.endpoint}\n type=\"filled\"\n virtualWidth={pageSize.width}\n virtualHeight={pageSize.height}\n pageNumber={pageNumber}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n );\n })}\n </Fragment>\n );\n })}\n </div>\n {this.showCancelDone && (\n <verdocs-ok-dialog\n heading=\"Cancelled\"\n message={`This envelope has been cancelled successfully.`}\n onNext={() => {\n this.showCancelDone = false;\n }}\n />\n )}\n {this.canceling && (\n <div class=\"loading-indicator\">\n <verdocs-loader />\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"p-bfed2f8d.js","mappings":";;;;;;;;;;;;AAAA,MAAM,cAAc,GAAG,8yEAA8yE,CAAC;AACt0E,0BAAe,cAAc;;MCqBhB,WAAW;;;;;;;;;QACd,uBAAkB,GAAG,IAAI,CAAC;wBAOS,IAAI;0BAKlB,EAAE;8BAWS,IAAI;yBA8BvB,KAAK;8BACA,KAAK;6BACN,KAAK;uBAEX,IAAI;wBACe,IAAI;;IAE1C,MAAM,iBAAiB;;QACrB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,IAAI,CAAC,QAAQ,GAAG,eAAe,CAAC,UAAU,EAAE,CAAC;YAC7C,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;SAC7B;QAED,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACpB,OAAO,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;YACpD,OAAO;SACR;QAED,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,IAAI;gBACF,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;gBAC1C,IAAI,CAAC,QAAQ,GAA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EAAE;wBACN,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAC;wBAC9B,EAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAC;qBAChC,GACD,EACF;aACH,CAAC,CACO,EACX;SACH,CAAC,CACA,EACL,IAAI,CAAC,cAAc,KAClB,yBACE,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,gDAAgD,EACzD,MAAM,EAAE;gBACN,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;aAC7B,GACD,CACH,EACA,IAAI,CAAC,SAAS,KACb,WAAK,KAAK,EAAC,mBAAmB,IAC5B,yBAAkB,CACd,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/embeds/verdocs-view/verdocs-view.scss?tag=verdocs-view","src/components/embeds/verdocs-view/verdocs-view.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-view {\n display: flex;\n overflow: hidden;\n min-height: 600px;\n position: relative;\n align-items: center;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n\n div,\n canvas {\n box-sizing: border-box;\n }\n\n .document {\n flex: 1;\n width: 100%;\n height: 100%;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n min-height: 200px;\n max-width: 1200px;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n //justify-content: center;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .loading-indicator {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n z-index: 10000;\n position: fixed;\n background-color: rgba(0, 0, 0, 0.7);\n }\n}\n\n// Styled separately because the header is often re-parented\n#verdocs-view-header {\n width: 100%;\n color: #fff;\n display: flex;\n z-index: 1000;\n flex: 0 0 56px;\n padding: 0 20px;\n font-size: 12px;\n column-gap: 15px;\n align-items: center;\n flex-direction: row;\n transition: all 0.25s;\n background-color: $medium-bg;\n box-shadow:\n 0 4px 4px 0 rgb(0 0 0 / 24%),\n 0 0 4px 0 rgb(0 0 0 / 12%);\n\n @media all and (max-width: 500px) {\n padding: 0 10px;\n }\n\n .inner {\n width: 100%;\n display: flex;\n margin: 0 auto;\n padding: 0 20px;\n max-width: 1200px;\n align-items: center;\n flex-direction: row;\n\n @media all and (max-width: 500px) {\n padding: 0 10px;\n }\n }\n\n .logo {\n width: 80px;\n display: none;\n margin: -6px 0 0 0;\n }\n\n .title {\n font-size: 18px;\n font-weight: 500;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n}\n","import {cancelEnvelope, getDocumentDownloadLink, getEnvelope, IEnvelope, integerSequence, userCanCancelEnvelope, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Element, Event, Host, Prop, EventEmitter, Fragment, State} from '@stencil/core';\nimport {saveEnvelopesAsZip} from '../../../utils/utils';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Render the documents attached to an envelope in read-only (view) mode. All documents are\n * displayed in order.\n *\n * ```ts\n * <verdocs-view\n * envelopeId={envelopeId}\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-view',\n styleUrl: 'verdocs-view.scss',\n shadow: false,\n})\nexport class VerdocsView {\n private envelopeListenerId = null;\n\n @Element() component: HTMLElement;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint | null = null;\n\n /**\n * The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this\n * component renders, the header will be removed from its default location and placed in the target element.\n * This allows the parent application to more easily control its placement and scroll effects (e.g. \"fixed\").\n *\n * The movement of the header to the target container is not dynamic - it is performed only on the initial\n * render. Host applications should not conditionally render this container. If the header's visibility must\n * be externally controlled, use CSS display options to hide/show it instead.\n */\n @Prop() headerTargetId: string | null = null;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n /**\n * Event fired when the user clicks Send Another to proceed. It is up to the host application\n * to redirect the user to the appropriate next workflow step.\n */\n @Event({composed: true}) another: EventEmitter;\n\n /**\n * Event fired when the user clicks Send Another to proceed. It is up to the host application\n * to redirect the user to the appropriate next workflow step.\n */\n @Event({composed: true}) view: EventEmitter;\n\n /**\n * Event fired when the user clicks Done to proceed. It is up to the host application\n * to redirect the user to the appropriate next workflow step.\n */\n @Event({composed: true}) next: EventEmitter;\n @State() canceling = false;\n @State() showCancelDone = false;\n @State() showLoadError = false;\n\n @State() loading = true;\n @State() envelope: IEnvelope | null = null;\n\n async componentWillLoad() {\n if (!this.endpoint) {\n this.endpoint = VerdocsEndpoint.getDefault();\n this.endpoint.loadSession();\n }\n\n if (!this.envelopeId) {\n console.error(`[VIEW] Missing required envelopeId`);\n return;\n }\n\n this.listenToEnvelope();\n if (!this.envelope) {\n try {\n console.log('[VIEW] Loading envelope...');\n this.envelope = await getEnvelope(this.endpoint, this.envelopeId);\n console.log('[VIEW] Loaded envelope', this.envelope);\n } catch (e) {\n this.showLoadError = true;\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n }\n\n componentDidRender() {\n const headerTarget = this.headerTargetId ? document.getElementById(this.headerTargetId) : null;\n const headerEl = document.getElementById('verdocs-view-header');\n if (headerTarget && headerEl) {\n console.log('[VIEW] Moving header');\n headerEl.remove();\n headerTarget.append(headerEl);\n }\n }\n\n disconnectedCallback() {\n this.unlistenToEnvelope();\n }\n\n async listenToEnvelope() {\n console.log('[SIDEBAR] Loading envelope', this.envelopeId);\n this.unlistenToEnvelope();\n Store.subscribe(\n 'envelopes',\n this.envelopeId,\n () => getEnvelope(this.endpoint, this.envelopeId),\n true,\n (envelope: IEnvelope) => {\n this.envelope = envelope;\n this.loading = false;\n },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n handlePageRendered(_e: any) {\n // const pageInfo = e.detail as IDocumentPageInfo;\n // console.log('[VIEW] Page rendered', pageInfo);\n }\n\n async handleOptionSelected(e: any) {\n switch (e.detail.id) {\n case 'cancel':\n // TODO: Better option for inline-flow confirmation and alert dialogs.\n if (confirm('Are you sure you wish to cancel this envelope? This action cannot be undone.')) {\n this.canceling = true;\n cancelEnvelope(this.endpoint, this.envelopeId)\n .then(r => {\n this.canceling = false;\n console.log('[VIEW] Envelope canceled', r);\n return getEnvelope(this.endpoint, this.envelopeId);\n })\n .then(env => {\n console.log('[VIEW] Loaded new envelope details', env);\n this.envelope = env;\n })\n .catch(e => {\n this.canceling = false;\n console.log('[VIEW] Error canceling envelope', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n this.showCancelDone = true;\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'canceled'});\n }\n break;\n\n case 'print':\n window.print();\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'printed'});\n break;\n\n case 'download-attachments':\n // TODO: Multiple document support\n {\n const firstDoc = this.envelope.documents.find(doc => doc.type === 'attachment');\n if (firstDoc) {\n const url = await getDocumentDownloadLink(this.endpoint, this.envelopeId, firstDoc.id);\n window.open(url, '_blank');\n }\n }\n break;\n\n case 'download-certificate':\n // TODO: Multiple certificate support\n {\n const firstCert = this.envelope.documents.find(doc => doc.type === 'certificate');\n if (firstCert) {\n const url = await getDocumentDownloadLink(this.endpoint, this.envelopeId, firstCert.id);\n window.open(url, '_blank');\n }\n }\n // saveCertificate(this.endpoint, this.envelope, this.envelope.certificate_document_id)\n // .then(() => {\n // this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'downloaded'});\n // })\n // .catch(e => {\n // console.log('Error downloading PDF', e);\n // });\n break;\n\n case 'download-all':\n saveEnvelopesAsZip(this.endpoint, [this.envelope])\n .then(() => {\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'downloaded'});\n })\n .catch(e => {\n console.log('Error downloading Zip', e);\n });\n break;\n }\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (this.showLoadError) {\n return (\n <Host>\n <verdocs-ok-dialog\n heading=\"Unable to View Envelope\"\n message={`Sorry, that envelope is not valid.`}\n buttonLabel=\"OK\"\n onNext={() => {\n this.showLoadError = false;\n }}\n />\n </Host>\n );\n }\n\n if (!this.envelope) {\n return (\n <Host>\n <img\n src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n alt=\"Placeholder page\"\n />\n </Host>\n );\n }\n\n const menuOptions: any[] = [{id: 'print', label: 'Print'}];\n\n if (userCanCancelEnvelope(this.endpoint.profile, this.envelope)) {\n menuOptions.push({id: 'cancel', label: 'Cancel'});\n }\n\n // Add download options to the menu\n const hasAttachments = this.envelope.documents.length > 0;\n const normalDocCount = this.envelope.documents.filter(doc => doc.type === 'attachment').length;\n const hasCertificate = this.envelope.documents.find(doc => doc.type === 'certificate') !== undefined;\n if (hasAttachments || hasCertificate) {\n menuOptions.push({label: ''});\n if (hasAttachments) {\n menuOptions.push({id: 'download-attachments', label: normalDocCount > 1 ? 'Download Documents' : 'Download Document'});\n }\n if (hasCertificate) {\n menuOptions.push({id: 'download-certificate', label: 'Download Certificate'});\n }\n if (hasAttachments && hasCertificate) {\n menuOptions.push({id: 'download-all', label: 'Download All Files'});\n }\n }\n\n return (\n <Host>\n <div id=\"verdocs-view-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n <div style={{flex: '1'}} />\n <div style={{marginLeft: '10px'}} />\n <verdocs-dropdown options={menuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: this.headerTargetId ? '70px' : '15px'}}>\n {(this.envelope?.documents || [])\n .filter(document => document.type !== 'certificate')\n .map(envelopeDocument => {\n const pageNumbers = integerSequence(1, envelopeDocument.pages);\n\n return (\n <Fragment>\n {pageNumbers.map(pageNumber => {\n const pageSize = envelopeDocument.page_sizes?.[pageNumber] || {width: 612, height: 792};\n\n return (\n <verdocs-envelope-document-page\n envelopeId={this.envelopeId}\n documentId={envelopeDocument.id}\n endpoint={this.endpoint}\n type=\"filled\"\n virtualWidth={pageSize.width}\n virtualHeight={pageSize.height}\n pageNumber={pageNumber}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n );\n })}\n </Fragment>\n );\n })}\n </div>\n {this.showCancelDone && (\n <verdocs-ok-dialog\n heading=\"Cancelled\"\n message={`This envelope has been cancelled successfully.`}\n onNext={() => {\n this.showCancelDone = false;\n }}\n />\n )}\n {this.canceling && (\n <div class=\"loading-indicator\">\n <verdocs-loader />\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
@@ -6,7 +6,7 @@ import { d as defineCustomElement$4 } from './p-0e332769.js';
|
|
6
6
|
import { d as defineCustomElement$3 } from './p-7f32e087.js';
|
7
7
|
import { d as defineCustomElement$2 } from './p-325b3828.js';
|
8
8
|
|
9
|
-
const verdocsAuthCss = "@-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-auth{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", 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:320px;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{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{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{margin:0.5em 0;font-size:14px}";
|
9
|
+
const verdocsAuthCss = "@-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-auth{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", 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:320px;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}";
|
10
10
|
const VerdocsAuthStyle0 = verdocsAuthCss;
|
11
11
|
|
12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EAEF,sBACE,KAAK,EAAC,OAAO,EACb,QAAQ,EAAE,IAAI,CAAC,UAAU,EACzB,OAAO,EAAE,MAAM,IAAI,CAAC,yBAAyB,EAAE,EAC/C,KAAK,EAAE,EAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAC,GACzE,CACG,CACH,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["VerdocsAuth"],"sources":["src/components/embeds/verdocs-auth/verdocs-auth.scss?tag=verdocs-auth","src/components/embeds/verdocs-auth/verdocs-auth.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-auth {\n font-family: $verdocs-primary-font;\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n\n .form {\n width: 320px;\n display: flex;\n padding: 20px;\n max-width: 90%;\n align-items: center;\n flex-direction: column;\n box-sizing: border-box;\n justify-content: center;\n background: $verdocs-grey-4;\n }\n\n .logo {\n width: 128px;\n max-width: 100%;\n margin: 20px 0 30px;\n }\n\n h3 {\n text-align: center;\n font-weight: 400;\n font-size: 18px;\n line-height: 1.75;\n margin: 0;\n }\n\n em {\n font-size: 14px;\n margin: 15px 0;\n }\n\n .buttons {\n gap: 20px;\n margin: 20px 0 0 0;\n display: flex;\n flex-direction: row;\n justify-content: center;\n }\n\n .status-result {\n display: none;\n\n &.debug {\n white-space: pre-wrap;\n font-size: 14px;\n background: #fff;\n padding: 10px;\n display: block;\n flex-direction: row;\n justify-content: center;\n }\n }\n\n form {\n width: 100%;\n }\n\n verdocs-text-input {\n margin-bottom: 10px;\n }\n\n .account-option {\n gap: 8px;\n margin: 20px 0 8px 0;\n display: flex;\n flex-direction: row;\n }\n\n p {\n margin: 1em 0;\n font-size: 14px;\n }\n\n // Our <p>s are in a flex layout which prevents margins from collapsing because each item creates its own row\n p + p {\n margin-top: 0;\n }\n\n verdocs-help-icon {\n margin-top: 18px;\n display: flex;\n width: 32px;\n height: 32px;\n flex: 0 0 32px;\n }\n\n .already-have {\n margin: 0.5em 0;\n font-size: 14px;\n }\n}\n","import {TSession, VerdocsEndpoint, createProfile, authenticate, resendVerification, resetPassword, verifyEmail, IAuthenticateResponse, getMyUser, IProfile} from '@verdocs/js-sdk';\nimport {Component, Prop, State, h, Event, EventEmitter} from '@stencil/core';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\n\nexport interface IAuthStatus {\n authenticated: boolean;\n session: TSession;\n profile: IProfile | null;\n}\n\n/**\n * Display an authentication dialog that allows the user to login or sign up. If the user is\n * already authenticated with a valid session, this component will hide itself and fire the\n * success callback immediately. It is up to the host application to render the next appropriate\n * view for the application.\n *\n * To simplify UI development, a visibility flag can force this component to never display. This\n * allows you to subscribe to notifications from client apps without calling the lower-level JS SDK.\n *\n * This embed is responsive / mobile-friendly, but the calling application should provide at\n * least a 300px wide container to allow sufficient space for the required forms.\n *\n * ```ts\n * interface IAuthStatus {\n * authenticated: boolean;\n * session: TSession;\n * profile: IProfile | null;\n * }\n *\n * <verdocs-auth\n * onAuthenticated={({ detail }: { detail: IAuthStatus }) => console.log('Authentication state:', detail) }\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-auth',\n styleUrl: 'verdocs-auth.scss',\n shadow: false,\n})\nexport class VerdocsAuth {\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * Normally, if the user has a valid session, this embed will be invisible, otherwise it will display\n * login / signup forms. If this is set to false, this embed will be invisible in both cases. Apps may\n * use this to verify if a user has a valid session without needing a separate call to Verdocs JS SDK.\n */\n @Prop() visible: boolean = true;\n\n /**\n * By default, a Verdocs logo will be displayed above the login/signup forms. This may be used to\n * override its source. (Alternatively, you may simply hide it via CSS overrides.) Logos should be\n * in SVG format for best results.\n */\n @Prop() logo: string = 'https://app.verdocs.com/assets/blue-logo.svg';\n\n /**\n * The display mode to start in.\n */\n @Prop({mutable: true}) displayMode: 'login' | 'forgot' | 'reset' | 'signup' | 'verify' = 'login';\n\n /**\n * Event fired when session authentication process has completed. Check the event\n * contents for completion status. This event will always be called at least once,\n * when the component is first rendered.\n */\n @Event({composed: true}) authenticated: EventEmitter<IAuthStatus>;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n @State() org_name: string = '';\n @State() first_name: string = '';\n @State() last_name: string = '';\n @State() email: string = '';\n @State() verificationCode: string = '';\n @State() newPassword: string = '';\n @State() password: string = '';\n @State() confirmpass: string = '';\n @State() submitting: boolean = false;\n @State() resendDisabled = false;\n @State() session: TSession = null;\n @State() profile: IProfile | null = null;\n\n resendDisabledTimer = null;\n\n // We can't instantly log in on the default endpoint because other listeners might see\n // its events and incorrectly trigger before we're done. So we manage our own temp\n // endpoint and pass the final tokens to the default once we're ready.\n tempAuthEndpoint = new VerdocsEndpoint({\n baseURL: VerdocsEndpoint.getDefault().getBaseURL(),\n persist: false,\n });\n\n componentWillLoad() {\n this.endpoint.loadSession();\n VerdocsEndpoint.getDefault().onSessionChanged((_endpoint, session, profile) => {\n this.session = session;\n this.profile = profile;\n if (session) {\n this.authenticated?.emit({authenticated: true, session, profile});\n } else {\n this.authenticated?.emit({authenticated: false, session, profile});\n }\n });\n }\n\n isPasswordComplex(password: string) {\n const isUppercase = (ch: string) => /[A-Z]/.test(ch);\n const isLowercase = (ch: string) => /[a-z]/.test(ch);\n const isSpecialChar = (ch: string) => /[`!@#$%^&*()_\\-+=\\[\\]{};':\"\\\\|,.<>\\/?~ ]/.test(ch);\n let countOfUpperCase = 0,\n countOfLowerCase = 0,\n countOfSpecialChar = 0;\n for (let i = 0; i < password.length; i++) {\n let ch = password.charAt(i);\n if (isUppercase(ch)) countOfUpperCase++;\n else if (isLowercase(ch)) countOfLowerCase++;\n else if (isSpecialChar(ch)) countOfSpecialChar++;\n }\n return password.length >= 8 && countOfLowerCase > 0 && countOfUpperCase > 0 && countOfSpecialChar > 0;\n }\n\n handleSignup() {\n if (!this.isPasswordComplex(this.password)) {\n VerdocsToast('Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.', {style: 'error'});\n return;\n }\n\n if (this.password !== this.confirmpass) {\n VerdocsToast('Passwords do not match.', {style: 'error'});\n return;\n }\n\n this.submitting = true;\n this.tempAuthEndpoint.clearSession();\n createProfile(this.tempAuthEndpoint, {\n email: this.email,\n password: this.password,\n first_name: this.first_name,\n last_name: this.last_name,\n org_name: this.org_name,\n })\n .then(r => {\n console.log('[AUTH] Profile creation result', r);\n this.tempAuthEndpoint.setToken(r.access_token);\n // We can't clearForms because we need email to stick around\n this.password = '';\n this.first_name = '';\n this.last_name = '';\n this.org_name = '';\n this.displayMode = 'verify';\n this.submitting = false;\n })\n .catch(e => {\n console.log('[AUTH] Signup error', e.response);\n this.submitting = false;\n this.authenticated?.emit({authenticated: false, profile: null, session: null});\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n\n VerdocsToast('Signup failed: ' + e.response?.data?.error || 'Unknown Error', {style: 'error'});\n });\n }\n\n async handleVerification() {\n this.submitting = true;\n\n try {\n this.submitting = false;\n const verificationResult = await verifyEmail(this.tempAuthEndpoint, {email: this.email, token: this.verificationCode});\n VerdocsToast('Thank you for verifying your email address.', {style: 'success'});\n this.completeLogin(verificationResult);\n } catch (e) {\n this.submitting = false;\n console.log('Verification error', e);\n VerdocsToast('Verification error, please check the code and try again.');\n }\n }\n\n completeLogin(result: IAuthenticateResponse) {\n this.clearForms();\n this.tempAuthEndpoint.clearSession();\n this.endpoint.setToken(result.access_token);\n }\n\n async loginAndCheckVerification() {\n if (this.submitting) {\n return;\n }\n\n this.submitting = true;\n this.tempAuthEndpoint.clearSession();\n\n try {\n this.submitting = false;\n const authResult = await authenticate(this.tempAuthEndpoint, {username: this.email, password: this.password, grant_type: 'password'});\n console.log('[AUTH] Authenticated, checking email verification');\n this.tempAuthEndpoint.setToken(authResult.access_token);\n\n const user = await getMyUser(this.tempAuthEndpoint);\n console.log('Got user', user);\n\n if (!user.email_verified) {\n console.log('[AUTH] Logged in, pending email address verification');\n this.displayMode = 'verify';\n } else {\n console.log('[AUTH] Email address is verified, completing login');\n this.completeLogin(authResult);\n }\n } catch (e) {\n this.submitting = false;\n console.log('[AUTH] Auth failure', e.response?.data || e);\n VerdocsToast('Login failed. Please check your credentials and try again.', {style: 'error'});\n }\n }\n\n clearForms() {\n this.submitting = false;\n this.resendDisabled = false;\n this.email = '';\n this.password = '';\n this.newPassword = '';\n this.confirmpass = '';\n this.verificationCode = '';\n this.first_name = '';\n this.last_name = '';\n this.org_name = '';\n }\n\n handleLogout() {\n console.log('logging out');\n this.endpoint.clearSession();\n this.tempAuthEndpoint.clearSession();\n this.clearForms();\n this.displayMode = 'login';\n }\n\n handleResendVerification() {\n // Avoid the user just click-spamming this pathway. The server rate-limits this anyway so it's not a\n // security issue but it's a poor user experience to allow it.\n this.resendDisabled = true;\n this.resendDisabledTimer = setTimeout(() => {\n this.resendDisabled = false;\n this.resendDisabledTimer = null;\n }, 30000);\n\n resendVerification(this.tempAuthEndpoint)\n .then(r => {\n console.log('[AUTH] Verification request resent', r);\n VerdocsToast('Please check your email for a verification code.', {style: 'info'});\n })\n .catch((e: any) => {\n console.log('[AUTH] Unable to resend verification', e);\n VerdocsToast('Unable to resend code. Please try again later.', {style: 'error'});\n });\n }\n\n handleResendReset() {\n // Avoid the user just click-spamming this pathway. The server rate-limits this anyway so it's not a\n // security issue but it's a poor user experience to allow it.\n this.resendDisabled = true;\n this.resendDisabledTimer = setTimeout(() => {\n this.resendDisabled = false;\n this.resendDisabledTimer = null;\n }, 30000);\n\n resetPassword(this.tempAuthEndpoint, {email: this.email})\n .then(r => {\n console.log('[AUTH] Resend-code request resent', r);\n VerdocsToast('Please check your email again for a verification code.', {style: 'info'});\n })\n .catch((e: any) => {\n console.log('[AUTH] Unable to resend reset request', e);\n VerdocsToast('Unable to resend code. Please try again later.', {style: 'error'});\n });\n }\n\n async handleResetGetCode() {\n this.submitting = true;\n this.confirmpass = '';\n this.newPassword = '';\n\n try {\n this.submitting = false;\n const result = await resetPassword(this.endpoint, {email: this.email});\n console.log('[AUTH] Reset result', result);\n VerdocsToast('Please check your email inbox for a password reset code.', {style: 'success'});\n this.verificationCode = '';\n this.confirmpass = '';\n this.newPassword = '';\n this.displayMode = 'reset';\n } catch (e) {\n this.submitting = false;\n console.log('Reset request error', e);\n VerdocsToast('Request failed. Please check your email address and try again.');\n }\n }\n\n async handleResetPassword() {\n if (!this.isPasswordComplex(this.newPassword)) {\n VerdocsToast('Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.', {style: 'error'});\n return;\n }\n\n if (this.newPassword !== this.confirmpass) {\n VerdocsToast('Passwords do not match.', {style: 'error'});\n return;\n }\n\n this.submitting = true;\n try {\n this.submitting = false;\n const resetResult = await resetPassword(this.endpoint, {email: this.email, code: this.verificationCode, new_password: this.newPassword});\n console.log('reset result', resetResult);\n VerdocsToast('Your password has been reset. You may now use your new password to login.', {style: 'success'});\n this.verificationCode = '';\n this.confirmpass = '';\n this.newPassword = '';\n this.password = '';\n this.displayMode = 'login';\n } catch (e) {\n this.submitting = false;\n console.log('Verification error', e);\n VerdocsToast('Verification error, please check the code and try again.');\n }\n }\n\n async handleReset() {\n this.submitting = true;\n\n try {\n const result = await resetPassword(this.endpoint, {email: this.email});\n console.log('[AUTH] Reset sent', result);\n this.submitting = false;\n this.displayMode = 'login';\n VerdocsToast('If your email address is registered, you will receive instructions on resetting your password shortly.', {style: 'info'});\n } catch (e) {\n console.log('[AUTH] Unable to reset password', e);\n this.submitting = false;\n VerdocsToast('Unable to reset password. Please check your email address and try again.', {style: 'error'});\n }\n }\n\n render() {\n if (!this.visible) {\n return <div style={{display: 'none'}}>Authenticated</div>;\n }\n\n if (this.session) {\n return (\n <verdocs-button\n label=\"Sign Out\"\n disabled={this.submitting}\n onClick={() => this.handleLogout()}\n style={{display: 'flex', justifyContent: 'center', margin: '30px auto 0'}}\n />\n );\n }\n\n if (this.displayMode === 'signup') {\n const invalid = this.submitting || !this.first_name || !this.last_name || !this.email || !this.password || !this.confirmpass || !this.org_name;\n\n return (\n <div class=\"form\">\n <a href=\"https://verdocs.com/en/\">\n <img src={this.logo} alt=\"Verdocs Logo\" class=\"logo\" />\n </a>\n\n <h3>Sign up for a free account</h3>\n <div class=\"already-have\">\n Already have an account?\n <verdocs-button label=\"Log In\" variant=\"text\" onClick={() => (this.displayMode = 'login')} disabled={this.submitting} />\n </div>\n\n <form onSubmit={() => this.handleSignup()}>\n <div style={{display: 'flex', flexDirection: 'row', columnGap: '20px'}}>\n <verdocs-text-input\n label=\"First Name\"\n autocomplete=\"first\"\n required={true}\n value={this.first_name}\n onInput={(e: any) => (this.first_name = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Last Name\"\n autocomplete=\"last\"\n required={true}\n value={this.last_name}\n onInput={(e: any) => (this.last_name = e.target.value)}\n disabled={this.submitting}\n />\n </div>\n <verdocs-text-input\n label=\"Email Address\"\n autocomplete=\"email\"\n required={true}\n value={this.email}\n onInput={(e: any) => (this.email = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Password\"\n type=\"password\"\n required={true}\n autocomplete=\"new-password\"\n value={this.password}\n onInput={(e: any) => (this.password = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Confirm Password\"\n type=\"password\"\n required={true}\n autocomplete=\"off\"\n value={this.confirmpass}\n onInput={(e: any) => (this.confirmpass = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Organization Name\"\n autocomplete=\"org\"\n required={true}\n value={this.org_name}\n onInput={(e: any) => (this.org_name = e.target.value)}\n disabled={this.submitting}\n style={{flex: '1'}}\n />\n\n <div style={{marginTop: '30px'}} />\n\n <verdocs-button\n label=\"Next\"\n disabled={invalid}\n onClick={invalid ? () => {} : () => this.handleSignup()}\n style={{display: 'flex', justifyContent: 'center', margin: '30px auto 0'}}\n />\n </form>\n </div>\n );\n }\n\n if (this.displayMode === 'verify') {\n return (\n <div class=\"form\">\n <form onSubmit={() => this.handleVerification()}>\n <p>Please check your e-mail inbox for a verification code and enter it below.</p>\n\n <verdocs-text-input\n label=\"Verification Code\"\n required={true}\n value={this.verificationCode}\n onInput={(e: any) => (this.verificationCode = e.target.value)}\n disabled={this.submitting}\n />\n\n <div class=\"buttons\">\n <verdocs-button label=\"Sign Out\" variant=\"outline\" disabled={this.submitting} onClick={() => this.handleLogout()} />\n <verdocs-button label=\"Verify\" disabled={this.submitting || !this.verificationCode || this.verificationCode.length !== 6} onClick={() => this.handleVerification()} />\n </div>\n <div class=\"buttons\">\n <verdocs-button variant=\"text\" label=\"Resend Code\" disabled={this.resendDisabled || this.submitting} onClick={() => this.handleResendVerification()} />\n </div>\n </form>\n </div>\n );\n }\n\n if (this.displayMode === 'forgot') {\n return (\n <div class=\"form\">\n <a href=\"https://verdocs.com/en/\">\n <img src={this.logo} alt=\"Verdocs Logo\" class=\"logo\" />\n </a>\n\n <h3>Forgot your password?</h3>\n\n <p>\n Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check\n your spam folder if you do not receive the message.\n </p>\n\n <form onSubmit={() => this.handleResetGetCode()}>\n <verdocs-text-input\n label=\"Email Address\"\n autocomplete=\"email\"\n required={true}\n value={this.email}\n onInput={(e: any) => (this.email = e.target.value)}\n disabled={this.submitting}\n />\n\n <div style={{marginTop: '30px'}} />\n\n <div class=\"buttons\">\n <verdocs-button size=\"small\" label=\"Cancel\" variant=\"outline\" disabled={this.submitting} onClick={() => (this.displayMode = 'login')} />\n <verdocs-button size=\"small\" label=\"Request Code\" disabled={this.submitting} onClick={() => this.handleResetGetCode()} />\n </div>\n </form>\n </div>\n );\n }\n\n if (this.displayMode === 'reset') {\n return (\n <div class=\"form\">\n <a href=\"https://verdocs.com/en/\">\n <img src={this.logo} alt=\"Verdocs Logo\" class=\"logo\" />\n </a>\n\n <h3>Forgot your password?</h3>\n\n <p>\n 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\n receive the message.\n </p>\n\n <form onSubmit={() => this.handleResetPassword()}>\n <verdocs-text-input\n label=\"Verification Code\"\n required={true}\n value={this.verificationCode}\n onInput={(e: any) => (this.verificationCode = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Password\"\n type=\"password\"\n required={true}\n autocomplete=\"off\"\n value={this.newPassword}\n onInput={(e: any) => (this.newPassword = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Confirm Password\"\n type=\"password\"\n required={true}\n autocomplete=\"off\"\n value={this.confirmpass}\n onInput={(e: any) => (this.confirmpass = e.target.value)}\n disabled={this.submitting}\n />\n\n <div style={{marginTop: '30px'}} />\n\n <div class=\"buttons\">\n <verdocs-button label=\"Cancel\" variant=\"outline\" disabled={this.submitting} onClick={() => (this.displayMode = 'login')} />\n <verdocs-button label=\"Reset\" disabled={this.submitting} onClick={() => this.handleResetPassword()} />\n </div>\n\n <div class=\"buttons\">\n <verdocs-button variant=\"text\" label=\"Resend Code\" disabled={this.resendDisabled || this.submitting} onClick={() => this.handleResendReset()} />\n </div>\n </form>\n </div>\n );\n }\n\n return (\n <div class=\"form\">\n <a href=\"https://verdocs.com/en/\">\n <img src={this.logo} alt=\"Verdocs Logo\" class=\"logo\" />\n </a>\n\n <h3>Log in to your account</h3>\n <div class=\"already-have\">\n Don't have an account?\n <verdocs-button label=\"Sign Up\" variant=\"text\" onClick={() => (this.displayMode = 'signup')} disabled={this.submitting} />\n </div>\n\n <form onSubmit={() => this.loginAndCheckVerification()}>\n <verdocs-text-input label=\"Email\" autocomplete=\"username\" value={this.email} onInput={(e: any) => (this.email = e.target.value)} disabled={this.submitting} />\n <verdocs-text-input\n label=\"Password\"\n type=\"password\"\n autocomplete=\"current-password\"\n value={this.password}\n onInput={(e: any) => (this.password = e.target.value)}\n disabled={this.submitting}\n />\n\n <verdocs-button\n label=\"Forgot Your Password?\"\n variant=\"text\"\n onClick={() => (this.displayMode = 'forgot')}\n disabled={this.submitting}\n style={{display: 'flex', justifyContent: 'center', margin: '10px auto 20px'}}\n />\n\n <verdocs-button\n label=\"Login\"\n disabled={this.submitting}\n onClick={() => this.loginAndCheckVerification()}\n style={{display: 'flex', justifyContent: 'center', margin: '10px auto 0'}}\n />\n </form>\n </div>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"verdocs-auth.js","mappings":";;;;;;;;AAAA,MAAM,cAAc,GAAG,29DAA29D,CAAC;AACn/D,0BAAe,cAAc;;MCwChBA,aAAW;;;;;;QAmDtB,wBAAmB,GAAG,IAAI,CAAC;;;;QAK3B,qBAAgB,GAAG,IAAI,eAAe,CAAC;YACrC,OAAO,EAAE,eAAe,CAAC,UAAU,EAAE,CAAC,UAAU,EAAE;YAClD,OAAO,EAAE,KAAK;SACf,CAAC,CAAC;wBAvDiC,eAAe,CAAC,UAAU,EAAE;uBAOrC,IAAI;oBAOR,8CAA8C;2BAKoB,OAAO;wBAepE,EAAE;0BACA,EAAE;yBACH,EAAE;qBACN,EAAE;gCACS,EAAE;2BACP,EAAE;wBACL,EAAE;2BACC,EAAE;0BACF,KAAK;8BACV,KAAK;uBACF,IAAI;uBACG,IAAI;;IAYxC,iBAAiB;QACf,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;QAC5B,eAAe,CAAC,UAAU,EAAE,CAAC,gBAAgB,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO;;YACxE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IAAI,OAAO,EAAE;gBACX,MAAA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GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACrD,QAAQ,EAAE,IAAI,CAAC,UAAU,GACzB,EAEF,sBACE,KAAK,EAAC,uBAAuB,EAC7B,OAAO,EAAC,MAAM,EACd,OAAO,EAAE,OAAO,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,EAC5C,QAAQ,EAAE,IAAI,CAAC,UAAU,EACzB,KAAK,EAAE,EAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAC,GAC5E,EAEF,sBACE,KAAK,EAAC,OAAO,EACb,QAAQ,EAAE,IAAI,CAAC,UAAU,EACzB,OAAO,EAAE,MAAM,IAAI,CAAC,yBAAyB,EAAE,EAC/C,KAAK,EAAE,EAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAC,GACzE,CACG,CACH,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["VerdocsAuth"],"sources":["src/components/embeds/verdocs-auth/verdocs-auth.scss?tag=verdocs-auth","src/components/embeds/verdocs-auth/verdocs-auth.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-auth {\n font-family: $verdocs-primary-font;\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n\n .form {\n width: 320px;\n display: flex;\n padding: 20px;\n max-width: 90%;\n align-items: center;\n flex-direction: column;\n box-sizing: border-box;\n justify-content: center;\n background: $verdocs-grey-4;\n }\n\n .logo {\n width: 128px;\n max-width: 100%;\n margin: 20px 0 30px;\n }\n\n h3 {\n color: $verdocs-grey-0;\n text-align: center;\n font-weight: 400;\n font-size: 18px;\n line-height: 1.75;\n margin: 0;\n }\n\n em {\n font-size: 14px;\n margin: 15px 0;\n }\n\n .buttons {\n gap: 20px;\n margin: 20px 0 0 0;\n display: flex;\n flex-direction: row;\n justify-content: center;\n }\n\n .status-result {\n display: none;\n\n &.debug {\n white-space: pre-wrap;\n font-size: 14px;\n background: #fff;\n padding: 10px;\n display: block;\n flex-direction: row;\n justify-content: center;\n }\n }\n\n form {\n width: 100%;\n }\n\n verdocs-text-input {\n margin-bottom: 10px;\n }\n\n .account-option {\n gap: 8px;\n margin: 20px 0 8px 0;\n display: flex;\n flex-direction: row;\n }\n\n p {\n color: $verdocs-grey-0;\n margin: 1em 0;\n font-size: 14px;\n }\n\n // Our <p>s are in a flex layout which prevents margins from collapsing because each item creates its own row\n p + p {\n margin-top: 0;\n }\n\n verdocs-help-icon {\n margin-top: 18px;\n display: flex;\n width: 32px;\n height: 32px;\n flex: 0 0 32px;\n }\n\n .already-have {\n color: $verdocs-grey-0;\n margin: 0.5em 0;\n font-size: 14px;\n }\n}\n","import {TSession, VerdocsEndpoint, createProfile, authenticate, resendVerification, resetPassword, verifyEmail, IAuthenticateResponse, getMyUser, IProfile} from '@verdocs/js-sdk';\nimport {Component, Prop, State, h, Event, EventEmitter} from '@stencil/core';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\n\nexport interface IAuthStatus {\n authenticated: boolean;\n session: TSession;\n profile: IProfile | null;\n}\n\n/**\n * Display an authentication dialog that allows the user to login or sign up. If the user is\n * already authenticated with a valid session, this component will hide itself and fire the\n * success callback immediately. It is up to the host application to render the next appropriate\n * view for the application.\n *\n * To simplify UI development, a visibility flag can force this component to never display. This\n * allows you to subscribe to notifications from client apps without calling the lower-level JS SDK.\n *\n * This embed is responsive / mobile-friendly, but the calling application should provide at\n * least a 300px wide container to allow sufficient space for the required forms.\n *\n * ```ts\n * interface IAuthStatus {\n * authenticated: boolean;\n * session: TSession;\n * profile: IProfile | null;\n * }\n *\n * <verdocs-auth\n * onAuthenticated={({ detail }: { detail: IAuthStatus }) => console.log('Authentication state:', detail) }\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-auth',\n styleUrl: 'verdocs-auth.scss',\n shadow: false,\n})\nexport class VerdocsAuth {\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * Normally, if the user has a valid session, this embed will be invisible, otherwise it will display\n * login / signup forms. If this is set to false, this embed will be invisible in both cases. Apps may\n * use this to verify if a user has a valid session without needing a separate call to Verdocs JS SDK.\n */\n @Prop() visible: boolean = true;\n\n /**\n * By default, a Verdocs logo will be displayed above the login/signup forms. This may be used to\n * override its source. (Alternatively, you may simply hide it via CSS overrides.) Logos should be\n * in SVG format for best results.\n */\n @Prop() logo: string = 'https://app.verdocs.com/assets/blue-logo.svg';\n\n /**\n * The display mode to start in.\n */\n @Prop({mutable: true}) displayMode: 'login' | 'forgot' | 'reset' | 'signup' | 'verify' = 'login';\n\n /**\n * Event fired when session authentication process has completed. Check the event\n * contents for completion status. This event will always be called at least once,\n * when the component is first rendered.\n */\n @Event({composed: true}) authenticated: EventEmitter<IAuthStatus>;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n @State() org_name: string = '';\n @State() first_name: string = '';\n @State() last_name: string = '';\n @State() email: string = '';\n @State() verificationCode: string = '';\n @State() newPassword: string = '';\n @State() password: string = '';\n @State() confirmpass: string = '';\n @State() submitting: boolean = false;\n @State() resendDisabled = false;\n @State() session: TSession = null;\n @State() profile: IProfile | null = null;\n\n resendDisabledTimer = null;\n\n // We can't instantly log in on the default endpoint because other listeners might see\n // its events and incorrectly trigger before we're done. So we manage our own temp\n // endpoint and pass the final tokens to the default once we're ready.\n tempAuthEndpoint = new VerdocsEndpoint({\n baseURL: VerdocsEndpoint.getDefault().getBaseURL(),\n persist: false,\n });\n\n componentWillLoad() {\n this.endpoint.loadSession();\n VerdocsEndpoint.getDefault().onSessionChanged((_endpoint, session, profile) => {\n this.session = session;\n this.profile = profile;\n if (session) {\n this.authenticated?.emit({authenticated: true, session, profile});\n } else {\n this.authenticated?.emit({authenticated: false, session, profile});\n }\n });\n }\n\n isPasswordComplex(password: string) {\n const isUppercase = (ch: string) => /[A-Z]/.test(ch);\n const isLowercase = (ch: string) => /[a-z]/.test(ch);\n const isSpecialChar = (ch: string) => /[`!@#$%^&*()_\\-+=\\[\\]{};':\"\\\\|,.<>\\/?~ ]/.test(ch);\n let countOfUpperCase = 0,\n countOfLowerCase = 0,\n countOfSpecialChar = 0;\n for (let i = 0; i < password.length; i++) {\n let ch = password.charAt(i);\n if (isUppercase(ch)) countOfUpperCase++;\n else if (isLowercase(ch)) countOfLowerCase++;\n else if (isSpecialChar(ch)) countOfSpecialChar++;\n }\n return password.length >= 8 && countOfLowerCase > 0 && countOfUpperCase > 0 && countOfSpecialChar > 0;\n }\n\n handleSignup() {\n if (!this.isPasswordComplex(this.password)) {\n VerdocsToast('Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.', {style: 'error'});\n return;\n }\n\n if (this.password !== this.confirmpass) {\n VerdocsToast('Passwords do not match.', {style: 'error'});\n return;\n }\n\n this.submitting = true;\n this.tempAuthEndpoint.clearSession();\n createProfile(this.tempAuthEndpoint, {\n email: this.email,\n password: this.password,\n first_name: this.first_name,\n last_name: this.last_name,\n org_name: this.org_name,\n })\n .then(r => {\n console.log('[AUTH] Profile creation result', r);\n this.tempAuthEndpoint.setToken(r.access_token);\n // We can't clearForms because we need email to stick around\n this.password = '';\n this.first_name = '';\n this.last_name = '';\n this.org_name = '';\n this.displayMode = 'verify';\n this.submitting = false;\n })\n .catch(e => {\n console.log('[AUTH] Signup error', e.response);\n this.submitting = false;\n this.authenticated?.emit({authenticated: false, profile: null, session: null});\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n\n VerdocsToast('Signup failed: ' + e.response?.data?.error || 'Unknown Error', {style: 'error'});\n });\n }\n\n async handleVerification() {\n this.submitting = true;\n\n try {\n this.submitting = false;\n const verificationResult = await verifyEmail(this.tempAuthEndpoint, {email: this.email, token: this.verificationCode});\n VerdocsToast('Thank you for verifying your email address.', {style: 'success'});\n this.completeLogin(verificationResult);\n } catch (e) {\n this.submitting = false;\n console.log('Verification error', e);\n VerdocsToast('Verification error, please check the code and try again.');\n }\n }\n\n completeLogin(result: IAuthenticateResponse) {\n this.clearForms();\n this.tempAuthEndpoint.clearSession();\n this.endpoint.setToken(result.access_token);\n }\n\n async loginAndCheckVerification() {\n if (this.submitting) {\n return;\n }\n\n this.submitting = true;\n this.tempAuthEndpoint.clearSession();\n\n try {\n this.submitting = false;\n const authResult = await authenticate(this.tempAuthEndpoint, {username: this.email, password: this.password, grant_type: 'password'});\n console.log('[AUTH] Authenticated, checking email verification');\n this.tempAuthEndpoint.setToken(authResult.access_token);\n\n const user = await getMyUser(this.tempAuthEndpoint);\n console.log('Got user', user);\n\n if (!user.email_verified) {\n console.log('[AUTH] Logged in, pending email address verification');\n this.displayMode = 'verify';\n } else {\n console.log('[AUTH] Email address is verified, completing login');\n this.completeLogin(authResult);\n }\n } catch (e) {\n this.submitting = false;\n console.log('[AUTH] Auth failure', e.response?.data || e);\n VerdocsToast('Login failed. Please check your credentials and try again.', {style: 'error'});\n }\n }\n\n clearForms() {\n this.submitting = false;\n this.resendDisabled = false;\n this.email = '';\n this.password = '';\n this.newPassword = '';\n this.confirmpass = '';\n this.verificationCode = '';\n this.first_name = '';\n this.last_name = '';\n this.org_name = '';\n }\n\n handleLogout() {\n console.log('logging out');\n this.endpoint.clearSession();\n this.tempAuthEndpoint.clearSession();\n this.clearForms();\n this.displayMode = 'login';\n }\n\n handleResendVerification() {\n // Avoid the user just click-spamming this pathway. The server rate-limits this anyway so it's not a\n // security issue but it's a poor user experience to allow it.\n this.resendDisabled = true;\n this.resendDisabledTimer = setTimeout(() => {\n this.resendDisabled = false;\n this.resendDisabledTimer = null;\n }, 30000);\n\n resendVerification(this.tempAuthEndpoint)\n .then(r => {\n console.log('[AUTH] Verification request resent', r);\n VerdocsToast('Please check your email for a verification code.', {style: 'info'});\n })\n .catch((e: any) => {\n console.log('[AUTH] Unable to resend verification', e);\n VerdocsToast('Unable to resend code. Please try again later.', {style: 'error'});\n });\n }\n\n handleResendReset() {\n // Avoid the user just click-spamming this pathway. The server rate-limits this anyway so it's not a\n // security issue but it's a poor user experience to allow it.\n this.resendDisabled = true;\n this.resendDisabledTimer = setTimeout(() => {\n this.resendDisabled = false;\n this.resendDisabledTimer = null;\n }, 30000);\n\n resetPassword(this.tempAuthEndpoint, {email: this.email})\n .then(r => {\n console.log('[AUTH] Resend-code request resent', r);\n VerdocsToast('Please check your email again for a verification code.', {style: 'info'});\n })\n .catch((e: any) => {\n console.log('[AUTH] Unable to resend reset request', e);\n VerdocsToast('Unable to resend code. Please try again later.', {style: 'error'});\n });\n }\n\n async handleResetGetCode() {\n this.submitting = true;\n this.confirmpass = '';\n this.newPassword = '';\n\n try {\n this.submitting = false;\n const result = await resetPassword(this.endpoint, {email: this.email});\n console.log('[AUTH] Reset result', result);\n VerdocsToast('Please check your email inbox for a password reset code.', {style: 'success'});\n this.verificationCode = '';\n this.confirmpass = '';\n this.newPassword = '';\n this.displayMode = 'reset';\n } catch (e) {\n this.submitting = false;\n console.log('Reset request error', e);\n VerdocsToast('Request failed. Please check your email address and try again.');\n }\n }\n\n async handleResetPassword() {\n if (!this.isPasswordComplex(this.newPassword)) {\n VerdocsToast('Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.', {style: 'error'});\n return;\n }\n\n if (this.newPassword !== this.confirmpass) {\n VerdocsToast('Passwords do not match.', {style: 'error'});\n return;\n }\n\n this.submitting = true;\n try {\n this.submitting = false;\n const resetResult = await resetPassword(this.endpoint, {email: this.email, code: this.verificationCode, new_password: this.newPassword});\n console.log('reset result', resetResult);\n VerdocsToast('Your password has been reset. You may now use your new password to login.', {style: 'success'});\n this.verificationCode = '';\n this.confirmpass = '';\n this.newPassword = '';\n this.password = '';\n this.displayMode = 'login';\n } catch (e) {\n this.submitting = false;\n console.log('Verification error', e);\n VerdocsToast('Verification error, please check the code and try again.');\n }\n }\n\n async handleReset() {\n this.submitting = true;\n\n try {\n const result = await resetPassword(this.endpoint, {email: this.email});\n console.log('[AUTH] Reset sent', result);\n this.submitting = false;\n this.displayMode = 'login';\n VerdocsToast('If your email address is registered, you will receive instructions on resetting your password shortly.', {style: 'info'});\n } catch (e) {\n console.log('[AUTH] Unable to reset password', e);\n this.submitting = false;\n VerdocsToast('Unable to reset password. Please check your email address and try again.', {style: 'error'});\n }\n }\n\n render() {\n if (!this.visible) {\n return <div style={{display: 'none'}}>Authenticated</div>;\n }\n\n if (this.session) {\n return (\n <verdocs-button\n label=\"Sign Out\"\n disabled={this.submitting}\n onClick={() => this.handleLogout()}\n style={{display: 'flex', justifyContent: 'center', margin: '30px auto 0'}}\n />\n );\n }\n\n if (this.displayMode === 'signup') {\n const invalid = this.submitting || !this.first_name || !this.last_name || !this.email || !this.password || !this.confirmpass || !this.org_name;\n\n return (\n <div class=\"form\">\n <a href=\"https://verdocs.com/en/\">\n <img src={this.logo} alt=\"Verdocs Logo\" class=\"logo\" />\n </a>\n\n <h3>Sign up for a free account</h3>\n <div class=\"already-have\">\n Already have an account?\n <verdocs-button label=\"Log In\" variant=\"text\" onClick={() => (this.displayMode = 'login')} disabled={this.submitting} />\n </div>\n\n <form onSubmit={() => this.handleSignup()}>\n <div style={{display: 'flex', flexDirection: 'row', columnGap: '20px'}}>\n <verdocs-text-input\n label=\"First Name\"\n autocomplete=\"first\"\n required={true}\n value={this.first_name}\n onInput={(e: any) => (this.first_name = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Last Name\"\n autocomplete=\"last\"\n required={true}\n value={this.last_name}\n onInput={(e: any) => (this.last_name = e.target.value)}\n disabled={this.submitting}\n />\n </div>\n <verdocs-text-input\n label=\"Email Address\"\n autocomplete=\"email\"\n required={true}\n value={this.email}\n onInput={(e: any) => (this.email = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Password\"\n type=\"password\"\n required={true}\n autocomplete=\"new-password\"\n value={this.password}\n onInput={(e: any) => (this.password = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Confirm Password\"\n type=\"password\"\n required={true}\n autocomplete=\"off\"\n value={this.confirmpass}\n onInput={(e: any) => (this.confirmpass = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Organization Name\"\n autocomplete=\"org\"\n required={true}\n value={this.org_name}\n onInput={(e: any) => (this.org_name = e.target.value)}\n disabled={this.submitting}\n style={{flex: '1'}}\n />\n\n <div style={{marginTop: '30px'}} />\n\n <verdocs-button\n label=\"Next\"\n disabled={invalid}\n onClick={invalid ? () => {} : () => this.handleSignup()}\n style={{display: 'flex', justifyContent: 'center', margin: '30px auto 0'}}\n />\n </form>\n </div>\n );\n }\n\n if (this.displayMode === 'verify') {\n return (\n <div class=\"form\">\n <form onSubmit={() => this.handleVerification()}>\n <p>Please check your e-mail inbox for a verification code and enter it below.</p>\n\n <verdocs-text-input\n label=\"Verification Code\"\n required={true}\n value={this.verificationCode}\n onInput={(e: any) => (this.verificationCode = e.target.value)}\n disabled={this.submitting}\n />\n\n <div class=\"buttons\">\n <verdocs-button label=\"Sign Out\" variant=\"outline\" disabled={this.submitting} onClick={() => this.handleLogout()} />\n <verdocs-button label=\"Verify\" disabled={this.submitting || !this.verificationCode || this.verificationCode.length !== 6} onClick={() => this.handleVerification()} />\n </div>\n <div class=\"buttons\">\n <verdocs-button variant=\"text\" label=\"Resend Code\" disabled={this.resendDisabled || this.submitting} onClick={() => this.handleResendVerification()} />\n </div>\n </form>\n </div>\n );\n }\n\n if (this.displayMode === 'forgot') {\n return (\n <div class=\"form\">\n <a href=\"https://verdocs.com/en/\">\n <img src={this.logo} alt=\"Verdocs Logo\" class=\"logo\" />\n </a>\n\n <h3>Forgot your password?</h3>\n\n <p>\n Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check\n your spam folder if you do not receive the message.\n </p>\n\n <form onSubmit={() => this.handleResetGetCode()}>\n <verdocs-text-input\n label=\"Email Address\"\n autocomplete=\"email\"\n required={true}\n value={this.email}\n onInput={(e: any) => (this.email = e.target.value)}\n disabled={this.submitting}\n />\n\n <div style={{marginTop: '30px'}} />\n\n <div class=\"buttons\">\n <verdocs-button size=\"small\" label=\"Cancel\" variant=\"outline\" disabled={this.submitting} onClick={() => (this.displayMode = 'login')} />\n <verdocs-button size=\"small\" label=\"Request Code\" disabled={this.submitting} onClick={() => this.handleResetGetCode()} />\n </div>\n </form>\n </div>\n );\n }\n\n if (this.displayMode === 'reset') {\n return (\n <div class=\"form\">\n <a href=\"https://verdocs.com/en/\">\n <img src={this.logo} alt=\"Verdocs Logo\" class=\"logo\" />\n </a>\n\n <h3>Forgot your password?</h3>\n\n <p>\n 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\n receive the message.\n </p>\n\n <form onSubmit={() => this.handleResetPassword()}>\n <verdocs-text-input\n label=\"Verification Code\"\n required={true}\n value={this.verificationCode}\n onInput={(e: any) => (this.verificationCode = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Password\"\n type=\"password\"\n required={true}\n autocomplete=\"off\"\n value={this.newPassword}\n onInput={(e: any) => (this.newPassword = e.target.value)}\n disabled={this.submitting}\n />\n <verdocs-text-input\n label=\"Confirm Password\"\n type=\"password\"\n required={true}\n autocomplete=\"off\"\n value={this.confirmpass}\n onInput={(e: any) => (this.confirmpass = e.target.value)}\n disabled={this.submitting}\n />\n\n <div style={{marginTop: '30px'}} />\n\n <div class=\"buttons\">\n <verdocs-button label=\"Cancel\" variant=\"outline\" disabled={this.submitting} onClick={() => (this.displayMode = 'login')} />\n <verdocs-button label=\"Reset\" disabled={this.submitting} onClick={() => this.handleResetPassword()} />\n </div>\n\n <div class=\"buttons\">\n <verdocs-button variant=\"text\" label=\"Resend Code\" disabled={this.resendDisabled || this.submitting} onClick={() => this.handleResendReset()} />\n </div>\n </form>\n </div>\n );\n }\n\n return (\n <div class=\"form\">\n <a href=\"https://verdocs.com/en/\">\n <img src={this.logo} alt=\"Verdocs Logo\" class=\"logo\" />\n </a>\n\n <h3>Log in to your account</h3>\n <div class=\"already-have\">\n Don't have an account?\n <verdocs-button label=\"Sign Up\" variant=\"text\" onClick={() => (this.displayMode = 'signup')} disabled={this.submitting} />\n </div>\n\n <form onSubmit={() => this.loginAndCheckVerification()}>\n <verdocs-text-input label=\"Email\" autocomplete=\"username\" value={this.email} onInput={(e: any) => (this.email = e.target.value)} disabled={this.submitting} />\n <verdocs-text-input\n label=\"Password\"\n type=\"password\"\n autocomplete=\"current-password\"\n value={this.password}\n onInput={(e: any) => (this.password = e.target.value)}\n disabled={this.submitting}\n />\n\n <verdocs-button\n label=\"Forgot Your Password?\"\n variant=\"text\"\n onClick={() => (this.displayMode = 'forgot')}\n disabled={this.submitting}\n style={{display: 'flex', justifyContent: 'center', margin: '10px auto 20px'}}\n />\n\n <verdocs-button\n label=\"Login\"\n disabled={this.submitting}\n onClick={() => this.loginAndCheckVerification()}\n style={{display: 'flex', justifyContent: 'center', margin: '10px auto 0'}}\n />\n </form>\n </div>\n );\n }\n}\n"],"version":3}
|
@@ -13,7 +13,7 @@ import { d as defineCustomElement$6 } from './p-1ae5d7e0.js';
|
|
13
13
|
import { d as defineCustomElement$5 } from './p-b7d080eb.js';
|
14
14
|
import { d as defineCustomElement$4 } from './p-6719b0d7.js';
|
15
15
|
import { d as defineCustomElement$3 } from './p-9cfd8022.js';
|
16
|
-
import { d as defineCustomElement$2 } from './p-
|
16
|
+
import { d as defineCustomElement$2 } from './p-bfed2f8d.js';
|
17
17
|
|
18
18
|
const 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 .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}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{width:50%;font-size:16px;background:white;border-radius:5px;-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:#654dcb}verdocs-sign .fatal-error p{margin:1rem;font-size:14px;font-weight:400}@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}";
|
19
19
|
const VerdocsSignStyle0 = verdocsSignCss;
|
@@ -202,7 +202,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
202
202
|
console.log('[SIGN] Decline result', declineResult);
|
203
203
|
(_c = this.envelopeUpdated) === null || _c === void 0 ? void 0 : _c.emit({ endpoint: this.endpoint, envelope: this.envelope, event: 'declined' });
|
204
204
|
this.submitting = false;
|
205
|
-
this.fatalErrorHeader = '
|
205
|
+
this.fatalErrorHeader = 'Declined';
|
206
206
|
this.fatalErrorMessage = 'You have declined to sign this envelope.';
|
207
207
|
}
|
208
208
|
break;
|
@@ -577,7 +577,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
577
577
|
return (h(Host, null, h("verdocs-loader", null)));
|
578
578
|
}
|
579
579
|
if (this.fatalErrorMessage) {
|
580
|
-
return (h(Host, { class: { agreed: this.agreed } }, h("div", { class: "fatal-error" }, h("
|
580
|
+
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)))));
|
581
581
|
}
|
582
582
|
if (this.isDone) {
|
583
583
|
return (h(Host, { class: { agreed: this.agreed } }, h("verdocs-view", { endpoint: this.endpoint, envelopeId: this.envelopeId, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } }), this.showDone && (h("verdocs-ok-dialog", { heading: "You're Done!", message: `You can access the ${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: (e) => {
|