@verdocs/web-sdk 5.0.41 → 5.0.42

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.
Files changed (97) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +18 -33
  3. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js.map +1 -1
  4. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +0 -2
  5. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js.map +1 -1
  6. package/dist/cjs/verdocs-preview_7.cjs.entry.js +0 -1
  7. package/dist/cjs/verdocs-preview_7.cjs.entry.js.map +1 -1
  8. package/dist/cjs/verdocs-sign.cjs.entry.js +114 -90
  9. package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
  10. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  11. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +0 -1
  12. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js.map +1 -1
  13. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +121 -95
  14. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  15. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +7 -8
  16. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js.map +1 -1
  17. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +0 -2
  18. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js.map +1 -1
  19. package/dist/components/{p-36368807.js → p-4a04090c.js} +3 -3
  20. package/dist/components/{p-36368807.js.map → p-4a04090c.js.map} +1 -1
  21. package/dist/components/{p-c1d312d8.js → p-4a4bf38c.js} +2 -3
  22. package/dist/components/p-4a4bf38c.js.map +1 -0
  23. package/dist/components/{p-6bfb8eba.js → p-73a39d5a.js} +19 -34
  24. package/dist/components/p-73a39d5a.js.map +1 -0
  25. package/dist/components/{p-795b4192.js → p-91eae04c.js} +3 -3
  26. package/dist/components/{p-795b4192.js.map → p-91eae04c.js.map} +1 -1
  27. package/dist/components/{p-52c195dd.js → p-92cce3dc.js} +1 -3
  28. package/dist/components/{p-52c195dd.js.map → p-92cce3dc.js.map} +1 -1
  29. package/dist/components/{p-7481c7db.js → p-b474c324.js} +2 -2
  30. package/dist/components/{p-7481c7db.js.map → p-b474c324.js.map} +1 -1
  31. package/dist/components/verdocs-build.js +6 -6
  32. package/dist/components/verdocs-contact-picker.js +1 -1
  33. package/dist/components/verdocs-field-date.js +1 -1
  34. package/dist/components/verdocs-preview.js +1 -1
  35. package/dist/components/verdocs-send.js +1 -1
  36. package/dist/components/verdocs-sign.js +117 -92
  37. package/dist/components/verdocs-sign.js.map +1 -1
  38. package/dist/components/verdocs-template-document-page.js +1 -1
  39. package/dist/components/verdocs-template-fields.js +1 -1
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/esm/verdocs-contact-picker_2.entry.js +18 -33
  42. package/dist/esm/verdocs-contact-picker_2.entry.js.map +1 -1
  43. package/dist/esm/verdocs-field-attachment_13.entry.js +0 -2
  44. package/dist/esm/verdocs-field-attachment_13.entry.js.map +1 -1
  45. package/dist/esm/verdocs-preview_7.entry.js +0 -1
  46. package/dist/esm/verdocs-preview_7.entry.js.map +1 -1
  47. package/dist/esm/verdocs-sign.entry.js +115 -91
  48. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  49. package/dist/esm/verdocs-web-sdk.js +1 -1
  50. package/dist/esm-es5/loader.js +1 -1
  51. package/dist/esm-es5/loader.js.map +1 -1
  52. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  53. package/dist/esm-es5/verdocs-contact-picker_2.entry.js.map +1 -1
  54. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  55. package/dist/esm-es5/verdocs-field-attachment_13.entry.js.map +1 -1
  56. package/dist/esm-es5/verdocs-preview_7.entry.js +1 -1
  57. package/dist/esm-es5/verdocs-preview_7.entry.js.map +1 -1
  58. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  59. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  60. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  61. package/dist/esm-es5/verdocs-web-sdk.js.map +1 -1
  62. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +4 -2
  63. package/dist/verdocs-web-sdk/p-02e09803.system.entry.js +2 -0
  64. package/dist/verdocs-web-sdk/p-02e09803.system.entry.js.map +1 -0
  65. package/dist/verdocs-web-sdk/p-0c1898f6.system.js +1 -1
  66. package/dist/verdocs-web-sdk/p-0c1898f6.system.js.map +1 -1
  67. package/dist/verdocs-web-sdk/p-46263e7a.system.entry.js +2 -0
  68. package/dist/verdocs-web-sdk/p-46263e7a.system.entry.js.map +1 -0
  69. package/dist/verdocs-web-sdk/p-4d92a71b.entry.js +2 -0
  70. package/dist/verdocs-web-sdk/p-4d92a71b.entry.js.map +1 -0
  71. package/dist/verdocs-web-sdk/{p-7f982a59.system.entry.js → p-6cfb51e3.system.entry.js} +2 -2
  72. package/dist/verdocs-web-sdk/p-6cfb51e3.system.entry.js.map +1 -0
  73. package/dist/verdocs-web-sdk/{p-62bde242.system.entry.js → p-89c69404.system.entry.js} +2 -2
  74. package/dist/verdocs-web-sdk/p-89c69404.system.entry.js.map +1 -0
  75. package/dist/verdocs-web-sdk/p-d47c58de.entry.js +2 -0
  76. package/dist/verdocs-web-sdk/p-d47c58de.entry.js.map +1 -0
  77. package/dist/verdocs-web-sdk/{p-7962eb00.entry.js → p-e7ca4f15.entry.js} +2 -2
  78. package/dist/verdocs-web-sdk/p-e7ca4f15.entry.js.map +1 -0
  79. package/dist/verdocs-web-sdk/{p-dda88c7f.entry.js → p-e8268ed9.entry.js} +2 -2
  80. package/dist/verdocs-web-sdk/p-e8268ed9.entry.js.map +1 -0
  81. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  82. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js.map +1 -1
  83. package/package.json +3 -3
  84. package/dist/components/p-6bfb8eba.js.map +0 -1
  85. package/dist/components/p-c1d312d8.js.map +0 -1
  86. package/dist/verdocs-web-sdk/p-1c8788f5.entry.js +0 -2
  87. package/dist/verdocs-web-sdk/p-1c8788f5.entry.js.map +0 -1
  88. package/dist/verdocs-web-sdk/p-62bde242.system.entry.js.map +0 -1
  89. package/dist/verdocs-web-sdk/p-7962eb00.entry.js.map +0 -1
  90. package/dist/verdocs-web-sdk/p-7f982a59.system.entry.js.map +0 -1
  91. package/dist/verdocs-web-sdk/p-a4dd8302.system.entry.js +0 -2
  92. package/dist/verdocs-web-sdk/p-a4dd8302.system.entry.js.map +0 -1
  93. package/dist/verdocs-web-sdk/p-dda88c7f.entry.js.map +0 -1
  94. package/dist/verdocs-web-sdk/p-df6ab9e9.entry.js +0 -2
  95. package/dist/verdocs-web-sdk/p-df6ab9e9.entry.js.map +0 -1
  96. package/dist/verdocs-web-sdk/p-e5684a49.system.entry.js +0 -2
  97. package/dist/verdocs-web-sdk/p-e5684a49.system.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"verdocs-sign.js","sourceRoot":"","sources":["../../../../src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,EAAgB,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAC,4BAA4B,EAAE,6BAA6B,EAAE,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAC7G,OAAO,EAAC,mBAAmB,EAAE,UAAU,EAAE,iBAAiB,EAAE,0BAA0B,EAAC,MAAM,iBAAiB,CAAC;AAC/G,OAAO,EAAC,kBAAkB,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,UAAU,EAAC,MAAM,iBAAiB,CAAC;AACnH,OAAO,EAAC,WAAW,EAAE,e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,CAAC,IAAI,CAAC,WAAW,IAAI,CACnB;oBACE,WAAK,KAAK,EAAC,iBAAiB;wBAC1B,0BAAmB,CACf,CACS,CAClB,CAAC,CACC,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import type {IEnvelope, IEnvelopeField, IRecipient} from '@verdocs/js-sdk';\nimport {Event, EventEmitter, Host, Fragment, Component, Prop, State, h} from '@stencil/core';\nimport {updateEnvelopeFieldSignature, uploadEnvelopeFieldAttachment, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {updateEnvelopeField, sortFields, submitKbaIdentity, submitKbaChallengeResponse} from '@verdocs/js-sdk';\nimport {fullNameToInitials, startSigningSession, deleteEnvelopeFieldAttachment, getKbaStep} from '@verdocs/js-sdk';\nimport {getEnvelope, integerSequence, isValidEmail, isValidPhone, submitKbaPin, updateEnvelopeFieldInitials} from '@verdocs/js-sdk';\nimport {createInitials, createSignature, envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit, formatFullName} from '@verdocs/js-sdk';\nimport {getFieldId, renderDocumentField, saveAttachment, updateDocumentFieldValue} from '../../../utils/utils';\nimport {IDocumentPageInfo} from '../../../utils/Types';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst inProgressMenuOptions = [\n {id: 'later', label: 'Finish Later'}, //\n // {id: 'claim', label: 'Claim the Document', disabled: true},\n {id: 'decline', label: 'Decline to Sign'},\n {id: 'print', label: 'Print Without Signing'},\n {id: 'download', label: 'Download'},\n];\n\nconst doneMenuOptions = [\n {id: 'print', label: 'Print'},\n {id: 'download', label: 'Download'},\n];\n\n/**\n * Display an envelope signing experience. This will display the envelope's attached\n * documents with signing fields overlaid on each page.\n *\n * The component will attempt to initiate a signing session and load the specified\n * envelope. If successful, the recipient's fields will be enabled and the user will\n * be able to sign the envelope's attached documents. If not, an `sdkError` will be\n * thrown and the component will be blank/empty. To provide the best user experience,\n * applications should capture and handle this error to provide the user with\n * instructions/options for next steps based on the application's design and workflow.\n *\n * Unlike other components, this will always create its own endpoint to manage the\n * session session. This endpoint will be included in event callbacks for the\n * convenience of host applications that may wish to make server calls using the\n * signer's credentials once signing is complete (e.g. to obtain copies of\n * the signed attachments.)\n */\n@Component({\n tag: 'verdocs-sign',\n styleUrl: 'verdocs-sign.scss',\n shadow: false,\n})\nexport class VerdocsSign {\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop({mutable: true}) endpoint: VerdocsEndpoint = null;\n\n /**\n * The ID of the envelope to sign.\n */\n @Prop({reflect: true}) envelopeId: string | null = null;\n\n /**\n * The ID of the role that will be signing e.g. 'Recipient 1'\n */\n @Prop({reflect: true}) roleId: string | null = null;\n\n /**\n * The invite code for the signer.\n */\n @Prop({reflect: true}) inviteCode: string | null = null;\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.\n */\n @Event({composed: true}) envelopeLoaded: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope}>;\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 @State() roleNames: string[] = [];\n @State() sortedRecipients: IRecipient[] = [];\n @State() recipient: IRecipient | null = null;\n @State() hasSignature = false;\n @State() nextButtonLabel = 'Start';\n @State() nextSubmits = false;\n @State() fatalErrorHeader = '';\n @State() fatalErrorMessage = '';\n @State() focusedField = '';\n @State() submitting = false;\n @State() submitted = false;\n @State() isDone = false;\n @State() showDone = false;\n @State() showLoadError = false;\n @State() finishLater = false;\n @State() showFinishLater = false;\n @State() agreed = false;\n @State() documentsSingularPlural = 'document';\n @State() kbaStep = '';\n @State() kbaQuestions: any[] = [];\n @State() showSpinner = false;\n @State() kbaChoices = [];\n\n @State() loading = true;\n @State() envelope: IEnvelope | null = null;\n\n recipientIndex: number = -1;\n\n componentWillLoad() {\n if (!this.endpoint) {\n console.log('[SIGN] Creating signing endpoint');\n this.endpoint = new VerdocsEndpoint({sessionType: 'signing'});\n }\n }\n\n async componentDidLoad() {\n if (!this.envelopeId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required envelopId', 500, ''));\n return;\n }\n\n if (!this.roleId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required roleId', 500, ''));\n return;\n }\n\n if (!this.inviteCode) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required inviteCode', 500, ''));\n return;\n }\n\n try {\n console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);\n\n // NOTE: We don't listen to the store here because we are often an independent\n // session and might have a different \"view\" of the envelope.\n const {envelope, recipient} = await startSigningSession(this.endpoint, this.envelopeId, this.roleId, this.inviteCode);\n console.log(`[SIGN] Loaded signing session`, envelope, recipient);\n this.recipient = recipient;\n this.envelope = envelope;\n\n Store.updateEnvelope(this.envelopeId, envelope);\n\n // TODO: Can be cleaned up shortly.\n this.sortedRecipients = [...this.envelope.recipients];\n this.sortedRecipients.sort((a, b) => {\n return a.sequence === b.sequence ? a.order - b.order : a.sequence - b.sequence;\n });\n\n this.roleNames = this.sortedRecipients.map(r => r.role_name);\n\n if (this.envelope.documents.length > 0) {\n this.documentsSingularPlural = 'document(s)';\n }\n\n this.recipientIndex = this.roleNames.findIndex(roleName => roleName == this.roleId);\n if (this.recipientIndex > -1) {\n this.recipient = this.sortedRecipients[this.recipientIndex];\n this.agreed = this.recipient.agreed;\n } else {\n console.warn('[SIGN] Could not find our recipient record', this.roleId, this.sortedRecipients);\n }\n\n // TODO: Envelope \"complete\" | \"declined\" | \"canceled\"\n // TODO: Recipient \"canceled\"\n this.submitted = this.recipient.status === 'submitted';\n this.isDone = this.submitted;\n this.showDone = this.submitted;\n\n if (this.envelope.status === 'canceled') {\n this.fatalErrorHeader = 'Unable to Start Signing Session';\n this.fatalErrorMessage = 'This envelope has been canceled. The sender has been notified.';\n } else if (this.recipient.status === 'declined') {\n this.fatalErrorHeader = 'Unable to Start Signing Session';\n this.fatalErrorMessage = 'You have declined to sign this envelope. The sender has been notified.';\n } else if (this.agreed) {\n this.nextButtonLabel = 'Next';\n }\n\n this.checkRecipientFields();\n this.envelopeLoaded?.emit({endpoint: this.endpoint, envelope: this.envelope});\n\n if (!this.isDone) {\n getKbaStep(this.endpoint, this.envelopeId, this.roleId)\n .then(r => {\n console.log('[SIGN] KBA Step', r);\n this.kbaStep = r.kba_step;\n if (this.kbaStep === 'failed') {\n this.fatalErrorHeader = 'Identity Verification Failed';\n this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';\n this.isDone = true;\n } else {\n this.kbaQuestions = (r as any).questions?.question || [];\n this.kbaChoices = [];\n }\n })\n .catch(e => console.log('Error getting KBA step', e));\n }\n } catch (e) {\n console.log('[SIGN] Error with signing session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n this.showLoadError = true;\n }\n }\n\n componentDidRender() {\n const headerTarget = this.headerTargetId ? document.getElementById(this.headerTargetId) : null;\n const headerEl = document.getElementById('verdocs-sign-header');\n if (headerTarget && headerEl) {\n console.log('[SIGN] Moving header');\n headerEl.remove();\n headerTarget.append(headerEl);\n }\n }\n\n handleClickAgree() {\n this.submitting = true;\n envelopeRecipientAgree(this.endpoint, this.envelopeId, this.roleId, true)\n .then(() => {\n this.nextButtonLabel = 'Next';\n this.recipient.agreed = true;\n this.submitting = false;\n this.agreed = true; // The server returns a recipient object but it's not \"deep\" so we track this locally\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'agreed'});\n })\n .catch(e => {\n console.log('[SIGN] Update failure', e);\n this.submitting = false;\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleOptionSelected(e: any) {\n switch (e.detail.id) {\n case 'later':\n this.finishLater = true;\n this.showFinishLater = true;\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'later'});\n break;\n\n case 'claim':\n VerdocsToast('This feature will be available in an upcoming release.');\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'claimed'});\n break;\n\n case 'decline':\n {\n this.submitting = true;\n const declineResult = await envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Decline result', declineResult);\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'declined'});\n this.submitting = false;\n this.fatalErrorHeader = 'Declined';\n this.fatalErrorMessage = 'You have declined to sign this envelope. The sender has been notified.';\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':\n {\n const firstDoc = this.envelope.documents.find(doc => doc.type === 'attachment');\n if (firstDoc) {\n saveAttachment(this.endpoint, this.envelope, firstDoc.id).catch(e => {\n console.log('[SIGN] Error downloading PDF', e);\n });\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'downloaded'});\n }\n }\n break;\n }\n }\n\n updateRecipientFieldValue(fieldName: string, updateResult: any) {\n console.log('[SIGN] updateRecipientFieldValue', fieldName, updateResult);\n this.getRecipientFields().forEach(oldField => {\n if (oldField.name === fieldName) {\n oldField.value = updateResult.value;\n // TODO: Keeping this while attachments still rely on it\n oldField.settings = updateResult.settings;\n updateDocumentFieldValue(oldField);\n this.checkRecipientFields();\n }\n });\n }\n\n saveFieldChange(fieldName: string, fields: Record<string, any>) {\n console.log('[SIGN] saveFieldChange', fieldName, fields);\n updateEnvelopeField(this.endpoint, this.envelopeId, fieldName, fields) //\n .then(updateResult => this.updateRecipientFieldValue(fieldName, updateResult))\n .catch(e => {\n if (e.response?.status === 401 && e.response?.data?.error === 'jwt expired') {\n console.log('[SIGN] Signing session expired');\n this.fatalErrorHeader = 'Signing Session Expired';\n this.fatalErrorMessage = 'Please reload your browser to continue.';\n } else {\n console.log('[SIGN] Server error', e);\n }\n\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleFieldChange(field: IEnvelopeField, e: any) {\n const {value, checked} = e.target;\n\n switch (field.type as any) {\n // TODO: Remove legacy type when no longer needed\n case 'textarea':\n case 'textbox':\n return this.saveFieldChange(field.name, {prepared: false, value});\n\n case 'checkbox': {\n return this.saveFieldChange(field.name, {prepared: false, value: String(e.target.checked)});\n }\n\n case 'radio': {\n return this.saveFieldChange(field.name, {prepared: false, value: String(e.target.checked)});\n }\n\n case 'dropdown':\n // TODO: Set prepared to false server-side.\n console.log('Saving dropdown', field.name, e.detail);\n return this.saveFieldChange(field.name, {prepared: false, value: e.detail});\n\n case 'initial':\n // This can be caused by a focus-out event if the user clicks the field\n // after it's already filled in, then clicks something else like a textbox.\n // We don't visually indicate the focus, but it's still there.\n if (!e.detail) {\n return;\n }\n\n this.showSpinner = true;\n const initialsBlob = await (await fetch(e.detail)).blob();\n return createInitials(this.endpoint, 'initial', initialsBlob) //\n .then(async newInitials => {\n const updateResult = await updateEnvelopeFieldInitials(this.endpoint, this.envelopeId, field.name, newInitials.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.showSpinner = false;\n })\n .catch(e => {\n console.log('Error updating initials', e);\n this.showSpinner = false;\n });\n\n case 'signature':\n // This can be caused by a focus-out event if the user clicks the field\n // after it's already filled in, then clicks something else like a textbox.\n // We don't visually indicate the focus, but it's still there.\n if (!e.detail) {\n return;\n }\n\n this.showSpinner = true;\n const signatureBlob = await (await fetch(e.detail)).blob();\n return createSignature(this.endpoint, 'signature', signatureBlob) //\n .then(async newSignature => {\n console.log('Signature update result', newSignature);\n const updateResult = await updateEnvelopeFieldSignature(this.endpoint, this.envelopeId, field.name, newSignature.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.showSpinner = false;\n })\n .catch(e => {\n console.warn('[SIGN] Error updating signature', e);\n this.showSpinner = false;\n });\n\n case 'date':\n const {formattedDate} = e.detail;\n if (formattedDate) {\n return this.saveFieldChange(field.name, {prepared: false, value: formattedDate});\n }\n break;\n\n case 'timestamp':\n console.log('[SIGN] Updating timestamp', {value, ts: e.target.getAttribute('timestamp')});\n break;\n\n default:\n console.log('[SIGN] Unhandled field update', {value, checked}, field);\n break;\n }\n }\n\n isFieldFilled(field: IEnvelopeField) {\n const {value = ''} = field;\n switch (field.type as any) {\n case 'textarea':\n case 'textbox':\n switch (field.validator || '') {\n case 'email':\n return isValidEmail(value);\n case 'phone':\n return isValidPhone(value);\n default:\n return (value || '').trim() !== '';\n }\n\n case 'signature':\n return value === 'signed';\n\n case 'initial':\n return value === 'initialed';\n\n // Timestamp fields get automatically filled when the envelope is submitted.\n case 'timestamp':\n return true;\n\n case 'date':\n return !!value;\n\n case 'attachment':\n return value === 'attached';\n\n case 'dropdown':\n return value !== '';\n\n case 'checkbox':\n return value === 'true';\n\n case 'radio':\n if (!!field.group) {\n return this.getRecipientFields()\n .filter(f => f.group === field.group)\n .some(field => field.value === 'true');\n }\n\n return field.value === 'true';\n\n default:\n return false;\n }\n }\n\n isFieldValid(field: IEnvelopeField) {\n return !field.required || this.isFieldFilled(field);\n }\n\n getSortedFillableFields() {\n const recipientFields = this.getRecipientFields().filter(field => field.type !== 'timestamp');\n sortFields(recipientFields);\n return recipientFields;\n }\n\n async handleNext() {\n if (this.nextSubmits) {\n try {\n // Patches the date picker to be forcibly removed if still showing during submission\n document.getElementById('air-datepicker-global-container')?.remove();\n\n this.submitting = true;\n const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Submitted successfully', result);\n this.recipient.status = 'submitted';\n this.showDone = true;\n console.log('[SIGN] Reloading envelope');\n getEnvelope(this.endpoint, this.envelopeId)\n .then(envelope => {\n this.envelope = envelope;\n // The show-done dialog does this\n // this.isDone = true;\n this.submitting = false;\n })\n .catch(e => {\n // this.isDone = true;\n console.log('[SIGN] Error reloading envelope', e);\n this.submitting = false;\n });\n } catch (e) {\n console.log('[SIGN] Error submitting', e);\n }\n\n return;\n }\n\n // Find and focus the next incomplete field (that is fillable)\n const emptyFields = this.getSortedFillableFields().filter(field => field.required && !this.isFieldFilled(field));\n sortFields(emptyFields);\n\n const focusedIndex = emptyFields.findIndex(field => field.name === this.focusedField);\n let nextFocusedIndex = focusedIndex + 1;\n if (nextFocusedIndex >= emptyFields.length) {\n nextFocusedIndex = 0;\n }\n\n let nextRequiredField = emptyFields[nextFocusedIndex];\n // console.log('Next field', nextRequiredField, emptyFields);\n\n // Skip signature and initial fields that are already filled in. We have to count our \"skips\" just in case, to avoid infinite loops.\n let skips = 0;\n if (skips < emptyFields.length && ['signature', 'initial'].includes(nextRequiredField.type) && ['initialed', 'signed'].includes(nextRequiredField.value)) {\n skips++;\n nextFocusedIndex++;\n if (nextFocusedIndex >= emptyFields.length) {\n nextFocusedIndex = 0;\n }\n nextRequiredField = emptyFields[nextFocusedIndex];\n }\n\n if (skips >= emptyFields.length) {\n nextRequiredField = null;\n }\n\n if (nextRequiredField) {\n const id = getFieldId(nextRequiredField);\n const el = document.getElementById(id) as any;\n el?.scrollIntoView({behavior: 'smooth'});\n el?.focusField();\n this.focusedField = nextRequiredField.name;\n }\n }\n\n getRecipientFields() {\n return this.envelope.fields.filter(field => field.role_name === this.recipient.role_name);\n }\n\n // See if everything that \"needs to be\" filled in is, and all \"fillable fields\" are valid\n checkRecipientFields() {\n const invalidFields = this.getRecipientFields().filter(field => !this.isFieldValid(field));\n if (invalidFields.length < 1) {\n this.nextButtonLabel = 'Finish';\n if (!this.nextSubmits) {\n this.nextSubmits = true;\n }\n } else {\n console.log(\n '[SIGN] Invalid fields remaining',\n invalidFields.map(field => field.name),\n );\n this.nextButtonLabel = 'Next';\n this.nextSubmits = false;\n }\n }\n\n attachFieldAttributes(pageInfo, field, el) {\n // We can get called multiple times as rendering completes and it's hard to avoid that\n // because it's a ton of work for the callers to know it's been done already. But we\n // don't want to attach multiple event listeners or we get dupe event handling, like\n // calling the server twice on every field update. Since JS has no removeAllEventListeners()\n // option, using removeEventListener() isn't reliable the way Stencil binds local function\n // contexts, and cloneNode messes up the rest of the rendering, we just track it with a flag.\n if (el.getAttribute('attached') === '1') {\n return;\n }\n el.setAttribute('attached', '1');\n\n el.addEventListener('input', (e: any) => {\n // console.log('[SIGN] onfieldInput', e.detail, e.target.value);\n // These field types don't emit fieldChange. Should we standardize on that? We don't tap \"input\" for fields like\n // text boxes because we'd be updating the field on every keystroke. We do those on blur which fires fieldChange.\n if (e.target.type === 'radio' || e.target.type === 'checkbox') {\n // if (e.target.type === 'radio' || e.target.name.includes('date') || e.target.name.includes('checkbox')) {\n this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());\n } else {\n this.checkRecipientFields();\n }\n });\n el.addEventListener('attached', async (e: any) => {\n console.log('[SIGN] onAttached', e.detail, e.target.value);\n this.showSpinner = true;\n try {\n const updateResult = await uploadEnvelopeFieldAttachment(this.endpoint, this.envelopeId, field.name, e.detail);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.checkRecipientFields();\n\n const newEl = renderDocumentField('envelope', field, pageInfo, {disabled: false, editable: false, draggable: false, done: this.isDone});\n this.attachFieldAttributes(pageInfo, field, newEl);\n\n this.showSpinner = false;\n } catch (e) {\n console.log('Error uploading attachment', e);\n VerdocsToast('Unable to upload attachment, please try again later', {style: 'error'});\n this.showSpinner = false;\n }\n });\n el.addEventListener('deleted', async (e: any) => {\n console.log('[SIGN] onDeleted', e.detail, e.target.value);\n this.showSpinner = true;\n try {\n const updateResult = await deleteEnvelopeFieldAttachment(this.endpoint, this.envelopeId, field.name);\n console.log('[SIGN] Deleted attachment', updateResult);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.checkRecipientFields();\n\n const newEl = renderDocumentField('envelope', field, pageInfo, {disabled: false, editable: false, draggable: false, done: this.isDone});\n this.attachFieldAttributes(pageInfo, field, newEl);\n\n this.showSpinner = false;\n } catch (e) {\n console.log('Error uploading attachment', e);\n VerdocsToast('Unable to upload attachment, please try again later', {style: 'error'});\n this.showSpinner = false;\n }\n });\n el.addEventListener('focusout', e => {\n // These field types trigger focusout as they're used, even without a value change\n if (field.type !== 'dropdown' && field.type !== 'attachment') {\n this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());\n }\n });\n el.addEventListener('fieldChange', e => {\n this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());\n });\n\n el.setAttribute('templateid', this.envelope.template_id);\n el.setAttribute('fieldname', field.name);\n el.setAttribute('page', pageInfo.pageNumber);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n\n const fullName = formatFullName(this.recipient);\n el.setAttribute('initials', fullNameToInitials(fullName));\n el.setAttribute('name', fullName);\n }\n\n handlePageRendered(e: any) {\n const pageInfo = e.detail as IDocumentPageInfo;\n\n // NOTE: We don't filter on pageNumber here because we need the position in the\n // entire list to set the tabIndex.\n const recipientFields = this.getSortedFillableFields();\n console.log('[SIGN] Rendering fields for page', pageInfo.pageNumber, recipientFields);\n\n // First render the fields for the signer\n recipientFields.forEach((field, tabIndex) => {\n if (field.page !== pageInfo.pageNumber) {\n return;\n }\n\n const el = renderDocumentField('envelope', field, pageInfo, {disabled: false, editable: false, draggable: false, done: this.isDone}, tabIndex);\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, el);\n }\n });\n\n // Now render the fields for other signers who have yet to act\n this.sortedRecipients\n .filter(r => r.role_name !== this.recipient.role_name && (r.status === 'invited' || r.status === 'opened' || r.status === 'pending'))\n .forEach(() => {\n this.getRecipientFields()\n .filter(field => field.page === pageInfo.pageNumber)\n .forEach(field => {\n const el = renderDocumentField('envelope', field, pageInfo, {disabled: true, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, el);\n }\n });\n });\n\n this.checkRecipientFields();\n }\n\n render() {\n if (this.showLoadError) {\n return (\n <Host>\n <verdocs-ok-dialog\n heading=\"Unable to Start Signing\"\n message={`Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.`}\n buttonLabel=\"OK\"\n onNext={() => {\n window.location.reload();\n }}\n />\n </Host>\n );\n }\n\n if (!this.envelope) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (this.fatalErrorMessage) {\n return (\n <Host class={{agreed: this.agreed}}>\n <div class=\"fatal-error\">\n <div class=\"message\">\n <div class=\"header\">{this.fatalErrorHeader}</div>\n <p>{this.fatalErrorMessage}</p>\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.isDone) {\n return (\n <Host class={{agreed: this.agreed}}>\n <verdocs-view endpoint={this.endpoint} envelopeId={this.envelopeId} onSdkError={e => this.sdkError?.emit(e.detail)} />\n\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n 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.`}\n onNext={(e: any) => {\n e.preventDefault();\n e.stopPropagation();\n this.showDone = false;\n this.isDone = true;\n }}\n />\n )}\n\n {this.submitting && (\n <div class=\"loading-indicator\">\n <verdocs-loader />\n </div>\n )}\n </Host>\n );\n }\n\n if (!this.agreed) {\n return (\n <Host class=\"agreed\">\n <div id=\"verdocs-sign-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>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\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 </div>\n\n <div class=\"cover\">\n <div class=\"agree\">\n <verdocs-checkbox name=\"agree\" label=\"By checking this box, you:\" onInput={() => this.handleClickAgree()} />\n <ul>\n <li>\n Agree to use electronic records and signatures, and confirm you have read the{' '}\n <a href=\"https://verdocs.com/en/electronic-record-signature-disclosure/\" target=\"_blank\">\n Electronic Record and Signatures Disclosure\n </a>\n .\n </li>\n <li>\n Agree to Verdocs'{' '}\n <a href=\"https://verdocs.com/en/eula\" target=\"_blank\">\n End User License Agreement\n </a>{' '}\n and confirm you have read Verdocs'{' '}\n <a href=\"https://verdocs.com/en/privacy-policy/\" target=\"_blank\">\n Privacy Policy\n </a>\n .\n </li>\n </ul>\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.kbaStep === 'pin') {\n return (\n <Host class=\"kba\">\n <div id=\"verdocs-sign-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>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\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 </div>\n\n <div class=\"cover\">\n <div class=\"kba\">\n <verdocs-kba-dialog\n mode=\"text\"\n step={1}\n steps={1}\n helptitle=\"Document is protected by a PIN code\"\n helptext=\"Please enter your PIN code to proceed. If you do not have one, please contact the sender.\"\n label=\"PIN Code\"\n onNext={async e => {\n submitKbaPin(this.endpoint, this.envelopeId, this.roleId, e.detail as string)\n .then(r => {\n console.log('[SIGN] PIN code submission result', r);\n if (r.kba_step === 'complete') {\n this.kbaStep = '';\n }\n })\n .catch(e => {\n console.log('[SIGN] Error submitting PIN', e);\n if (e.response?.data?.error === 'Rejecting PIN submission, too many attempts') {\n this.fatalErrorHeader = 'PIN Verification Failed';\n this.fatalErrorMessage = 'Too many failed attempts. The sender has been notified.';\n this.isDone = true;\n } else {\n VerdocsToast(e.response?.data?.error || 'Unable to verify PIN code. Please try again.', {style: 'error'});\n }\n });\n }}\n />\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.kbaStep === 'identity') {\n return (\n <Host class=\"kba\">\n <div id=\"verdocs-sign-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>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\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 </div>\n\n <div class=\"cover\">\n <div class=\"kba\">\n <verdocs-kba-dialog\n mode=\"identity\"\n helptitle=\"Document requires identity verification\"\n helptext=\"Please complete your contact details to proceed.\"\n recipient={this.recipient}\n onNext={async e => {\n const recipDetails = e.detail as IRecipient;\n submitKbaIdentity(this.endpoint, this.envelopeId, this.roleId, {\n firstName: recipDetails.first_name,\n lastName: recipDetails.last_name,\n address: recipDetails.address,\n city: recipDetails.city,\n state: recipDetails.state,\n zip: recipDetails.zip,\n ssnLast4: recipDetails.ssn_last_4,\n })\n .then(r => {\n console.log('[SIGN] Identity submission result', r);\n this.kbaStep = r.kba_step;\n })\n .catch(e => {\n console.log('[SIGN] Error submitting identity', e);\n VerdocsToast(e.response?.data?.error || 'Unable to verify identity.', {style: 'error'});\n });\n }}\n />\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.kbaStep === 'challenge') {\n const questionNumber = this.kbaChoices.length;\n const kbaQuestion = this.kbaQuestions[questionNumber];\n return (\n <Host class=\"kba\">\n <div id=\"verdocs-sign-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>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\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 </div>\n\n <div class=\"cover\">\n <div class=\"kba\">\n {this.kbaChoices.length >= this.kbaQuestions.length ? (\n <verdocs-spinner />\n ) : (\n <verdocs-kba-dialog\n mode=\"choice\"\n helptitle=\"Your identity requires additional verification\"\n helptext={kbaQuestion?.prompt || 'Please select one of the options below.'}\n choices={kbaQuestion?.answer || ['Skip Question']}\n step={questionNumber + 1}\n steps={this.kbaQuestions.length}\n onNext={async (e: any) => {\n const answer = e.detail as string;\n this.kbaChoices = [...this.kbaChoices, answer];\n if (this.kbaChoices.length >= this.kbaQuestions.length) {\n const responses = this.kbaQuestions.map((q, i) => ({type: q.type, answer: this.kbaChoices[i]}));\n console.log('Submitting KBA responses', this.kbaChoices, responses);\n try {\n const response = await submitKbaChallengeResponse(this.endpoint, this.envelopeId, this.roleId, responses);\n console.log('KBA challenge response', response);\n this.kbaStep = response.kba_step;\n if (this.kbaStep === 'failed') {\n this.fatalErrorHeader = 'Identity Verification Failed';\n this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';\n this.isDone = true;\n } else {\n this.kbaQuestions = (response as any).questions?.question || [];\n this.kbaChoices = [];\n }\n } catch (e) {\n console.log('Error submitting KBA challenge', e);\n this.kbaStep = '';\n this.fatalErrorHeader = 'Unable to Verify Identity';\n this.fatalErrorMessage = e.response?.data?.error || 'Please try again later.';\n this.isDone = true;\n }\n }\n }}\n />\n )}\n </div>\n </div>\n </Host>\n );\n }\n\n return (\n <Host>\n <div id=\"verdocs-sign-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\n {!this.finishLater && <verdocs-button size=\"xsmall\" label={this.nextButtonLabel} disabled={!this.agreed} onClick={() => this.handleNext()} />}\n\n <div style={{marginLeft: '10px'}} />\n <verdocs-dropdown options={!this.isDone && !this.finishLater ? inProgressMenuOptions : doneMenuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n {(this.envelope.documents || []).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 // In signing mode we show the original template page with all the recipient fields so we can show source formatting and\n // where everything went. This is also a visual indicator when optional fields weren't filled in by previous actors, or\n // future signers still need to act. Once we're \"done\" we flip to showing the envelope's documents which have the final\n // field vales (so far) stamped into them.\n // TODO: Confirm that a pure page-number match is good enough to find the matching template page. We need to make sure\n // we either don't reset our page numbers for additional attachments, or add match-on identifiers to work around that.\n // console.log('tp', templatePage, page);\n return (\n <verdocs-envelope-document-page\n envelopeId={this.envelopeId}\n documentId={envelopeDocument.id}\n endpoint={this.endpoint}\n virtualWidth={pageSize.width}\n virtualHeight={pageSize.height}\n pageNumber={pageNumber}\n onPageRendered={e => this.handlePageRendered(e)}\n type=\"filled\"\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n );\n })}\n </Fragment>\n );\n })}\n </div>\n\n {this.showFinishLater && (\n <verdocs-ok-dialog\n heading=\"You've saved your document to finish later.\"\n message={`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`}\n onNext={() => (this.showFinishLater = false)}\n />\n )}\n\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n 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.`}\n onNext={() => {\n this.showDone = false;\n this.isDone = true;\n }}\n />\n )}\n\n {this.submitting ||\n (this.showSpinner && (\n <verdocs-portal>\n <div class=\"spinner-overlay\">\n <verdocs-spinner />\n </div>\n </verdocs-portal>\n ))}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"verdocs-sign.js","sourceRoot":"","sources":["../../../../src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAgB,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAC,kBAAkB,EAA6F,MAAM,iBAAiB,CAAC;AAC/I,OAAO,EAAC,cAAc,EAAE,eAAe,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAC3J,OAAO,EAAC,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,2BAA2B,EAAC,MAAM,iBAAiB,CAAC;AACtH,OAAO,EAAC,UAAU,EAAE,mBA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,CAAC,WAAW,IAAI,CACnB;oBACE,WAAK,KAAK,EAAC,iBAAiB;wBAC1B,0BAAmB,CACf,CACS,CAClB,CAAC,CACC,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Event, EventEmitter, Host, Fragment, Component, Prop, State, h} from '@stencil/core';\nimport {authenticateSigner, IEnvelope, IEnvelopeField, IRecipient, TAuthenticateRecipientRequest, TRecipientAuthMethod} from '@verdocs/js-sdk';\nimport {createInitials, createSignature, envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit, formatFullName} from '@verdocs/js-sdk';\nimport {getEnvelope, integerSequence, isValidEmail, isValidPhone, updateEnvelopeFieldInitials} from '@verdocs/js-sdk';\nimport {getFieldId, renderDocumentField, saveAttachment, updateDocumentFieldValue} from '../../../utils/utils';\nimport {updateEnvelopeFieldSignature, uploadEnvelopeFieldAttachment, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {fullNameToInitials, startSigningSession, deleteEnvelopeFieldAttachment} from '@verdocs/js-sdk';\nimport {updateEnvelopeField, sortFields} from '@verdocs/js-sdk';\nimport {IDocumentPageInfo} from '../../../utils/Types';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst inProgressMenuOptions = [\n {id: 'later', label: 'Finish Later'}, //\n // {id: 'claim', label: 'Claim the Document', disabled: true},\n {id: 'decline', label: 'Decline to Sign'},\n {id: 'print', label: 'Print Without Signing'},\n {id: 'download', label: 'Download'},\n];\n\nconst doneMenuOptions = [\n {id: 'print', label: 'Print'},\n {id: 'download', label: 'Download'},\n];\n\n/**\n * Display an envelope signing experience. This will display the envelope's attached\n * documents with signing fields overlaid on each page.\n *\n * The component will attempt to initiate a signing session and load the specified\n * envelope. If successful, the recipient's fields will be enabled and the user will\n * be able to sign the envelope's attached documents. If not, an `sdkError` will be\n * thrown and the component will be blank/empty. To provide the best user experience,\n * applications should capture and handle this error to provide the user with\n * instructions/options for next steps based on the application's design and workflow.\n *\n * Unlike other components, this will always create its own endpoint to manage the\n * session session. This endpoint will be included in event callbacks for the\n * convenience of host applications that may wish to make server calls using the\n * signer's credentials once signing is complete (e.g. to obtain copies of\n * the signed attachments.)\n */\n@Component({\n tag: 'verdocs-sign',\n styleUrl: 'verdocs-sign.scss',\n shadow: false,\n})\nexport class VerdocsSign {\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop({mutable: true}) endpoint: VerdocsEndpoint = null;\n\n /**\n * The ID of the envelope to sign.\n */\n @Prop({reflect: true}) envelopeId: string | null = null;\n\n /**\n * The ID of the role that will be signing e.g. 'Recipient 1'\n */\n @Prop({reflect: true}) roleId: string | null = null;\n\n /**\n * The invite code for the signer.\n */\n @Prop({reflect: true}) inviteCode: string | null = null;\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.\n */\n @Event({composed: true}) envelopeLoaded: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope}>;\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 @State() roleNames: string[] = [];\n @State() sortedRecipients: IRecipient[] = [];\n @State() recipient: IRecipient | null = null;\n @State() hasSignature = false;\n @State() nextButtonLabel = 'Start';\n @State() nextSubmits = false;\n @State() fatalErrorHeader = '';\n @State() fatalErrorMessage = '';\n @State() focusedField = '';\n @State() submitting = false;\n @State() submitted = false;\n @State() isDone = false;\n @State() showDone = false;\n @State() showLoadError = false;\n @State() finishLater = false;\n @State() showFinishLater = false;\n @State() agreed = false;\n @State() documentsSingularPlural = 'document';\n // TODO\n // @State() authStep: TRecipientAuthMethod | null = null;\n @State() authStep: string | null = null;\n @State() authDetails: any = null;\n @State() kbaQuestions: any[] = [];\n @State() showSpinner = false;\n @State() kbaChoices = [];\n\n @State() loading = true;\n @State() envelope: IEnvelope | null = null;\n\n recipientIndex: number = -1;\n\n componentWillLoad() {\n if (!this.endpoint) {\n console.log('[SIGN] Creating signing endpoint');\n this.endpoint = new VerdocsEndpoint({sessionType: 'signing'});\n }\n }\n\n async componentDidLoad() {\n if (!this.envelopeId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required envelopId', 500, ''));\n return;\n }\n\n if (!this.roleId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required roleId', 500, ''));\n return;\n }\n\n if (!this.inviteCode) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required inviteCode', 500, ''));\n return;\n }\n\n try {\n console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);\n\n // NOTE: We don't listen to the store here because we are often an independent\n // session and might have a different \"view\" of the envelope.\n const {envelope, recipient} = await startSigningSession(this.endpoint, this.envelopeId, this.roleId, this.inviteCode);\n console.log(`[SIGN] Loaded signing session`, envelope, recipient);\n this.recipient = recipient;\n this.envelope = envelope;\n\n Store.updateEnvelope(this.envelopeId, envelope);\n\n // TODO: Can be cleaned up shortly.\n this.sortedRecipients = [...this.envelope.recipients];\n this.sortedRecipients.sort((a, b) => {\n return a.sequence === b.sequence ? a.order - b.order : a.sequence - b.sequence;\n });\n\n this.roleNames = this.sortedRecipients.map(r => r.role_name);\n\n if (this.envelope.documents.length > 0) {\n this.documentsSingularPlural = 'document(s)';\n }\n\n this.recipientIndex = this.roleNames.findIndex(roleName => roleName == this.roleId);\n if (this.recipientIndex > -1) {\n this.recipient = this.sortedRecipients[this.recipientIndex];\n this.agreed = this.recipient.agreed;\n this.submitted = this.recipient.status === 'submitted';\n this.authStep = this.recipient.auth_step;\n if (this.authStep) {\n console.log('[SIGN] Authentication required', this.authStep);\n }\n\n const auth_method_states = (this.recipient.auth_method_states || {}) as Record<TRecipientAuthMethod, string>;\n if (Object.values(auth_method_states).includes('failed')) {\n this.fatalErrorHeader = 'Recipient Verification Failed';\n this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';\n this.isDone = true;\n }\n // TODO\n // this.kbaQuestions = (r as any).questions?.question || [];\n // this.kbaChoices = [];\n } else {\n console.warn('[SIGN] Could not find our recipient record', this.roleId, this.sortedRecipients);\n }\n\n // TODO: Envelope \"complete\" | \"declined\" | \"canceled\"\n // TODO: Recipient \"canceled\"\n this.isDone = this.submitted;\n this.showDone = this.submitted;\n\n if (this.envelope.status === 'canceled') {\n this.fatalErrorHeader = 'Unable to Start Signing Session';\n this.fatalErrorMessage = 'This envelope has been canceled. The sender has been notified.';\n } else if (this.recipient.status === 'declined') {\n this.fatalErrorHeader = 'Unable to Start Signing Session';\n this.fatalErrorMessage = 'You have declined to sign this envelope. The sender has been notified.';\n } else if (this.agreed) {\n this.nextButtonLabel = 'Next';\n }\n\n this.checkRecipientFields();\n this.envelopeLoaded?.emit({endpoint: this.endpoint, envelope: this.envelope});\n } catch (e) {\n console.log('[SIGN] Error with signing session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n this.showLoadError = true;\n }\n }\n\n componentDidRender() {\n const headerTarget = this.headerTargetId ? document.getElementById(this.headerTargetId) : null;\n const headerEl = document.getElementById('verdocs-sign-header');\n if (headerTarget && headerEl) {\n console.log('[SIGN] Moving header');\n headerEl.remove();\n headerTarget.append(headerEl);\n }\n }\n\n handleClickAgree() {\n this.submitting = true;\n envelopeRecipientAgree(this.endpoint, this.envelopeId, this.roleId, true)\n .then(() => {\n this.nextButtonLabel = 'Next';\n this.recipient.agreed = true;\n this.submitting = false;\n this.agreed = true; // The server returns a recipient object but it's not \"deep\" so we track this locally\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'agreed'});\n })\n .catch(e => {\n console.log('[SIGN] Update failure', e);\n this.submitting = false;\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleOptionSelected(e: any) {\n switch (e.detail.id) {\n case 'later':\n this.finishLater = true;\n this.showFinishLater = true;\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'later'});\n break;\n\n case 'claim':\n VerdocsToast('This feature will be available in an upcoming release.');\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'claimed'});\n break;\n\n case 'decline':\n {\n this.submitting = true;\n const declineResult = await envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Decline result', declineResult);\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'declined'});\n this.submitting = false;\n this.fatalErrorHeader = 'Declined';\n this.fatalErrorMessage = 'You have declined to sign this envelope. The sender has been notified.';\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':\n {\n const firstDoc = this.envelope.documents.find(doc => doc.type === 'attachment');\n if (firstDoc) {\n saveAttachment(this.endpoint, this.envelope, firstDoc.id).catch(e => {\n console.log('[SIGN] Error downloading PDF', e);\n });\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'downloaded'});\n }\n }\n break;\n }\n }\n\n updateRecipientFieldValue(fieldName: string, updateResult: any) {\n console.log('[SIGN] updateRecipientFieldValue', fieldName, updateResult);\n this.getRecipientFields().forEach(oldField => {\n if (oldField.name === fieldName) {\n oldField.value = updateResult.value;\n // TODO: Keeping this while attachments still rely on it\n oldField.settings = updateResult.settings;\n updateDocumentFieldValue(oldField);\n this.checkRecipientFields();\n }\n });\n }\n\n saveFieldChange(fieldName: string, fields: Record<string, any>) {\n console.log('[SIGN] saveFieldChange', fieldName, fields);\n updateEnvelopeField(this.endpoint, this.envelopeId, fieldName, fields) //\n .then(updateResult => this.updateRecipientFieldValue(fieldName, updateResult))\n .catch(e => {\n if (e.response?.status === 401 && e.response?.data?.error === 'jwt expired') {\n console.log('[SIGN] Signing session expired');\n this.fatalErrorHeader = 'Signing Session Expired';\n this.fatalErrorMessage = 'Please reload your browser to continue.';\n } else {\n console.log('[SIGN] Server error', e);\n }\n\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleFieldChange(field: IEnvelopeField, e: any) {\n const {value, checked} = e.target;\n\n switch (field.type as any) {\n // TODO: Remove legacy type when no longer needed\n case 'textarea':\n case 'textbox':\n return this.saveFieldChange(field.name, {prepared: false, value});\n\n case 'checkbox': {\n return this.saveFieldChange(field.name, {prepared: false, value: String(e.target.checked)});\n }\n\n case 'radio': {\n return this.saveFieldChange(field.name, {prepared: false, value: String(e.target.checked)});\n }\n\n case 'dropdown':\n // TODO: Set prepared to false server-side.\n console.log('Saving dropdown', field.name, e.detail);\n return this.saveFieldChange(field.name, {prepared: false, value: e.detail});\n\n case 'initial':\n // This can be caused by a focus-out event if the user clicks the field\n // after it's already filled in, then clicks something else like a textbox.\n // We don't visually indicate the focus, but it's still there.\n if (!e.detail) {\n return;\n }\n\n this.showSpinner = true;\n const initialsBlob = await (await fetch(e.detail)).blob();\n return createInitials(this.endpoint, 'initial', initialsBlob) //\n .then(async newInitials => {\n const updateResult = await updateEnvelopeFieldInitials(this.endpoint, this.envelopeId, field.name, newInitials.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.showSpinner = false;\n })\n .catch(e => {\n console.log('Error updating initials', e);\n this.showSpinner = false;\n });\n\n case 'signature':\n // This can be caused by a focus-out event if the user clicks the field\n // after it's already filled in, then clicks something else like a textbox.\n // We don't visually indicate the focus, but it's still there.\n if (!e.detail) {\n return;\n }\n\n this.showSpinner = true;\n const signatureBlob = await (await fetch(e.detail)).blob();\n return createSignature(this.endpoint, 'signature', signatureBlob) //\n .then(async newSignature => {\n console.log('Signature update result', newSignature);\n const updateResult = await updateEnvelopeFieldSignature(this.endpoint, this.envelopeId, field.name, newSignature.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.showSpinner = false;\n })\n .catch(e => {\n console.warn('[SIGN] Error updating signature', e);\n this.showSpinner = false;\n });\n\n case 'date':\n const {formattedDate} = e.detail;\n if (formattedDate) {\n return this.saveFieldChange(field.name, {prepared: false, value: formattedDate});\n }\n break;\n\n case 'timestamp':\n console.log('[SIGN] Updating timestamp', {value, ts: e.target.getAttribute('timestamp')});\n break;\n\n default:\n console.log('[SIGN] Unhandled field update', {value, checked}, field);\n break;\n }\n }\n\n isFieldFilled(field: IEnvelopeField) {\n const {value = ''} = field;\n switch (field.type as any) {\n case 'textarea':\n case 'textbox':\n switch (field.validator || '') {\n case 'email':\n return isValidEmail(value);\n case 'phone':\n return isValidPhone(value);\n default:\n return (value || '').trim() !== '';\n }\n\n case 'signature':\n return value === 'signed';\n\n case 'initial':\n return value === 'initialed';\n\n // Timestamp fields get automatically filled when the envelope is submitted.\n case 'timestamp':\n return true;\n\n case 'date':\n return !!value;\n\n case 'attachment':\n return value === 'attached';\n\n case 'dropdown':\n return value !== '';\n\n case 'checkbox':\n return value === 'true';\n\n case 'radio':\n if (!!field.group) {\n return this.getRecipientFields()\n .filter(f => f.group === field.group)\n .some(field => field.value === 'true');\n }\n\n return field.value === 'true';\n\n default:\n return false;\n }\n }\n\n isFieldValid(field: IEnvelopeField) {\n return !field.required || this.isFieldFilled(field);\n }\n\n getSortedFillableFields() {\n const recipientFields = this.getRecipientFields().filter(field => field.type !== 'timestamp');\n sortFields(recipientFields);\n return recipientFields;\n }\n\n async handleNext() {\n if (this.nextSubmits) {\n try {\n // Patches the date picker to be forcibly removed if still showing during submission\n document.getElementById('air-datepicker-global-container')?.remove();\n\n this.submitting = true;\n const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Submitted successfully', result);\n this.recipient.status = 'submitted';\n this.showDone = true;\n console.log('[SIGN] Reloading envelope');\n getEnvelope(this.endpoint, this.envelopeId)\n .then(envelope => {\n this.envelope = envelope;\n // The show-done dialog does this\n // this.isDone = true;\n this.submitting = false;\n })\n .catch(e => {\n // this.isDone = true;\n console.log('[SIGN] Error reloading envelope', e);\n this.submitting = false;\n });\n } catch (e) {\n console.log('[SIGN] Error submitting', e);\n }\n\n return;\n }\n\n // Find and focus the next incomplete field (that is fillable)\n const emptyFields = this.getSortedFillableFields().filter(field => field.required && !this.isFieldFilled(field));\n sortFields(emptyFields);\n\n const focusedIndex = emptyFields.findIndex(field => field.name === this.focusedField);\n let nextFocusedIndex = focusedIndex + 1;\n if (nextFocusedIndex >= emptyFields.length) {\n nextFocusedIndex = 0;\n }\n\n let nextRequiredField = emptyFields[nextFocusedIndex];\n // console.log('Next field', nextRequiredField, emptyFields);\n\n // Skip signature and initial fields that are already filled in. We have to count our \"skips\" just in case, to avoid infinite loops.\n let skips = 0;\n if (skips < emptyFields.length && ['signature', 'initial'].includes(nextRequiredField.type) && ['initialed', 'signed'].includes(nextRequiredField.value)) {\n skips++;\n nextFocusedIndex++;\n if (nextFocusedIndex >= emptyFields.length) {\n nextFocusedIndex = 0;\n }\n nextRequiredField = emptyFields[nextFocusedIndex];\n }\n\n if (skips >= emptyFields.length) {\n nextRequiredField = null;\n }\n\n if (nextRequiredField) {\n const id = getFieldId(nextRequiredField);\n const el = document.getElementById(id) as any;\n el?.scrollIntoView({behavior: 'smooth'});\n el?.focusField();\n this.focusedField = nextRequiredField.name;\n }\n }\n\n getRecipientFields() {\n return this.envelope.fields.filter(field => field.role_name === this.recipient.role_name);\n }\n\n // See if everything that \"needs to be\" filled in is, and all \"fillable fields\" are valid\n checkRecipientFields() {\n const invalidFields = this.getRecipientFields().filter(field => !this.isFieldValid(field));\n if (invalidFields.length < 1) {\n this.nextButtonLabel = 'Finish';\n if (!this.nextSubmits) {\n this.nextSubmits = true;\n }\n } else {\n console.log(\n '[SIGN] Invalid fields remaining',\n invalidFields.map(field => field.name),\n );\n this.nextButtonLabel = 'Next';\n this.nextSubmits = false;\n }\n }\n\n attachFieldAttributes(pageInfo, field, el) {\n // We can get called multiple times as rendering completes and it's hard to avoid that\n // because it's a ton of work for the callers to know it's been done already. But we\n // don't want to attach multiple event listeners or we get dupe event handling, like\n // calling the server twice on every field update. Since JS has no removeAllEventListeners()\n // option, using removeEventListener() isn't reliable the way Stencil binds local function\n // contexts, and cloneNode messes up the rest of the rendering, we just track it with a flag.\n if (el.getAttribute('attached') === '1') {\n return;\n }\n el.setAttribute('attached', '1');\n\n el.addEventListener('input', (e: any) => {\n // console.log('[SIGN] onfieldInput', e.detail, e.target.value);\n // These field types don't emit fieldChange. Should we standardize on that? We don't tap \"input\" for fields like\n // text boxes because we'd be updating the field on every keystroke. We do those on blur which fires fieldChange.\n if (e.target.type === 'radio' || e.target.type === 'checkbox') {\n // if (e.target.type === 'radio' || e.target.name.includes('date') || e.target.name.includes('checkbox')) {\n this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());\n } else {\n this.checkRecipientFields();\n }\n });\n el.addEventListener('attached', async (e: any) => {\n console.log('[SIGN] onAttached', e.detail, e.target.value);\n this.showSpinner = true;\n try {\n const updateResult = await uploadEnvelopeFieldAttachment(this.endpoint, this.envelopeId, field.name, e.detail);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.checkRecipientFields();\n\n const newEl = renderDocumentField('envelope', field, pageInfo, {disabled: false, editable: false, draggable: false, done: this.isDone});\n this.attachFieldAttributes(pageInfo, field, newEl);\n\n this.showSpinner = false;\n } catch (e) {\n console.log('Error uploading attachment', e);\n VerdocsToast('Unable to upload attachment, please try again later', {style: 'error'});\n this.showSpinner = false;\n }\n });\n el.addEventListener('deleted', async (e: any) => {\n console.log('[SIGN] onDeleted', e.detail, e.target.value);\n this.showSpinner = true;\n try {\n const updateResult = await deleteEnvelopeFieldAttachment(this.endpoint, this.envelopeId, field.name);\n console.log('[SIGN] Deleted attachment', updateResult);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.checkRecipientFields();\n\n const newEl = renderDocumentField('envelope', field, pageInfo, {disabled: false, editable: false, draggable: false, done: this.isDone});\n this.attachFieldAttributes(pageInfo, field, newEl);\n\n this.showSpinner = false;\n } catch (e) {\n console.log('Error uploading attachment', e);\n VerdocsToast('Unable to upload attachment, please try again later', {style: 'error'});\n this.showSpinner = false;\n }\n });\n el.addEventListener('focusout', e => {\n // These field types trigger focusout as they're used, even without a value change\n if (field.type !== 'dropdown' && field.type !== 'attachment') {\n this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());\n }\n });\n el.addEventListener('fieldChange', e => {\n this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());\n });\n\n el.setAttribute('templateid', this.envelope.template_id);\n el.setAttribute('fieldname', field.name);\n el.setAttribute('page', pageInfo.pageNumber);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n\n const fullName = formatFullName(this.recipient);\n el.setAttribute('initials', fullNameToInitials(fullName));\n el.setAttribute('name', fullName);\n }\n\n handlePageRendered(e: any) {\n const pageInfo = e.detail as IDocumentPageInfo;\n\n // NOTE: We don't filter on pageNumber here because we need the position in the\n // entire list to set the tabIndex.\n const recipientFields = this.getSortedFillableFields();\n console.log('[SIGN] Rendering fields for page', pageInfo.pageNumber, recipientFields);\n\n // First render the fields for the signer\n recipientFields.forEach((field, tabIndex) => {\n if (field.page !== pageInfo.pageNumber) {\n return;\n }\n\n const el = renderDocumentField('envelope', field, pageInfo, {disabled: false, editable: false, draggable: false, done: this.isDone}, tabIndex);\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, el);\n }\n });\n\n // Now render the fields for other signers who have yet to act\n this.sortedRecipients\n .filter(r => r.role_name !== this.recipient.role_name && (r.status === 'invited' || r.status === 'opened' || r.status === 'pending'))\n .forEach(() => {\n this.getRecipientFields()\n .filter(field => field.page === pageInfo.pageNumber)\n .forEach(field => {\n const el = renderDocumentField('envelope', field, pageInfo, {disabled: true, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, el);\n }\n });\n });\n\n this.checkRecipientFields();\n }\n\n handleAuthenticateSigner(params: TAuthenticateRecipientRequest) {\n console.log('[SIGN] Submitting authentication step', params);\n authenticateSigner(this.endpoint, params)\n .then(r => {\n console.log('[SIGN] Authentication successful', r);\n this.authStep = r.auth_step;\n this.authDetails = r.auth_details;\n })\n .catch(e => {\n console.log('[SIGN] Error submitting authentication step', e);\n if (e.response?.data?.error?.includes('failed')) {\n this.fatalErrorHeader = 'Recipient Verification Failed';\n this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';\n this.isDone = true;\n } else {\n VerdocsToast(e.response?.data?.error || 'Unable to verify your identity. Please try again.', {style: 'error'});\n }\n });\n }\n\n render() {\n if (this.showLoadError) {\n return (\n <Host>\n <verdocs-ok-dialog\n heading=\"Unable to Start Signing\"\n message={`Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.`}\n buttonLabel=\"OK\"\n onNext={() => {\n window.location.reload();\n }}\n />\n </Host>\n );\n }\n\n if (!this.envelope) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (this.fatalErrorMessage) {\n return (\n <Host class={{agreed: this.agreed}}>\n <div class=\"fatal-error\">\n <div class=\"message\">\n <div class=\"header\">{this.fatalErrorHeader}</div>\n <p>{this.fatalErrorMessage}</p>\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.isDone) {\n return (\n <Host class={{agreed: this.agreed}}>\n <verdocs-view endpoint={this.endpoint} envelopeId={this.envelopeId} onSdkError={e => this.sdkError?.emit(e.detail)} />\n\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n 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.`}\n onNext={(e: any) => {\n e.preventDefault();\n e.stopPropagation();\n this.showDone = false;\n this.isDone = true;\n }}\n />\n )}\n\n {this.submitting && (\n <div class=\"loading-indicator\">\n <verdocs-loader />\n </div>\n )}\n </Host>\n );\n }\n\n if (!this.agreed) {\n return (\n <Host class=\"agreed\">\n <div id=\"verdocs-sign-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>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\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 </div>\n\n <div class=\"cover\">\n <div class=\"agree\">\n <verdocs-checkbox name=\"agree\" label=\"By checking this box, you:\" onInput={() => this.handleClickAgree()} />\n <ul>\n <li>\n Agree to use electronic records and signatures, and confirm you have read the{' '}\n <a href=\"https://verdocs.com/en/electronic-record-signature-disclosure/\" target=\"_blank\">\n Electronic Record and Signatures Disclosure\n </a>\n .\n </li>\n <li>\n Agree to Verdocs'{' '}\n <a href=\"https://verdocs.com/en/eula\" target=\"_blank\">\n End User License Agreement\n </a>{' '}\n and confirm you have read Verdocs'{' '}\n <a href=\"https://verdocs.com/en/privacy-policy/\" target=\"_blank\">\n Privacy Policy\n </a>\n .\n </li>\n </ul>\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.authStep === 'passcode') {\n return (\n <Host class=\"kba\">\n <div id=\"verdocs-sign-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>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\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 </div>\n\n <div class=\"cover\">\n <div class=\"kba\">\n <verdocs-kba-dialog\n mode=\"text\"\n step={1}\n steps={1}\n helptitle=\"Document is protected by a Passcode\"\n helptext=\"Please enter your Passcode to proceed. If you do not have one, please contact the sender.\"\n label=\"Passcode\"\n onNext={e => this.handleAuthenticateSigner({auth_method: 'passcode', code: e.detail as string})}\n />\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.authStep === 'kba') {\n return (\n <Host class=\"kba\">\n <div id=\"verdocs-sign-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>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\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 </div>\n\n <div class=\"cover\">\n <div class=\"kba\">\n <verdocs-kba-dialog\n mode=\"identity\"\n helptitle=\"Document requires identity verification\"\n helptext=\"Please complete your contact details to proceed.\"\n recipient={this.recipient}\n onNext={async e => {\n const recipDetails = e.detail as IRecipient;\n this.handleAuthenticateSigner({\n auth_method: 'kba',\n first_name: recipDetails.first_name,\n last_name: recipDetails.last_name,\n address: recipDetails.address,\n city: recipDetails.city,\n state: recipDetails.state,\n zip: recipDetails.zip,\n ssn_last_4: recipDetails.ssn_last_4,\n dob: recipDetails.dob,\n });\n }}\n />\n </div>\n </div>\n </Host>\n );\n }\n\n // if (this.kbaStep === 'challenge') {\n // const questionNumber = this.kbaChoices.length;\n // const kbaQuestion = this.kbaQuestions[questionNumber];\n // return (\n // <Host class=\"kba\">\n // <div id=\"verdocs-sign-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>\n // </div>\n //\n // <div class=\"document\" style={{paddingTop: '15px'}}>\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 // </div>\n //\n // <div class=\"cover\">\n // <div class=\"kba\">\n // {this.kbaChoices.length >= this.kbaQuestions.length ? (\n // <verdocs-spinner />\n // ) : (\n // <verdocs-kba-dialog\n // mode=\"choice\"\n // helptitle=\"Your identity requires additional verification\"\n // helptext={kbaQuestion?.prompt || 'Please select one of the options below.'}\n // choices={kbaQuestion?.answer || ['Skip Question']}\n // step={questionNumber + 1}\n // steps={this.kbaQuestions.length}\n // onNext={async (e: any) => {\n // const answer = e.detail as string;\n // this.kbaChoices = [...this.kbaChoices, answer];\n // if (this.kbaChoices.length >= this.kbaQuestions.length) {\n // const responses = this.kbaQuestions.map((q, i) => ({type: q.type, answer: this.kbaChoices[i]}));\n // console.log('Submitting KBA responses', this.kbaChoices, responses);\n // try {\n // const response = await submitKbaChallengeResponse(this.endpoint, this.envelopeId, this.roleId, responses);\n // console.log('KBA challenge response', response);\n // this.kbaStep = response.kba_step;\n // if (this.kbaStep === 'failed') {\n // this.fatalErrorHeader = 'Identity Verification Failed';\n // this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';\n // this.isDone = true;\n // } else {\n // this.kbaQuestions = (response as any).questions?.question || [];\n // this.kbaChoices = [];\n // }\n // } catch (e) {\n // console.log('Error submitting KBA challenge', e);\n // this.kbaStep = '';\n // this.fatalErrorHeader = 'Unable to Verify Identity';\n // this.fatalErrorMessage = e.response?.data?.error || 'Please try again later.';\n // this.isDone = true;\n // }\n // }\n // }}\n // />\n // )}\n // </div>\n // </div>\n // </Host>\n // );\n // }\n\n return (\n <Host>\n <div id=\"verdocs-sign-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\n {!this.finishLater && <verdocs-button size=\"xsmall\" label={this.nextButtonLabel} disabled={!this.agreed} onClick={() => this.handleNext()} />}\n\n <div style={{marginLeft: '10px'}} />\n <verdocs-dropdown options={!this.isDone && !this.finishLater ? inProgressMenuOptions : doneMenuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n {(this.envelope.documents || []).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 // In signing mode we show the original template page with all the recipient fields so we can show source formatting and\n // where everything went. This is also a visual indicator when optional fields weren't filled in by previous actors, or\n // future signers still need to act. Once we're \"done\" we flip to showing the envelope's documents which have the final\n // field vales (so far) stamped into them.\n // TODO: Confirm that a pure page-number match is good enough to find the matching template page. We need to make sure\n // we either don't reset our page numbers for additional attachments, or add match-on identifiers to work around that.\n // console.log('tp', templatePage, page);\n return (\n <verdocs-envelope-document-page\n envelopeId={this.envelopeId}\n documentId={envelopeDocument.id}\n endpoint={this.endpoint}\n virtualWidth={pageSize.width}\n virtualHeight={pageSize.height}\n pageNumber={pageNumber}\n onPageRendered={e => this.handlePageRendered(e)}\n type=\"filled\"\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n );\n })}\n </Fragment>\n );\n })}\n </div>\n\n {this.showFinishLater && (\n <verdocs-ok-dialog\n heading=\"You've saved your document to finish later.\"\n message={`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`}\n onNext={() => (this.showFinishLater = false)}\n />\n )}\n\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n 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.`}\n onNext={() => {\n this.showDone = false;\n this.isDone = true;\n }}\n />\n )}\n\n {this.submitting ||\n (this.showSpinner && (\n <verdocs-portal>\n <div class=\"spinner-overlay\">\n <verdocs-spinner />\n </div>\n </verdocs-portal>\n ))}\n </Host>\n );\n }\n}\n"]}
@@ -99,7 +99,6 @@ export class VerdocsContactPicker {
99
99
  handleSubmit(e) {
100
100
  var _a;
101
101
  e.stopPropagation();
102
- console.log('sub');
103
102
  this.showSuggestions = false;
104
103
  (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({
105
104
  first_name: this.first_name,
@@ -151,29 +150,29 @@ export class VerdocsContactPicker {
151
150
  if (((_t = (_s = (_r = this.featureFlags) === null || _r === void 0 ? void 0 : _r.toggles) === null || _s === void 0 ? void 0 : _s.find(t => t.name === 'id-verification')) === null || _t === void 0 ? void 0 : _t.enabled) === true && !!this.activeEntitlements.id_auth) {
152
151
  verificationOptions.push({ label: 'ID Check', value: 'id' });
153
152
  }
154
- return (h("form", { key: 'b2cda11b375e553371cc05752be032dcc64fb372', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { key: '604d484cc9c77a84a2853ddeef8255f871532cf3', class: "row" }, h("label", { key: '99c7c4c15a51d09b0266ebbc9688540ea068b430', htmlFor: this.firstNameFieldId }, "Name:"), h("div", { key: 'aeb977e092aca353119db0ff1afa258f45850e35', class: "names-row" }, h("input", { key: '1564f8fb970581524148889aa8a4a8d0981398a7', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.first_name, placeholder: "First...", onFocus: () => {
153
+ return (h("form", { key: '04692a50db278a08b263fa5343a90f832b7a39ee', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { key: '49c73586ee2a3b55284c7060578ce2f76442eb7f', class: "row" }, h("label", { key: 'c14e09c5fafc682f8e84409cabb8c16080a542ef', htmlFor: this.firstNameFieldId }, "Name:"), h("div", { key: '64d1f1411604edaab598852ecccbd2e81cac5d01', class: "names-row" }, h("input", { key: 'ab738a6d5fb36378c6cae917ffc0cce34eefc251', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.first_name, placeholder: "First...", onFocus: () => {
155
154
  // Give the blur event a chance to hide it first if going between first/last
156
155
  setTimeout(() => {
157
156
  var _a;
158
157
  this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0;
159
158
  }, 100);
160
- }, onInput: e => this.handleFirstNameChange(e) }), h("input", { key: '66d1d0456f24d49fe0be746c4f35c0b3a12ba841', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.last_name, placeholder: "Last...", onFocus: () => {
159
+ }, onInput: e => this.handleFirstNameChange(e) }), h("input", { key: 'e78173446c9eb0d24125b1e9a614948b2c0dea34', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.last_name, placeholder: "Last...", onFocus: () => {
161
160
  // Give the blur event a chance to hide it first if going between first/last
162
161
  setTimeout(() => {
163
162
  var _a;
164
163
  this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0;
165
164
  }, 100);
166
- }, onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (h("verdocs-portal", { key: '674571611b133f76e90d07685632b7430d0eb7c4', anchor: this.firstNameFieldId, onClickAway: () => (this.showSuggestions = false), id: "verdocs-contact-picker-suggestions" }, h("div", { key: 'c5e53ec590fc64b092d08540ac39ca482e78a79c', class: "dropdown" }, this.contactSuggestions
165
+ }, onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (h("verdocs-portal", { key: '9947a7f8ab42d1790df06e579796d4a2e93245d1', anchor: this.firstNameFieldId, onClickAway: () => (this.showSuggestions = false), id: "verdocs-contact-picker-suggestions" }, h("div", { key: 'fbc62ab9fe1d080bd24cdcd6d06af7608957566c', class: "dropdown" }, this.contactSuggestions
167
166
  .filter(suggestion => !this.first_name || suggestion.first_name.toLowerCase().includes(this.first_name.toLowerCase()))
168
167
  .map(suggestion => {
169
168
  var _a;
170
169
  return (h("div", { key: (_a = suggestion.id) !== null && _a !== void 0 ? _a : suggestion.email, class: "suggestion", onClick: e => this.handleSelectSuggestion(e, suggestion) }, suggestion.picture ? h("img", { alt: "Avatar", class: "avatar", src: suggestion.picture }) : h("div", { class: "avatar", innerHTML: addrBookIcon }), h("div", { class: "details" }, h("div", { class: "name" }, formatFullName(suggestion)), suggestion.email && h("div", { class: "destination" }, suggestion.email), suggestion.phone && h("div", { class: "destination" }, suggestion.phone))));
171
- }))))), h("div", { key: '61a05720167114b362f5c2c4f6ee794e9a823059', class: "row" }, h("label", { key: '9432c1386e24d7f8d09dc5415958bf88e49ed83c', htmlFor: this.emailFieldId }, "Email:"), h("input", { key: 'b5ce556ba67b26bfd09e9d6b0ea0427363355510', id: this.emailFieldId, name: this.emailFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", "aria-autocomplete": "none", value: this.email, placeholder: "Invite/verify via email...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.email = e.target.value) })), globalSMS && (h("div", { key: '6bf7712b43c8b7924ff792290c723a66a1a62296', class: "row" }, h("label", { key: 'e3744f9b285d7624b65ad4d94909c36cd156bb2d', htmlFor: this.phoneFieldId }, "Phone:"), h("input", { key: 'e249b2e1432384b95a75fc3fb9a889cefd43fb14', id: this.phoneFieldId, name: this.phoneFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", "aria-autocomplete": "none", value: this.phone, placeholder: "Invite/verify via SMS...", onFocus: () => (this.showSuggestions = false), onInput: (e) => {
170
+ }))))), h("div", { key: 'e8e70c9c0eb9aac2949ea3f1cdcad31a0109b1e6', class: "row" }, h("label", { key: '1a0446066a2337a8317e4f1a30a7b4bbaac8e9d9', htmlFor: this.emailFieldId }, "Email:"), h("input", { key: '700f23efdcdad3569e37f68beb87254768997476', id: this.emailFieldId, name: this.emailFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", "aria-autocomplete": "none", value: this.email, placeholder: "Invite/verify via email...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.email = e.target.value) })), globalSMS && (h("div", { key: 'e10b121fcc2c612b95a9e8ebd35fbbaba78f31ff', class: "row" }, h("label", { key: '924df4057ae82c1a42a060f6457999e9e7be3e9d', htmlFor: this.phoneFieldId }, "Phone:"), h("input", { key: 'be1707e6c04744891626dd14ce7beee679e33b95', id: this.phoneFieldId, name: this.phoneFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", "aria-autocomplete": "none", value: this.phone, placeholder: "Invite/verify via SMS...", onFocus: () => (this.showSuggestions = false), onInput: (e) => {
172
171
  this.phone = convertToE164(e.target.value);
173
- } }))), h(Fragment, { key: '202d93245182ee54519b9f58962facd0a9f524d0' }, verificationOptions.length > 0 && (h("div", { key: '0af26fd7633cb6f062e56be65adac2743814304e', class: "row" }, h("label", { key: 'ed1366652b0db48b1e2f41dc6d65348c9699887e' }, "Recipient Verification:"), h("verdocs-multiselect", { key: '107921cec4e2d8b7a7ea11c7451451a50216e08a', label: "", placeholder: "None", options: verificationOptions, selectedOptions: this.auth_methods, onSelectionChanged: (e) => {
172
+ } }))), h(Fragment, { key: 'a27e49219aed619f6ce094ca91d7bdb8ee4bd361' }, verificationOptions.length > 0 && (h("div", { key: '3c2eb231a5e10223a0554b2661f7902a7343ff14', class: "row" }, h("label", { key: '2424d844f6c54d6898aff3746c665e8f0028393f' }, "Recipient Verification:"), h("verdocs-multiselect", { key: '15e4fdff72818343d016749c83a10602083c19db', label: "", placeholder: "None", options: verificationOptions, selectedOptions: this.auth_methods, onSelectionChanged: (e) => {
174
173
  console.log('selectedOptions changed', e.detail);
175
174
  this.auth_methods = e.detail.selectedOptions;
176
- } }))), this.auth_methods.includes('passcode') && (h("div", { key: '2a9e0e955211846e2875661fd9408e7e58092504', class: "row pin-code" }, h("label", { key: '8295693a69e940d6f5a00f0972766bbf0e13a18f', htmlFor: this.phoneFieldId }, "Passcode:"), h("input", { key: '60e78fb22245e97efab765e3a47f112b4bb58341', id: "verdocs-passcode", name: "verdocs-passcode", type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.passcode, placeholder: "4-8 digits recommended...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.passcode = e.target.value) })))), h("div", { key: '47ed4c44d6f4e0f9d5d9733a47183e9c652d7a1b', class: "row message" }, h("label", { key: 'a471e42ac85935d711f4ff362c3f5c01b84bab82', htmlFor: "verdocs-contact-picker-message" }, "Message:"), h("textarea", { key: 'c3b3011e031f0552ad18bf3d14525b439f729b6f', id: "verdocs-contact-picker-message", name: "verdocs-contact-picker-message", "data-lpignore": "true", autocomplete: "blocked", placeholder: "Optional message to include in invitation...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.message = e.target.value) }, this.message)), h("div", { key: '02e7f7d6f8fb67ce5c301fc573a91234ac8c0a1a', class: "buttons" }, h("div", { key: '217bdfe57aae7db9ed38e4e0430e3fb017c2f206', class: "flex-fill" }), h("verdocs-button", { key: '91b7541ffaf7b2ca2b18dfb0962cde71e11669f8', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: 'd55e4aad3e7647d05e7052e9ee1176855101d598', label: "OK", size: "small", disabled: !canSubmit, onClick: !canSubmit ? () => { } : e => this.handleSubmit(e) }))));
175
+ } }))), this.auth_methods.includes('passcode') && (h("div", { key: 'cb92bbf38b29b81dd443ea63ee52f5c38ca3e462', class: "row pin-code" }, h("label", { key: 'a31d6aa08952a78774e0f7d6fc89a0c992fff0ce', htmlFor: this.phoneFieldId }, "Passcode:"), h("input", { key: '416d22a451995e318fed41b36feda632b7324231', id: "verdocs-passcode", name: "verdocs-passcode", type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.passcode, placeholder: "4-8 digits recommended...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.passcode = e.target.value) })))), h("div", { key: '12d5f81d3750dfbec08c01d9f9e5ef8ff4e4ab61', class: "row message" }, h("label", { key: 'c5d2265df1203c2f1cb09e4ef99ece909a11c3d1', htmlFor: "verdocs-contact-picker-message" }, "Message:"), h("textarea", { key: '875a4a055860497d1b5f270fe9e4f76fd1594d86', id: "verdocs-contact-picker-message", name: "verdocs-contact-picker-message", "data-lpignore": "true", autocomplete: "blocked", placeholder: "Optional message to include in invitation...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.message = e.target.value) }, this.message)), h("div", { key: 'fc5dc7ca853d00fbeb22b912f7da5db32c394bdb', class: "buttons" }, h("div", { key: 'cb19eed74dcc4a093d0420352e31b50c252ca857', class: "flex-fill" }), h("verdocs-button", { key: 'b94abf0ba4e07bdb661aee267a2d23bd1e5f9555', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: '2ad4cf79ebbac22818caee6fd732cf4cbf01436b', label: "OK", size: "small", disabled: !canSubmit, onClick: !canSubmit ? () => { } : e => this.handleSubmit(e) }))));
177
176
  }
178
177
  static get is() { return "verdocs-contact-picker"; }
179
178
  static get originalStyleUrls() {
@@ -217,7 +216,7 @@ export class VerdocsContactPicker {
217
216
  "mutable": false,
218
217
  "complexType": {
219
218
  "original": "Partial<IRecipient> | null",
220
- "resolved": "{ id?: string; envelope_id?: string; role_name?: string; profile_id?: string; status?: TRecipientStatus; first_name?: string; last_name?: string; full_name?: string; email?: string; phone?: string; address?: string; city?: string; state?: string; zip?: string; ssn_last_4?: string; dob?: string; sequence?: number; order?: number; type?: TRecipientType; delegator?: boolean; delegated_to?: string; message?: string; claimed?: boolean; agreed?: boolean; key_used_to_conclude?: string; environment?: string; created_at?: string; updated_at?: string; last_attempt_at?: string; auth_methods?: TRecipientAuthMethod[]; passcode?: string; auth_step?: \"complete\"; envelope?: IEnvelope; profile?: IProfile; in_app_key?: string; }",
219
+ "resolved": "{ id?: string; envelope_id?: string; role_name?: string; profile_id?: string; status?: TRecipientStatus; first_name?: string; last_name?: string; full_name?: string; email?: string; phone?: string; address?: string; city?: string; state?: string; zip?: string; ssn_last_4?: string; dob?: string; sequence?: number; order?: number; type?: TRecipientType; delegator?: boolean; delegated_to?: string; message?: string; claimed?: boolean; agreed?: boolean; key_used_to_conclude?: string; environment?: string; created_at?: string; updated_at?: string; last_attempt_at?: string; auth_methods?: TRecipientAuthMethod[]; auth_method_states?: Record<TRecipientAuthMethod, string>; passcode?: string; auth_step?: \"complete\"; in_app_key?: string; kba_questions?: any; kba_details?: any; envelope?: IEnvelope; profile?: IProfile; }",
221
220
  "references": {
222
221
  "Partial": {
223
222
  "location": "global",
@@ -1 +1 @@
1
- {"version":3,"file":"verdocs-contact-picker.js","sourceRoot":"","sources":["../../../../src/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EA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,KAAK,EAAC,SAAS;gBAClB,4DAAK,KAAK,EAAC,WAAW,GAAG;gBAEzB,uEAAgB,OAAO,EAAC,SAAS,EAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GAAI;gBACpG,uEAAgB,KAAK,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GAAI,CACxH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, h, Event, EventEmitter, Fragment, Prop, State} from '@stencil/core';\nimport {formatFullName, getActiveEntitlements, IEntitlement, IProfile, IRecipient, isValidEmail, TEntitlement, TRecipientAuthMethod, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {getFeatureFlags, IFeatureFlags} from '../../../utils/Unleash';\nimport {convertToE164} from '../../../utils/utils';\n\nconst addrBookIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-book-user\"><path d=\"M15 13a3 3 0 1 0-6 0\"/><path d=\"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20\"/><circle cx=\"12\" cy=\"8\" r=\"2\"/></svg>`;\n\nexport interface IContactSearchEvent {\n query: string;\n}\n\nexport interface IContactSelectEvent {\n first_name: string;\n last_name: string;\n email: string;\n phone: string;\n message: string;\n delegator: boolean;\n auth_methods: TRecipientAuthMethod[];\n passcode: string;\n address: string;\n zip: string;\n}\n\nexport type TPickerContact = Partial<IProfile>;\n\n/**\n * Display a contact picker suitable for filling out Recipient objects when sending Envelopes.\n *\n * This picker can also be integrated with a backend to provide contact list / suggestion / address-book style behavior. As the\n * user interacts with the component, the text entered in the name fields is sent back to the parent via the `searchContacts` event.\n * The parent can use that text as a query string to call a backend to obtain appropriate contacts to show. This list may also be\n * hard-coded ahead of time to provide the user with smart suggestions on initial display, such as \"Recently Used\" contacts, or\n * to always display the user's own contact record.\n *\n * ```ts\n * <verdocs-contact-picker\n * templateRole={role}\n * contactSuggestions={[]}\n * onNext={e => console.log('Contact completed', e.detail)}\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-contact-picker',\n styleUrl: 'verdocs-contact-picker.scss',\n shadow: false,\n})\nexport class VerdocsContactPicker {\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 * The role that this contact will be assigned to.\n */\n @Prop() templateRole: Partial<IRecipient> | null = null;\n\n /**\n * If set, suggestions will be displayed in a drop-down list to the user. It is recommended that the number\n * of suggestions be limited to the 5 best matching records.\n */\n @Prop() contactSuggestions: TPickerContact[] = [];\n\n /**\n * Event fired when the user enters text in the search field. The calling application may use this to update\n * the `contactSuggestions` property.\n */\n @Event({composed: true}) searchContacts: EventEmitter<IContactSearchEvent>;\n\n /**\n * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n /**\n * Event fired when the user changes the type.\n */\n @Event({composed: true}) next: EventEmitter<IContactSelectEvent>;\n\n @State() first_name: string;\n @State() last_name: string;\n @State() email: string;\n @State() phone: string;\n @State() zip: string;\n @State() address: string;\n @State() message: string;\n @State() showSuggestions: boolean = false;\n @State() showMessage: boolean = false;\n @State() delegator: boolean = false;\n @State() auth_methods: TRecipientAuthMethod[] = [];\n @State() passcode: string = '';\n\n @State() firstNameFieldId = `verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2, 11)}`;\n @State() lastNameFieldId = `verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2, 11)}`;\n @State() emailFieldId = `verdocs-contact-picker-email-${Math.random().toString(36).substring(2, 11)}`;\n @State() phoneFieldId = `verdocs-contact-picker-phone-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() featureFlags: IFeatureFlags = null;\n @State() activeEntitlements: Partial<Record<TEntitlement, IEntitlement>> = {};\n\n componentWillLoad() {\n this.endpoint.loadSession();\n\n if (this.templateRole) {\n const fullName = formatFullName(this.templateRole);\n const nameComponents = fullName.split(' ');\n const firstName = this.templateRole.first_name || nameComponents.shift() || '';\n const lastName = this.templateRole.last_name || nameComponents.join(' ') || '';\n this.first_name = firstName;\n this.last_name = lastName;\n\n this.email = this.templateRole.email || '';\n this.phone = this.templateRole.phone || '';\n this.delegator = this.templateRole.delegator || false;\n this.message = this.templateRole.message || '';\n this.showMessage = this.message !== '';\n this.auth_methods = this.templateRole.auth_methods || [];\n this.passcode = this.templateRole.passcode || '';\n }\n\n getActiveEntitlements(this.endpoint)\n .then(r => {\n this.activeEntitlements = r;\n console.log('[CONTACT PICKER] Loaded entitlements', r);\n })\n .catch(e => console.log('[CONTACT PICKER] Error loading entitlements, some features may be disabled.', e));\n\n getFeatureFlags()\n .then(flags => {\n this.featureFlags = flags;\n console.log('[CONTACT PICKER] Loaded feature flags', flags);\n })\n .catch(e => {\n console.log('[CONTACT PICKER] Unable to fetch feature flags, some features may be disabled.', e);\n });\n }\n\n handleFirstNameChange(e: any) {\n this.first_name = e.target.value;\n this.searchContacts?.emit({query: this.first_name});\n }\n\n handleLastNameChange(e: any) {\n this.last_name = e.target.value;\n this.searchContacts?.emit({query: this.last_name});\n }\n\n handleCancel(e: any) {\n e.stopPropagation();\n console.log('cxl');\n this.showSuggestions = false;\n this.exit?.emit();\n }\n\n handleSubmit(e: any) {\n e.stopPropagation();\n\n console.log('sub');\n this.showSuggestions = false;\n this.next?.emit({\n first_name: this.first_name,\n last_name: this.last_name,\n email: this.email,\n phone: this.phone,\n message: this.message,\n delegator: this.delegator,\n auth_methods: this.auth_methods,\n passcode: this.passcode,\n address: this.address,\n zip: this.zip,\n });\n }\n\n handleSelectSuggestion(e: any, suggestion: TPickerContact) {\n e.stopPropagation();\n\n this.first_name = suggestion.first_name;\n this.last_name = suggestion.last_name;\n this.email = suggestion.email;\n this.phone = suggestion.phone;\n this.showSuggestions = false;\n }\n\n // The reason for the random names/IDs is to disable browser autocomplete. We set the autocomplete tags but many browsers ignore them\n // and show a duplicate autocomplete picker on top of our own.\n render() {\n // const hasBasics = this.first_name && this.last_name && (isValidEmail(this.email) || isValidPhone(this.phone));\n const hasBasics = this.first_name && this.last_name && isValidEmail(this.email);\n const hasAuthRequirements =\n !this.auth_methods.length ||\n (this.auth_methods.includes('passcode') && !!this.passcode) ||\n (this.auth_methods.includes('kba') && !!this.first_name && !!this.last_name) ||\n (this.auth_methods.includes('email') && !!this.email) ||\n (this.auth_methods.includes('sms') && !!this.phone);\n const canSubmit = hasBasics && hasAuthRequirements;\n const globalSMS = this.featureFlags?.toggles?.find(t => t.name === 'sms')?.enabled === true;\n\n const verificationOptions = [];\n\n if (this.featureFlags?.toggles?.find(t => t.name === 'passcode-verification')?.enabled === true) {\n verificationOptions.push({label: 'Passcode', value: 'passcode'});\n }\n\n if (this.featureFlags?.toggles?.find(t => t.name === 'email-verification')?.enabled === true) {\n verificationOptions.push({label: 'Email', value: 'email'});\n }\n\n if (globalSMS && this.featureFlags?.toggles?.find(t => t.name === 'sms-verification')?.enabled === true && !!this.activeEntitlements.sms_auth) {\n verificationOptions.push({label: 'SMS (One-Time Code)', value: 'sms'});\n }\n\n if (this.featureFlags?.toggles?.find(t => t.name === 'kba-verification')?.enabled === true && !!this.activeEntitlements.kba_auth) {\n verificationOptions.push({label: 'Knowledge-Based (KBA)', value: 'kba'});\n }\n\n if (this.featureFlags?.toggles?.find(t => t.name === 'id-verification')?.enabled === true && !!this.activeEntitlements.id_auth) {\n verificationOptions.push({label: 'ID Check', value: 'id'});\n }\n\n return (\n <form onSubmit={e => e.preventDefault()} onClick={e => e.stopPropagation()} autocomplete=\"off\">\n <div class=\"row\">\n <label htmlFor={this.firstNameFieldId}>Name:</label>\n <div class=\"names-row\">\n <input\n id={this.firstNameFieldId}\n name={this.firstNameFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.first_name}\n placeholder=\"First...\"\n onFocus={() => {\n // Give the blur event a chance to hide it first if going between first/last\n setTimeout(() => {\n this.showSuggestions = this.contactSuggestions?.length > 0;\n }, 100);\n }}\n onInput={e => this.handleFirstNameChange(e)}\n />\n <input\n id={this.lastNameFieldId}\n name={this.lastNameFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.last_name}\n placeholder=\"Last...\"\n onFocus={() => {\n // Give the blur event a chance to hide it first if going between first/last\n setTimeout(() => {\n this.showSuggestions = this.contactSuggestions?.length > 0;\n }, 100);\n }}\n onInput={e => this.handleLastNameChange(e)}\n />\n </div>\n\n {this.showSuggestions && (\n <verdocs-portal anchor={this.firstNameFieldId} onClickAway={() => (this.showSuggestions = false)} id=\"verdocs-contact-picker-suggestions\">\n <div class=\"dropdown\">\n {this.contactSuggestions\n .filter(suggestion => !this.first_name || suggestion.first_name.toLowerCase().includes(this.first_name.toLowerCase()))\n .map(suggestion => (\n <div key={suggestion.id ?? suggestion.email} class=\"suggestion\" onClick={e => this.handleSelectSuggestion(e, suggestion)}>\n {suggestion.picture ? <img alt=\"Avatar\" class=\"avatar\" src={suggestion.picture} /> : <div class=\"avatar\" innerHTML={addrBookIcon} />}\n <div class=\"details\">\n <div class=\"name\">{formatFullName(suggestion)}</div>\n {suggestion.email && <div class=\"destination\">{suggestion.email}</div>}\n {suggestion.phone && <div class=\"destination\">{suggestion.phone}</div>}\n </div>\n </div>\n ))}\n </div>\n </verdocs-portal>\n )}\n </div>\n\n <div class=\"row\">\n <label htmlFor={this.emailFieldId}>Email:</label>\n <input\n id={this.emailFieldId}\n name={this.emailFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autoComplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.email}\n placeholder=\"Invite/verify via email...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.email = e.target.value)}\n />\n </div>\n\n {globalSMS && (\n <div class=\"row\">\n <label htmlFor={this.phoneFieldId}>Phone:</label>\n <input\n id={this.phoneFieldId}\n name={this.phoneFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autoComplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.phone}\n placeholder=\"Invite/verify via SMS...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => {\n this.phone = convertToE164(e.target.value);\n }}\n />\n </div>\n )}\n\n <Fragment>\n {verificationOptions.length > 0 && (\n <div class=\"row\">\n <label>Recipient Verification:</label>\n <verdocs-multiselect\n label=\"\"\n placeholder=\"None\"\n options={verificationOptions}\n selectedOptions={this.auth_methods}\n onSelectionChanged={(e: any) => {\n console.log('selectedOptions changed', e.detail);\n this.auth_methods = e.detail.selectedOptions;\n }}\n />\n </div>\n )}\n\n {this.auth_methods.includes('passcode') && (\n <div class=\"row pin-code\">\n <label htmlFor={this.phoneFieldId}>Passcode:</label>\n <input\n id=\"verdocs-passcode\"\n name=\"verdocs-passcode\"\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.passcode}\n placeholder=\"4-8 digits recommended...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.passcode = e.target.value)}\n />\n </div>\n )}\n </Fragment>\n\n <div class=\"row message\">\n <label htmlFor=\"verdocs-contact-picker-message\">Message:</label>\n <textarea\n id=\"verdocs-contact-picker-message\"\n name=\"verdocs-contact-picker-message\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n placeholder=\"Optional message to include in invitation...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.message = e.target.value)}\n >\n {this.message}\n </textarea>\n </div>\n\n <div class=\"buttons\">\n <div class=\"flex-fill\" />\n\n <verdocs-button variant=\"outline\" label=\"Cancel\" size=\"small\" onClick={e => this.handleCancel(e)} />\n <verdocs-button label=\"OK\" size=\"small\" disabled={!canSubmit} onClick={!canSubmit ? () => {} : e => this.handleSubmit(e)} />\n </div>\n </form>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"verdocs-contact-picker.js","sourceRoot":"","sources":["../../../../src/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAgB,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AACvF,OAAO,EAAC,cAAc,EAAE,qBAAqB,EAAsC,YAAY,EAAsC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAC7K,OAAO,EAAC,eAAe,EAAgB,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAEnD,MAAM,YAAY,GAAG,mUAAmU,CAAC;AAqBzV;;;;;;;;;;;;;;;;GAgBG;AAMH,MAAM,OAAO,oBAAoB;IALjC;QAME;;WAEG;QACK,aAAQ,GAAoB,eAAe,CAAC,UAAU,EAAE,CAAC;QAEjE;;WAEG;QACK,iBAAY,GAA+B,IAAI,CAAC;QAExD;;;WAGG;QACK,uBAAkB,GAAqB,EAAE,CAAC;QAyBzC,oBAAe,GAAY,KAAK,CAAC;QACjC,gBAAW,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, h, Event, EventEmitter, Fragment, Prop, State} from '@stencil/core';\nimport {formatFullName, getActiveEntitlements, IEntitlement, IProfile, IRecipient, isValidEmail, TEntitlement, TRecipientAuthMethod, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {getFeatureFlags, IFeatureFlags} from '../../../utils/Unleash';\nimport {convertToE164} from '../../../utils/utils';\n\nconst addrBookIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-book-user\"><path d=\"M15 13a3 3 0 1 0-6 0\"/><path d=\"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20\"/><circle cx=\"12\" cy=\"8\" r=\"2\"/></svg>`;\n\nexport interface IContactSearchEvent {\n query: string;\n}\n\nexport interface IContactSelectEvent {\n first_name: string;\n last_name: string;\n email: string;\n phone: string;\n message: string;\n delegator: boolean;\n auth_methods: TRecipientAuthMethod[];\n passcode: string;\n address: string;\n zip: string;\n}\n\nexport type TPickerContact = Partial<IProfile>;\n\n/**\n * Display a contact picker suitable for filling out Recipient objects when sending Envelopes.\n *\n * This picker can also be integrated with a backend to provide contact list / suggestion / address-book style behavior. As the\n * user interacts with the component, the text entered in the name fields is sent back to the parent via the `searchContacts` event.\n * The parent can use that text as a query string to call a backend to obtain appropriate contacts to show. This list may also be\n * hard-coded ahead of time to provide the user with smart suggestions on initial display, such as \"Recently Used\" contacts, or\n * to always display the user's own contact record.\n *\n * ```ts\n * <verdocs-contact-picker\n * templateRole={role}\n * contactSuggestions={[]}\n * onNext={e => console.log('Contact completed', e.detail)}\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-contact-picker',\n styleUrl: 'verdocs-contact-picker.scss',\n shadow: false,\n})\nexport class VerdocsContactPicker {\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 * The role that this contact will be assigned to.\n */\n @Prop() templateRole: Partial<IRecipient> | null = null;\n\n /**\n * If set, suggestions will be displayed in a drop-down list to the user. It is recommended that the number\n * of suggestions be limited to the 5 best matching records.\n */\n @Prop() contactSuggestions: TPickerContact[] = [];\n\n /**\n * Event fired when the user enters text in the search field. The calling application may use this to update\n * the `contactSuggestions` property.\n */\n @Event({composed: true}) searchContacts: EventEmitter<IContactSearchEvent>;\n\n /**\n * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n /**\n * Event fired when the user changes the type.\n */\n @Event({composed: true}) next: EventEmitter<IContactSelectEvent>;\n\n @State() first_name: string;\n @State() last_name: string;\n @State() email: string;\n @State() phone: string;\n @State() zip: string;\n @State() address: string;\n @State() message: string;\n @State() showSuggestions: boolean = false;\n @State() showMessage: boolean = false;\n @State() delegator: boolean = false;\n @State() auth_methods: TRecipientAuthMethod[] = [];\n @State() passcode: string = '';\n\n @State() firstNameFieldId = `verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2, 11)}`;\n @State() lastNameFieldId = `verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2, 11)}`;\n @State() emailFieldId = `verdocs-contact-picker-email-${Math.random().toString(36).substring(2, 11)}`;\n @State() phoneFieldId = `verdocs-contact-picker-phone-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() featureFlags: IFeatureFlags = null;\n @State() activeEntitlements: Partial<Record<TEntitlement, IEntitlement>> = {};\n\n componentWillLoad() {\n this.endpoint.loadSession();\n\n if (this.templateRole) {\n const fullName = formatFullName(this.templateRole);\n const nameComponents = fullName.split(' ');\n const firstName = this.templateRole.first_name || nameComponents.shift() || '';\n const lastName = this.templateRole.last_name || nameComponents.join(' ') || '';\n this.first_name = firstName;\n this.last_name = lastName;\n\n this.email = this.templateRole.email || '';\n this.phone = this.templateRole.phone || '';\n this.delegator = this.templateRole.delegator || false;\n this.message = this.templateRole.message || '';\n this.showMessage = this.message !== '';\n this.auth_methods = this.templateRole.auth_methods || [];\n this.passcode = this.templateRole.passcode || '';\n }\n\n getActiveEntitlements(this.endpoint)\n .then(r => {\n this.activeEntitlements = r;\n console.log('[CONTACT PICKER] Loaded entitlements', r);\n })\n .catch(e => console.log('[CONTACT PICKER] Error loading entitlements, some features may be disabled.', e));\n\n getFeatureFlags()\n .then(flags => {\n this.featureFlags = flags;\n console.log('[CONTACT PICKER] Loaded feature flags', flags);\n })\n .catch(e => {\n console.log('[CONTACT PICKER] Unable to fetch feature flags, some features may be disabled.', e);\n });\n }\n\n handleFirstNameChange(e: any) {\n this.first_name = e.target.value;\n this.searchContacts?.emit({query: this.first_name});\n }\n\n handleLastNameChange(e: any) {\n this.last_name = e.target.value;\n this.searchContacts?.emit({query: this.last_name});\n }\n\n handleCancel(e: any) {\n e.stopPropagation();\n console.log('cxl');\n this.showSuggestions = false;\n this.exit?.emit();\n }\n\n handleSubmit(e: any) {\n e.stopPropagation();\n\n this.showSuggestions = false;\n this.next?.emit({\n first_name: this.first_name,\n last_name: this.last_name,\n email: this.email,\n phone: this.phone,\n message: this.message,\n delegator: this.delegator,\n auth_methods: this.auth_methods,\n passcode: this.passcode,\n address: this.address,\n zip: this.zip,\n });\n }\n\n handleSelectSuggestion(e: any, suggestion: TPickerContact) {\n e.stopPropagation();\n\n this.first_name = suggestion.first_name;\n this.last_name = suggestion.last_name;\n this.email = suggestion.email;\n this.phone = suggestion.phone;\n this.showSuggestions = false;\n }\n\n // The reason for the random names/IDs is to disable browser autocomplete. We set the autocomplete tags but many browsers ignore them\n // and show a duplicate autocomplete picker on top of our own.\n render() {\n // const hasBasics = this.first_name && this.last_name && (isValidEmail(this.email) || isValidPhone(this.phone));\n const hasBasics = this.first_name && this.last_name && isValidEmail(this.email);\n const hasAuthRequirements =\n !this.auth_methods.length ||\n (this.auth_methods.includes('passcode') && !!this.passcode) ||\n (this.auth_methods.includes('kba') && !!this.first_name && !!this.last_name) ||\n (this.auth_methods.includes('email') && !!this.email) ||\n (this.auth_methods.includes('sms') && !!this.phone);\n const canSubmit = hasBasics && hasAuthRequirements;\n const globalSMS = this.featureFlags?.toggles?.find(t => t.name === 'sms')?.enabled === true;\n\n const verificationOptions = [];\n\n if (this.featureFlags?.toggles?.find(t => t.name === 'passcode-verification')?.enabled === true) {\n verificationOptions.push({label: 'Passcode', value: 'passcode'});\n }\n\n if (this.featureFlags?.toggles?.find(t => t.name === 'email-verification')?.enabled === true) {\n verificationOptions.push({label: 'Email', value: 'email'});\n }\n\n if (globalSMS && this.featureFlags?.toggles?.find(t => t.name === 'sms-verification')?.enabled === true && !!this.activeEntitlements.sms_auth) {\n verificationOptions.push({label: 'SMS (One-Time Code)', value: 'sms'});\n }\n\n if (this.featureFlags?.toggles?.find(t => t.name === 'kba-verification')?.enabled === true && !!this.activeEntitlements.kba_auth) {\n verificationOptions.push({label: 'Knowledge-Based (KBA)', value: 'kba'});\n }\n\n if (this.featureFlags?.toggles?.find(t => t.name === 'id-verification')?.enabled === true && !!this.activeEntitlements.id_auth) {\n verificationOptions.push({label: 'ID Check', value: 'id'});\n }\n\n return (\n <form onSubmit={e => e.preventDefault()} onClick={e => e.stopPropagation()} autocomplete=\"off\">\n <div class=\"row\">\n <label htmlFor={this.firstNameFieldId}>Name:</label>\n <div class=\"names-row\">\n <input\n id={this.firstNameFieldId}\n name={this.firstNameFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.first_name}\n placeholder=\"First...\"\n onFocus={() => {\n // Give the blur event a chance to hide it first if going between first/last\n setTimeout(() => {\n this.showSuggestions = this.contactSuggestions?.length > 0;\n }, 100);\n }}\n onInput={e => this.handleFirstNameChange(e)}\n />\n <input\n id={this.lastNameFieldId}\n name={this.lastNameFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.last_name}\n placeholder=\"Last...\"\n onFocus={() => {\n // Give the blur event a chance to hide it first if going between first/last\n setTimeout(() => {\n this.showSuggestions = this.contactSuggestions?.length > 0;\n }, 100);\n }}\n onInput={e => this.handleLastNameChange(e)}\n />\n </div>\n\n {this.showSuggestions && (\n <verdocs-portal anchor={this.firstNameFieldId} onClickAway={() => (this.showSuggestions = false)} id=\"verdocs-contact-picker-suggestions\">\n <div class=\"dropdown\">\n {this.contactSuggestions\n .filter(suggestion => !this.first_name || suggestion.first_name.toLowerCase().includes(this.first_name.toLowerCase()))\n .map(suggestion => (\n <div key={suggestion.id ?? suggestion.email} class=\"suggestion\" onClick={e => this.handleSelectSuggestion(e, suggestion)}>\n {suggestion.picture ? <img alt=\"Avatar\" class=\"avatar\" src={suggestion.picture} /> : <div class=\"avatar\" innerHTML={addrBookIcon} />}\n <div class=\"details\">\n <div class=\"name\">{formatFullName(suggestion)}</div>\n {suggestion.email && <div class=\"destination\">{suggestion.email}</div>}\n {suggestion.phone && <div class=\"destination\">{suggestion.phone}</div>}\n </div>\n </div>\n ))}\n </div>\n </verdocs-portal>\n )}\n </div>\n\n <div class=\"row\">\n <label htmlFor={this.emailFieldId}>Email:</label>\n <input\n id={this.emailFieldId}\n name={this.emailFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autoComplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.email}\n placeholder=\"Invite/verify via email...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.email = e.target.value)}\n />\n </div>\n\n {globalSMS && (\n <div class=\"row\">\n <label htmlFor={this.phoneFieldId}>Phone:</label>\n <input\n id={this.phoneFieldId}\n name={this.phoneFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autoComplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.phone}\n placeholder=\"Invite/verify via SMS...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => {\n this.phone = convertToE164(e.target.value);\n }}\n />\n </div>\n )}\n\n <Fragment>\n {verificationOptions.length > 0 && (\n <div class=\"row\">\n <label>Recipient Verification:</label>\n <verdocs-multiselect\n label=\"\"\n placeholder=\"None\"\n options={verificationOptions}\n selectedOptions={this.auth_methods}\n onSelectionChanged={(e: any) => {\n console.log('selectedOptions changed', e.detail);\n this.auth_methods = e.detail.selectedOptions;\n }}\n />\n </div>\n )}\n\n {this.auth_methods.includes('passcode') && (\n <div class=\"row pin-code\">\n <label htmlFor={this.phoneFieldId}>Passcode:</label>\n <input\n id=\"verdocs-passcode\"\n name=\"verdocs-passcode\"\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.passcode}\n placeholder=\"4-8 digits recommended...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.passcode = e.target.value)}\n />\n </div>\n )}\n </Fragment>\n\n <div class=\"row message\">\n <label htmlFor=\"verdocs-contact-picker-message\">Message:</label>\n <textarea\n id=\"verdocs-contact-picker-message\"\n name=\"verdocs-contact-picker-message\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n placeholder=\"Optional message to include in invitation...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.message = e.target.value)}\n >\n {this.message}\n </textarea>\n </div>\n\n <div class=\"buttons\">\n <div class=\"flex-fill\" />\n\n <verdocs-button variant=\"outline\" label=\"Cancel\" size=\"small\" onClick={e => this.handleCancel(e)} />\n <verdocs-button label=\"OK\" size=\"small\" disabled={!canSubmit} onClick={!canSubmit ? () => {} : e => this.handleSubmit(e)} />\n </div>\n </form>\n );\n }\n}\n"]}